// 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: 17726,
environmentVariables: {
EXAMPLE_KEY_XhEZO :"EXAMPLE_VALUE_ozHRuVwXG66b3OWbCwTX"
},
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: 9465,
subnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
shapeConfigDetails: {
ocpus: 22.355331,
memoryInGBs: 378.40643,
cpuBaseline: datascience.models.PipelineShapeConfigDetails.CpuBaseline.Baseline12,
ocpusParameterized: "EXAMPLE-ocpusParameterized-Value",
memoryInGBsParameterized: "EXAMPLE-memoryInGBsParameterized-Value",
}
,
blockStorageSizeInGBsParameterized: "EXAMPLE-blockStorageSizeInGBsParameterized-Value",
}
,
storageMountConfigurationDetailsList: [{
storageType: "OBJECT_STORAGE", namespace: "EXAMPLE-namespace-Value",
bucket: "EXAMPLE-bucket-Value",
prefix: "EXAMPLE-prefix-Value",
destinationDirectoryName: "EXAMPLE-destinationDirectoryName-Value",
destinationPath: "EXAMPLE-destinationPath-Value"
}
],
parameters: {
EXAMPLE_KEY_BiDyk :"EXAMPLE_VALUE_kU4i9YsJaGl6FiLNfsSL"
},
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: 42724,
environmentVariables: {
EXAMPLE_KEY_oNKDQ :"EXAMPLE_VALUE_GUyD8KSw1wJHUOMT4feO"
},
commandLineArguments: "EXAMPLE-commandLineArguments-Value",
}
}
],
freeformTags: {
EXAMPLE_KEY_HOR4F :"EXAMPLE_VALUE_VYka0sWZ9UzIa9MnvP6d"
},
definedTags: {
EXAMPLE_KEY_6mbcL :{
EXAMPLE_KEY_4EBIu :"EXAMPLE--Value"
}
},
}
const createPipelineRequest: datascience.requests.CreatePipelineRequest = {
createPipelineDetails: createPipelineDetails,
opcRetryToken: "EXAMPLE-opcRetryToken-Value",
opcRequestId: "GKHT7OFXVYCYR0Z6TTHZ<unique_ID>",
};
// Send request to the Client.
const createPipelineResponse = await client.createPipeline(createPipelineRequest);
}
catch (error) {
console.log("createPipeline Failed with error " + error);
}
})();