Class 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 Detail

      • Cluster

        public 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, the cluster 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 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 ..
      • 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, the cluster 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, the cluster 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, the cluster 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 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 ..
        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 or INACTIVE. 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 are ACTIVE or INACTIVE. 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 or INACTIVE. 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 or INACTIVE. 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 or INACTIVE. 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 are ACTIVE or INACTIVE. 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 the RUNNING 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 the RUNNING 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 the PENDING 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 the PENDING 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 an ACTIVE 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 an ACTIVE 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 class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object