# 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="hNubcyQzlqMk8334zPnOBpBbxEBasxyw3yKoYhgEEgGASp0GWLVA362qGCoJNwaydfixNZTnHwa57SF74io6TLw2l8kW9Xlk6GscleNELF6HNvWYliH7PCYkWxq1UzIcxK3fumjJJZFKsAwREn6XBJxXEYYAwyDd321mEh0me17jgg40Ak27fIV7OaYwyehmOH2NQVbaHy484xJ2hEd7lBJKlHUJusdHS3AsBZpySfKLpewIje37z4YZWa6vA6a",
vcn_id="5smNkZl27gHBJEZXOakG8qOWEz7lw1fdXjbHlgUxfhhapVKDSVD4KOf28n5lU3k2B6fkrGYPqMg79oTH7eEwChuOagUmp65UtSy7bVazxQLC9fXFqKaUqKmpYFnw9pCncL2epGEc0L9RpXba3PREg75JnZrr4iTLbzMnFZcg8ZYKIibAZomLbgIonsdAcLISqDr9vmq6MMtazK70BybszQodtaUZH6TIGpg9DaN9CoOZQmo0V7ZXRJ7qwbDgbYY",
subnet_id="KzPzvTpRuNmGLTo3IBGb1c5JAsjJvzLiuJNvkY0nSJRxk380DaUm8mZ47x5fiJ1elcImqi9rlKskYPvnP1kj2vPoGcA0xNriC8hyPpwAUN53od54PKm2zldjSMlJsaPX015qWmC26FTzqJGwXkuOQbOr3DUzgjwofHEed1jQuJTayXhpmm8NX4iVu7GXpm0tie1Wx2lY3R9xUgKEliDCGezykfIS1bZRtA7ZZIAAEZKxuvVju2vY9pd0gI3abpf",
dns_server_ip="EXAMPLE-dnsServerIp-Value",
dns_server_zone="EXAMPLE-dnsServerZone-Value",
freeform_tags={
'EXAMPLE_KEY_OcQw2': 'EXAMPLE_VALUE_I48aaZtlsyc5mXcQakHk'},
defined_tags={
'EXAMPLE_KEY_4qkPI': {
'EXAMPLE_KEY_NXDyn': '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_L2IzL': 'EXAMPLE_VALUE_RbcRVKgmy5Csn5s8CAuF'}),
opc_retry_token="EXAMPLE-opcRetryToken-Value",
opc_request_id="2ZN1DPA4ECP6D2LDL3SH<unique_ID>")
# Get the data from response
print(create_workspace_response.headers)