"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.DnsAuthorization = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * DnsAuthorization represents a HTTP-reachable backend for a DnsAuthorization.
 *
 * ## Example Usage
 *
 * ### Certificate Manager Dns Authorization Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = new gcp.certificatemanager.DnsAuthorization("default", {
 *     name: "dns-auth",
 *     location: "global",
 *     description: "The default dns",
 *     domain: "subdomain.hashicorptest.com",
 * });
 * export const recordNameToInsert = _default.dnsResourceRecords.apply(dnsResourceRecords => dnsResourceRecords[0].name);
 * export const recordTypeToInsert = _default.dnsResourceRecords.apply(dnsResourceRecords => dnsResourceRecords[0].type);
 * export const recordDataToInsert = _default.dnsResourceRecords.apply(dnsResourceRecords => dnsResourceRecords[0].data);
 * ```
 * ### Certificate Manager Dns Authorization Regional
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = new gcp.certificatemanager.DnsAuthorization("default", {
 *     name: "dns-auth",
 *     location: "us-central1",
 *     description: "reginal dns",
 *     type: "PER_PROJECT_RECORD",
 *     domain: "subdomain.hashicorptest.com",
 * });
 * ```
 *
 * ## Import
 *
 * DnsAuthorization can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/dnsAuthorizations/{{name}}`
 *
 * * `{{project}}/{{location}}/{{name}}`
 *
 * * `{{location}}/{{name}}`
 *
 * When using the `pulumi import` command, DnsAuthorization can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:certificatemanager/dnsAuthorization:DnsAuthorization default projects/{{project}}/locations/{{location}}/dnsAuthorizations/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:certificatemanager/dnsAuthorization:DnsAuthorization default {{project}}/{{location}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:certificatemanager/dnsAuthorization:DnsAuthorization default {{location}}/{{name}}
 * ```
 */
class DnsAuthorization extends pulumi.CustomResource {
    /**
     * Get an existing DnsAuthorization 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 DnsAuthorization(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of DnsAuthorization.  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'] === DnsAuthorization.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["description"] = state?.description;
            resourceInputs["dnsResourceRecords"] = state?.dnsResourceRecords;
            resourceInputs["domain"] = state?.domain;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["type"] = state?.type;
        }
        else {
            const args = argsOrState;
            if (args?.domain === undefined && !opts.urn) {
                throw new Error("Missing required property 'domain'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["domain"] = args?.domain;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["type"] = args?.type;
            resourceInputs["dnsResourceRecords"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(DnsAuthorization.__pulumiType, name, resourceInputs, opts);
    }
}
exports.DnsAuthorization = DnsAuthorization;
/** @internal */
DnsAuthorization.__pulumiType = 'gcp:certificatemanager/dnsAuthorization:DnsAuthorization';
//# sourceMappingURL=dnsAuthorization.js.map