UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

96 lines 4.28 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.Service = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a V2 Neutron VPN service resource within OpenStack. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const service1 = new openstack.vpnaas.Service("service_1", { * name: "my_service", * routerId: "14a75700-fc03-4602-9294-26ee44f366b3", * adminStateUp: true, * }); * ``` * * ## Import * * Services can be imported using the `id`, e.g. * * ```sh * $ pulumi import openstack:vpnaas/service:Service service_1 832cb7f3-59fe-40cf-8f64-8350ffc03272 * ``` */ class Service extends pulumi.CustomResource { /** * Get an existing Service 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 Service(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Service. 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'] === Service.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["adminStateUp"] = state ? state.adminStateUp : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["externalV4Ip"] = state ? state.externalV4Ip : undefined; resourceInputs["externalV6Ip"] = state ? state.externalV6Ip : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["routerId"] = state ? state.routerId : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["subnetId"] = state ? state.subnetId : undefined; resourceInputs["tenantId"] = state ? state.tenantId : undefined; resourceInputs["valueSpecs"] = state ? state.valueSpecs : undefined; } else { const args = argsOrState; if ((!args || args.routerId === undefined) && !opts.urn) { throw new Error("Missing required property 'routerId'"); } resourceInputs["adminStateUp"] = args ? args.adminStateUp : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["routerId"] = args ? args.routerId : undefined; resourceInputs["subnetId"] = args ? args.subnetId : undefined; resourceInputs["tenantId"] = args ? args.tenantId : undefined; resourceInputs["valueSpecs"] = args ? args.valueSpecs : undefined; resourceInputs["externalV4Ip"] = undefined /*out*/; resourceInputs["externalV6Ip"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Service.__pulumiType, name, resourceInputs, opts); } } exports.Service = Service; /** @internal */ Service.__pulumiType = 'openstack:vpnaas/service:Service'; //# sourceMappingURL=service.js.map