// 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: "AP17Z4ai5jPxURfVfvUip7rzbPSjp6t1cmmjtD6z32byvmKeNYUVEycWew30TAZPyarzjZT4fV55gC5fh2LLnP8xZcAPcMmm983j49lg82SZ6i0sIBj7oBZD0pAPd1SJGSVtDNPHkUAS3alPyfBv4Z5EIAS8yORKpFROJSG9VjcAm7WV0ExRfp8VY0KxY0hpANClwvr1dsPi5j3rRuryX74BwVRNY5hazMRRJTDMajqdPVfJaBufLe18dzAgzkt",
		subnetId: "gCVjk5BICxmZUtOOFJDOiyQkAyiQV6nF0QKRsOULVBh5rIZyNkWsg68X3kCmKBvPU42EmUr4fuk44GVeuH04YUpyM9jjDWab8OhrVmTvTivWyutvDn3AsZN3XZtjECxJsi3ICW1RgJwheF4Xa8nzGSv4LaG9Fk8IvoIc7gM3qph2LJcjhkxd1zhKR16qyfBMYC5WY0LZGPu3lr2tn0txyHmjWwofuSnNFbm4mOGGyXG4MiMtGKER7H575F3F0Lv",
		dnsServerIp: "EXAMPLE-dnsServerIp-Value",
		dnsServerZone: "EXAMPLE-dnsServerZone-Value",
		freeformTags: {
			EXAMPLE_KEY_qw161 :"EXAMPLE_VALUE_UcYMeBbIfJRAGezE71Ju"
			},
		definedTags: {
			EXAMPLE_KEY_UAEQS :{
				EXAMPLE_KEY_13teh :"EXAMPLE--Value"
				}
			},
		description: "EXAMPLE-description-Value",
		displayName: "EXAMPLE-displayName-Value",
		compartmentId: "1oexfy77mpS2mgqYNKcSkn2Woxz8HOrqg01VcJ7EpI7RVmZrqJ7rDvwOpgAaUC1jh67iEVUqX8R3wSadxTshdYdacuSWQzuk2FH00wUmWwNOIstgwPg2xSpOJgAO9IF6ifJC3K4tRzWuU1pFoicTVZ0psBdJIRsokBQLmQ42v0Of3T4ji9OWaKzygy8Smk5XwWC4gy63iX8H16lYeOUjpXpqxUlHAB17hUIIyQrIlBje4wlKn4pEx78wcU4N9yj",
		isPrivateNetworkEnabled: false,
		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_m01kV :"EXAMPLE_VALUE_8QSuyVq5H0LjwL06URnL"
			},

		}

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

		}; 


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