UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

101 lines 3.8 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.Zone = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a DNS zone in the OpenStack DNS Service. * * ## Example Usage * * ### Automatically detect the correct network * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const exampleCom = new openstack.dns.Zone("example_com", { * name: "example.com.", * email: "jdoe@example.com", * description: "An example zone", * ttl: 3000, * type: "PRIMARY", * }); * ``` * * ## Import * * This resource can be imported by specifying the zone ID with optional project ID: * * ```sh * $ pulumi import openstack:dns/zone:Zone zone_1 zone_id * ``` * * ```sh * $ pulumi import openstack:dns/zone:Zone zone_1 zone_id/project_id * ``` */ class Zone extends pulumi.CustomResource { /** * Get an existing Zone 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 Zone(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Zone. 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'] === Zone.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["attributes"] = state?.attributes; resourceInputs["description"] = state?.description; resourceInputs["disableStatusCheck"] = state?.disableStatusCheck; resourceInputs["email"] = state?.email; resourceInputs["masters"] = state?.masters; resourceInputs["name"] = state?.name; resourceInputs["projectId"] = state?.projectId; resourceInputs["region"] = state?.region; resourceInputs["ttl"] = state?.ttl; resourceInputs["type"] = state?.type; resourceInputs["valueSpecs"] = state?.valueSpecs; } else { const args = argsOrState; resourceInputs["attributes"] = args?.attributes; resourceInputs["description"] = args?.description; resourceInputs["disableStatusCheck"] = args?.disableStatusCheck; resourceInputs["email"] = args?.email; resourceInputs["masters"] = args?.masters; resourceInputs["name"] = args?.name; resourceInputs["projectId"] = args?.projectId; resourceInputs["region"] = args?.region; resourceInputs["ttl"] = args?.ttl; resourceInputs["type"] = args?.type; resourceInputs["valueSpecs"] = args?.valueSpecs; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Zone.__pulumiType, name, resourceInputs, opts); } } exports.Zone = Zone; /** @internal */ Zone.__pulumiType = 'openstack:dns/zone:Zone'; //# sourceMappingURL=zone.js.map