# 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="DeRA6vBOBaw2nN2VvmhQNwSCnXlAZJ3Nlya88iMOd0BtP4EvRwcUqLodYiP0yHdbzUPTeSrc6xwLesZafBPeailctPWQ6tB6cdHasHvv9FrzeoplrUXcZznVxM6nLcKb5xO7QQikHoezfMk98Jk6FLxT4HNP1RJ4VNaEmh5QrQ7pPr4Cks8AYvNPXUa47lA5d9hmG6Vd4bjDkUfHMLw0kFHU4ZDJTBQCknQJMkEWDKPo0OiHgW5Idizb6AnCEzP",
        vcn_id="AVQIx8m8o1ODIAakdLiNezTTmFm118GxyCPF4K8mZQD7P0k7YOIivmjzvcrVhvNSNiavV47dCxuk6JVHYs6xC11SdiBXIOKsTz8dBisPEUo7DmnUjsvOORCFXKmHMbudLo30nYCzqSf0SBqqojAXcI8bmXE0KrJ7MNOUxJSUcJAjSJi5e4Z7vdoY78ekKD5GoZ9Vgh7yieuGfbRgKq5NswVAKO0fMPT62mRF9XRKfNvS3PgR1ql9qywsKcSzE3q",
        subnet_id="An5VTuWjEGfzsjvNpVjHNALQ00RoY8fQEUuxk5mKYsgI6lL9jycVEemHLa9jSPnDvJ0DmLc3My94MVfNJTQ7MY7Icm4zciRhkYOQZoHbeULAq5nTuw6vCFwmlnPj85NbV9pRK0RiWfT0HUdghxC2ClJwXtGoM0xmWiuWUJizT6Wq2J5Xe89uc3ChA2WXTXtgyWS0Fnmu9lLoHxdHJWgh1vFrGSGlviCPQYWUjFt79X3pxMY5DGmFFPk7wbSWAWF",
        dns_server_ip="EXAMPLE-dnsServerIp-Value",
        dns_server_zone="EXAMPLE-dnsServerZone-Value",
        freeform_tags={
            'EXAMPLE_KEY_ewaDo': 'EXAMPLE_VALUE_K5DOyPT3q9fQvFnWDTz5'},
        defined_tags={
            'EXAMPLE_KEY_t67nJ': {
                'EXAMPLE_KEY_3pxTw': 'EXAMPLE--Value'}},
        description="EXAMPLE-description-Value",
        is_private_network_enabled=False,
        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_RpoL6': 'EXAMPLE_VALUE_jIhe9InnHGPKPqlEuBq5'}),
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    opc_request_id="L8W1JPDFOL3IMQEUAMAL<unique_ID>")

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

Was this article helpful?