Interface JobDetail.Builder

All Superinterfaces:
Buildable, CopyableBuilder<JobDetail.Builder,JobDetail>, SdkBuilder<JobDetail.Builder,JobDetail>, SdkPojo
Enclosing class:
JobDetail

public static interface JobDetail.Builder extends SdkPojo, CopyableBuilder<JobDetail.Builder,JobDetail>
  • Method Details

    • jobArn

      JobDetail.Builder jobArn(String jobArn)

      The Amazon Resource Name (ARN) of the job.

      Parameters:
      jobArn - The Amazon Resource Name (ARN) of the job.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • jobName

      JobDetail.Builder jobName(String jobName)

      The job name.

      Parameters:
      jobName - The job name.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • jobId

      JobDetail.Builder jobId(String jobId)

      The job ID.

      Parameters:
      jobId - The job ID.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • jobQueue

      JobDetail.Builder jobQueue(String jobQueue)

      The Amazon Resource Name (ARN) of the job queue that the job is associated with.

      Parameters:
      jobQueue - The Amazon Resource Name (ARN) of the job queue that the job is associated with.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • status

      JobDetail.Builder status(String status)

      The current status for the job.

      If your jobs don't progress to STARTING, see Jobs stuck in RUNNABLE status in the troubleshooting section of the Batch User Guide.

      Parameters:
      status - The current status for the job.

      If your jobs don't progress to STARTING, see Jobs stuck in RUNNABLE status in the troubleshooting section of the Batch User Guide.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      JobDetail.Builder status(JobStatus status)

      The current status for the job.

      If your jobs don't progress to STARTING, see Jobs stuck in RUNNABLE status in the troubleshooting section of the Batch User Guide.

      Parameters:
      status - The current status for the job.

      If your jobs don't progress to STARTING, see Jobs stuck in RUNNABLE status in the troubleshooting section of the Batch User Guide.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • shareIdentifier

      JobDetail.Builder shareIdentifier(String shareIdentifier)

      The share identifier for the job.

      Parameters:
      shareIdentifier - The share identifier for the job.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • schedulingPriority

      JobDetail.Builder schedulingPriority(Integer schedulingPriority)

      The scheduling policy of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority.

      Parameters:
      schedulingPriority - The scheduling policy of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • attempts

      A list of job attempts that are associated with this job.

      Parameters:
      attempts - A list of job attempts that are associated with this job.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • attempts

      JobDetail.Builder attempts(AttemptDetail... attempts)

      A list of job attempts that are associated with this job.

      Parameters:
      attempts - A list of job attempts that are associated with this job.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • attempts

      A list of job attempts that are associated with this job.

      This is a convenience method that creates an instance of the AttemptDetail.Builder avoiding the need to create one manually via AttemptDetail.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to attempts(List<AttemptDetail>).

      Parameters:
      attempts - a consumer that will call methods on AttemptDetail.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • statusReason

      JobDetail.Builder statusReason(String statusReason)

      A short, human-readable string to provide more details for the current status of the job.

      • CAPACITY:INSUFFICIENT_INSTANCE_CAPACITY - All compute environments have insufficient capacity to service the job.

      • MISCONFIGURATION:COMPUTE_ENVIRONMENT_MAX_RESOURCE - All compute environments have a maxVcpu setting that is smaller than the job requirements.

      • MISCONFIGURATION:JOB_RESOURCE_REQUIREMENT - All compute environments have no connected instances that meet the job requirements.

      • MISCONFIGURATION:SERVICE_ROLE_PERMISSIONS - All compute environments have problems with the service role permissions.

      Parameters:
      statusReason - A short, human-readable string to provide more details for the current status of the job.

      • CAPACITY:INSUFFICIENT_INSTANCE_CAPACITY - All compute environments have insufficient capacity to service the job.

      • MISCONFIGURATION:COMPUTE_ENVIRONMENT_MAX_RESOURCE - All compute environments have a maxVcpu setting that is smaller than the job requirements.

      • MISCONFIGURATION:JOB_RESOURCE_REQUIREMENT - All compute environments have no connected instances that meet the job requirements.

      • MISCONFIGURATION:SERVICE_ROLE_PERMISSIONS - All compute environments have problems with the service role permissions.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • createdAt

      JobDetail.Builder createdAt(Long createdAt)

      The Unix timestamp (in milliseconds) for when the job was created. For non-array jobs and parent array jobs, this is when the job entered the SUBMITTED state. This is specifically at the time SubmitJob was called. For array child jobs, this is when the child job was spawned by its parent and entered the PENDING state.

      Parameters:
      createdAt - The Unix timestamp (in milliseconds) for when the job was created. For non-array jobs and parent array jobs, this is when the job entered the SUBMITTED state. This is specifically at the time SubmitJob was called. For array child jobs, this is when the child job was spawned by its parent and entered the PENDING state.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • retryStrategy

      JobDetail.Builder retryStrategy(RetryStrategy retryStrategy)

      The retry strategy to use for this job if an attempt fails.

      Parameters:
      retryStrategy - The retry strategy to use for this job if an attempt fails.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • retryStrategy

      default JobDetail.Builder retryStrategy(Consumer<RetryStrategy.Builder> retryStrategy)

      The retry strategy to use for this job if an attempt fails.

      This is a convenience method that creates an instance of the RetryStrategy.Builder avoiding the need to create one manually via RetryStrategy.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to retryStrategy(RetryStrategy).

      Parameters:
      retryStrategy - a consumer that will call methods on RetryStrategy.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • startedAt

      JobDetail.Builder startedAt(Long startedAt)

      The Unix timestamp (in milliseconds) for when the job was started. More specifically, it's when the job transitioned from the STARTING state to the RUNNING state.

      Parameters:
      startedAt - The Unix timestamp (in milliseconds) for when the job was started. More specifically, it's when the job transitioned from the STARTING state to the RUNNING state.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • stoppedAt

      JobDetail.Builder stoppedAt(Long stoppedAt)

      The Unix timestamp (in milliseconds) for when the job was stopped. More specifically, it's when the job transitioned from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED.

      Parameters:
      stoppedAt - The Unix timestamp (in milliseconds) for when the job was stopped. More specifically, it's when the job transitioned from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dependsOn

      A list of job IDs that this job depends on.

      Parameters:
      dependsOn - A list of job IDs that this job depends on.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dependsOn

      JobDetail.Builder dependsOn(JobDependency... dependsOn)

      A list of job IDs that this job depends on.

      Parameters:
      dependsOn - A list of job IDs that this job depends on.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dependsOn

      A list of job IDs that this job depends on.

      This is a convenience method that creates an instance of the JobDependency.Builder avoiding the need to create one manually via JobDependency.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to dependsOn(List<JobDependency>).

      Parameters:
      dependsOn - a consumer that will call methods on JobDependency.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • jobDefinition

      JobDetail.Builder jobDefinition(String jobDefinition)

      The Amazon Resource Name (ARN) of the job definition that this job uses.

      Parameters:
      jobDefinition - The Amazon Resource Name (ARN) of the job definition that this job uses.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • parameters

      JobDetail.Builder parameters(Map<String,String> parameters)

      Additional parameters that are passed to the job that replace parameter substitution placeholders or override any corresponding parameter defaults from the job definition.

      Parameters:
      parameters - Additional parameters that are passed to the job that replace parameter substitution placeholders or override any corresponding parameter defaults from the job definition.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • container

      JobDetail.Builder container(ContainerDetail container)

      An object that represents the details for the container that's associated with the job. If the details are for a multiple-container job, this object will be empty.

      Parameters:
      container - An object that represents the details for the container that's associated with the job. If the details are for a multiple-container job, this object will be empty.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • container

      default JobDetail.Builder container(Consumer<ContainerDetail.Builder> container)

      An object that represents the details for the container that's associated with the job. If the details are for a multiple-container job, this object will be empty.

      This is a convenience method that creates an instance of the ContainerDetail.Builder avoiding the need to create one manually via ContainerDetail.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to container(ContainerDetail).

      Parameters:
      container - a consumer that will call methods on ContainerDetail.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • nodeDetails

      JobDetail.Builder nodeDetails(NodeDetails nodeDetails)

      An object that represents the details of a node that's associated with a multi-node parallel job.

      Parameters:
      nodeDetails - An object that represents the details of a node that's associated with a multi-node parallel job.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • nodeDetails

      default JobDetail.Builder nodeDetails(Consumer<NodeDetails.Builder> nodeDetails)

      An object that represents the details of a node that's associated with a multi-node parallel job.

      This is a convenience method that creates an instance of the NodeDetails.Builder avoiding the need to create one manually via NodeDetails.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to nodeDetails(NodeDetails).

      Parameters:
      nodeDetails - a consumer that will call methods on NodeDetails.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • nodeProperties

      JobDetail.Builder nodeProperties(NodeProperties nodeProperties)

      An object that represents the node properties of a multi-node parallel job.

      This isn't applicable to jobs that are running on Fargate resources.

      Parameters:
      nodeProperties - An object that represents the node properties of a multi-node parallel job.

      This isn't applicable to jobs that are running on Fargate resources.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • nodeProperties

      default JobDetail.Builder nodeProperties(Consumer<NodeProperties.Builder> nodeProperties)

      An object that represents the node properties of a multi-node parallel job.

      This isn't applicable to jobs that are running on Fargate resources.

      This is a convenience method that creates an instance of the NodeProperties.Builder avoiding the need to create one manually via NodeProperties.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to nodeProperties(NodeProperties).

      Parameters:
      nodeProperties - a consumer that will call methods on NodeProperties.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • arrayProperties

      JobDetail.Builder arrayProperties(ArrayPropertiesDetail arrayProperties)

      The array properties of the job, if it's an array job.

      Parameters:
      arrayProperties - The array properties of the job, if it's an array job.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • arrayProperties

      default JobDetail.Builder arrayProperties(Consumer<ArrayPropertiesDetail.Builder> arrayProperties)

      The array properties of the job, if it's an array job.

      This is a convenience method that creates an instance of the ArrayPropertiesDetail.Builder avoiding the need to create one manually via ArrayPropertiesDetail.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to arrayProperties(ArrayPropertiesDetail).

      Parameters:
      arrayProperties - a consumer that will call methods on ArrayPropertiesDetail.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • timeout

      JobDetail.Builder timeout(JobTimeout timeout)

      The timeout configuration for the job.

      Parameters:
      timeout - The timeout configuration for the job.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • timeout

      default JobDetail.Builder timeout(Consumer<JobTimeout.Builder> timeout)

      The timeout configuration for the job.

      This is a convenience method that creates an instance of the JobTimeout.Builder avoiding the need to create one manually via JobTimeout.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to timeout(JobTimeout).

      Parameters:
      timeout - a consumer that will call methods on JobTimeout.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • tags

      The tags that are applied to the job.

      Parameters:
      tags - The tags that are applied to the job.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • propagateTags

      JobDetail.Builder propagateTags(Boolean propagateTags)

      Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks when the tasks are created. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the FAILED state.

      Parameters:
      propagateTags - Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks when the tasks are created. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the FAILED state.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • platformCapabilitiesWithStrings

      JobDetail.Builder platformCapabilitiesWithStrings(Collection<String> platformCapabilities)

      The platform capabilities required by the job definition. If no value is specified, it defaults to EC2. Jobs run on Fargate resources specify FARGATE.

      Parameters:
      platformCapabilities - The platform capabilities required by the job definition. If no value is specified, it defaults to EC2. Jobs run on Fargate resources specify FARGATE.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • platformCapabilitiesWithStrings

      JobDetail.Builder platformCapabilitiesWithStrings(String... platformCapabilities)

      The platform capabilities required by the job definition. If no value is specified, it defaults to EC2. Jobs run on Fargate resources specify FARGATE.

      Parameters:
      platformCapabilities - The platform capabilities required by the job definition. If no value is specified, it defaults to EC2. Jobs run on Fargate resources specify FARGATE.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • platformCapabilities

      JobDetail.Builder platformCapabilities(Collection<PlatformCapability> platformCapabilities)

      The platform capabilities required by the job definition. If no value is specified, it defaults to EC2. Jobs run on Fargate resources specify FARGATE.

      Parameters:
      platformCapabilities - The platform capabilities required by the job definition. If no value is specified, it defaults to EC2. Jobs run on Fargate resources specify FARGATE.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • platformCapabilities

      JobDetail.Builder platformCapabilities(PlatformCapability... platformCapabilities)

      The platform capabilities required by the job definition. If no value is specified, it defaults to EC2. Jobs run on Fargate resources specify FARGATE.

      Parameters:
      platformCapabilities - The platform capabilities required by the job definition. If no value is specified, it defaults to EC2. Jobs run on Fargate resources specify FARGATE.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • eksProperties

      JobDetail.Builder eksProperties(EksPropertiesDetail eksProperties)

      An object with various properties that are specific to Amazon EKS based jobs.

      Parameters:
      eksProperties - An object with various properties that are specific to Amazon EKS based jobs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • eksProperties

      default JobDetail.Builder eksProperties(Consumer<EksPropertiesDetail.Builder> eksProperties)

      An object with various properties that are specific to Amazon EKS based jobs.

      This is a convenience method that creates an instance of the EksPropertiesDetail.Builder avoiding the need to create one manually via EksPropertiesDetail.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to eksProperties(EksPropertiesDetail).

      Parameters:
      eksProperties - a consumer that will call methods on EksPropertiesDetail.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • eksAttempts

      JobDetail.Builder eksAttempts(Collection<EksAttemptDetail> eksAttempts)

      A list of job attempts that are associated with this job.

      Parameters:
      eksAttempts - A list of job attempts that are associated with this job.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • eksAttempts

      JobDetail.Builder eksAttempts(EksAttemptDetail... eksAttempts)

      A list of job attempts that are associated with this job.

      Parameters:
      eksAttempts - A list of job attempts that are associated with this job.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • eksAttempts

      JobDetail.Builder eksAttempts(Consumer<EksAttemptDetail.Builder>... eksAttempts)

      A list of job attempts that are associated with this job.

      This is a convenience method that creates an instance of the EksAttemptDetail.Builder avoiding the need to create one manually via EksAttemptDetail.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to eksAttempts(List<EksAttemptDetail>).

      Parameters:
      eksAttempts - a consumer that will call methods on EksAttemptDetail.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • ecsProperties

      JobDetail.Builder ecsProperties(EcsPropertiesDetail ecsProperties)

      An object with properties that are specific to Amazon ECS-based jobs.

      Parameters:
      ecsProperties - An object with properties that are specific to Amazon ECS-based jobs.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • ecsProperties

      default JobDetail.Builder ecsProperties(Consumer<EcsPropertiesDetail.Builder> ecsProperties)

      An object with properties that are specific to Amazon ECS-based jobs.

      This is a convenience method that creates an instance of the EcsPropertiesDetail.Builder avoiding the need to create one manually via EcsPropertiesDetail.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to ecsProperties(EcsPropertiesDetail).

      Parameters:
      ecsProperties - a consumer that will call methods on EcsPropertiesDetail.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • isCancelled

      JobDetail.Builder isCancelled(Boolean isCancelled)

      Indicates whether the job is canceled.

      Parameters:
      isCancelled - Indicates whether the job is canceled.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • isTerminated

      JobDetail.Builder isTerminated(Boolean isTerminated)

      Indicates whether the job is terminated.

      Parameters:
      isTerminated - Indicates whether the job is terminated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.