UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

82 lines 4.27 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.Vpc = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Specifies a virtual private cloud (VPC). * To add an IPv6 CIDR block to the VPC, see [AWS::EC2::VPCCidrBlock](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html). * For more information, see [Virtual private clouds (VPC)](https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html) in the *Amazon VPC User Guide*. */ class Vpc extends pulumi.CustomResource { /** * Get an existing Vpc 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new Vpc(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Vpc. 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'] === Vpc.__pulumiType; } /** * Create a Vpc resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { resourceInputs["cidrBlock"] = args ? args.cidrBlock : undefined; resourceInputs["enableDnsHostnames"] = args ? args.enableDnsHostnames : undefined; resourceInputs["enableDnsSupport"] = args ? args.enableDnsSupport : undefined; resourceInputs["instanceTenancy"] = args ? args.instanceTenancy : undefined; resourceInputs["ipv4IpamPoolId"] = args ? args.ipv4IpamPoolId : undefined; resourceInputs["ipv4NetmaskLength"] = args ? args.ipv4NetmaskLength : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["cidrBlockAssociations"] = undefined /*out*/; resourceInputs["defaultNetworkAcl"] = undefined /*out*/; resourceInputs["defaultSecurityGroup"] = undefined /*out*/; resourceInputs["ipv6CidrBlocks"] = undefined /*out*/; resourceInputs["vpcId"] = undefined /*out*/; } else { resourceInputs["cidrBlock"] = undefined /*out*/; resourceInputs["cidrBlockAssociations"] = undefined /*out*/; resourceInputs["defaultNetworkAcl"] = undefined /*out*/; resourceInputs["defaultSecurityGroup"] = undefined /*out*/; resourceInputs["enableDnsHostnames"] = undefined /*out*/; resourceInputs["enableDnsSupport"] = undefined /*out*/; resourceInputs["instanceTenancy"] = undefined /*out*/; resourceInputs["ipv4IpamPoolId"] = undefined /*out*/; resourceInputs["ipv4NetmaskLength"] = undefined /*out*/; resourceInputs["ipv6CidrBlocks"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; resourceInputs["vpcId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["cidrBlock", "ipv4IpamPoolId", "ipv4NetmaskLength"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(Vpc.__pulumiType, name, resourceInputs, opts); } } exports.Vpc = Vpc; /** @internal */ Vpc.__pulumiType = 'aws-native:ec2:Vpc'; //# sourceMappingURL=vpc.js.map