Class ScheduledTaskBase
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.services.ecs.patterns.ScheduledTaskBase
- All Implemented Interfaces:
IConstruct,IDependable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
- Direct Known Subclasses:
ScheduledEc2Task,ScheduledFargateTask
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:48.811Z")
@Stability(Stable)
public abstract class ScheduledTaskBase
extends Construct
The base class for ScheduledEc2Task and ScheduledFargateTask tasks.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.constructs.Construct
software.constructs.Construct.BuilderNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedScheduledTaskBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedScheduledTaskBase(software.amazon.jsii.JsiiObjectRef objRef) protectedScheduledTaskBase(software.constructs.Construct scope, String id, ScheduledTaskBaseProps props) Constructs a new instance of the ScheduledTaskBase class. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddTaskAsTarget(EcsTask ecsTaskTarget) Adds task as a target of the scheduled event rule.protected EcsTaskaddTaskDefinitionToEventTarget(TaskDefinition taskDefinition) Create an ECS task using the task definition provided and add it to the scheduled event rule.protected AwsLogDrivercreateAWSLogDriver(String prefix) Create an AWS Log Driver with the provided streamPrefix.The name of the cluster that hosts the service.protected ClustergetDefaultCluster(Construct scope) Returns the default cluster.protected ClustergetDefaultCluster(Construct scope, IVpc vpc) Returns the default cluster.The desired number of instantiations of the task definition to keep running on the service.The CloudWatch Events rule for the service.In what subnets to place the task's ENIs.Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ScheduledTaskBase
protected ScheduledTaskBase(software.amazon.jsii.JsiiObjectRef objRef) -
ScheduledTaskBase
protected ScheduledTaskBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ScheduledTaskBase
@Stability(Stable) protected ScheduledTaskBase(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ScheduledTaskBaseProps props) Constructs a new instance of the ScheduledTaskBase class.- Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
addTaskAsTarget
Adds task as a target of the scheduled event rule.- Parameters:
ecsTaskTarget- the EcsTask to add to the event rule. This parameter is required.
-
addTaskDefinitionToEventTarget
@Stability(Stable) @NotNull protected EcsTask addTaskDefinitionToEventTarget(@NotNull TaskDefinition taskDefinition) Create an ECS task using the task definition provided and add it to the scheduled event rule.- Parameters:
taskDefinition- the TaskDefinition to add to the event rule. This parameter is required.
-
createAWSLogDriver
Create an AWS Log Driver with the provided streamPrefix.- Parameters:
prefix- the Cloudwatch logging prefix. This parameter is required.
-
getDefaultCluster
@Stability(Stable) @NotNull protected Cluster getDefaultCluster(@NotNull Construct scope, @Nullable IVpc vpc) Returns the default cluster.- Parameters:
scope- This parameter is required.vpc-
-
getDefaultCluster
Returns the default cluster.- Parameters:
scope- This parameter is required.
-
getCluster
The name of the cluster that hosts the service. -
getDesiredTaskCount
The desired number of instantiations of the task definition to keep running on the service.The minimum value is 1
-
getEventRule
The CloudWatch Events rule for the service. -
getSubnetSelection
In what subnets to place the task's ENIs.(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
Default: Private subnets
-