Show / Hide Table of Contents

Class ScheduledTaskBase

The base class for ScheduledEc2Task and ScheduledFargateTask tasks.

stable

Synopsis

Constructors

constructor(scope, id, props)

Constructs a new instance of the ScheduledTaskBase class.

Properties

cluster

The name of the cluster that hosts the service.

desiredTaskCount

The desired number of instantiations of the task definition to keep running on the service.

eventRule

The CloudWatch Events rule for the service.

subnetSelection

In what subnets to place the task's ENIs.

Methods

addTaskDefinitionToEventTarget(taskDefinition)

Create an ECS task using the task definition provided and add it to the scheduled event rule.

createAWSLogDriver(prefix)

Create an AWS Log Driver with the provided streamPrefix.

getDefaultCluster(scope, vpc)

Returns the default cluster.

Constructors

constructor(scope, id, props)

Constructs a new instance of the ScheduledTaskBase class.

stable

Declaration
constructor(scope: Construct, id: string, props: ScheduledTaskBaseProps);
Parameters
scope Construct
id string
props ScheduledTaskBaseProps

Properties

cluster

The name of the cluster that hosts the service.

stable

Declaration
readonly cluster: ICluster;
Property Value

ICluster

desiredTaskCount

The desired number of instantiations of the task definition to keep running on the service.

The minimum value is 1

stable

Declaration
readonly desiredTaskCount: number;
Property Value

number

eventRule

The CloudWatch Events rule for the service.

stable

Declaration
readonly eventRule: Rule;
Property Value

Rule

subnetSelection

In what subnets to place the task's ENIs.

(Only applicable in case the TaskDefinition is configured for AwsVpc networking)

Private subnets stable

Declaration
readonly subnetSelection: SubnetSelection;
Property Value

SubnetSelection

Methods

addTaskDefinitionToEventTarget(taskDefinition)

Create an ECS task using the task definition provided and add it to the scheduled event rule.

Declaration
protected addTaskDefinitionToEventTarget(taskDefinition: TaskDefinition): EcsTask;
Parameters
taskDefinition TaskDefinition
Returns

EcsTask

createAWSLogDriver(prefix)

Create an AWS Log Driver with the provided streamPrefix.

Declaration
protected createAWSLogDriver(prefix: string): AwsLogDriver;
Parameters
prefix string
Returns

AwsLogDriver

getDefaultCluster(scope, vpc)

Returns the default cluster.

stable

Declaration
protected getDefaultCluster(scope: CoreConstruct, vpc?: IVpc): Cluster;
Parameters
scope CoreConstruct
vpc IVpc
Returns

Cluster

Back to top Generated by DocFX