// 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: "ICAL",			recurrence: "EXAMPLE-recurrence-Value",
			timeStart: new Date("Wed Aug 09 05:25:40 UTC 2034"),
			timeEnd: new Date("Sat Aug 15 07:48:27 UTC 2009")

			}
,
		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: 6851,
						environmentVariables: {
							EXAMPLE_KEY_s6dRg :"EXAMPLE_VALUE_cn2TKNBgHYpjiY7m5wa4"
							},
						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",

						}
,
					stepOverrideDetails: [{
							stepName: "EXAMPLE-stepName-Value",
							stepConfigurationDetails: {
								maximumRuntimeInMinutes: 10763,
								environmentVariables: {
									EXAMPLE_KEY_OeG8D :"EXAMPLE_VALUE_d6dKqCqYFKmuXiqtYEVs"
									},
								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: 5.24028,
									memoryInGBs: 634.0057,

									}
,
								executorShape: "EXAMPLE-executorShape-Value",
								executorShapeConfigDetails: {
									ocpus: 34.456715,
									memoryInGBs: 253.07465,

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

								}
,

							}
							],
					freeformTags: {
						EXAMPLE_KEY_CzAY4 :"EXAMPLE_VALUE_PLyZi0zpxCMZ81Yfmd76"
						},
					definedTags: {
						EXAMPLE_KEY_A24sX :{
							EXAMPLE_KEY_8tWZ2 :"EXAMPLE--Value"
							}
						},
					systemTags: {
						EXAMPLE_KEY_1IPHZ :{
							EXAMPLE_KEY_6kqzo :"EXAMPLE--Value"
							}
						},

					}


				}


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

			}
,
		freeformTags: {
			EXAMPLE_KEY_MtzNA :"EXAMPLE_VALUE_qOP99PpCbet3xYeKBco2"
			},
		definedTags: {
			EXAMPLE_KEY_VoK8P :{
				EXAMPLE_KEY_MuJOh :"EXAMPLE--Value"
				}
			},

		}

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

		}; 


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