// 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 createPipelineDetails = {
projectId: "ocid1.test.oc1..<unique_ID>EXAMPLE-projectId-Value",
compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
displayName: "EXAMPLE-displayName-Value",
description: "EXAMPLE-description-Value",
configurationDetails: {
type: "DEFAULT", maximumRuntimeInMinutes: 29414,
environmentVariables: {
EXAMPLE_KEY_zwWq1 :"EXAMPLE_VALUE_LhdDn3RFfWmRVrL57OJi"
},
commandLineArguments: "EXAMPLE-commandLineArguments-Value"
}
,
logConfigurationDetails: {
enableLogging: true,
enableAutoLogCreation: false,
logGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
logId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value",
}
,
infrastructureConfigurationDetails: {
shapeName: "EXAMPLE-shapeName-Value",
blockStorageSizeInGBs: 1974,
subnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
shapeConfigDetails: {
ocpus: 25.714687,
memoryInGBs: 754.92163,
cpuBaseline: datascience.models.PipelineShapeConfigDetails.CpuBaseline.Baseline12,
}
,
}
,
storageMountConfigurationDetailsList: [{
storageType: "OBJECT_STORAGE", namespace: "EXAMPLE-namespace-Value",
bucket: "EXAMPLE-bucket-Value",
prefix: "EXAMPLE-prefix-Value",
destinationDirectoryName: "EXAMPLE-destinationDirectoryName-Value",
destinationPath: "EXAMPLE-destinationPath-Value"
}
],
stepDetails: [{
stepType: "ML_JOB", jobId: "ocid1.test.oc1..<unique_ID>EXAMPLE-jobId-Value",
stepName: "EXAMPLE-stepName-Value",
description: "EXAMPLE-description-Value",
dependsOn: ["EXAMPLE--Value" ],
stepConfigurationDetails: {
maximumRuntimeInMinutes: 10486,
environmentVariables: {
EXAMPLE_KEY_YTt8x :"EXAMPLE_VALUE_Lsj2V5zBN1LUUY0WWbHp"
},
commandLineArguments: "EXAMPLE-commandLineArguments-Value",
}
}
],
freeformTags: {
EXAMPLE_KEY_Ge4SF :"EXAMPLE_VALUE_jwuRVxL7sRcBpLeJN0sU"
},
definedTags: {
EXAMPLE_KEY_xBOTX :{
EXAMPLE_KEY_xu3VZ :"EXAMPLE--Value"
}
},
}
const createPipelineRequest: datascience.requests.CreatePipelineRequest = {
createPipelineDetails: createPipelineDetails,
opcRetryToken: "EXAMPLE-opcRetryToken-Value",
opcRequestId: "HFTK4ESCRTBB6ZGJOH0V<unique_ID>",
};
// Send request to the Client.
const createPipelineResponse = await client.createPipeline(createPipelineRequest);
}
catch (error) {
console.log("createPipeline Failed with error " + error);
}
})();