UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

114 lines 4.99 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.VpcEndpointConnectionNotification = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a VPC Endpoint connection notification resource. * Connection notifications notify subscribers of VPC Endpoint events. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const topic = aws.iam.getPolicyDocument({ * statements: [{ * effect: "Allow", * principals: [{ * type: "Service", * identifiers: ["vpce.amazonaws.com"], * }], * actions: ["SNS:Publish"], * resources: ["arn:aws:sns:*:*:vpce-notification-topic"], * }], * }); * const topicTopic = new aws.sns.Topic("topic", { * name: "vpce-notification-topic", * policy: topic.then(topic => topic.json), * }); * const foo = new aws.ec2.VpcEndpointService("foo", { * acceptanceRequired: false, * networkLoadBalancerArns: [test.arn], * }); * const fooVpcEndpointConnectionNotification = new aws.ec2.VpcEndpointConnectionNotification("foo", { * vpcEndpointServiceId: foo.id, * connectionNotificationArn: topicTopic.arn, * connectionEvents: [ * "Accept", * "Reject", * ], * }); * ``` * * ## Import * * Using `pulumi import`, import VPC Endpoint connection notifications using the VPC endpoint connection notification `id`. For example: * * ```sh * $ pulumi import aws:ec2/vpcEndpointConnectionNotification:VpcEndpointConnectionNotification foo vpce-nfn-09e6ed3b4efba2263 * ``` */ class VpcEndpointConnectionNotification extends pulumi.CustomResource { /** * Get an existing VpcEndpointConnectionNotification resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new VpcEndpointConnectionNotification(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of VpcEndpointConnectionNotification. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === VpcEndpointConnectionNotification.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["connectionEvents"] = state?.connectionEvents; resourceInputs["connectionNotificationArn"] = state?.connectionNotificationArn; resourceInputs["notificationType"] = state?.notificationType; resourceInputs["region"] = state?.region; resourceInputs["state"] = state?.state; resourceInputs["vpcEndpointId"] = state?.vpcEndpointId; resourceInputs["vpcEndpointServiceId"] = state?.vpcEndpointServiceId; } else { const args = argsOrState; if (args?.connectionEvents === undefined && !opts.urn) { throw new Error("Missing required property 'connectionEvents'"); } if (args?.connectionNotificationArn === undefined && !opts.urn) { throw new Error("Missing required property 'connectionNotificationArn'"); } resourceInputs["connectionEvents"] = args?.connectionEvents; resourceInputs["connectionNotificationArn"] = args?.connectionNotificationArn; resourceInputs["region"] = args?.region; resourceInputs["vpcEndpointId"] = args?.vpcEndpointId; resourceInputs["vpcEndpointServiceId"] = args?.vpcEndpointServiceId; resourceInputs["notificationType"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VpcEndpointConnectionNotification.__pulumiType, name, resourceInputs, opts); } } exports.VpcEndpointConnectionNotification = VpcEndpointConnectionNotification; /** @internal */ VpcEndpointConnectionNotification.__pulumiType = 'aws:ec2/vpcEndpointConnectionNotification:VpcEndpointConnectionNotification'; //# sourceMappingURL=vpcEndpointConnectionNotification.js.map