Class CfnSchedule
A schedule is the main resource you create, configure, and manage using Amazon EventBridge Scheduler.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Scheduler
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnSchedule : CfnResource, IInspectable
Syntax (vb)
Public Class CfnSchedule
Inherits CfnResource
Implements IInspectable
Remarks
Every schedule has a schedule expression that determines when, and with what frequency, the schedule runs. EventBridge Scheduler supports three types of schedules: rate, cron, and one-time schedules. For more information about different schedule types, see Schedule types in the EventBridge Scheduler User Guide .
When you create a schedule, you configure a target for the schedule to invoke. A target is an API operation that EventBridge Scheduler calls on your behalf every time your schedule runs. EventBridge Scheduler supports two types of targets: templated targets invoke common API operations across a core groups of services, and customizeable universal targets that you can use to call more than 6,000 operations across over 270 services. For more information about configuring targets, see Managing targets in the EventBridge Scheduler User Guide .
For more information about managing schedules, changing the schedule state, setting up flexible time windows, and configuring a dead-letter queue for a schedule, see Managing a schedule in the EventBridge Scheduler User Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html
CloudformationResource: AWS::Scheduler::Schedule
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Scheduler;
var tags;
var cfnSchedule = new CfnSchedule(this, "MyCfnSchedule", new CfnScheduleProps {
FlexibleTimeWindow = new FlexibleTimeWindowProperty {
Mode = "mode",
// the properties below are optional
MaximumWindowInMinutes = 123
},
ScheduleExpression = "scheduleExpression",
Target = new TargetProperty {
Arn = "arn",
RoleArn = "roleArn",
// the properties below are optional
DeadLetterConfig = new DeadLetterConfigProperty {
Arn = "arn"
},
EcsParameters = new EcsParametersProperty {
TaskDefinitionArn = "taskDefinitionArn",
// the properties below are optional
CapacityProviderStrategy = new [] { new CapacityProviderStrategyItemProperty {
CapacityProvider = "capacityProvider",
// the properties below are optional
Base = 123,
Weight = 123
} },
EnableEcsManagedTags = false,
EnableExecuteCommand = false,
Group = "group",
LaunchType = "launchType",
NetworkConfiguration = new NetworkConfigurationProperty {
AwsvpcConfiguration = new AwsVpcConfigurationProperty {
Subnets = new [] { "subnets" },
// the properties below are optional
AssignPublicIp = "assignPublicIp",
SecurityGroups = new [] { "securityGroups" }
}
},
PlacementConstraints = new [] { new PlacementConstraintProperty {
Expression = "expression",
Type = "type"
} },
PlacementStrategy = new [] { new PlacementStrategyProperty {
Field = "field",
Type = "type"
} },
PlatformVersion = "platformVersion",
PropagateTags = "propagateTags",
ReferenceId = "referenceId",
Tags = tags,
TaskCount = 123
},
EventBridgeParameters = new EventBridgeParametersProperty {
DetailType = "detailType",
Source = "source"
},
Input = "input",
KinesisParameters = new KinesisParametersProperty {
PartitionKey = "partitionKey"
},
RetryPolicy = new RetryPolicyProperty {
MaximumEventAgeInSeconds = 123,
MaximumRetryAttempts = 123
},
SageMakerPipelineParameters = new SageMakerPipelineParametersProperty {
PipelineParameterList = new [] { new SageMakerPipelineParameterProperty {
Name = "name",
Value = "value"
} }
},
SqsParameters = new SqsParametersProperty {
MessageGroupId = "messageGroupId"
}
},
// the properties below are optional
Description = "description",
EndDate = "endDate",
GroupName = "groupName",
KmsKeyArn = "kmsKeyArn",
Name = "name",
ScheduleExpressionTimezone = "scheduleExpressionTimezone",
StartDate = "startDate",
State = "state"
});
Synopsis
Constructors
CfnSchedule(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnSchedule(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnSchedule(Construct, String, ICfnScheduleProps) |
Properties
AttrArn | The Amazon Resource Name (ARN) for the Amazon EventBridge Scheduler schedule. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Description | The description you specify for the schedule. |
EndDate | The date, in UTC, before which the schedule can invoke its target. |
FlexibleTimeWindow | Allows you to configure a time window during which EventBridge Scheduler invokes the schedule. |
GroupName | The name of the schedule group associated with this schedule. |
KmsKeyArn | The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data. |
Name | The name of the schedule. |
ScheduleExpression | The expression that defines when the schedule runs. |
ScheduleExpressionTimezone | The timezone in which the scheduling expression is evaluated. |
StartDate | The date, in UTC, after which the schedule can begin invoking its target. |
State | Specifies whether the schedule is enabled or disabled. |
Target | The schedule's target details. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnSchedule(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnSchedule(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnSchedule(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnSchedule(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnSchedule(Construct, String, ICfnScheduleProps)
public CfnSchedule(Construct scope, string id, ICfnScheduleProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnScheduleProps
Resource properties.
Properties
AttrArn
The Amazon Resource Name (ARN) for the Amazon EventBridge Scheduler schedule.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Description
The description you specify for the schedule.
public virtual string Description { get; set; }
Property Value
System.String
EndDate
The date, in UTC, before which the schedule can invoke its target.
public virtual string EndDate { get; set; }
Property Value
System.String
FlexibleTimeWindow
Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
public virtual object FlexibleTimeWindow { get; set; }
Property Value
System.Object
GroupName
The name of the schedule group associated with this schedule.
public virtual string GroupName { get; set; }
Property Value
System.String
KmsKeyArn
The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.
public virtual string KmsKeyArn { get; set; }
Property Value
System.String
Name
The name of the schedule.
public virtual string Name { get; set; }
Property Value
System.String
ScheduleExpression
The expression that defines when the schedule runs.
public virtual string ScheduleExpression { get; set; }
Property Value
System.String
Remarks
The following formats are supported.
ScheduleExpressionTimezone
The timezone in which the scheduling expression is evaluated.
public virtual string ScheduleExpressionTimezone { get; set; }
Property Value
System.String
StartDate
The date, in UTC, after which the schedule can begin invoking its target.
public virtual string StartDate { get; set; }
Property Value
System.String
State
Specifies whether the schedule is enabled or disabled.
public virtual string State { get; set; }
Property Value
System.String
Target
The schedule's target details.
public virtual object Target { get; set; }
Property Value
System.Object
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>