// 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{CompartmentId: common.String("CyGoLlJHvzey7O9pCetYuqjaUudbtJV3ldNA1dFU1CXKJGf7MQlm7wt3Eg2HUERICL2Blf1XX8oWk0lL49Z4mgizrZj6IsMRgVSSaclLhBml24Ec0WFpR4T9WIWA7fYSEQWnC0u0JbwpLAqXLusgG9sWObFFiNcVQ8Jxt3NqbR9kYPSRWkKFHxgG2rgDDL3G7EZumcTxZ4IrFjm3nNuUu4S7LSKL21nt68Di5NGxzXvDWZWt7aJ0QIrXlj1OqCR"),
		DnsServerZone:           common.String("EXAMPLE-dnsServerZone-Value"),
		EndpointCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointCompartmentId-Value"),
		FreeformTags:            map[string]string{"EXAMPLE_KEY_G1YB1": "EXAMPLE_VALUE_A6hywBPfrbZBtmt0rXim"},
		VcnId:                   common.String("oeBXKEnxQTHPYQZyGXoJWuHC6KiRyrI0TLFx3UuYdbCI0JCo6G3QUGbc8pCqs7M704vrZb6t3AqgiJiPM6p3ykAeoaYKm04hhEQ26zjy77oLc6xNnwFse6AAiZZ7k0uZznBmhVtyhoe40vNrHjT51PHbVe2jFOuy0qtHqHu3VMd3EOBqHZr48NtE8eQDN7uGbh53sHUcdn3euxgxxNcRJUoRfmCXzfgGzFoEpfWX28Nnxp7xIrUOkdcrj3XllGI"),
		DefinedTags:             map[string]map[string]interface{}{"EXAMPLE_KEY_XFwHW": map[string]interface{}{"EXAMPLE_KEY_3zSc3": "EXAMPLE--Value"}},
		Description:             common.String("EXAMPLE-description-Value"),
		DisplayName:             common.String("EXAMPLE-displayName-Value"),
		IsPrivateNetworkEnabled: common.Bool(false),
		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"),
		EndpointId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointId-Value"),
		DnsServerIp:             common.String("EXAMPLE-dnsServerIp-Value"),
		EndpointName:            common.String("EXAMPLE-endpointName-Value"),
		SubnetId:                common.String("bQzrnVtaUT8zm8i9QH8ITz2hrLDwWn00CMWjjLet9pUm2MPknXDzRtt44RXcjiHIuMJy6EBtvIMNoy4iFBJMmnIDpnUeYtowZ5sKtwEbiGnFqARvSVDMuXyFf2OGAQTROO5CBtl95NawHek6NX1IB1BWPiu17nSX4fFeCCIYVL7iw91YuXKh7IVLV4fXObYhliYETxDdNkrwxd9JcOhsTdnGCdRtZ8RX68gStodytfj79oCCZ4UwDCb5lzZRT7M"),
		WorkspaceProperties:     map[string]string{"EXAMPLE_KEY_OyfwH": "EXAMPLE_VALUE_sW4Tmam5i7D1O4x7ZwX3"}},
		OpcRequestId:  common.String("LAGWICCZY70JMZFHRTCV<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)
}