# 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
update_external_publication_response = data_integration_client.update_external_publication(
workspace_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
task_key="EXAMPLE-taskKey-Value",
external_publications_key="EXAMPLE-externalPublicationsKey-Value",
update_external_publication_details=oci.data_integration.models.UpdateExternalPublicationDetails(
application_compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-applicationCompartmentId-Value",
display_name="EXAMPLE-displayName-Value",
application_id="ocid1.test.oc1..<unique_ID>EXAMPLE-applicationId-Value",
description="EXAMPLE-description-Value",
resource_configuration=oci.data_integration.models.ResourceConfiguration(
spark_version="EXAMPLE-sparkVersion-Value",
driver_shape="EXAMPLE-driverShape-Value",
executor_shape="EXAMPLE-executorShape-Value",
total_executors=665),
configuration_details=oci.data_integration.models.ConfigurationDetails(
data_asset=oci.data_integration.models.DataAssetFromMySQL(
model_type="MYSQL_DATA_ASSET",
key="EXAMPLE-key-Value",
model_version="EXAMPLE-modelVersion-Value",
name="EXAMPLE-name-Value",
description="EXAMPLE-description-Value",
object_status=392,
identifier="EXAMPLE-identifier-Value",
external_key="EXAMPLE-externalKey-Value",
asset_properties={
'EXAMPLE_KEY_e1Wx2': 'EXAMPLE_VALUE_lY3R9xUgKEliDCGezykf'},
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=292,
type_mapping_to={
'EXAMPLE_KEY_S1bZR': 'EXAMPLE_VALUE_tA7ZZIAAEZKxuvVju2vY'},
type_mapping_from={
'EXAMPLE_KEY_9pd0g': 'EXAMPLE_VALUE_I3abpfOcQw2I48aaZtls'},
object_status=830,
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=98,
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=True,
object_status=70,
config_parameter_definitions={
'EXAMPLE_KEY_VKgmy': {
'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': 126,
'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=323,
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(
"2015-12-16T18:02:00.811Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2022-07-15T22:31:02.326Z",
"%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_uF2zn': 'EXAMPLE_VALUE_1dPa4ecp6D2LDl3sHLQl'},
registry_version=789,
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=515)])),
key_map={
'EXAMPLE_KEY_SSd26': 'EXAMPLE_VALUE_16GOXQ705ca07sihZux5'},
host="EXAMPLE-host-Value",
port="EXAMPLE-port-Value",
service_name="EXAMPLE-serviceName-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=850,
object_status=540,
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=0,
external_key="EXAMPLE-externalKey-Value",
is_has_containers=True,
default_connection="EXAMPLE-defaultConnection-Value",
object_status=63,
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(
"2019-07-06T17:28:36.964Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2044-04-23T19:19:44.316Z",
"%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_9R2tg': 'EXAMPLE_VALUE_razYD2puNHrckmkmarBV'},
registry_version=244,
labels=["EXAMPLE--Value"],
is_favorite=False,
count_statistics=oci.data_integration.models.CountStatistic(
object_type_count_list=[
oci.data_integration.models.CountStatisticSummary(
object_type="FUNCTION_LIBRARY",
object_count=405)]))),
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(
"2042-10-26T00:10:57.183Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2021-06-29T14:53:35.297Z",
"%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_afhkv': 'EXAMPLE_VALUE_Mv7oB4g69cmcAxg9frSB'},
registry_version=775,
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=267)])),
username="EXAMPLE-username-Value")),
connection=oci.data_integration.models.ConnectionFromRestBasicAuth(
model_type="REST_BASIC_AUTH_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=145,
object_status=258,
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=540,
external_key="EXAMPLE-externalKey-Value",
is_has_containers=False,
default_connection="EXAMPLE-defaultConnection-Value",
object_status=248,
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(
"2036-12-17T03:18:37.766Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2015-10-24T05:44:10.878Z",
"%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_xQ5fs': 'EXAMPLE_VALUE_LTTp41ExYJhOnyyZbI7u'},
registry_version=520,
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=636)]))),
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-07-17T03:31:00.439Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2027-10-10T07:49:08.978Z",
"%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_Efz63': 'EXAMPLE_VALUE_bzxZ2xGEOBbHhuVSsNGq'},
registry_version=953,
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=937)])),
key_map={
'EXAMPLE_KEY_ej7sl': 'EXAMPLE_VALUE_p4IUzcyRzvm1wLRXZuxs'},
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"),
auth_header="EXAMPLE-authHeader-Value"),
compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
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=757,
external_key="EXAMPLE-externalKey-Value",
is_has_containers=False,
default_connection="EXAMPLE-defaultConnection-Value",
object_status=687,
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(
"2042-10-15T06:05:46.361Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_updated=datetime.strptime(
"2000-02-10T18:10:19.267Z",
"%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_uvBV8': 'EXAMPLE_VALUE_fOet1ZFRuttffdBaxS9F'},
registry_version=531,
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=927)]))))),
opc_request_id="79FDVA6RUL3GY4INVK78<unique_ID>",
if_match="EXAMPLE-ifMatch-Value")
# Get the data from response
print(update_external_publication_response.data)