Class CfnTaskSetProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CfnTaskSetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTaskSetProps>
- Enclosing interface:
CfnTaskSetProps
@Stability(Stable)
public static final class CfnTaskSetProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnTaskSetProps>
A builder for
CfnTaskSetProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.capacityProviderStrategy(List<? extends Object> capacityProviderStrategy) Sets the value ofCfnTaskSetProps.getCapacityProviderStrategy()capacityProviderStrategy(IResolvable capacityProviderStrategy) Sets the value ofCfnTaskSetProps.getCapacityProviderStrategy()Sets the value ofCfnTaskSetProps.getCluster()externalId(String externalId) Sets the value ofCfnTaskSetProps.getExternalId()launchType(String launchType) Sets the value ofCfnTaskSetProps.getLaunchType()loadBalancers(List<? extends Object> loadBalancers) Sets the value ofCfnTaskSetProps.getLoadBalancers()loadBalancers(IResolvable loadBalancers) Sets the value ofCfnTaskSetProps.getLoadBalancers()networkConfiguration(IResolvable networkConfiguration) Sets the value ofCfnTaskSetProps.getNetworkConfiguration()networkConfiguration(CfnTaskSet.NetworkConfigurationProperty networkConfiguration) Sets the value ofCfnTaskSetProps.getNetworkConfiguration()platformVersion(String platformVersion) Sets the value ofCfnTaskSetProps.getPlatformVersion()scale(IResolvable scale) Sets the value ofCfnTaskSetProps.getScale()scale(CfnTaskSet.ScaleProperty scale) Sets the value ofCfnTaskSetProps.getScale()Sets the value ofCfnTaskSetProps.getService()serviceRegistries(List<? extends Object> serviceRegistries) Sets the value ofCfnTaskSetProps.getServiceRegistries()serviceRegistries(IResolvable serviceRegistries) Sets the value ofCfnTaskSetProps.getServiceRegistries()Sets the value ofCfnTaskSetProps.getTags()taskDefinition(String taskDefinition) Sets the value ofCfnTaskSetProps.getTaskDefinition()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cluster
Sets the value ofCfnTaskSetProps.getCluster()- Parameters:
cluster- The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in. This parameter is required.- Returns:
this
-
service
Sets the value ofCfnTaskSetProps.getService()- Parameters:
service- The short name or full Amazon Resource Name (ARN) of the service to create the task set in. This parameter is required.- Returns:
this
-
taskDefinition
Sets the value ofCfnTaskSetProps.getTaskDefinition()- Parameters:
taskDefinition- The task definition for the tasks in the task set to use. This parameter is required. If a revision isn't specified, the latestACTIVErevision is used.- Returns:
this
-
capacityProviderStrategy
@Stability(Stable) public CfnTaskSetProps.Builder capacityProviderStrategy(IResolvable capacityProviderStrategy) Sets the value ofCfnTaskSetProps.getCapacityProviderStrategy()- Parameters:
capacityProviderStrategy- The capacity provider strategy that are associated with the task set.- Returns:
this
-
capacityProviderStrategy
@Stability(Stable) public CfnTaskSetProps.Builder capacityProviderStrategy(List<? extends Object> capacityProviderStrategy) Sets the value ofCfnTaskSetProps.getCapacityProviderStrategy()- Parameters:
capacityProviderStrategy- The capacity provider strategy that are associated with the task set.- Returns:
this
-
externalId
Sets the value ofCfnTaskSetProps.getExternalId()- Parameters:
externalId- An optional non-unique tag that identifies this task set in external systems. If the task set is associated with a service discovery registry, the tasks in this task set will have theECS_TASK_SET_EXTERNAL_IDAWS Cloud Map attribute set to the provided value.- Returns:
this
-
launchType
Sets the value ofCfnTaskSetProps.getLaunchType()- Parameters:
launchType- The launch type that new tasks in the task set uses. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide .If a
launchTypeis specified, thecapacityProviderStrategyparameter must be omitted.- Returns:
this
-
loadBalancers
Sets the value ofCfnTaskSetProps.getLoadBalancers()- Parameters:
loadBalancers- A load balancer object representing the load balancer to use with the task set. The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.- Returns:
this
-
loadBalancers
@Stability(Stable) public CfnTaskSetProps.Builder loadBalancers(List<? extends Object> loadBalancers) Sets the value ofCfnTaskSetProps.getLoadBalancers()- Parameters:
loadBalancers- A load balancer object representing the load balancer to use with the task set. The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.- Returns:
this
-
networkConfiguration
@Stability(Stable) public CfnTaskSetProps.Builder networkConfiguration(IResolvable networkConfiguration) Sets the value ofCfnTaskSetProps.getNetworkConfiguration()- Parameters:
networkConfiguration- The network configuration for the task set.- Returns:
this
-
networkConfiguration
@Stability(Stable) public CfnTaskSetProps.Builder networkConfiguration(CfnTaskSet.NetworkConfigurationProperty networkConfiguration) Sets the value ofCfnTaskSetProps.getNetworkConfiguration()- Parameters:
networkConfiguration- The network configuration for the task set.- Returns:
this
-
platformVersion
Sets the value ofCfnTaskSetProps.getPlatformVersion()- Parameters:
platformVersion- The platform version that the tasks in the task set uses. A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, theLATESTplatform version is used.- Returns:
this
-
scale
Sets the value ofCfnTaskSetProps.getScale()- Parameters:
scale- A floating-point percentage of your desired number of tasks to place and keep running in the task set.- Returns:
this
-
scale
Sets the value ofCfnTaskSetProps.getScale()- Parameters:
scale- A floating-point percentage of your desired number of tasks to place and keep running in the task set.- Returns:
this
-
serviceRegistries
Sets the value ofCfnTaskSetProps.getServiceRegistries()- Parameters:
serviceRegistries- The details of the service discovery registries to assign to this task set. For more information, see Service discovery .- Returns:
this
-
serviceRegistries
@Stability(Stable) public CfnTaskSetProps.Builder serviceRegistries(List<? extends Object> serviceRegistries) Sets the value ofCfnTaskSetProps.getServiceRegistries()- Parameters:
serviceRegistries- The details of the service discovery registries to assign to this task set. For more information, see Service discovery .- Returns:
this
-
tags
Sets the value ofCfnTaskSetProps.getTags()- Parameters:
tags- The metadata that you apply to the task set 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: + - = . _ : /
- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnTaskSetProps>- Returns:
- a new instance of
CfnTaskSetProps - Throws:
NullPointerException- if any required attribute was not provided
-