@Stability(value=Stable)
public static interface CfnBucket.NotificationConfigurationProperty
extends software.amazon.jsii.JsiiSerializable
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::Permissionresource 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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnBucket.NotificationConfigurationProperty.Builder
A builder for
CfnBucket.NotificationConfigurationProperty |
static class |
CfnBucket.NotificationConfigurationProperty.Jsii$Proxy
An implementation for
CfnBucket.NotificationConfigurationProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnBucket.NotificationConfigurationProperty.Builder |
builder() |
default Object |
getEventBridgeConfiguration()
Enables delivery of events to Amazon EventBridge.
|
default Object |
getLambdaConfigurations()
Describes the AWS Lambda functions to invoke and the events for which to invoke them.
|
default Object |
getQueueConfigurations()
The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.
|
default Object |
getTopicConfigurations()
The topic to which notifications are sent and the events for which notifications are generated.
|
@Stability(value=Stable) @Nullable default Object getEventBridgeConfiguration()
@Stability(value=Stable) @Nullable default Object getLambdaConfigurations()
@Stability(value=Stable) @Nullable default Object getQueueConfigurations()
@Stability(value=Stable) @Nullable default Object getTopicConfigurations()
@Stability(value=Stable) static CfnBucket.NotificationConfigurationProperty.Builder builder()
Copyright © 2022. All rights reserved.