Class ScheduledTaskBaseProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.patterns.ScheduledTaskBaseProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ScheduledTaskBaseProps>
- Enclosing interface:
ScheduledTaskBaseProps
@Stability(Stable)
public static final class ScheduledTaskBaseProps.Builder
extends Object
implements software.amazon.jsii.Builder<ScheduledTaskBaseProps>
A builder for
ScheduledTaskBaseProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofScheduledTaskBaseProps.getCluster()
desiredTaskCount
(Number desiredTaskCount) Sets the value ofScheduledTaskBaseProps.getDesiredTaskCount()
Sets the value ofScheduledTaskBaseProps.getEnabled()
propagateTags
(PropagatedTagSource propagateTags) Sets the value ofScheduledTaskBaseProps.getPropagateTags()
Sets the value ofScheduledTaskBaseProps.getRuleName()
Sets the value ofScheduledTaskBaseProps.getSchedule()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofScheduledTaskBaseProps.getSecurityGroups()
subnetSelection
(SubnetSelection subnetSelection) Sets the value ofScheduledTaskBaseProps.getSubnetSelection()
Sets the value ofScheduledTaskBaseProps.getTags()
Sets the value ofScheduledTaskBaseProps.getVpc()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
schedule
Sets the value ofScheduledTaskBaseProps.getSchedule()
- Parameters:
schedule
- The schedule or rate (frequency) that determines when CloudWatch Events runs the rule. This parameter is required. For more information, see Schedule Expression Syntax for Rules in the Amazon CloudWatch User Guide.- Returns:
this
-
cluster
Sets the value ofScheduledTaskBaseProps.getCluster()
- Parameters:
cluster
- The name of the cluster that hosts the service. If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.- Returns:
this
-
desiredTaskCount
Sets the value ofScheduledTaskBaseProps.getDesiredTaskCount()
- Parameters:
desiredTaskCount
- The desired number of instantiations of the task definition to keep running on the service.- Returns:
this
-
enabled
Sets the value ofScheduledTaskBaseProps.getEnabled()
- Parameters:
enabled
- Indicates whether the rule is enabled.- Returns:
this
-
propagateTags
@Stability(Stable) public ScheduledTaskBaseProps.Builder propagateTags(PropagatedTagSource propagateTags) Sets the value ofScheduledTaskBaseProps.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.- Returns:
this
-
ruleName
Sets the value ofScheduledTaskBaseProps.getRuleName()
- Parameters:
ruleName
- A name for the rule.- Returns:
this
-
securityGroups
@Stability(Stable) public ScheduledTaskBaseProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofScheduledTaskBaseProps.getSecurityGroups()
- Parameters:
securityGroups
- Existing security groups to use for your service.- Returns:
this
-
subnetSelection
@Stability(Stable) public ScheduledTaskBaseProps.Builder subnetSelection(SubnetSelection subnetSelection) Sets the value ofScheduledTaskBaseProps.getSubnetSelection()
- Parameters:
subnetSelection
- In what subnets to place the task's ENIs. (Only applicable in case the TaskDefinition is configured for AwsVpc networking)- Returns:
this
-
tags
Sets the value ofScheduledTaskBaseProps.getTags()
- Parameters:
tags
- 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.- Returns:
this
-
vpc
Sets the value ofScheduledTaskBaseProps.getVpc()
- Parameters:
vpc
- The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed. If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ScheduledTaskBaseProps>
- Returns:
- a new instance of
ScheduledTaskBaseProps
- Throws:
NullPointerException
- if any required attribute was not provided
-