// 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  createScheduleDetails = {
		displayName: "EXAMPLE-displayName-Value",
		description: "EXAMPLE-description-Value",
		projectId: "ocid1.test.oc1..<unique_ID>EXAMPLE-projectId-Value",
		compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
		trigger: {
			triggerType: "CRON",			cronExpression: "EXAMPLE-cronExpression-Value",
			timeStart: new Date("Mon Feb 17 12:54:39 UTC 2020"),
			timeEnd: new Date("Wed Oct 04 03:33:21 UTC 2023")

			}
,
		action: {
			actionType: "HTTP",			actionDetails: {
				httpActionType: "CREATE_PIPELINE_RUN",				createPipelineRunDetails: {
					projectId: "ocid1.test.oc1..<unique_ID>EXAMPLE-projectId-Value",
					compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
					pipelineId: "ocid1.test.oc1..<unique_ID>EXAMPLE-pipelineId-Value",
					displayName: "EXAMPLE-displayName-Value",
					configurationOverrideDetails: {
						type: "DEFAULT",						maximumRuntimeInMinutes: 35794,
						environmentVariables: {
							EXAMPLE_KEY_bzm9C :"EXAMPLE_VALUE_aLu1b8n8fTwVgtj4y7Qz"
							},
						commandLineArguments: "EXAMPLE-commandLineArguments-Value"

						}
,
					logConfigurationOverrideDetails: {
						enableLogging: false,
						enableAutoLogCreation: false,
						logGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
						logId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value",

						}
,
					infrastructureConfigurationOverrideDetails: {
						shapeName: "EXAMPLE-shapeName-Value",
						blockStorageSizeInGBs: 4045,
						subnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
						shapeConfigDetails: {
							ocpus: 14.248898,
							memoryInGBs: 694.2235,
							cpuBaseline: datascience.models.PipelineShapeConfigDetails.CpuBaseline.Baseline11,
							ocpusParameterized: "EXAMPLE-ocpusParameterized-Value",
							memoryInGBsParameterized: "EXAMPLE-memoryInGBsParameterized-Value",

							}
,
						blockStorageSizeInGBsParameterized: "EXAMPLE-blockStorageSizeInGBsParameterized-Value",

						}
,
					storageMountConfigurationOverrideDetailsList: [{
							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"

							}
							],
					parametersOverride: {
						EXAMPLE_KEY_W2Ijc :"EXAMPLE_VALUE_WvNhvsza3mS35Vq3HSAR"
						},
					stepOverrideDetails: [{
							stepName: "EXAMPLE-stepName-Value",
							stepConfigurationDetails: {
								maximumRuntimeInMinutes: 24028,
								environmentVariables: {
									EXAMPLE_KEY_WYJ5l :"EXAMPLE_VALUE_YTeSr2nQvMraDp6aIDPN"
									},
								commandLineArguments: "EXAMPLE-commandLineArguments-Value",

								}
,
							stepContainerConfigurationDetails: {
								containerType: "OCIR_CONTAINER",								image: "EXAMPLE-image-Value",
								cmd: ["EXAMPLE--Value"										],
								entrypoint: ["EXAMPLE--Value"										],
								imageDigest: "EXAMPLE-imageDigest-Value",
								imageSignatureId: "ocid1.test.oc1..<unique_ID>EXAMPLE-imageSignatureId-Value"

								}
,
							stepDataflowConfigurationDetails: {
								configuration: "EXAMPLE-configuration-Value",
								driverShape: "EXAMPLE-driverShape-Value",
								driverShapeConfigDetails: {
									ocpus: 2.7477188,
									memoryInGBs: 580.8858,
									cpuBaseline: datascience.models.PipelineShapeConfigDetails.CpuBaseline.Baseline18,
									ocpusParameterized: "EXAMPLE-ocpusParameterized-Value",
									memoryInGBsParameterized: "EXAMPLE-memoryInGBsParameterized-Value",

									}
,
								executorShape: "EXAMPLE-executorShape-Value",
								executorShapeConfigDetails: {
									ocpus: 22.715656,
									memoryInGBs: 658.8697,
									cpuBaseline: datascience.models.PipelineShapeConfigDetails.CpuBaseline.Baseline18,
									ocpusParameterized: "EXAMPLE-ocpusParameterized-Value",
									memoryInGBsParameterized: "EXAMPLE-memoryInGBsParameterized-Value",

									}
,
								numExecutors: 767,
								warehouseBucketUri: "EXAMPLE-warehouseBucketUri-Value",
								logsBucketUri: "EXAMPLE-logsBucketUri-Value",

								}
,
							stepInfrastructureConfigurationDetails: {
								shapeName: "EXAMPLE-shapeName-Value",
								blockStorageSizeInGBs: 8704,
								subnetId: "ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
								shapeConfigDetails: {
									ocpus: 10.857685,
									memoryInGBs: 597.4613,
									cpuBaseline: datascience.models.PipelineShapeConfigDetails.CpuBaseline.Baseline18,
									ocpusParameterized: "EXAMPLE-ocpusParameterized-Value",
									memoryInGBsParameterized: "EXAMPLE-memoryInGBsParameterized-Value",

									}
,
								blockStorageSizeInGBsParameterized: "EXAMPLE-blockStorageSizeInGBsParameterized-Value",

								}
,
							stepStorageMountConfigurationDetailsList: [{
									storageType: "OBJECT_STORAGE",									namespace: "EXAMPLE-namespace-Value",
									bucket: "EXAMPLE-bucket-Value",
									prefix: "EXAMPLE-prefix-Value",
									destinationDirectoryName: "EXAMPLE-destinationDirectoryName-Value",
									destinationPath: "EXAMPLE-destinationPath-Value"

									}
									],

							}
							],
					freeformTags: {
						EXAMPLE_KEY_F2bZ8 :"EXAMPLE_VALUE_dOSHrctIzv7V1cXJ4TUf"
						},
					definedTags: {
						EXAMPLE_KEY_H4yh3 :{
							EXAMPLE_KEY_0JaOy :"EXAMPLE--Value"
							}
						},
					systemTags: {
						EXAMPLE_KEY_DBtLW :{
							EXAMPLE_KEY_bWvBq :"EXAMPLE--Value"
							}
						},

					}


				}


			}
,
		logDetails: {
			logGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
			logId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value",

			}
,
		freeformTags: {
			EXAMPLE_KEY_MVNFA :"EXAMPLE_VALUE_6JCziKOhi0ufLxdJ0xbh"
			},
		definedTags: {
			EXAMPLE_KEY_M7O3O :{
				EXAMPLE_KEY_mXZSR :"EXAMPLE--Value"
				}
			},

		}

	const createScheduleRequest: datascience.requests.CreateScheduleRequest = { 
	createScheduleDetails: createScheduleDetails,
	opcRetryToken: "EXAMPLE-opcRetryToken-Value",
	opcRequestId: "POQVTS4DCKPO1CTIRYW0<unique_ID>",

		}; 


     // Send request to the Client.
     const createScheduleResponse = await client.createSchedule(createScheduleRequest);
     }
     catch (error) {
         console.log("createSchedule Failed with error  " + error);
     }
})();