public class Cluster extends Object implements Serializable, Cloneable
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 can 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. |
String |
getStatus()
The status of the cluster.
|
int |
hashCode() |
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 can 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 |
setStatus(String status)
The status of the cluster.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
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 can 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 |
withStatus(String status)
The status of the cluster.
|
public String getClusterArn()
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 void setClusterArn(String clusterArn)
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 Cluster withClusterArn(String clusterArn)
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.
Returns a reference to this object so that method calls can be chained together.
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 getClusterName()
public void setClusterName(String clusterName)
clusterName
- A user-generated string that you can use to identify your cluster.public Cluster withClusterName(String clusterName)
Returns a reference to this object so that method calls can be chained together.
clusterName
- A user-generated string that you can use to identify your cluster.public String getStatus()
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 void setStatus(String status)
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 Cluster withStatus(String status)
ACTIVE
or
INACTIVE
. ACTIVE
indicates that you can
register container instances with the cluster and the associated
instances can accept tasks.
Returns a reference to this object so that method calls can be chained together.
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 Integer getRegisteredContainerInstancesCount()
public void setRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount)
registeredContainerInstancesCount
- The number of container instances registered into the cluster.public Cluster withRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount)
Returns a reference to this object so that method calls can be chained together.
registeredContainerInstancesCount
- The number of container instances registered into the cluster.public Integer getRunningTasksCount()
RUNNING
state.RUNNING
state.public void setRunningTasksCount(Integer runningTasksCount)
RUNNING
state.runningTasksCount
- The number of tasks in the cluster that are in the
RUNNING
state.public Cluster withRunningTasksCount(Integer runningTasksCount)
RUNNING
state.
Returns a reference to this object so that method calls can be chained together.
runningTasksCount
- The number of tasks in the cluster that are in the
RUNNING
state.public Integer getPendingTasksCount()
PENDING
state.PENDING
state.public void setPendingTasksCount(Integer pendingTasksCount)
PENDING
state.pendingTasksCount
- The number of tasks in the cluster that are in the
PENDING
state.public Cluster withPendingTasksCount(Integer pendingTasksCount)
PENDING
state.
Returns a reference to this object so that method calls can be chained together.
pendingTasksCount
- The number of tasks in the cluster that are in the
PENDING
state.public Integer getActiveServicesCount()
ACTIVE
state. You can view these services with
ListServices.ACTIVE
state. You can view these services with
ListServices.public void setActiveServicesCount(Integer activeServicesCount)
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 Cluster withActiveServicesCount(Integer activeServicesCount)
ACTIVE
state. You can view these services with
ListServices.
Returns a reference to this object so that method calls can be chained together.
activeServicesCount
- The number of services that are running on the cluster in an
ACTIVE
state. You can view these services with
ListServices.public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.