@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.845Z") @Stability(value=Stable) public interface ScheduledTaskBaseProps extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.applicationautoscaling.*;
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.ecs.*;
import software.amazon.awscdk.services.ecs.patterns.*;
Cluster cluster;
Schedule schedule;
SecurityGroup securityGroup;
Subnet subnet;
SubnetFilter subnetFilter;
Vpc vpc;
ScheduledTaskBaseProps scheduledTaskBaseProps = ScheduledTaskBaseProps.builder()
.schedule(schedule)
// the properties below are optional
.cluster(cluster)
.desiredTaskCount(123)
.enabled(false)
.ruleName("ruleName")
.securityGroups(List.of(securityGroup))
.subnetSelection(SubnetSelection.builder()
.availabilityZones(List.of("availabilityZones"))
.onePerAz(false)
.subnetFilters(List.of(subnetFilter))
.subnetGroupName("subnetGroupName")
.subnets(List.of(subnet))
.subnetType(SubnetType.PRIVATE_ISOLATED)
.build())
.vpc(vpc)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
ScheduledTaskBaseProps.Builder
A builder for
ScheduledTaskBaseProps |
static class |
ScheduledTaskBaseProps.Jsii$Proxy
An implementation for
ScheduledTaskBaseProps |
| Modifier and Type | Method and Description |
|---|---|
static ScheduledTaskBaseProps.Builder |
builder() |
default ICluster |
getCluster()
The name of the cluster that hosts the service.
|
default Number |
getDesiredTaskCount()
The desired number of instantiations of the task definition to keep running on the service.
|
default Boolean |
getEnabled()
Indicates whether the rule is enabled.
|
default String |
getRuleName()
A name for the rule.
|
Schedule |
getSchedule()
The schedule or rate (frequency) that determines when CloudWatch Events runs the rule.
|
default List<ISecurityGroup> |
getSecurityGroups()
Existing security groups to use for your service.
|
default SubnetSelection |
getSubnetSelection()
In what subnets to place the task's ENIs.
|
default IVpc |
getVpc()
The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.
|
@Stability(value=Stable) @NotNull Schedule getSchedule()
For more information, see Schedule Expression Syntax for Rules in the Amazon CloudWatch User Guide.
@Stability(value=Stable) @Nullable default ICluster getCluster()
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.
@Stability(value=Stable) @Nullable default Number getDesiredTaskCount()
Default: 1
@Stability(value=Stable) @Nullable default Boolean getEnabled()
Default: true
@Stability(value=Stable) @Nullable default String getRuleName()
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).
@Stability(value=Stable) @Nullable default List<ISecurityGroup> getSecurityGroups()
Default: - a new security group will be created.
@Stability(value=Stable) @Nullable default SubnetSelection getSubnetSelection()
(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
Default: Private subnets
@Stability(value=Stable) @Nullable default IVpc getVpc()
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.
@Stability(value=Stable) static ScheduledTaskBaseProps.Builder builder()
ScheduledTaskBaseProps.Builder of ScheduledTaskBasePropsCopyright © 2022. All rights reserved.