ScheduledTaskBase L3 construct
The base class for ScheduledEc2Task and ScheduledFargateTask tasks.
Initializer
new ScheduledTaskBase(scope: Construct, id: string, props: ScheduledTaskBaseProps)
ScheduledTaskBase(scope: Construct, id: str, props: ScheduledTaskBaseProps)
new ScheduledTaskBase(Construct scope, String id, ScheduledTaskBaseProps props)
new ScheduledTaskBase(Construct scope, string id, ScheduledTaskBaseProps props)
NewScheduledTaskBase(Scope Construct, Id *string, Props ScheduledTaskBaseProps)
Construct Props
clusteroptionalIClusterclusteroptionalIClusterclusteroptionalIClusterClusteroptionalIClusterClusteroptionalICluster#Default: create a new cluster; if both cluster and vpc are omitted, a new VPC will be created for you.
If a cluster is specified, the vpc construct should be omitted. Alternatively, you can omit both cluster and vpc.
desiredTaskCountoptionalnumberdesired_task_countoptionalint | floatdesiredTaskCountoptionalNumberDesiredTaskCountoptionaldoubleDesiredTaskCountoptional*float64= 1#enabledoptionalbooleanenabledoptionalboolenabledoptionalBooleanEnabledoptionalboolEnabledoptional*bool= true#propagateTagsoptionalPropagatedTagSourcepropagate_tagsoptionalPropagatedTagSourcepropagateTagsoptionalPropagatedTagSourcePropagateTagsoptionalPropagatedTagSourcePropagateTagsoptionalPropagatedTagSource#Default: Tags will not be propagated
If no value is specified, the tags are not propagated.
ruleNameoptionalstringrule_nameoptionalstrruleNameoptionalStringRuleNameoptionalstringRuleNameoptional*string#Default: AWS CloudFormation generates a unique physical ID and uses that ID for the rule name. For more information, see Name Type.
For more information, see Schedule Expression Syntax for Rules in the Amazon CloudWatch User Guide.
securityGroupsoptionalISecurityGroup[]security_groupsoptionaltyping.List[ISecurityGroup]securityGroupsoptionalList<ISecurityGroup>SecurityGroupsoptionalISecurityGroup[]SecurityGroupsoptional*[]ISecurityGroup#Default: a new security group will be created.
subnetSelectionoptionalSubnetSelectionsubnet_selectionoptionalSubnetSelectionsubnetSelectionoptionalSubnetSelectionSubnetSelectionoptionalSubnetSelectionSubnetSelectionoptionalSubnetSelection#Default: Private subnets
(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
tagsoptionalTag[]tagsoptionaltyping.List[Tag]tagsoptionalList<Tag>TagsoptionalTag[]Tagsoptional*[]Tag#Default: No tags are applied to the task
Each tag consists of a key and an optional value, both of which you define.
Default: uses the VPC defined in the cluster or creates a new VPC.
If a vpc is specified, the cluster construct should be omitted. Alternatively, you can omit both vpc and cluster.
Properties
desiredTaskCountnumberdesired_task_countint | floatdesiredTaskCountNumberDesiredTaskCountdoubleDesiredTaskCount*float64required#The minimum value is 1
propagateTagsmay be undefinedPropagatedTagSourcepropagate_tagsmay be undefinedPropagatedTagSourcepropagateTagsmay be undefinedPropagatedTagSourcePropagateTagsmay be undefinedPropagatedTagSourcePropagateTagsmay be undefinedPropagatedTagSource#Default: Tags will not be propagated
If no value is specified, the tags are not propagated.
subnetSelectionSubnetSelectionsubnet_selectionSubnetSelectionsubnetSelectionSubnetSelectionSubnetSelectionSubnetSelectionSubnetSelectionSubnetSelectionrequired#Default: Private subnets
(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
tagsmay be undefinedTag[]tagsmay be undefinedtyping.List[Tag]tagsmay be undefinedList<Tag>Tagsmay be undefinedTag[]Tagsmay be undefined*[]Tag#Default: No tags are applied to the task
Each tag consists of a key and an optional value, both of which you define.
Methods
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will 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 constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.
1 parameter · returns
Parameters
mixinsmixinsmixinsmixinsMixins— The mixins to apply.
Returns: This construct for chaining