Class ScheduledFargateTask.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ScheduledFargateTask>
- Enclosing class:
ScheduledFargateTask
ScheduledFargateTask
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
The name of the cluster that hosts the service.static ScheduledFargateTask.Builder
desiredTaskCount
(Number desiredTaskCount) The desired number of instantiations of the task definition to keep running on the service.Indicates whether the rule is enabled.platformVersion
(FargatePlatformVersion platformVersion) The platform version on which to run your service.A name for the rule.The schedule or rate (frequency) that determines when CloudWatch Events runs the rule.scheduledFargateTaskDefinitionOptions
(ScheduledFargateTaskDefinitionOptions scheduledFargateTaskDefinitionOptions) The properties to define if using an existing TaskDefinition in this construct.scheduledFargateTaskImageOptions
(ScheduledFargateTaskImageOptions scheduledFargateTaskImageOptions) The properties to define if the construct is to create a TaskDefinition.securityGroups
(List<? extends ISecurityGroup> securityGroups) Existing security groups to use for your service.subnetSelection
(SubnetSelection subnetSelection) In what subnets to place the task's ENIs.The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
-
Method Details
-
create
@Stability(Stable) public static ScheduledFargateTask.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
ScheduledFargateTask.Builder
.
-
schedule
The schedule or rate (frequency) that determines when CloudWatch Events runs the rule.For more information, see Schedule Expression Syntax for Rules in the Amazon CloudWatch User Guide.
- Parameters:
schedule
- The schedule or rate (frequency) that determines when CloudWatch Events runs the rule. This parameter is required.- Returns:
this
-
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.
Default: - create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.
- Parameters:
cluster
- The name of the cluster that hosts the service. This parameter is required.- Returns:
this
-
desiredTaskCount
The desired number of instantiations of the task definition to keep running on the service.Default: 1
- Parameters:
desiredTaskCount
- The desired number of instantiations of the task definition to keep running on the service. This parameter is required.- Returns:
this
-
enabled
Indicates whether the rule is enabled.Default: true
- Parameters:
enabled
- Indicates whether the rule is enabled. This parameter is required.- Returns:
this
-
ruleName
A name for the rule.Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the rule name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).
- Parameters:
ruleName
- A name for the rule. This parameter is required.- Returns:
this
-
securityGroups
@Stability(Stable) public ScheduledFargateTask.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Existing security groups to use for your service.Default: - a new security group will be created.
- Parameters:
securityGroups
- Existing security groups to use for your service. This parameter is required.- Returns:
this
-
subnetSelection
@Stability(Stable) public ScheduledFargateTask.Builder subnetSelection(SubnetSelection subnetSelection) In what subnets to place the task's ENIs.(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
Default: Private subnets
- Parameters:
subnetSelection
- In what subnets to place the task's ENIs. This parameter is required.- Returns:
this
-
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.
Default: - uses the VPC defined in the cluster or creates a new VPC.
- Parameters:
vpc
- The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed. This parameter is required.- Returns:
this
-
platformVersion
@Stability(Stable) public ScheduledFargateTask.Builder platformVersion(FargatePlatformVersion platformVersion) The platform version on which to run your service.If one is not specified, the LATEST platform version is used by default. For more information, see AWS Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
Default: Latest
- Parameters:
platformVersion
- The platform version on which to run your service. This parameter is required.- Returns:
this
-
scheduledFargateTaskDefinitionOptions
@Stability(Stable) public ScheduledFargateTask.Builder scheduledFargateTaskDefinitionOptions(ScheduledFargateTaskDefinitionOptions scheduledFargateTaskDefinitionOptions) The properties to define if using an existing TaskDefinition in this construct.ScheduledFargateTaskDefinitionOptions or ScheduledFargateTaskImageOptions must be defined, but not both.
Default: none
- Parameters:
scheduledFargateTaskDefinitionOptions
- The properties to define if using an existing TaskDefinition in this construct. This parameter is required.- Returns:
this
-
scheduledFargateTaskImageOptions
@Stability(Stable) public ScheduledFargateTask.Builder scheduledFargateTaskImageOptions(ScheduledFargateTaskImageOptions scheduledFargateTaskImageOptions) The properties to define if the construct is to create a TaskDefinition.ScheduledFargateTaskDefinitionOptions or ScheduledFargateTaskImageOptions must be defined, but not both.
Default: none
- Parameters:
scheduledFargateTaskImageOptions
- The properties to define if the construct is to create a TaskDefinition. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ScheduledFargateTask>
- Returns:
- a newly built instance of
ScheduledFargateTask
.
-