Class ScheduledFargateTask
A scheduled Fargate task that will be initiated off of CloudWatch Events.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS.Patterns
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ScheduledFargateTask : ScheduledTaskBase
Syntax (vb)
Public Class ScheduledFargateTask
Inherits ScheduledTaskBase
Remarks
ExampleMetadata: infused
Examples
var vpc = new Vpc(this, "Vpc", new VpcProps { MaxAzs = 1 });
var cluster = new Cluster(this, "EcsCluster", new ClusterProps { Vpc = vpc });
var scheduledFargateTask = new ScheduledFargateTask(this, "ScheduledFargateTask", new ScheduledFargateTaskProps {
Cluster = cluster,
ScheduledFargateTaskImageOptions = new ScheduledFargateTaskImageOptions {
Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample"),
MemoryLimitMiB = 512
},
Schedule = Schedule.Expression("rate(1 minute)"),
Tags = new [] { new Tag {
Key = "my-tag",
Value = "my-tag-value"
} }
});
Synopsis
Constructors
ScheduledFargateTask(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ScheduledFargateTask(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
ScheduledFargateTask(Construct, String, IScheduledFargateTaskProps) | Constructs a new instance of the ScheduledFargateTask class. |
Properties
Task | The ECS task in this construct. |
TaskDefinition | The Fargate task definition in this construct. |
Constructors
ScheduledFargateTask(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ScheduledFargateTask(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ScheduledFargateTask(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ScheduledFargateTask(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
ScheduledFargateTask(Construct, String, IScheduledFargateTaskProps)
Constructs a new instance of the ScheduledFargateTask class.
public ScheduledFargateTask(Construct scope, string id, IScheduledFargateTaskProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IScheduledFargateTaskProps
Properties
Task
TaskDefinition
The Fargate task definition in this construct.
public virtual FargateTaskDefinition TaskDefinition { get; }
Property Value