Class Cluster
- java.lang.Object
-
- com.amazonaws.services.ecs.model.Cluster
-
- All Implemented Interfaces:
Serializable
,Cloneable
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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Cluster()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cluster
clone()
boolean
equals(Object obj)
Integer
getActiveServicesCount()
The number of services that are running on the cluster in anACTIVE
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 thePENDING
state.Integer
getRegisteredContainerInstancesCount()
The number of container instances registered into the cluster.Integer
getRunningTasksCount()
The number of tasks in the cluster that are in theRUNNING
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 anACTIVE
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 thePENDING
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 theRUNNING
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 anACTIVE
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 thePENDING
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 theRUNNING
state.Cluster
withStatus(String status)
The status of the cluster.
-
-
-
Method Detail
-
setClusterArn
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, thecluster
namespace, and then the cluster name. For example,arn:aws:ecs:region:012345678910:cluster/test
..- Parameters:
clusterArn
- The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains thearn:aws:ecs
namespace, followed by the region of the cluster, the AWS account ID of the cluster owner, thecluster
namespace, and then the cluster name. For example,arn:aws:ecs:region:012345678910:cluster/test
..
-
getClusterArn
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, thecluster
namespace, and then the cluster name. For example,arn:aws:ecs:region:012345678910:cluster/test
..- Returns:
- 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, thecluster
namespace, and then the cluster name. For example,arn:aws:ecs:region:012345678910:cluster/test
..
-
withClusterArn
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, thecluster
namespace, and then the cluster name. For example,arn:aws:ecs:region:012345678910:cluster/test
..- Parameters:
clusterArn
- The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains thearn:aws:ecs
namespace, followed by the region of the cluster, the AWS account ID of the cluster owner, thecluster
namespace, and then the cluster name. For example,arn:aws:ecs:region:012345678910:cluster/test
..- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setClusterName
public void setClusterName(String clusterName)
A user-generated string that you use to identify your cluster.
- Parameters:
clusterName
- A user-generated string that you use to identify your cluster.
-
getClusterName
public String getClusterName()
A user-generated string that you use to identify your cluster.
- Returns:
- A user-generated string that you use to identify your cluster.
-
withClusterName
public Cluster withClusterName(String clusterName)
A user-generated string that you use to identify your cluster.
- Parameters:
clusterName
- A user-generated string that you use to identify your cluster.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStatus
public void setStatus(String status)
The status of the cluster. The valid values are
ACTIVE
orINACTIVE
.ACTIVE
indicates that you can register container instances with the cluster and the associated instances can accept tasks.- Parameters:
status
- The status of the cluster. The valid values areACTIVE
orINACTIVE
.ACTIVE
indicates that you can register container instances with the cluster and the associated instances can accept tasks.
-
getStatus
public String getStatus()
The status of the cluster. The valid values are
ACTIVE
orINACTIVE
.ACTIVE
indicates that you can register container instances with the cluster and the associated instances can accept tasks.- Returns:
- The status of the cluster. The valid values are
ACTIVE
orINACTIVE
.ACTIVE
indicates that you can register container instances with the cluster and the associated instances can accept tasks.
-
withStatus
public Cluster withStatus(String status)
The status of the cluster. The valid values are
ACTIVE
orINACTIVE
.ACTIVE
indicates that you can register container instances with the cluster and the associated instances can accept tasks.- Parameters:
status
- The status of the cluster. The valid values areACTIVE
orINACTIVE
.ACTIVE
indicates that you can register container instances with the cluster and the associated instances can accept tasks.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRegisteredContainerInstancesCount
public void setRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount)
The number of container instances registered into the cluster.
- Parameters:
registeredContainerInstancesCount
- The number of container instances registered into the cluster.
-
getRegisteredContainerInstancesCount
public Integer getRegisteredContainerInstancesCount()
The number of container instances registered into the cluster.
- Returns:
- The number of container instances registered into the cluster.
-
withRegisteredContainerInstancesCount
public Cluster withRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount)
The number of container instances registered into the cluster.
- Parameters:
registeredContainerInstancesCount
- The number of container instances registered into the cluster.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRunningTasksCount
public void setRunningTasksCount(Integer runningTasksCount)
The number of tasks in the cluster that are in the
RUNNING
state.- Parameters:
runningTasksCount
- The number of tasks in the cluster that are in theRUNNING
state.
-
getRunningTasksCount
public Integer getRunningTasksCount()
The number of tasks in the cluster that are in the
RUNNING
state.- Returns:
- The number of tasks in the cluster that are in the
RUNNING
state.
-
withRunningTasksCount
public Cluster withRunningTasksCount(Integer runningTasksCount)
The number of tasks in the cluster that are in the
RUNNING
state.- Parameters:
runningTasksCount
- The number of tasks in the cluster that are in theRUNNING
state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPendingTasksCount
public void setPendingTasksCount(Integer pendingTasksCount)
The number of tasks in the cluster that are in the
PENDING
state.- Parameters:
pendingTasksCount
- The number of tasks in the cluster that are in thePENDING
state.
-
getPendingTasksCount
public Integer getPendingTasksCount()
The number of tasks in the cluster that are in the
PENDING
state.- Returns:
- The number of tasks in the cluster that are in the
PENDING
state.
-
withPendingTasksCount
public Cluster withPendingTasksCount(Integer pendingTasksCount)
The number of tasks in the cluster that are in the
PENDING
state.- Parameters:
pendingTasksCount
- The number of tasks in the cluster that are in thePENDING
state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setActiveServicesCount
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.- Parameters:
activeServicesCount
- The number of services that are running on the cluster in anACTIVE
state. You can view these services with ListServices.
-
getActiveServicesCount
public Integer getActiveServicesCount()
The number of services that are running on the cluster in an
ACTIVE
state. You can view these services with ListServices.- Returns:
- The number of services that are running on the cluster in an
ACTIVE
state. You can view these services with ListServices.
-
withActiveServicesCount
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.- Parameters:
activeServicesCount
- The number of services that are running on the cluster in anACTIVE
state. You can view these services with ListServices.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-