// 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{SubnetId: common.String("5tT1HhFVQwg3HG7PzzOlWVQRGMki9PmJKUZU2XYqRcbOqUhAsmbh74VN8Bz4MelyeIcvdQww7NKb6R0qkLyidAIXuSBAKToERb1kgyuc8YRaX70CB6RYnysiy8mFQF1X6H2XoMSbR7rmruc1Ph4zmd23JBTHtBus9nfAfH1SUil2x2JAAYoCKFkipBBvYt3bflb50yI5LVk2YT2KP33OSDvXsDefbkMkJ3Sqm7bcqHaHAiTmcZ5btiw1UhMYDEF"),
			VcnId:                   common.String("ux669X8dFl7ijXo7XYOc4wjDZscnVveYrABnpWb5CLyxeCQDzYYVPAGcW0U9LFipRmRky6S7tHFldRYuEh1gdT7XpTqQ7fHBKPqomYe7IFhlrkinCdFl1W1r7BYXmcZxFiT0zBPpRvjkHTXwY3Rj33VpdpEw2IKlHtcg2pjPqbpIo6OxZl8slnPY9zciMqRDUERK0BzfUyZRATcM5DqsPjFyB9QEST3IOei5gybe2dbBljq3EImGNrWiWBSAUVd"),
			WorkspaceProperties:     map[string]string{"EXAMPLE_KEY_wZnwm": "EXAMPLE_VALUE_h3iebr1bs3QqxjhGbjHh"},
			DnsServerZone:           common.String("EXAMPLE-dnsServerZone-Value"),
			EndpointId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointId-Value"),
			EndpointName:            common.String("EXAMPLE-endpointName-Value"),
			RegistryName:            common.String("EXAMPLE-registryName-Value"),
			CompartmentId:           common.String("8VYn9VmRQXgkdrdEQT2RNOtzdKrI0F14fi99pa5R4qpOGvuNSlWs8LAhRWCZivS8Wo0TPJlGXDtEHXRiY3yseRNSnlhOc9Z26tNphDw0q5HVUqglLVZjgPfIiwpBZ5sxBXRt6ztXnMD3LFBlqtktZTQASjR0SK6XXMENdTYde82p8WXmvvZnMDNPdJ5ynzZEpxqd186zwENh9hU0DSPKHKuBSKMU7JDYrLbe1e4XB04IGpeqNy0MwhVspJccIay"),
			DefinedTags:             map[string]map[string]interface{}{"EXAMPLE_KEY_A1oBp": map[string]interface{}{"EXAMPLE_KEY_9KTit": "EXAMPLE--Value"}},
			DisplayName:             common.String("EXAMPLE-displayName-Value"),
			IsPrivateNetworkEnabled: common.Bool(true),
			Description:             common.String("EXAMPLE-description-Value"),
			RegistryCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryCompartmentId-Value"),
			DnsServerIp:             common.String("EXAMPLE-dnsServerIp-Value"),
			EndpointCompartmentId:   common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-endpointCompartmentId-Value"),
			FreeformTags:            map[string]string{"EXAMPLE_KEY_MB7WR": "EXAMPLE_VALUE_B2zS5jh3ThXm9leeIG9k"},
			RegistryId:              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-registryId-Value")},
		OpcRequestId: common.String("RXN4HEO6UI1IPJ3FVPHB<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)
}