interface TopicConfigurationProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.S3.CfnBucket.TopicConfigurationProperty |
Java | software.amazon.awscdk.services.s3.CfnBucket.TopicConfigurationProperty |
Python | aws_cdk.aws_s3.CfnBucket.TopicConfigurationProperty |
TypeScript | @aws-cdk/aws-s3 » CfnBucket » TopicConfigurationProperty |
A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as s3 from '@aws-cdk/aws-s3';
const topicConfigurationProperty: s3.CfnBucket.TopicConfigurationProperty = {
event: 'event',
topic: 'topic',
// the properties below are optional
filter: {
s3Key: {
rules: [{
name: 'name',
value: 'value',
}],
},
},
};
Properties
Name | Type | Description |
---|---|---|
event | string | The Amazon S3 bucket event about which to send notifications. |
topic | string | The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type. |
filter? | IResolvable | Notification | The filtering rules that determine for which objects to send notifications. |
event
Type:
string
The Amazon S3 bucket event about which to send notifications.
For more information, see Supported Event Types in the Amazon S3 User Guide .
topic
Type:
string
The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type.
filter?
Type:
IResolvable
|
Notification
(optional)
The filtering rules that determine for which objects to send notifications.
For example, you can create a filter so that Amazon S3 sends notifications only when image files with a .jpg
extension are added to the bucket.