// 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{DisplayName: common.String("EXAMPLE-displayName-Value"),
		EndpointId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointId-Value"),
		RegistryCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryCompartmentId-Value"),
		DefinedTags:             map[string]map[string]interface{}{"EXAMPLE_KEY_UAEQS": map[string]interface{}{"EXAMPLE_KEY_13teh": "EXAMPLE--Value"}},
		Description:             common.String("EXAMPLE-description-Value"),
		DnsServerIp:             common.String("EXAMPLE-dnsServerIp-Value"),
		DnsServerZone:           common.String("EXAMPLE-dnsServerZone-Value"),
		IsPrivateNetworkEnabled: common.Bool(false),
		RegistryId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryId-Value"),
		SubnetId:                common.String("gCVjk5BICxmZUtOOFJDOiyQkAyiQV6nF0QKRsOULVBh5rIZyNkWsg68X3kCmKBvPU42EmUr4fuk44GVeuH04YUpyM9jjDWab8OhrVmTvTivWyutvDn3AsZN3XZtjECxJsi3ICW1RgJwheF4Xa8nzGSv4LaG9Fk8IvoIc7gM3qph2LJcjhkxd1zhKR16qyfBMYC5WY0LZGPu3lr2tn0txyHmjWwofuSnNFbm4mOGGyXG4MiMtGKER7H575F3F0Lv"),
		VcnId:                   common.String("AP17Z4ai5jPxURfVfvUip7rzbPSjp6t1cmmjtD6z32byvmKeNYUVEycWew30TAZPyarzjZT4fV55gC5fh2LLnP8xZcAPcMmm983j49lg82SZ6i0sIBj7oBZD0pAPd1SJGSVtDNPHkUAS3alPyfBv4Z5EIAS8yORKpFROJSG9VjcAm7WV0ExRfp8VY0KxY0hpANClwvr1dsPi5j3rRuryX74BwVRNY5hazMRRJTDMajqdPVfJaBufLe18dzAgzkt"),
		CompartmentId:           common.String("1oexfy77mpS2mgqYNKcSkn2Woxz8HOrqg01VcJ7EpI7RVmZrqJ7rDvwOpgAaUC1jh67iEVUqX8R3wSadxTshdYdacuSWQzuk2FH00wUmWwNOIstgwPg2xSpOJgAO9IF6ifJC3K4tRzWuU1pFoicTVZ0psBdJIRsokBQLmQ42v0Of3T4ji9OWaKzygy8Smk5XwWC4gy63iX8H16lYeOUjpXpqxUlHAB17hUIIyQrIlBje4wlKn4pEx78wcU4N9yj"),
		EndpointCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointCompartmentId-Value"),
		EndpointName:            common.String("EXAMPLE-endpointName-Value"),
		FreeformTags:            map[string]string{"EXAMPLE_KEY_qw161": "EXAMPLE_VALUE_UcYMeBbIfJRAGezE71Ju"},
		RegistryName:            common.String("EXAMPLE-registryName-Value"),
		WorkspaceProperties:     map[string]string{"EXAMPLE_KEY_m01kV": "EXAMPLE_VALUE_8QSuyVq5H0LjwL06URnL"}},
		OpcRequestId:  common.String("ELX6NIOAUYAB6LUSZBUZ<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)
}