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.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()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.- 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
-
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
-