UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

103 lines 4.4 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.EndpointV3 = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a V3 Endpoint 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: "my-service", * type: "my-service-type", * }); * const endpoint1 = new openstack.identity.EndpointV3("endpoint_1", { * name: "my-endpoint", * serviceId: service1.id, * endpointRegion: service1.region, * url: "http://my-endpoint", * }); * ``` * * ## Import * * Endpoints can be imported using the `id`, e.g. * * ```sh * $ pulumi import openstack:identity/endpointV3:EndpointV3 endpoint_1 5392472b-106a-4845-90c6-7c8445f18770 * ``` */ class EndpointV3 extends pulumi.CustomResource { /** * Get an existing EndpointV3 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 EndpointV3(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of EndpointV3. 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'] === EndpointV3.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["endpointRegion"] = state ? state.endpointRegion : undefined; resourceInputs["interface"] = state ? state.interface : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["serviceId"] = state ? state.serviceId : undefined; resourceInputs["serviceName"] = state ? state.serviceName : undefined; resourceInputs["serviceType"] = state ? state.serviceType : undefined; resourceInputs["url"] = state ? state.url : undefined; } else { const args = argsOrState; if ((!args || args.endpointRegion === undefined) && !opts.urn) { throw new Error("Missing required property 'endpointRegion'"); } if ((!args || args.serviceId === undefined) && !opts.urn) { throw new Error("Missing required property 'serviceId'"); } if ((!args || args.url === undefined) && !opts.urn) { throw new Error("Missing required property 'url'"); } resourceInputs["endpointRegion"] = args ? args.endpointRegion : undefined; resourceInputs["interface"] = args ? args.interface : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["serviceId"] = args ? args.serviceId : undefined; resourceInputs["url"] = args ? args.url : undefined; resourceInputs["serviceName"] = undefined /*out*/; resourceInputs["serviceType"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EndpointV3.__pulumiType, name, resourceInputs, opts); } } exports.EndpointV3 = EndpointV3; /** @internal */ EndpointV3.__pulumiType = 'openstack:identity/endpointV3:EndpointV3'; //# sourceMappingURL=endpointV3.js.map