# 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_catalog_client = oci.data_catalog.DataCatalogClient(config)
# Send the request to service, some parameters are not required, see API
# doc for more info
parse_connection_response = data_catalog_client.parse_connection(
catalog_id="ocid1.test.oc1..<unique_ID>EXAMPLE-catalogId-Value",
data_asset_key="EXAMPLE-dataAssetKey-Value",
parse_connection_details=oci.data_catalog.models.ParseConnectionDetails(
connection_detail=oci.data_catalog.models.Connection(
key="EXAMPLE-key-Value",
description="EXAMPLE-description-Value",
display_name="EXAMPLE-displayName-Value",
time_created=datetime.strptime(
"2017-08-20T23:03:53.791Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2005-05-28T08:16:43.222Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
created_by_id="ocid1.test.oc1..<unique_ID>EXAMPLE-createdById-Value",
updated_by_id="ocid1.test.oc1..<unique_ID>EXAMPLE-updatedById-Value",
custom_property_members=[
oci.data_catalog.models.CustomPropertyGetUsage(
key="EXAMPLE-key-Value",
display_name="EXAMPLE-displayName-Value",
description="EXAMPLE-description-Value",
value="EXAMPLE-value-Value",
data_type="NUMBER",
namespace_name="EXAMPLE-namespaceName-Value",
namespace_key="EXAMPLE-namespaceKey-Value",
is_multi_valued=False,
is_hidden=True,
is_editable=False,
is_shown_in_list=False,
is_event_enabled=False,
is_list_type=True,
allowed_values=["EXAMPLE--Value"])],
properties={
'EXAMPLE_KEY_1Gi1w': {
'EXAMPLE_KEY_oBSEL': 'EXAMPLE--Value'}},
external_key="EXAMPLE-externalKey-Value",
time_status_updated=datetime.strptime(
"2038-09-03T07:28:28.957Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
lifecycle_state="DELETING",
is_default=True,
data_asset_key="EXAMPLE-dataAssetKey-Value",
type_key="EXAMPLE-typeKey-Value",
uri="EXAMPLE-uri-Value"),
connection_payload="KtZSBHb5LbC4klD4GUVz",
wallet_secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-walletSecretId-Value",
wallet_secret_name="EXAMPLE-walletSecretName-Value"),
connection_key="EXAMPLE-connectionKey-Value",
opc_request_id="TVZXWAFSKNXH8CZH6SI5<unique_ID>",
opc_retry_token="EXAMPLE-opcRetryToken-Value")
# Get the data from response
print(parse_connection_response.data)