Interface Cluster.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<Cluster.Builder,
,Cluster> SdkBuilder<Cluster.Builder,
,Cluster> SdkPojo
- Enclosing class:
Cluster
-
Method Summary
Modifier and TypeMethodDescriptionactiveServicesCount
(Integer activeServicesCount) The number of services that are running on the cluster in anACTIVE
state.attachments
(Collection<Attachment> attachments) The resources attached to a cluster.attachments
(Consumer<Attachment.Builder>... attachments) The resources attached to a cluster.attachments
(Attachment... attachments) The resources attached to a cluster.attachmentsStatus
(String attachmentsStatus) The status of the capacity providers associated with the cluster.capacityProviders
(String... capacityProviders) The capacity providers associated with the cluster.capacityProviders
(Collection<String> capacityProviders) The capacity providers associated with the cluster.clusterArn
(String clusterArn) The Amazon Resource Name (ARN) that identifies the cluster.clusterName
(String clusterName) A user-generated string that you use to identify your cluster.default Cluster.Builder
configuration
(Consumer<ClusterConfiguration.Builder> configuration) The execute command configuration for the cluster.configuration
(ClusterConfiguration configuration) The execute command configuration for the cluster.defaultCapacityProviderStrategy
(Collection<CapacityProviderStrategyItem> defaultCapacityProviderStrategy) The default capacity provider strategy for the cluster.defaultCapacityProviderStrategy
(Consumer<CapacityProviderStrategyItem.Builder>... defaultCapacityProviderStrategy) The default capacity provider strategy for the cluster.defaultCapacityProviderStrategy
(CapacityProviderStrategyItem... defaultCapacityProviderStrategy) The default capacity provider strategy for the cluster.pendingTasksCount
(Integer pendingTasksCount) The number of tasks in the cluster that are in thePENDING
state.registeredContainerInstancesCount
(Integer registeredContainerInstancesCount) The number of container instances registered into the cluster.runningTasksCount
(Integer runningTasksCount) The number of tasks in the cluster that are in theRUNNING
state.default Cluster.Builder
serviceConnectDefaults
(Consumer<ClusterServiceConnectDefaults.Builder> serviceConnectDefaults) Use this parameter to set a default Service Connect namespace.serviceConnectDefaults
(ClusterServiceConnectDefaults serviceConnectDefaults) Use this parameter to set a default Service Connect namespace.settings
(Collection<ClusterSetting> settings) The settings for the cluster.settings
(Consumer<ClusterSetting.Builder>... settings) The settings for the cluster.settings
(ClusterSetting... settings) The settings for the cluster.statistics
(Collection<KeyValuePair> statistics) Additional information about your clusters that are separated by launch type.statistics
(Consumer<KeyValuePair.Builder>... statistics) Additional information about your clusters that are separated by launch type.statistics
(KeyValuePair... statistics) Additional information about your clusters that are separated by launch type.The status of the cluster.tags
(Collection<Tag> tags) The metadata that you apply to the cluster to help you categorize and organize them.tags
(Consumer<Tag.Builder>... tags) The metadata that you apply to the cluster to help you categorize and organize them.The metadata that you apply to the cluster to help you categorize and organize them.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
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
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
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
The execute command configuration for the cluster.
This is a convenience method that creates an instance of theClusterConfiguration.Builder
avoiding the need to create one manually viaClusterConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toconfiguration(ClusterConfiguration)
.- Parameters:
configuration
- a consumer that will call methods onClusterConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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 onINACTIVE
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 onINACTIVE
clusters persisting.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
registeredContainerInstancesCount
The number of container instances registered into the cluster. This includes container instances in both
ACTIVE
andDRAINING
status.- Parameters:
registeredContainerInstancesCount
- The number of container instances registered into the cluster. This includes container instances in bothACTIVE
andDRAINING
status.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
-
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.
-
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.
-
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
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
Additional information about your clusters that are separated by launch type. They include the following:
-
runningEC2TasksCount
-
RunningFargateTasksCount
-
pendingEC2TasksCount
-
pendingFargateTasksCount
-
activeEC2ServiceCount
-
activeFargateServiceCount
-
drainingEC2ServiceCount
-
drainingFargateServiceCount
KeyValuePair.Builder
avoiding the need to create one manually viaKeyValuePair.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tostatistics(List<KeyValuePair>)
.- Parameters:
statistics
- a consumer that will call methods onKeyValuePair.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
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.
Tag.Builder
avoiding the need to create one manually viaTag.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totags(List<Tag>)
.- Parameters:
tags
- a consumer that will call methods onTag.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
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 theClusterSetting.Builder
avoiding the need to create one manually viaClusterSetting.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tosettings(List<ClusterSetting>)
.- Parameters:
settings
- a consumer that will call methods onClusterSetting.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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
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 theCapacityProviderStrategyItem.Builder
avoiding the need to create one manually viaCapacityProviderStrategyItem.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed todefaultCapacityProviderStrategy(List<CapacityProviderStrategyItem>)
.- Parameters:
defaultCapacityProviderStrategy
- a consumer that will call methods onCapacityProviderStrategyItem.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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
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
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 theAttachment.Builder
avoiding the need to create one manually viaAttachment.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toattachments(List<Attachment>)
.- Parameters:
attachments
- a consumer that will call methods onAttachment.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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
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 totrue
in theServiceConnectConfiguration
. You can set the namespace of each service individually in theServiceConnectConfiguration
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 theenabled
parameter totrue
in theServiceConnectConfiguration
. You can set the namespace of each service individually in theServiceConnectConfiguration
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 totrue
in theServiceConnectConfiguration
. You can set the namespace of each service individually in theServiceConnectConfiguration
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 theClusterServiceConnectDefaults.Builder
avoiding the need to create one manually viaClusterServiceConnectDefaults.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toserviceConnectDefaults(ClusterServiceConnectDefaults)
.- Parameters:
serviceConnectDefaults
- a consumer that will call methods onClusterServiceConnectDefaults.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-