"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.HostedZone = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Creates a new public or private hosted zone. You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
 *   You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.
 *   For more information about charges for hosted zones, see [Amazon Route 53 Pricing](https://docs.aws.amazon.com/route53/pricing/).
 *  Note the following:
 *   +  You can't create a hosted zone for a top-level domain (TLD) such as .com.
 *   +  If your domain is registered with a registrar other than Route 53, you must update the name servers with your registrar to make Route 53 the DNS service for the domain. For more information, see [Migrating DNS Service for an Existing Domain to Amazon Route 53](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html) in the *Amazon Route 53 Developer Guide*.
 *
 *  When you submit a ``CreateHostedZone`` request, the initial status of the hosted zone is ``PENDING``. For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to ``INSYNC``.
 *  The ``CreateHostedZone`` request requires the caller to have an ``ec2:DescribeVpcs`` permission.
 *   When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS-Regions. Each AWS-account is scoped to one partition.
 *  The following are the supported partitions:
 *   +  ``aws`` - AWS-Regions
 *   +  ``aws-cn`` - China Regions
 *   +  ``aws-us-gov`` - govcloud-us-region
 *
 *  For more information, see [Access Management](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the *General Reference*.
 */
class HostedZone extends pulumi.CustomResource {
    /**
     * Get an existing HostedZone 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 HostedZone(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of HostedZone.  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'] === HostedZone.__pulumiType;
    }
    /**
     * Create a HostedZone 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["hostedZoneConfig"] = args ? args.hostedZoneConfig : undefined;
            resourceInputs["hostedZoneTags"] = args ? args.hostedZoneTags : undefined;
            resourceInputs["name"] = args ? args.name : undefined;
            resourceInputs["queryLoggingConfig"] = args ? args.queryLoggingConfig : undefined;
            resourceInputs["vpcs"] = args ? args.vpcs : undefined;
            resourceInputs["awsId"] = undefined /*out*/;
            resourceInputs["nameServers"] = undefined /*out*/;
        }
        else {
            resourceInputs["awsId"] = undefined /*out*/;
            resourceInputs["hostedZoneConfig"] = undefined /*out*/;
            resourceInputs["hostedZoneTags"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["nameServers"] = undefined /*out*/;
            resourceInputs["queryLoggingConfig"] = undefined /*out*/;
            resourceInputs["vpcs"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["name"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(HostedZone.__pulumiType, name, resourceInputs, opts);
    }
}
exports.HostedZone = HostedZone;
/** @internal */
HostedZone.__pulumiType = 'aws-native:route53:HostedZone';
//# sourceMappingURL=hostedZone.js.map