// 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{OpcRequestId: common.String("XYDFNZO0FIADKJ51IRWI<unique_ID>"),
		OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		CreateWorkspaceDetails: dataintegration.CreateWorkspaceDetails{DnsServerZone: common.String("EXAMPLE-dnsServerZone-Value"),
			EndpointId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointId-Value"),
			EndpointName:            common.String("EXAMPLE-endpointName-Value"),
			RegistryCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryCompartmentId-Value"),
			RegistryId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryId-Value"),
			RegistryName:            common.String("EXAMPLE-registryName-Value"),
			DefinedTags:             map[string]map[string]interface{}{"EXAMPLE_KEY_fFO0z": map[string]interface{}{"EXAMPLE_KEY_NXLsf": "EXAMPLE--Value"}},
			IsPrivateNetworkEnabled: common.Bool(false),
			SubnetId:                common.String("EqY5TlicH20CaHNlXEzJrKSLGwQQQE7NG3z4c2LDx2ckKdTtRK4l9pUzXHKli6mVfJw1H5xmLq8vNIjlW56MdTpFs4MweIY1GFcOorGmZYgA0rxld6HLDllYXTDkslG2okWmJMA2DIKJOvYdt6G8JmgxMuv8p5NEp9XVwsp6W1fcf9wqzvCjXPU1AeS1PvuvO4MF7zfwxMGopquyE2pCTdToxGMhPXWptO9VI8tcD71ryKojZZTkBT5n1u8Cvxv"),
			VcnId:                   common.String("mBTQjTca1cafFGbCkOGfZYLb5X4JDWRT2jDUMnup3djCkFYukpvfXLz0TU14MfXBaOXvlfo1kWpFExxgrW94bW82JG5aj2qM9WfPGOn1H3YxiVgprti47OKoidR6CTJKX9p4OfW9WjtKp0OSL6Cow1KmedpFGE3kOIRdwF6j07w1Z4W6T9cMYUhtV4z3Ge8bUf8ceQnu3NXAHL3nw3knMVqoRpjPWEpyNYMaBw8AvlZru4Iy25GnJGYWEzDupNz"),
			EndpointCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointCompartmentId-Value"),
			FreeformTags:            map[string]string{"EXAMPLE_KEY_RJXeV": "EXAMPLE_VALUE_H86r9loB66fXViLinZLx"},
			CompartmentId:           common.String("h3iebr1bs3QqxjhGbjHhrxn4HEO6Ui1ipJ3FVphB38RoadcnEV2MIQerdMfq78kdQs6dR6elhtqSIz0YVCx24Hk25lmf9Zr7qlQFgTHyq79r3uLxOS3OQUyWLBEEQB0WvCr7RfgeZu0EENgSAeUyPvI5TGNCV3yEoztQImfrQETkFLcWBvG82MfaBMZjTp2M8OgRFKZCrQZy8geb7A5vhQlbWicKyNn0VnWXpEjH1S6epwZ6Ahu7ADDpYyzOBA5"),
			DisplayName:             common.String("EXAMPLE-displayName-Value"),
			DnsServerIp:             common.String("EXAMPLE-dnsServerIp-Value"),
			WorkspaceProperties:     map[string]string{"EXAMPLE_KEY_g13p6": "EXAMPLE_VALUE_sWanzGcfPFJ8uzCt7h05"},
			Description:             common.String("EXAMPLE-description-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)
}