VpcEndpointConnectionNotification

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

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var topic = new Aws.Sns.Topic("topic", new Aws.Sns.TopicArgs
        {
            Policy = @"{
    ""Version"":""2012-10-17"",
    ""Statement"":[{
        ""Effect"": ""Allow"",
        ""Principal"": {
            ""Service"": ""vpce.amazonaws.com""
        },
        ""Action"": ""SNS:Publish"",
        ""Resource"": ""arn:aws:sns:*:*:vpce-notification-topic""
    }]
}

",
        });
        var fooVpcEndpointService = new Aws.Ec2.VpcEndpointService("fooVpcEndpointService", new Aws.Ec2.VpcEndpointServiceArgs
        {
            AcceptanceRequired = false,
            NetworkLoadBalancerArns = 
            {
                aws_lb.Test.Arn,
            },
        });
        var fooVpcEndpointConnectionNotification = new Aws.Ec2.VpcEndpointConnectionNotification("fooVpcEndpointConnectionNotification", new Aws.Ec2.VpcEndpointConnectionNotificationArgs
        {
            ConnectionEvents = 
            {
                "Accept",
                "Reject",
            },
            ConnectionNotificationArn = topic.Arn,
            VpcEndpointServiceId = fooVpcEndpointService.Id,
        });
    }

}
package main

import (
    "fmt"

    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/sns"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        topic, err := sns.NewTopic(ctx, "topic", &sns.TopicArgs{
            Policy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "    \"Version\":\"2012-10-17\",\n", "    \"Statement\":[{\n", "        \"Effect\": \"Allow\",\n", "        \"Principal\": {\n", "            \"Service\": \"vpce.amazonaws.com\"\n", "        },\n", "        \"Action\": \"SNS:Publish\",\n", "        \"Resource\": \"arn:aws:sns:*:*:vpce-notification-topic\"\n", "    }]\n", "}\n", "\n")),
        })
        if err != nil {
            return err
        }
        fooVpcEndpointService, err := ec2.NewVpcEndpointService(ctx, "fooVpcEndpointService", &ec2.VpcEndpointServiceArgs{
            AcceptanceRequired: pulumi.Bool(false),
            NetworkLoadBalancerArns: pulumi.StringArray{
                pulumi.String(aws_lb.Test.Arn),
            },
        })
        if err != nil {
            return err
        }
        _, err = ec2.NewVpcEndpointConnectionNotification(ctx, "fooVpcEndpointConnectionNotification", &ec2.VpcEndpointConnectionNotificationArgs{
            ConnectionEvents: pulumi.StringArray{
                pulumi.String("Accept"),
                pulumi.String("Reject"),
            },
            ConnectionNotificationArn: topic.Arn,
            VpcEndpointServiceId:      fooVpcEndpointService.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

topic = aws.sns.Topic("topic", policy="""{
    "Version":"2012-10-17",
    "Statement":[{
        "Effect": "Allow",
        "Principal": {
            "Service": "vpce.amazonaws.com"
        },
        "Action": "SNS:Publish",
        "Resource": "arn:aws:sns:*:*:vpce-notification-topic"
    }]
}

""")
foo_vpc_endpoint_service = aws.ec2.VpcEndpointService("fooVpcEndpointService",
    acceptance_required=False,
    network_load_balancer_arns=[aws_lb["test"]["arn"]])
foo_vpc_endpoint_connection_notification = aws.ec2.VpcEndpointConnectionNotification("fooVpcEndpointConnectionNotification",
    connection_events=[
        "Accept",
        "Reject",
    ],
    connection_notification_arn=topic.arn,
    vpc_endpoint_service_id=foo_vpc_endpoint_service.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const topic = new aws.sns.Topic("topic", {
    policy: `{
    "Version":"2012-10-17",
    "Statement":[{
        "Effect": "Allow",
        "Principal": {
            "Service": "vpce.amazonaws.com"
        },
        "Action": "SNS:Publish",
        "Resource": "arn:aws:sns:*:*:vpce-notification-topic"
    }]
}
`,
});
const fooVpcEndpointService = new aws.ec2.VpcEndpointService("foo", {
    acceptanceRequired: false,
    networkLoadBalancerArns: [aws_lb_test.arn],
});
const fooVpcEndpointConnectionNotification = new aws.ec2.VpcEndpointConnectionNotification("foo", {
    connectionEvents: [
        "Accept",
        "Reject",
    ],
    connectionNotificationArn: topic.arn,
    vpcEndpointServiceId: fooVpcEndpointService.id,
});

Create a VpcEndpointConnectionNotification Resource

def VpcEndpointConnectionNotification(resource_name, opts=None, connection_events=None, connection_notification_arn=None, vpc_endpoint_id=None, vpc_endpoint_service_id=None, __props__=None);
name string
The unique name of the resource.
args VpcEndpointConnectionNotificationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VpcEndpointConnectionNotificationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VpcEndpointConnectionNotificationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VpcEndpointConnectionNotification Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The VpcEndpointConnectionNotification resource accepts the following input properties:

ConnectionEvents List<string>

One or more endpoint events for which to receive notifications.

ConnectionNotificationArn string

The ARN of the SNS topic for the notifications.

VpcEndpointId string

The ID of the VPC Endpoint to receive notifications for.

VpcEndpointServiceId string

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

ConnectionEvents []string

One or more endpoint events for which to receive notifications.

ConnectionNotificationArn string

The ARN of the SNS topic for the notifications.

VpcEndpointId string

The ID of the VPC Endpoint to receive notifications for.

VpcEndpointServiceId string

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

connectionEvents string[]

One or more endpoint events for which to receive notifications.

connectionNotificationArn string

The ARN of the SNS topic for the notifications.

vpcEndpointId string

The ID of the VPC Endpoint to receive notifications for.

vpcEndpointServiceId string

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

connection_events List[str]

One or more endpoint events for which to receive notifications.

connection_notification_arn str

The ARN of the SNS topic for the notifications.

vpc_endpoint_id str

The ID of the VPC Endpoint to receive notifications for.

vpc_endpoint_service_id str

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

Outputs

All input properties are implicitly available as output properties. Additionally, the VpcEndpointConnectionNotification resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
NotificationType string

The type of notification.

State string

The state of the notification.

Id string
The provider-assigned unique ID for this managed resource.
NotificationType string

The type of notification.

State string

The state of the notification.

id string
The provider-assigned unique ID for this managed resource.
notificationType string

The type of notification.

state string

The state of the notification.

id str
The provider-assigned unique ID for this managed resource.
notification_type str

The type of notification.

state str

The state of the notification.

Look up an Existing VpcEndpointConnectionNotification Resource

Get an existing VpcEndpointConnectionNotification resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, connection_events=None, connection_notification_arn=None, notification_type=None, state=None, vpc_endpoint_id=None, vpc_endpoint_service_id=None, __props__=None);
func GetVpcEndpointConnectionNotification(ctx *Context, name string, id IDInput, state *VpcEndpointConnectionNotificationState, opts ...ResourceOption) (*VpcEndpointConnectionNotification, error)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ConnectionEvents List<string>

One or more endpoint events for which to receive notifications.

ConnectionNotificationArn string

The ARN of the SNS topic for the notifications.

NotificationType string

The type of notification.

State string

The state of the notification.

VpcEndpointId string

The ID of the VPC Endpoint to receive notifications for.

VpcEndpointServiceId string

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

ConnectionEvents []string

One or more endpoint events for which to receive notifications.

ConnectionNotificationArn string

The ARN of the SNS topic for the notifications.

NotificationType string

The type of notification.

State string

The state of the notification.

VpcEndpointId string

The ID of the VPC Endpoint to receive notifications for.

VpcEndpointServiceId string

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

connectionEvents string[]

One or more endpoint events for which to receive notifications.

connectionNotificationArn string

The ARN of the SNS topic for the notifications.

notificationType string

The type of notification.

state string

The state of the notification.

vpcEndpointId string

The ID of the VPC Endpoint to receive notifications for.

vpcEndpointServiceId string

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

connection_events List[str]

One or more endpoint events for which to receive notifications.

connection_notification_arn str

The ARN of the SNS topic for the notifications.

notification_type str

The type of notification.

state str

The state of the notification.

vpc_endpoint_id str

The ID of the VPC Endpoint to receive notifications for.

vpc_endpoint_service_id str

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

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.