// 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 datascience from "oci-datascience";
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 datascience.DataScienceClient({ authenticationDetailsProvider: provider });
// Create a request and dependent object(s).
const updatePipelineDetails = {
displayName: "EXAMPLE-displayName-Value",
description: "EXAMPLE-description-Value",
configurationDetails: {
type: "DEFAULT", maximumRuntimeInMinutes: 3672,
environmentVariables: {
EXAMPLE_KEY_o2bjS :"EXAMPLE_VALUE_J4z33VZH3uWMSYE9zYLg"
},
commandLineArguments: "EXAMPLE-commandLineArguments-Value"
}
,
infrastructureConfigurationDetails: {
shapeName: "EXAMPLE-shapeName-Value",
blockStorageSizeInGBs: 5250,
subnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
shapeConfigDetails: {
ocpus: 41.242447,
memoryInGBs: 216.18304,
cpuBaseline: datascience.models.PipelineShapeConfigDetails.CpuBaseline.Baseline11,
ocpusParameterized: "EXAMPLE-ocpusParameterized-Value",
memoryInGBsParameterized: "EXAMPLE-memoryInGBsParameterized-Value",
}
,
blockStorageSizeInGBsParameterized: "EXAMPLE-blockStorageSizeInGBsParameterized-Value",
}
,
logConfigurationDetails: {
enableLogging: true,
enableAutoLogCreation: false,
logGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
logId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value",
}
,
storageMountConfigurationDetailsList: [{
storageType: "FILE_STORAGE", mountTargetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-mountTargetId-Value",
exportId: "ocid1.test.oc1..<unique_ID>EXAMPLE-exportId-Value",
destinationDirectoryName: "EXAMPLE-destinationDirectoryName-Value",
destinationPath: "EXAMPLE-destinationPath-Value"
}
],
stepDetails: [{
stepType: "DATAFLOW", stepDataflowConfigurationDetails: {
configuration: "EXAMPLE-configuration-Value",
driverShape: "EXAMPLE-driverShape-Value",
driverShapeConfigDetails: {
ocpus: 8.007076,
memoryInGBs: 967.08026,
cpuBaseline: datascience.models.PipelineShapeConfigDetails.CpuBaseline.Baseline12,
ocpusParameterized: "EXAMPLE-ocpusParameterized-Value",
memoryInGBsParameterized: "EXAMPLE-memoryInGBsParameterized-Value",
}
,
executorShape: "EXAMPLE-executorShape-Value",
executorShapeConfigDetails: {
ocpus: 17.184235,
memoryInGBs: 993.60675,
cpuBaseline: datascience.models.PipelineShapeConfigDetails.CpuBaseline.Baseline11,
ocpusParameterized: "EXAMPLE-ocpusParameterized-Value",
memoryInGBsParameterized: "EXAMPLE-memoryInGBsParameterized-Value",
}
,
numExecutors: 209,
warehouseBucketUri: "EXAMPLE-warehouseBucketUri-Value",
logsBucketUri: "EXAMPLE-logsBucketUri-Value",
}
,
stepName: "EXAMPLE-stepName-Value",
description: "EXAMPLE-description-Value",
stepConfigurationDetails: {
maximumRuntimeInMinutes: 18776,
environmentVariables: {
EXAMPLE_KEY_rZTtY :"EXAMPLE_VALUE_i3iS86tqqiCm6x6uVnoe"
},
commandLineArguments: "EXAMPLE-commandLineArguments-Value",
}
}
],
parameters: {
EXAMPLE_KEY_6SIun :"EXAMPLE_VALUE_c0R2gorX03GHKFfCgiRv"
},
freeformTags: {
EXAMPLE_KEY_QYOgq :"EXAMPLE_VALUE_JVuFq2KVPPBgUuuAmNv6"
},
definedTags: {
EXAMPLE_KEY_251T6 :{
EXAMPLE_KEY_jE8lV :"EXAMPLE--Value"
}
},
}
const updatePipelineRequest: datascience.requests.UpdatePipelineRequest = {
pipelineId: "ocid1.test.oc1..<unique_ID>EXAMPLE-pipelineId-Value",
updatePipelineDetails: updatePipelineDetails,
ifMatch: "EXAMPLE-ifMatch-Value",
opcRequestId: "ZJ1K446G6AMAJOM4T6TI<unique_ID>",
};
// Send request to the Client.
const updatePipelineResponse = await client.updatePipeline(updatePipelineRequest);
}
catch (error) {
console.log("updatePipeline Failed with error " + error);
}
})();