// 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{OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		CreateWorkspaceDetails: dataintegration.CreateWorkspaceDetails{VcnId: common.String("57RHaHMyrQv2hcCPLUD999gcvp5Sr1AaXFP56f31NhrXwJMBmxB6yUPoo5n2D3jSKGxOxpokXQBirAwkWHt6r0NjC8fqczpLE69wZvMHcaxcgla3izu3umISuNfMleue2U1rdpdsIHiW8GSmBw76qUKAEVxmPhd3O3fnGi1K9OpfFSwJtqUdFOKDNlg6rMfOnOflasKyNACjWMZxz4zu8UItbf16By2e3C6Jrv8vyN6KpYrIlJXSDWemicC4DFu"),
			WorkspaceProperties:     map[string]string{"EXAMPLE_KEY_W3ANm": "EXAMPLE_VALUE_KPgGviyxJ24qdaeUbuZp"},
			IsPrivateNetworkEnabled: common.Bool(true),
			RegistryId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryId-Value"),
			SubnetId:                common.String("DZoGt0Do769hhjqI2ZSnqnSrMQXfuCryTMVYyNkQph11xXENXH46OOcZhjjLC6uqG2hZDa7cazVyfyJxpggSpX9grLltN7HQhi532GMbGEAICNp2LIRN0J5Qr2ZVnIu9yxynEbrId453kbPOWsh6sZApfmMeqP94H1M7oQsxxbk1ATfiDmDoAsMhZo1FHHgFJWCZxbLes5i8LwBcMzoLIuxZMmjcBwfEg3QXEppWzIpk3n0cbTwfgpMdb57Tg63"),
			DnsServerIp:             common.String("EXAMPLE-dnsServerIp-Value"),
			EndpointId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointId-Value"),
			EndpointName:            common.String("EXAMPLE-endpointName-Value"),
			CompartmentId:           common.String("AI5Xy1NIEYAyEj3TBJwh2kAcXiNfRG3LzvnQRgh0X21uBMeuLbUbXH5C8fPfS92rzywX1DU0xWFGuSXZiD4eWXb0zYivxeaJsOsUsIWGjyaf3ig1utb7EhofbEqKH7vj0VlScDc2YibuLcbIaMn9mkEEooWkqIJl6BBhhbJyhLVeKmO2YPi1VtnJgvMeG6s12GS8d8BsKiF0sOdZUGoAKJ1votCp5mtbBlCXLuHx2P2HjgQDU83dragfDGM5GET"),
			DisplayName:             common.String("EXAMPLE-displayName-Value"),
			DnsServerZone:           common.String("EXAMPLE-dnsServerZone-Value"),
			RegistryCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryCompartmentId-Value"),
			DefinedTags:             map[string]map[string]interface{}{"EXAMPLE_KEY_0XrUU": map[string]interface{}{"EXAMPLE_KEY_TVV3v": "EXAMPLE--Value"}},
			Description:             common.String("EXAMPLE-description-Value"),
			EndpointCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointCompartmentId-Value"),
			FreeformTags:            map[string]string{"EXAMPLE_KEY_6IDID": "EXAMPLE_VALUE_bEqfA7ZaJvVrUhAplavP"},
			RegistryName:            common.String("EXAMPLE-registryName-Value")},
		OpcRequestId: common.String("AJUSYEC4XX93YGVANEJK<unique_ID>")}

	// 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)
}