com.amazonaws.services.batch.model.SubmitJobRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-batch Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.batch.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Contains the parameters for SubmitJob
.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SubmitJobRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain
* uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
*
*/
private String jobName;
/**
*
* The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name (ARN) of
* the queue.
*
*/
private String jobQueue;
/**
*
* The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling policy.
* If the job queue has a scheduling policy, then this parameter must be specified.
*
*
* This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).
*
*/
private String shareIdentifier;
/**
*
* The scheduling priority for the job. 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. This overrides any
* scheduling priority in the job definition and works only within a single share identifier.
*
*
* The minimum supported value is 0 and the maximum supported value is 9999.
*
*/
private Integer schedulingPriorityOverride;
/**
*
* The array properties for the submitted job, such as the size of the array. The array size can be between 2 and
* 10,000. If you specify array properties for a job, it becomes an array job. For more information, see Array Jobs in the Batch User
* Guide.
*
*/
private ArrayProperties arrayProperties;
/**
*
* A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a
* SEQUENTIAL
type dependency without specifying a job ID for array jobs so that each child array job
* completes sequentially, starting at index 0. You can also specify an N_TO_N
type dependency with a
* job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of
* each dependency to complete before it can begin.
*
*/
private java.util.List dependsOn;
/**
*
* The job definition used by this job. This value can be one of definition-name
,
* definition-name:revision
, or the Amazon Resource Name (ARN) for the job definition, with or without
* the revision (
* arn:aws:batch:region:account:job-definition/definition-name:revision
,
* or arn:aws:batch:region:account:job-definition/definition-name
).
*
*
* If the revision is not specified, then the latest active revision is used.
*
*/
private String jobDefinition;
/**
*
* Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job
* definition. Parameters are specified as a key and value pair mapping. Parameters in a SubmitJob
* request override any corresponding parameter defaults from the job definition.
*
*/
private java.util.Map parameters;
/**
*
* An object with properties that override the defaults for the job definition that specify the name of a container
* in the specified job definition and the overrides it should receive. You can override the default command for a
* container, which is specified in the job definition or the Docker image, with a command
override.
* You can also override existing environment variables on a container or add new environment variables to it with
* an environment
override.
*
*/
private ContainerOverrides containerOverrides;
/**
*
* A list of node overrides in JSON format that specify the node range to target and the container overrides for
* that node range.
*
*
*
* This parameter isn't applicable to jobs that are running on Fargate resources; use
* containerOverrides
instead.
*
*
*/
private NodeOverrides nodeOverrides;
/**
*
* The retry strategy to use for failed jobs from this SubmitJob operation. When a retry strategy is
* specified here, it overrides the retry strategy defined in the job definition.
*
*/
private RetryStrategy retryStrategy;
/**
*
* 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 during task creation.
* 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. When
* specified, this overrides the tag propagation setting in the job definition.
*
*/
private Boolean propagateTags;
/**
*
* The timeout configuration for this SubmitJob operation. You can specify a timeout duration after which
* Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried.
* The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified
* in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more
* information, see Job
* Timeouts in the Amazon Elastic Container Service Developer Guide.
*
*/
private JobTimeout timeout;
/**
*
* The tags that you apply to the job request to help you categorize and organize your resources. Each tag consists
* of a key and an optional value. For more information, see Tagging Amazon Web Services Resources
* in Amazon Web Services General Reference.
*
*/
private java.util.Map tags;
/**
*
* An object, with properties that override defaults for the job definition, can only be specified for jobs that are
* run on Amazon EKS resources.
*
*/
private EksPropertiesOverride eksPropertiesOverride;
/**
*
* An object, with properties that override defaults for the job definition, can only be specified for jobs that are
* run on Amazon ECS resources.
*
*/
private EcsPropertiesOverride ecsPropertiesOverride;
/**
*
* The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain
* uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
*
*
* @param jobName
* The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can
* contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
*/
public void setJobName(String jobName) {
this.jobName = jobName;
}
/**
*
* The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain
* uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
*
*
* @return The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can
* contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
*/
public String getJobName() {
return this.jobName;
}
/**
*
* The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain
* uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
*
*
* @param jobName
* The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can
* contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withJobName(String jobName) {
setJobName(jobName);
return this;
}
/**
*
* The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name (ARN) of
* the queue.
*
*
* @param jobQueue
* The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name
* (ARN) of the queue.
*/
public void setJobQueue(String jobQueue) {
this.jobQueue = jobQueue;
}
/**
*
* The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name (ARN) of
* the queue.
*
*
* @return The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name
* (ARN) of the queue.
*/
public String getJobQueue() {
return this.jobQueue;
}
/**
*
* The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name (ARN) of
* the queue.
*
*
* @param jobQueue
* The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name
* (ARN) of the queue.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withJobQueue(String jobQueue) {
setJobQueue(jobQueue);
return this;
}
/**
*
* The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling policy.
* If the job queue has a scheduling policy, then this parameter must be specified.
*
*
* This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).
*
*
* @param shareIdentifier
* The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling
* policy. If the job queue has a scheduling policy, then this parameter must be specified.
*
* This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).
*/
public void setShareIdentifier(String shareIdentifier) {
this.shareIdentifier = shareIdentifier;
}
/**
*
* The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling policy.
* If the job queue has a scheduling policy, then this parameter must be specified.
*
*
* This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).
*
*
* @return The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling
* policy. If the job queue has a scheduling policy, then this parameter must be specified.
*
* This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).
*/
public String getShareIdentifier() {
return this.shareIdentifier;
}
/**
*
* The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling policy.
* If the job queue has a scheduling policy, then this parameter must be specified.
*
*
* This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).
*
*
* @param shareIdentifier
* The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling
* policy. If the job queue has a scheduling policy, then this parameter must be specified.
*
* This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withShareIdentifier(String shareIdentifier) {
setShareIdentifier(shareIdentifier);
return this;
}
/**
*
* The scheduling priority for the job. 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. This overrides any
* scheduling priority in the job definition and works only within a single share identifier.
*
*
* The minimum supported value is 0 and the maximum supported value is 9999.
*
*
* @param schedulingPriorityOverride
* The scheduling priority for the job. 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. This
* overrides any scheduling priority in the job definition and works only within a single share
* identifier.
*
* The minimum supported value is 0 and the maximum supported value is 9999.
*/
public void setSchedulingPriorityOverride(Integer schedulingPriorityOverride) {
this.schedulingPriorityOverride = schedulingPriorityOverride;
}
/**
*
* The scheduling priority for the job. 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. This overrides any
* scheduling priority in the job definition and works only within a single share identifier.
*
*
* The minimum supported value is 0 and the maximum supported value is 9999.
*
*
* @return The scheduling priority for the job. 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. This
* overrides any scheduling priority in the job definition and works only within a single share
* identifier.
*
* The minimum supported value is 0 and the maximum supported value is 9999.
*/
public Integer getSchedulingPriorityOverride() {
return this.schedulingPriorityOverride;
}
/**
*
* The scheduling priority for the job. 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. This overrides any
* scheduling priority in the job definition and works only within a single share identifier.
*
*
* The minimum supported value is 0 and the maximum supported value is 9999.
*
*
* @param schedulingPriorityOverride
* The scheduling priority for the job. 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. This
* overrides any scheduling priority in the job definition and works only within a single share
* identifier.
*
* The minimum supported value is 0 and the maximum supported value is 9999.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withSchedulingPriorityOverride(Integer schedulingPriorityOverride) {
setSchedulingPriorityOverride(schedulingPriorityOverride);
return this;
}
/**
*
* The array properties for the submitted job, such as the size of the array. The array size can be between 2 and
* 10,000. If you specify array properties for a job, it becomes an array job. For more information, see Array Jobs in the Batch User
* Guide.
*
*
* @param arrayProperties
* The array properties for the submitted job, such as the size of the array. The array size can be between 2
* and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see
* Array Jobs in the
* Batch User Guide.
*/
public void setArrayProperties(ArrayProperties arrayProperties) {
this.arrayProperties = arrayProperties;
}
/**
*
* The array properties for the submitted job, such as the size of the array. The array size can be between 2 and
* 10,000. If you specify array properties for a job, it becomes an array job. For more information, see Array Jobs in the Batch User
* Guide.
*
*
* @return The array properties for the submitted job, such as the size of the array. The array size can be between
* 2 and 10,000. If you specify array properties for a job, it becomes an array job. For more information,
* see Array Jobs in the
* Batch User Guide.
*/
public ArrayProperties getArrayProperties() {
return this.arrayProperties;
}
/**
*
* The array properties for the submitted job, such as the size of the array. The array size can be between 2 and
* 10,000. If you specify array properties for a job, it becomes an array job. For more information, see Array Jobs in the Batch User
* Guide.
*
*
* @param arrayProperties
* The array properties for the submitted job, such as the size of the array. The array size can be between 2
* and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see
* Array Jobs in the
* Batch User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withArrayProperties(ArrayProperties arrayProperties) {
setArrayProperties(arrayProperties);
return this;
}
/**
*
* A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a
* SEQUENTIAL
type dependency without specifying a job ID for array jobs so that each child array job
* completes sequentially, starting at index 0. You can also specify an N_TO_N
type dependency with a
* job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of
* each dependency to complete before it can begin.
*
*
* @return A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a
* SEQUENTIAL
type dependency without specifying a job ID for array jobs so that each child
* array job completes sequentially, starting at index 0. You can also specify an N_TO_N
type
* dependency with a job ID for array jobs. In that case, each index child of this job must wait for the
* corresponding index child of each dependency to complete before it can begin.
*/
public java.util.List getDependsOn() {
return dependsOn;
}
/**
*
* A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a
* SEQUENTIAL
type dependency without specifying a job ID for array jobs so that each child array job
* completes sequentially, starting at index 0. You can also specify an N_TO_N
type dependency with a
* job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of
* each dependency to complete before it can begin.
*
*
* @param dependsOn
* A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a
* SEQUENTIAL
type dependency without specifying a job ID for array jobs so that each child
* array job completes sequentially, starting at index 0. You can also specify an N_TO_N
type
* dependency with a job ID for array jobs. In that case, each index child of this job must wait for the
* corresponding index child of each dependency to complete before it can begin.
*/
public void setDependsOn(java.util.Collection dependsOn) {
if (dependsOn == null) {
this.dependsOn = null;
return;
}
this.dependsOn = new java.util.ArrayList(dependsOn);
}
/**
*
* A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a
* SEQUENTIAL
type dependency without specifying a job ID for array jobs so that each child array job
* completes sequentially, starting at index 0. You can also specify an N_TO_N
type dependency with a
* job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of
* each dependency to complete before it can begin.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDependsOn(java.util.Collection)} or {@link #withDependsOn(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param dependsOn
* A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a
* SEQUENTIAL
type dependency without specifying a job ID for array jobs so that each child
* array job completes sequentially, starting at index 0. You can also specify an N_TO_N
type
* dependency with a job ID for array jobs. In that case, each index child of this job must wait for the
* corresponding index child of each dependency to complete before it can begin.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withDependsOn(JobDependency... dependsOn) {
if (this.dependsOn == null) {
setDependsOn(new java.util.ArrayList(dependsOn.length));
}
for (JobDependency ele : dependsOn) {
this.dependsOn.add(ele);
}
return this;
}
/**
*
* A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a
* SEQUENTIAL
type dependency without specifying a job ID for array jobs so that each child array job
* completes sequentially, starting at index 0. You can also specify an N_TO_N
type dependency with a
* job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of
* each dependency to complete before it can begin.
*
*
* @param dependsOn
* A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a
* SEQUENTIAL
type dependency without specifying a job ID for array jobs so that each child
* array job completes sequentially, starting at index 0. You can also specify an N_TO_N
type
* dependency with a job ID for array jobs. In that case, each index child of this job must wait for the
* corresponding index child of each dependency to complete before it can begin.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withDependsOn(java.util.Collection dependsOn) {
setDependsOn(dependsOn);
return this;
}
/**
*
* The job definition used by this job. This value can be one of definition-name
,
* definition-name:revision
, or the Amazon Resource Name (ARN) for the job definition, with or without
* the revision (
* arn:aws:batch:region:account:job-definition/definition-name:revision
,
* or arn:aws:batch:region:account:job-definition/definition-name
).
*
*
* If the revision is not specified, then the latest active revision is used.
*
*
* @param jobDefinition
* The job definition used by this job. This value can be one of definition-name
,
* definition-name:revision
, or the Amazon Resource Name (ARN) for the job definition, with or
* without the revision (
* arn:aws:batch:region:account:job-definition/definition-name:revision
* , or arn:aws:batch:region:account:job-definition/definition-name
).
*
* If the revision is not specified, then the latest active revision is used.
*/
public void setJobDefinition(String jobDefinition) {
this.jobDefinition = jobDefinition;
}
/**
*
* The job definition used by this job. This value can be one of definition-name
,
* definition-name:revision
, or the Amazon Resource Name (ARN) for the job definition, with or without
* the revision (
* arn:aws:batch:region:account:job-definition/definition-name:revision
,
* or arn:aws:batch:region:account:job-definition/definition-name
).
*
*
* If the revision is not specified, then the latest active revision is used.
*
*
* @return The job definition used by this job. This value can be one of definition-name
,
* definition-name:revision
, or the Amazon Resource Name (ARN) for the job definition, with or
* without the revision (
* arn:aws:batch:region:account:job-definition/definition-name:revision
* , or arn:aws:batch:region:account:job-definition/definition-name
).
*
* If the revision is not specified, then the latest active revision is used.
*/
public String getJobDefinition() {
return this.jobDefinition;
}
/**
*
* The job definition used by this job. This value can be one of definition-name
,
* definition-name:revision
, or the Amazon Resource Name (ARN) for the job definition, with or without
* the revision (
* arn:aws:batch:region:account:job-definition/definition-name:revision
,
* or arn:aws:batch:region:account:job-definition/definition-name
).
*
*
* If the revision is not specified, then the latest active revision is used.
*
*
* @param jobDefinition
* The job definition used by this job. This value can be one of definition-name
,
* definition-name:revision
, or the Amazon Resource Name (ARN) for the job definition, with or
* without the revision (
* arn:aws:batch:region:account:job-definition/definition-name:revision
* , or arn:aws:batch:region:account:job-definition/definition-name
).
*
* If the revision is not specified, then the latest active revision is used.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withJobDefinition(String jobDefinition) {
setJobDefinition(jobDefinition);
return this;
}
/**
*
* Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job
* definition. Parameters are specified as a key and value pair mapping. Parameters in a SubmitJob
* request override any corresponding parameter defaults from the job definition.
*
*
* @return Additional parameters passed to the job that replace parameter substitution placeholders that are set in
* the job definition. Parameters are specified as a key and value pair mapping. Parameters in a
* SubmitJob
request override any corresponding parameter defaults from the job definition.
*/
public java.util.Map getParameters() {
return parameters;
}
/**
*
* Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job
* definition. Parameters are specified as a key and value pair mapping. Parameters in a SubmitJob
* request override any corresponding parameter defaults from the job definition.
*
*
* @param parameters
* Additional parameters passed to the job that replace parameter substitution placeholders that are set in
* the job definition. Parameters are specified as a key and value pair mapping. Parameters in a
* SubmitJob
request override any corresponding parameter defaults from the job definition.
*/
public void setParameters(java.util.Map parameters) {
this.parameters = parameters;
}
/**
*
* Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job
* definition. Parameters are specified as a key and value pair mapping. Parameters in a SubmitJob
* request override any corresponding parameter defaults from the job definition.
*
*
* @param parameters
* Additional parameters passed to the job that replace parameter substitution placeholders that are set in
* the job definition. Parameters are specified as a key and value pair mapping. Parameters in a
* SubmitJob
request override any corresponding parameter defaults from the job definition.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withParameters(java.util.Map parameters) {
setParameters(parameters);
return this;
}
/**
* Add a single Parameters entry
*
* @see SubmitJobRequest#withParameters
* @returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest addParametersEntry(String key, String value) {
if (null == this.parameters) {
this.parameters = new java.util.HashMap();
}
if (this.parameters.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.parameters.put(key, value);
return this;
}
/**
* Removes all the entries added into Parameters.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest clearParametersEntries() {
this.parameters = null;
return this;
}
/**
*
* An object with properties that override the defaults for the job definition that specify the name of a container
* in the specified job definition and the overrides it should receive. You can override the default command for a
* container, which is specified in the job definition or the Docker image, with a command
override.
* You can also override existing environment variables on a container or add new environment variables to it with
* an environment
override.
*
*
* @param containerOverrides
* An object with properties that override the defaults for the job definition that specify the name of a
* container in the specified job definition and the overrides it should receive. You can override the
* default command for a container, which is specified in the job definition or the Docker image, with a
* command
override. You can also override existing environment variables on a container or add
* new environment variables to it with an environment
override.
*/
public void setContainerOverrides(ContainerOverrides containerOverrides) {
this.containerOverrides = containerOverrides;
}
/**
*
* An object with properties that override the defaults for the job definition that specify the name of a container
* in the specified job definition and the overrides it should receive. You can override the default command for a
* container, which is specified in the job definition or the Docker image, with a command
override.
* You can also override existing environment variables on a container or add new environment variables to it with
* an environment
override.
*
*
* @return An object with properties that override the defaults for the job definition that specify the name of a
* container in the specified job definition and the overrides it should receive. You can override the
* default command for a container, which is specified in the job definition or the Docker image, with a
* command
override. You can also override existing environment variables on a container or add
* new environment variables to it with an environment
override.
*/
public ContainerOverrides getContainerOverrides() {
return this.containerOverrides;
}
/**
*
* An object with properties that override the defaults for the job definition that specify the name of a container
* in the specified job definition and the overrides it should receive. You can override the default command for a
* container, which is specified in the job definition or the Docker image, with a command
override.
* You can also override existing environment variables on a container or add new environment variables to it with
* an environment
override.
*
*
* @param containerOverrides
* An object with properties that override the defaults for the job definition that specify the name of a
* container in the specified job definition and the overrides it should receive. You can override the
* default command for a container, which is specified in the job definition or the Docker image, with a
* command
override. You can also override existing environment variables on a container or add
* new environment variables to it with an environment
override.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withContainerOverrides(ContainerOverrides containerOverrides) {
setContainerOverrides(containerOverrides);
return this;
}
/**
*
* A list of node overrides in JSON format that specify the node range to target and the container overrides for
* that node range.
*
*
*
* This parameter isn't applicable to jobs that are running on Fargate resources; use
* containerOverrides
instead.
*
*
*
* @param nodeOverrides
* A list of node overrides in JSON format that specify the node range to target and the container overrides
* for that node range.
*
* This parameter isn't applicable to jobs that are running on Fargate resources; use
* containerOverrides
instead.
*
*/
public void setNodeOverrides(NodeOverrides nodeOverrides) {
this.nodeOverrides = nodeOverrides;
}
/**
*
* A list of node overrides in JSON format that specify the node range to target and the container overrides for
* that node range.
*
*
*
* This parameter isn't applicable to jobs that are running on Fargate resources; use
* containerOverrides
instead.
*
*
*
* @return A list of node overrides in JSON format that specify the node range to target and the container overrides
* for that node range.
*
* This parameter isn't applicable to jobs that are running on Fargate resources; use
* containerOverrides
instead.
*
*/
public NodeOverrides getNodeOverrides() {
return this.nodeOverrides;
}
/**
*
* A list of node overrides in JSON format that specify the node range to target and the container overrides for
* that node range.
*
*
*
* This parameter isn't applicable to jobs that are running on Fargate resources; use
* containerOverrides
instead.
*
*
*
* @param nodeOverrides
* A list of node overrides in JSON format that specify the node range to target and the container overrides
* for that node range.
*
* This parameter isn't applicable to jobs that are running on Fargate resources; use
* containerOverrides
instead.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withNodeOverrides(NodeOverrides nodeOverrides) {
setNodeOverrides(nodeOverrides);
return this;
}
/**
*
* The retry strategy to use for failed jobs from this SubmitJob operation. When a retry strategy is
* specified here, it overrides the retry strategy defined in the job definition.
*
*
* @param retryStrategy
* The retry strategy to use for failed jobs from this SubmitJob operation. When a retry strategy is
* specified here, it overrides the retry strategy defined in the job definition.
*/
public void setRetryStrategy(RetryStrategy retryStrategy) {
this.retryStrategy = retryStrategy;
}
/**
*
* The retry strategy to use for failed jobs from this SubmitJob operation. When a retry strategy is
* specified here, it overrides the retry strategy defined in the job definition.
*
*
* @return The retry strategy to use for failed jobs from this SubmitJob operation. When a retry strategy is
* specified here, it overrides the retry strategy defined in the job definition.
*/
public RetryStrategy getRetryStrategy() {
return this.retryStrategy;
}
/**
*
* The retry strategy to use for failed jobs from this SubmitJob operation. When a retry strategy is
* specified here, it overrides the retry strategy defined in the job definition.
*
*
* @param retryStrategy
* The retry strategy to use for failed jobs from this SubmitJob operation. When a retry strategy is
* specified here, it overrides the retry strategy defined in the job definition.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withRetryStrategy(RetryStrategy retryStrategy) {
setRetryStrategy(retryStrategy);
return this;
}
/**
*
* 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 during task creation.
* 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. When
* specified, this overrides the tag propagation setting in the job definition.
*
*
* @param 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
* during task creation. 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. When specified, this overrides the tag propagation setting in the job
* definition.
*/
public void setPropagateTags(Boolean propagateTags) {
this.propagateTags = 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 during task creation.
* 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. When
* specified, this overrides the tag propagation setting in the job definition.
*
*
* @return 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
* during task creation. 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. When specified, this overrides the tag propagation setting in the job
* definition.
*/
public Boolean getPropagateTags() {
return this.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 during task creation.
* 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. When
* specified, this overrides the tag propagation setting in the job definition.
*
*
* @param 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
* during task creation. 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. When specified, this overrides the tag propagation setting in the job
* definition.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withPropagateTags(Boolean propagateTags) {
setPropagateTags(propagateTags);
return this;
}
/**
*
* 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 during task creation.
* 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. When
* specified, this overrides the tag propagation setting in the job definition.
*
*
* @return 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
* during task creation. 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. When specified, this overrides the tag propagation setting in the job
* definition.
*/
public Boolean isPropagateTags() {
return this.propagateTags;
}
/**
*
* The timeout configuration for this SubmitJob operation. You can specify a timeout duration after which
* Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried.
* The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified
* in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more
* information, see Job
* Timeouts in the Amazon Elastic Container Service Developer Guide.
*
*
* @param timeout
* The timeout configuration for this SubmitJob operation. You can specify a timeout duration after
* which Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it
* isn't retried. The minimum value for the timeout is 60 seconds. This configuration overrides any timeout
* configuration specified in the job definition. For array jobs, child jobs have the same timeout
* configuration as the parent job. For more information, see Job Timeouts in
* the Amazon Elastic Container Service Developer Guide.
*/
public void setTimeout(JobTimeout timeout) {
this.timeout = timeout;
}
/**
*
* The timeout configuration for this SubmitJob operation. You can specify a timeout duration after which
* Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried.
* The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified
* in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more
* information, see Job
* Timeouts in the Amazon Elastic Container Service Developer Guide.
*
*
* @return The timeout configuration for this SubmitJob operation. You can specify a timeout duration after
* which Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it
* isn't retried. The minimum value for the timeout is 60 seconds. This configuration overrides any timeout
* configuration specified in the job definition. For array jobs, child jobs have the same timeout
* configuration as the parent job. For more information, see Job Timeouts in
* the Amazon Elastic Container Service Developer Guide.
*/
public JobTimeout getTimeout() {
return this.timeout;
}
/**
*
* The timeout configuration for this SubmitJob operation. You can specify a timeout duration after which
* Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried.
* The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified
* in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more
* information, see Job
* Timeouts in the Amazon Elastic Container Service Developer Guide.
*
*
* @param timeout
* The timeout configuration for this SubmitJob operation. You can specify a timeout duration after
* which Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it
* isn't retried. The minimum value for the timeout is 60 seconds. This configuration overrides any timeout
* configuration specified in the job definition. For array jobs, child jobs have the same timeout
* configuration as the parent job. For more information, see Job Timeouts in
* the Amazon Elastic Container Service Developer Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withTimeout(JobTimeout timeout) {
setTimeout(timeout);
return this;
}
/**
*
* The tags that you apply to the job request to help you categorize and organize your resources. Each tag consists
* of a key and an optional value. For more information, see Tagging Amazon Web Services Resources
* in Amazon Web Services General Reference.
*
*
* @return The tags that you apply to the job request to help you categorize and organize your resources. Each tag
* consists of a key and an optional value. For more information, see Tagging Amazon Web Services
* Resources in Amazon Web Services General Reference.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* The tags that you apply to the job request to help you categorize and organize your resources. Each tag consists
* of a key and an optional value. For more information, see Tagging Amazon Web Services Resources
* in Amazon Web Services General Reference.
*
*
* @param tags
* The tags that you apply to the job request to help you categorize and organize your resources. Each tag
* consists of a key and an optional value. For more information, see Tagging Amazon Web Services
* Resources in Amazon Web Services General Reference.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* The tags that you apply to the job request to help you categorize and organize your resources. Each tag consists
* of a key and an optional value. For more information, see Tagging Amazon Web Services Resources
* in Amazon Web Services General Reference.
*
*
* @param tags
* The tags that you apply to the job request to help you categorize and organize your resources. Each tag
* consists of a key and an optional value. For more information, see Tagging Amazon Web Services
* Resources in Amazon Web Services General Reference.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see SubmitJobRequest#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap();
}
if (this.tags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.tags.put(key, value);
return this;
}
/**
* Removes all the entries added into Tags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest clearTagsEntries() {
this.tags = null;
return this;
}
/**
*
* An object, with properties that override defaults for the job definition, can only be specified for jobs that are
* run on Amazon EKS resources.
*
*
* @param eksPropertiesOverride
* An object, with properties that override defaults for the job definition, can only be specified for jobs
* that are run on Amazon EKS resources.
*/
public void setEksPropertiesOverride(EksPropertiesOverride eksPropertiesOverride) {
this.eksPropertiesOverride = eksPropertiesOverride;
}
/**
*
* An object, with properties that override defaults for the job definition, can only be specified for jobs that are
* run on Amazon EKS resources.
*
*
* @return An object, with properties that override defaults for the job definition, can only be specified for jobs
* that are run on Amazon EKS resources.
*/
public EksPropertiesOverride getEksPropertiesOverride() {
return this.eksPropertiesOverride;
}
/**
*
* An object, with properties that override defaults for the job definition, can only be specified for jobs that are
* run on Amazon EKS resources.
*
*
* @param eksPropertiesOverride
* An object, with properties that override defaults for the job definition, can only be specified for jobs
* that are run on Amazon EKS resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withEksPropertiesOverride(EksPropertiesOverride eksPropertiesOverride) {
setEksPropertiesOverride(eksPropertiesOverride);
return this;
}
/**
*
* An object, with properties that override defaults for the job definition, can only be specified for jobs that are
* run on Amazon ECS resources.
*
*
* @param ecsPropertiesOverride
* An object, with properties that override defaults for the job definition, can only be specified for jobs
* that are run on Amazon ECS resources.
*/
public void setEcsPropertiesOverride(EcsPropertiesOverride ecsPropertiesOverride) {
this.ecsPropertiesOverride = ecsPropertiesOverride;
}
/**
*
* An object, with properties that override defaults for the job definition, can only be specified for jobs that are
* run on Amazon ECS resources.
*
*
* @return An object, with properties that override defaults for the job definition, can only be specified for jobs
* that are run on Amazon ECS resources.
*/
public EcsPropertiesOverride getEcsPropertiesOverride() {
return this.ecsPropertiesOverride;
}
/**
*
* An object, with properties that override defaults for the job definition, can only be specified for jobs that are
* run on Amazon ECS resources.
*
*
* @param ecsPropertiesOverride
* An object, with properties that override defaults for the job definition, can only be specified for jobs
* that are run on Amazon ECS resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SubmitJobRequest withEcsPropertiesOverride(EcsPropertiesOverride ecsPropertiesOverride) {
setEcsPropertiesOverride(ecsPropertiesOverride);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getJobName() != null)
sb.append("JobName: ").append(getJobName()).append(",");
if (getJobQueue() != null)
sb.append("JobQueue: ").append(getJobQueue()).append(",");
if (getShareIdentifier() != null)
sb.append("ShareIdentifier: ").append(getShareIdentifier()).append(",");
if (getSchedulingPriorityOverride() != null)
sb.append("SchedulingPriorityOverride: ").append(getSchedulingPriorityOverride()).append(",");
if (getArrayProperties() != null)
sb.append("ArrayProperties: ").append(getArrayProperties()).append(",");
if (getDependsOn() != null)
sb.append("DependsOn: ").append(getDependsOn()).append(",");
if (getJobDefinition() != null)
sb.append("JobDefinition: ").append(getJobDefinition()).append(",");
if (getParameters() != null)
sb.append("Parameters: ").append(getParameters()).append(",");
if (getContainerOverrides() != null)
sb.append("ContainerOverrides: ").append(getContainerOverrides()).append(",");
if (getNodeOverrides() != null)
sb.append("NodeOverrides: ").append(getNodeOverrides()).append(",");
if (getRetryStrategy() != null)
sb.append("RetryStrategy: ").append(getRetryStrategy()).append(",");
if (getPropagateTags() != null)
sb.append("PropagateTags: ").append(getPropagateTags()).append(",");
if (getTimeout() != null)
sb.append("Timeout: ").append(getTimeout()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getEksPropertiesOverride() != null)
sb.append("EksPropertiesOverride: ").append(getEksPropertiesOverride()).append(",");
if (getEcsPropertiesOverride() != null)
sb.append("EcsPropertiesOverride: ").append(getEcsPropertiesOverride());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SubmitJobRequest == false)
return false;
SubmitJobRequest other = (SubmitJobRequest) obj;
if (other.getJobName() == null ^ this.getJobName() == null)
return false;
if (other.getJobName() != null && other.getJobName().equals(this.getJobName()) == false)
return false;
if (other.getJobQueue() == null ^ this.getJobQueue() == null)
return false;
if (other.getJobQueue() != null && other.getJobQueue().equals(this.getJobQueue()) == false)
return false;
if (other.getShareIdentifier() == null ^ this.getShareIdentifier() == null)
return false;
if (other.getShareIdentifier() != null && other.getShareIdentifier().equals(this.getShareIdentifier()) == false)
return false;
if (other.getSchedulingPriorityOverride() == null ^ this.getSchedulingPriorityOverride() == null)
return false;
if (other.getSchedulingPriorityOverride() != null && other.getSchedulingPriorityOverride().equals(this.getSchedulingPriorityOverride()) == false)
return false;
if (other.getArrayProperties() == null ^ this.getArrayProperties() == null)
return false;
if (other.getArrayProperties() != null && other.getArrayProperties().equals(this.getArrayProperties()) == false)
return false;
if (other.getDependsOn() == null ^ this.getDependsOn() == null)
return false;
if (other.getDependsOn() != null && other.getDependsOn().equals(this.getDependsOn()) == false)
return false;
if (other.getJobDefinition() == null ^ this.getJobDefinition() == null)
return false;
if (other.getJobDefinition() != null && other.getJobDefinition().equals(this.getJobDefinition()) == false)
return false;
if (other.getParameters() == null ^ this.getParameters() == null)
return false;
if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == false)
return false;
if (other.getContainerOverrides() == null ^ this.getContainerOverrides() == null)
return false;
if (other.getContainerOverrides() != null && other.getContainerOverrides().equals(this.getContainerOverrides()) == false)
return false;
if (other.getNodeOverrides() == null ^ this.getNodeOverrides() == null)
return false;
if (other.getNodeOverrides() != null && other.getNodeOverrides().equals(this.getNodeOverrides()) == false)
return false;
if (other.getRetryStrategy() == null ^ this.getRetryStrategy() == null)
return false;
if (other.getRetryStrategy() != null && other.getRetryStrategy().equals(this.getRetryStrategy()) == false)
return false;
if (other.getPropagateTags() == null ^ this.getPropagateTags() == null)
return false;
if (other.getPropagateTags() != null && other.getPropagateTags().equals(this.getPropagateTags()) == false)
return false;
if (other.getTimeout() == null ^ this.getTimeout() == null)
return false;
if (other.getTimeout() != null && other.getTimeout().equals(this.getTimeout()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getEksPropertiesOverride() == null ^ this.getEksPropertiesOverride() == null)
return false;
if (other.getEksPropertiesOverride() != null && other.getEksPropertiesOverride().equals(this.getEksPropertiesOverride()) == false)
return false;
if (other.getEcsPropertiesOverride() == null ^ this.getEcsPropertiesOverride() == null)
return false;
if (other.getEcsPropertiesOverride() != null && other.getEcsPropertiesOverride().equals(this.getEcsPropertiesOverride()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getJobName() == null) ? 0 : getJobName().hashCode());
hashCode = prime * hashCode + ((getJobQueue() == null) ? 0 : getJobQueue().hashCode());
hashCode = prime * hashCode + ((getShareIdentifier() == null) ? 0 : getShareIdentifier().hashCode());
hashCode = prime * hashCode + ((getSchedulingPriorityOverride() == null) ? 0 : getSchedulingPriorityOverride().hashCode());
hashCode = prime * hashCode + ((getArrayProperties() == null) ? 0 : getArrayProperties().hashCode());
hashCode = prime * hashCode + ((getDependsOn() == null) ? 0 : getDependsOn().hashCode());
hashCode = prime * hashCode + ((getJobDefinition() == null) ? 0 : getJobDefinition().hashCode());
hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode());
hashCode = prime * hashCode + ((getContainerOverrides() == null) ? 0 : getContainerOverrides().hashCode());
hashCode = prime * hashCode + ((getNodeOverrides() == null) ? 0 : getNodeOverrides().hashCode());
hashCode = prime * hashCode + ((getRetryStrategy() == null) ? 0 : getRetryStrategy().hashCode());
hashCode = prime * hashCode + ((getPropagateTags() == null) ? 0 : getPropagateTags().hashCode());
hashCode = prime * hashCode + ((getTimeout() == null) ? 0 : getTimeout().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getEksPropertiesOverride() == null) ? 0 : getEksPropertiesOverride().hashCode());
hashCode = prime * hashCode + ((getEcsPropertiesOverride() == null) ? 0 : getEcsPropertiesOverride().hashCode());
return hashCode;
}
@Override
public SubmitJobRequest clone() {
return (SubmitJobRequest) super.clone();
}
}