UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

109 lines 4.64 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.LbFlavorprofileV2 = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages a V2 load balancer flavorprofile resource within OpenStack. * * > **Note:** This usually requires admin privileges. * * ## Example Usage * * ### Using jsonencode * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const flavorprofile1 = new openstack.loadbalancer.FlavorprofileV2("flavorprofile_1", { * name: "amphora-single-profile", * providerName: "amphora", * flavorData: JSON.stringify({ * loadbalancer_topology: "SINGLE", * }), * }); * ``` * * ### Using plain string * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const flavorprofile1 = new openstack.loadbalancer.FlavorprofileV2("flavorprofile_1", { * name: "amphora-single-profile", * providerName: "amphora", * flavorData: "{\"loadbalancer_topology\": \"SINGLE\"}", * }); * ``` * * ## Import * * flavorprofiles can be imported using their `id`. Example: * * ```sh * $ pulumi import openstack:index/lbFlavorprofileV2:LbFlavorprofileV2 flavorprofile_1 2a0f2240-c5e6-41de-896d-e80d97428d6b * ``` * * @deprecated openstack.index/lbflavorprofilev2.LbFlavorprofileV2 has been deprecated in favor of openstack.loadbalancer/flavorprofilev2.FlavorprofileV2 */ class LbFlavorprofileV2 extends pulumi.CustomResource { /** * Get an existing LbFlavorprofileV2 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) { pulumi.log.warn("LbFlavorprofileV2 is deprecated: openstack.index/lbflavorprofilev2.LbFlavorprofileV2 has been deprecated in favor of openstack.loadbalancer/flavorprofilev2.FlavorprofileV2"); return new LbFlavorprofileV2(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of LbFlavorprofileV2. 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'] === LbFlavorprofileV2.__pulumiType; } /** @deprecated openstack.index/lbflavorprofilev2.LbFlavorprofileV2 has been deprecated in favor of openstack.loadbalancer/flavorprofilev2.FlavorprofileV2 */ constructor(name, argsOrState, opts) { pulumi.log.warn("LbFlavorprofileV2 is deprecated: openstack.index/lbflavorprofilev2.LbFlavorprofileV2 has been deprecated in favor of openstack.loadbalancer/flavorprofilev2.FlavorprofileV2"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["flavorData"] = state?.flavorData; resourceInputs["name"] = state?.name; resourceInputs["providerName"] = state?.providerName; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.flavorData === undefined && !opts.urn) { throw new Error("Missing required property 'flavorData'"); } if (args?.providerName === undefined && !opts.urn) { throw new Error("Missing required property 'providerName'"); } resourceInputs["flavorData"] = args?.flavorData; resourceInputs["name"] = args?.name; resourceInputs["providerName"] = args?.providerName; resourceInputs["region"] = args?.region; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(LbFlavorprofileV2.__pulumiType, name, resourceInputs, opts); } } exports.LbFlavorprofileV2 = LbFlavorprofileV2; /** @internal */ LbFlavorprofileV2.__pulumiType = 'openstack:index/lbFlavorprofileV2:LbFlavorprofileV2'; //# sourceMappingURL=lbFlavorprofileV2.js.map