UNPKG

@pulumi/aws

Version:

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

108 lines 4.97 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.VpcEndpointAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a firewall endpoint for an AWS Network Firewall firewall. * * Use `aws.networkfirewall.VpcEndpointAssociation` to establish new firewall endpoints in any Availability Zone where the firewall is already being used. The first use of a firewall in an Availability Zone must be defined by `aws.networkfirewall.Firewall` resource and `subnetMapping` argument. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkfirewall.VpcEndpointAssociation("example", { * firewallArn: exampleAwsNetworkfirewallFirewall.arn, * vpcId: exampleAwsVpc.id, * subnetMapping: { * subnetId: exampleTwo.id, * }, * tags: { * Name: "example endpoint", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Network Firewall VPC Endpoint Association using the `vpc_endpoint_association_arn`. For example: * * ```sh * $ pulumi import aws:networkfirewall/vpcEndpointAssociation:VpcEndpointAssociation example arn:aws:network-firewall:us-west-1:123456789012:vpc-endpoint-association/example * ``` */ class VpcEndpointAssociation extends pulumi.CustomResource { /** * Get an existing VpcEndpointAssociation 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 VpcEndpointAssociation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of VpcEndpointAssociation. 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'] === VpcEndpointAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state?.description; resourceInputs["firewallArn"] = state?.firewallArn; resourceInputs["region"] = state?.region; resourceInputs["subnetMapping"] = state?.subnetMapping; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeouts"] = state?.timeouts; resourceInputs["vpcEndpointAssociationArn"] = state?.vpcEndpointAssociationArn; resourceInputs["vpcEndpointAssociationId"] = state?.vpcEndpointAssociationId; resourceInputs["vpcEndpointAssociationStatuses"] = state?.vpcEndpointAssociationStatuses; resourceInputs["vpcId"] = state?.vpcId; } else { const args = argsOrState; if (args?.firewallArn === undefined && !opts.urn) { throw new Error("Missing required property 'firewallArn'"); } if (args?.vpcId === undefined && !opts.urn) { throw new Error("Missing required property 'vpcId'"); } resourceInputs["description"] = args?.description; resourceInputs["firewallArn"] = args?.firewallArn; resourceInputs["region"] = args?.region; resourceInputs["subnetMapping"] = args?.subnetMapping; resourceInputs["tags"] = args?.tags; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["vpcId"] = args?.vpcId; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["vpcEndpointAssociationArn"] = undefined /*out*/; resourceInputs["vpcEndpointAssociationId"] = undefined /*out*/; resourceInputs["vpcEndpointAssociationStatuses"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VpcEndpointAssociation.__pulumiType, name, resourceInputs, opts); } } exports.VpcEndpointAssociation = VpcEndpointAssociation; /** @internal */ VpcEndpointAssociation.__pulumiType = 'aws:networkfirewall/vpcEndpointAssociation:VpcEndpointAssociation'; //# sourceMappingURL=vpcEndpointAssociation.js.map