Class CfnBucket.NotificationConfigurationProperty
Describes the notification configuration for an Amazon S3 bucket.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class NotificationConfigurationProperty : Object, CfnBucket.INotificationConfigurationProperty
Syntax (vb)
Public Class NotificationConfigurationProperty
Inherits Object
Implements CfnBucket.INotificationConfigurationProperty
Remarks
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 .
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;
var notificationConfigurationProperty = new NotificationConfigurationProperty {
EventBridgeConfiguration = new EventBridgeConfigurationProperty {
EventBridgeEnabled = false
},
LambdaConfigurations = new [] { new LambdaConfigurationProperty {
Event = "event",
Function = "function",
// the properties below are optional
Filter = new NotificationFilterProperty {
S3Key = new S3KeyFilterProperty {
Rules = new [] { new FilterRuleProperty {
Name = "name",
Value = "value"
} }
}
}
} },
QueueConfigurations = new [] { new QueueConfigurationProperty {
Event = "event",
Queue = "queue",
// the properties below are optional
Filter = new NotificationFilterProperty {
S3Key = new S3KeyFilterProperty {
Rules = new [] { new FilterRuleProperty {
Name = "name",
Value = "value"
} }
}
}
} },
TopicConfigurations = new [] { new TopicConfigurationProperty {
Event = "event",
Topic = "topic",
// the properties below are optional
Filter = new NotificationFilterProperty {
S3Key = new S3KeyFilterProperty {
Rules = new [] { new FilterRuleProperty {
Name = "name",
Value = "value"
} }
}
}
} }
};
Synopsis
Constructors
NotificationConfigurationProperty() |
Properties
EventBridgeConfiguration | Enables delivery of events to Amazon EventBridge. |
LambdaConfigurations | Describes the AWS Lambda functions to invoke and the events for which to invoke them. |
QueueConfigurations | The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages. |
TopicConfigurations | The topic to which notifications are sent and the events for which notifications are generated. |
Constructors
NotificationConfigurationProperty()
public NotificationConfigurationProperty()
Properties
EventBridgeConfiguration
Enables delivery of events to Amazon EventBridge.
public object EventBridgeConfiguration { get; set; }
Property Value
System.Object
Remarks
LambdaConfigurations
Describes the AWS Lambda functions to invoke and the events for which to invoke them.
public object LambdaConfigurations { get; set; }
Property Value
System.Object
Remarks
QueueConfigurations
The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.
public object QueueConfigurations { get; set; }
Property Value
System.Object
Remarks
TopicConfigurations
The topic to which notifications are sent and the events for which notifications are generated.
public object TopicConfigurations { get; set; }
Property Value
System.Object