// 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: "18GZms1ebPJJ2VjrsbSyOdZCMpa1QjvocFVtZ9Bp5xeNlVHNEOyBXYDkmuXApCpIx6RUr6wbBk9jpnMWh0nafTGJuoPHSrryCkEBayn4XUxq770ahVWcx0Y9VQIEQEPuKdVynHoO8ekazl1qnvKe2a7kJOf7ClHNhZCHrznNo19KKoMaNA5WYCpX8APQTjyzNiD9yVMC2vmlPzWkpGCKTrehfsC0PEySDqvVh4A6y6ppv5ljKhWl6wPI6m39r2I",
		subnetId: "mRfoTnvHpucYtD8WQ0JwutyeIFY0YWE5PfYnWuGaU1JfRRHKP10lpMcTsfSDyMfebD1iDdCI3N1FyVWheyKLYTtmaOe4vQJcDMrhMVmeGmq6HqgWM3jzYZsvQymzpLOR3WCxLVFoMA0JjJDQ5c2EglW1Dy0rlHf4rpqkJyfBvalLD5EPRxBfk8wm0CswCz6XTECdnsoDuwg9tToLd7vRt4GUjq8HLWHSAjMSJNVWJiooxpoSYgHnaEbNSnozo8l",
		dnsServerIp: "EXAMPLE-dnsServerIp-Value",
		dnsServerZone: "EXAMPLE-dnsServerZone-Value",
		freeformTags: {
			EXAMPLE_KEY_SVWxU :"EXAMPLE_VALUE_EIZqu1d0BbxGy2l9HDDD"
			},
		definedTags: {
			EXAMPLE_KEY_Q4Dew :{
				EXAMPLE_KEY_Y1xhx :"EXAMPLE--Value"
				}
			},
		description: "EXAMPLE-description-Value",
		displayName: "EXAMPLE-displayName-Value",
		compartmentId: "s2YdlTzeyHPV5hL0dNMw9YcwTj0uQBktVeKnXu2ngJf8Gl64665YHDim3erSiuY9atrIjG06SHatxQ2rnHQjoGVEPFOHzpxPME7FUlr5uhNidy0B2pxGu9G6qvam2JZDk2evO16s0qtSFi8II7rWwRlxiehtCaK3ACk4368rHbJArYtf6gho1IopnDMHNa1SVobHMJPFXM3sh8lSkJ5KOVUyzjvnufjO1pbjLcJtPnzH6x2nrA7z71iYvLYfZr2",
		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_ZOF1Q :"EXAMPLE_VALUE_huaGmiKxgEurNd8dC7EZ"
			},

		}

	const createWorkspaceRequest: dataintegration.requests.CreateWorkspaceRequest = { 
	createWorkspaceDetails: createWorkspaceDetails,
	opcRetryToken: "EXAMPLE-opcRetryToken-Value",
	opcRequestId: "JXGEH1YEGILMO7TOXK6K<unique_ID>",

		}; 


     // Send request to the Client.
     const createWorkspaceResponse = await client.createWorkspace(createWorkspaceRequest);
     }
     catch (error) {
         console.log("createWorkspace Failed with error  " + error);
     }
})();