// 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: 11502,
environmentVariables: {
EXAMPLE_KEY_oGs4n :"EXAMPLE_VALUE_Gb2PKj3OonrGzDOGMkR8"
},
commandLineArguments: "EXAMPLE-commandLineArguments-Value"
}
,
logConfigurationDetails: {
enableLogging: false,
enableAutoLogCreation: true,
logGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
logId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value",
}
,
infrastructureConfigurationDetails: {
shapeName: "EXAMPLE-shapeName-Value",
blockStorageSizeInGBs: 3960,
subnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
shapeConfigDetails: {
ocpus: 38.961185,
memoryInGBs: 963.96735,
cpuBaseline: datascience.models.PipelineShapeConfigDetails.CpuBaseline.Baseline18,
ocpusParameterized: "EXAMPLE-ocpusParameterized-Value",
memoryInGBsParameterized: "EXAMPLE-memoryInGBsParameterized-Value",
}
,
blockStorageSizeInGBsParameterized: "EXAMPLE-blockStorageSizeInGBsParameterized-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"
}
],
parameters: {
EXAMPLE_KEY_sqycS :"EXAMPLE_VALUE_xKxKO7ee2UFdEyPOkkjO"
},
stepDetails: [{
stepType: "ML_JOB", jobId: "ocid1.test.oc1..<unique_ID>EXAMPLE-jobId-Value",
stepRunName: "EXAMPLE-stepRunName-Value",
stepParameters: {
parameterType: "DEFAULT", output: {
outputParameterType: "JSON", parameterNames: ["EXAMPLE--Value" ],
outputFile: "EXAMPLE-outputFile-Value"
}
}
,
stepName: "EXAMPLE-stepName-Value",
description: "EXAMPLE-description-Value",
dependsOn: ["EXAMPLE--Value" ],
stepConfigurationDetails: {
maximumRuntimeInMinutes: 38176,
environmentVariables: {
EXAMPLE_KEY_0kyML :"EXAMPLE_VALUE_crs6hlUzMPxyKI3scZ0N"
},
commandLineArguments: "EXAMPLE-commandLineArguments-Value",
}
}
],
freeformTags: {
EXAMPLE_KEY_9jgtn :"EXAMPLE_VALUE_6HY2UkhWw6fWd5V4cBfC"
},
definedTags: {
EXAMPLE_KEY_tHQeU :{
EXAMPLE_KEY_navSq :"EXAMPLE--Value"
}
},
}
const createPipelineRequest: datascience.requests.CreatePipelineRequest = {
createPipelineDetails: createPipelineDetails,
opcRetryToken: "EXAMPLE-opcRetryToken-Value",
opcRequestId: "OEEMMCL6CIOAFTXCWNEZ<unique_ID>",
};
// Send request to the Client.
const createPipelineResponse = await client.createPipeline(createPipelineRequest);
}
catch (error) {
console.log("createPipeline Failed with error " + error);
}
})();