// 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 dataintegration from "oci-dataintegration";
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 dataintegration.DataIntegrationClient({ authenticationDetailsProvider: provider });
// Create a request and dependent object(s).
const createWorkspaceDetails = {
vcnId: "i99pa5R4qpOGvuNSlWs8LAhRWCZivS8Wo0TPJlGXDtEHXRiY3yseRNSnlhOc9Z26tNphDw0q5HVUqglLVZjgPfIiwpBZ5sxBXRt6ztXnMD3LFBlqtktZTQASjR0SK6XXMENdTYde82p8WXmvvZnMDNPdJ5ynzZEpxqd186zwENh9hU0DSPKHKuBSKMU7JDYrLbe1e4XB04IGpeqNy0MwhVspJccIayux669X8dFl7ijXo7XYOc4wjDZscnVveYr",
subnetId: "ABnpWb5CLyxeCQDzYYVPAGcW0U9LFipRmRky6S7tHFldRYuEh1gdT7XpTqQ7fHBKPqomYe7IFhlrkinCdFl1W1r7BYXmcZxFiT0zBPpRvjkHTXwY3Rj33VpdpEw2IKlHtcg2pjPqbpIo6OxZl8slnPY9zciMqRDUERK0BzfUyZRATcM5DqsPjFyB9QEST3IOei5gybe2dbBljq3EImGNrWiWBSAUVd5tT1HhFVQwg3HG7PzzOlWVQRGMki9PmJK",
dnsServerIp: "EXAMPLE-dnsServerIp-Value",
dnsServerZone: "EXAMPLE-dnsServerZone-Value",
freeformTags: {
EXAMPLE_KEY_UZU2X :"EXAMPLE_VALUE_YqRcbOqUhAsmbh74VN8B"
},
definedTags: {
EXAMPLE_KEY_yeIcv :{
EXAMPLE_KEY_z4Mel :"EXAMPLE--Value"
}
},
description: "EXAMPLE-description-Value",
displayName: "EXAMPLE-displayName-Value",
compartmentId: "zN0BCbm0eDh2NRLG1rSrYL4e3igi5zKd1LzGkMs4siebTm6ItI7QM31DtXUjepnXfNRLB0R0Ljo4SdfuNLj3Q7rR5uxrteJI5IFTn1zVSlalICCceOsnkYoEKfqu8LeyroWtQHP9Bwp9hVBhZZgvISJE1AoWLeqAmGYybUvMrvFZZyOZTqLHJvP9tKTsmtl9EFedpaCK5tR4w7srVeuL9WJtxU086t8VYn9VmRQXgkdrdEQT2RNOtzdKrI0F14f",
isPrivateNetworkEnabled: true,
registryId: "ocid1.test.oc1..<unique_ID>EXAMPLE-registryId-Value",
endpointId: "ocid1.test.oc1..<unique_ID>EXAMPLE-endpointId-Value",
registryName: "EXAMPLE-registryName-Value",
registryCompartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-registryCompartmentId-Value",
endpointName: "EXAMPLE-endpointName-Value",
endpointCompartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-endpointCompartmentId-Value",
workspaceProperties: {
EXAMPLE_KEY_ww7NK :"EXAMPLE_VALUE_b6R0qkLyidAIXuSBAKTo"
},
}
const createWorkspaceRequest: dataintegration.requests.CreateWorkspaceRequest = {
createWorkspaceDetails: createWorkspaceDetails,
opcRetryToken: "EXAMPLE-opcRetryToken-Value",
opcRequestId: "ERB1KGYUC8YRAX70CB6R<unique_ID>",
};
// Send request to the Client.
const createWorkspaceResponse = await client.createWorkspace(createWorkspaceRequest);
}
catch (error) {
console.log("createWorkspace Failed with error " + error);
}
})();