UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

91 lines 3.62 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.ZoneShareV2 = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages the sharing of a DNS zone in the OpenStack DNS Service. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const example = new openstack.dns.ZoneShareV2("example", { * zoneId: "00000000-0000-0000-0000-000000000000", * targetProjectId: "11111111-1111-1111-1111-111111111111", * projectId: "22222222-2222-2222-2222-222222222222", * }); * ``` * * ## Import * * DNS zone share can be imported by specifying the zone ID with share ID and optional project ID: * * bash * * ```sh * $ pulumi import openstack:dns/zoneShareV2:ZoneShareV2 share_1 60cbdc69-64f9-49ee-b294-352e71e22827/0e1dae51-aee2-4b44-962f-885bb69f3a5c * ``` * * ```sh * $ pulumi import openstack:dns/zoneShareV2:ZoneShareV2 share_1 60cbdc69-64f9-49ee-b294-352e71e22827/0e1dae51-aee2-4b44-962f-885bb69f3a5c/eb92139f6c054a878852ac9e8cbe612a * ``` */ class ZoneShareV2 extends pulumi.CustomResource { /** * Get an existing ZoneShareV2 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 ZoneShareV2(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ZoneShareV2. 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'] === ZoneShareV2.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["projectId"] = state?.projectId; resourceInputs["region"] = state?.region; resourceInputs["targetProjectId"] = state?.targetProjectId; resourceInputs["zoneId"] = state?.zoneId; } else { const args = argsOrState; if (args?.targetProjectId === undefined && !opts.urn) { throw new Error("Missing required property 'targetProjectId'"); } if (args?.zoneId === undefined && !opts.urn) { throw new Error("Missing required property 'zoneId'"); } resourceInputs["projectId"] = args?.projectId; resourceInputs["region"] = args?.region; resourceInputs["targetProjectId"] = args?.targetProjectId; resourceInputs["zoneId"] = args?.zoneId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ZoneShareV2.__pulumiType, name, resourceInputs, opts); } } exports.ZoneShareV2 = ZoneShareV2; /** @internal */ ZoneShareV2.__pulumiType = 'openstack:dns/zoneShareV2:ZoneShareV2'; //# sourceMappingURL=zoneShareV2.js.map