// 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 createEntityShapeDetails = {
modelType: "FILE_ENTITY", 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: 100,
externalKey: "EXAMPLE-externalKey-Value",
shape: {
modelType: "SHAPE", type: {
modelType: "JAVA_TYPE", javaTypeName: "EXAMPLE-javaTypeName-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: 496,
configParameterDefinitions: {
EXAMPLE_KEY_OakG8 :{
parameterName: "EXAMPLE-parameterName-Value",
description: "EXAMPLE-description-Value",
defaultValue: "EXAMPLE-defaultValue-Value",
classFieldName: "EXAMPLE-classFieldName-Value",
isStatic: false,
isClassFieldValue: false,
}
},
}
,
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: 71,
description: "EXAMPLE-description-Value"
}
,
key: "EXAMPLE-key-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
configValues: {
configParamValues: {
EXAMPLE_KEY_pewIj :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 306,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
objectStatus: 632,
name: "EXAMPLE-name-Value",
description: "EXAMPLE-description-Value"
}
,
shapeId: "ocid1.test.oc1..<unique_ID>EXAMPLE-shapeId-Value",
types: {
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: 942,
types: {
EXAMPLE_KEY_WEz7l :{
modelType: "DERIVED_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: 318,
description: "EXAMPLE-description-Value"
}
},
objectStatus: 120,
identifier: "EXAMPLE-identifier-Value",
}
,
entityType: dataintegration.models.CreateEntityShapeFromFile.EntityType.Queue,
otherTypeLabel: "EXAMPLE-otherTypeLabel-Value",
uniqueKeys: [{
modelType: "UNIQUE_KEY", 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",
attributeRefs: [{
position: 609,
shapeField: {
modelType: "SHAPE_FIELD", type: "EXAMPLE-type-Value",
labels: ["EXAMPLE--Value" ],
nativeShapeField: {
name: "EXAMPLE-name-Value",
modelType: "EXAMPLE-modelType-Value",
type: "EXAMPLE-type-Value",
configValues: {
configParamValues: {
EXAMPLE_KEY_MMtaz :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 847,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
position: 712,
defaultValueString: "EXAMPLE-defaultValueString-Value",
isMandatory: true,
}
,
key: "EXAMPLE-key-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
configValues: {
configParamValues: {
EXAMPLE_KEY_65UtS :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 23,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
objectStatus: 2,
name: "EXAMPLE-name-Value",
description: "EXAMPLE-description-Value"
}
,
attribute: {
modelType: "SHAPE_FIELD", type: "EXAMPLE-type-Value",
labels: ["EXAMPLE--Value" ],
nativeShapeField: {
name: "EXAMPLE-name-Value",
modelType: "EXAMPLE-modelType-Value",
type: "EXAMPLE-type-Value",
configValues: {
configParamValues: {
EXAMPLE_KEY_MlJsa :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 104,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
position: 135,
defaultValueString: "EXAMPLE-defaultValueString-Value",
isMandatory: true,
}
,
key: "EXAMPLE-key-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
configValues: {
configParamValues: {
EXAMPLE_KEY_o3IBG :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 51,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
objectStatus: 953,
name: "EXAMPLE-name-Value",
description: "EXAMPLE-description-Value"
}
,
}
],
objectStatus: 389
}
],
foreignKeys: [{
modelType: "FOREIGN_KEY", 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",
attributeRefs: [{
position: 745,
shapeField: {
modelType: "SHAPE_FIELD", type: "EXAMPLE-type-Value",
labels: ["EXAMPLE--Value" ],
nativeShapeField: {
name: "EXAMPLE-name-Value",
modelType: "EXAMPLE-modelType-Value",
type: "EXAMPLE-type-Value",
configValues: {
configParamValues: {
EXAMPLE_KEY_cRVKg :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 695,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
position: 692,
defaultValueString: "EXAMPLE-defaultValueString-Value",
isMandatory: false,
}
,
key: "EXAMPLE-key-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
configValues: {
configParamValues: {
EXAMPLE_KEY_ie1Wx :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 318,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
objectStatus: 742,
name: "EXAMPLE-name-Value",
description: "EXAMPLE-description-Value"
}
,
attribute: {
modelType: "SHAPE_FIELD", type: "EXAMPLE-type-Value",
labels: ["EXAMPLE--Value" ],
nativeShapeField: {
name: "EXAMPLE-name-Value",
modelType: "EXAMPLE-modelType-Value",
type: "EXAMPLE-type-Value",
configValues: {
configParamValues: {
EXAMPLE_KEY_fsLTT :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 181,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
position: 573,
defaultValueString: "EXAMPLE-defaultValueString-Value",
isMandatory: true,
}
,
key: "EXAMPLE-key-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
configValues: {
configParamValues: {
EXAMPLE_KEY_ux5qY :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 874,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
objectStatus: 0,
name: "EXAMPLE-name-Value",
description: "EXAMPLE-description-Value"
}
,
}
],
updateRule: 448,
deleteRule: 765,
referenceUniqueKey: {
modelType: "UNIQUE_KEY", 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",
attributeRefs: [{
position: 677,
shapeField: {
modelType: "SHAPE_FIELD", type: "EXAMPLE-type-Value",
labels: ["EXAMPLE--Value" ],
nativeShapeField: {
name: "EXAMPLE-name-Value",
modelType: "EXAMPLE-modelType-Value",
type: "EXAMPLE-type-Value",
configValues: {
configParamValues: {
EXAMPLE_KEY_WU7XU :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 665,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
position: 73,
defaultValueString: "EXAMPLE-defaultValueString-Value",
isMandatory: false,
}
,
key: "EXAMPLE-key-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
configValues: {
configParamValues: {
EXAMPLE_KEY_lp4IU :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 153,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
objectStatus: 211,
name: "EXAMPLE-name-Value",
description: "EXAMPLE-description-Value"
}
,
attribute: {
modelType: "SHAPE_FIELD", type: "EXAMPLE-type-Value",
labels: ["EXAMPLE--Value" ],
nativeShapeField: {
name: "EXAMPLE-name-Value",
modelType: "EXAMPLE-modelType-Value",
type: "EXAMPLE-type-Value",
configValues: {
configParamValues: {
EXAMPLE_KEY_Jglob :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 444,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
position: 148,
defaultValueString: "EXAMPLE-defaultValueString-Value",
isMandatory: false,
}
,
key: "EXAMPLE-key-Value",
modelVersion: "EXAMPLE-modelVersion-Value",
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
configValues: {
configParamValues: {
EXAMPLE_KEY_61PjU :{
stringValue: "EXAMPLE-stringValue-Value",
intValue: 17,
objectValue: "EXAMPLE-objectValue-Value",
refValue: "EXAMPLE-refValue-Value",
parameterValue: "EXAMPLE-parameterValue-Value",
rootObjectValue: "EXAMPLE-rootObjectValue-Value",
}
},
parentRef: {
parent: "EXAMPLE-parent-Value",
rootDocId: "ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value",
}
,
}
,
objectStatus: 635,
name: "EXAMPLE-name-Value",
description: "EXAMPLE-description-Value"
}
,
}
],
objectStatus: 898
}
,
objectStatus: 906
}
],
resourceName: "EXAMPLE-resourceName-Value",
dataFormat: {
formatAttribute: {
modelType: "PARQUET_FORMAT", compression: "EXAMPLE-compression-Value",
isFilePattern: false
}
,
type: dataintegration.models.DataFormat.Type.Xml,
compressionConfig: {
codec: dataintegration.models.Compression.Codec.Lz4,
}
,
}
,
objectStatus: 312,
identifier: "EXAMPLE-identifier-Value"
}
const createEntityShapeRequest: dataintegration.requests.CreateEntityShapeRequest = {
workspaceId: "ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
connectionKey: "EXAMPLE-connectionKey-Value",
schemaResourceName: "EXAMPLE-schemaResourceName-Value",
createEntityShapeDetails: createEntityShapeDetails,
opcRequestId: "NL7ZJXPTARNF9U0VADWZ<unique_ID>",
opcRetryToken: "EXAMPLE-opcRetryToken-Value",
ifMatch: "EXAMPLE-ifMatch-Value",
};
// Send request to the Client.
const createEntityShapeResponse = await client.createEntityShape(createEntityShapeRequest);
}
catch (error) {
console.log("createEntityShape Failed with error " + error);
}
})();