UNPKG

@pulumi/aws

Version:

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

82 lines 3.69 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.VpcEndpointRouteTableAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a VPC Endpoint Route Table Association * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2.VpcEndpointRouteTableAssociation("example", { * routeTableId: exampleAwsRouteTable.id, * vpcEndpointId: exampleAwsVpcEndpoint.id, * }); * ``` * * ## Import * * Using `pulumi import`, import VPC Endpoint Route Table Associations using `vpc_endpoint_id` together with `route_table_id`. For example: * * ```sh * $ pulumi import aws:ec2/vpcEndpointRouteTableAssociation:VpcEndpointRouteTableAssociation example vpce-aaaaaaaa/rtb-bbbbbbbb * ``` */ class VpcEndpointRouteTableAssociation extends pulumi.CustomResource { /** * Get an existing VpcEndpointRouteTableAssociation 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 VpcEndpointRouteTableAssociation(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of VpcEndpointRouteTableAssociation. 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'] === VpcEndpointRouteTableAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["routeTableId"] = state ? state.routeTableId : undefined; resourceInputs["vpcEndpointId"] = state ? state.vpcEndpointId : undefined; } else { const args = argsOrState; if ((!args || args.routeTableId === undefined) && !opts.urn) { throw new Error("Missing required property 'routeTableId'"); } if ((!args || args.vpcEndpointId === undefined) && !opts.urn) { throw new Error("Missing required property 'vpcEndpointId'"); } resourceInputs["region"] = args ? args.region : undefined; resourceInputs["routeTableId"] = args ? args.routeTableId : undefined; resourceInputs["vpcEndpointId"] = args ? args.vpcEndpointId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VpcEndpointRouteTableAssociation.__pulumiType, name, resourceInputs, opts); } } exports.VpcEndpointRouteTableAssociation = VpcEndpointRouteTableAssociation; /** @internal */ VpcEndpointRouteTableAssociation.__pulumiType = 'aws:ec2/vpcEndpointRouteTableAssociation:VpcEndpointRouteTableAssociation'; //# sourceMappingURL=vpcEndpointRouteTableAssociation.js.map