- class aws_cdk.aws_ecs_patterns.ScheduledTaskBase(scope, id, *, schedule, cluster=None, desired_task_count=None, enabled=None, propagate_tags=None, rule_name=None, security_groups=None, subnet_selection=None, tags=None, vpc=None)
The base class for ScheduledEc2Task and ScheduledFargateTask tasks.
Constructs a new instance of the ScheduledTaskBase class.
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.
ICluster]) – 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.
None]) – The desired number of instantiations of the task definition to keep running on the service. Default: 1
bool]) – Indicates whether the rule is enabled. Default: true
PropagatedTagSource]) – 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
str]) – 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.
ISecurityGroup]]) – Existing security groups to use for your service. Default: - a new security group will be created.
None]) – In what subnets to place the task’s ENIs. (Only applicable in case the TaskDefinition is configured for AwsVpc networking) Default: Private subnets
Any]]]]) – 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
IVpc]) – 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.
Returns a string representation of this construct.
- Return type:
The name of the cluster that hosts the service.
The desired number of instantiations of the task definition to keep running on the service.
The minimum value is 1
The CloudWatch Events rule for the service.
The tree node.
Specifies whether to propagate the tags from the task definition to the task.
If no value is specified, the tags are not propagated.
Tags will not be propagated
In what subnets to place the task’s ENIs.
(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
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.
No tags are applied to the task
- classmethod is_construct(x)
xis a construct.
Use this method instead of
instanceofto properly detect
Constructinstances, even when the construct library is symlinked.
constructslibrary on disk are seen as independent, completely different libraries. As a consequence, the class
Constructin each copy of the
constructslibrary is seen as a different class, and an instance of one class will not test as
instanceofthe other class.
npm installwill not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the
constructslibrary can be accidentally installed, and
instanceofwill behave unpredictably. It is safest to avoid using
instanceof, and using this type-testing method instead.
Any) – Any object.
- Return type:
xis an object created from a class which extends