Interface ScheduledTaskBaseProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
ScheduledEc2TaskProps
,ScheduledFargateTaskProps
- All Known Implementing Classes:
ScheduledEc2TaskProps.Jsii$Proxy
,ScheduledFargateTaskProps.Jsii$Proxy
,ScheduledTaskBaseProps.Jsii$Proxy
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) .propagateTags(PropagatedTagSource.SERVICE) .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()) .tags(List.of(Tag.builder() .key("key") .value("value") .build())) .vpc(vpc) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forScheduledTaskBaseProps
static final class
An implementation forScheduledTaskBaseProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default ICluster
The name of the cluster that hosts the service.default Number
The desired number of instantiations of the task definition to keep running on the service.default Boolean
Indicates whether the rule is enabled.default PropagatedTagSource
Specifies whether to propagate the tags from the task definition to the task.default String
A name for the rule.The schedule or rate (frequency) that determines when CloudWatch Events runs the rule.default List<ISecurityGroup>
Existing security groups to use for your service.default SubnetSelection
In what subnets to place the task's ENIs.getTags()
The metadata that you apply to the task to help you categorize and organize them.default IVpc
getVpc()
The VPC where the container instances will be launched or the elastic network interfaces (ENIs) will be deployed.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getSchedule
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.
-
getCluster
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.
-
getDesiredTaskCount
The desired number of instantiations of the task definition to keep running on the service.Default: 1
-
getEnabled
Indicates whether the rule is enabled.Default: true
-
getPropagateTags
Specifies whether to propagate the tags from the task definition to the task.If no value is specified, the tags are not propagated.
Default: - Tags will not be propagated
-
getRuleName
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).
-
getSecurityGroups
Existing security groups to use for your service.Default: - a new security group will be created.
-
getSubnetSelection
In what subnets to place the task's ENIs.(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
Default: Private subnets
-
getTags
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.
Default: - No tags are applied to the task
-
getVpc
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.
-
builder
- Returns:
- a
ScheduledTaskBaseProps.Builder
ofScheduledTaskBaseProps
-