// This is an automatically generated code sample.
// To make this code sample work in your Oracle Cloud tenancy,
// please replace the values for any parameters whose current values do not fit
// your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
// boolean, number, and enum parameters with values not fitting your use case).
import * as capacitymanagement from "oci-capacitymanagement";
import common = require("oci-common");
// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.
const provider: common.ConfigFileAuthenticationDetailsProvider = new common.ConfigFileAuthenticationDetailsProvider();
(async () => {
try {
// Create a service client
const client = new capacitymanagement.InternalDemandSignalClient({
authenticationDetailsProvider: provider
});
// Create a request and dependent object(s).
const createInternalOccmDemandSignalDeliveryDetails = ({
compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
occCustomerGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-occCustomerGroupId-Value",
demandSignalId: "ocid1.test.oc1..<unique_ID>EXAMPLE-demandSignalId-Value",
demandSignalItemId: "ocid1.test.oc1..<unique_ID>EXAMPLE-demandSignalItemId-Value",
acceptedQuantity: 942,
justification: "EXAMPLE-justification-Value",
notes: "EXAMPLE-notes-Value",
freeformTags: {
EXAMPLE_KEY_iwt5U: "EXAMPLE_VALUE_EerDKbPUcckrLbP4OCry"
},
definedTags: {
EXAMPLE_KEY_f7DlL: {
EXAMPLE_KEY_MYvki: "EXAMPLE--Value"
}
}
} as unknown) as capacitymanagement.models.CreateInternalOccmDemandSignalDeliveryDetails;
const createInternalOccmDemandSignalDeliveryRequest: capacitymanagement.requests.CreateInternalOccmDemandSignalDeliveryRequest = {
createInternalOccmDemandSignalDeliveryDetails: createInternalOccmDemandSignalDeliveryDetails,
opcRetryToken: "EXAMPLE-opcRetryToken-Value",
opcRequestId: "82THGBWH3YKHMS7YQ3R6<unique_ID>"
};
// Send request to the Client.
const createInternalOccmDemandSignalDeliveryResponse = await client.createInternalOccmDemandSignalDelivery(
createInternalOccmDemandSignalDeliveryRequest
);
} catch (error) {
console.log("createInternalOccmDemandSignalDelivery Failed with error " + error);
}
})();