com.amazonaws.services.ecs.model.StartTaskRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ecs 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.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 StartTaskRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not specify
* a cluster, the default cluster is assumed.
*
*/
private String cluster;
/**
*
* The container instance IDs or full ARN entries for the container instances where you would like to place your
* task. You can specify up to 10 container instances.
*
*/
private com.amazonaws.internal.SdkInternalList containerInstances;
/**
*
* 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;
/**
*
* Whether or not the execute command functionality is turned on for the task. If true
, this turns on
* the execute command functionality on all containers in the task.
*
*/
private Boolean 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).
*
*/
private String group;
/**
*
* The VPC subnet and security group configuration for tasks that receive their own elastic network interface by
* using the awsvpc
networking mode.
*
*/
private NetworkConfiguration networkConfiguration;
/**
*
* A list of container overrides in JSON format that specify the name of a container in the specified task
* definition and the overrides it receives. 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;
/**
*
* Specifies whether to propagate the tags from the task definition or the service to the task. If no value is
* specified, the tags aren't propagated.
*
*/
private String propagateTags;
/**
*
* The reference ID to use for the task.
*
*/
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, the startedBy
parameter contains the deployment ID of
* the service that starts it.
*
*/
private String startedBy;
/**
*
* 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.
*
*
*
*/
private com.amazonaws.internal.SdkInternalList tags;
/**
*
* The family
and revision
(family:revision
) or full ARN of the task
* definition to start. If a revision
isn't specified, the latest ACTIVE
revision is used.
*
*/
private String taskDefinition;
/**
*
* The details of the volume that was configuredAtLaunch
. You can configure the size, volumeType, IOPS,
* throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. The name
of the volume must match the name
from
* the task definition.
*
*/
private com.amazonaws.internal.SdkInternalList volumeConfigurations;
/**
*
* The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not specify
* a cluster, the default cluster is assumed.
*
*
* @param cluster
* The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not
* specify a cluster, the default cluster is assumed.
*/
public void setCluster(String cluster) {
this.cluster = cluster;
}
/**
*
* The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not specify
* a cluster, the default cluster is assumed.
*
*
* @return The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not
* specify a cluster, the default cluster is assumed.
*/
public String getCluster() {
return this.cluster;
}
/**
*
* The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not specify
* a cluster, the default cluster is assumed.
*
*
* @param cluster
* The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not
* specify a cluster, the default cluster is assumed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withCluster(String cluster) {
setCluster(cluster);
return this;
}
/**
*
* The container instance IDs or full ARN entries for the container instances where you would like to place your
* task. You can specify up to 10 container instances.
*
*
* @return The container instance IDs or full ARN entries for the container instances where you would like to place
* your task. You can specify up to 10 container instances.
*/
public java.util.List getContainerInstances() {
if (containerInstances == null) {
containerInstances = new com.amazonaws.internal.SdkInternalList();
}
return containerInstances;
}
/**
*
* The container instance IDs or full ARN entries for the container instances where you would like to place your
* task. You can specify up to 10 container instances.
*
*
* @param containerInstances
* The container instance IDs or full ARN entries for the container instances where you would like to place
* your task. You can specify up to 10 container instances.
*/
public void setContainerInstances(java.util.Collection containerInstances) {
if (containerInstances == null) {
this.containerInstances = null;
return;
}
this.containerInstances = new com.amazonaws.internal.SdkInternalList(containerInstances);
}
/**
*
* The container instance IDs or full ARN entries for the container instances where you would like to place your
* task. You can specify up to 10 container instances.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setContainerInstances(java.util.Collection)} or {@link #withContainerInstances(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param containerInstances
* The container instance IDs or full ARN entries for the container instances where you would like to place
* your task. You can specify up to 10 container instances.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withContainerInstances(String... containerInstances) {
if (this.containerInstances == null) {
setContainerInstances(new com.amazonaws.internal.SdkInternalList(containerInstances.length));
}
for (String ele : containerInstances) {
this.containerInstances.add(ele);
}
return this;
}
/**
*
* The container instance IDs or full ARN entries for the container instances where you would like to place your
* task. You can specify up to 10 container instances.
*
*
* @param containerInstances
* The container instance IDs or full ARN entries for the container instances where you would like to place
* your task. You can specify up to 10 container instances.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withContainerInstances(java.util.Collection containerInstances) {
setContainerInstances(containerInstances);
return this;
}
/**
*
* 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.
*
*
* @param enableECSManagedTags
* 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.
*/
public void setEnableECSManagedTags(Boolean enableECSManagedTags) {
this.enableECSManagedTags = enableECSManagedTags;
}
/**
*
* 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.
*
*
* @return 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.
*/
public Boolean getEnableECSManagedTags() {
return this.enableECSManagedTags;
}
/**
*
* 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.
*
*
* @param enableECSManagedTags
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withEnableECSManagedTags(Boolean enableECSManagedTags) {
setEnableECSManagedTags(enableECSManagedTags);
return this;
}
/**
*
* 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.
*
*
* @return 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.
*/
public Boolean isEnableECSManagedTags() {
return this.enableECSManagedTags;
}
/**
*
* Whether or not the execute command functionality is turned on for the task. If true
, this turns on
* the execute command functionality on all containers in the task.
*
*
* @param enableExecuteCommand
* Whether or not the execute command functionality is turned on for the task. If true
, this
* turns on the execute command functionality on all containers in the task.
*/
public void setEnableExecuteCommand(Boolean enableExecuteCommand) {
this.enableExecuteCommand = enableExecuteCommand;
}
/**
*
* Whether or not the execute command functionality is turned on for the task. If true
, this turns on
* the execute command functionality on all containers in the task.
*
*
* @return Whether or not the execute command functionality is turned on for the task. If true
, this
* turns on the execute command functionality on all containers in the task.
*/
public Boolean getEnableExecuteCommand() {
return this.enableExecuteCommand;
}
/**
*
* Whether or not the execute command functionality is turned on for the task. If true
, this turns on
* the execute command functionality on all containers in the task.
*
*
* @param enableExecuteCommand
* Whether or not the execute command functionality is turned on for the task. If true
, this
* turns on the execute command functionality on all containers in the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withEnableExecuteCommand(Boolean enableExecuteCommand) {
setEnableExecuteCommand(enableExecuteCommand);
return this;
}
/**
*
* Whether or not the execute command functionality is turned on for the task. If true
, this turns on
* the execute command functionality on all containers in the task.
*
*
* @return Whether or not the execute command functionality is turned on for the task. If true
, this
* turns on the execute command functionality on all containers in the task.
*/
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).
*
*
* @param 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).
*/
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).
*
*
* @return 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).
*/
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).
*
*
* @param 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).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withGroup(String group) {
setGroup(group);
return this;
}
/**
*
* The VPC subnet and security group configuration for tasks that receive their own elastic network interface by
* using the awsvpc
networking mode.
*
*
* @param networkConfiguration
* The VPC subnet and security group configuration for tasks that receive their own elastic network interface
* by using the awsvpc
networking mode.
*/
public void setNetworkConfiguration(NetworkConfiguration networkConfiguration) {
this.networkConfiguration = networkConfiguration;
}
/**
*
* The VPC subnet and security group configuration for tasks that receive their own elastic network interface by
* using the awsvpc
networking mode.
*
*
* @return The VPC subnet and security group configuration for tasks that receive their own elastic network
* interface by using the awsvpc
networking mode.
*/
public NetworkConfiguration getNetworkConfiguration() {
return this.networkConfiguration;
}
/**
*
* The VPC subnet and security group configuration for tasks that receive their own elastic network interface by
* using the awsvpc
networking mode.
*
*
* @param networkConfiguration
* The VPC subnet and security group configuration for tasks that receive their own elastic network interface
* by using the awsvpc
networking mode.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest 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 receives. 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 receives. 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.
*
*/
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 receives. 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 receives. 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.
*
*/
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 receives. 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 receives. 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 Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withOverrides(TaskOverride overrides) {
setOverrides(overrides);
return this;
}
/**
*
* Specifies whether to propagate the tags from the task definition or the service to the task. If no value is
* specified, the tags aren't propagated.
*
*
* @param propagateTags
* Specifies whether to propagate the tags from the task definition or the service to the task. If no value
* is specified, the tags aren't propagated.
* @see PropagateTags
*/
public void setPropagateTags(String propagateTags) {
this.propagateTags = propagateTags;
}
/**
*
* Specifies whether to propagate the tags from the task definition or the service to the task. If no value is
* specified, the tags aren't propagated.
*
*
* @return Specifies whether to propagate the tags from the task definition or the service to the task. If no value
* is specified, the tags aren't propagated.
* @see PropagateTags
*/
public String getPropagateTags() {
return this.propagateTags;
}
/**
*
* Specifies whether to propagate the tags from the task definition or the service to the task. If no value is
* specified, the tags aren't propagated.
*
*
* @param propagateTags
* Specifies whether to propagate the tags from the task definition or the service to the task. If no value
* is specified, the tags aren't propagated.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PropagateTags
*/
public StartTaskRequest withPropagateTags(String propagateTags) {
setPropagateTags(propagateTags);
return this;
}
/**
*
* Specifies whether to propagate the tags from the task definition or the service to the task. If no value is
* specified, the tags aren't propagated.
*
*
* @param propagateTags
* Specifies whether to propagate the tags from the task definition or the service to the task. If no value
* is specified, the tags aren't propagated.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PropagateTags
*/
public StartTaskRequest withPropagateTags(PropagateTags propagateTags) {
this.propagateTags = propagateTags.toString();
return this;
}
/**
*
* The reference ID to use for the task.
*
*
* @param referenceId
* The reference ID to use for the task.
*/
public void setReferenceId(String referenceId) {
this.referenceId = referenceId;
}
/**
*
* The reference ID to use for the task.
*
*
* @return The reference ID to use for the task.
*/
public String getReferenceId() {
return this.referenceId;
}
/**
*
* The reference ID to use for the task.
*
*
* @param referenceId
* The reference ID to use for the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest 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, the startedBy
parameter contains the deployment ID of
* the service that starts it.
*
*
* @param 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, 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, the startedBy
parameter contains the deployment ID of
* the service that starts it.
*
*
* @return 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, 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, the startedBy
parameter contains the deployment ID of
* the service that starts it.
*
*
* @param 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, 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 StartTaskRequest 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.
*
*
*
*
* @return 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.
*
*
*/
public java.util.List getTags() {
if (tags == null) {
tags = new com.amazonaws.internal.SdkInternalList();
}
return 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.
*
*
*
*
* @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.
*
*
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new com.amazonaws.internal.SdkInternalList(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.
*
*
*
*
* 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.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new com.amazonaws.internal.SdkInternalList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
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.
*
*
*
*
* @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.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* The family
and revision
(family:revision
) or full ARN of the task
* definition to start. If a revision
isn't specified, the latest ACTIVE
revision is used.
*
*
* @param taskDefinition
* The family
and revision
(family:revision
) or full ARN of the task
* definition to start. If a revision
isn't specified, the latest ACTIVE
revision
* is used.
*/
public void setTaskDefinition(String taskDefinition) {
this.taskDefinition = taskDefinition;
}
/**
*
* The family
and revision
(family:revision
) or full ARN of the task
* definition to start. If a revision
isn't specified, the latest ACTIVE
revision is used.
*
*
* @return The family
and revision
(family:revision
) or full ARN of the task
* definition to start. If a revision
isn't specified, the latest ACTIVE
revision
* is used.
*/
public String getTaskDefinition() {
return this.taskDefinition;
}
/**
*
* The family
and revision
(family:revision
) or full ARN of the task
* definition to start. If a revision
isn't specified, the latest ACTIVE
revision is used.
*
*
* @param taskDefinition
* The family
and revision
(family:revision
) or full ARN of the task
* definition to start. If a revision
isn't specified, the latest ACTIVE
revision
* is used.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withTaskDefinition(String taskDefinition) {
setTaskDefinition(taskDefinition);
return this;
}
/**
*
* The details of the volume that was configuredAtLaunch
. You can configure the size, volumeType, IOPS,
* throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. The name
of the volume must match the name
from
* the task definition.
*
*
* @return The details of the volume that was configuredAtLaunch
. You can configure the size,
* volumeType, IOPS, throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. The name
of the volume must match the
* name
from the task definition.
*/
public java.util.List getVolumeConfigurations() {
if (volumeConfigurations == null) {
volumeConfigurations = new com.amazonaws.internal.SdkInternalList();
}
return volumeConfigurations;
}
/**
*
* The details of the volume that was configuredAtLaunch
. You can configure the size, volumeType, IOPS,
* throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. The name
of the volume must match the name
from
* the task definition.
*
*
* @param volumeConfigurations
* The details of the volume that was configuredAtLaunch
. You can configure the size,
* volumeType, IOPS, throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. The name
of the volume must match the
* name
from the task definition.
*/
public void setVolumeConfigurations(java.util.Collection volumeConfigurations) {
if (volumeConfigurations == null) {
this.volumeConfigurations = null;
return;
}
this.volumeConfigurations = new com.amazonaws.internal.SdkInternalList(volumeConfigurations);
}
/**
*
* The details of the volume that was configuredAtLaunch
. You can configure the size, volumeType, IOPS,
* throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. The name
of the volume must match the name
from
* the task definition.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setVolumeConfigurations(java.util.Collection)} or {@link #withVolumeConfigurations(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param volumeConfigurations
* The details of the volume that was configuredAtLaunch
. You can configure the size,
* volumeType, IOPS, throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. The name
of the volume must match the
* name
from the task definition.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withVolumeConfigurations(TaskVolumeConfiguration... volumeConfigurations) {
if (this.volumeConfigurations == null) {
setVolumeConfigurations(new com.amazonaws.internal.SdkInternalList(volumeConfigurations.length));
}
for (TaskVolumeConfiguration ele : volumeConfigurations) {
this.volumeConfigurations.add(ele);
}
return this;
}
/**
*
* The details of the volume that was configuredAtLaunch
. You can configure the size, volumeType, IOPS,
* throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. The name
of the volume must match the name
from
* the task definition.
*
*
* @param volumeConfigurations
* The details of the volume that was configuredAtLaunch
. You can configure the size,
* volumeType, IOPS, throughput, snapshot and encryption in TaskManagedEBSVolumeConfiguration. The name
of the volume must match the
* name
from the task definition.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTaskRequest withVolumeConfigurations(java.util.Collection volumeConfigurations) {
setVolumeConfigurations(volumeConfigurations);
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 (getCluster() != null)
sb.append("Cluster: ").append(getCluster()).append(",");
if (getContainerInstances() != null)
sb.append("ContainerInstances: ").append(getContainerInstances()).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 (getNetworkConfiguration() != null)
sb.append("NetworkConfiguration: ").append(getNetworkConfiguration()).append(",");
if (getOverrides() != null)
sb.append("Overrides: ").append(getOverrides()).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()).append(",");
if (getVolumeConfigurations() != null)
sb.append("VolumeConfigurations: ").append(getVolumeConfigurations());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof StartTaskRequest == false)
return false;
StartTaskRequest other = (StartTaskRequest) obj;
if (other.getCluster() == null ^ this.getCluster() == null)
return false;
if (other.getCluster() != null && other.getCluster().equals(this.getCluster()) == false)
return false;
if (other.getContainerInstances() == null ^ this.getContainerInstances() == null)
return false;
if (other.getContainerInstances() != null && other.getContainerInstances().equals(this.getContainerInstances()) == 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.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.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;
if (other.getVolumeConfigurations() == null ^ this.getVolumeConfigurations() == null)
return false;
if (other.getVolumeConfigurations() != null && other.getVolumeConfigurations().equals(this.getVolumeConfigurations()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCluster() == null) ? 0 : getCluster().hashCode());
hashCode = prime * hashCode + ((getContainerInstances() == null) ? 0 : getContainerInstances().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 + ((getNetworkConfiguration() == null) ? 0 : getNetworkConfiguration().hashCode());
hashCode = prime * hashCode + ((getOverrides() == null) ? 0 : getOverrides().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());
hashCode = prime * hashCode + ((getVolumeConfigurations() == null) ? 0 : getVolumeConfigurations().hashCode());
return hashCode;
}
@Override
public StartTaskRequest clone() {
return (StartTaskRequest) super.clone();
}
}