Show / Hide Table of Contents

Class Schedule

An EventBridge Schedule.

Inheritance
object
Resource
Schedule
Implements
ISchedule
IResource
IConstruct
IDependable
IEnvironmentAware
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.Scheduler
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Schedule : Resource, ISchedule, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class Schedule Inherits Resource Implements ISchedule, IResource, IConstruct, IDependable, IEnvironmentAware
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.KinesisFirehose;
            IDeliveryStream deliveryStream;


            IDictionary<string, string> payload = new Dictionary<string, string> {
                { "Data", "record" }
            };

            new Schedule(this, "Schedule", new ScheduleProps {
                Schedule = ScheduleExpression.Rate(Duration.Minutes(60)),
                Target = new FirehosePutRecord(deliveryStream, new ScheduleTargetBaseProps {
                    Input = ScheduleTargetInput.FromObject(payload)
                })
            });

Synopsis

Constructors

Schedule(Construct, string, IScheduleProps)

An EventBridge Schedule.

Properties

Key

The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.

PROPERTY_INJECTION_ID

Uniquely identifies this class.

ScheduleArn

The arn of the schedule.

ScheduleGroup

The schedule group associated with this schedule.

ScheduleName

The name of the schedule.

Methods

FromScheduleArn(Construct, string, string)

Import an existing schedule using the ARN.

MetricAll(string, IMetricOptions?)

Return the given named metric for all schedules.

MetricAllAttempts(IMetricOptions?)

Metric for all invocation attempts across all schedules.

MetricAllDropped(IMetricOptions?)

Metric for dropped invocations when EventBridge Scheduler stops attempting to invoke the target after a schedule's retry policy has been exhausted.

MetricAllErrors(IMetricOptions?)

Emitted when the target returns an exception after EventBridge Scheduler calls the target API across all schedules.

MetricAllFailedToBeSentToDLQ(string?, IMetricOptions?)

Metric for failed invocations that also failed to deliver to DLQ across all schedules.

MetricAllSentToDLQ(IMetricOptions?)

Metric for invocations delivered to the DLQ across all schedules.

MetricAllSentToDLQTruncated(IMetricOptions?)

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.

MetricAllTargetThrottled(IMetricOptions?)

Metric for invocation failures due to API throttling by the target across all schedules.

MetricAllThrottled(IMetricOptions?)

Metric for the number of invocations that were throttled across all schedules.

Constructors

Schedule(Construct, string, IScheduleProps)

An EventBridge Schedule.

public Schedule(Construct scope, string id, IScheduleProps props)
Parameters
scope Construct
id string
props IScheduleProps
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.KinesisFirehose;
            IDeliveryStream deliveryStream;


            IDictionary<string, string> payload = new Dictionary<string, string> {
                { "Data", "record" }
            };

            new Schedule(this, "Schedule", new ScheduleProps {
                Schedule = ScheduleExpression.Rate(Duration.Minutes(60)),
                Target = new FirehosePutRecord(deliveryStream, new ScheduleTargetBaseProps {
                    Input = ScheduleTargetInput.FromObject(payload)
                })
            });

Properties

Key

The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.

public virtual IKey? Key { get; }
Property Value

IKey

Remarks

ExampleMetadata: infused

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

ExampleMetadata: infused

ScheduleArn

The arn of the schedule.

public virtual string ScheduleArn { get; }
Property Value

string

Remarks

ExampleMetadata: infused

ScheduleGroup

The schedule group associated with this schedule.

public virtual IScheduleGroup? ScheduleGroup { get; }
Property Value

IScheduleGroup

Remarks

ExampleMetadata: infused

ScheduleName

The name of the schedule.

public virtual string ScheduleName { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Methods

FromScheduleArn(Construct, string, string)

Import an existing schedule using the ARN.

public static ISchedule FromScheduleArn(Construct scope, string id, string scheduleArn)
Parameters
scope Construct
id string
scheduleArn string
Returns

ISchedule

Remarks

ExampleMetadata: infused

MetricAll(string, IMetricOptions?)

Return the given named metric for all schedules.

public static Metric MetricAll(string metricName, IMetricOptions? props = null)
Parameters
metricName string
props IMetricOptions
Returns

Metric

Remarks

Default: - sum over 5 minutes

MetricAllAttempts(IMetricOptions?)

Metric for all invocation attempts across all schedules.

public static Metric MetricAllAttempts(IMetricOptions? props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Default: - sum over 5 minutes

MetricAllDropped(IMetricOptions?)

Metric for dropped invocations when EventBridge Scheduler stops attempting to invoke the target after a schedule's retry policy has been exhausted.

public static Metric MetricAllDropped(IMetricOptions? props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Metric is calculated for all schedules.

Default: - sum over 5 minutes

MetricAllErrors(IMetricOptions?)

Emitted when the target returns an exception after EventBridge Scheduler calls the target API across all schedules.

public static Metric MetricAllErrors(IMetricOptions? props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Default: - sum over 5 minutes

MetricAllFailedToBeSentToDLQ(string?, IMetricOptions?)

Metric for failed invocations that also failed to deliver to DLQ across all schedules.

public static Metric MetricAllFailedToBeSentToDLQ(string? errorCode = null, IMetricOptions? props = null)
Parameters
errorCode string
props IMetricOptions
Returns

Metric

Remarks

Default: - sum over 5 minutes

MetricAllSentToDLQ(IMetricOptions?)

Metric for invocations delivered to the DLQ across all schedules.

public static Metric MetricAllSentToDLQ(IMetricOptions? props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Default: - sum over 5 minutes

MetricAllSentToDLQTruncated(IMetricOptions?)

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.

public static Metric MetricAllSentToDLQTruncated(IMetricOptions? props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Metric is calculated for all schedules.

Default: - sum over 5 minutes

MetricAllTargetThrottled(IMetricOptions?)

Metric for invocation failures due to API throttling by the target across all schedules.

public static Metric MetricAllTargetThrottled(IMetricOptions? props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Default: - sum over 5 minutes

MetricAllThrottled(IMetricOptions?)

Metric for the number of invocations that were throttled across all schedules.

public static Metric MetricAllThrottled(IMetricOptions? props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Default: - sum over 5 minutes

See: https://docs.aws.amazon.com/scheduler/latest/UserGuide/scheduler-quotas.html

Implements

ISchedule
IResource
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX