Interface Cluster.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Cluster.Builder,Cluster>, SdkBuilder<Cluster.Builder,Cluster>, SdkPojo
Enclosing class:
Cluster

public static interface Cluster.Builder extends SdkPojo, CopyableBuilder<Cluster.Builder,Cluster>
  • Method Details

    • clusterArn

      Cluster.Builder clusterArn(String clusterArn)

      The Amazon Resource Name (ARN) that identifies the cluster. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.

      Parameters:
      clusterArn - The Amazon Resource Name (ARN) that identifies the cluster. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • clusterName

      Cluster.Builder clusterName(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.
    • configuration

      Cluster.Builder configuration(ClusterConfiguration configuration)

      The execute command configuration for the cluster.

      Parameters:
      configuration - The execute command configuration for the cluster.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • configuration

      default Cluster.Builder configuration(Consumer<ClusterConfiguration.Builder> configuration)

      The execute command configuration for the cluster.

      This is a convenience method that creates an instance of the ClusterConfiguration.Builder avoiding the need to create one manually via ClusterConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to configuration(ClusterConfiguration).

      Parameters:
      configuration - a consumer that will call methods on ClusterConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      Cluster.Builder status(String status)

      The status of the cluster. The following are the possible states that are returned.

      ACTIVE

      The cluster is ready to accept tasks and if applicable you can register container instances with the cluster.

      PROVISIONING

      The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being created.

      DEPROVISIONING

      The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being deleted.

      FAILED

      The cluster has capacity providers that are associated with it and the resources needed for the capacity provider have failed to create.

      INACTIVE

      The cluster has been deleted. Clusters with an INACTIVE status may remain discoverable in your account for a period of time. However, this behavior is subject to change in the future. We don't recommend that you rely on INACTIVE clusters persisting.

      Parameters:
      status - The status of the cluster. The following are the possible states that are returned.

      ACTIVE

      The cluster is ready to accept tasks and if applicable you can register container instances with the cluster.

      PROVISIONING

      The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being created.

      DEPROVISIONING

      The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being deleted.

      FAILED

      The cluster has capacity providers that are associated with it and the resources needed for the capacity provider have failed to create.

      INACTIVE

      The cluster has been deleted. Clusters with an INACTIVE status may remain discoverable in your account for a period of time. However, this behavior is subject to change in the future. We don't recommend that you rely on INACTIVE clusters persisting.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • registeredContainerInstancesCount

      Cluster.Builder registeredContainerInstancesCount(Integer registeredContainerInstancesCount)

      The number of container instances registered into the cluster. This includes container instances in both ACTIVE and DRAINING status.

      Parameters:
      registeredContainerInstancesCount - The number of container instances registered into the cluster. This includes container instances in both ACTIVE and DRAINING status.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • runningTasksCount

      Cluster.Builder runningTasksCount(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.
    • pendingTasksCount

      Cluster.Builder pendingTasksCount(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.
    • activeServicesCount

      Cluster.Builder activeServicesCount(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.
    • statistics

      Cluster.Builder statistics(Collection<KeyValuePair> statistics)

      Additional information about your clusters that are separated by launch type. They include the following:

      • runningEC2TasksCount

      • RunningFargateTasksCount

      • pendingEC2TasksCount

      • pendingFargateTasksCount

      • activeEC2ServiceCount

      • activeFargateServiceCount

      • drainingEC2ServiceCount

      • drainingFargateServiceCount

      Parameters:
      statistics - Additional information about your clusters that are separated by launch type. They include the following:

      • runningEC2TasksCount

      • RunningFargateTasksCount

      • pendingEC2TasksCount

      • pendingFargateTasksCount

      • activeEC2ServiceCount

      • activeFargateServiceCount

      • drainingEC2ServiceCount

      • drainingFargateServiceCount

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • statistics

      Cluster.Builder statistics(KeyValuePair... statistics)

      Additional information about your clusters that are separated by launch type. They include the following:

      • runningEC2TasksCount

      • RunningFargateTasksCount

      • pendingEC2TasksCount

      • pendingFargateTasksCount

      • activeEC2ServiceCount

      • activeFargateServiceCount

      • drainingEC2ServiceCount

      • drainingFargateServiceCount

      Parameters:
      statistics - Additional information about your clusters that are separated by launch type. They include the following:

      • runningEC2TasksCount

      • RunningFargateTasksCount

      • pendingEC2TasksCount

      • pendingFargateTasksCount

      • activeEC2ServiceCount

      • activeFargateServiceCount

      • drainingEC2ServiceCount

      • drainingFargateServiceCount

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • statistics

      Cluster.Builder statistics(Consumer<KeyValuePair.Builder>... statistics)

      Additional information about your clusters that are separated by launch type. They include the following:

      • runningEC2TasksCount

      • RunningFargateTasksCount

      • pendingEC2TasksCount

      • pendingFargateTasksCount

      • activeEC2ServiceCount

      • activeFargateServiceCount

      • drainingEC2ServiceCount

      • drainingFargateServiceCount

      This is a convenience method that creates an instance of the KeyValuePair.Builder avoiding the need to create one manually via KeyValuePair.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to statistics(List<KeyValuePair>).

      Parameters:
      statistics - a consumer that will call methods on KeyValuePair.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • tags

      The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.

      The following basic restrictions apply to tags:

      • Maximum number of tags per resource - 50

      • For each resource, each tag key must be unique, and each tag key can have only one value.

      • Maximum key length - 128 Unicode characters in UTF-8

      • Maximum value length - 256 Unicode characters in UTF-8

      • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

      • Tag keys and values are case-sensitive.

      • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

      Parameters:
      tags - The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.

      The following basic restrictions apply to tags:

      • Maximum number of tags per resource - 50

      • For each resource, each tag key must be unique, and each tag key can have only one value.

      • Maximum key length - 128 Unicode characters in UTF-8

      • Maximum value length - 256 Unicode characters in UTF-8

      • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

      • Tag keys and values are case-sensitive.

      • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tags

      Cluster.Builder tags(Tag... tags)

      The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.

      The following basic restrictions apply to tags:

      • Maximum number of tags per resource - 50

      • For each resource, each tag key must be unique, and each tag key can have only one value.

      • Maximum key length - 128 Unicode characters in UTF-8

      • Maximum value length - 256 Unicode characters in UTF-8

      • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

      • Tag keys and values are case-sensitive.

      • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

      Parameters:
      tags - The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.

      The following basic restrictions apply to tags:

      • Maximum number of tags per resource - 50

      • For each resource, each tag key must be unique, and each tag key can have only one value.

      • Maximum key length - 128 Unicode characters in UTF-8

      • Maximum value length - 256 Unicode characters in UTF-8

      • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

      • Tag keys and values are case-sensitive.

      • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tags

      The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.

      The following basic restrictions apply to tags:

      • Maximum number of tags per resource - 50

      • For each resource, each tag key must be unique, and each tag key can have only one value.

      • Maximum key length - 128 Unicode characters in UTF-8

      • Maximum value length - 256 Unicode characters in UTF-8

      • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

      • Tag keys and values are case-sensitive.

      • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

      This is a convenience method that creates an instance of the Tag.Builder avoiding the need to create one manually via Tag.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to tags(List<Tag>).

      Parameters:
      tags - a consumer that will call methods on Tag.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • settings

      The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.

      Parameters:
      settings - The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • settings

      Cluster.Builder settings(ClusterSetting... settings)

      The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.

      Parameters:
      settings - The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • settings

      The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.

      This is a convenience method that creates an instance of the ClusterSetting.Builder avoiding the need to create one manually via ClusterSetting.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to settings(List<ClusterSetting>).

      Parameters:
      settings - a consumer that will call methods on ClusterSetting.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • capacityProviders

      Cluster.Builder capacityProviders(Collection<String> capacityProviders)

      The capacity providers associated with the cluster.

      Parameters:
      capacityProviders - The capacity providers associated with the cluster.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • capacityProviders

      Cluster.Builder capacityProviders(String... capacityProviders)

      The capacity providers associated with the cluster.

      Parameters:
      capacityProviders - The capacity providers associated with the cluster.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • defaultCapacityProviderStrategy

      Cluster.Builder defaultCapacityProviderStrategy(Collection<CapacityProviderStrategyItem> defaultCapacityProviderStrategy)

      The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

      Parameters:
      defaultCapacityProviderStrategy - The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • defaultCapacityProviderStrategy

      Cluster.Builder defaultCapacityProviderStrategy(CapacityProviderStrategyItem... defaultCapacityProviderStrategy)

      The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

      Parameters:
      defaultCapacityProviderStrategy - The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • defaultCapacityProviderStrategy

      Cluster.Builder defaultCapacityProviderStrategy(Consumer<CapacityProviderStrategyItem.Builder>... defaultCapacityProviderStrategy)

      The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

      This is a convenience method that creates an instance of the CapacityProviderStrategyItem.Builder avoiding the need to create one manually via CapacityProviderStrategyItem.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to defaultCapacityProviderStrategy(List<CapacityProviderStrategyItem>).

      Parameters:
      defaultCapacityProviderStrategy - a consumer that will call methods on CapacityProviderStrategyItem.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • attachments

      Cluster.Builder attachments(Collection<Attachment> attachments)

      The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.

      Parameters:
      attachments - The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • attachments

      Cluster.Builder attachments(Attachment... attachments)

      The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.

      Parameters:
      attachments - The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • attachments

      Cluster.Builder attachments(Consumer<Attachment.Builder>... attachments)

      The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.

      This is a convenience method that creates an instance of the Attachment.Builder avoiding the need to create one manually via Attachment.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to attachments(List<Attachment>).

      Parameters:
      attachments - a consumer that will call methods on Attachment.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • attachmentsStatus

      Cluster.Builder attachmentsStatus(String attachmentsStatus)

      The status of the capacity providers associated with the cluster. The following are the states that are returned.

      UPDATE_IN_PROGRESS

      The available capacity providers for the cluster are updating.

      UPDATE_COMPLETE

      The capacity providers have successfully updated.

      UPDATE_FAILED

      The capacity provider updates failed.

      Parameters:
      attachmentsStatus - The status of the capacity providers associated with the cluster. The following are the states that are returned.

      UPDATE_IN_PROGRESS

      The available capacity providers for the cluster are updating.

      UPDATE_COMPLETE

      The capacity providers have successfully updated.

      UPDATE_FAILED

      The capacity provider updates failed.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • serviceConnectDefaults

      Cluster.Builder serviceConnectDefaults(ClusterServiceConnectDefaults serviceConnectDefaults)

      Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the enabled parameter to true in the ServiceConnectConfiguration. You can set the namespace of each service individually in the ServiceConnectConfiguration to override this default parameter.

      Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.

      Parameters:
      serviceConnectDefaults - Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the enabled parameter to true in the ServiceConnectConfiguration. You can set the namespace of each service individually in the ServiceConnectConfiguration to override this default parameter.

      Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • serviceConnectDefaults

      default Cluster.Builder serviceConnectDefaults(Consumer<ClusterServiceConnectDefaults.Builder> serviceConnectDefaults)

      Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the enabled parameter to true in the ServiceConnectConfiguration. You can set the namespace of each service individually in the ServiceConnectConfiguration to override this default parameter.

      Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.

      This is a convenience method that creates an instance of the ClusterServiceConnectDefaults.Builder avoiding the need to create one manually via ClusterServiceConnectDefaults.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to serviceConnectDefaults(ClusterServiceConnectDefaults).

      Parameters:
      serviceConnectDefaults - a consumer that will call methods on ClusterServiceConnectDefaults.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: