UNPKG

@pulumi/aws

Version:

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

155 lines 7.53 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.VpcIpamPool = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an IP address pool resource for IPAM. * * ## Example Usage * * Basic usage: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getRegion({}); * const example = new aws.ec2.VpcIpam("example", {operatingRegions: [{ * regionName: current.then(current => current.region), * }]}); * const exampleVpcIpamPool = new aws.ec2.VpcIpamPool("example", { * addressFamily: "ipv4", * ipamScopeId: example.privateDefaultScopeId, * locale: current.then(current => current.region), * }); * ``` * * Nested Pools: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getRegion({}); * const example = new aws.ec2.VpcIpam("example", {operatingRegions: [{ * regionName: current.then(current => current.region), * }]}); * const parent = new aws.ec2.VpcIpamPool("parent", { * addressFamily: "ipv4", * ipamScopeId: example.privateDefaultScopeId, * }); * const parentTest = new aws.ec2.VpcIpamPoolCidr("parent_test", { * ipamPoolId: parent.id, * cidr: "172.20.0.0/16", * }); * const child = new aws.ec2.VpcIpamPool("child", { * addressFamily: "ipv4", * ipamScopeId: example.privateDefaultScopeId, * locale: current.then(current => current.region), * sourceIpamPoolId: parent.id, * }); * const childTest = new aws.ec2.VpcIpamPoolCidr("child_test", { * ipamPoolId: child.id, * cidr: "172.20.0.0/24", * }); * ``` * * ## Import * * Using `pulumi import`, import IPAMs using the IPAM pool `id`. For example: * * ```sh * $ pulumi import aws:ec2/vpcIpamPool:VpcIpamPool example ipam-pool-0958f95207d978e1e * ``` */ class VpcIpamPool extends pulumi.CustomResource { /** * Get an existing VpcIpamPool 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 VpcIpamPool(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of VpcIpamPool. 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'] === VpcIpamPool.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["addressFamily"] = state ? state.addressFamily : undefined; resourceInputs["allocationDefaultNetmaskLength"] = state ? state.allocationDefaultNetmaskLength : undefined; resourceInputs["allocationMaxNetmaskLength"] = state ? state.allocationMaxNetmaskLength : undefined; resourceInputs["allocationMinNetmaskLength"] = state ? state.allocationMinNetmaskLength : undefined; resourceInputs["allocationResourceTags"] = state ? state.allocationResourceTags : undefined; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["autoImport"] = state ? state.autoImport : undefined; resourceInputs["awsService"] = state ? state.awsService : undefined; resourceInputs["cascade"] = state ? state.cascade : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["ipamScopeId"] = state ? state.ipamScopeId : undefined; resourceInputs["ipamScopeType"] = state ? state.ipamScopeType : undefined; resourceInputs["locale"] = state ? state.locale : undefined; resourceInputs["poolDepth"] = state ? state.poolDepth : undefined; resourceInputs["publicIpSource"] = state ? state.publicIpSource : undefined; resourceInputs["publiclyAdvertisable"] = state ? state.publiclyAdvertisable : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["sourceIpamPoolId"] = state ? state.sourceIpamPoolId : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; } else { const args = argsOrState; if ((!args || args.addressFamily === undefined) && !opts.urn) { throw new Error("Missing required property 'addressFamily'"); } if ((!args || args.ipamScopeId === undefined) && !opts.urn) { throw new Error("Missing required property 'ipamScopeId'"); } resourceInputs["addressFamily"] = args ? args.addressFamily : undefined; resourceInputs["allocationDefaultNetmaskLength"] = args ? args.allocationDefaultNetmaskLength : undefined; resourceInputs["allocationMaxNetmaskLength"] = args ? args.allocationMaxNetmaskLength : undefined; resourceInputs["allocationMinNetmaskLength"] = args ? args.allocationMinNetmaskLength : undefined; resourceInputs["allocationResourceTags"] = args ? args.allocationResourceTags : undefined; resourceInputs["autoImport"] = args ? args.autoImport : undefined; resourceInputs["awsService"] = args ? args.awsService : undefined; resourceInputs["cascade"] = args ? args.cascade : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["ipamScopeId"] = args ? args.ipamScopeId : undefined; resourceInputs["locale"] = args ? args.locale : undefined; resourceInputs["publicIpSource"] = args ? args.publicIpSource : undefined; resourceInputs["publiclyAdvertisable"] = args ? args.publiclyAdvertisable : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["sourceIpamPoolId"] = args ? args.sourceIpamPoolId : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["ipamScopeType"] = undefined /*out*/; resourceInputs["poolDepth"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VpcIpamPool.__pulumiType, name, resourceInputs, opts); } } exports.VpcIpamPool = VpcIpamPool; /** @internal */ VpcIpamPool.__pulumiType = 'aws:ec2/vpcIpamPool:VpcIpamPool'; //# sourceMappingURL=vpcIpamPool.js.map