UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

103 lines 5.1 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.Router = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a V2 router resource within OpenStack. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const router1 = new openstack.networking.Router("router_1", { * name: "my_router", * adminStateUp: true, * externalNetworkId: "f67f0d72-0ddf-11e4-9d95-e1f29f417e2f", * }); * ``` * * ## Import * * Routers can be imported using the `id`, e.g. * * ```sh * $ pulumi import openstack:networking/router:Router router_1 014395cd-89fc-4c9b-96b7-13d1ee79dad2 * ``` */ class Router extends pulumi.CustomResource { /** * Get an existing Router 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 Router(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Router. 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'] === Router.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["adminStateUp"] = state ? state.adminStateUp : undefined; resourceInputs["allTags"] = state ? state.allTags : undefined; resourceInputs["availabilityZoneHints"] = state ? state.availabilityZoneHints : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["distributed"] = state ? state.distributed : undefined; resourceInputs["enableSnat"] = state ? state.enableSnat : undefined; resourceInputs["externalFixedIps"] = state ? state.externalFixedIps : undefined; resourceInputs["externalNetworkId"] = state ? state.externalNetworkId : undefined; resourceInputs["externalQosPolicyId"] = state ? state.externalQosPolicyId : undefined; resourceInputs["externalSubnetIds"] = state ? state.externalSubnetIds : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tenantId"] = state ? state.tenantId : undefined; resourceInputs["valueSpecs"] = state ? state.valueSpecs : undefined; resourceInputs["vendorOptions"] = state ? state.vendorOptions : undefined; } else { const args = argsOrState; resourceInputs["adminStateUp"] = args ? args.adminStateUp : undefined; resourceInputs["availabilityZoneHints"] = args ? args.availabilityZoneHints : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["distributed"] = args ? args.distributed : undefined; resourceInputs["enableSnat"] = args ? args.enableSnat : undefined; resourceInputs["externalFixedIps"] = args ? args.externalFixedIps : undefined; resourceInputs["externalNetworkId"] = args ? args.externalNetworkId : undefined; resourceInputs["externalQosPolicyId"] = args ? args.externalQosPolicyId : undefined; resourceInputs["externalSubnetIds"] = args ? args.externalSubnetIds : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["tenantId"] = args ? args.tenantId : undefined; resourceInputs["valueSpecs"] = args ? args.valueSpecs : undefined; resourceInputs["vendorOptions"] = args ? args.vendorOptions : undefined; resourceInputs["allTags"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Router.__pulumiType, name, resourceInputs, opts); } } exports.Router = Router; /** @internal */ Router.__pulumiType = 'openstack:networking/router:Router'; //# sourceMappingURL=router.js.map