@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Cluster extends Object implements Serializable, Cloneable, StructuredPojo
A regional grouping of one or more container instances on which you can run task requests. Each account receives a default cluster the first time you use the Amazon ECS service, but you may also create other clusters. Clusters may contain more than one instance type simultaneously.
Constructor and Description |
---|
Cluster() |
Modifier and Type | Method and Description |
---|---|
Cluster |
clone() |
boolean |
equals(Object obj) |
Integer |
getActiveServicesCount()
The number of services that are running on the cluster in an
ACTIVE state. |
String |
getClusterArn()
The Amazon Resource Name (ARN) that identifies the cluster.
|
String |
getClusterName()
A user-generated string that you use to identify your cluster.
|
Integer |
getPendingTasksCount()
The number of tasks in the cluster that are in the
PENDING state. |
Integer |
getRegisteredContainerInstancesCount()
The number of container instances registered into the cluster.
|
Integer |
getRunningTasksCount()
The number of tasks in the cluster that are in the
RUNNING state. |
List<ClusterSetting> |
getSettings()
The settings for the cluster.
|
List<KeyValuePair> |
getStatistics()
Additional information about your clusters that are separated by launch type, including:
|
String |
getStatus()
The status of the cluster.
|
List<Tag> |
getTags()
The metadata that you apply to the cluster to help you categorize and organize them.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setActiveServicesCount(Integer activeServicesCount)
The number of services that are running on the cluster in an
ACTIVE state. |
void |
setClusterArn(String clusterArn)
The Amazon Resource Name (ARN) that identifies the cluster.
|
void |
setClusterName(String clusterName)
A user-generated string that you use to identify your cluster.
|
void |
setPendingTasksCount(Integer pendingTasksCount)
The number of tasks in the cluster that are in the
PENDING state. |
void |
setRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount)
The number of container instances registered into the cluster.
|
void |
setRunningTasksCount(Integer runningTasksCount)
The number of tasks in the cluster that are in the
RUNNING state. |
void |
setSettings(Collection<ClusterSetting> settings)
The settings for the cluster.
|
void |
setStatistics(Collection<KeyValuePair> statistics)
Additional information about your clusters that are separated by launch type, including:
|
void |
setStatus(String status)
The status of the cluster.
|
void |
setTags(Collection<Tag> tags)
The metadata that you apply to the cluster to help you categorize and organize them.
|
String |
toString()
Returns a string representation of this object.
|
Cluster |
withActiveServicesCount(Integer activeServicesCount)
The number of services that are running on the cluster in an
ACTIVE state. |
Cluster |
withClusterArn(String clusterArn)
The Amazon Resource Name (ARN) that identifies the cluster.
|
Cluster |
withClusterName(String clusterName)
A user-generated string that you use to identify your cluster.
|
Cluster |
withPendingTasksCount(Integer pendingTasksCount)
The number of tasks in the cluster that are in the
PENDING state. |
Cluster |
withRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount)
The number of container instances registered into the cluster.
|
Cluster |
withRunningTasksCount(Integer runningTasksCount)
The number of tasks in the cluster that are in the
RUNNING state. |
Cluster |
withSettings(ClusterSetting... settings)
The settings for the cluster.
|
Cluster |
withSettings(Collection<ClusterSetting> settings)
The settings for the cluster.
|
Cluster |
withStatistics(Collection<KeyValuePair> statistics)
Additional information about your clusters that are separated by launch type, including:
|
Cluster |
withStatistics(KeyValuePair... statistics)
Additional information about your clusters that are separated by launch type, including:
|
Cluster |
withStatus(String status)
The status of the cluster.
|
Cluster |
withTags(Collection<Tag> tags)
The metadata that you apply to the cluster to help you categorize and organize them.
|
Cluster |
withTags(Tag... tags)
The metadata that you apply to the cluster to help you categorize and organize them.
|
public void setClusterArn(String clusterArn)
The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains the arn:aws:ecs
namespace, followed by the Region of the cluster, the AWS account ID of the cluster owner, the
cluster
namespace, and then the cluster name. For example,
arn:aws:ecs:region:012345678910:cluster/test
.
clusterArn
- The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains the arn:aws:ecs
namespace, followed by the Region of the cluster, the AWS account ID of the cluster owner, the
cluster
namespace, and then the cluster name. For example,
arn:aws:ecs:region:012345678910:cluster/test
.public String getClusterArn()
The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains the arn:aws:ecs
namespace, followed by the Region of the cluster, the AWS account ID of the cluster owner, the
cluster
namespace, and then the cluster name. For example,
arn:aws:ecs:region:012345678910:cluster/test
.
arn:aws:ecs
namespace, followed by the Region of the cluster, the AWS account ID of the cluster owner, the
cluster
namespace, and then the cluster name. For example,
arn:aws:ecs:region:012345678910:cluster/test
.public Cluster withClusterArn(String clusterArn)
The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains the arn:aws:ecs
namespace, followed by the Region of the cluster, the AWS account ID of the cluster owner, the
cluster
namespace, and then the cluster name. For example,
arn:aws:ecs:region:012345678910:cluster/test
.
clusterArn
- The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains the arn:aws:ecs
namespace, followed by the Region of the cluster, the AWS account ID of the cluster owner, the
cluster
namespace, and then the cluster name. For example,
arn:aws:ecs:region:012345678910:cluster/test
.public void setClusterName(String clusterName)
A user-generated string that you use to identify your cluster.
clusterName
- A user-generated string that you use to identify your cluster.public String getClusterName()
A user-generated string that you use to identify your cluster.
public Cluster withClusterName(String clusterName)
A user-generated string that you use to identify your cluster.
clusterName
- A user-generated string that you use to identify your cluster.public void setStatus(String status)
The status of the cluster. The valid values are ACTIVE
or INACTIVE
. ACTIVE
indicates that you can register container instances with the cluster and the associated instances can accept
tasks.
status
- The status of the cluster. The valid values are ACTIVE
or INACTIVE
.
ACTIVE
indicates that you can register container instances with the cluster and the
associated instances can accept tasks.public String getStatus()
The status of the cluster. The valid values are ACTIVE
or INACTIVE
. ACTIVE
indicates that you can register container instances with the cluster and the associated instances can accept
tasks.
ACTIVE
or INACTIVE
.
ACTIVE
indicates that you can register container instances with the cluster and the
associated instances can accept tasks.public Cluster withStatus(String status)
The status of the cluster. The valid values are ACTIVE
or INACTIVE
. ACTIVE
indicates that you can register container instances with the cluster and the associated instances can accept
tasks.
status
- The status of the cluster. The valid values are ACTIVE
or INACTIVE
.
ACTIVE
indicates that you can register container instances with the cluster and the
associated instances can accept tasks.public void setRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount)
The number of container instances registered into the cluster. This includes container instances in both
ACTIVE
and DRAINING
status.
registeredContainerInstancesCount
- The number of container instances registered into the cluster. This includes container instances in both
ACTIVE
and DRAINING
status.public Integer getRegisteredContainerInstancesCount()
The number of container instances registered into the cluster. This includes container instances in both
ACTIVE
and DRAINING
status.
ACTIVE
and DRAINING
status.public Cluster withRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount)
The number of container instances registered into the cluster. This includes container instances in both
ACTIVE
and DRAINING
status.
registeredContainerInstancesCount
- The number of container instances registered into the cluster. This includes container instances in both
ACTIVE
and DRAINING
status.public void setRunningTasksCount(Integer runningTasksCount)
The number of tasks in the cluster that are in the RUNNING
state.
runningTasksCount
- The number of tasks in the cluster that are in the RUNNING
state.public Integer getRunningTasksCount()
The number of tasks in the cluster that are in the RUNNING
state.
RUNNING
state.public Cluster withRunningTasksCount(Integer runningTasksCount)
The number of tasks in the cluster that are in the RUNNING
state.
runningTasksCount
- The number of tasks in the cluster that are in the RUNNING
state.public void setPendingTasksCount(Integer pendingTasksCount)
The number of tasks in the cluster that are in the PENDING
state.
pendingTasksCount
- The number of tasks in the cluster that are in the PENDING
state.public Integer getPendingTasksCount()
The number of tasks in the cluster that are in the PENDING
state.
PENDING
state.public Cluster withPendingTasksCount(Integer pendingTasksCount)
The number of tasks in the cluster that are in the PENDING
state.
pendingTasksCount
- The number of tasks in the cluster that are in the PENDING
state.public void setActiveServicesCount(Integer activeServicesCount)
The number of services that are running on the cluster in an ACTIVE
state. You can view these
services with ListServices.
activeServicesCount
- The number of services that are running on the cluster in an ACTIVE
state. You can view these
services with ListServices.public Integer getActiveServicesCount()
The number of services that are running on the cluster in an ACTIVE
state. You can view these
services with ListServices.
ACTIVE
state. You can view
these services with ListServices.public Cluster withActiveServicesCount(Integer activeServicesCount)
The number of services that are running on the cluster in an ACTIVE
state. You can view these
services with ListServices.
activeServicesCount
- The number of services that are running on the cluster in an ACTIVE
state. You can view these
services with ListServices.public List<KeyValuePair> getStatistics()
Additional information about your clusters that are separated by launch type, including:
runningEC2TasksCount
RunningFargateTasksCount
pendingEC2TasksCount
pendingFargateTasksCount
activeEC2ServiceCount
activeFargateServiceCount
drainingEC2ServiceCount
drainingFargateServiceCount
runningEC2TasksCount
RunningFargateTasksCount
pendingEC2TasksCount
pendingFargateTasksCount
activeEC2ServiceCount
activeFargateServiceCount
drainingEC2ServiceCount
drainingFargateServiceCount
public void setStatistics(Collection<KeyValuePair> statistics)
Additional information about your clusters that are separated by launch type, including:
runningEC2TasksCount
RunningFargateTasksCount
pendingEC2TasksCount
pendingFargateTasksCount
activeEC2ServiceCount
activeFargateServiceCount
drainingEC2ServiceCount
drainingFargateServiceCount
statistics
- Additional information about your clusters that are separated by launch type, including:
runningEC2TasksCount
RunningFargateTasksCount
pendingEC2TasksCount
pendingFargateTasksCount
activeEC2ServiceCount
activeFargateServiceCount
drainingEC2ServiceCount
drainingFargateServiceCount
public Cluster withStatistics(KeyValuePair... statistics)
Additional information about your clusters that are separated by launch type, including:
runningEC2TasksCount
RunningFargateTasksCount
pendingEC2TasksCount
pendingFargateTasksCount
activeEC2ServiceCount
activeFargateServiceCount
drainingEC2ServiceCount
drainingFargateServiceCount
NOTE: This method appends the values to the existing list (if any). Use
setStatistics(java.util.Collection)
or withStatistics(java.util.Collection)
if you want to
override the existing values.
statistics
- Additional information about your clusters that are separated by launch type, including:
runningEC2TasksCount
RunningFargateTasksCount
pendingEC2TasksCount
pendingFargateTasksCount
activeEC2ServiceCount
activeFargateServiceCount
drainingEC2ServiceCount
drainingFargateServiceCount
public Cluster withStatistics(Collection<KeyValuePair> statistics)
Additional information about your clusters that are separated by launch type, including:
runningEC2TasksCount
RunningFargateTasksCount
pendingEC2TasksCount
pendingFargateTasksCount
activeEC2ServiceCount
activeFargateServiceCount
drainingEC2ServiceCount
drainingFargateServiceCount
statistics
- Additional information about your clusters that are separated by launch type, including:
runningEC2TasksCount
RunningFargateTasksCount
pendingEC2TasksCount
pendingFargateTasksCount
activeEC2ServiceCount
activeFargateServiceCount
drainingEC2ServiceCount
drainingFargateServiceCount
public List<Tag> getTags()
The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
Maximum number of tags per resource - 50
For each resource, each tag key must be unique, and each tag key can have only one value.
Maximum key length - 128 Unicode characters in UTF-8
Maximum value length - 256 Unicode characters in UTF-8
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
Tag keys and values are case-sensitive.
Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix for
either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this
prefix. Tags with this prefix do not count against your tags per resource limit.
The following basic restrictions apply to tags:
Maximum number of tags per resource - 50
For each resource, each tag key must be unique, and each tag key can have only one value.
Maximum key length - 128 Unicode characters in UTF-8
Maximum value length - 256 Unicode characters in UTF-8
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
Tag keys and values are case-sensitive.
Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a
prefix for either keys or values as it is reserved for AWS 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(Collection<Tag> tags)
The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
Maximum number of tags per resource - 50
For each resource, each tag key must be unique, and each tag key can have only one value.
Maximum key length - 128 Unicode characters in UTF-8
Maximum value length - 256 Unicode characters in UTF-8
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
Tag keys and values are case-sensitive.
Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix for
either keys or values as it is reserved for AWS 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.
tags
- The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of
a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
Maximum number of tags per resource - 50
For each resource, each tag key must be unique, and each tag key can have only one value.
Maximum key length - 128 Unicode characters in UTF-8
Maximum value length - 256 Unicode characters in UTF-8
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
Tag keys and values are case-sensitive.
Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix
for either keys or values as it is reserved for AWS 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 Cluster withTags(Tag... tags)
The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
Maximum number of tags per resource - 50
For each resource, each tag key must be unique, and each tag key can have only one value.
Maximum key length - 128 Unicode characters in UTF-8
Maximum value length - 256 Unicode characters in UTF-8
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
Tag keys and values are case-sensitive.
Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix for
either keys or values as it is reserved for AWS 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
setTags(java.util.Collection)
or withTags(java.util.Collection)
if you want to override the
existing values.
tags
- The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of
a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
Maximum number of tags per resource - 50
For each resource, each tag key must be unique, and each tag key can have only one value.
Maximum key length - 128 Unicode characters in UTF-8
Maximum value length - 256 Unicode characters in UTF-8
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
Tag keys and values are case-sensitive.
Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix
for either keys or values as it is reserved for AWS 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 Cluster withTags(Collection<Tag> tags)
The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
Maximum number of tags per resource - 50
For each resource, each tag key must be unique, and each tag key can have only one value.
Maximum key length - 128 Unicode characters in UTF-8
Maximum value length - 256 Unicode characters in UTF-8
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
Tag keys and values are case-sensitive.
Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix for
either keys or values as it is reserved for AWS 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.
tags
- The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of
a key and an optional value, both of which you define.
The following basic restrictions apply to tags:
Maximum number of tags per resource - 50
For each resource, each tag key must be unique, and each tag key can have only one value.
Maximum key length - 128 Unicode characters in UTF-8
Maximum value length - 256 Unicode characters in UTF-8
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
Tag keys and values are case-sensitive.
Do not use aws:
, AWS:
, or any upper or lowercase combination of such as a prefix
for either keys or values as it is reserved for AWS 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 List<ClusterSetting> getSettings()
The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is enabled or disabled for a cluster.
public void setSettings(Collection<ClusterSetting> settings)
The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is enabled or disabled for a cluster.
settings
- The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is enabled or
disabled for a cluster.public Cluster withSettings(ClusterSetting... settings)
The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is enabled or disabled for a cluster.
NOTE: This method appends the values to the existing list (if any). Use
setSettings(java.util.Collection)
or withSettings(java.util.Collection)
if you want to override
the existing values.
settings
- The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is enabled or
disabled for a cluster.public Cluster withSettings(Collection<ClusterSetting> settings)
The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is enabled or disabled for a cluster.
settings
- The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is enabled or
disabled for a cluster.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.