aws-cdk-lib.aws_s3.CfnBucket.TopicConfigurationProperty

interface TopicConfigurationProperty

LanguageType name
.NETAmazon.CDK.AWS.S3.CfnBucket.TopicConfigurationProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awss3#CfnBucket_TopicConfigurationProperty
Javasoftware.amazon.awscdk.services.s3.CfnBucket.TopicConfigurationProperty
Pythonaws_cdk.aws_s3.CfnBucket.TopicConfigurationProperty
TypeScript aws-cdk-lib » 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 { aws_s3 as s3 } from 'aws-cdk-lib';
const topicConfigurationProperty: s3.CfnBucket.TopicConfigurationProperty = {
  event: 'event',
  topic: 'topic',

  // the properties below are optional
  filter: {
    s3Key: {
      rules: [{
        name: 'name',
        value: 'value',
      }],
    },
  },
};

Properties

NameTypeDescription
eventstringThe Amazon S3 bucket event about which to send notifications.
topicstringThe 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 | NotificationFilterPropertyThe 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 | NotificationFilterProperty (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.