VpcEndpointConnectionNotificationArgs

data class VpcEndpointConnectionNotificationArgs(val connectionEvents: Output<List<String>>? = null, val connectionNotificationArn: Output<String>? = null, val vpcEndpointId: Output<String>? = null, val vpcEndpointServiceId: Output<String>? = null) : ConvertibleToJava<VpcEndpointConnectionNotificationArgs>

Provides a VPC Endpoint connection notification resource. Connection notifications notify subscribers of VPC Endpoint events.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.sns.Topic;
import com.pulumi.aws.sns.TopicArgs;
import com.pulumi.aws.ec2.VpcEndpointService;
import com.pulumi.aws.ec2.VpcEndpointServiceArgs;
import com.pulumi.aws.ec2.VpcEndpointConnectionNotification;
import com.pulumi.aws.ec2.VpcEndpointConnectionNotificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var topicPolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
.statements(GetPolicyDocumentStatementArgs.builder()
.effect("Allow")
.principals(GetPolicyDocumentStatementPrincipalArgs.builder()
.type("Service")
.identifiers("vpce.amazonaws.com")
.build())
.actions("SNS:Publish")
.resources("arn:aws:sns:*:*:vpce-notification-topic")
.build())
.build());
var topicTopic = new Topic("topicTopic", TopicArgs.builder()
.policy(topicPolicyDocument.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
.build());
var fooVpcEndpointService = new VpcEndpointService("fooVpcEndpointService", VpcEndpointServiceArgs.builder()
.acceptanceRequired(false)
.networkLoadBalancerArns(aws_lb.test().arn())
.build());
var fooVpcEndpointConnectionNotification = new VpcEndpointConnectionNotification("fooVpcEndpointConnectionNotification", VpcEndpointConnectionNotificationArgs.builder()
.vpcEndpointServiceId(fooVpcEndpointService.id())
.connectionNotificationArn(topicTopic.arn())
.connectionEvents(
"Accept",
"Reject")
.build());
}
}

Import

VPC Endpoint connection notifications can be imported using the VPC endpoint connection notification id, e.g.,

$ pulumi import aws:ec2/vpcEndpointConnectionNotification:VpcEndpointConnectionNotification foo vpce-nfn-09e6ed3b4efba2263

Constructors

Link copied to clipboard
constructor(connectionEvents: Output<List<String>>? = null, connectionNotificationArn: Output<String>? = null, vpcEndpointId: Output<String>? = null, vpcEndpointServiceId: Output<String>? = null)

Properties

Link copied to clipboard
val connectionEvents: Output<List<String>>? = null

One or more endpoint events for which to receive notifications.

Link copied to clipboard
val connectionNotificationArn: Output<String>? = null

The ARN of the SNS topic for the notifications.

Link copied to clipboard
val vpcEndpointId: Output<String>? = null

The ID of the VPC Endpoint to receive notifications for.

Link copied to clipboard
val vpcEndpointServiceId: Output<String>? = null

The ID of the VPC Endpoint Service to receive notifications for.

Functions

Link copied to clipboard
open override fun toJava(): VpcEndpointConnectionNotificationArgs