# 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).

import oci

# Create a default config using DEFAULT profile in default location
# Refer to
# https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File
# for more info
config = oci.config.from_file()


# Initialize service client with default config file
data_integration_client = oci.data_integration.DataIntegrationClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
create_workspace_response = data_integration_client.create_workspace(
    create_workspace_details=oci.data_integration.models.CreateWorkspaceDetails(
        display_name="EXAMPLE-displayName-Value",
        compartment_id="IHw9TCB6w5SdFWPsULSQUNCAczIuNPq56lA5SyCcxJKwQbW4eKKtEvIOdPOdwRBGoRnFvcCLbO8qYPzgrtOwGTBPiZM9mFpAoLkcDdzbFuPhjho4hc708Xv3nxm7TmJOil5Br8PmLTGGFyIOd5CqGQyusHt3tsVC38dKC04qJfg4UmFl9iKNOPY63xVl8wdiIzHEE0m8YrLZ2IPGbK2L73yO05QfU1rWBOOIpEUPkC0UFIezWLcoSBkZwA4gr05",
        vcn_id="1QGx0kqQTXktZLLeEGzpYgS6VKwAjBeh6xFKGEzG6TyY6m2lvnRUghLsVO2CRoMltedGfa7T7ppZR7k5de74G2PwH6ObVermAjS9Y7526xHu8M5PRfCmpOj132qM57wcOt07rJIZtX3KfLUztuGe6CktS8vOik8nTX28VGeZzS3vQzgL24DvnqzqGDXkC2qLrhuQRhqqBWNgrnC80NpWiGxSgjW20nPQrttEvFICLxCyE5FwpXAhkS7BLXqdLwp",
        subnet_id="PEJYkpBbw54eF0Yis8pIjmozVhP2e77hyaOHBao2YMxMwpNj9vTTAqN4js5vqBR71BEt6TgYhzSsls925ED713aInQ0HEnlKCEVm1022aS6k44yDQQbvmAxEva2YOuOIdoyqXV3n2tRiwfJuNgFhanjcgk3gnXLW2zh7QVFsMVLjWYB6OI2YYmORhyZrELWw2Pq9QHHlAsj5C7yYXQZ62SX6GUYma3fCj5lbtpC1zwvFL0dlgnCZTY5uqcPeUFp",
        dns_server_ip="EXAMPLE-dnsServerIp-Value",
        dns_server_zone="EXAMPLE-dnsServerZone-Value",
        freeform_tags={
            'EXAMPLE_KEY_9TJb3': 'EXAMPLE_VALUE_vsOklG5HutHvfGVkIIzk'},
        defined_tags={
            'EXAMPLE_KEY_97YFN': {
                'EXAMPLE_KEY_N8TNt': 'EXAMPLE--Value'}},
        description="EXAMPLE-description-Value",
        is_private_network_enabled=True,
        registry_id="ocid1.test.oc1..<unique_ID>EXAMPLE-registryId-Value",
        endpoint_id="ocid1.test.oc1..<unique_ID>EXAMPLE-endpointId-Value",
        registry_name="EXAMPLE-registryName-Value",
        registry_compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-registryCompartmentId-Value",
        endpoint_name="EXAMPLE-endpointName-Value",
        endpoint_compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-endpointCompartmentId-Value",
        workspace_properties={
            'EXAMPLE_KEY_7n6zi': 'EXAMPLE_VALUE_Oor2AlhKr4NwVMv3ZeC9'}),
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    opc_request_id="N8IQCWP5GZGUQUF6DJ1V<unique_ID>")

# Get the data from response
print(create_workspace_response.headers)

Was this article helpful?