Class ScheduledFargateTask
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.ecs.patterns.ScheduledTaskBase
software.amazon.awscdk.services.ecs.patterns.ScheduledFargateTask
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:09.586Z")
@Stability(Stable)
public class ScheduledFargateTask
extends ScheduledTaskBase
A scheduled Fargate task that will be initiated off of CloudWatch Events.
Example:
Vpc vpc = Vpc.Builder.create(this, "Vpc").maxAzs(1).build(); Cluster cluster = Cluster.Builder.create(this, "EcsCluster").vpc(vpc).build(); ScheduledFargateTask scheduledFargateTask = ScheduledFargateTask.Builder.create(this, "ScheduledFargateTask") .cluster(cluster) .scheduledFargateTaskImageOptions(ScheduledFargateTaskImageOptions.builder() .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample")) .memoryLimitMiB(512) .build()) .schedule(Schedule.expression("rate(1 minute)")) .tags(List.of(Tag.builder() .key("my-tag") .value("my-tag-value") .build())) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
ScheduledFargateTask
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
ScheduledFargateTask
(software.amazon.jsii.JsiiObjectRef objRef) ScheduledFargateTask
(software.constructs.Construct scope, String id, ScheduledFargateTaskProps props) Constructs a new instance of the ScheduledFargateTask class. -
Method Summary
Modifier and TypeMethodDescriptiongetTask()
The ECS task in this construct.The Fargate task definition in this construct.Methods inherited from class software.amazon.awscdk.services.ecs.patterns.ScheduledTaskBase
addTaskAsTarget, addTaskDefinitionToEventTarget, createAWSLogDriver, getCluster, getDefaultCluster, getDefaultCluster, getDesiredTaskCount, getEventRule, getPropagateTags, getSubnetSelection, getTags
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ScheduledFargateTask
protected ScheduledFargateTask(software.amazon.jsii.JsiiObjectRef objRef) -
ScheduledFargateTask
protected ScheduledFargateTask(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ScheduledFargateTask
@Stability(Stable) public ScheduledFargateTask(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ScheduledFargateTaskProps props) Constructs a new instance of the ScheduledFargateTask class.- Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
getTask
The ECS task in this construct. -
getTaskDefinition
The Fargate task definition in this construct.
-