// 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).

package main

import (
	"context"
	"fmt"

	"github.com/oracle/oci-go-sdk/v65/common"
	"github.com/oracle/oci-go-sdk/v65/dataintegration"
	"github.com/oracle/oci-go-sdk/v65/example/helpers"
)

func ExampleCreateWorkspace() {
	// 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.
	client, err := dataintegration.NewDataIntegrationClientWithConfigurationProvider(common.DefaultConfigProvider())
	helpers.FatalIfError(err)

	// Create a request and dependent object(s).

	req := dataintegration.CreateWorkspaceRequest{CreateWorkspaceDetails: dataintegration.CreateWorkspaceDetails{DefinedTags: map[string]map[string]interface{}{"EXAMPLE_KEY_Uudbt": map[string]interface{}{"EXAMPLE_KEY_Yuqja": "EXAMPLE--Value"}},
		DisplayName:             common.String("EXAMPLE-displayName-Value"),
		FreeformTags:            map[string]string{"EXAMPLE_KEY_CJ6bZ": "EXAMPLE_VALUE_nCyGoLlJHvzey7O9pCet"},
		RegistryId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryId-Value"),
		VcnId:                   common.String("eoAwdSLazFmRjR93m2I6wUiqqk4F6ItV5d9jidE1eYf3lDwWzs2poYMPICqCBVo77uw6KcY0irE4f9saE8PsFMFGh6QwhQGA7JFaa0QMy5YDUiBOlP2L2nB5ZTNTqz35i2INBvdKkEJuVb3jABeedY23SxkJv7H5hOysygPq2P5RMD8kUFDlcIDG3Rr3l0MwK1S437TY7a05ungAjimt4eMsqRdwy7nkGEiBC1S4Z9WroyRCnMo0BxtwzZlZdQY"),
		CompartmentId:           common.String("KOclaxFRXynTJ6tXPdFhMSDIuhfcgaGorozovMuwzaQ7zOkWGzs36Z4tFUoBhC6hskCzQhWU2QCUDfv3pd5MYHRU5Bt1yZCB9JpOQFaXSLbdNkezxIv007WoSWWtOgKpiUumSISMXGqqWLJ94Pk3hPKDaIC947u7D7Fape2fPXZPOxP1A9Lonxur1QQYNpu5mB4lgXKCs7naN9DDP1yNzFYcfcSdmt6IdYtgErdzgvMYPvBEJ2SgdjCSIF7Vsgi"),
		RegistryCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryCompartmentId-Value"),
		WorkspaceProperties:     map[string]string{"EXAMPLE_KEY_3ldNA": "EXAMPLE_VALUE_1dFU1CXKJGf7MQlm7wt3"},
		Description:             common.String("EXAMPLE-description-Value"),
		DnsServerIp:             common.String("EXAMPLE-dnsServerIp-Value"),
		EndpointCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointCompartmentId-Value"),
		EndpointId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointId-Value"),
		EndpointName:            common.String("EXAMPLE-endpointName-Value"),
		IsPrivateNetworkEnabled: common.Bool(true),
		RegistryName:            common.String("EXAMPLE-registryName-Value"),
		DnsServerZone:           common.String("EXAMPLE-dnsServerZone-Value"),
		SubnetId:                common.String("BklOFe6i1OIIsODu3V4IlhMmSIjuide4sKj6nf5pUR2YgTV5aLS3QugZxqZJRwya4eCBah5ZbM4zzGj8ShkTMZjsRJFaqRHnTRvMaOH4kvOCzOza1c87WjobqTjyQdk43cbVeflzR6GjgZeqYqcIAT5HptLESNC3twGCDr18neJVgMwcF1IvHNxirfNh39EbzscJrzcB7noXAgcXSNQzP2oa0b9Iw7D6DtnBytnWl7PQOVuTSPQKh9liUrDLPjI")},
		OpcRequestId:  common.String("EG2HUERICL2BLF1XX8OW<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value")}

	// Send the request using the service client
	resp, err := client.CreateWorkspace(context.Background(), req)
	helpers.FatalIfError(err)

	// Retrieve value from the response.
	fmt.Println(resp)
}