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
new VpcEndpointConnectionNotification(name: string, args: VpcEndpointConnectionNotificationArgs, opts?: CustomResourceOptions);def VpcEndpointConnectionNotification(resource_name, opts=None, connection_events=None, connection_notification_arn=None, vpc_endpoint_id=None, vpc_endpoint_service_id=None, __props__=None);func NewVpcEndpointConnectionNotification(ctx *Context, name string, args VpcEndpointConnectionNotificationArgs, opts ...ResourceOption) (*VpcEndpointConnectionNotification, error)public VpcEndpointConnectionNotification(string name, VpcEndpointConnectionNotificationArgs args, CustomResourceOptions? opts = null)- 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:
- Connection
Events List<string> One or more endpoint events for which to receive notifications.
- Connection
Notification stringArn The ARN of the SNS topic for the notifications.
- Vpc
Endpoint stringId The ID of the VPC Endpoint to receive notifications for.
- Vpc
Endpoint stringService Id The ID of the VPC Endpoint Service to receive notifications for.
- Connection
Events []string One or more endpoint events for which to receive notifications.
- Connection
Notification stringArn The ARN of the SNS topic for the notifications.
- Vpc
Endpoint stringId The ID of the VPC Endpoint to receive notifications for.
- Vpc
Endpoint stringService Id The ID of the VPC Endpoint Service to receive notifications for.
- connection
Events string[] One or more endpoint events for which to receive notifications.
- connection
Notification stringArn The ARN of the SNS topic for the notifications.
- vpc
Endpoint stringId The ID of the VPC Endpoint to receive notifications for.
- vpc
Endpoint stringService Id 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_ strarn The ARN of the SNS topic for the notifications.
- vpc_
endpoint_ strid The ID of the VPC Endpoint to receive notifications for.
- vpc_
endpoint_ strservice_ id 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:
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.
public static get(name: string, id: Input<ID>, state?: VpcEndpointConnectionNotificationState, opts?: CustomResourceOptions): VpcEndpointConnectionNotificationstatic 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)public static VpcEndpointConnectionNotification Get(string name, Input<string> id, VpcEndpointConnectionNotificationState? state, CustomResourceOptions? opts = null)- 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:
- Connection
Events List<string> One or more endpoint events for which to receive notifications.
- Connection
Notification stringArn The ARN of the SNS topic for the notifications.
- Notification
Type string The type of notification.
- State string
The state of the notification.
- Vpc
Endpoint stringId The ID of the VPC Endpoint to receive notifications for.
- Vpc
Endpoint stringService Id The ID of the VPC Endpoint Service to receive notifications for.
- Connection
Events []string One or more endpoint events for which to receive notifications.
- Connection
Notification stringArn The ARN of the SNS topic for the notifications.
- Notification
Type string The type of notification.
- State string
The state of the notification.
- Vpc
Endpoint stringId The ID of the VPC Endpoint to receive notifications for.
- Vpc
Endpoint stringService Id The ID of the VPC Endpoint Service to receive notifications for.
- connection
Events string[] One or more endpoint events for which to receive notifications.
- connection
Notification stringArn The ARN of the SNS topic for the notifications.
- notification
Type string The type of notification.
- state string
The state of the notification.
- vpc
Endpoint stringId The ID of the VPC Endpoint to receive notifications for.
- vpc
Endpoint stringService Id 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_ strarn 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_ strid The ID of the VPC Endpoint to receive notifications for.
- vpc_
endpoint_ strservice_ id 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
awsTerraform Provider.