# 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.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=784,
            external_key="EXAMPLE-externalKey-Value",
            asset_properties={
                'EXAMPLE_KEY_W402z': 'EXAMPLE_VALUE_ZAJgwrpEIw0h7po8AoNn'},
            registry_metadata=oci.data_integration.models.RegistryMetadata(
                aggregator_key="EXAMPLE-aggregatorKey-Value",
                labels=["EXAMPLE--Value"],
                registry_version=898,
                key="EXAMPLE-key-Value",
                is_favorite=True),
            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=93,
                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=544,
                    key="EXAMPLE-key-Value",
                    is_favorite=False),
                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.DataAssetFromFusionApp(
                model_type="FUSION_APP_DATA_ASSET",
                key="EXAMPLE-key-Value",
                model_version="EXAMPLE-modelVersion-Value",
                name="EXAMPLE-name-Value",
                description="EXAMPLE-description-Value",
                object_status=463,
                identifier="EXAMPLE-identifier-Value",
                external_key="EXAMPLE-externalKey-Value",
                asset_properties={
                    'EXAMPLE_KEY_2nwHs': 'EXAMPLE_VALUE_piUs23xU5ntz2xbG2vSu'},
                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=41,
                    type_mapping_to={
                        'EXAMPLE_KEY_LhZHc': 'EXAMPLE_VALUE_DYUGdTEXYDhZMn8Y6Cqy'},
                    type_mapping_from={
                        'EXAMPLE_KEY_jkudc': 'EXAMPLE_VALUE_EP2k8TwAUKQP0TvpoiXT'},
                    object_status=841,
                    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=298,
                            description="EXAMPLE-description-Value",
                            dt_type="STRUCTURED",
                            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=True,
                                object_status=833,
                                config_parameter_definitions={
                                    'EXAMPLE_KEY_KcShs': {
                                        'parameterType': {
                                            'modelType': 'MATERIALIZED_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': 638,
                                            'description': 'EXAMPLE-description-Value',
                                            'elements': ['EXAMPLE--Value'],
                                            'pathNames': ['EXAMPLE--Value']},
                                        'parameterName': 'EXAMPLE-parameterName-Value',
                                        'description': 'EXAMPLE-description-Value',
                                        'defaultValue': 'EXAMPLE-defaultValue-Value',
                                        'classFieldName': 'EXAMPLE-classFieldName-Value',
                                        'isStatic': True,
                                        'isClassFieldValue': False}}))]),
                object_version=410,
                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(
                        "2038-02-25T04:28:44.441Z",
                        "%Y-%m-%dT%H:%M:%S.%fZ"),
                    time_updated=datetime.strptime(
                        "2038-09-09T22:13:31.153Z",
                        "%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_yVicP': 'EXAMPLE_VALUE_VPETMCWuHJRrulO3vEGC'},
                    registry_version=795,
                    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=453)])),
                key_map={
                    'EXAMPLE_KEY_XQfHA': 'EXAMPLE_VALUE_WhjkkwbLkqvDoNqVK2nZ'},
                service_url="EXAMPLE-serviceUrl-Value",
                default_connection=oci.data_integration.models.ConnectionFromMySQLDetails(
                    model_type="MYSQL_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=363,
                    object_status=487,
                    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=752,
                        external_key="EXAMPLE-externalKey-Value",
                        is_has_containers=False,
                        default_connection="EXAMPLE-defaultConnection-Value",
                        object_status=841,
                        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(
                                "2001-03-13T06:11:00.557Z",
                                "%Y-%m-%dT%H:%M:%S.%fZ"),
                            time_updated=datetime.strptime(
                                "2008-06-13T10:07:30.665Z",
                                "%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_arnHa': 'EXAMPLE_VALUE_Qt7QRZMK9TiWML4KTlod'},
                            registry_version=621,
                            labels=["EXAMPLE--Value"],
                            is_favorite=True,
                            count_statistics=oci.data_integration.models.CountStatistic(
                                object_type_count_list=[
                                    oci.data_integration.models.CountStatisticSummary(
                                        object_type="FOLDER",
                                        object_count=325)]))),
                    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(
                            "2009-12-18T14:13:09.562Z",
                            "%Y-%m-%dT%H:%M:%S.%fZ"),
                        time_updated=datetime.strptime(
                            "2038-11-27T05:17:33.276Z",
                            "%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_uf4Vj': 'EXAMPLE_VALUE_gGsHSSrKMzjIfm46qAf2'},
                        registry_version=485,
                        labels=["EXAMPLE--Value"],
                        is_favorite=True,
                        count_statistics=oci.data_integration.models.CountStatistic(
                            object_type_count_list=[
                                oci.data_integration.models.CountStatisticSummary(
                                    object_type="USER_DEFINED_FUNCTION",
                                    object_count=603)])),
                    username="EXAMPLE-username-Value")),
            staging_connection=oci.data_integration.models.ConnectionFromMySQL(
                model_type="MYSQL_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=748,
                object_status=889,
                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=981,
                    external_key="EXAMPLE-externalKey-Value",
                    is_has_containers=True,
                    default_connection="EXAMPLE-defaultConnection-Value",
                    object_status=403,
                    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(
                            "2040-01-16T16:03:29.977Z",
                            "%Y-%m-%dT%H:%M:%S.%fZ"),
                        time_updated=datetime.strptime(
                            "2021-02-16T10:05:55.365Z",
                            "%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_TnRmy': 'EXAMPLE_VALUE_7JULmhKIwwfycDTsarrd'},
                        registry_version=607,
                        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=331)]))),
                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(
                        "2018-01-14T06:18:40.196Z",
                        "%Y-%m-%dT%H:%M:%S.%fZ"),
                    time_updated=datetime.strptime(
                        "2029-01-17T14:56:43.209Z",
                        "%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_6TtU6': 'EXAMPLE_VALUE_qfcydSUfmsraQ0mc2s2Y'},
                    registry_version=851,
                    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=327)])),
                key_map={
                    'EXAMPLE_KEY_HPV5h': 'EXAMPLE_VALUE_L0dNMw9YcwTj0uQBktVe'},
                username="EXAMPLE-username-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=402,
                external_key="EXAMPLE-externalKey-Value",
                is_has_containers=True,
                default_connection="EXAMPLE-defaultConnection-Value",
                object_status=436,
                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-11-01T13:00:36.426Z",
                        "%Y-%m-%dT%H:%M:%S.%fZ"),
                    time_updated=datetime.strptime(
                        "2047-04-25T20:18:01.729Z",
                        "%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_64665': 'EXAMPLE_VALUE_YHDim3erSiuY9atrIjG0'},
                    registry_version=354,
                    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=182)])))),
        connection=oci.data_integration.models.CreateConnectionFromObjectStorage(
            model_type="ORACLE_OBJECT_STORAGE_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=218,
            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=675,
                key="EXAMPLE-key-Value",
                is_favorite=True),
            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"),
        registry_metadata=oci.data_integration.models.RegistryMetadata(
            aggregator_key="EXAMPLE-aggregatorKey-Value",
            labels=["EXAMPLE--Value"],
            registry_version=510,
            key="EXAMPLE-key-Value",
            is_favorite=True)),
    opc_request_id="GVEPFOHZPXPME7FULR5U<unique_ID>",
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

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