"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.Subnet = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Specifies a subnet for the specified VPC.
 *  For an IPv4 only subnet, specify an IPv4 CIDR block. If the VPC has an IPv6 CIDR block, you can create an IPv6 only subnet or a dual stack subnet instead. For an IPv6 only subnet, specify an IPv6 CIDR block. For a dual stack subnet, specify both an IPv4 CIDR block and an IPv6 CIDR block.
 *  For more information, see [Subnets for your VPC](https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html) in the *Amazon VPC User Guide*.
 */
class Subnet extends pulumi.CustomResource {
    /**
     * Get an existing Subnet 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 Subnet(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Subnet.  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'] === Subnet.__pulumiType;
    }
    /**
     * Create a Subnet 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) {
            if ((!args || args.vpcId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'vpcId'");
            }
            resourceInputs["assignIpv6AddressOnCreation"] = args ? args.assignIpv6AddressOnCreation : undefined;
            resourceInputs["availabilityZone"] = args ? args.availabilityZone : undefined;
            resourceInputs["availabilityZoneId"] = args ? args.availabilityZoneId : undefined;
            resourceInputs["cidrBlock"] = args ? args.cidrBlock : undefined;
            resourceInputs["enableDns64"] = args ? args.enableDns64 : undefined;
            resourceInputs["enableLniAtDeviceIndex"] = args ? args.enableLniAtDeviceIndex : undefined;
            resourceInputs["ipv4IpamPoolId"] = args ? args.ipv4IpamPoolId : undefined;
            resourceInputs["ipv4NetmaskLength"] = args ? args.ipv4NetmaskLength : undefined;
            resourceInputs["ipv6CidrBlock"] = args ? args.ipv6CidrBlock : undefined;
            resourceInputs["ipv6IpamPoolId"] = args ? args.ipv6IpamPoolId : undefined;
            resourceInputs["ipv6Native"] = args ? args.ipv6Native : undefined;
            resourceInputs["ipv6NetmaskLength"] = args ? args.ipv6NetmaskLength : undefined;
            resourceInputs["mapPublicIpOnLaunch"] = args ? args.mapPublicIpOnLaunch : undefined;
            resourceInputs["outpostArn"] = args ? args.outpostArn : undefined;
            resourceInputs["privateDnsNameOptionsOnLaunch"] = args ? args.privateDnsNameOptionsOnLaunch : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["vpcId"] = args ? args.vpcId : undefined;
            resourceInputs["blockPublicAccessStates"] = undefined /*out*/;
            resourceInputs["ipv6CidrBlocks"] = undefined /*out*/;
            resourceInputs["networkAclAssociationId"] = undefined /*out*/;
            resourceInputs["subnetId"] = undefined /*out*/;
        }
        else {
            resourceInputs["assignIpv6AddressOnCreation"] = undefined /*out*/;
            resourceInputs["availabilityZone"] = undefined /*out*/;
            resourceInputs["availabilityZoneId"] = undefined /*out*/;
            resourceInputs["blockPublicAccessStates"] = undefined /*out*/;
            resourceInputs["cidrBlock"] = undefined /*out*/;
            resourceInputs["enableDns64"] = undefined /*out*/;
            resourceInputs["enableLniAtDeviceIndex"] = undefined /*out*/;
            resourceInputs["ipv4IpamPoolId"] = undefined /*out*/;
            resourceInputs["ipv4NetmaskLength"] = undefined /*out*/;
            resourceInputs["ipv6CidrBlock"] = undefined /*out*/;
            resourceInputs["ipv6CidrBlocks"] = undefined /*out*/;
            resourceInputs["ipv6IpamPoolId"] = undefined /*out*/;
            resourceInputs["ipv6Native"] = undefined /*out*/;
            resourceInputs["ipv6NetmaskLength"] = undefined /*out*/;
            resourceInputs["mapPublicIpOnLaunch"] = undefined /*out*/;
            resourceInputs["networkAclAssociationId"] = undefined /*out*/;
            resourceInputs["outpostArn"] = undefined /*out*/;
            resourceInputs["privateDnsNameOptionsOnLaunch"] = undefined /*out*/;
            resourceInputs["subnetId"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
            resourceInputs["vpcId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["availabilityZone", "availabilityZoneId", "cidrBlock", "ipv4IpamPoolId", "ipv4NetmaskLength", "ipv6IpamPoolId", "ipv6Native", "ipv6NetmaskLength", "outpostArn", "vpcId"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(Subnet.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Subnet = Subnet;
/** @internal */
Subnet.__pulumiType = 'aws-native:ec2:Subnet';
//# sourceMappingURL=subnet.js.map