UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

132 lines 5.91 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** 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, Object.assign(Object.assign({}, 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 ? state.description : undefined; resourceInputs["dnsResourceRecords"] = state ? state.dnsResourceRecords : undefined; resourceInputs["domain"] = state ? state.domain : undefined; resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.domain === undefined) && !opts.urn) { throw new Error("Missing required property 'domain'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["domain"] = args ? args.domain : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["type"] = args ? args.type : undefined; 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