class Schedule (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Scheduler.Alpha.Schedule |
![]() | github.com/aws/aws-cdk-go/awscdkscheduleralpha/v2#Schedule |
![]() | software.amazon.awscdk.services.scheduler.alpha.Schedule |
![]() | aws_cdk.aws_scheduler_alpha.Schedule |
![]() | @aws-cdk/aws-scheduler-alpha » Schedule |
⚠️ Deprecated: undefined
Implements
IConstruct
, IDependable
, IResource
, ISchedule
An EventBridge Schedule.
Example
import * as firehose from 'aws-cdk-lib/aws-kinesisfirehose';
declare const deliveryStream: firehose.IDeliveryStream;
const payload = {
Data: "record",
};
new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.rate(Duration.minutes(60)),
target: new targets.FirehosePutRecord(deliveryStream, {
input: ScheduleTargetInput.fromObject(payload),
}),
});
Initializer
new Schedule(scope: Construct, id: string, props: ScheduleProps)
⚠️ Deprecated: undefined
Parameters
- scope
Construct
- id
string
- props
Schedule
Props
Construct Props
Name | Type | Description |
---|---|---|
schedule | Schedule | The expression that defines when the schedule runs. |
target | ISchedule | The schedule's target details. |
description? | string | The description you specify for the schedule. |
enabled? | boolean | Indicates whether the schedule is enabled. |
end? | date | The date, in UTC, before which the schedule can invoke its target. |
group? | IGroup | The schedule's group. |
key? | IKey | The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data. |
schedule | ISchedule | The schedule's group. |
schedule | string | The name of the schedule. |
start? | date | The date, in UTC, after which the schedule can begin invoking its target. |
time | Time | A time window during which EventBridge Scheduler invokes the schedule. |
schedule
⚠️ Deprecated: undefined
Type:
Schedule
The expression that defines when the schedule runs.
Can be either a at
, rate
or cron
expression.
target
⚠️ Deprecated: undefined
Type:
ISchedule
The schedule's target details.
description?
⚠️ Deprecated: undefined
Type:
string
(optional, default: no value)
The description you specify for the schedule.
enabled?
⚠️ Deprecated: undefined
Type:
boolean
(optional, default: true)
Indicates whether the schedule is enabled.
end?
⚠️ Deprecated: undefined
Type:
date
(optional, default: no value)
The date, in UTC, before which the schedule can invoke its target.
EventBridge Scheduler ignores end for one-time schedules.
group?
⚠️ Deprecated: Use scheduleGroup
instead. group
will be removed when this module is stabilized.
Type:
IGroup
(optional, default: By default a schedule will be associated with the default
group.)
The schedule's group.
key?
⚠️ Deprecated: undefined
Type:
IKey
(optional, default: All events in Scheduler are encrypted with a key that AWS owns and manages.)
The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.
scheduleGroup?
⚠️ Deprecated: undefined
Type:
ISchedule
(optional, default: By default a schedule will be associated with the default
group.)
The schedule's group.
scheduleName?
⚠️ Deprecated: undefined
Type:
string
(optional, default: A unique name will be generated)
The name of the schedule.
Up to 64 letters (uppercase and lowercase), numbers, hyphens, underscores and dots are allowed.
start?
⚠️ Deprecated: undefined
Type:
date
(optional, default: no value)
The date, in UTC, after which the schedule can begin invoking its target.
EventBridge Scheduler ignores start for one-time schedules.
timeWindow?
⚠️ Deprecated: undefined
Type:
Time
(optional, default: TimeWindow.off())
A time window during which EventBridge Scheduler invokes the schedule.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
schedule | string | The arn of the schedule. |
schedule | string | The name of the schedule. |
stack | Stack | The stack in which this resource is defined. |
group? | IGroup | The schedule group associated with this schedule. |
key? | IKey | The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data. |
schedule | ISchedule | The schedule group associated with this schedule. |
env
⚠️ Deprecated: undefined
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
⚠️ Deprecated: undefined
Type:
Node
The tree node.
scheduleArn
⚠️ Deprecated: undefined
Type:
string
The arn of the schedule.
scheduleName
⚠️ Deprecated: undefined
Type:
string
The name of the schedule.
stack
⚠️ Deprecated: undefined
Type:
Stack
The stack in which this resource is defined.
group?
⚠️ Deprecated: Use scheduleGroup
instead. group
will be removed when this module is stabilized.
Type:
IGroup
(optional)
The schedule group associated with this schedule.
key?
⚠️ Deprecated: undefined
Type:
IKey
(optional)
The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.
scheduleGroup?
⚠️ Deprecated: undefined
Type:
ISchedule
(optional)
The schedule group associated with this schedule.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
static from | Import an existing schedule using the ARN. |
static metric | Return the given named metric for all schedules. |
static metric | Metric for all invocation attempts across all schedules. |
static metric | Metric for dropped invocations when EventBridge Scheduler stops attempting to invoke the target after a schedule's retry policy has been exhausted. |
static metric | Emitted when the target returns an exception after EventBridge Scheduler calls the target API across all schedules. |
static metric | Metric for failed invocations that also failed to deliver to DLQ across all schedules. |
static metric | Metric for invocations delivered to the DLQ across all schedules. |
static metric | Metric for delivery of failed invocations to DLQ when the payload of the event sent to the DLQ exceeds the maximum size allowed by Amazon SQS. |
static metric | Metric for invocation failures due to API throttling by the target across all schedules. |
static metric | Metric for the number of invocations that were throttled across all schedules. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
⚠️ Deprecated: undefined
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
toString()
public toString(): string
⚠️ Deprecated: undefined
Returns
string
Returns a string representation of this construct.
static fromScheduleArn(scope, id, scheduleArn)
public static fromScheduleArn(scope: Construct, id: string, scheduleArn: string): ISchedule
⚠️ Deprecated: undefined
Parameters
- scope
Construct
- id
string
- scheduleArn
string
Returns
Import an existing schedule using the ARN.
static metricAll(metricName, props?)
public static metricAll(metricName: string, props?: MetricOptions): Metric
⚠️ Deprecated: undefined
Parameters
- metricName
string
- props
Metric
Options
Returns
Return the given named metric for all schedules.
static metricAllAttempts(props?)
public static metricAllAttempts(props?: MetricOptions): Metric
⚠️ Deprecated: undefined
Parameters
- props
Metric
Options
Returns
Metric for all invocation attempts across all schedules.
static metricAllDropped(props?)
public static metricAllDropped(props?: MetricOptions): Metric
⚠️ Deprecated: undefined
Parameters
- props
Metric
Options
Returns
Metric for dropped invocations when EventBridge Scheduler stops attempting to invoke the target after a schedule's retry policy has been exhausted.
Metric is calculated for all schedules.
static metricAllErrors(props?)
public static metricAllErrors(props?: MetricOptions): Metric
⚠️ Deprecated: undefined
Parameters
- props
Metric
Options
Returns
Emitted when the target returns an exception after EventBridge Scheduler calls the target API across all schedules.
static metricAllFailedToBeSentToDLQ(errorCode?, props?)
public static metricAllFailedToBeSentToDLQ(errorCode?: string, props?: MetricOptions): Metric
⚠️ Deprecated: undefined
Parameters
- errorCode
string
- props
Metric
Options
Returns
Metric for failed invocations that also failed to deliver to DLQ across all schedules.
static metricAllSentToDLQ(props?)
public static metricAllSentToDLQ(props?: MetricOptions): Metric
⚠️ Deprecated: undefined
Parameters
- props
Metric
Options
Returns
Metric for invocations delivered to the DLQ across all schedules.
static metricAllSentToDLQTruncated(props?)
public static metricAllSentToDLQTruncated(props?: MetricOptions): Metric
⚠️ Deprecated: undefined
Parameters
- props
Metric
Options
Returns
Metric for delivery of failed invocations to DLQ when the payload of the event sent to the DLQ exceeds the maximum size allowed by Amazon SQS.
Metric is calculated for all schedules.
static metricAllTargetThrottled(props?)
public static metricAllTargetThrottled(props?: MetricOptions): Metric
⚠️ Deprecated: undefined
Parameters
- props
Metric
Options
Returns
Metric for invocation failures due to API throttling by the target across all schedules.
static metricAllThrottled(props?)
public static metricAllThrottled(props?: MetricOptions): Metric
⚠️ Deprecated: undefined
Parameters
- props
Metric
Options
Returns
Metric for the number of invocations that were throttled across all schedules.
See also: https://docs.aws.amazon.com/scheduler/latest/UserGuide/scheduler-quotas.html