Class CfnRule.EcsParametersProperty.Builder
java.lang.Object
software.amazon.awscdk.services.events.CfnRule.EcsParametersProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRule.EcsParametersProperty>
- Enclosing interface:
CfnRule.EcsParametersProperty
@Stability(Stable)
public static final class CfnRule.EcsParametersProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRule.EcsParametersProperty>
A builder for
CfnRule.EcsParametersProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.capacityProviderStrategy
(List<? extends Object> capacityProviderStrategy) Sets the value ofCfnRule.EcsParametersProperty.getCapacityProviderStrategy()
capacityProviderStrategy
(IResolvable capacityProviderStrategy) Sets the value ofCfnRule.EcsParametersProperty.getCapacityProviderStrategy()
enableEcsManagedTags
(Boolean enableEcsManagedTags) Sets the value ofCfnRule.EcsParametersProperty.getEnableEcsManagedTags()
enableEcsManagedTags
(IResolvable enableEcsManagedTags) Sets the value ofCfnRule.EcsParametersProperty.getEnableEcsManagedTags()
enableExecuteCommand
(Boolean enableExecuteCommand) Sets the value ofCfnRule.EcsParametersProperty.getEnableExecuteCommand()
enableExecuteCommand
(IResolvable enableExecuteCommand) Sets the value ofCfnRule.EcsParametersProperty.getEnableExecuteCommand()
Sets the value ofCfnRule.EcsParametersProperty.getGroup()
launchType
(String launchType) Sets the value ofCfnRule.EcsParametersProperty.getLaunchType()
networkConfiguration
(IResolvable networkConfiguration) Sets the value ofCfnRule.EcsParametersProperty.getNetworkConfiguration()
networkConfiguration
(CfnRule.NetworkConfigurationProperty networkConfiguration) Sets the value ofCfnRule.EcsParametersProperty.getNetworkConfiguration()
placementConstraints
(List<? extends Object> placementConstraints) Sets the value ofCfnRule.EcsParametersProperty.getPlacementConstraints()
placementConstraints
(IResolvable placementConstraints) Sets the value ofCfnRule.EcsParametersProperty.getPlacementConstraints()
placementStrategies
(List<? extends Object> placementStrategies) Sets the value ofCfnRule.EcsParametersProperty.getPlacementStrategies()
placementStrategies
(IResolvable placementStrategies) Sets the value ofCfnRule.EcsParametersProperty.getPlacementStrategies()
platformVersion
(String platformVersion) Sets the value ofCfnRule.EcsParametersProperty.getPlatformVersion()
propagateTags
(String propagateTags) Sets the value ofCfnRule.EcsParametersProperty.getPropagateTags()
referenceId
(String referenceId) Sets the value ofCfnRule.EcsParametersProperty.getReferenceId()
Sets the value ofCfnRule.EcsParametersProperty.getTagList()
tagList
(IResolvable tagList) Sets the value ofCfnRule.EcsParametersProperty.getTagList()
Sets the value ofCfnRule.EcsParametersProperty.getTaskCount()
taskDefinitionArn
(String taskDefinitionArn) Sets the value ofCfnRule.EcsParametersProperty.getTaskDefinitionArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
taskDefinitionArn
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder taskDefinitionArn(String taskDefinitionArn) Sets the value ofCfnRule.EcsParametersProperty.getTaskDefinitionArn()
- Parameters:
taskDefinitionArn
- The ARN of the task definition to use if the event target is an Amazon ECS task. This parameter is required.- Returns:
this
-
capacityProviderStrategy
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder capacityProviderStrategy(IResolvable capacityProviderStrategy) Sets the value ofCfnRule.EcsParametersProperty.getCapacityProviderStrategy()
- Parameters:
capacityProviderStrategy
- The capacity provider strategy to use for the task. If acapacityProviderStrategy
is specified, thelaunchType
parameter must be omitted. If nocapacityProviderStrategy
or launchType is specified, thedefaultCapacityProviderStrategy
for the cluster is used.- Returns:
this
-
capacityProviderStrategy
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder capacityProviderStrategy(List<? extends Object> capacityProviderStrategy) Sets the value ofCfnRule.EcsParametersProperty.getCapacityProviderStrategy()
- Parameters:
capacityProviderStrategy
- The capacity provider strategy to use for the task. If acapacityProviderStrategy
is specified, thelaunchType
parameter must be omitted. If nocapacityProviderStrategy
or launchType is specified, thedefaultCapacityProviderStrategy
for the cluster is used.- Returns:
this
-
enableEcsManagedTags
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder enableEcsManagedTags(Boolean enableEcsManagedTags) Sets the value ofCfnRule.EcsParametersProperty.getEnableEcsManagedTags()
- Parameters:
enableEcsManagedTags
- Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.- Returns:
this
-
enableEcsManagedTags
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder enableEcsManagedTags(IResolvable enableEcsManagedTags) Sets the value ofCfnRule.EcsParametersProperty.getEnableEcsManagedTags()
- Parameters:
enableEcsManagedTags
- Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.- Returns:
this
-
enableExecuteCommand
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder enableExecuteCommand(Boolean enableExecuteCommand) Sets the value ofCfnRule.EcsParametersProperty.getEnableExecuteCommand()
- Parameters:
enableExecuteCommand
- Whether or not to enable the execute command functionality for the containers in this task. If true, this enables execute command functionality on all containers in the task.- Returns:
this
-
enableExecuteCommand
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder enableExecuteCommand(IResolvable enableExecuteCommand) Sets the value ofCfnRule.EcsParametersProperty.getEnableExecuteCommand()
- Parameters:
enableExecuteCommand
- Whether or not to enable the execute command functionality for the containers in this task. If true, this enables execute command functionality on all containers in the task.- Returns:
this
-
group
Sets the value ofCfnRule.EcsParametersProperty.getGroup()
- Parameters:
group
- Specifies an ECS task group for the task. The maximum length is 255 characters.- Returns:
this
-
launchType
Sets the value ofCfnRule.EcsParametersProperty.getLaunchType()
- Parameters:
launchType
- Specifies the launch type on which your task is running. The launch type that you specify here must match one of the launch type (compatibilities) of the target task. TheFARGATE
value is supported only in the Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide .- Returns:
this
-
networkConfiguration
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder networkConfiguration(IResolvable networkConfiguration) Sets the value ofCfnRule.EcsParametersProperty.getNetworkConfiguration()
- Parameters:
networkConfiguration
- Use this structure if the Amazon ECS task uses theawsvpc
network mode. This structure specifies the VPC subnets and security groups associated with the task, and whether a public IP address is to be used. This structure is required ifLaunchType
isFARGATE
because theawsvpc
mode is required for Fargate tasks.If you specify
NetworkConfiguration
when the target ECS task does not use theawsvpc
network mode, the task fails.- Returns:
this
-
networkConfiguration
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder networkConfiguration(CfnRule.NetworkConfigurationProperty networkConfiguration) Sets the value ofCfnRule.EcsParametersProperty.getNetworkConfiguration()
- Parameters:
networkConfiguration
- Use this structure if the Amazon ECS task uses theawsvpc
network mode. This structure specifies the VPC subnets and security groups associated with the task, and whether a public IP address is to be used. This structure is required ifLaunchType
isFARGATE
because theawsvpc
mode is required for Fargate tasks.If you specify
NetworkConfiguration
when the target ECS task does not use theawsvpc
network mode, the task fails.- Returns:
this
-
placementConstraints
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder placementConstraints(IResolvable placementConstraints) Sets the value ofCfnRule.EcsParametersProperty.getPlacementConstraints()
- Parameters:
placementConstraints
- An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).- Returns:
this
-
placementConstraints
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder placementConstraints(List<? extends Object> placementConstraints) Sets the value ofCfnRule.EcsParametersProperty.getPlacementConstraints()
- Parameters:
placementConstraints
- An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).- Returns:
this
-
placementStrategies
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder placementStrategies(IResolvable placementStrategies) Sets the value ofCfnRule.EcsParametersProperty.getPlacementStrategies()
- Parameters:
placementStrategies
- The placement strategy objects to use for the task. You can specify a maximum of five strategy rules per task.- Returns:
this
-
placementStrategies
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder placementStrategies(List<? extends Object> placementStrategies) Sets the value ofCfnRule.EcsParametersProperty.getPlacementStrategies()
- Parameters:
placementStrategies
- The placement strategy objects to use for the task. You can specify a maximum of five strategy rules per task.- Returns:
this
-
platformVersion
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder platformVersion(String platformVersion) Sets the value ofCfnRule.EcsParametersProperty.getPlatformVersion()
- Parameters:
platformVersion
- Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as1.1.0
.This structure is used only if
LaunchType
isFARGATE
. For more information about valid platform versions, see AWS Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide .- Returns:
this
-
propagateTags
Sets the value ofCfnRule.EcsParametersProperty.getPropagateTags()
- Parameters:
propagateTags
- Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.- Returns:
this
-
referenceId
Sets the value ofCfnRule.EcsParametersProperty.getReferenceId()
- Parameters:
referenceId
- The reference ID to use for the task.- Returns:
this
-
tagList
Sets the value ofCfnRule.EcsParametersProperty.getTagList()
- Parameters:
tagList
- The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.- Returns:
this
-
tagList
@Stability(Stable) public CfnRule.EcsParametersProperty.Builder tagList(List<? extends Object> tagList) Sets the value ofCfnRule.EcsParametersProperty.getTagList()
- Parameters:
tagList
- The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.- Returns:
this
-
taskCount
Sets the value ofCfnRule.EcsParametersProperty.getTaskCount()
- Parameters:
taskCount
- The number of tasks to create based onTaskDefinition
. The default is 1.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRule.EcsParametersProperty>
- Returns:
- a new instance of
CfnRule.EcsParametersProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-