com.amazonaws.services.ecs.model.Task Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ecs Show documentation
/*
* 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Details on a task in a cluster.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Task implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Elastic Network Adapter that's associated with the task if the task uses the awsvpc
network
* mode.
*
*/
private com.amazonaws.internal.SdkInternalList attachments;
/**
*
* The attributes of the task
*
*/
private com.amazonaws.internal.SdkInternalList attributes;
/**
*
* The Availability Zone for the task.
*
*/
private String availabilityZone;
/**
*
* The capacity provider that's associated with the task.
*
*/
private String capacityProviderName;
/**
*
* The ARN of the cluster that hosts the task.
*
*/
private String clusterArn;
/**
*
* The connectivity status of a task.
*
*/
private String connectivity;
/**
*
* The Unix timestamp for the time when the task last went into CONNECTED
status.
*
*/
private java.util.Date connectivityAt;
/**
*
* The ARN of the container instances that host the task.
*
*/
private String containerInstanceArn;
/**
*
* The containers that's associated with the task.
*
*/
private com.amazonaws.internal.SdkInternalList containers;
/**
*
* The number of CPU units used by the task as expressed in a task definition. It can be expressed as an integer
* using CPU units (for example, 1024
). It can also be expressed as a string using vCPUs (for example,
* 1 vCPU
or 1 vcpu
). String values are converted to an integer that indicates the CPU
* units when the task definition is registered.
*
*
* If you use the EC2 launch type, this field is optional. Supported values are between 128
CPU units (
* 0.125
vCPUs) and 10240
CPU units (10
vCPUs).
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values. These
* values determine the range of supported values for the memory
parameter:
*
*
* The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
*
*
* -
*
* 256 (.25 vCPU) - Available memory
values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
*
*
* -
*
* 512 (.5 vCPU) - Available memory
values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
*
*
* -
*
* 1024 (1 vCPU) - Available memory
values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6
* GB), 7168 (7 GB), 8192 (8 GB)
*
*
* -
*
* 2048 (2 vCPU) - Available memory
values: 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
*
*
* -
*
* 4096 (4 vCPU) - Available memory
values: 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)
*
*
* -
*
* 8192 (8 vCPU) - Available memory
values: 16 GB and 60 GB in 4 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* 16384 (16vCPU) - Available memory
values: 32GB and 120 GB in 8 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*
*/
private String cpu;
/**
*
* The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task
* entered the PENDING
state.
*
*/
private java.util.Date createdAt;
/**
*
* The desired status of the task. For more information, see Task Lifecycle.
*
*/
private String desiredStatus;
/**
*
* Determines whether execute command functionality is turned on for this task. If true
, execute
* command functionality is turned on all the containers in the task.
*
*/
private Boolean enableExecuteCommand;
/**
*
* The Unix timestamp for the time when the task execution stopped.
*
*/
private java.util.Date executionStoppedAt;
/**
*
* The name of the task group that's associated with the task.
*
*/
private String group;
/**
*
* The health status for the task. It's determined by the health of the essential containers in the task. If all
* essential containers in the task are reporting as HEALTHY
, the task status also reports as
* HEALTHY
. If any essential containers in the task are reporting as UNHEALTHY
or
* UNKNOWN
, the task status also reports as UNHEALTHY
or UNKNOWN
.
*
*
*
* The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a container
* image and not specified in the container definition. For example, this includes those specified in a parent image
* or from the image's Dockerfile. Health check parameters that are specified in a container definition override any
* Docker health checks that are found in the container image.
*
*
*/
private String healthStatus;
/**
*
* The Elastic Inference accelerator that's associated with the task.
*
*/
private com.amazonaws.internal.SdkInternalList inferenceAccelerators;
/**
*
* The last known status for the task. For more information, see Task Lifecycle.
*
*/
private String lastStatus;
/**
*
* The infrastructure where your task runs on. For more information, see Amazon ECS launch types
* in the Amazon Elastic Container Service Developer Guide.
*
*/
private String launchType;
/**
*
* The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as an
* integer using MiB (for example, 1024
). If it's expressed as a string using GB (for example,
* 1GB
or 1 GB
), it's converted to an integer indicating the MiB when the task definition
* is registered.
*
*
* If you use the EC2 launch type, this field is optional.
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values. The value
* that you choose determines the range of supported values for the cpu
parameter.
*
*
* -
*
* 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu
values: 256 (.25 vCPU)
*
*
* -
*
* 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu
values: 512 (.5 vCPU)
*
*
* -
*
* 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available
* cpu
values: 1024 (1 vCPU)
*
*
* -
*
* Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu
values: 2048 (2
* vCPU)
*
*
* -
*
* Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu
values: 4096 (4
* vCPU)
*
*
* -
*
* Between 16 GB and 60 GB in 4 GB increments - Available cpu
values: 8192 (8 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* Between 32GB and 120 GB in 8 GB increments - Available cpu
values: 16384 (16 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*
*/
private String memory;
/**
*
* One or more container overrides.
*
*/
private TaskOverride overrides;
/**
*
* The platform version where your task runs on. A platform version is only specified for tasks that use the Fargate
* launch type. If you didn't specify one, the LATEST
platform version is used. For more information,
* see Fargate Platform
* Versions in the Amazon Elastic Container Service Developer Guide.
*
*/
private String platformVersion;
/**
*
* The operating system that your tasks are running on. A platform family is specified only for tasks that use the
* Fargate launch type.
*
*
* All tasks that run as part of this service must use the same platformFamily
value as the service
* (for example, LINUX.
).
*
*/
private String platformFamily;
/**
*
* The Unix timestamp for the time when the container image pull began.
*
*/
private java.util.Date pullStartedAt;
/**
*
* The Unix timestamp for the time when the container image pull completed.
*
*/
private java.util.Date pullStoppedAt;
/**
*
* The Unix timestamp for the time when the task started. More specifically, it's for the time when the task
* transitioned from the PENDING
state to the RUNNING
state.
*
*/
private java.util.Date startedAt;
/**
*
* The tag specified when a task is started. If an Amazon ECS service started the task, the startedBy
* parameter contains the deployment ID of that service.
*
*/
private String startedBy;
/**
*
* The stop code indicating why a task was stopped. The stoppedReason
might contain additional details.
*
*
* For more information about stop code, see Stopped tasks error
* codes in the Amazon ECS User Guide.
*
*
* The following are valid values:
*
*
* -
*
* TaskFailedToStart
*
*
* -
*
* EssentialContainerExited
*
*
* -
*
* UserInitiated
*
*
* -
*
* TerminationNotice
*
*
* -
*
* ServiceSchedulerInitiated
*
*
* -
*
* SpotInterruption
*
*
*
*/
private String stopCode;
/**
*
* The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the task
* transitioned from the RUNNING
state to the STOPPED
state.
*
*/
private java.util.Date stoppedAt;
/**
*
* The reason that the task was stopped.
*
*/
private String stoppedReason;
/**
*
* The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task
* transitions from the RUNNING
state to STOPPING
.
*
*/
private java.util.Date stoppingAt;
/**
*
* The metadata that you apply to the task to help you categorize and organize the task. Each tag consists of a key
* and an optional value. You define both the key and value.
*
*
* 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 Amazon Resource Name (ARN) of the task.
*
*/
private String taskArn;
/**
*
* The ARN of the task definition that creates the task.
*
*/
private String taskDefinitionArn;
/**
*
* The version counter for the task. Every time a task experiences a change that starts a CloudWatch event, the
* version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events, you can
* compare the version of a task reported by the Amazon ECS API actions with the version reported in CloudWatch
* Events for the task (inside the detail
object) to verify that the version in your event stream is
* current.
*
*/
private Long version;
/**
*
* The ephemeral storage settings for the task.
*
*/
private EphemeralStorage ephemeralStorage;
/**
*
* The Elastic Network Adapter that's associated with the task if the task uses the awsvpc
network
* mode.
*
*
* @return The Elastic Network Adapter that's associated with the task if the task uses the awsvpc
* network mode.
*/
public java.util.List getAttachments() {
if (attachments == null) {
attachments = new com.amazonaws.internal.SdkInternalList();
}
return attachments;
}
/**
*
* The Elastic Network Adapter that's associated with the task if the task uses the awsvpc
network
* mode.
*
*
* @param attachments
* The Elastic Network Adapter that's associated with the task if the task uses the awsvpc
* network mode.
*/
public void setAttachments(java.util.Collection attachments) {
if (attachments == null) {
this.attachments = null;
return;
}
this.attachments = new com.amazonaws.internal.SdkInternalList(attachments);
}
/**
*
* The Elastic Network Adapter that's associated with the task if the task uses the awsvpc
network
* mode.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAttachments(java.util.Collection)} or {@link #withAttachments(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param attachments
* The Elastic Network Adapter that's associated with the task if the task uses the awsvpc
* network mode.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withAttachments(Attachment... attachments) {
if (this.attachments == null) {
setAttachments(new com.amazonaws.internal.SdkInternalList(attachments.length));
}
for (Attachment ele : attachments) {
this.attachments.add(ele);
}
return this;
}
/**
*
* The Elastic Network Adapter that's associated with the task if the task uses the awsvpc
network
* mode.
*
*
* @param attachments
* The Elastic Network Adapter that's associated with the task if the task uses the awsvpc
* network mode.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withAttachments(java.util.Collection attachments) {
setAttachments(attachments);
return this;
}
/**
*
* The attributes of the task
*
*
* @return The attributes of the task
*/
public java.util.List getAttributes() {
if (attributes == null) {
attributes = new com.amazonaws.internal.SdkInternalList();
}
return attributes;
}
/**
*
* The attributes of the task
*
*
* @param attributes
* The attributes of the task
*/
public void setAttributes(java.util.Collection attributes) {
if (attributes == null) {
this.attributes = null;
return;
}
this.attributes = new com.amazonaws.internal.SdkInternalList(attributes);
}
/**
*
* The attributes of the task
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAttributes(java.util.Collection)} or {@link #withAttributes(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param attributes
* The attributes of the task
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withAttributes(Attribute... attributes) {
if (this.attributes == null) {
setAttributes(new com.amazonaws.internal.SdkInternalList(attributes.length));
}
for (Attribute ele : attributes) {
this.attributes.add(ele);
}
return this;
}
/**
*
* The attributes of the task
*
*
* @param attributes
* The attributes of the task
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withAttributes(java.util.Collection attributes) {
setAttributes(attributes);
return this;
}
/**
*
* The Availability Zone for the task.
*
*
* @param availabilityZone
* The Availability Zone for the task.
*/
public void setAvailabilityZone(String availabilityZone) {
this.availabilityZone = availabilityZone;
}
/**
*
* The Availability Zone for the task.
*
*
* @return The Availability Zone for the task.
*/
public String getAvailabilityZone() {
return this.availabilityZone;
}
/**
*
* The Availability Zone for the task.
*
*
* @param availabilityZone
* The Availability Zone for the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withAvailabilityZone(String availabilityZone) {
setAvailabilityZone(availabilityZone);
return this;
}
/**
*
* The capacity provider that's associated with the task.
*
*
* @param capacityProviderName
* The capacity provider that's associated with the task.
*/
public void setCapacityProviderName(String capacityProviderName) {
this.capacityProviderName = capacityProviderName;
}
/**
*
* The capacity provider that's associated with the task.
*
*
* @return The capacity provider that's associated with the task.
*/
public String getCapacityProviderName() {
return this.capacityProviderName;
}
/**
*
* The capacity provider that's associated with the task.
*
*
* @param capacityProviderName
* The capacity provider that's associated with the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withCapacityProviderName(String capacityProviderName) {
setCapacityProviderName(capacityProviderName);
return this;
}
/**
*
* The ARN of the cluster that hosts the task.
*
*
* @param clusterArn
* The ARN of the cluster that hosts the task.
*/
public void setClusterArn(String clusterArn) {
this.clusterArn = clusterArn;
}
/**
*
* The ARN of the cluster that hosts the task.
*
*
* @return The ARN of the cluster that hosts the task.
*/
public String getClusterArn() {
return this.clusterArn;
}
/**
*
* The ARN of the cluster that hosts the task.
*
*
* @param clusterArn
* The ARN of the cluster that hosts the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withClusterArn(String clusterArn) {
setClusterArn(clusterArn);
return this;
}
/**
*
* The connectivity status of a task.
*
*
* @param connectivity
* The connectivity status of a task.
* @see Connectivity
*/
public void setConnectivity(String connectivity) {
this.connectivity = connectivity;
}
/**
*
* The connectivity status of a task.
*
*
* @return The connectivity status of a task.
* @see Connectivity
*/
public String getConnectivity() {
return this.connectivity;
}
/**
*
* The connectivity status of a task.
*
*
* @param connectivity
* The connectivity status of a task.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Connectivity
*/
public Task withConnectivity(String connectivity) {
setConnectivity(connectivity);
return this;
}
/**
*
* The connectivity status of a task.
*
*
* @param connectivity
* The connectivity status of a task.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Connectivity
*/
public Task withConnectivity(Connectivity connectivity) {
this.connectivity = connectivity.toString();
return this;
}
/**
*
* The Unix timestamp for the time when the task last went into CONNECTED
status.
*
*
* @param connectivityAt
* The Unix timestamp for the time when the task last went into CONNECTED
status.
*/
public void setConnectivityAt(java.util.Date connectivityAt) {
this.connectivityAt = connectivityAt;
}
/**
*
* The Unix timestamp for the time when the task last went into CONNECTED
status.
*
*
* @return The Unix timestamp for the time when the task last went into CONNECTED
status.
*/
public java.util.Date getConnectivityAt() {
return this.connectivityAt;
}
/**
*
* The Unix timestamp for the time when the task last went into CONNECTED
status.
*
*
* @param connectivityAt
* The Unix timestamp for the time when the task last went into CONNECTED
status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withConnectivityAt(java.util.Date connectivityAt) {
setConnectivityAt(connectivityAt);
return this;
}
/**
*
* The ARN of the container instances that host the task.
*
*
* @param containerInstanceArn
* The ARN of the container instances that host the task.
*/
public void setContainerInstanceArn(String containerInstanceArn) {
this.containerInstanceArn = containerInstanceArn;
}
/**
*
* The ARN of the container instances that host the task.
*
*
* @return The ARN of the container instances that host the task.
*/
public String getContainerInstanceArn() {
return this.containerInstanceArn;
}
/**
*
* The ARN of the container instances that host the task.
*
*
* @param containerInstanceArn
* The ARN of the container instances that host the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withContainerInstanceArn(String containerInstanceArn) {
setContainerInstanceArn(containerInstanceArn);
return this;
}
/**
*
* The containers that's associated with the task.
*
*
* @return The containers that's associated with the task.
*/
public java.util.List getContainers() {
if (containers == null) {
containers = new com.amazonaws.internal.SdkInternalList();
}
return containers;
}
/**
*
* The containers that's associated with the task.
*
*
* @param containers
* The containers that's associated with the task.
*/
public void setContainers(java.util.Collection containers) {
if (containers == null) {
this.containers = null;
return;
}
this.containers = new com.amazonaws.internal.SdkInternalList(containers);
}
/**
*
* The containers that's associated with the task.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setContainers(java.util.Collection)} or {@link #withContainers(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param containers
* The containers that's associated with the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withContainers(Container... containers) {
if (this.containers == null) {
setContainers(new com.amazonaws.internal.SdkInternalList(containers.length));
}
for (Container ele : containers) {
this.containers.add(ele);
}
return this;
}
/**
*
* The containers that's associated with the task.
*
*
* @param containers
* The containers that's associated with the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withContainers(java.util.Collection containers) {
setContainers(containers);
return this;
}
/**
*
* The number of CPU units used by the task as expressed in a task definition. It can be expressed as an integer
* using CPU units (for example, 1024
). It can also be expressed as a string using vCPUs (for example,
* 1 vCPU
or 1 vcpu
). String values are converted to an integer that indicates the CPU
* units when the task definition is registered.
*
*
* If you use the EC2 launch type, this field is optional. Supported values are between 128
CPU units (
* 0.125
vCPUs) and 10240
CPU units (10
vCPUs).
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values. These
* values determine the range of supported values for the memory
parameter:
*
*
* The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
*
*
* -
*
* 256 (.25 vCPU) - Available memory
values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
*
*
* -
*
* 512 (.5 vCPU) - Available memory
values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
*
*
* -
*
* 1024 (1 vCPU) - Available memory
values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6
* GB), 7168 (7 GB), 8192 (8 GB)
*
*
* -
*
* 2048 (2 vCPU) - Available memory
values: 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
*
*
* -
*
* 4096 (4 vCPU) - Available memory
values: 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)
*
*
* -
*
* 8192 (8 vCPU) - Available memory
values: 16 GB and 60 GB in 4 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* 16384 (16vCPU) - Available memory
values: 32GB and 120 GB in 8 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*
*
* @param cpu
* The number of CPU units used by the task as expressed in a task definition. It can be expressed as an
* integer using CPU units (for example, 1024
). It can also be expressed as a string using vCPUs
* (for example, 1 vCPU
or 1 vcpu
). String values are converted to an integer that
* indicates the CPU units when the task definition is registered.
*
* If you use the EC2 launch type, this field is optional. Supported values are between 128
CPU
* units (0.125
vCPUs) and 10240
CPU units (10
vCPUs).
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values.
* These values determine the range of supported values for the memory
parameter:
*
*
* The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
*
*
* -
*
* 256 (.25 vCPU) - Available memory
values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
*
*
* -
*
* 512 (.5 vCPU) - Available memory
values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
*
*
* -
*
* 1024 (1 vCPU) - Available memory
values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB),
* 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
*
*
* -
*
* 2048 (2 vCPU) - Available memory
values: 4096 (4 GB) and 16384 (16 GB) in increments of 1024
* (1 GB)
*
*
* -
*
* 4096 (4 vCPU) - Available memory
values: 8192 (8 GB) and 30720 (30 GB) in increments of 1024
* (1 GB)
*
*
* -
*
* 8192 (8 vCPU) - Available memory
values: 16 GB and 60 GB in 4 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* 16384 (16vCPU) - Available memory
values: 32GB and 120 GB in 8 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*/
public void setCpu(String cpu) {
this.cpu = cpu;
}
/**
*
* The number of CPU units used by the task as expressed in a task definition. It can be expressed as an integer
* using CPU units (for example, 1024
). It can also be expressed as a string using vCPUs (for example,
* 1 vCPU
or 1 vcpu
). String values are converted to an integer that indicates the CPU
* units when the task definition is registered.
*
*
* If you use the EC2 launch type, this field is optional. Supported values are between 128
CPU units (
* 0.125
vCPUs) and 10240
CPU units (10
vCPUs).
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values. These
* values determine the range of supported values for the memory
parameter:
*
*
* The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
*
*
* -
*
* 256 (.25 vCPU) - Available memory
values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
*
*
* -
*
* 512 (.5 vCPU) - Available memory
values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
*
*
* -
*
* 1024 (1 vCPU) - Available memory
values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6
* GB), 7168 (7 GB), 8192 (8 GB)
*
*
* -
*
* 2048 (2 vCPU) - Available memory
values: 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
*
*
* -
*
* 4096 (4 vCPU) - Available memory
values: 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)
*
*
* -
*
* 8192 (8 vCPU) - Available memory
values: 16 GB and 60 GB in 4 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* 16384 (16vCPU) - Available memory
values: 32GB and 120 GB in 8 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*
*
* @return The number of CPU units used by the task as expressed in a task definition. It can be expressed as an
* integer using CPU units (for example, 1024
). It can also be expressed as a string using
* vCPUs (for example, 1 vCPU
or 1 vcpu
). String values are converted to an
* integer that indicates the CPU units when the task definition is registered.
*
* If you use the EC2 launch type, this field is optional. Supported values are between 128
CPU
* units (0.125
vCPUs) and 10240
CPU units (10
vCPUs).
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values.
* These values determine the range of supported values for the memory
parameter:
*
*
* The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
*
*
* -
*
* 256 (.25 vCPU) - Available memory
values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
*
*
* -
*
* 512 (.5 vCPU) - Available memory
values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
*
*
* -
*
* 1024 (1 vCPU) - Available memory
values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB),
* 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
*
*
* -
*
* 2048 (2 vCPU) - Available memory
values: 4096 (4 GB) and 16384 (16 GB) in increments of 1024
* (1 GB)
*
*
* -
*
* 4096 (4 vCPU) - Available memory
values: 8192 (8 GB) and 30720 (30 GB) in increments of 1024
* (1 GB)
*
*
* -
*
* 8192 (8 vCPU) - Available memory
values: 16 GB and 60 GB in 4 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* 16384 (16vCPU) - Available memory
values: 32GB and 120 GB in 8 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*/
public String getCpu() {
return this.cpu;
}
/**
*
* The number of CPU units used by the task as expressed in a task definition. It can be expressed as an integer
* using CPU units (for example, 1024
). It can also be expressed as a string using vCPUs (for example,
* 1 vCPU
or 1 vcpu
). String values are converted to an integer that indicates the CPU
* units when the task definition is registered.
*
*
* If you use the EC2 launch type, this field is optional. Supported values are between 128
CPU units (
* 0.125
vCPUs) and 10240
CPU units (10
vCPUs).
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values. These
* values determine the range of supported values for the memory
parameter:
*
*
* The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
*
*
* -
*
* 256 (.25 vCPU) - Available memory
values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
*
*
* -
*
* 512 (.5 vCPU) - Available memory
values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
*
*
* -
*
* 1024 (1 vCPU) - Available memory
values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6
* GB), 7168 (7 GB), 8192 (8 GB)
*
*
* -
*
* 2048 (2 vCPU) - Available memory
values: 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
*
*
* -
*
* 4096 (4 vCPU) - Available memory
values: 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)
*
*
* -
*
* 8192 (8 vCPU) - Available memory
values: 16 GB and 60 GB in 4 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* 16384 (16vCPU) - Available memory
values: 32GB and 120 GB in 8 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*
*
* @param cpu
* The number of CPU units used by the task as expressed in a task definition. It can be expressed as an
* integer using CPU units (for example, 1024
). It can also be expressed as a string using vCPUs
* (for example, 1 vCPU
or 1 vcpu
). String values are converted to an integer that
* indicates the CPU units when the task definition is registered.
*
* If you use the EC2 launch type, this field is optional. Supported values are between 128
CPU
* units (0.125
vCPUs) and 10240
CPU units (10
vCPUs).
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values.
* These values determine the range of supported values for the memory
parameter:
*
*
* The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
*
*
* -
*
* 256 (.25 vCPU) - Available memory
values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
*
*
* -
*
* 512 (.5 vCPU) - Available memory
values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
*
*
* -
*
* 1024 (1 vCPU) - Available memory
values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB),
* 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
*
*
* -
*
* 2048 (2 vCPU) - Available memory
values: 4096 (4 GB) and 16384 (16 GB) in increments of 1024
* (1 GB)
*
*
* -
*
* 4096 (4 vCPU) - Available memory
values: 8192 (8 GB) and 30720 (30 GB) in increments of 1024
* (1 GB)
*
*
* -
*
* 8192 (8 vCPU) - Available memory
values: 16 GB and 60 GB in 4 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* 16384 (16vCPU) - Available memory
values: 32GB and 120 GB in 8 GB increments
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withCpu(String cpu) {
setCpu(cpu);
return this;
}
/**
*
* The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task
* entered the PENDING
state.
*
*
* @param createdAt
* The Unix timestamp for the time when the task was created. More specifically, it's for the time when the
* task entered the PENDING
state.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task
* entered the PENDING
state.
*
*
* @return The Unix timestamp for the time when the task was created. More specifically, it's for the time when the
* task entered the PENDING
state.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The Unix timestamp for the time when the task was created. More specifically, it's for the time when the task
* entered the PENDING
state.
*
*
* @param createdAt
* The Unix timestamp for the time when the task was created. More specifically, it's for the time when the
* task entered the PENDING
state.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The desired status of the task. For more information, see Task Lifecycle.
*
*
* @param desiredStatus
* The desired status of the task. For more information, see Task Lifecycle.
*/
public void setDesiredStatus(String desiredStatus) {
this.desiredStatus = desiredStatus;
}
/**
*
* The desired status of the task. For more information, see Task Lifecycle.
*
*
* @return The desired status of the task. For more information, see Task
* Lifecycle.
*/
public String getDesiredStatus() {
return this.desiredStatus;
}
/**
*
* The desired status of the task. For more information, see Task Lifecycle.
*
*
* @param desiredStatus
* The desired status of the task. For more information, see Task Lifecycle.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withDesiredStatus(String desiredStatus) {
setDesiredStatus(desiredStatus);
return this;
}
/**
*
* Determines whether execute command functionality is turned on for this task. If true
, execute
* command functionality is turned on all the containers in the task.
*
*
* @param enableExecuteCommand
* Determines whether execute command functionality is turned on for this task. If true
, execute
* command functionality is turned on all the containers in the task.
*/
public void setEnableExecuteCommand(Boolean enableExecuteCommand) {
this.enableExecuteCommand = enableExecuteCommand;
}
/**
*
* Determines whether execute command functionality is turned on for this task. If true
, execute
* command functionality is turned on all the containers in the task.
*
*
* @return Determines whether execute command functionality is turned on for this task. If true
,
* execute command functionality is turned on all the containers in the task.
*/
public Boolean getEnableExecuteCommand() {
return this.enableExecuteCommand;
}
/**
*
* Determines whether execute command functionality is turned on for this task. If true
, execute
* command functionality is turned on all the containers in the task.
*
*
* @param enableExecuteCommand
* Determines whether execute command functionality is turned on for this task. If true
, execute
* command functionality is turned on all the containers in the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withEnableExecuteCommand(Boolean enableExecuteCommand) {
setEnableExecuteCommand(enableExecuteCommand);
return this;
}
/**
*
* Determines whether execute command functionality is turned on for this task. If true
, execute
* command functionality is turned on all the containers in the task.
*
*
* @return Determines whether execute command functionality is turned on for this task. If true
,
* execute command functionality is turned on all the containers in the task.
*/
public Boolean isEnableExecuteCommand() {
return this.enableExecuteCommand;
}
/**
*
* The Unix timestamp for the time when the task execution stopped.
*
*
* @param executionStoppedAt
* The Unix timestamp for the time when the task execution stopped.
*/
public void setExecutionStoppedAt(java.util.Date executionStoppedAt) {
this.executionStoppedAt = executionStoppedAt;
}
/**
*
* The Unix timestamp for the time when the task execution stopped.
*
*
* @return The Unix timestamp for the time when the task execution stopped.
*/
public java.util.Date getExecutionStoppedAt() {
return this.executionStoppedAt;
}
/**
*
* The Unix timestamp for the time when the task execution stopped.
*
*
* @param executionStoppedAt
* The Unix timestamp for the time when the task execution stopped.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withExecutionStoppedAt(java.util.Date executionStoppedAt) {
setExecutionStoppedAt(executionStoppedAt);
return this;
}
/**
*
* The name of the task group that's associated with the task.
*
*
* @param group
* The name of the task group that's associated with the task.
*/
public void setGroup(String group) {
this.group = group;
}
/**
*
* The name of the task group that's associated with the task.
*
*
* @return The name of the task group that's associated with the task.
*/
public String getGroup() {
return this.group;
}
/**
*
* The name of the task group that's associated with the task.
*
*
* @param group
* The name of the task group that's associated with the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withGroup(String group) {
setGroup(group);
return this;
}
/**
*
* The health status for the task. It's determined by the health of the essential containers in the task. If all
* essential containers in the task are reporting as HEALTHY
, the task status also reports as
* HEALTHY
. If any essential containers in the task are reporting as UNHEALTHY
or
* UNKNOWN
, the task status also reports as UNHEALTHY
or UNKNOWN
.
*
*
*
* The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a container
* image and not specified in the container definition. For example, this includes those specified in a parent image
* or from the image's Dockerfile. Health check parameters that are specified in a container definition override any
* Docker health checks that are found in the container image.
*
*
*
* @param healthStatus
* The health status for the task. It's determined by the health of the essential containers in the task. If
* all essential containers in the task are reporting as HEALTHY
, the task status also reports
* as HEALTHY
. If any essential containers in the task are reporting as UNHEALTHY
* or UNKNOWN
, the task status also reports as UNHEALTHY
or UNKNOWN
* .
*
* The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a
* container image and not specified in the container definition. For example, this includes those specified
* in a parent image or from the image's Dockerfile. Health check parameters that are specified in a
* container definition override any Docker health checks that are found in the container image.
*
* @see HealthStatus
*/
public void setHealthStatus(String healthStatus) {
this.healthStatus = healthStatus;
}
/**
*
* The health status for the task. It's determined by the health of the essential containers in the task. If all
* essential containers in the task are reporting as HEALTHY
, the task status also reports as
* HEALTHY
. If any essential containers in the task are reporting as UNHEALTHY
or
* UNKNOWN
, the task status also reports as UNHEALTHY
or UNKNOWN
.
*
*
*
* The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a container
* image and not specified in the container definition. For example, this includes those specified in a parent image
* or from the image's Dockerfile. Health check parameters that are specified in a container definition override any
* Docker health checks that are found in the container image.
*
*
*
* @return The health status for the task. It's determined by the health of the essential containers in the task. If
* all essential containers in the task are reporting as HEALTHY
, the task status also reports
* as HEALTHY
. If any essential containers in the task are reporting as UNHEALTHY
* or UNKNOWN
, the task status also reports as UNHEALTHY
or UNKNOWN
* .
*
* The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a
* container image and not specified in the container definition. For example, this includes those specified
* in a parent image or from the image's Dockerfile. Health check parameters that are specified in a
* container definition override any Docker health checks that are found in the container image.
*
* @see HealthStatus
*/
public String getHealthStatus() {
return this.healthStatus;
}
/**
*
* The health status for the task. It's determined by the health of the essential containers in the task. If all
* essential containers in the task are reporting as HEALTHY
, the task status also reports as
* HEALTHY
. If any essential containers in the task are reporting as UNHEALTHY
or
* UNKNOWN
, the task status also reports as UNHEALTHY
or UNKNOWN
.
*
*
*
* The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a container
* image and not specified in the container definition. For example, this includes those specified in a parent image
* or from the image's Dockerfile. Health check parameters that are specified in a container definition override any
* Docker health checks that are found in the container image.
*
*
*
* @param healthStatus
* The health status for the task. It's determined by the health of the essential containers in the task. If
* all essential containers in the task are reporting as HEALTHY
, the task status also reports
* as HEALTHY
. If any essential containers in the task are reporting as UNHEALTHY
* or UNKNOWN
, the task status also reports as UNHEALTHY
or UNKNOWN
* .
*
* The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a
* container image and not specified in the container definition. For example, this includes those specified
* in a parent image or from the image's Dockerfile. Health check parameters that are specified in a
* container definition override any Docker health checks that are found in the container image.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see HealthStatus
*/
public Task withHealthStatus(String healthStatus) {
setHealthStatus(healthStatus);
return this;
}
/**
*
* The health status for the task. It's determined by the health of the essential containers in the task. If all
* essential containers in the task are reporting as HEALTHY
, the task status also reports as
* HEALTHY
. If any essential containers in the task are reporting as UNHEALTHY
or
* UNKNOWN
, the task status also reports as UNHEALTHY
or UNKNOWN
.
*
*
*
* The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a container
* image and not specified in the container definition. For example, this includes those specified in a parent image
* or from the image's Dockerfile. Health check parameters that are specified in a container definition override any
* Docker health checks that are found in the container image.
*
*
*
* @param healthStatus
* The health status for the task. It's determined by the health of the essential containers in the task. If
* all essential containers in the task are reporting as HEALTHY
, the task status also reports
* as HEALTHY
. If any essential containers in the task are reporting as UNHEALTHY
* or UNKNOWN
, the task status also reports as UNHEALTHY
or UNKNOWN
* .
*
* The Amazon ECS container agent doesn't monitor or report on Docker health checks that are embedded in a
* container image and not specified in the container definition. For example, this includes those specified
* in a parent image or from the image's Dockerfile. Health check parameters that are specified in a
* container definition override any Docker health checks that are found in the container image.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see HealthStatus
*/
public Task withHealthStatus(HealthStatus healthStatus) {
this.healthStatus = healthStatus.toString();
return this;
}
/**
*
* The Elastic Inference accelerator that's associated with the task.
*
*
* @return The Elastic Inference accelerator that's associated with the task.
*/
public java.util.List getInferenceAccelerators() {
if (inferenceAccelerators == null) {
inferenceAccelerators = new com.amazonaws.internal.SdkInternalList();
}
return inferenceAccelerators;
}
/**
*
* The Elastic Inference accelerator that's associated with the task.
*
*
* @param inferenceAccelerators
* The Elastic Inference accelerator that's associated with the task.
*/
public void setInferenceAccelerators(java.util.Collection inferenceAccelerators) {
if (inferenceAccelerators == null) {
this.inferenceAccelerators = null;
return;
}
this.inferenceAccelerators = new com.amazonaws.internal.SdkInternalList(inferenceAccelerators);
}
/**
*
* The Elastic Inference accelerator that's associated with the task.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInferenceAccelerators(java.util.Collection)} or
* {@link #withInferenceAccelerators(java.util.Collection)} if you want to override the existing values.
*
*
* @param inferenceAccelerators
* The Elastic Inference accelerator that's associated with the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withInferenceAccelerators(InferenceAccelerator... inferenceAccelerators) {
if (this.inferenceAccelerators == null) {
setInferenceAccelerators(new com.amazonaws.internal.SdkInternalList(inferenceAccelerators.length));
}
for (InferenceAccelerator ele : inferenceAccelerators) {
this.inferenceAccelerators.add(ele);
}
return this;
}
/**
*
* The Elastic Inference accelerator that's associated with the task.
*
*
* @param inferenceAccelerators
* The Elastic Inference accelerator that's associated with the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withInferenceAccelerators(java.util.Collection inferenceAccelerators) {
setInferenceAccelerators(inferenceAccelerators);
return this;
}
/**
*
* The last known status for the task. For more information, see Task Lifecycle.
*
*
* @param lastStatus
* The last known status for the task. For more information, see Task Lifecycle.
*/
public void setLastStatus(String lastStatus) {
this.lastStatus = lastStatus;
}
/**
*
* The last known status for the task. For more information, see Task Lifecycle.
*
*
* @return The last known status for the task. For more information, see Task
* Lifecycle.
*/
public String getLastStatus() {
return this.lastStatus;
}
/**
*
* The last known status for the task. For more information, see Task Lifecycle.
*
*
* @param lastStatus
* The last known status for the task. For more information, see Task Lifecycle.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withLastStatus(String lastStatus) {
setLastStatus(lastStatus);
return this;
}
/**
*
* The infrastructure where your task runs on. For more information, see Amazon ECS launch types
* in the Amazon Elastic Container Service Developer Guide.
*
*
* @param launchType
* The infrastructure where your task runs on. For more information, see Amazon ECS launch
* types in the Amazon Elastic Container Service Developer Guide.
* @see LaunchType
*/
public void setLaunchType(String launchType) {
this.launchType = launchType;
}
/**
*
* The infrastructure where your task runs on. For more information, see Amazon ECS launch types
* in the Amazon Elastic Container Service Developer Guide.
*
*
* @return The infrastructure where your task runs on. For more information, see Amazon ECS launch
* types in the Amazon Elastic Container Service Developer Guide.
* @see LaunchType
*/
public String getLaunchType() {
return this.launchType;
}
/**
*
* The infrastructure where your task runs on. For more information, see Amazon ECS launch types
* in the Amazon Elastic Container Service Developer Guide.
*
*
* @param launchType
* The infrastructure where your task runs on. For more information, see Amazon ECS launch
* types in the Amazon Elastic Container Service Developer Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LaunchType
*/
public Task withLaunchType(String launchType) {
setLaunchType(launchType);
return this;
}
/**
*
* The infrastructure where your task runs on. For more information, see Amazon ECS launch types
* in the Amazon Elastic Container Service Developer Guide.
*
*
* @param launchType
* The infrastructure where your task runs on. For more information, see Amazon ECS launch
* types in the Amazon Elastic Container Service Developer Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LaunchType
*/
public Task withLaunchType(LaunchType launchType) {
this.launchType = launchType.toString();
return this;
}
/**
*
* The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as an
* integer using MiB (for example, 1024
). If it's expressed as a string using GB (for example,
* 1GB
or 1 GB
), it's converted to an integer indicating the MiB when the task definition
* is registered.
*
*
* If you use the EC2 launch type, this field is optional.
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values. The value
* that you choose determines the range of supported values for the cpu
parameter.
*
*
* -
*
* 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu
values: 256 (.25 vCPU)
*
*
* -
*
* 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu
values: 512 (.5 vCPU)
*
*
* -
*
* 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available
* cpu
values: 1024 (1 vCPU)
*
*
* -
*
* Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu
values: 2048 (2
* vCPU)
*
*
* -
*
* Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu
values: 4096 (4
* vCPU)
*
*
* -
*
* Between 16 GB and 60 GB in 4 GB increments - Available cpu
values: 8192 (8 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* Between 32GB and 120 GB in 8 GB increments - Available cpu
values: 16384 (16 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*
*
* @param memory
* The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as
* an integer using MiB (for example, 1024
). If it's expressed as a string using GB (for
* example, 1GB
or 1 GB
), it's converted to an integer indicating the MiB when the
* task definition is registered.
*
* If you use the EC2 launch type, this field is optional.
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values. The
* value that you choose determines the range of supported values for the cpu
parameter.
*
*
* -
*
* 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu
values: 256 (.25 vCPU)
*
*
* -
*
* 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu
values: 512 (.5 vCPU)
*
*
* -
*
* 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available
* cpu
values: 1024 (1 vCPU)
*
*
* -
*
* Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu
values:
* 2048 (2 vCPU)
*
*
* -
*
* Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu
values:
* 4096 (4 vCPU)
*
*
* -
*
* Between 16 GB and 60 GB in 4 GB increments - Available cpu
values: 8192 (8 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* Between 32GB and 120 GB in 8 GB increments - Available cpu
values: 16384 (16 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*/
public void setMemory(String memory) {
this.memory = memory;
}
/**
*
* The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as an
* integer using MiB (for example, 1024
). If it's expressed as a string using GB (for example,
* 1GB
or 1 GB
), it's converted to an integer indicating the MiB when the task definition
* is registered.
*
*
* If you use the EC2 launch type, this field is optional.
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values. The value
* that you choose determines the range of supported values for the cpu
parameter.
*
*
* -
*
* 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu
values: 256 (.25 vCPU)
*
*
* -
*
* 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu
values: 512 (.5 vCPU)
*
*
* -
*
* 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available
* cpu
values: 1024 (1 vCPU)
*
*
* -
*
* Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu
values: 2048 (2
* vCPU)
*
*
* -
*
* Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu
values: 4096 (4
* vCPU)
*
*
* -
*
* Between 16 GB and 60 GB in 4 GB increments - Available cpu
values: 8192 (8 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* Between 32GB and 120 GB in 8 GB increments - Available cpu
values: 16384 (16 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*
*
* @return The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed
* as an integer using MiB (for example, 1024
). If it's expressed as a string using GB (for
* example, 1GB
or 1 GB
), it's converted to an integer indicating the MiB when the
* task definition is registered.
*
* If you use the EC2 launch type, this field is optional.
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values. The
* value that you choose determines the range of supported values for the cpu
parameter.
*
*
* -
*
* 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu
values: 256 (.25 vCPU)
*
*
* -
*
* 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu
values: 512 (.5 vCPU)
*
*
* -
*
* 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available
* cpu
values: 1024 (1 vCPU)
*
*
* -
*
* Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu
values:
* 2048 (2 vCPU)
*
*
* -
*
* Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu
values:
* 4096 (4 vCPU)
*
*
* -
*
* Between 16 GB and 60 GB in 4 GB increments - Available cpu
values: 8192 (8 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* Between 32GB and 120 GB in 8 GB increments - Available cpu
values: 16384 (16 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*/
public String getMemory() {
return this.memory;
}
/**
*
* The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as an
* integer using MiB (for example, 1024
). If it's expressed as a string using GB (for example,
* 1GB
or 1 GB
), it's converted to an integer indicating the MiB when the task definition
* is registered.
*
*
* If you use the EC2 launch type, this field is optional.
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values. The value
* that you choose determines the range of supported values for the cpu
parameter.
*
*
* -
*
* 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu
values: 256 (.25 vCPU)
*
*
* -
*
* 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu
values: 512 (.5 vCPU)
*
*
* -
*
* 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available
* cpu
values: 1024 (1 vCPU)
*
*
* -
*
* Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu
values: 2048 (2
* vCPU)
*
*
* -
*
* Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu
values: 4096 (4
* vCPU)
*
*
* -
*
* Between 16 GB and 60 GB in 4 GB increments - Available cpu
values: 8192 (8 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* Between 32GB and 120 GB in 8 GB increments - Available cpu
values: 16384 (16 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
*
*
* @param memory
* The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as
* an integer using MiB (for example, 1024
). If it's expressed as a string using GB (for
* example, 1GB
or 1 GB
), it's converted to an integer indicating the MiB when the
* task definition is registered.
*
* If you use the EC2 launch type, this field is optional.
*
*
* If you use the Fargate launch type, this field is required. You must use one of the following values. The
* value that you choose determines the range of supported values for the cpu
parameter.
*
*
* -
*
* 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu
values: 256 (.25 vCPU)
*
*
* -
*
* 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu
values: 512 (.5 vCPU)
*
*
* -
*
* 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available
* cpu
values: 1024 (1 vCPU)
*
*
* -
*
* Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu
values:
* 2048 (2 vCPU)
*
*
* -
*
* Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu
values:
* 4096 (4 vCPU)
*
*
* -
*
* Between 16 GB and 60 GB in 4 GB increments - Available cpu
values: 8192 (8 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* -
*
* Between 32GB and 120 GB in 8 GB increments - Available cpu
values: 16384 (16 vCPU)
*
*
* This option requires Linux platform 1.4.0
or later.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withMemory(String memory) {
setMemory(memory);
return this;
}
/**
*
* One or more container overrides.
*
*
* @param overrides
* One or more container overrides.
*/
public void setOverrides(TaskOverride overrides) {
this.overrides = overrides;
}
/**
*
* One or more container overrides.
*
*
* @return One or more container overrides.
*/
public TaskOverride getOverrides() {
return this.overrides;
}
/**
*
* One or more container overrides.
*
*
* @param overrides
* One or more container overrides.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withOverrides(TaskOverride overrides) {
setOverrides(overrides);
return this;
}
/**
*
* The platform version where your task runs on. A platform version is only specified for tasks that use the Fargate
* launch type. If you didn't specify one, the LATEST
platform version is used. For more information,
* see Fargate Platform
* Versions in the Amazon Elastic Container Service Developer Guide.
*
*
* @param platformVersion
* The platform version where your task runs on. A platform version is only specified for tasks that use the
* Fargate launch type. If you didn't specify one, the 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 where your task runs on. A platform version is only specified for tasks that use the Fargate
* launch type. If you didn't specify one, the LATEST
platform version is used. For more information,
* see Fargate Platform
* Versions in the Amazon Elastic Container Service Developer Guide.
*
*
* @return The platform version where your task runs on. A platform version is only specified for tasks that use the
* Fargate launch type. If you didn't specify one, the 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 where your task runs on. A platform version is only specified for tasks that use the Fargate
* launch type. If you didn't specify one, the LATEST
platform version is used. For more information,
* see Fargate Platform
* Versions in the Amazon Elastic Container Service Developer Guide.
*
*
* @param platformVersion
* The platform version where your task runs on. A platform version is only specified for tasks that use the
* Fargate launch type. If you didn't specify one, the 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 Task withPlatformVersion(String platformVersion) {
setPlatformVersion(platformVersion);
return this;
}
/**
*
* The operating system that your tasks are running on. A platform family is specified only for tasks that use the
* Fargate launch type.
*
*
* All tasks that run as part of this service must use the same platformFamily
value as the service
* (for example, LINUX.
).
*
*
* @param platformFamily
* The operating system that your tasks are running on. A platform family is specified only for tasks that
* use the Fargate launch type.
*
* All tasks that run as part of this service must use the same platformFamily
value as the
* service (for example, LINUX.
).
*/
public void setPlatformFamily(String platformFamily) {
this.platformFamily = platformFamily;
}
/**
*
* The operating system that your tasks are running on. A platform family is specified only for tasks that use the
* Fargate launch type.
*
*
* All tasks that run as part of this service must use the same platformFamily
value as the service
* (for example, LINUX.
).
*
*
* @return The operating system that your tasks are running on. A platform family is specified only for tasks that
* use the Fargate launch type.
*
* All tasks that run as part of this service must use the same platformFamily
value as the
* service (for example, LINUX.
).
*/
public String getPlatformFamily() {
return this.platformFamily;
}
/**
*
* The operating system that your tasks are running on. A platform family is specified only for tasks that use the
* Fargate launch type.
*
*
* All tasks that run as part of this service must use the same platformFamily
value as the service
* (for example, LINUX.
).
*
*
* @param platformFamily
* The operating system that your tasks are running on. A platform family is specified only for tasks that
* use the Fargate launch type.
*
* All tasks that run as part of this service must use the same platformFamily
value as the
* service (for example, LINUX.
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withPlatformFamily(String platformFamily) {
setPlatformFamily(platformFamily);
return this;
}
/**
*
* The Unix timestamp for the time when the container image pull began.
*
*
* @param pullStartedAt
* The Unix timestamp for the time when the container image pull began.
*/
public void setPullStartedAt(java.util.Date pullStartedAt) {
this.pullStartedAt = pullStartedAt;
}
/**
*
* The Unix timestamp for the time when the container image pull began.
*
*
* @return The Unix timestamp for the time when the container image pull began.
*/
public java.util.Date getPullStartedAt() {
return this.pullStartedAt;
}
/**
*
* The Unix timestamp for the time when the container image pull began.
*
*
* @param pullStartedAt
* The Unix timestamp for the time when the container image pull began.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withPullStartedAt(java.util.Date pullStartedAt) {
setPullStartedAt(pullStartedAt);
return this;
}
/**
*
* The Unix timestamp for the time when the container image pull completed.
*
*
* @param pullStoppedAt
* The Unix timestamp for the time when the container image pull completed.
*/
public void setPullStoppedAt(java.util.Date pullStoppedAt) {
this.pullStoppedAt = pullStoppedAt;
}
/**
*
* The Unix timestamp for the time when the container image pull completed.
*
*
* @return The Unix timestamp for the time when the container image pull completed.
*/
public java.util.Date getPullStoppedAt() {
return this.pullStoppedAt;
}
/**
*
* The Unix timestamp for the time when the container image pull completed.
*
*
* @param pullStoppedAt
* The Unix timestamp for the time when the container image pull completed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withPullStoppedAt(java.util.Date pullStoppedAt) {
setPullStoppedAt(pullStoppedAt);
return this;
}
/**
*
* The Unix timestamp for the time when the task started. More specifically, it's for the time when the task
* transitioned from the PENDING
state to the RUNNING
state.
*
*
* @param startedAt
* The Unix timestamp for the time when the task started. More specifically, it's for the time when the task
* transitioned from the PENDING
state to the RUNNING
state.
*/
public void setStartedAt(java.util.Date startedAt) {
this.startedAt = startedAt;
}
/**
*
* The Unix timestamp for the time when the task started. More specifically, it's for the time when the task
* transitioned from the PENDING
state to the RUNNING
state.
*
*
* @return The Unix timestamp for the time when the task started. More specifically, it's for the time when the task
* transitioned from the PENDING
state to the RUNNING
state.
*/
public java.util.Date getStartedAt() {
return this.startedAt;
}
/**
*
* The Unix timestamp for the time when the task started. More specifically, it's for the time when the task
* transitioned from the PENDING
state to the RUNNING
state.
*
*
* @param startedAt
* The Unix timestamp for the time when the task started. More specifically, it's for the time when the task
* transitioned from the PENDING
state to the RUNNING
state.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withStartedAt(java.util.Date startedAt) {
setStartedAt(startedAt);
return this;
}
/**
*
* The tag specified when a task is started. If an Amazon ECS service started the task, the startedBy
* parameter contains the deployment ID of that service.
*
*
* @param startedBy
* The tag specified when a task is started. If an Amazon ECS service started the task, the
* startedBy
parameter contains the deployment ID of that service.
*/
public void setStartedBy(String startedBy) {
this.startedBy = startedBy;
}
/**
*
* The tag specified when a task is started. If an Amazon ECS service started the task, the startedBy
* parameter contains the deployment ID of that service.
*
*
* @return The tag specified when a task is started. If an Amazon ECS service started the task, the
* startedBy
parameter contains the deployment ID of that service.
*/
public String getStartedBy() {
return this.startedBy;
}
/**
*
* The tag specified when a task is started. If an Amazon ECS service started the task, the startedBy
* parameter contains the deployment ID of that service.
*
*
* @param startedBy
* The tag specified when a task is started. If an Amazon ECS service started the task, the
* startedBy
parameter contains the deployment ID of that service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withStartedBy(String startedBy) {
setStartedBy(startedBy);
return this;
}
/**
*
* The stop code indicating why a task was stopped. The stoppedReason
might contain additional details.
*
*
* For more information about stop code, see Stopped tasks error
* codes in the Amazon ECS User Guide.
*
*
* The following are valid values:
*
*
* -
*
* TaskFailedToStart
*
*
* -
*
* EssentialContainerExited
*
*
* -
*
* UserInitiated
*
*
* -
*
* TerminationNotice
*
*
* -
*
* ServiceSchedulerInitiated
*
*
* -
*
* SpotInterruption
*
*
*
*
* @param stopCode
* The stop code indicating why a task was stopped. The stoppedReason
might contain additional
* details.
*
* For more information about stop code, see Stopped tasks
* error codes in the Amazon ECS User Guide.
*
*
* The following are valid values:
*
*
* -
*
* TaskFailedToStart
*
*
* -
*
* EssentialContainerExited
*
*
* -
*
* UserInitiated
*
*
* -
*
* TerminationNotice
*
*
* -
*
* ServiceSchedulerInitiated
*
*
* -
*
* SpotInterruption
*
*
* @see TaskStopCode
*/
public void setStopCode(String stopCode) {
this.stopCode = stopCode;
}
/**
*
* The stop code indicating why a task was stopped. The stoppedReason
might contain additional details.
*
*
* For more information about stop code, see Stopped tasks error
* codes in the Amazon ECS User Guide.
*
*
* The following are valid values:
*
*
* -
*
* TaskFailedToStart
*
*
* -
*
* EssentialContainerExited
*
*
* -
*
* UserInitiated
*
*
* -
*
* TerminationNotice
*
*
* -
*
* ServiceSchedulerInitiated
*
*
* -
*
* SpotInterruption
*
*
*
*
* @return The stop code indicating why a task was stopped. The stoppedReason
might contain additional
* details.
*
* For more information about stop code, see Stopped tasks
* error codes in the Amazon ECS User Guide.
*
*
* The following are valid values:
*
*
* -
*
* TaskFailedToStart
*
*
* -
*
* EssentialContainerExited
*
*
* -
*
* UserInitiated
*
*
* -
*
* TerminationNotice
*
*
* -
*
* ServiceSchedulerInitiated
*
*
* -
*
* SpotInterruption
*
*
* @see TaskStopCode
*/
public String getStopCode() {
return this.stopCode;
}
/**
*
* The stop code indicating why a task was stopped. The stoppedReason
might contain additional details.
*
*
* For more information about stop code, see Stopped tasks error
* codes in the Amazon ECS User Guide.
*
*
* The following are valid values:
*
*
* -
*
* TaskFailedToStart
*
*
* -
*
* EssentialContainerExited
*
*
* -
*
* UserInitiated
*
*
* -
*
* TerminationNotice
*
*
* -
*
* ServiceSchedulerInitiated
*
*
* -
*
* SpotInterruption
*
*
*
*
* @param stopCode
* The stop code indicating why a task was stopped. The stoppedReason
might contain additional
* details.
*
* For more information about stop code, see Stopped tasks
* error codes in the Amazon ECS User Guide.
*
*
* The following are valid values:
*
*
* -
*
* TaskFailedToStart
*
*
* -
*
* EssentialContainerExited
*
*
* -
*
* UserInitiated
*
*
* -
*
* TerminationNotice
*
*
* -
*
* ServiceSchedulerInitiated
*
*
* -
*
* SpotInterruption
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see TaskStopCode
*/
public Task withStopCode(String stopCode) {
setStopCode(stopCode);
return this;
}
/**
*
* The stop code indicating why a task was stopped. The stoppedReason
might contain additional details.
*
*
* For more information about stop code, see Stopped tasks error
* codes in the Amazon ECS User Guide.
*
*
* The following are valid values:
*
*
* -
*
* TaskFailedToStart
*
*
* -
*
* EssentialContainerExited
*
*
* -
*
* UserInitiated
*
*
* -
*
* TerminationNotice
*
*
* -
*
* ServiceSchedulerInitiated
*
*
* -
*
* SpotInterruption
*
*
*
*
* @param stopCode
* The stop code indicating why a task was stopped. The stoppedReason
might contain additional
* details.
*
* For more information about stop code, see Stopped tasks
* error codes in the Amazon ECS User Guide.
*
*
* The following are valid values:
*
*
* -
*
* TaskFailedToStart
*
*
* -
*
* EssentialContainerExited
*
*
* -
*
* UserInitiated
*
*
* -
*
* TerminationNotice
*
*
* -
*
* ServiceSchedulerInitiated
*
*
* -
*
* SpotInterruption
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see TaskStopCode
*/
public Task withStopCode(TaskStopCode stopCode) {
this.stopCode = stopCode.toString();
return this;
}
/**
*
* The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the task
* transitioned from the RUNNING
state to the STOPPED
state.
*
*
* @param stoppedAt
* The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the
* task transitioned from the RUNNING
state to the STOPPED
state.
*/
public void setStoppedAt(java.util.Date stoppedAt) {
this.stoppedAt = stoppedAt;
}
/**
*
* The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the task
* transitioned from the RUNNING
state to the STOPPED
state.
*
*
* @return The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the
* task transitioned from the RUNNING
state to the STOPPED
state.
*/
public java.util.Date getStoppedAt() {
return this.stoppedAt;
}
/**
*
* The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the task
* transitioned from the RUNNING
state to the STOPPED
state.
*
*
* @param stoppedAt
* The Unix timestamp for the time when the task was stopped. More specifically, it's for the time when the
* task transitioned from the RUNNING
state to the STOPPED
state.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withStoppedAt(java.util.Date stoppedAt) {
setStoppedAt(stoppedAt);
return this;
}
/**
*
* The reason that the task was stopped.
*
*
* @param stoppedReason
* The reason that the task was stopped.
*/
public void setStoppedReason(String stoppedReason) {
this.stoppedReason = stoppedReason;
}
/**
*
* The reason that the task was stopped.
*
*
* @return The reason that the task was stopped.
*/
public String getStoppedReason() {
return this.stoppedReason;
}
/**
*
* The reason that the task was stopped.
*
*
* @param stoppedReason
* The reason that the task was stopped.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withStoppedReason(String stoppedReason) {
setStoppedReason(stoppedReason);
return this;
}
/**
*
* The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task
* transitions from the RUNNING
state to STOPPING
.
*
*
* @param stoppingAt
* The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task
* transitions from the RUNNING
state to STOPPING
.
*/
public void setStoppingAt(java.util.Date stoppingAt) {
this.stoppingAt = stoppingAt;
}
/**
*
* The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task
* transitions from the RUNNING
state to STOPPING
.
*
*
* @return The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task
* transitions from the RUNNING
state to STOPPING
.
*/
public java.util.Date getStoppingAt() {
return this.stoppingAt;
}
/**
*
* The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task
* transitions from the RUNNING
state to STOPPING
.
*
*
* @param stoppingAt
* The Unix timestamp for the time when the task stops. More specifically, it's for the time when the task
* transitions from the RUNNING
state to STOPPING
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withStoppingAt(java.util.Date stoppingAt) {
setStoppingAt(stoppingAt);
return this;
}
/**
*
* The metadata that you apply to the task to help you categorize and organize the task. Each tag consists of a key
* and an optional value. You define both the key and value.
*
*
* 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 the task. Each tag consists
* of a key and an optional value. You define both the key and value.
*
* 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 the task. Each tag consists of a key
* and an optional value. You define both the key and value.
*
*
* 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 the task. Each tag consists of
* a key and an optional value. You define both the key and value.
*
* 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 the task. Each tag consists of a key
* and an optional value. You define both the key and value.
*
*
* 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 the task. Each tag consists of
* a key and an optional value. You define both the key and value.
*
* 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 Task 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 the task. Each tag consists of a key
* and an optional value. You define both the key and value.
*
*
* 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 the task. Each tag consists of
* a key and an optional value. You define both the key and value.
*
* 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 Task withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the task.
*
*
* @param taskArn
* The Amazon Resource Name (ARN) of the task.
*/
public void setTaskArn(String taskArn) {
this.taskArn = taskArn;
}
/**
*
* The Amazon Resource Name (ARN) of the task.
*
*
* @return The Amazon Resource Name (ARN) of the task.
*/
public String getTaskArn() {
return this.taskArn;
}
/**
*
* The Amazon Resource Name (ARN) of the task.
*
*
* @param taskArn
* The Amazon Resource Name (ARN) of the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withTaskArn(String taskArn) {
setTaskArn(taskArn);
return this;
}
/**
*
* The ARN of the task definition that creates the task.
*
*
* @param taskDefinitionArn
* The ARN of the task definition that creates the task.
*/
public void setTaskDefinitionArn(String taskDefinitionArn) {
this.taskDefinitionArn = taskDefinitionArn;
}
/**
*
* The ARN of the task definition that creates the task.
*
*
* @return The ARN of the task definition that creates the task.
*/
public String getTaskDefinitionArn() {
return this.taskDefinitionArn;
}
/**
*
* The ARN of the task definition that creates the task.
*
*
* @param taskDefinitionArn
* The ARN of the task definition that creates the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withTaskDefinitionArn(String taskDefinitionArn) {
setTaskDefinitionArn(taskDefinitionArn);
return this;
}
/**
*
* The version counter for the task. Every time a task experiences a change that starts a CloudWatch event, the
* version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events, you can
* compare the version of a task reported by the Amazon ECS API actions with the version reported in CloudWatch
* Events for the task (inside the detail
object) to verify that the version in your event stream is
* current.
*
*
* @param version
* The version counter for the task. Every time a task experiences a change that starts a CloudWatch event,
* the version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events,
* you can compare the version of a task reported by the Amazon ECS API actions with the version reported in
* CloudWatch Events for the task (inside the detail
object) to verify that the version in your
* event stream is current.
*/
public void setVersion(Long version) {
this.version = version;
}
/**
*
* The version counter for the task. Every time a task experiences a change that starts a CloudWatch event, the
* version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events, you can
* compare the version of a task reported by the Amazon ECS API actions with the version reported in CloudWatch
* Events for the task (inside the detail
object) to verify that the version in your event stream is
* current.
*
*
* @return The version counter for the task. Every time a task experiences a change that starts a CloudWatch event,
* the version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events,
* you can compare the version of a task reported by the Amazon ECS API actions with the version reported in
* CloudWatch Events for the task (inside the detail
object) to verify that the version in your
* event stream is current.
*/
public Long getVersion() {
return this.version;
}
/**
*
* The version counter for the task. Every time a task experiences a change that starts a CloudWatch event, the
* version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events, you can
* compare the version of a task reported by the Amazon ECS API actions with the version reported in CloudWatch
* Events for the task (inside the detail
object) to verify that the version in your event stream is
* current.
*
*
* @param version
* The version counter for the task. Every time a task experiences a change that starts a CloudWatch event,
* the version counter is incremented. If you replicate your Amazon ECS task state with CloudWatch Events,
* you can compare the version of a task reported by the Amazon ECS API actions with the version reported in
* CloudWatch Events for the task (inside the detail
object) to verify that the version in your
* event stream is current.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withVersion(Long version) {
setVersion(version);
return this;
}
/**
*
* The ephemeral storage settings for the task.
*
*
* @param ephemeralStorage
* The ephemeral storage settings for the task.
*/
public void setEphemeralStorage(EphemeralStorage ephemeralStorage) {
this.ephemeralStorage = ephemeralStorage;
}
/**
*
* The ephemeral storage settings for the task.
*
*
* @return The ephemeral storage settings for the task.
*/
public EphemeralStorage getEphemeralStorage() {
return this.ephemeralStorage;
}
/**
*
* The ephemeral storage settings for the task.
*
*
* @param ephemeralStorage
* The ephemeral storage settings for the task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Task withEphemeralStorage(EphemeralStorage ephemeralStorage) {
setEphemeralStorage(ephemeralStorage);
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 (getAttachments() != null)
sb.append("Attachments: ").append(getAttachments()).append(",");
if (getAttributes() != null)
sb.append("Attributes: ").append(getAttributes()).append(",");
if (getAvailabilityZone() != null)
sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(",");
if (getCapacityProviderName() != null)
sb.append("CapacityProviderName: ").append(getCapacityProviderName()).append(",");
if (getClusterArn() != null)
sb.append("ClusterArn: ").append(getClusterArn()).append(",");
if (getConnectivity() != null)
sb.append("Connectivity: ").append(getConnectivity()).append(",");
if (getConnectivityAt() != null)
sb.append("ConnectivityAt: ").append(getConnectivityAt()).append(",");
if (getContainerInstanceArn() != null)
sb.append("ContainerInstanceArn: ").append(getContainerInstanceArn()).append(",");
if (getContainers() != null)
sb.append("Containers: ").append(getContainers()).append(",");
if (getCpu() != null)
sb.append("Cpu: ").append(getCpu()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getDesiredStatus() != null)
sb.append("DesiredStatus: ").append(getDesiredStatus()).append(",");
if (getEnableExecuteCommand() != null)
sb.append("EnableExecuteCommand: ").append(getEnableExecuteCommand()).append(",");
if (getExecutionStoppedAt() != null)
sb.append("ExecutionStoppedAt: ").append(getExecutionStoppedAt()).append(",");
if (getGroup() != null)
sb.append("Group: ").append(getGroup()).append(",");
if (getHealthStatus() != null)
sb.append("HealthStatus: ").append(getHealthStatus()).append(",");
if (getInferenceAccelerators() != null)
sb.append("InferenceAccelerators: ").append(getInferenceAccelerators()).append(",");
if (getLastStatus() != null)
sb.append("LastStatus: ").append(getLastStatus()).append(",");
if (getLaunchType() != null)
sb.append("LaunchType: ").append(getLaunchType()).append(",");
if (getMemory() != null)
sb.append("Memory: ").append(getMemory()).append(",");
if (getOverrides() != null)
sb.append("Overrides: ").append(getOverrides()).append(",");
if (getPlatformVersion() != null)
sb.append("PlatformVersion: ").append(getPlatformVersion()).append(",");
if (getPlatformFamily() != null)
sb.append("PlatformFamily: ").append(getPlatformFamily()).append(",");
if (getPullStartedAt() != null)
sb.append("PullStartedAt: ").append(getPullStartedAt()).append(",");
if (getPullStoppedAt() != null)
sb.append("PullStoppedAt: ").append(getPullStoppedAt()).append(",");
if (getStartedAt() != null)
sb.append("StartedAt: ").append(getStartedAt()).append(",");
if (getStartedBy() != null)
sb.append("StartedBy: ").append(getStartedBy()).append(",");
if (getStopCode() != null)
sb.append("StopCode: ").append(getStopCode()).append(",");
if (getStoppedAt() != null)
sb.append("StoppedAt: ").append(getStoppedAt()).append(",");
if (getStoppedReason() != null)
sb.append("StoppedReason: ").append(getStoppedReason()).append(",");
if (getStoppingAt() != null)
sb.append("StoppingAt: ").append(getStoppingAt()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getTaskArn() != null)
sb.append("TaskArn: ").append(getTaskArn()).append(",");
if (getTaskDefinitionArn() != null)
sb.append("TaskDefinitionArn: ").append(getTaskDefinitionArn()).append(",");
if (getVersion() != null)
sb.append("Version: ").append(getVersion()).append(",");
if (getEphemeralStorage() != null)
sb.append("EphemeralStorage: ").append(getEphemeralStorage());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Task == false)
return false;
Task other = (Task) obj;
if (other.getAttachments() == null ^ this.getAttachments() == null)
return false;
if (other.getAttachments() != null && other.getAttachments().equals(this.getAttachments()) == false)
return false;
if (other.getAttributes() == null ^ this.getAttributes() == null)
return false;
if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == false)
return false;
if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null)
return false;
if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false)
return false;
if (other.getCapacityProviderName() == null ^ this.getCapacityProviderName() == null)
return false;
if (other.getCapacityProviderName() != null && other.getCapacityProviderName().equals(this.getCapacityProviderName()) == false)
return false;
if (other.getClusterArn() == null ^ this.getClusterArn() == null)
return false;
if (other.getClusterArn() != null && other.getClusterArn().equals(this.getClusterArn()) == false)
return false;
if (other.getConnectivity() == null ^ this.getConnectivity() == null)
return false;
if (other.getConnectivity() != null && other.getConnectivity().equals(this.getConnectivity()) == false)
return false;
if (other.getConnectivityAt() == null ^ this.getConnectivityAt() == null)
return false;
if (other.getConnectivityAt() != null && other.getConnectivityAt().equals(this.getConnectivityAt()) == false)
return false;
if (other.getContainerInstanceArn() == null ^ this.getContainerInstanceArn() == null)
return false;
if (other.getContainerInstanceArn() != null && other.getContainerInstanceArn().equals(this.getContainerInstanceArn()) == false)
return false;
if (other.getContainers() == null ^ this.getContainers() == null)
return false;
if (other.getContainers() != null && other.getContainers().equals(this.getContainers()) == false)
return false;
if (other.getCpu() == null ^ this.getCpu() == null)
return false;
if (other.getCpu() != null && other.getCpu().equals(this.getCpu()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getDesiredStatus() == null ^ this.getDesiredStatus() == null)
return false;
if (other.getDesiredStatus() != null && other.getDesiredStatus().equals(this.getDesiredStatus()) == 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.getExecutionStoppedAt() == null ^ this.getExecutionStoppedAt() == null)
return false;
if (other.getExecutionStoppedAt() != null && other.getExecutionStoppedAt().equals(this.getExecutionStoppedAt()) == 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.getHealthStatus() == null ^ this.getHealthStatus() == null)
return false;
if (other.getHealthStatus() != null && other.getHealthStatus().equals(this.getHealthStatus()) == false)
return false;
if (other.getInferenceAccelerators() == null ^ this.getInferenceAccelerators() == null)
return false;
if (other.getInferenceAccelerators() != null && other.getInferenceAccelerators().equals(this.getInferenceAccelerators()) == false)
return false;
if (other.getLastStatus() == null ^ this.getLastStatus() == null)
return false;
if (other.getLastStatus() != null && other.getLastStatus().equals(this.getLastStatus()) == 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.getMemory() == null ^ this.getMemory() == null)
return false;
if (other.getMemory() != null && other.getMemory().equals(this.getMemory()) == 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.getPlatformVersion() == null ^ this.getPlatformVersion() == null)
return false;
if (other.getPlatformVersion() != null && other.getPlatformVersion().equals(this.getPlatformVersion()) == false)
return false;
if (other.getPlatformFamily() == null ^ this.getPlatformFamily() == null)
return false;
if (other.getPlatformFamily() != null && other.getPlatformFamily().equals(this.getPlatformFamily()) == false)
return false;
if (other.getPullStartedAt() == null ^ this.getPullStartedAt() == null)
return false;
if (other.getPullStartedAt() != null && other.getPullStartedAt().equals(this.getPullStartedAt()) == false)
return false;
if (other.getPullStoppedAt() == null ^ this.getPullStoppedAt() == null)
return false;
if (other.getPullStoppedAt() != null && other.getPullStoppedAt().equals(this.getPullStoppedAt()) == false)
return false;
if (other.getStartedAt() == null ^ this.getStartedAt() == null)
return false;
if (other.getStartedAt() != null && other.getStartedAt().equals(this.getStartedAt()) == 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.getStopCode() == null ^ this.getStopCode() == null)
return false;
if (other.getStopCode() != null && other.getStopCode().equals(this.getStopCode()) == false)
return false;
if (other.getStoppedAt() == null ^ this.getStoppedAt() == null)
return false;
if (other.getStoppedAt() != null && other.getStoppedAt().equals(this.getStoppedAt()) == false)
return false;
if (other.getStoppedReason() == null ^ this.getStoppedReason() == null)
return false;
if (other.getStoppedReason() != null && other.getStoppedReason().equals(this.getStoppedReason()) == false)
return false;
if (other.getStoppingAt() == null ^ this.getStoppingAt() == null)
return false;
if (other.getStoppingAt() != null && other.getStoppingAt().equals(this.getStoppingAt()) == 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.getTaskArn() == null ^ this.getTaskArn() == null)
return false;
if (other.getTaskArn() != null && other.getTaskArn().equals(this.getTaskArn()) == false)
return false;
if (other.getTaskDefinitionArn() == null ^ this.getTaskDefinitionArn() == null)
return false;
if (other.getTaskDefinitionArn() != null && other.getTaskDefinitionArn().equals(this.getTaskDefinitionArn()) == false)
return false;
if (other.getVersion() == null ^ this.getVersion() == null)
return false;
if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false)
return false;
if (other.getEphemeralStorage() == null ^ this.getEphemeralStorage() == null)
return false;
if (other.getEphemeralStorage() != null && other.getEphemeralStorage().equals(this.getEphemeralStorage()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAttachments() == null) ? 0 : getAttachments().hashCode());
hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode());
hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode());
hashCode = prime * hashCode + ((getCapacityProviderName() == null) ? 0 : getCapacityProviderName().hashCode());
hashCode = prime * hashCode + ((getClusterArn() == null) ? 0 : getClusterArn().hashCode());
hashCode = prime * hashCode + ((getConnectivity() == null) ? 0 : getConnectivity().hashCode());
hashCode = prime * hashCode + ((getConnectivityAt() == null) ? 0 : getConnectivityAt().hashCode());
hashCode = prime * hashCode + ((getContainerInstanceArn() == null) ? 0 : getContainerInstanceArn().hashCode());
hashCode = prime * hashCode + ((getContainers() == null) ? 0 : getContainers().hashCode());
hashCode = prime * hashCode + ((getCpu() == null) ? 0 : getCpu().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getDesiredStatus() == null) ? 0 : getDesiredStatus().hashCode());
hashCode = prime * hashCode + ((getEnableExecuteCommand() == null) ? 0 : getEnableExecuteCommand().hashCode());
hashCode = prime * hashCode + ((getExecutionStoppedAt() == null) ? 0 : getExecutionStoppedAt().hashCode());
hashCode = prime * hashCode + ((getGroup() == null) ? 0 : getGroup().hashCode());
hashCode = prime * hashCode + ((getHealthStatus() == null) ? 0 : getHealthStatus().hashCode());
hashCode = prime * hashCode + ((getInferenceAccelerators() == null) ? 0 : getInferenceAccelerators().hashCode());
hashCode = prime * hashCode + ((getLastStatus() == null) ? 0 : getLastStatus().hashCode());
hashCode = prime * hashCode + ((getLaunchType() == null) ? 0 : getLaunchType().hashCode());
hashCode = prime * hashCode + ((getMemory() == null) ? 0 : getMemory().hashCode());
hashCode = prime * hashCode + ((getOverrides() == null) ? 0 : getOverrides().hashCode());
hashCode = prime * hashCode + ((getPlatformVersion() == null) ? 0 : getPlatformVersion().hashCode());
hashCode = prime * hashCode + ((getPlatformFamily() == null) ? 0 : getPlatformFamily().hashCode());
hashCode = prime * hashCode + ((getPullStartedAt() == null) ? 0 : getPullStartedAt().hashCode());
hashCode = prime * hashCode + ((getPullStoppedAt() == null) ? 0 : getPullStoppedAt().hashCode());
hashCode = prime * hashCode + ((getStartedAt() == null) ? 0 : getStartedAt().hashCode());
hashCode = prime * hashCode + ((getStartedBy() == null) ? 0 : getStartedBy().hashCode());
hashCode = prime * hashCode + ((getStopCode() == null) ? 0 : getStopCode().hashCode());
hashCode = prime * hashCode + ((getStoppedAt() == null) ? 0 : getStoppedAt().hashCode());
hashCode = prime * hashCode + ((getStoppedReason() == null) ? 0 : getStoppedReason().hashCode());
hashCode = prime * hashCode + ((getStoppingAt() == null) ? 0 : getStoppingAt().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getTaskArn() == null) ? 0 : getTaskArn().hashCode());
hashCode = prime * hashCode + ((getTaskDefinitionArn() == null) ? 0 : getTaskDefinitionArn().hashCode());
hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
hashCode = prime * hashCode + ((getEphemeralStorage() == null) ? 0 : getEphemeralStorage().hashCode());
return hashCode;
}
@Override
public Task clone() {
try {
return (Task) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.ecs.model.transform.TaskMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}