# 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).
require '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::ConfigFileLoader.load_config
# Initialize service client with default config file
data_integration_client =
OCI::DataIntegration::DataIntegrationClient.new(config: 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(
OCI::DataIntegration::Models::CreateWorkspaceDetails.new(
display_name: 'EXAMPLE-displayName-Value',
compartment_id:
'C4gy63iX8H16lYeOUjpXpqxUlHAB17hUIIyQrIlBje4wlKn4pEx78wcU4N9yjAP17Z4ai5jPxURfVfvUip7rzbPSjp6t1cmmjtD6z32byvmKeNYUVEycWew30TAZPyarzjZT4fV55gC5fh2LLnP8xZcAPcMmm983j49lg82SZ6i0sIBj7oBZD0pAPd1SJGSVtDNPHkUAS3alPyfBv4Z5EIAS8yORKpFROJSG9VjcAm7WV0ExRfp8VY0KxY0hpAN',
vcn_id:
'Clwvr1dsPi5j3rRuryX74BwVRNY5hazMRRJTDMajqdPVfJaBufLe18dzAgzktgCVjk5BICxmZUtOOFJDOiyQkAyiQV6nF0QKRsOULVBh5rIZyNkWsg68X3kCmKBvPU42EmUr4fuk44GVeuH04YUpyM9jjDWab8OhrVmTvTivWyutvDn3AsZN3XZtjECxJsi3ICW1RgJwheF4Xa8nzGSv4LaG9Fk8IvoIc7gM3qph2LJcjhkxd1zhKR16qyfBMYC',
subnet_id:
'5WY0LZGPu3lr2tn0txyHmjWwofuSnNFbm4mOGGyXG4MiMtGKER7H575F3F0Lvqw161UcYMeBbIfJRAGezE71Ju13tehUAEQSkbm01kV8QSuyVq5H0LjwL06URnLELx6nIoAUYaB6lUSZBUZ1ewZRGAeAEBsJFwa4bDlMjjhutrY379YIMMp6jQyhoWmzBt4DeBeI54dq2W4ASDKzAIGadydm0Vsqzr47zIDYPj9OtTPqu8S8CjxCbizQMK3rDkv',
dns_server_ip: 'EXAMPLE-dnsServerIp-Value',
dns_server_zone: 'EXAMPLE-dnsServerZone-Value',
freeform_tags: {
'EXAMPLE_KEY_NYqHP' => 'EXAMPLE_VALUE_m6UetAbp0FJZCIWklQEy'
},
defined_tags: {
'EXAMPLE_KEY_ZSC9r' => { 'EXAMPLE_KEY_Imyfa' => '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_NKNUW' => 'EXAMPLE_VALUE_RxsJoMGsuorulemmfG18'
}
)
)
# Get the data from response
puts "#{create_workspace_response.headers}"