// 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).
import * as dataintegration from "oci-dataintegration";
import common = require("oci-common");
// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.
const provider: common.ConfigFileAuthenticationDetailsProvider = new common.ConfigFileAuthenticationDetailsProvider();
(async () => {
try {
// Create a service client
const client = new dataintegration.DataIntegrationClient({
authenticationDetailsProvider: provider
});
// Create a request and dependent object(s).
const updateExternalPublicationDetails = {
applicationId: "ocid1.test.oc1..<unique_ID>EXAMPLE-applicationId-Value",
applicationCompartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-applicationCompartmentId-Value",
displayName: "EXAMPLE-displayName-Value",
description: "EXAMPLE-description-Value",
resourceConfiguration: {
sparkVersion: "EXAMPLE-sparkVersion-Value",
driverShape: "EXAMPLE-driverShape-Value",
executorShape: "EXAMPLE-executorShape-Value",
totalExecutors: 470
},
configurationDetails: {
dataAsset: {
modelType: "ORACLE_ADWC_DATA_ASSET",
serviceName: "EXAMPLE-serviceName-Value",
serviceNames: ["EXAMPLE--Value"],
driverClass: "EXAMPLE-driverClass-Value",
defaultConnection: {
modelType: "ORACLE_ADWC_CONNECTION",
tnsAlias: "EXAMPLE-tnsAlias-Value",
tnsNames: ["EXAMPLE--Value"],
username: "EXAMPLE-username-Value",
password: "EXAMPLE-password-Value",
passwordSecret: {
secretConfig: {
modelType: "OCI_VAULT_SECRET_CONFIG",
secretId: "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"
},
value: "EXAMPLE-value-Value"
},
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",
description: "EXAMPLE-description-Value",
objectVersion: 42,
objectStatus: 747,
identifier: "EXAMPLE-identifier-Value",
primarySchema: {
key: "EXAMPLE-key-Value",
modelType: "EXAMPLE-modelType-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
name: "EXAMPLE-name-Value",
resourceName: "EXAMPLE-resourceName-Value",
description: "EXAMPLE-description-Value",
objectVersion: 545,
externalKey: "EXAMPLE-externalKey-Value",
isHasContainers: false,
defaultConnection: "EXAMPLE-defaultConnection-Value",
objectStatus: 380,
identifier: "EXAMPLE-identifier-Value",
metadata: {
createdBy: "EXAMPLE-createdBy-Value",
createdByName: "EXAMPLE-createdByName-Value",
updatedBy: "EXAMPLE-updatedBy-Value",
updatedByName: "EXAMPLE-updatedByName-Value",
timeCreated: new Date("Sat Aug 29 11:54:39 UTC 2026"),
timeUpdated: new Date("Thu Aug 18 11:22:30 UTC 2033"),
aggregatorKey: "EXAMPLE-aggregatorKey-Value",
aggregator: {
type: "EXAMPLE-type-Value",
key: "EXAMPLE-key-Value",
name: "EXAMPLE-name-Value",
identifier: "EXAMPLE-identifier-Value",
description: "EXAMPLE-description-Value"
},
identifierPath: "EXAMPLE-identifierPath-Value",
infoFields: {
EXAMPLE_KEY_OUJcj: "EXAMPLE_VALUE_1FkTDqFc9DVHxdPTIzzZ"
},
registryVersion: 447,
labels: ["EXAMPLE--Value"],
isFavorite: false,
countStatistics: {
objectTypeCountList: [
{
objectType: dataintegration.models.CountStatisticSummary.ObjectType.DataAsset,
objectCount: 372
}
]
}
}
},
connectionProperties: [
{
name: "EXAMPLE-name-Value",
value: "EXAMPLE-value-Value"
}
],
isDefault: false,
metadata: {
createdBy: "EXAMPLE-createdBy-Value",
createdByName: "EXAMPLE-createdByName-Value",
updatedBy: "EXAMPLE-updatedBy-Value",
updatedByName: "EXAMPLE-updatedByName-Value",
timeCreated: new Date("Sun May 18 14:49:19 UTC 2025"),
timeUpdated: new Date("Wed Aug 14 18:53:27 UTC 2030"),
aggregatorKey: "EXAMPLE-aggregatorKey-Value",
aggregator: {
type: "EXAMPLE-type-Value",
key: "EXAMPLE-key-Value",
name: "EXAMPLE-name-Value",
identifier: "EXAMPLE-identifier-Value",
description: "EXAMPLE-description-Value"
},
identifierPath: "EXAMPLE-identifierPath-Value",
infoFields: {
EXAMPLE_KEY_eOZHj: "EXAMPLE_VALUE_Bhqi1hEGmtQ6fjKii6MA"
},
registryVersion: 129,
labels: ["EXAMPLE--Value"],
isFavorite: true,
countStatistics: {
objectTypeCountList: [
{
objectType: dataintegration.models.CountStatisticSummary.ObjectType.Application,
objectCount: 383
}
]
}
}
},
stagingConnection: {
modelType: "LAKE_CONNECTION",
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",
description: "EXAMPLE-description-Value",
objectVersion: 221,
objectStatus: 759,
identifier: "EXAMPLE-identifier-Value",
primarySchema: {
key: "EXAMPLE-key-Value",
modelType: "EXAMPLE-modelType-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
name: "EXAMPLE-name-Value",
resourceName: "EXAMPLE-resourceName-Value",
description: "EXAMPLE-description-Value",
objectVersion: 229,
externalKey: "EXAMPLE-externalKey-Value",
isHasContainers: false,
defaultConnection: "EXAMPLE-defaultConnection-Value",
objectStatus: 125,
identifier: "EXAMPLE-identifier-Value",
metadata: {
createdBy: "EXAMPLE-createdBy-Value",
createdByName: "EXAMPLE-createdByName-Value",
updatedBy: "EXAMPLE-updatedBy-Value",
updatedByName: "EXAMPLE-updatedByName-Value",
timeCreated: new Date("Wed Jun 06 06:02:09 UTC 2046"),
timeUpdated: new Date("Sun Apr 12 01:29:44 UTC 2026"),
aggregatorKey: "EXAMPLE-aggregatorKey-Value",
aggregator: {
type: "EXAMPLE-type-Value",
key: "EXAMPLE-key-Value",
name: "EXAMPLE-name-Value",
identifier: "EXAMPLE-identifier-Value",
description: "EXAMPLE-description-Value"
},
identifierPath: "EXAMPLE-identifierPath-Value",
infoFields: {
EXAMPLE_KEY_4myfA: "EXAMPLE_VALUE_YAX5MaePWfbUMr4nJ2MV"
},
registryVersion: 519,
labels: ["EXAMPLE--Value"],
isFavorite: false,
countStatistics: {
objectTypeCountList: [
{
objectType:
dataintegration.models.CountStatisticSummary.ObjectType.UserDefinedFunction,
objectCount: 266
}
]
}
}
},
connectionProperties: [
{
name: "EXAMPLE-name-Value",
value: "EXAMPLE-value-Value"
}
],
isDefault: true,
metadata: {
createdBy: "EXAMPLE-createdBy-Value",
createdByName: "EXAMPLE-createdByName-Value",
updatedBy: "EXAMPLE-updatedBy-Value",
updatedByName: "EXAMPLE-updatedByName-Value",
timeCreated: new Date("Wed Dec 10 12:20:06 UTC 2003"),
timeUpdated: new Date("Tue Jul 09 23:11:15 UTC 2030"),
aggregatorKey: "EXAMPLE-aggregatorKey-Value",
aggregator: {
type: "EXAMPLE-type-Value",
key: "EXAMPLE-key-Value",
name: "EXAMPLE-name-Value",
identifier: "EXAMPLE-identifier-Value",
description: "EXAMPLE-description-Value"
},
identifierPath: "EXAMPLE-identifierPath-Value",
infoFields: {
EXAMPLE_KEY_rt2eB: "EXAMPLE_VALUE_ZkDGEvPwdRDa07MGHlRo"
},
registryVersion: 817,
labels: ["EXAMPLE--Value"],
isFavorite: false,
countStatistics: {
objectTypeCountList: [
{
objectType: dataintegration.models.CountStatisticSummary.ObjectType.Application,
objectCount: 79
}
]
}
},
keyMap: {
EXAMPLE_KEY_VEct6: "EXAMPLE_VALUE_v4rZM2CC3amCPSvhXI9Q"
}
},
bucketSchema: {
key: "EXAMPLE-key-Value",
modelType: "EXAMPLE-modelType-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
name: "EXAMPLE-name-Value",
resourceName: "EXAMPLE-resourceName-Value",
description: "EXAMPLE-description-Value",
objectVersion: 43,
externalKey: "EXAMPLE-externalKey-Value",
isHasContainers: false,
defaultConnection: "EXAMPLE-defaultConnection-Value",
objectStatus: 668,
identifier: "EXAMPLE-identifier-Value",
metadata: {
createdBy: "EXAMPLE-createdBy-Value",
createdByName: "EXAMPLE-createdByName-Value",
updatedBy: "EXAMPLE-updatedBy-Value",
updatedByName: "EXAMPLE-updatedByName-Value",
timeCreated: new Date("Tue Jul 23 23:17:20 UTC 2030"),
timeUpdated: new Date("Thu Sep 08 08:42:05 UTC 2022"),
aggregatorKey: "EXAMPLE-aggregatorKey-Value",
aggregator: {
type: "EXAMPLE-type-Value",
key: "EXAMPLE-key-Value",
name: "EXAMPLE-name-Value",
identifier: "EXAMPLE-identifier-Value",
description: "EXAMPLE-description-Value"
},
identifierPath: "EXAMPLE-identifierPath-Value",
infoFields: {
EXAMPLE_KEY_ZDcs5: "EXAMPLE_VALUE_YUidPD0m2cUJsTSCoIYY"
},
registryVersion: 958,
labels: ["EXAMPLE--Value"],
isFavorite: true,
countStatistics: {
objectTypeCountList: [
{
objectType:
dataintegration.models.CountStatisticSummary.ObjectType.UserDefinedFunction,
objectCount: 234
}
]
}
}
},
key: "EXAMPLE-key-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
name: "EXAMPLE-name-Value",
description: "EXAMPLE-description-Value",
objectStatus: 885,
identifier: "EXAMPLE-identifier-Value",
externalKey: "EXAMPLE-externalKey-Value",
assetProperties: {
EXAMPLE_KEY_lfTGb: "EXAMPLE_VALUE_LjgqzpSyF109qrHGa9M1"
},
nativeTypeSystem: {
key: "EXAMPLE-key-Value",
modelType: "EXAMPLE-modelType-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
name: "EXAMPLE-name-Value",
description: "EXAMPLE-description-Value",
objectVersion: 75,
typeMappingTo: {
EXAMPLE_KEY_NEjrv: "EXAMPLE_VALUE_tux0m0jiM01XYc6dg5nR"
},
typeMappingFrom: {
EXAMPLE_KEY_C1rx7: "EXAMPLE_VALUE_JVYlg5yCprfdeGAlNyXh"
},
objectStatus: 5,
identifier: "EXAMPLE-identifier-Value",
types: [
{
modelType: "DATA_TYPE",
dtType: dataintegration.models.DataType.DtType.Primitive,
typeSystemName: "EXAMPLE-typeSystemName-Value",
configDefinition: {
key: "EXAMPLE-key-Value",
modelType: "EXAMPLE-modelType-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
name: "EXAMPLE-name-Value",
isContained: true,
objectStatus: 218,
configParameterDefinitions: {
EXAMPLE_KEY_EQ9Jr: {
parameterType: {
modelType: "MAP_TYPE",
keyElementType: "EXAMPLE-keyElementType-Value",
valueElementType: "EXAMPLE-valueElementType-Value",
containsNull: true,
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: 131,
description: "EXAMPLE-description-Value"
},
parameterName: "EXAMPLE-parameterName-Value",
description: "EXAMPLE-description-Value",
defaultValue: "EXAMPLE-defaultValue-Value",
classFieldName: "EXAMPLE-classFieldName-Value",
isStatic: false,
isClassFieldValue: true
}
}
},
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: 361,
description: "EXAMPLE-description-Value"
}
]
},
objectVersion: 837,
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
metadata: {
createdBy: "EXAMPLE-createdBy-Value",
createdByName: "EXAMPLE-createdByName-Value",
updatedBy: "EXAMPLE-updatedBy-Value",
updatedByName: "EXAMPLE-updatedByName-Value",
timeCreated: new Date("Sun Nov 13 00:08:10 UTC 2039"),
timeUpdated: new Date("Thu Jan 31 08:06:32 UTC 2008"),
aggregatorKey: "EXAMPLE-aggregatorKey-Value",
aggregator: {
type: "EXAMPLE-type-Value",
key: "EXAMPLE-key-Value",
name: "EXAMPLE-name-Value",
identifier: "EXAMPLE-identifier-Value",
description: "EXAMPLE-description-Value"
},
identifierPath: "EXAMPLE-identifierPath-Value",
infoFields: {
EXAMPLE_KEY_XTbGg: "EXAMPLE_VALUE_FfOl8LPSj4Vxmc2TMIEt"
},
registryVersion: 369,
labels: ["EXAMPLE--Value"],
isFavorite: false,
countStatistics: {
objectTypeCountList: [
{
objectType: dataintegration.models.CountStatisticSummary.ObjectType.DataFlow,
objectCount: 92
}
]
}
},
keyMap: {
EXAMPLE_KEY_5pRcl: "EXAMPLE_VALUE_L9k9ONDCHg2zHik8KMd9"
}
},
connection: {
modelType: "HDFS_CONNECTION",
hdfsPrincipal: "EXAMPLE-hdfsPrincipal-Value",
dataNodePrincipal: "EXAMPLE-dataNodePrincipal-Value",
nameNodePrincipal: "EXAMPLE-nameNodePrincipal-Value",
realm: "EXAMPLE-realm-Value",
keyDistributionCenter: "EXAMPLE-keyDistributionCenter-Value",
keyTabContent: {
secretConfig: {
modelType: "OCI_VAULT_SECRET_CONFIG",
secretId: "ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"
},
value: "EXAMPLE-value-Value"
},
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",
description: "EXAMPLE-description-Value",
objectVersion: 115,
objectStatus: 140,
identifier: "EXAMPLE-identifier-Value",
primarySchema: {
key: "EXAMPLE-key-Value",
modelType: "EXAMPLE-modelType-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
name: "EXAMPLE-name-Value",
resourceName: "EXAMPLE-resourceName-Value",
description: "EXAMPLE-description-Value",
objectVersion: 336,
externalKey: "EXAMPLE-externalKey-Value",
isHasContainers: false,
defaultConnection: "EXAMPLE-defaultConnection-Value",
objectStatus: 279,
identifier: "EXAMPLE-identifier-Value",
metadata: {
createdBy: "EXAMPLE-createdBy-Value",
createdByName: "EXAMPLE-createdByName-Value",
updatedBy: "EXAMPLE-updatedBy-Value",
updatedByName: "EXAMPLE-updatedByName-Value",
timeCreated: new Date("Sun Sep 08 01:10:12 UTC 2019"),
timeUpdated: new Date("Thu Sep 13 01:21:27 UTC 2001"),
aggregatorKey: "EXAMPLE-aggregatorKey-Value",
aggregator: {
type: "EXAMPLE-type-Value",
key: "EXAMPLE-key-Value",
name: "EXAMPLE-name-Value",
identifier: "EXAMPLE-identifier-Value",
description: "EXAMPLE-description-Value"
},
identifierPath: "EXAMPLE-identifierPath-Value",
infoFields: {
EXAMPLE_KEY_bAV3N: "EXAMPLE_VALUE_bY7v8VMjQpn7l7LWmRBK"
},
registryVersion: 714,
labels: ["EXAMPLE--Value"],
isFavorite: true,
countStatistics: {
objectTypeCountList: [
{
objectType:
dataintegration.models.CountStatisticSummary.ObjectType.FunctionLibrary,
objectCount: 122
}
]
}
}
},
connectionProperties: [
{
name: "EXAMPLE-name-Value",
value: "EXAMPLE-value-Value"
}
],
isDefault: false,
metadata: {
createdBy: "EXAMPLE-createdBy-Value",
createdByName: "EXAMPLE-createdByName-Value",
updatedBy: "EXAMPLE-updatedBy-Value",
updatedByName: "EXAMPLE-updatedByName-Value",
timeCreated: new Date("Thu Dec 06 23:57:01 UTC 2018"),
timeUpdated: new Date("Fri Mar 31 12:16:05 UTC 2017"),
aggregatorKey: "EXAMPLE-aggregatorKey-Value",
aggregator: {
type: "EXAMPLE-type-Value",
key: "EXAMPLE-key-Value",
name: "EXAMPLE-name-Value",
identifier: "EXAMPLE-identifier-Value",
description: "EXAMPLE-description-Value"
},
identifierPath: "EXAMPLE-identifierPath-Value",
infoFields: {
EXAMPLE_KEY_rtail: "EXAMPLE_VALUE_z8TRJse9WZBeqYdfzWS0"
},
registryVersion: 161,
labels: ["EXAMPLE--Value"],
isFavorite: true,
countStatistics: {
objectTypeCountList: [
{
objectType:
dataintegration.models.CountStatisticSummary.ObjectType.FunctionLibrary,
objectCount: 673
}
]
}
},
keyMap: {
EXAMPLE_KEY_RQmDn: "EXAMPLE_VALUE_tam9pIGf0v5SCFFMR4TS"
}
},
compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
schema: {
key: "EXAMPLE-key-Value",
modelType: "EXAMPLE-modelType-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"
},
name: "EXAMPLE-name-Value",
resourceName: "EXAMPLE-resourceName-Value",
description: "EXAMPLE-description-Value",
objectVersion: 152,
externalKey: "EXAMPLE-externalKey-Value",
isHasContainers: true,
defaultConnection: "EXAMPLE-defaultConnection-Value",
objectStatus: 966,
identifier: "EXAMPLE-identifier-Value",
metadata: {
createdBy: "EXAMPLE-createdBy-Value",
createdByName: "EXAMPLE-createdByName-Value",
updatedBy: "EXAMPLE-updatedBy-Value",
updatedByName: "EXAMPLE-updatedByName-Value",
timeCreated: new Date("Thu Jul 29 21:42:19 UTC 2021"),
timeUpdated: new Date("Tue Nov 01 04:07:02 UTC 2005"),
aggregatorKey: "EXAMPLE-aggregatorKey-Value",
aggregator: {
type: "EXAMPLE-type-Value",
key: "EXAMPLE-key-Value",
name: "EXAMPLE-name-Value",
identifier: "EXAMPLE-identifier-Value",
description: "EXAMPLE-description-Value"
},
identifierPath: "EXAMPLE-identifierPath-Value",
infoFields: {
EXAMPLE_KEY_nJWXM: "EXAMPLE_VALUE_eEiB1CZHCYzxHrm2MnXy"
},
registryVersion: 869,
labels: ["EXAMPLE--Value"],
isFavorite: true,
countStatistics: {
objectTypeCountList: [
{
objectType:
dataintegration.models.CountStatisticSummary.ObjectType.UserDefinedFunction,
objectCount: 809
}
]
}
}
}
}
};
const updateExternalPublicationRequest: dataintegration.requests.UpdateExternalPublicationRequest = {
workspaceId: "ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
taskKey: "EXAMPLE-taskKey-Value",
externalPublicationsKey: "EXAMPLE-externalPublicationsKey-Value",
updateExternalPublicationDetails: updateExternalPublicationDetails,
opcRequestId: "F1IQDYEJTPMAM0HMVNBC<unique_ID>",
ifMatch: "EXAMPLE-ifMatch-Value"
};
// Send request to the Client.
const updateExternalPublicationResponse = await client.updateExternalPublication(
updateExternalPublicationRequest
);
} catch (error) {
console.log("updateExternalPublication Failed with error " + error);
}
})();