interface LoggingConfig
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.SNS.LoggingConfig |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awssns#LoggingConfig |
![]() | software.amazon.awscdk.services.sns.LoggingConfig |
![]() | aws_cdk.aws_sns.LoggingConfig |
![]() | aws-cdk-lib » aws_sns » LoggingConfig |
A logging configuration for delivery status of messages sent from SNS topic to subscribed endpoints.
See also: https://docs.aws.amazon.com/sns/latest/dg/sns-topic-attributes.html.
Example
declare const role: iam.Role;
const topic = new sns.Topic(this, 'MyTopic');
topic.addLoggingConfig({
protocol: sns.LoggingProtocol.SQS,
failureFeedbackRole: role,
successFeedbackRole: role,
successFeedbackSampleRate: 50,
});
Properties
Name | Type | Description |
---|---|---|
protocol | Logging | Indicates one of the supported protocols for the SNS topic. |
failure | IRole | The IAM role to be used when logging failed message deliveries in Amazon CloudWatch. |
success | IRole | The IAM role to be used when logging successful message deliveries in Amazon CloudWatch. |
success | number | The percentage of successful message deliveries to be logged in Amazon CloudWatch. |
protocol
Type:
Logging
Indicates one of the supported protocols for the SNS topic.
failureFeedbackRole?
Type:
IRole
(optional, default: None)
The IAM role to be used when logging failed message deliveries in Amazon CloudWatch.
successFeedbackRole?
Type:
IRole
(optional, default: None)
The IAM role to be used when logging successful message deliveries in Amazon CloudWatch.
successFeedbackSampleRate?
Type:
number
(optional, default: None)
The percentage of successful message deliveries to be logged in Amazon CloudWatch.
Valid values are integer between 0-100