Show / Hide Table of Contents

Class FargateTaskProps

Properties for scheduling an ECS Fargate Task.

Inheritance
object
FargateTaskProps
Implements
IFargateTaskProps
IEcsRunTaskBaseProps
IScheduleTargetBaseProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.Scheduler.Targets
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FargateTaskProps : IFargateTaskProps, IEcsRunTaskBaseProps, IScheduleTargetBaseProps
Syntax (vb)
Public Class FargateTaskProps Implements IFargateTaskProps, IEcsRunTaskBaseProps, IScheduleTargetBaseProps
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.ECS;

            ICluster cluster;
            FargateTaskDefinition taskDefinition;


            new Schedule(this, "Schedule", new ScheduleProps {
                Schedule = ScheduleExpression.Rate(Duration.Minutes(60)),
                Target = new EcsRunFargateTask(cluster, new FargateTaskProps {
                    TaskDefinition = taskDefinition
                })
            });

Synopsis

Constructors

FargateTaskProps()

Properties for scheduling an ECS Fargate Task.

Properties

AssignPublicIp

Specifies whether the task's elastic network interface receives a public IP address.

CapacityProviderStrategies

The capacity provider strategy to use for the task.

DeadLetterQueue

The SQS queue to be used as deadLetterQueue.

EnableEcsManagedTags

Specifies whether to enable Amazon ECS managed tags for the task.

EnableExecuteCommand

Whether to enable execute command functionality for the containers in this task.

Group

Specifies an ECS task group for the task.

Input

Input passed to the target.

MaxEventAge

The maximum age of a request that Scheduler sends to a target for processing.

PlatformVersion

Specifies the platform version for the task.

PropagateTags

Specifies whether to propagate the tags from the task definition to the task.

ReferenceId

The reference ID to use for the task.

RetryAttempts

The maximum number of times to retry when the target returns an error.

Role

An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf.

SecurityGroups

The security groups associated with the task.

Tags

The metadata that you apply to the task to help you categorize and organize them.

TaskCount

The number of tasks to create based on TaskDefinition.

TaskDefinition

The task definition to use for scheduled tasks.

VpcSubnets

The subnets associated with the task.

Constructors

FargateTaskProps()

Properties for scheduling an ECS Fargate Task.

public FargateTaskProps()
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.ECS;

            ICluster cluster;
            FargateTaskDefinition taskDefinition;


            new Schedule(this, "Schedule", new ScheduleProps {
                Schedule = ScheduleExpression.Rate(Duration.Minutes(60)),
                Target = new EcsRunFargateTask(cluster, new FargateTaskProps {
                    TaskDefinition = taskDefinition
                })
            });

Properties

AssignPublicIp

Specifies whether the task's elastic network interface receives a public IP address.

public bool? AssignPublicIp { get; set; }
Property Value

bool?

Remarks

If true, the task will receive a public IP address and be accessible from the internet. Should only be set to true when using public subnets.

Default: - true if the subnet type is PUBLIC, otherwise false

CapacityProviderStrategies

The capacity provider strategy to use for the task.

public ICapacityProviderStrategy[]? CapacityProviderStrategies { get; set; }
Property Value

ICapacityProviderStrategy[]

Remarks

Default: - No capacity provider strategy

DeadLetterQueue

The SQS queue to be used as deadLetterQueue.

public IQueue? DeadLetterQueue { get; set; }
Property Value

IQueue

Remarks

The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.

Default: - no dead-letter queue

EnableEcsManagedTags

Specifies whether to enable Amazon ECS managed tags for the task.

public bool? EnableEcsManagedTags { get; set; }
Property Value

bool?

Remarks

Default: - false

EnableExecuteCommand

Whether to enable execute command functionality for the containers in this task.

public bool? EnableExecuteCommand { get; set; }
Property Value

bool?

Remarks

If true, this enables execute command functionality on all containers in the task.

Default: - false

Group

Specifies an ECS task group for the task.

public string? Group { get; set; }
Property Value

string

Remarks

Default: - No group

Input

Input passed to the target.

public ScheduleTargetInput? Input { get; set; }
Property Value

ScheduleTargetInput

Remarks

Default: - no input.

MaxEventAge

The maximum age of a request that Scheduler sends to a target for processing.

public Duration? MaxEventAge { get; set; }
Property Value

Duration

Remarks

Minimum value of 60. Maximum value of 86400.

Default: Duration.hours(24)

PlatformVersion

Specifies the platform version for the task.

public FargatePlatformVersion? PlatformVersion { get; set; }
Property Value

FargatePlatformVersion?

Remarks

Specify only the numeric portion of the platform version, such as 1.1.0. Platform versions determine the underlying runtime environment for the task.

Default: - LATEST

PropagateTags

Specifies whether to propagate the tags from the task definition to the task.

public bool? PropagateTags { get; set; }
Property Value

bool?

Remarks

If no value is specified, the tags are not propagated.

Default: - No tag propagation

ReferenceId

The reference ID to use for the task.

public string? ReferenceId { get; set; }
Property Value

string

Remarks

Default: - No reference ID.

RetryAttempts

The maximum number of times to retry when the target returns an error.

public double? RetryAttempts { get; set; }
Property Value

double?

Remarks

Minimum value of 0. Maximum value of 185.

Default: 185

Role

An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf.

public IRole? Role { get; set; }
Property Value

IRole

Remarks

If none provided templates target will automatically create an IAM role with all the minimum necessary permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets will grant minimal required permissions.

Default: - created by target

SecurityGroups

The security groups associated with the task.

public ISecurityGroup[]? SecurityGroups { get; set; }
Property Value

ISecurityGroup[]

Remarks

These security groups must all be in the same VPC. Controls inbound and outbound network access for the task.

Default: - The security group for the VPC is used.

Tags

The metadata that you apply to the task to help you categorize and organize them.

public ITag[]? Tags { get; set; }
Property Value

ITag[]

Remarks

Each tag consists of a key and an optional value, both of which you define.

Default: - No tags

TaskCount

The number of tasks to create based on TaskDefinition.

public double? TaskCount { get; set; }
Property Value

double?

Remarks

Default: 1

TaskDefinition

The task definition to use for scheduled tasks.

public TaskDefinition TaskDefinition { get; set; }
Property Value

TaskDefinition

Remarks

Note: this must be TaskDefinition, and not ITaskDefinition, as it requires properties that are not known for imported task definitions If you want to run a RunTask with an imported task definition, consider using a Universal target.

VpcSubnets

The subnets associated with the task.

public ISubnetSelection? VpcSubnets { get; set; }
Property Value

ISubnetSelection

Remarks

These subnets must all be in the same VPC. The task will be launched in these subnets.

Default: - all private subnets of the VPC are selected.

Implements

IFargateTaskProps
IEcsRunTaskBaseProps
IScheduleTargetBaseProps
Back to top Generated by DocFX