# 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).
require 'date'
require '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::ConfigFileLoader.load_config
# Initialize service client with default config file
data_integration_client =
OCI::DataIntegration::DataIntegrationClient.new(config: 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(
'ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value',
'EXAMPLE-taskKey-Value',
'EXAMPLE-externalPublicationsKey-Value',
OCI::DataIntegration::Models::UpdateExternalPublicationDetails.new(
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::DataIntegration::Models::ResourceConfiguration.new(
spark_version: 'EXAMPLE-sparkVersion-Value',
driver_shape: 'EXAMPLE-driverShape-Value',
executor_shape: 'EXAMPLE-executorShape-Value',
total_executors: 958
),
configuration_details:
OCI::DataIntegration::Models::ConfigurationDetails.new(
data_asset:
OCI::DataIntegration::Models::DataAssetFromRestDetails.new(
model_type: 'REST_DATA_ASSET',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
name: 'EXAMPLE-name-Value',
description: 'EXAMPLE-description-Value',
object_status: 566,
identifier: 'EXAMPLE-identifier-Value',
external_key: 'EXAMPLE-externalKey-Value',
asset_properties: {
'EXAMPLE_KEY_aPClh' => 'EXAMPLE_VALUE_RJcskNobq4ut85guEaJp'
},
native_type_system:
OCI::DataIntegration::Models::TypeSystem.new(
key: 'EXAMPLE-key-Value',
model_type: 'EXAMPLE-modelType-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
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: 476,
type_mapping_to: {
'EXAMPLE_KEY_Foj8o' => 'EXAMPLE_VALUE_4h0PRKrup8Dm7CdYnB8Y'
},
type_mapping_from: {
'EXAMPLE_KEY_lJeV0' => 'EXAMPLE_VALUE_mqo9ksYMBO4Aqv1qrW6M'
},
object_status: 417,
identifier: 'EXAMPLE-identifier-Value',
types: [
OCI::DataIntegration::Models::DataType.new(
model_type: 'DATA_TYPE',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
name: 'EXAMPLE-name-Value',
object_status: 305,
description: 'EXAMPLE-description-Value',
dt_type: 'PRIMITIVE',
type_system_name: 'EXAMPLE-typeSystemName-Value',
config_definition:
OCI::DataIntegration::Models::ConfigDefinition.new(
key: 'EXAMPLE-key-Value',
model_type: 'EXAMPLE-modelType-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
name: 'EXAMPLE-name-Value',
is_contained: true,
object_status: 637,
config_parameter_definitions: {
'EXAMPLE_KEY_Tkzfo' => {
'parameterType' => {
'modelType' => 'MAP_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' => 548,
'description' => 'EXAMPLE-description-Value',
'keyElementType' =>
'EXAMPLE-keyElementType-Value',
'valueElementType' =>
'EXAMPLE-valueElementType-Value',
'containsNull' => False
},
'parameterName' => 'EXAMPLE-parameterName-Value',
'description' => 'EXAMPLE-description-Value',
'defaultValue' => 'EXAMPLE-defaultValue-Value',
'classFieldName' =>
'EXAMPLE-classFieldName-Value',
'isStatic' => True,
'isClassFieldValue' => True
}
}
)
)
]
),
object_version: 786,
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
parent: 'EXAMPLE-parent-Value',
root_doc_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
),
metadata:
OCI::DataIntegration::Models::ObjectMetadata.new(
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.parse('2004-04-01T08:47:27.436Z'),
time_updated: DateTime.parse('2030-07-11T02:29:36.373Z'),
aggregator_key: 'EXAMPLE-aggregatorKey-Value',
aggregator:
OCI::DataIntegration::Models::AggregatorSummary.new(
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_bDo2a' => 'EXAMPLE_VALUE_vBQYJywkQsti2CttBEDs'
},
registry_version: 391,
labels: %w[EXAMPLE--Value],
is_favorite: true,
count_statistics:
OCI::DataIntegration::Models::CountStatistic.new(
object_type_count_list: [
OCI::DataIntegration::Models::CountStatisticSummary.new(
object_type: 'USER_DEFINED_FUNCTION',
object_count: 717
)
]
)
),
key_map: {
'EXAMPLE_KEY_bsRAW' => 'EXAMPLE_VALUE_O6hzWZCebyBeV5iB10oa'
},
base_url: 'EXAMPLE-baseUrl-Value',
manifest_file_content: 'EXAMPLE-manifestFileContent-Value',
default_connection:
OCI::DataIntegration::Models::ConnectionFromJdbcDetails.new(
model_type: 'GENERIC_JDBC_CONNECTION',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
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: 931,
object_status: 0,
identifier: 'EXAMPLE-identifier-Value',
primary_schema:
OCI::DataIntegration::Models::Schema.new(
key: 'EXAMPLE-key-Value',
model_type: 'EXAMPLE-modelType-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
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: 541,
external_key: 'EXAMPLE-externalKey-Value',
is_has_containers: false,
default_connection: 'EXAMPLE-defaultConnection-Value',
object_status: 103,
identifier: 'EXAMPLE-identifier-Value',
metadata:
OCI::DataIntegration::Models::ObjectMetadata.new(
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.parse('2044-05-15T09:18:40.621Z'),
time_updated:
DateTime.parse('2000-10-12T01:48:34.446Z'),
aggregator_key: 'EXAMPLE-aggregatorKey-Value',
aggregator:
OCI::DataIntegration::Models::AggregatorSummary.new(
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_KhiKV' =>
'EXAMPLE_VALUE_Pd5soszfkk9ousSKug08'
},
registry_version: 984,
labels: %w[EXAMPLE--Value],
is_favorite: false,
count_statistics:
OCI::DataIntegration::Models::CountStatistic.new(
object_type_count_list: [
OCI::DataIntegration::Models::CountStatisticSummary
.new(
object_type: 'USER_DEFINED_FUNCTION',
object_count: 316
)
]
)
)
),
connection_properties: [
OCI::DataIntegration::Models::ConnectionProperty.new(
name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
)
],
is_default: true,
metadata:
OCI::DataIntegration::Models::ObjectMetadata.new(
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.parse('2047-02-28T20:40:46.594Z'),
time_updated: DateTime.parse('2038-04-04T00:49:47.959Z'),
aggregator_key: 'EXAMPLE-aggregatorKey-Value',
aggregator:
OCI::DataIntegration::Models::AggregatorSummary.new(
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_f4GMD' =>
'EXAMPLE_VALUE_6jAkYyI1yRdL0nAz0q4h'
},
registry_version: 587,
labels: %w[EXAMPLE--Value],
is_favorite: true,
count_statistics:
OCI::DataIntegration::Models::CountStatistic.new(
object_type_count_list: [
OCI::DataIntegration::Models::CountStatisticSummary
.new(object_type: 'DATA_FLOW', object_count: 431)
]
)
),
username: 'EXAMPLE-username-Value'
)
),
connection:
OCI::DataIntegration::Models::ConnectionFromOracle.new(
model_type: 'ORACLEDB_CONNECTION',
key: 'EXAMPLE-key-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
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: 30,
object_status: 955,
identifier: 'EXAMPLE-identifier-Value',
primary_schema:
OCI::DataIntegration::Models::Schema.new(
key: 'EXAMPLE-key-Value',
model_type: 'EXAMPLE-modelType-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
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: 560,
external_key: 'EXAMPLE-externalKey-Value',
is_has_containers: false,
default_connection: 'EXAMPLE-defaultConnection-Value',
object_status: 97,
identifier: 'EXAMPLE-identifier-Value',
metadata:
OCI::DataIntegration::Models::ObjectMetadata.new(
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.parse('2016-02-24T01:36:09.211Z'),
time_updated: DateTime.parse('2044-01-24T18:25:12.417Z'),
aggregator_key: 'EXAMPLE-aggregatorKey-Value',
aggregator:
OCI::DataIntegration::Models::AggregatorSummary.new(
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_q7LWR' =>
'EXAMPLE_VALUE_AW32PyocWxjpuKDrKaWc'
},
registry_version: 951,
labels: %w[EXAMPLE--Value],
is_favorite: true,
count_statistics:
OCI::DataIntegration::Models::CountStatistic.new(
object_type_count_list: [
OCI::DataIntegration::Models::CountStatisticSummary
.new(object_type: 'DATA_ASSET', object_count: 166)
]
)
)
),
connection_properties: [
OCI::DataIntegration::Models::ConnectionProperty.new(
name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
)
],
is_default: true,
metadata:
OCI::DataIntegration::Models::ObjectMetadata.new(
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.parse('2031-05-22T09:49:46.101Z'),
time_updated: DateTime.parse('2038-05-09T03:06:07.196Z'),
aggregator_key: 'EXAMPLE-aggregatorKey-Value',
aggregator:
OCI::DataIntegration::Models::AggregatorSummary.new(
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_73Z5I' => 'EXAMPLE_VALUE_GlTOSCQFGvfxAe4U4Fes'
},
registry_version: 777,
labels: %w[EXAMPLE--Value],
is_favorite: true,
count_statistics:
OCI::DataIntegration::Models::CountStatistic.new(
object_type_count_list: [
OCI::DataIntegration::Models::CountStatisticSummary.new(
object_type: 'USER_DEFINED_FUNCTION',
object_count: 472
)
]
)
),
key_map: {
'EXAMPLE_KEY_jAxjK' => 'EXAMPLE_VALUE_FVRvIQSxI9yoBMU9UOGP'
},
username: 'EXAMPLE-username-Value',
password: 'EXAMPLE-password-Value',
password_secret:
OCI::DataIntegration::Models::SensitiveAttribute.new(
secret_config:
OCI::DataIntegration::Models::OciVaultSecretConfig.new(
model_type: 'OCI_VAULT_SECRET_CONFIG',
secret_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value'
),
value: 'EXAMPLE-value-Value'
)
),
compartment_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value',
schema:
OCI::DataIntegration::Models::Schema.new(
key: 'EXAMPLE-key-Value',
model_type: 'EXAMPLE-modelType-Value',
model_version: 'EXAMPLE-modelVersion-Value',
parent_ref:
OCI::DataIntegration::Models::ParentReference.new(
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: 696,
external_key: 'EXAMPLE-externalKey-Value',
is_has_containers: false,
default_connection: 'EXAMPLE-defaultConnection-Value',
object_status: 487,
identifier: 'EXAMPLE-identifier-Value',
metadata:
OCI::DataIntegration::Models::ObjectMetadata.new(
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.parse('2021-03-31T13:33:51.523Z'),
time_updated: DateTime.parse('2012-11-10T04:08:40.238Z'),
aggregator_key: 'EXAMPLE-aggregatorKey-Value',
aggregator:
OCI::DataIntegration::Models::AggregatorSummary.new(
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_zKvYI' => 'EXAMPLE_VALUE_wWQW67iZBaykQL7lrkE6'
},
registry_version: 597,
labels: %w[EXAMPLE--Value],
is_favorite: true,
count_statistics:
OCI::DataIntegration::Models::CountStatistic.new(
object_type_count_list: [
OCI::DataIntegration::Models::CountStatisticSummary.new(
object_type: 'APPLICATION', object_count: 404
)
]
)
)
)
)
)
)
# Get the data from response
puts "#{update_external_publication_response.data}"