# 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="ZVvnyVicPVPETMCWuHJRrulO3vEGCPfFfvsXQfHAWhjkkwbLkqvDoNqVK2nZsHXCyKDTkn6eZa1arnHaQt7QRZMK9TiWML4KTlodzQOIU73RcujEfNfxuf4VjgGsHSSrKMzjIfm46qAf2bFZcGLgk9Xs4TBwtdiCDtETnRmy7JULmhKIwwfycDTsarrdpMhVPQHsLK59mRCW6TtU6qfcydSUfmsraQ0mc2s2YdlTzeyHPV5hL0dNMw9YcwTj0uQ",
        vcn_id="BktVeKnXu2ngJf8Gl64665YHDim3erSiuY9atrIjG06SHatxQ2rnHQjoGVEPFOHzpxPME7FUlr5uhNidy0B2pxGu9G6qvam2JZDk2evO16s0qtSFi8II7rWwRlxiehtCaK3ACk4368rHbJArYtf6gho1IopnDMHNa1SVobHMJPFXM3sh8lSkJ5KOVUyzjvnufjO1pbjLcJtPnzH6x2nrA7z71iYvLYfZr218GZms1ebPJJ2VjrsbSyOdZCMpa1Q",
        subnet_id="jvocFVtZ9Bp5xeNlVHNEOyBXYDkmuXApCpIx6RUr6wbBk9jpnMWh0nafTGJuoPHSrryCkEBayn4XUxq770ahVWcx0Y9VQIEQEPuKdVynHoO8ekazl1qnvKe2a7kJOf7ClHNhZCHrznNo19KKoMaNA5WYCpX8APQTjyzNiD9yVMC2vmlPzWkpGCKTrehfsC0PEySDqvVh4A6y6ppv5ljKhWl6wPI6m39r2ImRfoTnvHpucYtD8WQ0JwutyeIFY0Y",
        dns_server_ip="EXAMPLE-dnsServerIp-Value",
        dns_server_zone="EXAMPLE-dnsServerZone-Value",
        freeform_tags={
            'EXAMPLE_KEY_WE5Pf': 'EXAMPLE_VALUE_YnWuGaU1JfRRHKP10lpM'},
        defined_tags={
            'EXAMPLE_KEY_DyMfe': {
                'EXAMPLE_KEY_cTsfS': '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_1iDdC': 'EXAMPLE_VALUE_I3N1FyVWheyKLYTtmaOe'}),
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    opc_request_id="4VQJCDMRHMVMEGMQ6HQG<unique_ID>")

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

Was this article helpful?