// 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"),
		FreeformTags:            map[string]string{"EXAMPLE_KEY_mOg5t": "EXAMPLE_VALUE_AKOyJHLH2YBruOr4yNko"},
		RegistryId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryId-Value"),
		SubnetId:                common.String("AVdfyk5vGnIHkzIMxM8xy970x5gGQmAQeb6G5tAjBjncG1DIReimflwgtda5ECHhIxiTbfpSixbElxFlcw9G4QPufijU06rge8kDEZC14jPsGatwTYO95Lwvc0RvuiNyBhegG6D7daVlRVSEbiCtsBai180HTlH3DtAOnIGjMIuyZgdvz6TARQQwic5KZ61hy7bHrA7HUYSC84k8FJ5uyhrOz1bmqzKDhXXvFDWRWD7ywwVoSBSCrYnqBeO43DD"),
		WorkspaceProperties:     map[string]string{"EXAMPLE_KEY_40uDU": "EXAMPLE_VALUE_ik1wTj40aOgER9XY02my"},
		Description:             common.String("EXAMPLE-description-Value"),
		DnsServerZone:           common.String("EXAMPLE-dnsServerZone-Value"),
		EndpointCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointCompartmentId-Value"),
		IsPrivateNetworkEnabled: common.Bool(false),
		RegistryName:            common.String("EXAMPLE-registryName-Value"),
		CompartmentId:           common.String("MY7Icm4zciRhkYOQZoHbeULAq5nTuw6vCFwmlnPj85NbV9pRK0RiWfT0HUdghxC2ClJwXtGoM0xmWiuWUJizT6Wq2J5Xe89uc3ChA2WXTXtgyWS0Fnmu9lLoHxdHJWgh1vFrGSGlviCPQYWUjFt79X3pxMY5DGmFFPk7wbSWAWFewaDoK5DOyPT3q9fQvFnWDTz53pxTwt67nJATRpoL6jIhe9InnHGPKPqlEuBq5l8w1JpdfOL3IMqEUaMALtz"),
		DnsServerIp:             common.String("EXAMPLE-dnsServerIp-Value"),
		EndpointId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointId-Value"),
		DefinedTags:             map[string]map[string]interface{}{"EXAMPLE_KEY_XUTda": map[string]interface{}{"EXAMPLE_KEY_XSIEK": "EXAMPLE--Value"}},
		EndpointName:            common.String("EXAMPLE-endpointName-Value"),
		RegistryCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryCompartmentId-Value"),
		VcnId:                   common.String("SGax7ParFhbfWxZZbMGPCvh6JYItkM271bdFtSFOOGVtFagw4o46zjUG1T7pCT6xmpWe0fprk781Q2V1T0Ozxcshy37jDuEYPx5Xm06frXc1H0HEsyaGq1CzHCfLGcvH76UiYdRX0NHg7q4GCShMZnBLMPTqJ85ISa7817MwqoC6B0xfVZ9HZCfsLtaAVIbVwjh9nclKWHRF5DSEzugE7NupYECdRsIFNDCwntvT5AoZ8u0xQF0pyiw0MqF7xrP")},
		OpcRequestId:  common.String("SSQVBNYWZB7MXZOD1ZEU<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)
}