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 Clusterclone()booleanequals(Object obj)IntegergetActiveServicesCount()The number of services that are running on the cluster in anACTIVEstate.StringgetClusterArn()The Amazon Resource Name (ARN) that identifies the cluster.StringgetClusterName()A user-generated string that you use to identify your cluster.IntegergetPendingTasksCount()The number of tasks in the cluster that are in thePENDINGstate.IntegergetRegisteredContainerInstancesCount()The number of container instances registered into the cluster.IntegergetRunningTasksCount()The number of tasks in the cluster that are in theRUNNINGstate.StringgetStatus()The status of the cluster.inthashCode()voidsetActiveServicesCount(Integer activeServicesCount)The number of services that are running on the cluster in anACTIVEstate.voidsetClusterArn(String clusterArn)The Amazon Resource Name (ARN) that identifies the cluster.voidsetClusterName(String clusterName)A user-generated string that you use to identify your cluster.voidsetPendingTasksCount(Integer pendingTasksCount)The number of tasks in the cluster that are in thePENDINGstate.voidsetRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount)The number of container instances registered into the cluster.voidsetRunningTasksCount(Integer runningTasksCount)The number of tasks in the cluster that are in theRUNNINGstate.voidsetStatus(String status)The status of the cluster.StringtoString()Returns a string representation of this object; useful for testing and debugging.ClusterwithActiveServicesCount(Integer activeServicesCount)The number of services that are running on the cluster in anACTIVEstate.ClusterwithClusterArn(String clusterArn)The Amazon Resource Name (ARN) that identifies the cluster.ClusterwithClusterName(String clusterName)A user-generated string that you use to identify your cluster.ClusterwithPendingTasksCount(Integer pendingTasksCount)The number of tasks in the cluster that are in thePENDINGstate.ClusterwithRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount)The number of container instances registered into the cluster.ClusterwithRunningTasksCount(Integer runningTasksCount)The number of tasks in the cluster that are in theRUNNINGstate.ClusterwithStatus(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:ecsnamespace, followed by the region of the cluster, the AWS account ID of the cluster owner, theclusternamespace, 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:ecsnamespace, followed by the region of the cluster, the AWS account ID of the cluster owner, theclusternamespace, 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:ecsnamespace, followed by the region of the cluster, the AWS account ID of the cluster owner, theclusternamespace, 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:ecsnamespace, followed by the region of the cluster, the AWS account ID of the cluster owner, theclusternamespace, 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:ecsnamespace, followed by the region of the cluster, the AWS account ID of the cluster owner, theclusternamespace, 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:ecsnamespace, followed by the region of the cluster, the AWS account ID of the cluster owner, theclusternamespace, 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
ACTIVEorINACTIVE.ACTIVEindicates 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 areACTIVEorINACTIVE.ACTIVEindicates 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
ACTIVEorINACTIVE.ACTIVEindicates 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
ACTIVEorINACTIVE.ACTIVEindicates 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
ACTIVEorINACTIVE.ACTIVEindicates 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 areACTIVEorINACTIVE.ACTIVEindicates 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
RUNNINGstate.- Parameters:
runningTasksCount- The number of tasks in the cluster that are in theRUNNINGstate.
-
getRunningTasksCount
public Integer getRunningTasksCount()
The number of tasks in the cluster that are in the
RUNNINGstate.- Returns:
- The number of tasks in the cluster that are in the
RUNNINGstate.
-
withRunningTasksCount
public Cluster withRunningTasksCount(Integer runningTasksCount)
The number of tasks in the cluster that are in the
RUNNINGstate.- Parameters:
runningTasksCount- The number of tasks in the cluster that are in theRUNNINGstate.- 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
PENDINGstate.- Parameters:
pendingTasksCount- The number of tasks in the cluster that are in thePENDINGstate.
-
getPendingTasksCount
public Integer getPendingTasksCount()
The number of tasks in the cluster that are in the
PENDINGstate.- Returns:
- The number of tasks in the cluster that are in the
PENDINGstate.
-
withPendingTasksCount
public Cluster withPendingTasksCount(Integer pendingTasksCount)
The number of tasks in the cluster that are in the
PENDINGstate.- Parameters:
pendingTasksCount- The number of tasks in the cluster that are in thePENDINGstate.- 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
ACTIVEstate. You can view these services with ListServices.- Parameters:
activeServicesCount- The number of services that are running on the cluster in anACTIVEstate. You can view these services with ListServices.
-
getActiveServicesCount
public Integer getActiveServicesCount()
The number of services that are running on the cluster in an
ACTIVEstate. You can view these services with ListServices.- Returns:
- The number of services that are running on the cluster in an
ACTIVEstate. 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
ACTIVEstate. You can view these services with ListServices.- Parameters:
activeServicesCount- The number of services that are running on the cluster in anACTIVEstate. 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:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-