Class Cluster
- All Implemented Interfaces:
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The number of services that are running on the cluster in anACTIVE
state.The Amazon Resource Name (ARN) that identifies the cluster.A user-generated string that you use to identify your cluster.The number of tasks in the cluster that are in thePENDING
state.The number of container instances registered into the cluster.The number of tasks in the cluster that are in theRUNNING
state.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
The status of the cluster.toString()
Returns a string representation of this object; useful for testing and debugging.withActiveServicesCount
(Integer activeServicesCount) The number of services that are running on the cluster in anACTIVE
state.withClusterArn
(String clusterArn) The Amazon Resource Name (ARN) that identifies the cluster.withClusterName
(String clusterName) A user-generated string that you use to identify your cluster.withPendingTasksCount
(Integer pendingTasksCount) The number of tasks in the cluster that are in thePENDING
state.withRegisteredContainerInstancesCount
(Integer registeredContainerInstancesCount) The number of container instances registered into the cluster.withRunningTasksCount
(Integer runningTasksCount) The number of tasks in the cluster that are in theRUNNING
state.withStatus
(String status) The status of the cluster.
-
Constructor Details
-
Cluster
public Cluster()
-
-
Method Details
-
setClusterArn
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
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
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
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
A user-generated string that you use to identify your cluster.
- Returns:
- A user-generated string that you use to identify your cluster.
-
withClusterName
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
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
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
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
The number of container instances registered into the cluster.
- Parameters:
registeredContainerInstancesCount
- The number of container instances registered into the cluster.
-
getRegisteredContainerInstancesCount
The number of container instances registered into the cluster.
- Returns:
- The number of container instances registered into the cluster.
-
withRegisteredContainerInstancesCount
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
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
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
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
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
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
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
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
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
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
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-