UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

85 lines 3.37 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.ServiceV3 = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a V3 Service resource within OpenStack Keystone. * * > **Note:** This usually requires admin privileges. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const service1 = new openstack.identity.ServiceV3("service_1", { * name: "custom", * type: "custom", * }); * ``` * * ## Import * * Services can be imported using the `id`, e.g. * * ```sh * $ pulumi import openstack:identity/serviceV3:ServiceV3 service_1 6688e967-158a-496f-a224-cae3414e6b61 * ``` */ class ServiceV3 extends pulumi.CustomResource { /** * Get an existing ServiceV3 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 ServiceV3(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ServiceV3. 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'] === ServiceV3.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["type"] = args ? args.type : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ServiceV3.__pulumiType, name, resourceInputs, opts); } } exports.ServiceV3 = ServiceV3; /** @internal */ ServiceV3.__pulumiType = 'openstack:identity/serviceV3:ServiceV3'; //# sourceMappingURL=serviceV3.js.map