UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

93 lines 3.49 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.FlavorV2 = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a V2 load balancer flavor resource within OpenStack. * * > **Note:** This usually requires admin privileges. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const fp1 = new openstack.loadbalancer.FlavorprofileV2("fp_1", { * name: "test", * providerName: "amphora", * flavorData: JSON.stringify({ * loadbalancer_topology: "ACTIVE_STANDBY", * }), * }); * const flavor1 = new openstack.loadbalancer.FlavorV2("flavor_1", { * name: "test", * description: "This is a test flavor", * flavorProfileId: fp1.id, * }); * ``` * * ## Import * * flavors can be imported using their `id`. Example: * * ```sh * $ pulumi import openstack:loadbalancer/flavorV2:FlavorV2 flavor_1 2a0f2240-c5e6-41de-896d-e80d97428d6b * ``` */ class FlavorV2 extends pulumi.CustomResource { /** * Get an existing FlavorV2 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 FlavorV2(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of FlavorV2. 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'] === FlavorV2.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state?.description; resourceInputs["enabled"] = state?.enabled; resourceInputs["flavorProfileId"] = state?.flavorProfileId; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.flavorProfileId === undefined && !opts.urn) { throw new Error("Missing required property 'flavorProfileId'"); } resourceInputs["description"] = args?.description; resourceInputs["enabled"] = args?.enabled; resourceInputs["flavorProfileId"] = args?.flavorProfileId; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FlavorV2.__pulumiType, name, resourceInputs, opts); } } exports.FlavorV2 = FlavorV2; /** @internal */ FlavorV2.__pulumiType = 'openstack:loadbalancer/flavorV2:FlavorV2'; //# sourceMappingURL=flavorV2.js.map