UNPKG

@pulumi/aws

Version:

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

137 lines 5.1 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.ResourceGateway = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS VPC Lattice Resource Gateway. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.vpclattice.ResourceGateway("example", { * name: "Example", * vpcId: exampleAwsVpc.id, * subnetIds: [exampleAwsSubnet.id], * tags: { * Environment: "Example", * }, * }); * ``` * * ### Specifying IP address type * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.vpclattice.ResourceGateway("example", { * name: "Example", * vpcId: exampleAwsVpc.id, * subnetIds: [exampleAwsSubnet.id], * ipAddressType: "DUALSTACK", * tags: { * Environment: "Example", * }, * }); * ``` * * ### With security groups * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.vpclattice.ResourceGateway("example", { * name: "Example", * vpcId: exampleAwsVpc.id, * securityGroupIds: [test.id], * subnetIds: [exampleAwsSubnet.id], * }); * ``` * * ## Import * * Using `pulumi import`, import VPC Lattice Resource Gateway using the `id`. For example: * * ```sh * $ pulumi import aws:vpclattice/resourceGateway:ResourceGateway example rgw-0a1b2c3d4e5f * ``` */ class ResourceGateway extends pulumi.CustomResource { /** * Get an existing ResourceGateway 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 ResourceGateway(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ResourceGateway. 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'] === ResourceGateway.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["ipAddressType"] = state?.ipAddressType; resourceInputs["ipv4AddressesPerEni"] = state?.ipv4AddressesPerEni; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["securityGroupIds"] = state?.securityGroupIds; resourceInputs["status"] = state?.status; resourceInputs["subnetIds"] = state?.subnetIds; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeouts"] = state?.timeouts; resourceInputs["vpcId"] = state?.vpcId; } else { const args = argsOrState; if (args?.subnetIds === undefined && !opts.urn) { throw new Error("Missing required property 'subnetIds'"); } if (args?.vpcId === undefined && !opts.urn) { throw new Error("Missing required property 'vpcId'"); } resourceInputs["ipAddressType"] = args?.ipAddressType; resourceInputs["ipv4AddressesPerEni"] = args?.ipv4AddressesPerEni; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["securityGroupIds"] = args?.securityGroupIds; resourceInputs["subnetIds"] = args?.subnetIds; resourceInputs["tags"] = args?.tags; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["vpcId"] = args?.vpcId; resourceInputs["arn"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ResourceGateway.__pulumiType, name, resourceInputs, opts); } } exports.ResourceGateway = ResourceGateway; /** @internal */ ResourceGateway.__pulumiType = 'aws:vpclattice/resourceGateway:ResourceGateway'; //# sourceMappingURL=resourceGateway.js.map