import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Job resource in Oracle Cloud Infrastructure Data Science service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/data-science/latest/Job * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/datascience * * Creates a job. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testJob = new oci.datascience.Job("test_job", { * compartmentId: compartmentId, * projectId: testProject.id, * definedTags: { * "Operations.CostCenter": "42", * }, * description: jobDescription, * displayName: jobDisplayName, * freeformTags: { * Department: "Finance", * }, * jobConfigurationDetails: { * jobType: jobJobConfigurationDetailsJobType, * commandLineArguments: jobJobConfigurationDetailsCommandLineArguments, * environmentVariables: jobJobConfigurationDetailsEnvironmentVariables, * maximumRuntimeInMinutes: jobJobConfigurationDetailsMaximumRuntimeInMinutes, * startupProbeDetails: { * commands: jobJobConfigurationDetailsStartupProbeDetailsCommand, * jobProbeCheckType: jobJobConfigurationDetailsStartupProbeDetailsJobProbeCheckType, * cpuBaseline: jobJobInfrastructureConfigurationDetailsJobShapeConfigDetailsCpuBaseline, * failureThreshold: Number(jobJobConfigurationDetailsStartupProbeDetailsFailureThreshold), * initialDelayInSeconds: Number(jobJobConfigurationDetailsStartupProbeDetailsInitialDelayInSeconds), * memoryInGbs: jobJobInfrastructureConfigurationDetailsJobShapeConfigDetailsMemoryInGbs, * ocpus: jobJobInfrastructureConfigurationDetailsJobShapeConfigDetailsOcpus, * periodInSeconds: Number(jobJobConfigurationDetailsStartupProbeDetailsPeriodInSeconds), * }, * }, * jobEnvironmentConfigurationDetails: { * image: jobJobEnvironmentConfigurationDetailsImage, * jobEnvironmentType: jobJobEnvironmentConfigurationDetailsJobEnvironmentType, * cmds: jobJobEnvironmentConfigurationDetailsCmd, * entrypoints: jobJobEnvironmentConfigurationDetailsEntrypoint, * imageDigest: jobJobEnvironmentConfigurationDetailsImageDigest, * imageSignatureId: testImageSignature.id, * }, * jobInfrastructureConfigurationDetails: { * jobInfrastructureType: jobJobInfrastructureConfigurationDetailsJobInfrastructureType, * blockStorageSizeInGbs: Number(jobJobInfrastructureConfigurationDetailsBlockStorageSizeInGbs), * computeTargetId: testComputeTarget.id, * jobShapeConfigDetails: { * memoryInGbs: jobJobInfrastructureConfigurationDetailsJobShapeConfigDetailsMemoryInGbs, * ocpus: jobJobInfrastructureConfigurationDetailsJobShapeConfigDetailsOcpus, * }, * resourceConfiguration: { * resourceLimitConfiguration: { * memoryInGbs: jobJobInfrastructureConfigurationDetailsResourceConfigurationResourceLimitConfigurationMemoryInGbs, * ocpus: jobJobInfrastructureConfigurationDetailsResourceConfigurationResourceLimitConfigurationOcpus, * }, * resourceRequestConfiguration: { * gpus: Number(jobJobInfrastructureConfigurationDetailsResourceConfigurationResourceRequestConfigurationGpus), * memoryInGbs: jobJobInfrastructureConfigurationDetailsResourceConfigurationResourceRequestConfigurationMemoryInGbs, * ocpus: jobJobInfrastructureConfigurationDetailsResourceConfigurationResourceRequestConfigurationOcpus, * }, * }, * shapeName: testShape.name, * subnetId: testSubnet.id, * }, * jobLogConfigurationDetails: { * enableAutoLogCreation: jobJobLogConfigurationDetailsEnableAutoLogCreation === "true", * enableLogging: jobJobLogConfigurationDetailsEnableLogging === "true", * logGroupId: testLogGroup.id, * logId: testLog.id, * }, * jobNodeConfigurationDetails: { * jobNodeType: jobJobNodeConfigurationDetailsJobNodeType, * jobNetworkConfiguration: { * jobNetworkType: jobJobNodeConfigurationDetailsJobNetworkConfigurationJobNetworkType, * subnetId: testSubnet.id, * }, * jobNodeGroupConfigurationDetailsLists: [{ * name: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListName, * jobConfigurationDetails: { * jobType: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsJobType, * commandLineArguments: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsCommandLineArguments, * environmentVariables: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsEnvironmentVariables, * maximumRuntimeInMinutes: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsMaximumRuntimeInMinutes, * startupProbeDetails: { * commands: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsStartupProbeDetailsCommand, * jobProbeCheckType: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsStartupProbeDetailsJobProbeCheckType, * failureThreshold: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsStartupProbeDetailsFailureThreshold), * initialDelayInSeconds: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsStartupProbeDetailsInitialDelayInSeconds), * periodInSeconds: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsStartupProbeDetailsPeriodInSeconds), * }, * }, * jobEnvironmentConfigurationDetails: { * image: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobEnvironmentConfigurationDetailsImage, * jobEnvironmentType: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobEnvironmentConfigurationDetailsJobEnvironmentType, * cmds: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobEnvironmentConfigurationDetailsCmd, * entrypoints: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobEnvironmentConfigurationDetailsEntrypoint, * imageDigest: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobEnvironmentConfigurationDetailsImageDigest, * imageSignatureId: testImageSignature.id, * }, * jobInfrastructureConfigurationDetails: { * jobInfrastructureType: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsJobInfrastructureType, * blockStorageSizeInGbs: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsBlockStorageSizeInGbs), * computeTargetId: testComputeTarget.id, * jobShapeConfigDetails: { * memoryInGbs: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsJobShapeConfigDetailsMemoryInGbs, * ocpus: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsJobShapeConfigDetailsOcpus, * }, * resourceConfiguration: { * resourceLimitConfiguration: { * memoryInGbs: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsResourceConfigurationResourceLimitConfigurationMemoryInGbs, * ocpus: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsResourceConfigurationResourceLimitConfigurationOcpus, * }, * resourceRequestConfiguration: { * gpus: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsResourceConfigurationResourceRequestConfigurationGpus), * memoryInGbs: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsResourceConfigurationResourceRequestConfigurationMemoryInGbs, * ocpus: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsResourceConfigurationResourceRequestConfigurationOcpus, * }, * }, * shapeName: testShape.name, * subnetId: testSubnet.id, * }, * minimumSuccessReplicas: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListMinimumSuccessReplicas), * replicas: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListReplicas), * }], * maximumRuntimeInMinutes: jobJobNodeConfigurationDetailsMaximumRuntimeInMinutes, * startupOrder: jobJobNodeConfigurationDetailsStartupOrder, * }, * jobStorageMountConfigurationDetailsLists: [{ * destinationDirectoryName: jobJobStorageMountConfigurationDetailsListDestinationDirectoryName, * storageType: jobJobStorageMountConfigurationDetailsListStorageType, * bucket: jobJobStorageMountConfigurationDetailsListBucket, * destinationPath: jobJobStorageMountConfigurationDetailsListDestinationPath, * exportId: testExport.id, * mountTargetId: testMountTarget.id, * namespace: jobJobStorageMountConfigurationDetailsListNamespace, * prefix: jobJobStorageMountConfigurationDetailsListPrefix, * }], * }); * ``` * * ## Import * * Jobs can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:DataScience/job:Job test_job "id" * ``` */ export declare class Job extends pulumi.CustomResource { /** * Get an existing Job resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: JobState, opts?: pulumi.CustomResourceOptions): Job; /** * Returns true if the given object is an instance of Job. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Job; /** * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents while downloading the file. Example: `attachment; filename=job-artifact.py` */ readonly artifactContentDisposition: pulumi.Output; /** * The content length of the body. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ readonly artifactContentLength: pulumi.Output; readonly artifactContentMd5: pulumi.Output; readonly artifactLastModified: pulumi.Output; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. */ readonly compartmentId: pulumi.Output; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the project. */ readonly createdBy: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) Delete all related JobRuns upon deletion of the Job. */ readonly deleteRelatedJobRuns: pulumi.Output; /** * (Updatable) A short description of the job. */ readonly description: pulumi.Output; /** * (Updatable) A user-friendly display name for the resource. */ readonly displayName: pulumi.Output; readonly emptyArtifact: pulumi.Output; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The job artifact to upload. This can be done in a separate step or from cli/sdk. The Job will remain in "Creating" state until its artifact is uploaded. */ readonly jobArtifact: pulumi.Output; /** * The job configuration details */ readonly jobConfigurationDetails: pulumi.Output; /** * Environment configuration to capture job runtime dependencies. */ readonly jobEnvironmentConfigurationDetails: pulumi.Output; /** * (Updatable) The job infrastructure configuration details (shape, block storage, etc.) */ readonly jobInfrastructureConfigurationDetails: pulumi.Output; /** * Logging configuration for resource. */ readonly jobLogConfigurationDetails: pulumi.Output; /** * The job node configuration details */ readonly jobNodeConfigurationDetails: pulumi.Output; /** * (Updatable) Collection of JobStorageMountConfigurationDetails. */ readonly jobStorageMountConfigurationDetailsLists: pulumi.Output; /** * The state of the job. */ readonly lifecycleDetails: pulumi.Output; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. */ readonly projectId: pulumi.Output; /** * The state of the job. */ readonly state: pulumi.Output; /** * The date and time the resource was created in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: 2020-08-06T21:10:29.41Z */ readonly timeCreated: pulumi.Output; /** * Create a Job resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: JobArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Job resources. */ export interface JobState { /** * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents while downloading the file. Example: `attachment; filename=job-artifact.py` */ artifactContentDisposition?: pulumi.Input; /** * The content length of the body. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ artifactContentLength?: pulumi.Input; artifactContentMd5?: pulumi.Input; artifactLastModified?: pulumi.Input; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. */ compartmentId?: pulumi.Input; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the project. */ createdBy?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Delete all related JobRuns upon deletion of the Job. */ deleteRelatedJobRuns?: pulumi.Input; /** * (Updatable) A short description of the job. */ description?: pulumi.Input; /** * (Updatable) A user-friendly display name for the resource. */ displayName?: pulumi.Input; emptyArtifact?: pulumi.Input; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The job artifact to upload. This can be done in a separate step or from cli/sdk. The Job will remain in "Creating" state until its artifact is uploaded. */ jobArtifact?: pulumi.Input; /** * The job configuration details */ jobConfigurationDetails?: pulumi.Input; /** * Environment configuration to capture job runtime dependencies. */ jobEnvironmentConfigurationDetails?: pulumi.Input; /** * (Updatable) The job infrastructure configuration details (shape, block storage, etc.) */ jobInfrastructureConfigurationDetails?: pulumi.Input; /** * Logging configuration for resource. */ jobLogConfigurationDetails?: pulumi.Input; /** * The job node configuration details */ jobNodeConfigurationDetails?: pulumi.Input; /** * (Updatable) Collection of JobStorageMountConfigurationDetails. */ jobStorageMountConfigurationDetailsLists?: pulumi.Input[] | undefined>; /** * The state of the job. */ lifecycleDetails?: pulumi.Input; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. */ projectId?: pulumi.Input; /** * The state of the job. */ state?: pulumi.Input; /** * The date and time the resource was created in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: 2020-08-06T21:10:29.41Z */ timeCreated?: pulumi.Input; } /** * The set of arguments for constructing a Job resource. */ export interface JobArgs { /** * This header allows you to specify a filename during upload. This file name is used to dispose of the file contents while downloading the file. Example: `attachment; filename=job-artifact.py` */ artifactContentDisposition?: pulumi.Input; /** * The content length of the body. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ artifactContentLength?: pulumi.Input; /** * (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment where you want to create the job. */ compartmentId: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Delete all related JobRuns upon deletion of the Job. */ deleteRelatedJobRuns?: pulumi.Input; /** * (Updatable) A short description of the job. */ description?: pulumi.Input; /** * (Updatable) A user-friendly display name for the resource. */ displayName?: pulumi.Input; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The job artifact to upload. This can be done in a separate step or from cli/sdk. The Job will remain in "Creating" state until its artifact is uploaded. */ jobArtifact?: pulumi.Input; /** * The job configuration details */ jobConfigurationDetails?: pulumi.Input; /** * Environment configuration to capture job runtime dependencies. */ jobEnvironmentConfigurationDetails?: pulumi.Input; /** * (Updatable) The job infrastructure configuration details (shape, block storage, etc.) */ jobInfrastructureConfigurationDetails?: pulumi.Input; /** * Logging configuration for resource. */ jobLogConfigurationDetails?: pulumi.Input; /** * The job node configuration details */ jobNodeConfigurationDetails?: pulumi.Input; /** * (Updatable) Collection of JobStorageMountConfigurationDetails. */ jobStorageMountConfigurationDetailsLists?: pulumi.Input[] | undefined>; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate the job with. */ projectId: pulumi.Input; } //# sourceMappingURL=job.d.ts.map