# 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
from datetime import datetime
# 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_connection_validation_response = data_integration_client.create_connection_validation(
workspace_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
create_connection_validation_details=oci.data_integration.models.CreateConnectionValidationDetails(
data_asset=oci.data_integration.models.CreateDataAssetFromAdwc(
model_type="ORACLE_ADWC_DATA_ASSET",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
description="EXAMPLE-description-Value",
object_status=459,
external_key="EXAMPLE-externalKey-Value",
asset_properties={
'EXAMPLE_KEY_c3My9': 'EXAMPLE_VALUE_4MVfNJTQ7MY7Icm4zciR'},
registry_metadata=oci.data_integration.models.RegistryMetadata(
aggregator_key="EXAMPLE-aggregatorKey-Value",
labels=["EXAMPLE--Value"],
registry_version=221,
key="EXAMPLE-key-Value",
is_favorite=False),
service_name="EXAMPLE-serviceName-Value",
driver_class="EXAMPLE-driverClass-Value",
credential_file_content="EXAMPLE-credentialFileContent-Value",
wallet_secret=oci.data_integration.models.SensitiveAttribute(
secret_config=oci.data_integration.models.OciVaultSecretConfig(
model_type="OCI_VAULT_SECRET_CONFIG",
secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"),
value="EXAMPLE-value-Value"),
wallet_password_secret=oci.data_integration.models.SensitiveAttribute(
secret_config=oci.data_integration.models.OciVaultSecretConfig(
model_type="OCI_VAULT_SECRET_CONFIG",
secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"),
value="EXAMPLE-value-Value"),
region_id="ocid1.test.oc1..<unique_ID>EXAMPLE-regionId-Value",
tenancy_id="ocid1.test.oc1..<unique_ID>EXAMPLE-tenancyId-Value",
compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
autonomous_db_id="ocid1.test.oc1..<unique_ID>EXAMPLE-autonomousDbId-Value",
default_connection=oci.data_integration.models.CreateConnectionFromAdwc(
model_type="ORACLE_ADWC_CONNECTION",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
description="EXAMPLE-description-Value",
object_status=555,
connection_properties=[
oci.data_integration.models.ConnectionProperty(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")],
registry_metadata=oci.data_integration.models.RegistryMetadata(
aggregator_key="EXAMPLE-aggregatorKey-Value",
labels=["EXAMPLE--Value"],
registry_version=266,
key="EXAMPLE-key-Value",
is_favorite=True),
tns_alias="EXAMPLE-tnsAlias-Value",
tns_names=["EXAMPLE--Value"],
username="EXAMPLE-username-Value",
password="EXAMPLE-password-Value",
password_secret=oci.data_integration.models.SensitiveAttribute(
secret_config=oci.data_integration.models.OciVaultSecretConfig(
model_type="OCI_VAULT_SECRET_CONFIG",
secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"),
value="EXAMPLE-value-Value")),
staging_data_asset=oci.data_integration.models.DataAssetFromOracleEbsDetails(
model_type="ORACLE_EBS_DATA_ASSET",
host="EXAMPLE-host-Value",
port="EXAMPLE-port-Value",
default_connection=oci.data_integration.models.ConnectionFromOracleEbsDetails(
model_type="ORACLE_EBS_CONNECTION",
username="EXAMPLE-username-Value",
password="EXAMPLE-password-Value",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
object_version=329,
object_status=620,
identifier="EXAMPLE-identifier-Value",
primary_schema=oci.data_integration.models.Schema(
key="EXAMPLE-key-Value",
model_type="EXAMPLE-modelType-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
resource_name="EXAMPLE-resourceName-Value",
description="EXAMPLE-description-Value",
object_version=974,
external_key="EXAMPLE-externalKey-Value",
is_has_containers=True,
default_connection="EXAMPLE-defaultConnection-Value",
object_status=837,
identifier="EXAMPLE-identifier-Value",
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2024-03-25T12:51:44.024Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2003-10-19T09:33:01.226Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_lnPj8': 'EXAMPLE_VALUE_5NbV9pRK0RiWfT0HUdgh'},
registry_version=447,
labels=["EXAMPLE--Value"],
is_favorite=True,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="DATA_FLOW",
object_count=884)]))),
connection_properties=[
oci.data_integration.models.ConnectionProperty(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")],
is_default=True,
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2015-10-06T23:19:20.726Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2035-09-03T05:00:17.562Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_iuWUJ': 'EXAMPLE_VALUE_izT6Wq2J5Xe89uc3ChA2'},
registry_version=132,
labels=["EXAMPLE--Value"],
is_favorite=False,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="USER_DEFINED_FUNCTION",
object_count=970)])),
password_secret=oci.data_integration.models.SensitiveAttribute(
secret_config=oci.data_integration.models.OciVaultSecretConfig(
model_type="OCI_VAULT_SECRET_CONFIG",
secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"),
value="EXAMPLE-value-Value")),
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
object_status=864,
identifier="EXAMPLE-identifier-Value",
external_key="EXAMPLE-externalKey-Value",
asset_properties={
'EXAMPLE_KEY_S0Fnm': 'EXAMPLE_VALUE_u9lLoHxdHJWgh1vFrGSG'},
native_type_system=oci.data_integration.models.TypeSystem(
key="EXAMPLE-key-Value",
model_type="EXAMPLE-modelType-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
object_version=775,
type_mapping_to={
'EXAMPLE_KEY_viCPQ': 'EXAMPLE_VALUE_YWUjFt79X3pxMY5DGmFF'},
type_mapping_from={
'EXAMPLE_KEY_Pk7wb': 'EXAMPLE_VALUE_SWAWFewaDoK5DOyPT3q9'},
object_status=863,
identifier="EXAMPLE-identifier-Value",
types=[
oci.data_integration.models.DataType(
model_type="DATA_TYPE",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
object_status=156,
description="EXAMPLE-description-Value",
dt_type="PRIMITIVE",
type_system_name="EXAMPLE-typeSystemName-Value",
config_definition=oci.data_integration.models.ConfigDefinition(
key="EXAMPLE-key-Value",
model_type="EXAMPLE-modelType-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
is_contained=False,
object_status=234,
config_parameter_definitions={
'EXAMPLE_KEY_1bdFt': {
'parameterType': {
'modelType': 'COMPOSITE_TYPE',
'key': 'EXAMPLE-key-Value',
'modelVersion': 'EXAMPLE-modelVersion-Value',
'parentRef': {
'parent': 'EXAMPLE-parent-Value',
'rootDocId': 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'},
'name': 'EXAMPLE-name-Value',
'objectStatus': 77,
'description': 'EXAMPLE-description-Value',
'elements': [
{
'modelType': 'INPUT_PORT',
'key': 'EXAMPLE-key-Value',
'modelVersion': 'EXAMPLE-modelVersion-Value',
'parentRef': {
'parent': 'EXAMPLE-parent-Value',
'rootDocId': 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'},
'configValues': {
'configParamValues': {
'EXAMPLE_KEY_Gax7P': {
'stringValue': 'EXAMPLE-stringValue-Value',
'intValue': 413,
'objectValue': 'EXAMPLE-objectValue-Value',
'refValue': 'EXAMPLE-refValue-Value',
'parameterValue': 'EXAMPLE-parameterValue-Value',
'rootObjectValue': 'EXAMPLE-rootObjectValue-Value'}},
'parentRef': {
'parent': 'EXAMPLE-parent-Value',
'rootDocId': 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'}},
'objectStatus': 406,
'name': 'EXAMPLE-name-Value',
'description': 'EXAMPLE-description-Value',
'portType': 'MODEL'}]},
'parameterName': 'EXAMPLE-parameterName-Value',
'description': 'EXAMPLE-description-Value',
'defaultValue': 'EXAMPLE-defaultValue-Value',
'classFieldName': 'EXAMPLE-classFieldName-Value',
'isStatic': False,
'isClassFieldValue': True}}))]),
object_version=648,
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2007-01-19T07:58:09.234Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2003-10-05T20:35:49.713Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_gw4o4': 'EXAMPLE_VALUE_6zjUG1T7pCT6xmpWe0fp'},
registry_version=813,
labels=["EXAMPLE--Value"],
is_favorite=False,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="FOLDER",
object_count=279)])),
key_map={
'EXAMPLE_KEY_2V1T0': 'EXAMPLE_VALUE_Ozxcshy37jDuEYPx5Xm0'},
service_name="EXAMPLE-serviceName-Value",
driver_class="EXAMPLE-driverClass-Value",
sid="EXAMPLE-sid-Value",
wallet_secret=oci.data_integration.models.SensitiveAttribute(
secret_config=oci.data_integration.models.OciVaultSecretConfig(
model_type="OCI_VAULT_SECRET_CONFIG",
secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"),
value="EXAMPLE-value-Value"),
wallet_password_secret=oci.data_integration.models.SensitiveAttribute(
secret_config=oci.data_integration.models.OciVaultSecretConfig(
model_type="OCI_VAULT_SECRET_CONFIG",
secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"),
value="EXAMPLE-value-Value")),
staging_connection=oci.data_integration.models.ConnectionFromBIP(
model_type="BIP_CONNECTION",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
object_version=205,
object_status=930,
identifier="EXAMPLE-identifier-Value",
primary_schema=oci.data_integration.models.Schema(
key="EXAMPLE-key-Value",
model_type="EXAMPLE-modelType-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
resource_name="EXAMPLE-resourceName-Value",
description="EXAMPLE-description-Value",
object_version=697,
external_key="EXAMPLE-externalKey-Value",
is_has_containers=False,
default_connection="EXAMPLE-defaultConnection-Value",
object_status=7,
identifier="EXAMPLE-identifier-Value",
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2025-01-23T17:40:59.655Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2020-02-21T00:11:50.128Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_HCfLG': 'EXAMPLE_VALUE_cvH76UiYdRX0NHg7q4GC'},
registry_version=576,
labels=["EXAMPLE--Value"],
is_favorite=True,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="DATA_ASSET",
object_count=68)]))),
connection_properties=[
oci.data_integration.models.ConnectionProperty(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")],
is_default=True,
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2013-11-18T04:05:11.929Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2003-11-04T19:16:38.549Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_7817M': 'EXAMPLE_VALUE_wqoC6B0xfVZ9HZCfsLta'},
registry_version=266,
labels=["EXAMPLE--Value"],
is_favorite=False,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="TASK",
object_count=471)])),
key_map={
'EXAMPLE_KEY_jh9nc': 'EXAMPLE_VALUE_lKWHRF5DSEzugE7NupYE'},
username="EXAMPLE-username-Value",
password_secret=oci.data_integration.models.SensitiveAttribute(
secret_config=oci.data_integration.models.OciVaultSecretConfig(
model_type="OCI_VAULT_SECRET_CONFIG",
secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"),
value="EXAMPLE-value-Value")),
bucket_schema=oci.data_integration.models.Schema(
key="EXAMPLE-key-Value",
model_type="EXAMPLE-modelType-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
name="EXAMPLE-name-Value",
resource_name="EXAMPLE-resourceName-Value",
description="EXAMPLE-description-Value",
object_version=117,
external_key="EXAMPLE-externalKey-Value",
is_has_containers=False,
default_connection="EXAMPLE-defaultConnection-Value",
object_status=384,
identifier="EXAMPLE-identifier-Value",
metadata=oci.data_integration.models.ObjectMetadata(
created_by="EXAMPLE-createdBy-Value",
created_by_name="EXAMPLE-createdByName-Value",
updated_by="EXAMPLE-updatedBy-Value",
updated_by_name="EXAMPLE-updatedByName-Value",
time_created=datetime.strptime(
"2030-12-12T07:23:12.528Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2046-10-29T00:05:26.778Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
aggregator_key="EXAMPLE-aggregatorKey-Value",
aggregator=oci.data_integration.models.AggregatorSummary(
type="EXAMPLE-type-Value",
key="EXAMPLE-key-Value",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
description="EXAMPLE-description-Value"),
identifier_path="EXAMPLE-identifierPath-Value",
info_fields={
'EXAMPLE_KEY_T5AoZ': 'EXAMPLE_VALUE_8u0xQF0pyiw0MqF7xrPA'},
registry_version=99,
labels=["EXAMPLE--Value"],
is_favorite=False,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="CONNECTION",
object_count=734)])))),
connection=oci.data_integration.models.CreateConnectionFromRestNoAuth(
model_type="REST_NO_AUTH_CONNECTION",
name="EXAMPLE-name-Value",
identifier="EXAMPLE-identifier-Value",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
parent_ref=oci.data_integration.models.ParentReference(
parent="EXAMPLE-parent-Value",
root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
description="EXAMPLE-description-Value",
object_status=560,
connection_properties=[
oci.data_integration.models.ConnectionProperty(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")],
registry_metadata=oci.data_integration.models.RegistryMetadata(
aggregator_key="EXAMPLE-aggregatorKey-Value",
labels=["EXAMPLE--Value"],
registry_version=331,
key="EXAMPLE-key-Value",
is_favorite=False)),
registry_metadata=oci.data_integration.models.RegistryMetadata(
aggregator_key="EXAMPLE-aggregatorKey-Value",
labels=["EXAMPLE--Value"],
registry_version=310,
key="EXAMPLE-key-Value",
is_favorite=False)),
opc_request_id="MXM8XY970X5GGQMAQEB6<unique_ID>",
opc_retry_token="EXAMPLE-opcRetryToken-Value")
# Get the data from response
print(create_connection_validation_response.data)