# 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).

from datetime import datetime
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_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.CreateDataAssetFromFusionApp(
            model_type="FUSION_APP_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=215,
            external_key="EXAMPLE-externalKey-Value",
            asset_properties={
                'EXAMPLE_KEY_QX07X': 'EXAMPLE_VALUE_F4MoMBj7dkVsKuHLPUkY'},
            registry_metadata=oci.data_integration.models.RegistryMetadata(
                aggregator_key="EXAMPLE-aggregatorKey-Value",
                labels=["EXAMPLE--Value"],
                registry_version=795,
                key="EXAMPLE-key-Value",
                is_favorite=False),
            service_url="EXAMPLE-serviceUrl-Value",
            default_connection=oci.data_integration.models.CreateConnectionFromOracleSiebel(
                        model_type="ORACLE_SIEBEL_CONNECTION",
                        name="EXAMPLE-name-Value",
                        identifier="EXAMPLE-identifier-Value",
                        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"),
                description="EXAMPLE-description-Value",
                object_status=43,
                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=525,
                            key="EXAMPLE-key-Value",
                            is_favorite=False),
                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.DataAssetSummaryFromObjectStorage(
                model_type="ORACLE_OBJECT_STORAGE_DATA_ASSET",
                key="EXAMPLE-key-Value",
                model_version="EXAMPLE-modelVersion-Value",
                name="EXAMPLE-name-Value",
                description="EXAMPLE-description-Value",
                object_status=489,
                identifier="EXAMPLE-identifier-Value",
                external_key="EXAMPLE-externalKey-Value",
                asset_properties={
                    'EXAMPLE_KEY_0ORpw': 'EXAMPLE_VALUE_sPArPLVSseuhMuhaL9LX'},
                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=842,
                    type_mapping_to={
                        'EXAMPLE_KEY_WsEB8': 'EXAMPLE_VALUE_t1dIPE6UdeTXqLhtdr4p'},
                    type_mapping_from={
                        'EXAMPLE_KEY_n3dAj': 'EXAMPLE_VALUE_5LmMrYxNSPcGAdl52LPg'},
                    object_status=198,
                    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=723,
                            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=307,
                                config_parameter_definitions={
                                    'EXAMPLE_KEY_ateoq': {
                                        'parameterType': {
                                            'modelType': 'JAVA_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': 436,
                                            'description': 'EXAMPLE-description-Value',
                                            'javaTypeName': 'EXAMPLE-javaTypeName-Value'},
                                        'parameterName': 'EXAMPLE-parameterName-Value',
                                        'description': 'EXAMPLE-description-Value',
                                        'defaultValue': 'EXAMPLE-defaultValue-Value',
                                        'classFieldName': 'EXAMPLE-classFieldName-Value',
                                        'isStatic': False,
                                        'isClassFieldValue': False}}))]),
                object_version=793,
                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(
                        "2046-09-26T02:58:20.018Z",
                        "%Y-%m-%dT%H:%M:%S.%fZ"),
                    time_updated=datetime.strptime(
                        "2022-12-02T17:51:18.954Z",
                        "%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_QC8tp': 'EXAMPLE_VALUE_20ykDf8vxFB9DzQT7acw'},
                    registry_version=7,
                    labels=["EXAMPLE--Value"],
                    is_favorite=True,
                    count_statistics=oci.data_integration.models.CountStatistic(
                        object_type_count_list=[
                            oci.data_integration.models.CountStatisticSummary(
                                object_type="PROJECT",
                                object_count=747)])),
                oci_region="EXAMPLE-ociRegion-Value",
                url="EXAMPLE-url-Value",
                tenancy_id="ocid1.test.oc1..<unique_ID>EXAMPLE-tenancyId-Value",
                namespace="EXAMPLE-namespace-Value",
                default_connection=oci.data_integration.models.ConnectionSummaryFromObjectStorage(
                    model_type="ORACLE_OBJECT_STORAGE_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=259,
                    object_status=379,
                    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=198,
                        external_key="EXAMPLE-externalKey-Value",
                        is_has_containers=True,
                        default_connection="EXAMPLE-defaultConnection-Value",
                        object_status=775,
                        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(
                                "2038-09-09T02:10:00.564Z",
                                "%Y-%m-%dT%H:%M:%S.%fZ"),
                            time_updated=datetime.strptime(
                                "2019-09-14T11:51:01.163Z",
                                "%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_A0IMn': 'EXAMPLE_VALUE_xCbErcqKqs3QuyvFVyAo'},
                            registry_version=436,
                            labels=["EXAMPLE--Value"],
                            is_favorite=True,
                            count_statistics=oci.data_integration.models.CountStatistic(
                                object_type_count_list=[
                                    oci.data_integration.models.CountStatisticSummary(
                                        object_type="FUNCTION_LIBRARY",
                                        object_count=209)]))),
                    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(
                            "2024-07-29T12:07:45.013Z",
                            "%Y-%m-%dT%H:%M:%S.%fZ"),
                        time_updated=datetime.strptime(
                            "2030-04-15T21:12:12.357Z",
                            "%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_c45tH': 'EXAMPLE_VALUE_xbGEZI5Dst9ovncLPfPe'},
                        registry_version=757,
                        labels=["EXAMPLE--Value"],
                        is_favorite=False,
                        count_statistics=oci.data_integration.models.CountStatistic(
                            object_type_count_list=[
                                oci.data_integration.models.CountStatisticSummary(
                                    object_type="APPLICATION",
                                    object_count=852)])),
                    key_map={
                        'EXAMPLE_KEY_qJcZw': 'EXAMPLE_VALUE_ptZ8FSjKypuYUG6y1DXj'},
                    credential_file_content="EXAMPLE-credentialFileContent-Value",
                    user_id="ocid1.test.oc1..<unique_ID>EXAMPLE-userId-Value",
                    finger_print="EXAMPLE-fingerPrint-Value",
                    pass_phrase="EXAMPLE-passPhrase-Value")),
            staging_connection=oci.data_integration.models.ConnectionSummaryFromObjectStorage(
                model_type="ORACLE_OBJECT_STORAGE_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=835,
                object_status=819,
                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=30,
                    external_key="EXAMPLE-externalKey-Value",
                    is_has_containers=False,
                    default_connection="EXAMPLE-defaultConnection-Value",
                    object_status=355,
                    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(
                            "2031-05-14T03:56:11.351Z",
                            "%Y-%m-%dT%H:%M:%S.%fZ"),
                        time_updated=datetime.strptime(
                            "2037-05-12T14:57:22.527Z",
                            "%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_xbsUF': 'EXAMPLE_VALUE_k5o51UTpx8wHGG04QsGV'},
                        registry_version=616,
                        labels=["EXAMPLE--Value"],
                        is_favorite=True,
                        count_statistics=oci.data_integration.models.CountStatistic(
                            object_type_count_list=[
                                oci.data_integration.models.CountStatisticSummary(
                                    object_type="FUNCTION_LIBRARY",
                                    object_count=2)]))),
                connection_properties=[
                    oci.data_integration.models.ConnectionProperty(
                        name="EXAMPLE-name-Value",
                        value="EXAMPLE-value-Value")],
                is_default=False,
                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(
                        "2020-09-15T21:58:49.474Z",
                        "%Y-%m-%dT%H:%M:%S.%fZ"),
                    time_updated=datetime.strptime(
                        "2008-07-21T22:44:45.056Z",
                        "%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_gyFf5': 'EXAMPLE_VALUE_UATS3Cq7EyOIWIoDZPPV'},
                    registry_version=258,
                    labels=["EXAMPLE--Value"],
                    is_favorite=False,
                    count_statistics=oci.data_integration.models.CountStatistic(
                        object_type_count_list=[
                            oci.data_integration.models.CountStatisticSummary(
                                object_type="DATA_ASSET",
                                object_count=605)])),
                key_map={
                    'EXAMPLE_KEY_LwWgk': 'EXAMPLE_VALUE_zMYSgGEfA9pZo9j1CSzE'},
                credential_file_content="EXAMPLE-credentialFileContent-Value",
                user_id="ocid1.test.oc1..<unique_ID>EXAMPLE-userId-Value",
                finger_print="EXAMPLE-fingerPrint-Value",
                pass_phrase="EXAMPLE-passPhrase-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=947,
                external_key="EXAMPLE-externalKey-Value",
                is_has_containers=False,
                default_connection="EXAMPLE-defaultConnection-Value",
                object_status=754,
                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(
                        "2013-06-20T16:20:02.152Z",
                        "%Y-%m-%dT%H:%M:%S.%fZ"),
                    time_updated=datetime.strptime(
                        "2008-03-28T14:25:40.976Z",
                        "%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_6SfLB': 'EXAMPLE_VALUE_DpcTwXHs7Riwfce6b6MD'},
                    registry_version=259,
                    labels=["EXAMPLE--Value"],
                    is_favorite=True,
                    count_statistics=oci.data_integration.models.CountStatistic(
                        object_type_count_list=[
                            oci.data_integration.models.CountStatisticSummary(
                                object_type="TASK",
                                object_count=724)])))),
        connection=oci.data_integration.models.CreateConnectionFromMySQL(
            model_type="MYSQL_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=652,
            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=647,
                key="EXAMPLE-key-Value",
                is_favorite=False),
            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")),
        registry_metadata=oci.data_integration.models.RegistryMetadata(
            aggregator_key="EXAMPLE-aggregatorKey-Value",
            labels=["EXAMPLE--Value"],
            registry_version=440,
            key="EXAMPLE-key-Value",
            is_favorite=True)),
    opc_request_id="L52UMG1TH2FY5FG6RLBS<unique_ID>",
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

# Get the data from response
print(create_connection_validation_response.data)