// 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).

package main

import (
	"context"
	"fmt"

	"github.com/oracle/oci-go-sdk/v65/common"
	"github.com/oracle/oci-go-sdk/v65/datascience"
	"github.com/oracle/oci-go-sdk/v65/example/helpers"
)

func ExampleCreateJob() {
	// 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.
	client, err := datascience.NewDataScienceClientWithConfigurationProvider(common.DefaultConfigProvider())
	helpers.FatalIfError(err)

	// Create a request and dependent object(s).

	req := datascience.CreateJobRequest{OpcRetryToken: common.String("EXAMPLE-opcRetryToken-Value"),
		CreateJobDetails: datascience.CreateJobDetails{CompartmentId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value"),
			DefinedTags:             map[string]map[string]interface{}{"EXAMPLE_KEY_3IRa0": map[string]interface{}{"EXAMPLE_KEY_A7Tzv": "EXAMPLE--Value"}},
			Description:             common.String("EXAMPLE-description-Value"),
			DisplayName:             common.String("EXAMPLE-displayName-Value"),
			FreeformTags:            map[string]string{"EXAMPLE_KEY_Ec2eO": "EXAMPLE_VALUE_CwAiQqyapmBGKqRHflaq"},
			JobConfigurationDetails: datascience.EmptyJobConfigurationDetails{},
			JobEnvironmentConfigurationDetails: datascience.OcirContainerJobEnvironmentConfigurationDetails{Cmd: []string{"EXAMPLE--Value"},
				Entrypoint:       []string{"EXAMPLE--Value"},
				Image:            common.String("EXAMPLE-image-Value"),
				ImageDigest:      common.String("EXAMPLE-imageDigest-Value"),
				ImageSignatureId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-imageSignatureId-Value")},
			JobLogConfigurationDetails: &datascience.JobLogConfigurationDetails{LogGroupId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value"),
				LogId:                 common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value"),
				EnableAutoLogCreation: common.Bool(true),
				EnableLogging:         common.Bool(true)},
			JobInfrastructureConfigurationDetails: datascience.MultiNodeJobInfrastructureConfigurationDetails{JobShapeConfigDetails: &datascience.JobShapeConfigDetails{CpuBaseline: datascience.JobShapeConfigDetailsCpuBaseline8,
				MemoryInGBs: common.Float32(607.2183),
				Ocpus:       common.Float32(59.173466)},
				ShapeName:             common.String("EXAMPLE-shapeName-Value"),
				BlockStorageSizeInGBs: common.Int(8112)},
			JobNodeConfigurationDetails: datascience.MultiNodeJobNodeConfigurationDetails{JobNetworkConfiguration: datascience.JobDefaultNetworkConfiguration{},
				JobNodeGroupConfigurationDetailsList: []datascience.JobNodeGroupConfigurationDetails{datascience.JobNodeGroupConfigurationDetails{JobEnvironmentConfigurationDetails: datascience.OcirContainerJobEnvironmentConfigurationDetails{ImageDigest: common.String("EXAMPLE-imageDigest-Value"),
					ImageSignatureId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-imageSignatureId-Value"),
					Cmd:              []string{"EXAMPLE--Value"},
					Entrypoint:       []string{"EXAMPLE--Value"},
					Image:            common.String("EXAMPLE-image-Value")},
					JobInfrastructureConfigurationDetails: datascience.MultiNodeJobInfrastructureConfigurationDetails{BlockStorageSizeInGBs: common.Int(4325),
						JobShapeConfigDetails: &datascience.JobShapeConfigDetails{CpuBaseline: datascience.JobShapeConfigDetailsCpuBaseline2,
							MemoryInGBs: common.Float32(333.17535),
							Ocpus:       common.Float32(17.678482)},
						ShapeName: common.String("EXAMPLE-shapeName-Value")},
					MinimumSuccessReplicas: common.Int(472),
					Name:                   common.String("EXAMPLE-name-Value"),
					Replicas:               common.Int(154),
					JobConfigurationDetails: datascience.DefaultJobConfigurationDetails{CommandLineArguments: common.String("EXAMPLE-commandLineArguments-Value"),
						EnvironmentVariables:    map[string]string{"EXAMPLE_KEY_47ZLZ": "EXAMPLE_VALUE_UAFCn42VllZPTZZye1U3"},
						MaximumRuntimeInMinutes: common.Int64(22973),
						StartupProbeDetails: datascience.JobExecProbeDetails{PeriodInSeconds: common.Int(749),
							Command:               []string{"EXAMPLE--Value"},
							FailureThreshold:      common.Int(596),
							InitialDelayInSeconds: common.Int(362)}}}},
				MaximumRuntimeInMinutes: common.Int64(41172),
				StartupOrder:            datascience.MultiNodeJobNodeConfigurationDetailsStartupOrderOrder},
			JobStorageMountConfigurationDetailsList: []datascience.StorageMountConfigurationDetails{datascience.ObjectStorageMountConfigurationDetails{Bucket: common.String("EXAMPLE-bucket-Value"),
				DestinationDirectoryName: common.String("EXAMPLE-destinationDirectoryName-Value"),
				DestinationPath:          common.String("EXAMPLE-destinationPath-Value"),
				Namespace:                common.String("EXAMPLE-namespace-Value"),
				Prefix:                   common.String("EXAMPLE-prefix-Value")}},
			ProjectId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-projectId-Value")},
		OpcRequestId: common.String("TTGSMCTSKUOEPBT5TNM7<unique_ID>")}

	// Send the request using the service client
	resp, err := client.CreateJob(context.Background(), req)
	helpers.FatalIfError(err)

	// Retrieve value from the response.
	fmt.Println(resp)
}