class SnsAction
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CloudWatch.Actions.SnsAction |
Java | software.amazon.awscdk.services.cloudwatch.actions.SnsAction |
Python | aws_cdk.aws_cloudwatch_actions.SnsAction |
TypeScript (source) | @aws-cdk/aws-cloudwatch-actions » SnsAction |
Implements
IAlarm
Use an SNS topic as an alarm action.
Example
import * as cw_actions from '@aws-cdk/aws-cloudwatch-actions';
declare const alarm: cloudwatch.Alarm;
const topic = new sns.Topic(this, 'Topic');
alarm.addAlarmAction(new cw_actions.SnsAction(topic));
Initializer
new SnsAction(topic: ITopic)
Parameters
- topic
ITopic
Methods
Name | Description |
---|---|
bind(_scope, _alarm) | Returns an alarm action configuration to use an SNS topic as an alarm action. |
bind(_scope, _alarm)
public bind(_scope: Construct, _alarm: IAlarm): AlarmActionConfig
Parameters
Returns
Returns an alarm action configuration to use an SNS topic as an alarm action.