@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
106 lines • 4.26 kB
JavaScript
;
// *** 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.FlavorprofileV2 = 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:loadbalancer/flavorprofileV2:FlavorprofileV2 flavorprofile_1 2a0f2240-c5e6-41de-896d-e80d97428d6b
* ```
*/
class FlavorprofileV2 extends pulumi.CustomResource {
/**
* Get an existing FlavorprofileV2 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 FlavorprofileV2(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of FlavorprofileV2. 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'] === FlavorprofileV2.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["flavorData"] = state ? state.flavorData : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["providerName"] = state ? state.providerName : undefined;
resourceInputs["region"] = state ? state.region : undefined;
}
else {
const args = argsOrState;
if ((!args || args.flavorData === undefined) && !opts.urn) {
throw new Error("Missing required property 'flavorData'");
}
if ((!args || args.providerName === undefined) && !opts.urn) {
throw new Error("Missing required property 'providerName'");
}
resourceInputs["flavorData"] = args ? args.flavorData : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["providerName"] = args ? args.providerName : undefined;
resourceInputs["region"] = args ? args.region : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const aliasOpts = { aliases: [{ type: "openstack:index/lbFlavorprofileV2:LbFlavorprofileV2" }] };
opts = pulumi.mergeOptions(opts, aliasOpts);
super(FlavorprofileV2.__pulumiType, name, resourceInputs, opts);
}
}
exports.FlavorprofileV2 = FlavorprofileV2;
/** @internal */
FlavorprofileV2.__pulumiType = 'openstack:loadbalancer/flavorprofileV2:FlavorprofileV2';
//# sourceMappingURL=flavorprofileV2.js.map