/* * Copyright 2018-2023 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.ecs.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RunTaskRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The capacity provider strategy to use for the task. *
*
* If a capacityProviderStrategy
is specified, the launchType
parameter must be omitted.
* If no capacityProviderStrategy
or launchType
is specified, the
* defaultCapacityProviderStrategy
for the cluster is used.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
*
* A capacity provider strategy may contain a maximum of 6 capacity providers. *
*/ private com.amazonaws.internal.SdkInternalList* The short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a * cluster, the default cluster is assumed. *
*/ private String cluster; /** ** The number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for * each call. *
*/ private Integer count; /** ** Specifies whether to use Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS * Resources in the Amazon Elastic Container Service Developer Guide. *
*/ private Boolean enableECSManagedTags; /** *
* Determines whether to use the execute command functionality for the containers in this task. If true
* , this enables execute command functionality on all containers in the task.
*
* If true
, then the task definition must have a task role, or you must provide one as an override.
*
* The name of the task group to associate with the task. The default value is the family name of the task
* definition (for example, family:my-family-name
).
*
* The infrastructure to run your standalone task on. For more information, see Amazon ECS launch types * in the Amazon Elastic Container Service Developer Guide. *
*
* The FARGATE
launch type runs your tasks on Fargate On-Demand infrastructure.
*
* Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more * information, see Fargate capacity * providers in the Amazon ECS User Guide for Fargate. *
*
* The EC2
launch type runs your tasks on Amazon EC2 instances registered to your cluster.
*
* The EXTERNAL
launch type runs your tasks on your on-premises server or virtual machine (VM) capacity
* registered to your cluster.
*
* A task can use either a launch type or a capacity provider strategy. If a launchType
is specified,
* the capacityProviderStrategy
parameter must be omitted.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
*
* The network configuration for the task. This parameter is required for task definitions that use the
* awsvpc
network mode to receive their own elastic network interface, and it isn't supported for other
* network modes. For more information, see Task networking in
* the Amazon Elastic Container Service Developer Guide.
*
* A list of container overrides in JSON format that specify the name of a container in the specified task
* definition and the overrides it should receive. You can override the default command for a container (that's
* specified in the task definition or Docker image) with a command
override. You can also override
* existing environment variables (that are specified in the task definition or Docker image) on a container or add
* new environment variables to it with an environment
override.
*
* A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the * override structure. *
*/ private TaskOverride overrides; /** ** An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task * (including constraints in the task definition and those specified at runtime). *
*/ private com.amazonaws.internal.SdkInternalList* The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. *
*/ private com.amazonaws.internal.SdkInternalList
* The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one
* isn't specified, the LATEST
platform version is used. For more information, see Fargate platform
* versions in the Amazon Elastic Container Service Developer Guide.
*
* Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags * aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task * creation, use the TagResource API action. *
*
* An error will be received if you specify the SERVICE
option when running a task.
*
* The reference ID to use for the task. The reference ID can have a maximum length of 1024 characters. *
*/ private String referenceId; /** *
* An optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch
* process job, you could apply a unique identifier for that job to your task with the startedBy
* parameter. You can then identify which tasks belong to that job by filtering the results of a ListTasks
* call with the startedBy
value. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), and
* underscores (_) are allowed.
*
* If a task is started by an Amazon ECS service, then the startedBy
parameter contains the deployment
* ID of the service that starts it.
*
* The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and * an optional value, both of which you define. *
** The following basic restrictions apply to tags: *
** Maximum number of tags per resource - 50 *
** For each resource, each tag key must be unique, and each tag key can have only one value. *
** Maximum key length - 128 Unicode characters in UTF-8 *
** Maximum value length - 256 Unicode characters in UTF-8 *
** If your tagging schema is used across multiple services and resources, remember that other services may have * restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable * in UTF-8, and the following characters: + - = . _ : / @. *
** Tag keys and values are case-sensitive. *
*
* Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix for
* either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values
* with this prefix. Tags with this prefix do not count against your tags per resource limit.
*
* The family
and revision
(family:revision
) or full ARN of the task
* definition to run. If a revision
isn't specified, the latest ACTIVE
revision is used.
*
* When you create a policy for run-task, you can set the resource to be the latest task definition revision, or a * specific revision. *
*
* The full ARN value must match the value that you specified as the Resource
of the principal's
* permissions policy.
*
* When you specify the policy resource as the latest task definition version (by setting the Resource
* in the policy to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
), then set this
* value to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
.
*
* When you specify the policy resource as a specific task definition version (by setting the Resource
* in the policy to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
or
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*
), then set this value to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
.
*
* For more information, see Policy Resources for Amazon ECS in the Amazon Elastic Container Service developer Guide. *
*/ private String taskDefinition; /** ** The capacity provider strategy to use for the task. *
*
* If a capacityProviderStrategy
is specified, the launchType
parameter must be omitted.
* If no capacityProviderStrategy
or launchType
is specified, the
* defaultCapacityProviderStrategy
for the cluster is used.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
*
* A capacity provider strategy may contain a maximum of 6 capacity providers. *
* * @return The capacity provider strategy to use for the task. *
* If a capacityProviderStrategy
is specified, the launchType
parameter must be
* omitted. If no capacityProviderStrategy
or launchType
is specified, the
* defaultCapacityProviderStrategy
for the cluster is used.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
*
* A capacity provider strategy may contain a maximum of 6 capacity providers.
*/
public java.util.List
* The capacity provider strategy to use for the task.
*
* If a
* When you use cluster auto scaling, you must specify
* A capacity provider strategy may contain a maximum of 6 capacity providers.
* capacityProviderStrategy
is specified, the launchType
parameter must be omitted.
* If no capacityProviderStrategy
or launchType
is specified, the
* defaultCapacityProviderStrategy
for the cluster is used.
* capacityProviderStrategy
and not
* launchType
.
*
* If a capacityProviderStrategy
is specified, the launchType
parameter must be
* omitted. If no capacityProviderStrategy
or launchType
is specified, the
* defaultCapacityProviderStrategy
for the cluster is used.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
*
* A capacity provider strategy may contain a maximum of 6 capacity providers.
*/
public void setCapacityProviderStrategy(java.util.Collection
* The capacity provider strategy to use for the task.
*
* If a
* When you use cluster auto scaling, you must specify
* A capacity provider strategy may contain a maximum of 6 capacity providers.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCapacityProviderStrategy(java.util.Collection)} or
* {@link #withCapacityProviderStrategy(java.util.Collection)} if you want to override the existing values.
* capacityProviderStrategy
is specified, the launchType
parameter must be omitted.
* If no capacityProviderStrategy
or launchType
is specified, the
* defaultCapacityProviderStrategy
for the cluster is used.
* capacityProviderStrategy
and not
* launchType
.
*
* If a capacityProviderStrategy
is specified, the launchType
parameter must be
* omitted. If no capacityProviderStrategy
or launchType
is specified, the
* defaultCapacityProviderStrategy
for the cluster is used.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
*
* A capacity provider strategy may contain a maximum of 6 capacity providers.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RunTaskRequest withCapacityProviderStrategy(CapacityProviderStrategyItem... capacityProviderStrategy) {
if (this.capacityProviderStrategy == null) {
setCapacityProviderStrategy(new com.amazonaws.internal.SdkInternalList
* The capacity provider strategy to use for the task.
*
* If a
* When you use cluster auto scaling, you must specify
* A capacity provider strategy may contain a maximum of 6 capacity providers.
* capacityProviderStrategy
is specified, the launchType
parameter must be omitted.
* If no capacityProviderStrategy
or launchType
is specified, the
* defaultCapacityProviderStrategy
for the cluster is used.
* capacityProviderStrategy
and not
* launchType
.
*
* If a capacityProviderStrategy
is specified, the launchType
parameter must be
* omitted. If no capacityProviderStrategy
or launchType
is specified, the
* defaultCapacityProviderStrategy
for the cluster is used.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
*
* A capacity provider strategy may contain a maximum of 6 capacity providers.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RunTaskRequest withCapacityProviderStrategy(java.util.Collection
* The short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a
* cluster, the default cluster is assumed.
*
* The short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a
* cluster, the default cluster is assumed.
*
* The short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a
* cluster, the default cluster is assumed.
*
* The number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for
* each call.
*
* The number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for
* each call.
*
* The number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for
* each call.
*
* Specifies whether to use Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS
* Resources in the Amazon Elastic Container Service Developer Guide.
*
* Specifies whether to use Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS
* Resources in the Amazon Elastic Container Service Developer Guide.
*
* Specifies whether to use Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS
* Resources in the Amazon Elastic Container Service Developer Guide.
*
* Specifies whether to use Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS
* Resources in the Amazon Elastic Container Service Developer Guide.
*
* Determines whether to use the execute command functionality for the containers in this task. If
* If true
* , this enables execute command functionality on all containers in the task.
* true
, then the task definition must have a task role, or you must provide one as an override.
* true
, this enables execute command functionality on all containers in the task.
* If true
, then the task definition must have a task role, or you must provide one as an
* override.
*/
public void setEnableExecuteCommand(Boolean enableExecuteCommand) {
this.enableExecuteCommand = enableExecuteCommand;
}
/**
*
* Determines whether to use the execute command functionality for the containers in this task. If true
* , this enables execute command functionality on all containers in the task.
*
* If true
, then the task definition must have a task role, or you must provide one as an override.
*
true
, this enables execute command functionality on all containers in the task.
*
* If true
, then the task definition must have a task role, or you must provide one as an
* override.
*/
public Boolean getEnableExecuteCommand() {
return this.enableExecuteCommand;
}
/**
*
* Determines whether to use the execute command functionality for the containers in this task. If true
* , this enables execute command functionality on all containers in the task.
*
* If true
, then the task definition must have a task role, or you must provide one as an override.
*
true
, this enables execute command functionality on all containers in the task.
*
* If true
, then the task definition must have a task role, or you must provide one as an
* override.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RunTaskRequest withEnableExecuteCommand(Boolean enableExecuteCommand) {
setEnableExecuteCommand(enableExecuteCommand);
return this;
}
/**
*
* Determines whether to use the execute command functionality for the containers in this task. If true
* , this enables execute command functionality on all containers in the task.
*
* If true
, then the task definition must have a task role, or you must provide one as an override.
*
true
, this enables execute command functionality on all containers in the task.
*
* If true
, then the task definition must have a task role, or you must provide one as an
* override.
*/
public Boolean isEnableExecuteCommand() {
return this.enableExecuteCommand;
}
/**
*
* The name of the task group to associate with the task. The default value is the family name of the task
* definition (for example, family:my-family-name
).
*
family:my-family-name
).
*/
public void setGroup(String group) {
this.group = group;
}
/**
*
* The name of the task group to associate with the task. The default value is the family name of the task
* definition (for example, family:my-family-name
).
*
family:my-family-name
).
*/
public String getGroup() {
return this.group;
}
/**
*
* The name of the task group to associate with the task. The default value is the family name of the task
* definition (for example, family:my-family-name
).
*
family:my-family-name
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RunTaskRequest withGroup(String group) {
setGroup(group);
return this;
}
/**
* * The infrastructure to run your standalone task on. For more information, see Amazon ECS launch types * in the Amazon Elastic Container Service Developer Guide. *
*
* The FARGATE
launch type runs your tasks on Fargate On-Demand infrastructure.
*
* Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more * information, see Fargate capacity * providers in the Amazon ECS User Guide for Fargate. *
*
* The EC2
launch type runs your tasks on Amazon EC2 instances registered to your cluster.
*
* The EXTERNAL
launch type runs your tasks on your on-premises server or virtual machine (VM) capacity
* registered to your cluster.
*
* A task can use either a launch type or a capacity provider strategy. If a launchType
is specified,
* the capacityProviderStrategy
parameter must be omitted.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
*
* The FARGATE
launch type runs your tasks on Fargate On-Demand infrastructure.
*
* Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more * information, see Fargate * capacity providers in the Amazon ECS User Guide for Fargate. *
*
* The EC2
launch type runs your tasks on Amazon EC2 instances registered to your cluster.
*
* The EXTERNAL
launch type runs your tasks on your on-premises server or virtual machine (VM)
* capacity registered to your cluster.
*
* A task can use either a launch type or a capacity provider strategy. If a launchType
is
* specified, the capacityProviderStrategy
parameter must be omitted.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
* @see LaunchType
*/
public void setLaunchType(String launchType) {
this.launchType = launchType;
}
/**
*
* The infrastructure to run your standalone task on. For more information, see Amazon ECS launch types * in the Amazon Elastic Container Service Developer Guide. *
*
* The FARGATE
launch type runs your tasks on Fargate On-Demand infrastructure.
*
* Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more * information, see Fargate capacity * providers in the Amazon ECS User Guide for Fargate. *
*
* The EC2
launch type runs your tasks on Amazon EC2 instances registered to your cluster.
*
* The EXTERNAL
launch type runs your tasks on your on-premises server or virtual machine (VM) capacity
* registered to your cluster.
*
* A task can use either a launch type or a capacity provider strategy. If a launchType
is specified,
* the capacityProviderStrategy
parameter must be omitted.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
*
* The FARGATE
launch type runs your tasks on Fargate On-Demand infrastructure.
*
* Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more * information, see Fargate * capacity providers in the Amazon ECS User Guide for Fargate. *
*
* The EC2
launch type runs your tasks on Amazon EC2 instances registered to your cluster.
*
* The EXTERNAL
launch type runs your tasks on your on-premises server or virtual machine (VM)
* capacity registered to your cluster.
*
* A task can use either a launch type or a capacity provider strategy. If a launchType
is
* specified, the capacityProviderStrategy
parameter must be omitted.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
* @see LaunchType
*/
public String getLaunchType() {
return this.launchType;
}
/**
*
* The infrastructure to run your standalone task on. For more information, see Amazon ECS launch types * in the Amazon Elastic Container Service Developer Guide. *
*
* The FARGATE
launch type runs your tasks on Fargate On-Demand infrastructure.
*
* Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more * information, see Fargate capacity * providers in the Amazon ECS User Guide for Fargate. *
*
* The EC2
launch type runs your tasks on Amazon EC2 instances registered to your cluster.
*
* The EXTERNAL
launch type runs your tasks on your on-premises server or virtual machine (VM) capacity
* registered to your cluster.
*
* A task can use either a launch type or a capacity provider strategy. If a launchType
is specified,
* the capacityProviderStrategy
parameter must be omitted.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
*
* The FARGATE
launch type runs your tasks on Fargate On-Demand infrastructure.
*
* Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more * information, see Fargate * capacity providers in the Amazon ECS User Guide for Fargate. *
*
* The EC2
launch type runs your tasks on Amazon EC2 instances registered to your cluster.
*
* The EXTERNAL
launch type runs your tasks on your on-premises server or virtual machine (VM)
* capacity registered to your cluster.
*
* A task can use either a launch type or a capacity provider strategy. If a launchType
is
* specified, the capacityProviderStrategy
parameter must be omitted.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LaunchType
*/
public RunTaskRequest withLaunchType(String launchType) {
setLaunchType(launchType);
return this;
}
/**
*
* The infrastructure to run your standalone task on. For more information, see Amazon ECS launch types * in the Amazon Elastic Container Service Developer Guide. *
*
* The FARGATE
launch type runs your tasks on Fargate On-Demand infrastructure.
*
* Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more * information, see Fargate capacity * providers in the Amazon ECS User Guide for Fargate. *
*
* The EC2
launch type runs your tasks on Amazon EC2 instances registered to your cluster.
*
* The EXTERNAL
launch type runs your tasks on your on-premises server or virtual machine (VM) capacity
* registered to your cluster.
*
* A task can use either a launch type or a capacity provider strategy. If a launchType
is specified,
* the capacityProviderStrategy
parameter must be omitted.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
*
* The FARGATE
launch type runs your tasks on Fargate On-Demand infrastructure.
*
* Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more * information, see Fargate * capacity providers in the Amazon ECS User Guide for Fargate. *
*
* The EC2
launch type runs your tasks on Amazon EC2 instances registered to your cluster.
*
* The EXTERNAL
launch type runs your tasks on your on-premises server or virtual machine (VM)
* capacity registered to your cluster.
*
* A task can use either a launch type or a capacity provider strategy. If a launchType
is
* specified, the capacityProviderStrategy
parameter must be omitted.
*
* When you use cluster auto scaling, you must specify capacityProviderStrategy
and not
* launchType
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LaunchType
*/
public RunTaskRequest withLaunchType(LaunchType launchType) {
this.launchType = launchType.toString();
return this;
}
/**
*
* The network configuration for the task. This parameter is required for task definitions that use the
* awsvpc
network mode to receive their own elastic network interface, and it isn't supported for other
* network modes. For more information, see Task networking in
* the Amazon Elastic Container Service Developer Guide.
*
awsvpc
network mode to receive their own elastic network interface, and it isn't supported
* for other network modes. For more information, see Task
* networking in the Amazon Elastic Container Service Developer Guide.
*/
public void setNetworkConfiguration(NetworkConfiguration networkConfiguration) {
this.networkConfiguration = networkConfiguration;
}
/**
*
* The network configuration for the task. This parameter is required for task definitions that use the
* awsvpc
network mode to receive their own elastic network interface, and it isn't supported for other
* network modes. For more information, see Task networking in
* the Amazon Elastic Container Service Developer Guide.
*
awsvpc
network mode to receive their own elastic network interface, and it isn't supported
* for other network modes. For more information, see Task
* networking in the Amazon Elastic Container Service Developer Guide.
*/
public NetworkConfiguration getNetworkConfiguration() {
return this.networkConfiguration;
}
/**
*
* The network configuration for the task. This parameter is required for task definitions that use the
* awsvpc
network mode to receive their own elastic network interface, and it isn't supported for other
* network modes. For more information, see Task networking in
* the Amazon Elastic Container Service Developer Guide.
*
awsvpc
network mode to receive their own elastic network interface, and it isn't supported
* for other network modes. For more information, see Task
* networking in the Amazon Elastic Container Service Developer Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RunTaskRequest withNetworkConfiguration(NetworkConfiguration networkConfiguration) {
setNetworkConfiguration(networkConfiguration);
return this;
}
/**
*
* A list of container overrides in JSON format that specify the name of a container in the specified task
* definition and the overrides it should receive. You can override the default command for a container (that's
* specified in the task definition or Docker image) with a command
override. You can also override
* existing environment variables (that are specified in the task definition or Docker image) on a container or add
* new environment variables to it with an environment
override.
*
* A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the * override structure. *
* * @param overrides * A list of container overrides in JSON format that specify the name of a container in the specified task * definition and the overrides it should receive. You can override the default command for a container * (that's specified in the task definition or Docker image) with acommand
override. You can
* also override existing environment variables (that are specified in the task definition or Docker image)
* on a container or add new environment variables to it with an environment
override.
* * A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters * of the override structure. */ public void setOverrides(TaskOverride overrides) { this.overrides = overrides; } /** *
* A list of container overrides in JSON format that specify the name of a container in the specified task
* definition and the overrides it should receive. You can override the default command for a container (that's
* specified in the task definition or Docker image) with a command
override. You can also override
* existing environment variables (that are specified in the task definition or Docker image) on a container or add
* new environment variables to it with an environment
override.
*
* A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the * override structure. *
* * @return A list of container overrides in JSON format that specify the name of a container in the specified task * definition and the overrides it should receive. You can override the default command for a container * (that's specified in the task definition or Docker image) with acommand
override. You can
* also override existing environment variables (that are specified in the task definition or Docker image)
* on a container or add new environment variables to it with an environment
override.
* * A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters * of the override structure. */ public TaskOverride getOverrides() { return this.overrides; } /** *
* A list of container overrides in JSON format that specify the name of a container in the specified task
* definition and the overrides it should receive. You can override the default command for a container (that's
* specified in the task definition or Docker image) with a command
override. You can also override
* existing environment variables (that are specified in the task definition or Docker image) on a container or add
* new environment variables to it with an environment
override.
*
* A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the * override structure. *
* * @param overrides * A list of container overrides in JSON format that specify the name of a container in the specified task * definition and the overrides it should receive. You can override the default command for a container * (that's specified in the task definition or Docker image) with acommand
override. You can
* also override existing environment variables (that are specified in the task definition or Docker image)
* on a container or add new environment variables to it with an environment
override.
* * A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters * of the override structure. * @return Returns a reference to this object so that method calls can be chained together. */ public RunTaskRequest withOverrides(TaskOverride overrides) { setOverrides(overrides); return this; } /** *
* An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task * (including constraints in the task definition and those specified at runtime). *
* * @return An array of placement constraint objects to use for the task. You can specify up to 10 constraints for * each task (including constraints in the task definition and those specified at runtime). */ public java.util.List* An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task * (including constraints in the task definition and those specified at runtime). *
* * @param placementConstraints * An array of placement constraint objects to use for the task. You can specify up to 10 constraints for * each task (including constraints in the task definition and those specified at runtime). */ public void setPlacementConstraints(java.util.Collection* An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task * (including constraints in the task definition and those specified at runtime). *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPlacementConstraints(java.util.Collection)} or {@link #withPlacementConstraints(java.util.Collection)} * if you want to override the existing values. *
* * @param placementConstraints * An array of placement constraint objects to use for the task. You can specify up to 10 constraints for * each task (including constraints in the task definition and those specified at runtime). * @return Returns a reference to this object so that method calls can be chained together. */ public RunTaskRequest withPlacementConstraints(PlacementConstraint... placementConstraints) { if (this.placementConstraints == null) { setPlacementConstraints(new com.amazonaws.internal.SdkInternalList* An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task * (including constraints in the task definition and those specified at runtime). *
* * @param placementConstraints * An array of placement constraint objects to use for the task. You can specify up to 10 constraints for * each task (including constraints in the task definition and those specified at runtime). * @return Returns a reference to this object so that method calls can be chained together. */ public RunTaskRequest withPlacementConstraints(java.util.Collection* The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. *
* * @return The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for * each task. */ public java.util.List* The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. *
* * @param placementStrategy * The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each * task. */ public void setPlacementStrategy(java.util.Collection* The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPlacementStrategy(java.util.Collection)} or {@link #withPlacementStrategy(java.util.Collection)} if * you want to override the existing values. *
* * @param placementStrategy * The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each * task. * @return Returns a reference to this object so that method calls can be chained together. */ public RunTaskRequest withPlacementStrategy(PlacementStrategy... placementStrategy) { if (this.placementStrategy == null) { setPlacementStrategy(new com.amazonaws.internal.SdkInternalList* The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. *
* * @param placementStrategy * The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each * task. * @return Returns a reference to this object so that method calls can be chained together. */ public RunTaskRequest withPlacementStrategy(java.util.Collection
* The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one
* isn't specified, the LATEST
platform version is used. For more information, see Fargate platform
* versions in the Amazon Elastic Container Service Developer Guide.
*
LATEST
platform version is used. For more information, see Fargate platform
* versions in the Amazon Elastic Container Service Developer Guide.
*/
public void setPlatformVersion(String platformVersion) {
this.platformVersion = platformVersion;
}
/**
*
* The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one
* isn't specified, the LATEST
platform version is used. For more information, see Fargate platform
* versions in the Amazon Elastic Container Service Developer Guide.
*
LATEST
platform version is used. For more information, see Fargate
* platform versions in the Amazon Elastic Container Service Developer Guide.
*/
public String getPlatformVersion() {
return this.platformVersion;
}
/**
*
* The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one
* isn't specified, the LATEST
platform version is used. For more information, see Fargate platform
* versions in the Amazon Elastic Container Service Developer Guide.
*
LATEST
platform version is used. For more information, see Fargate platform
* versions in the Amazon Elastic Container Service Developer Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RunTaskRequest withPlatformVersion(String platformVersion) {
setPlatformVersion(platformVersion);
return this;
}
/**
* * Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags * aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task * creation, use the TagResource API action. *
*
* An error will be received if you specify the SERVICE
option when running a task.
*
* An error will be received if you specify the SERVICE
option when running a task.
*
* Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags * aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task * creation, use the TagResource API action. *
*
* An error will be received if you specify the SERVICE
option when running a task.
*
* An error will be received if you specify the SERVICE
option when running a task.
*
* Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags * aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task * creation, use the TagResource API action. *
*
* An error will be received if you specify the SERVICE
option when running a task.
*
* An error will be received if you specify the SERVICE
option when running a task.
*
* Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags * aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task * creation, use the TagResource API action. *
*
* An error will be received if you specify the SERVICE
option when running a task.
*
* An error will be received if you specify the SERVICE
option when running a task.
*
* The reference ID to use for the task. The reference ID can have a maximum length of 1024 characters. *
* * @param referenceId * The reference ID to use for the task. The reference ID can have a maximum length of 1024 characters. */ public void setReferenceId(String referenceId) { this.referenceId = referenceId; } /** ** The reference ID to use for the task. The reference ID can have a maximum length of 1024 characters. *
* * @return The reference ID to use for the task. The reference ID can have a maximum length of 1024 characters. */ public String getReferenceId() { return this.referenceId; } /** ** The reference ID to use for the task. The reference ID can have a maximum length of 1024 characters. *
* * @param referenceId * The reference ID to use for the task. The reference ID can have a maximum length of 1024 characters. * @return Returns a reference to this object so that method calls can be chained together. */ public RunTaskRequest withReferenceId(String referenceId) { setReferenceId(referenceId); return this; } /** *
* An optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch
* process job, you could apply a unique identifier for that job to your task with the startedBy
* parameter. You can then identify which tasks belong to that job by filtering the results of a ListTasks
* call with the startedBy
value. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), and
* underscores (_) are allowed.
*
* If a task is started by an Amazon ECS service, then the startedBy
parameter contains the deployment
* ID of the service that starts it.
*
startedBy
parameter. You can then identify which tasks belong to that job by filtering the
* results of a ListTasks call with the startedBy
value. Up to 36 letters (uppercase and
* lowercase), numbers, hyphens (-), and underscores (_) are allowed.
*
* If a task is started by an Amazon ECS service, then the startedBy
parameter contains the
* deployment ID of the service that starts it.
*/
public void setStartedBy(String startedBy) {
this.startedBy = startedBy;
}
/**
*
* An optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch
* process job, you could apply a unique identifier for that job to your task with the startedBy
* parameter. You can then identify which tasks belong to that job by filtering the results of a ListTasks
* call with the startedBy
value. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), and
* underscores (_) are allowed.
*
* If a task is started by an Amazon ECS service, then the startedBy
parameter contains the deployment
* ID of the service that starts it.
*
startedBy
parameter. You can then identify which tasks belong to that job by filtering the
* results of a ListTasks call with the startedBy
value. Up to 36 letters (uppercase and
* lowercase), numbers, hyphens (-), and underscores (_) are allowed.
*
* If a task is started by an Amazon ECS service, then the startedBy
parameter contains the
* deployment ID of the service that starts it.
*/
public String getStartedBy() {
return this.startedBy;
}
/**
*
* An optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch
* process job, you could apply a unique identifier for that job to your task with the startedBy
* parameter. You can then identify which tasks belong to that job by filtering the results of a ListTasks
* call with the startedBy
value. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), and
* underscores (_) are allowed.
*
* If a task is started by an Amazon ECS service, then the startedBy
parameter contains the deployment
* ID of the service that starts it.
*
startedBy
parameter. You can then identify which tasks belong to that job by filtering the
* results of a ListTasks call with the startedBy
value. Up to 36 letters (uppercase and
* lowercase), numbers, hyphens (-), and underscores (_) are allowed.
*
* If a task is started by an Amazon ECS service, then the startedBy
parameter contains the
* deployment ID of the service that starts it.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RunTaskRequest withStartedBy(String startedBy) {
setStartedBy(startedBy);
return this;
}
/**
*
* The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and * an optional value, both of which you define. *
** The following basic restrictions apply to tags: *
** Maximum number of tags per resource - 50 *
** For each resource, each tag key must be unique, and each tag key can have only one value. *
** Maximum key length - 128 Unicode characters in UTF-8 *
** Maximum value length - 256 Unicode characters in UTF-8 *
** If your tagging schema is used across multiple services and resources, remember that other services may have * restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable * in UTF-8, and the following characters: + - = . _ : / @. *
** Tag keys and values are case-sensitive. *
*
* Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix for
* either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values
* with this prefix. Tags with this prefix do not count against your tags per resource limit.
*
* The following basic restrictions apply to tags: *
** Maximum number of tags per resource - 50 *
** For each resource, each tag key must be unique, and each tag key can have only one value. *
** Maximum key length - 128 Unicode characters in UTF-8 *
** Maximum value length - 256 Unicode characters in UTF-8 *
** If your tagging schema is used across multiple services and resources, remember that other services may * have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces * representable in UTF-8, and the following characters: + - = . _ : / @. *
** Tag keys and values are case-sensitive. *
*
* Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a
* prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete
* tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource
* limit.
*
* The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and * an optional value, both of which you define. *
** The following basic restrictions apply to tags: *
** Maximum number of tags per resource - 50 *
** For each resource, each tag key must be unique, and each tag key can have only one value. *
** Maximum key length - 128 Unicode characters in UTF-8 *
** Maximum value length - 256 Unicode characters in UTF-8 *
** If your tagging schema is used across multiple services and resources, remember that other services may have * restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable * in UTF-8, and the following characters: + - = . _ : / @. *
** Tag keys and values are case-sensitive. *
*
* Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix for
* either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values
* with this prefix. Tags with this prefix do not count against your tags per resource limit.
*
* The following basic restrictions apply to tags: *
** Maximum number of tags per resource - 50 *
** For each resource, each tag key must be unique, and each tag key can have only one value. *
** Maximum key length - 128 Unicode characters in UTF-8 *
** Maximum value length - 256 Unicode characters in UTF-8 *
** If your tagging schema is used across multiple services and resources, remember that other services may * have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces * representable in UTF-8, and the following characters: + - = . _ : / @. *
** Tag keys and values are case-sensitive. *
*
* Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix
* for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag
* keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
*
* The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and * an optional value, both of which you define. *
** The following basic restrictions apply to tags: *
** Maximum number of tags per resource - 50 *
** For each resource, each tag key must be unique, and each tag key can have only one value. *
** Maximum key length - 128 Unicode characters in UTF-8 *
** Maximum value length - 256 Unicode characters in UTF-8 *
** If your tagging schema is used across multiple services and resources, remember that other services may have * restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable * in UTF-8, and the following characters: + - = . _ : / @. *
** Tag keys and values are case-sensitive. *
*
* Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix for
* either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values
* with this prefix. Tags with this prefix do not count against your tags per resource limit.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a * key and an optional value, both of which you define. ** The following basic restrictions apply to tags: *
** Maximum number of tags per resource - 50 *
** For each resource, each tag key must be unique, and each tag key can have only one value. *
** Maximum key length - 128 Unicode characters in UTF-8 *
** Maximum value length - 256 Unicode characters in UTF-8 *
** If your tagging schema is used across multiple services and resources, remember that other services may * have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces * representable in UTF-8, and the following characters: + - = . _ : / @. *
** Tag keys and values are case-sensitive. *
*
* Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix
* for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag
* keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
*
* The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and * an optional value, both of which you define. *
** The following basic restrictions apply to tags: *
** Maximum number of tags per resource - 50 *
** For each resource, each tag key must be unique, and each tag key can have only one value. *
** Maximum key length - 128 Unicode characters in UTF-8 *
** Maximum value length - 256 Unicode characters in UTF-8 *
** If your tagging schema is used across multiple services and resources, remember that other services may have * restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable * in UTF-8, and the following characters: + - = . _ : / @. *
** Tag keys and values are case-sensitive. *
*
* Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix for
* either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values
* with this prefix. Tags with this prefix do not count against your tags per resource limit.
*
* The following basic restrictions apply to tags: *
** Maximum number of tags per resource - 50 *
** For each resource, each tag key must be unique, and each tag key can have only one value. *
** Maximum key length - 128 Unicode characters in UTF-8 *
** Maximum value length - 256 Unicode characters in UTF-8 *
** If your tagging schema is used across multiple services and resources, remember that other services may * have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces * representable in UTF-8, and the following characters: + - = . _ : / @. *
** Tag keys and values are case-sensitive. *
*
* Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix
* for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag
* keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
*
* The family
and revision
(family:revision
) or full ARN of the task
* definition to run. If a revision
isn't specified, the latest ACTIVE
revision is used.
*
* When you create a policy for run-task, you can set the resource to be the latest task definition revision, or a * specific revision. *
*
* The full ARN value must match the value that you specified as the Resource
of the principal's
* permissions policy.
*
* When you specify the policy resource as the latest task definition version (by setting the Resource
* in the policy to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
), then set this
* value to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
.
*
* When you specify the policy resource as a specific task definition version (by setting the Resource
* in the policy to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
or
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*
), then set this value to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
.
*
* For more information, see Policy Resources for Amazon ECS in the Amazon Elastic Container Service developer Guide. *
* * @param taskDefinition * Thefamily
and revision
(family:revision
) or full ARN of the task
* definition to run. If a revision
isn't specified, the latest ACTIVE
revision is
* used.
* * When you create a policy for run-task, you can set the resource to be the latest task definition revision, * or a specific revision. *
*
* The full ARN value must match the value that you specified as the Resource
of the principal's
* permissions policy.
*
* When you specify the policy resource as the latest task definition version (by setting the
* Resource
in the policy to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
), then set this value to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
.
*
* When you specify the policy resource as a specific task definition version (by setting the
* Resource
in the policy to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
or
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*
), then set this value to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
.
*
* For more information, see Policy Resources for Amazon ECS in the Amazon Elastic Container Service developer Guide. */ public void setTaskDefinition(String taskDefinition) { this.taskDefinition = taskDefinition; } /** *
* The family
and revision
(family:revision
) or full ARN of the task
* definition to run. If a revision
isn't specified, the latest ACTIVE
revision is used.
*
* When you create a policy for run-task, you can set the resource to be the latest task definition revision, or a * specific revision. *
*
* The full ARN value must match the value that you specified as the Resource
of the principal's
* permissions policy.
*
* When you specify the policy resource as the latest task definition version (by setting the Resource
* in the policy to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
), then set this
* value to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
.
*
* When you specify the policy resource as a specific task definition version (by setting the Resource
* in the policy to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
or
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*
), then set this value to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
.
*
* For more information, see Policy Resources for Amazon ECS in the Amazon Elastic Container Service developer Guide. *
* * @return Thefamily
and revision
(family:revision
) or full ARN of the task
* definition to run. If a revision
isn't specified, the latest ACTIVE
revision is
* used.
* * When you create a policy for run-task, you can set the resource to be the latest task definition * revision, or a specific revision. *
*
* The full ARN value must match the value that you specified as the Resource
of the
* principal's permissions policy.
*
* When you specify the policy resource as the latest task definition version (by setting the
* Resource
in the policy to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
), then set this value to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
.
*
* When you specify the policy resource as a specific task definition version (by setting the
* Resource
in the policy to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
or
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*
), then set this value to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
.
*
* For more information, see Policy Resources for Amazon ECS in the Amazon Elastic Container Service developer Guide. */ public String getTaskDefinition() { return this.taskDefinition; } /** *
* The family
and revision
(family:revision
) or full ARN of the task
* definition to run. If a revision
isn't specified, the latest ACTIVE
revision is used.
*
* When you create a policy for run-task, you can set the resource to be the latest task definition revision, or a * specific revision. *
*
* The full ARN value must match the value that you specified as the Resource
of the principal's
* permissions policy.
*
* When you specify the policy resource as the latest task definition version (by setting the Resource
* in the policy to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
), then set this
* value to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
.
*
* When you specify the policy resource as a specific task definition version (by setting the Resource
* in the policy to arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
or
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*
), then set this value to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
.
*
* For more information, see Policy Resources for Amazon ECS in the Amazon Elastic Container Service developer Guide. *
* * @param taskDefinition * Thefamily
and revision
(family:revision
) or full ARN of the task
* definition to run. If a revision
isn't specified, the latest ACTIVE
revision is
* used.
* * When you create a policy for run-task, you can set the resource to be the latest task definition revision, * or a specific revision. *
*
* The full ARN value must match the value that you specified as the Resource
of the principal's
* permissions policy.
*
* When you specify the policy resource as the latest task definition version (by setting the
* Resource
in the policy to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
), then set this value to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName
.
*
* When you specify the policy resource as a specific task definition version (by setting the
* Resource
in the policy to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
or
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*
), then set this value to
* arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:1
.
*
* For more information, see Policy Resources for Amazon ECS in the Amazon Elastic Container Service developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public RunTaskRequest withTaskDefinition(String taskDefinition) { setTaskDefinition(taskDefinition); 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 (getCapacityProviderStrategy() != null) sb.append("CapacityProviderStrategy: ").append(getCapacityProviderStrategy()).append(","); if (getCluster() != null) sb.append("Cluster: ").append(getCluster()).append(","); if (getCount() != null) sb.append("Count: ").append(getCount()).append(","); if (getEnableECSManagedTags() != null) sb.append("EnableECSManagedTags: ").append(getEnableECSManagedTags()).append(","); if (getEnableExecuteCommand() != null) sb.append("EnableExecuteCommand: ").append(getEnableExecuteCommand()).append(","); if (getGroup() != null) sb.append("Group: ").append(getGroup()).append(","); if (getLaunchType() != null) sb.append("LaunchType: ").append(getLaunchType()).append(","); if (getNetworkConfiguration() != null) sb.append("NetworkConfiguration: ").append(getNetworkConfiguration()).append(","); if (getOverrides() != null) sb.append("Overrides: ").append(getOverrides()).append(","); if (getPlacementConstraints() != null) sb.append("PlacementConstraints: ").append(getPlacementConstraints()).append(","); if (getPlacementStrategy() != null) sb.append("PlacementStrategy: ").append(getPlacementStrategy()).append(","); if (getPlatformVersion() != null) sb.append("PlatformVersion: ").append(getPlatformVersion()).append(","); if (getPropagateTags() != null) sb.append("PropagateTags: ").append(getPropagateTags()).append(","); if (getReferenceId() != null) sb.append("ReferenceId: ").append(getReferenceId()).append(","); if (getStartedBy() != null) sb.append("StartedBy: ").append(getStartedBy()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getTaskDefinition() != null) sb.append("TaskDefinition: ").append(getTaskDefinition()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RunTaskRequest == false) return false; RunTaskRequest other = (RunTaskRequest) obj; if (other.getCapacityProviderStrategy() == null ^ this.getCapacityProviderStrategy() == null) return false; if (other.getCapacityProviderStrategy() != null && other.getCapacityProviderStrategy().equals(this.getCapacityProviderStrategy()) == false) return false; if (other.getCluster() == null ^ this.getCluster() == null) return false; if (other.getCluster() != null && other.getCluster().equals(this.getCluster()) == false) return false; if (other.getCount() == null ^ this.getCount() == null) return false; if (other.getCount() != null && other.getCount().equals(this.getCount()) == false) return false; if (other.getEnableECSManagedTags() == null ^ this.getEnableECSManagedTags() == null) return false; if (other.getEnableECSManagedTags() != null && other.getEnableECSManagedTags().equals(this.getEnableECSManagedTags()) == false) return false; if (other.getEnableExecuteCommand() == null ^ this.getEnableExecuteCommand() == null) return false; if (other.getEnableExecuteCommand() != null && other.getEnableExecuteCommand().equals(this.getEnableExecuteCommand()) == false) return false; if (other.getGroup() == null ^ this.getGroup() == null) return false; if (other.getGroup() != null && other.getGroup().equals(this.getGroup()) == false) return false; if (other.getLaunchType() == null ^ this.getLaunchType() == null) return false; if (other.getLaunchType() != null && other.getLaunchType().equals(this.getLaunchType()) == false) return false; if (other.getNetworkConfiguration() == null ^ this.getNetworkConfiguration() == null) return false; if (other.getNetworkConfiguration() != null && other.getNetworkConfiguration().equals(this.getNetworkConfiguration()) == false) return false; if (other.getOverrides() == null ^ this.getOverrides() == null) return false; if (other.getOverrides() != null && other.getOverrides().equals(this.getOverrides()) == false) return false; if (other.getPlacementConstraints() == null ^ this.getPlacementConstraints() == null) return false; if (other.getPlacementConstraints() != null && other.getPlacementConstraints().equals(this.getPlacementConstraints()) == false) return false; if (other.getPlacementStrategy() == null ^ this.getPlacementStrategy() == null) return false; if (other.getPlacementStrategy() != null && other.getPlacementStrategy().equals(this.getPlacementStrategy()) == false) return false; if (other.getPlatformVersion() == null ^ this.getPlatformVersion() == null) return false; if (other.getPlatformVersion() != null && other.getPlatformVersion().equals(this.getPlatformVersion()) == 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.getReferenceId() == null ^ this.getReferenceId() == null) return false; if (other.getReferenceId() != null && other.getReferenceId().equals(this.getReferenceId()) == false) return false; if (other.getStartedBy() == null ^ this.getStartedBy() == null) return false; if (other.getStartedBy() != null && other.getStartedBy().equals(this.getStartedBy()) == 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.getTaskDefinition() == null ^ this.getTaskDefinition() == null) return false; if (other.getTaskDefinition() != null && other.getTaskDefinition().equals(this.getTaskDefinition()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCapacityProviderStrategy() == null) ? 0 : getCapacityProviderStrategy().hashCode()); hashCode = prime * hashCode + ((getCluster() == null) ? 0 : getCluster().hashCode()); hashCode = prime * hashCode + ((getCount() == null) ? 0 : getCount().hashCode()); hashCode = prime * hashCode + ((getEnableECSManagedTags() == null) ? 0 : getEnableECSManagedTags().hashCode()); hashCode = prime * hashCode + ((getEnableExecuteCommand() == null) ? 0 : getEnableExecuteCommand().hashCode()); hashCode = prime * hashCode + ((getGroup() == null) ? 0 : getGroup().hashCode()); hashCode = prime * hashCode + ((getLaunchType() == null) ? 0 : getLaunchType().hashCode()); hashCode = prime * hashCode + ((getNetworkConfiguration() == null) ? 0 : getNetworkConfiguration().hashCode()); hashCode = prime * hashCode + ((getOverrides() == null) ? 0 : getOverrides().hashCode()); hashCode = prime * hashCode + ((getPlacementConstraints() == null) ? 0 : getPlacementConstraints().hashCode()); hashCode = prime * hashCode + ((getPlacementStrategy() == null) ? 0 : getPlacementStrategy().hashCode()); hashCode = prime * hashCode + ((getPlatformVersion() == null) ? 0 : getPlatformVersion().hashCode()); hashCode = prime * hashCode + ((getPropagateTags() == null) ? 0 : getPropagateTags().hashCode()); hashCode = prime * hashCode + ((getReferenceId() == null) ? 0 : getReferenceId().hashCode()); hashCode = prime * hashCode + ((getStartedBy() == null) ? 0 : getStartedBy().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getTaskDefinition() == null) ? 0 : getTaskDefinition().hashCode()); return hashCode; } @Override public RunTaskRequest clone() { return (RunTaskRequest) super.clone(); } }