UNPKG

@pulumi/aws

Version:

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

93 lines 3.83 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.VpcIpamPreviewNextCidr = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Previews a CIDR from an IPAM address pool. Only works for private IPv4. * * ## Example Usage * * Basic usage: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getRegion({}); * const exampleVpcIpam = new aws.ec2.VpcIpam("example", {operatingRegions: [{ * regionName: current.then(current => current.region), * }]}); * const exampleVpcIpamPool = new aws.ec2.VpcIpamPool("example", { * addressFamily: "ipv4", * ipamScopeId: exampleVpcIpam.privateDefaultScopeId, * locale: current.then(current => current.region), * }); * const exampleVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr("example", { * ipamPoolId: exampleVpcIpamPool.id, * cidr: "172.20.0.0/16", * }); * const example = new aws.ec2.VpcIpamPreviewNextCidr("example", { * ipamPoolId: exampleVpcIpamPool.id, * netmaskLength: 28, * disallowedCidrs: ["172.2.0.0/32"], * }, { * dependsOn: [exampleVpcIpamPoolCidr], * }); * ``` */ class VpcIpamPreviewNextCidr extends pulumi.CustomResource { /** * Get an existing VpcIpamPreviewNextCidr 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 VpcIpamPreviewNextCidr(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of VpcIpamPreviewNextCidr. 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'] === VpcIpamPreviewNextCidr.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["cidr"] = state?.cidr; resourceInputs["disallowedCidrs"] = state?.disallowedCidrs; resourceInputs["ipamPoolId"] = state?.ipamPoolId; resourceInputs["netmaskLength"] = state?.netmaskLength; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.ipamPoolId === undefined && !opts.urn) { throw new Error("Missing required property 'ipamPoolId'"); } resourceInputs["disallowedCidrs"] = args?.disallowedCidrs; resourceInputs["ipamPoolId"] = args?.ipamPoolId; resourceInputs["netmaskLength"] = args?.netmaskLength; resourceInputs["region"] = args?.region; resourceInputs["cidr"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VpcIpamPreviewNextCidr.__pulumiType, name, resourceInputs, opts); } } exports.VpcIpamPreviewNextCidr = VpcIpamPreviewNextCidr; /** @internal */ VpcIpamPreviewNextCidr.__pulumiType = 'aws:ec2/vpcIpamPreviewNextCidr:VpcIpamPreviewNextCidr'; //# sourceMappingURL=vpcIpamPreviewNextCidr.js.map