Interface CfnBucket.NotificationConfigurationProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnBucket.NotificationConfigurationProperty.Jsii$Proxy
- Enclosing class:
CfnBucket
If you create the target resource and related permissions in the same template, you might have a circular dependency.
For example, you might use the
AWS::Lambda::Permission
resource to grant the bucket permission to invoke an AWS Lambda function. However, AWS CloudFormation can't create the bucket until the bucket has permission to invoke the function ( AWS CloudFormation checks whether the bucket can invoke the function). If you're using Refs to pass the bucket name, this leads to a circular dependency.To avoid this dependency, you can create all resources without specifying the notification configuration. Then, update the stack with a notification configuration.
For more information on permissions, see AWS::Lambda::Permission and Granting Permissions to Publish Event Notification Messages to a Destination .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.s3.*; NotificationConfigurationProperty notificationConfigurationProperty = NotificationConfigurationProperty.builder() .eventBridgeConfiguration(EventBridgeConfigurationProperty.builder() .eventBridgeEnabled(false) .build()) .lambdaConfigurations(List.of(LambdaConfigurationProperty.builder() .event("event") .function("function") // the properties below are optional .filter(NotificationFilterProperty.builder() .s3Key(S3KeyFilterProperty.builder() .rules(List.of(FilterRuleProperty.builder() .name("name") .value("value") .build())) .build()) .build()) .build())) .queueConfigurations(List.of(QueueConfigurationProperty.builder() .event("event") .queue("queue") // the properties below are optional .filter(NotificationFilterProperty.builder() .s3Key(S3KeyFilterProperty.builder() .rules(List.of(FilterRuleProperty.builder() .name("name") .value("value") .build())) .build()) .build()) .build())) .topicConfigurations(List.of(TopicConfigurationProperty.builder() .event("event") .topic("topic") // the properties below are optional .filter(NotificationFilterProperty.builder() .s3Key(S3KeyFilterProperty.builder() .rules(List.of(FilterRuleProperty.builder() .name("name") .value("value") .build())) .build()) .build()) .build())) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnBucket.NotificationConfigurationProperty
static final class
An implementation forCfnBucket.NotificationConfigurationProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Object
Enables delivery of events to Amazon EventBridge.default Object
Describes the AWS Lambda functions to invoke and the events for which to invoke them.default Object
The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.default Object
The topic to which notifications are sent and the events for which notifications are generated.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEventBridgeConfiguration
Enables delivery of events to Amazon EventBridge. -
getLambdaConfigurations
Describes the AWS Lambda functions to invoke and the events for which to invoke them. -
getQueueConfigurations
The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages. -
getTopicConfigurations
The topic to which notifications are sent and the events for which notifications are generated. -
builder
-