class SnsPublish
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Scheduler.Targets.SnsPublish |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsschedulertargets#SnsPublish |
Java | software.amazon.awscdk.services.scheduler.targets.SnsPublish |
Python | aws_cdk.aws_scheduler_targets.SnsPublish |
TypeScript (source) | aws-cdk-lib » aws_scheduler_targets » SnsPublish |
Implements
ISchedule
Extends
Schedule
Use an Amazon SNS topic as a target for AWS EventBridge Scheduler.
Example
import * as sns from 'aws-cdk-lib/aws-sns';
const topic = new sns.Topic(this, 'Topic');
const payload = {
message: 'Hello scheduler!',
};
const target = new targets.SnsPublish(topic, {
input: ScheduleTargetInput.fromObject(payload),
});
new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.rate(Duration.hours(1)),
target,
});
Initializer
new SnsPublish(topic: ITopic, props?: ScheduleTargetBaseProps)
Parameters
- topic
ITopic - props
ScheduleTarget Base Props
Methods
| Name | Description |
|---|---|
| bind(schedule) | Create a return a Schedule Target Configuration for the given schedule. |
| protected add |
bind(schedule)
public bind(schedule: ISchedule): ScheduleTargetConfig
Parameters
- schedule
ISchedule
Returns
Create a return a Schedule Target Configuration for the given schedule.
protected addTargetActionToRole(role)
protected addTargetActionToRole(role: IRole): void
Parameters
- role
IRole

.NET
Go
Java
Python
TypeScript (