Class JobDefinition

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.batch.JobDefinition
All Implemented Interfaces:
IConstruct, IDependable, IResource, IJobDefinition, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:47.661Z") @Stability(Experimental) public class JobDefinition extends Resource implements IJobDefinition
(experimental) Batch Job Definition.

Defines a batch job definition to execute a specific batch job.

Example:

 import software.amazon.awscdk.services.ecr.*;
 IRepository repo = Repository.fromRepositoryName(this, "batch-job-repo", "todo-list");
 JobDefinition.Builder.create(this, "batch-job-def-from-ecr")
         .container(JobDefinitionContainer.builder()
                 .image(new EcrImage(repo, "latest"))
                 .build())
         .build();
 
  • Constructor Details

    • JobDefinition

      protected JobDefinition(software.amazon.jsii.JsiiObjectRef objRef)
    • JobDefinition

      protected JobDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • JobDefinition

      @Stability(Experimental) public JobDefinition(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull JobDefinitionProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromJobDefinitionArn

      @Stability(Experimental) @NotNull public static IJobDefinition fromJobDefinitionArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String jobDefinitionArn)
      (experimental) Imports an existing batch job definition by its amazon resource name.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      jobDefinitionArn - This parameter is required.
    • fromJobDefinitionName

      @Stability(Experimental) @NotNull public static IJobDefinition fromJobDefinitionName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String jobDefinitionName)
      (experimental) Imports an existing batch job definition by its name.

      If name is specified without a revision then the latest active revision is used.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      jobDefinitionName - This parameter is required.
    • getJobDefinitionArn

      @Stability(Experimental) @NotNull public String getJobDefinitionArn()
      (experimental) The ARN of this batch job definition.
      Specified by:
      getJobDefinitionArn in interface IJobDefinition
    • getJobDefinitionName

      @Stability(Experimental) @NotNull public String getJobDefinitionName()
      (experimental) The name of the batch job definition.
      Specified by:
      getJobDefinitionName in interface IJobDefinition