![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.s3.kotlin.outputs.BucketNotificationConfiguration.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.s3.kotlin.outputs
import kotlin.Suppress
import kotlin.collections.List
/**
* Describes the notification configuration for an Amazon S3 bucket.
* 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html) and [Granting Permissions to Publish Event Notification Messages to a Destination](https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#grant-destinations-permissions-to-s3).
* @property eventBridgeConfiguration Enables delivery of events to Amazon EventBridge.
* @property lambdaConfigurations Describes the LAMlong functions to invoke and the events for which to invoke them.
* @property queueConfigurations The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.
* @property topicConfigurations The topic to which notifications are sent and the events for which notifications are generated.
*/
public data class BucketNotificationConfiguration(
public val eventBridgeConfiguration: BucketEventBridgeConfiguration? = null,
public val lambdaConfigurations: List? = null,
public val queueConfigurations: List? = null,
public val topicConfigurations: List? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.s3.outputs.BucketNotificationConfiguration): BucketNotificationConfiguration = BucketNotificationConfiguration(
eventBridgeConfiguration = javaType.eventBridgeConfiguration().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.s3.kotlin.outputs.BucketEventBridgeConfiguration.Companion.toKotlin(args0)
})
}).orElse(null),
lambdaConfigurations = javaType.lambdaConfigurations().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.s3.kotlin.outputs.BucketLambdaConfiguration.Companion.toKotlin(args0)
})
}),
queueConfigurations = javaType.queueConfigurations().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.s3.kotlin.outputs.BucketQueueConfiguration.Companion.toKotlin(args0)
})
}),
topicConfigurations = javaType.topicConfigurations().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.s3.kotlin.outputs.BucketTopicConfiguration.Companion.toKotlin(args0)
})
}),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy