// 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{SubnetId: common.String("5uhNidy0B2pxGu9G6qvam2JZDk2evO16s0qtSFi8II7rWwRlxiehtCaK3ACk4368rHbJArYtf6gho1IopnDMHNa1SVobHMJPFXM3sh8lSkJ5KOVUyzjvnufjO1pbjLcJtPnzH6x2nrA7z71iYvLYfZr218GZms1ebPJJ2VjrsbSyOdZCMpa1QjvocFVtZ9Bp5xeNlVHNEOyBXYDkmuXApCpIx6RUr6wbBk9jpnMWh0nafTGJuoPHSrryCkEBayn"),
		VcnId:                   common.String("1arnHaQt7QRZMK9TiWML4KTlodzQOIU73RcujEfNfxuf4VjgGsHSSrKMzjIfm46qAf2bFZcGLgk9Xs4TBwtdiCDtETnRmy7JULmhKIwwfycDTsarrdpMhVPQHsLK59mRCW6TtU6qfcydSUfmsraQ0mc2s2YdlTzeyHPV5hL0dNMw9YcwTj0uQBktVeKnXu2ngJf8Gl64665YHDim3erSiuY9atrIjG06SHatxQ2rnHQjoGVEPFOHzpxPME7FUlr"),
		FreeformTags:            map[string]string{"EXAMPLE_KEY_4XUxq": "EXAMPLE_VALUE_770ahVWcx0Y9VQIEQEPu"},
		RegistryCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryCompartmentId-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"),
		RegistryName:            common.String("EXAMPLE-registryName-Value"),
		Description:             common.String("EXAMPLE-description-Value"),
		DisplayName:             common.String("EXAMPLE-displayName-Value"),
		WorkspaceProperties:     map[string]string{"EXAMPLE_KEY_zl1qn": "EXAMPLE_VALUE_vKe2a7kJOf7ClHNhZCHr"},
		EndpointId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointId-Value"),
		EndpointName:            common.String("EXAMPLE-endpointName-Value"),
		EndpointCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointCompartmentId-Value"),
		CompartmentId:           common.String("ocgR3LbKeLqQnMg3NCxIW62zegW402zZAJgwrpEIw0h7po8AoNnO2WKUFYwYuK12nwHspiUs23xU5ntz2xbG2vSufLhZHcDYUGdTEXYDhZMn8Y6CqyjkudcEP2k8TwAUKQP0TvpoiXTje7eL7Lmbh5qGy86Uo4k9T1cGam61XnZKcShsOd2CfZVvnyVicPVPETMCWuHJRrulO3vEGCPfFfvsXQfHAWhjkkwbLkqvDoNqVK2nZsHXCyKDTkn6eZa"),
		DefinedTags:             map[string]map[string]interface{}{"EXAMPLE_KEY_HoO8e": map[string]interface{}{"EXAMPLE_KEY_KdVyn": "EXAMPLE--Value"}}},
		OpcRequestId:  common.String("ZNNO19KKOMANA5WYCPX8<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)
}