// 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  createJobRunDetails = {
		projectId: "ocid1.test.oc1..<unique_ID>EXAMPLE-projectId-Value",
		compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
		displayName: "EXAMPLE-displayName-Value",
		jobId: "ocid1.test.oc1..<unique_ID>EXAMPLE-jobId-Value",
		jobConfigurationOverrideDetails: {
			jobType: "DEFAULT",			environmentVariables: {
				EXAMPLE_KEY_pRgBG :"EXAMPLE_VALUE_nfNgU16Amz4NLlCbwhDz"
				},
			commandLineArguments: "EXAMPLE-commandLineArguments-Value",
			maximumRuntimeInMinutes: 15530,
			startupProbeDetails: {
				jobProbeCheckType: "EXEC",				command: ["EXAMPLE--Value"						],
				periodInSeconds: 733,
				failureThreshold: 606,
				initialDelayInSeconds: 914

				}


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

			}
,
		jobEnvironmentConfigurationOverrideDetails: {
			jobEnvironmentType: "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"

			}
,
		jobInfrastructureConfigurationOverrideDetails: {
			jobInfrastructureType: "ME_STANDALONE",			shapeName: "EXAMPLE-shapeName-Value",
			blockStorageSizeInGBs: 8248,
			jobShapeConfigDetails: {
				ocpus: 4.6994553,
				memoryInGBs: 793.4493,
				cpuBaseline: datascience.models.JobShapeConfigDetails.CpuBaseline.Baseline12,

				}


			}
,
		jobNodeConfigurationOverrideDetails: {
			jobNodeType: "MULTI_NODE",			startupOrder: datascience.models.MultiNodeJobNodeConfigurationDetails.StartupOrder.InOrder,
			maximumRuntimeInMinutes: 16327,
			jobNetworkConfiguration: {
				jobNetworkType: "DEFAULT_NETWORK",
				}
,
			jobNodeGroupConfigurationDetailsList: [{
					name: "EXAMPLE-name-Value",
					replicas: 70,
					minimumSuccessReplicas: 994,
					jobInfrastructureConfigurationDetails: {
						jobInfrastructureType: "EMPTY",
						}
,
					jobConfigurationDetails: {
						jobType: "DEFAULT",						environmentVariables: {
							EXAMPLE_KEY_HRfos :"EXAMPLE_VALUE_Qj5O8SWDhP4tLTq1YDwR"
							},
						commandLineArguments: "EXAMPLE-commandLineArguments-Value",
						maximumRuntimeInMinutes: 13811,
						startupProbeDetails: {
							jobProbeCheckType: "EXEC",							command: ["EXAMPLE--Value"									],
							periodInSeconds: 357,
							failureThreshold: 464,
							initialDelayInSeconds: 517

							}


						}
,
					jobEnvironmentConfigurationDetails: {
						jobEnvironmentType: "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"

						}
,

					}
					]

			}
,
		freeformTags: {
			EXAMPLE_KEY_rxQ8x :"EXAMPLE_VALUE_V7exkxbEMkZiYNQlKi95"
			},
		definedTags: {
			EXAMPLE_KEY_oADM5 :{
				EXAMPLE_KEY_jgQxA :"EXAMPLE--Value"
				}
			},

		}

	const createJobRunRequest: datascience.requests.CreateJobRunRequest = { 
	createJobRunDetails: createJobRunDetails,
	opcRequestId: "1WOT6ULCTII5ABHPA1DE<unique_ID>",
	opcRetryToken: "EXAMPLE-opcRetryToken-Value",
	opcParentRptUrl: "EXAMPLE-opcParentRptUrl-Value",

		}; 


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