openstack.LbFlavorprofileV2
Explore with Pulumi AI
Manages a V2 load balancer flavorprofile resource within OpenStack.
Note: This usually requires admin privileges.
Example Usage
Using jsonencode
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const flavorprofile1 = new openstack.LbFlavorprofileV2("flavorprofile_1", {
name: "amphora-single-profile",
providerName: "amphora",
flavorData: JSON.stringify({
loadbalancer_topology: "SINGLE",
}),
});
import pulumi
import json
import pulumi_openstack as openstack
flavorprofile1 = openstack.LbFlavorprofileV2("flavorprofile_1",
name="amphora-single-profile",
provider_name="amphora",
flavor_data=json.dumps({
"loadbalancer_topology": "SINGLE",
}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"loadbalancer_topology": "SINGLE",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = openstack.NewLbFlavorprofileV2(ctx, "flavorprofile_1", &openstack.LbFlavorprofileV2Args{
Name: pulumi.String("amphora-single-profile"),
ProviderName: pulumi.String("amphora"),
FlavorData: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var flavorprofile1 = new OpenStack.LbFlavorprofileV2("flavorprofile_1", new()
{
Name = "amphora-single-profile",
ProviderName = "amphora",
FlavorData = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["loadbalancer_topology"] = "SINGLE",
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.LbFlavorprofileV2;
import com.pulumi.openstack.LbFlavorprofileV2Args;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var flavorprofile1 = new LbFlavorprofileV2("flavorprofile1", LbFlavorprofileV2Args.builder()
.name("amphora-single-profile")
.providerName("amphora")
.flavorData(serializeJson(
jsonObject(
jsonProperty("loadbalancer_topology", "SINGLE")
)))
.build());
}
}
resources:
flavorprofile1:
type: openstack:LbFlavorprofileV2
name: flavorprofile_1
properties:
name: amphora-single-profile
providerName: amphora
flavorData:
fn::toJSON:
loadbalancer_topology: SINGLE
Using plain string
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const flavorprofile1 = new openstack.LbFlavorprofileV2("flavorprofile_1", {
name: "amphora-single-profile",
providerName: "amphora",
flavorData: "{\"loadbalancer_topology\": \"SINGLE\"}",
});
import pulumi
import pulumi_openstack as openstack
flavorprofile1 = openstack.LbFlavorprofileV2("flavorprofile_1",
name="amphora-single-profile",
provider_name="amphora",
flavor_data="{\"loadbalancer_topology\": \"SINGLE\"}")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := openstack.NewLbFlavorprofileV2(ctx, "flavorprofile_1", &openstack.LbFlavorprofileV2Args{
Name: pulumi.String("amphora-single-profile"),
ProviderName: pulumi.String("amphora"),
FlavorData: pulumi.String("{\"loadbalancer_topology\": \"SINGLE\"}"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var flavorprofile1 = new OpenStack.LbFlavorprofileV2("flavorprofile_1", new()
{
Name = "amphora-single-profile",
ProviderName = "amphora",
FlavorData = "{\"loadbalancer_topology\": \"SINGLE\"}",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.LbFlavorprofileV2;
import com.pulumi.openstack.LbFlavorprofileV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var flavorprofile1 = new LbFlavorprofileV2("flavorprofile1", LbFlavorprofileV2Args.builder()
.name("amphora-single-profile")
.providerName("amphora")
.flavorData("{\"loadbalancer_topology\": \"SINGLE\"}")
.build());
}
}
resources:
flavorprofile1:
type: openstack:LbFlavorprofileV2
name: flavorprofile_1
properties:
name: amphora-single-profile
providerName: amphora
flavorData: '{"loadbalancer_topology": "SINGLE"}'
Create LbFlavorprofileV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LbFlavorprofileV2(name: string, args: LbFlavorprofileV2Args, opts?: CustomResourceOptions);
@overload
def LbFlavorprofileV2(resource_name: str,
args: LbFlavorprofileV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def LbFlavorprofileV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
flavor_data: Optional[str] = None,
provider_name: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None)
func NewLbFlavorprofileV2(ctx *Context, name string, args LbFlavorprofileV2Args, opts ...ResourceOption) (*LbFlavorprofileV2, error)
public LbFlavorprofileV2(string name, LbFlavorprofileV2Args args, CustomResourceOptions? opts = null)
public LbFlavorprofileV2(String name, LbFlavorprofileV2Args args)
public LbFlavorprofileV2(String name, LbFlavorprofileV2Args args, CustomResourceOptions options)
type: openstack:LbFlavorprofileV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args LbFlavorprofileV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args LbFlavorprofileV2Args
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args LbFlavorprofileV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LbFlavorprofileV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LbFlavorprofileV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var lbFlavorprofileV2Resource = new OpenStack.LbFlavorprofileV2("lbFlavorprofileV2Resource", new()
{
FlavorData = "string",
ProviderName = "string",
Name = "string",
Region = "string",
});
example, err := openstack.NewLbFlavorprofileV2(ctx, "lbFlavorprofileV2Resource", &openstack.LbFlavorprofileV2Args{
FlavorData: pulumi.String("string"),
ProviderName: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
var lbFlavorprofileV2Resource = new LbFlavorprofileV2("lbFlavorprofileV2Resource", LbFlavorprofileV2Args.builder()
.flavorData("string")
.providerName("string")
.name("string")
.region("string")
.build());
lb_flavorprofile_v2_resource = openstack.LbFlavorprofileV2("lbFlavorprofileV2Resource",
flavor_data="string",
provider_name="string",
name="string",
region="string")
const lbFlavorprofileV2Resource = new openstack.LbFlavorprofileV2("lbFlavorprofileV2Resource", {
flavorData: "string",
providerName: "string",
name: "string",
region: "string",
});
type: openstack:LbFlavorprofileV2
properties:
flavorData: string
name: string
providerName: string
region: string
LbFlavorprofileV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The LbFlavorprofileV2 resource accepts the following input properties:
- Flavor
Data string - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - Provider
Name string - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- Name string
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- Region string
- Flavor
Data string - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - Provider
Name string - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- Name string
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- Region string
- flavor
Data String - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - provider
Name String - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- name String
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- region String
- flavor
Data string - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - provider
Name string - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- name string
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- region string
- flavor_
data str - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - provider_
name str - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- name str
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- region str
- flavor
Data String - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - provider
Name String - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- name String
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- region String
Outputs
All input properties are implicitly available as output properties. Additionally, the LbFlavorprofileV2 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing LbFlavorprofileV2 Resource
Get an existing LbFlavorprofileV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: LbFlavorprofileV2State, opts?: CustomResourceOptions): LbFlavorprofileV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
flavor_data: Optional[str] = None,
name: Optional[str] = None,
provider_name: Optional[str] = None,
region: Optional[str] = None) -> LbFlavorprofileV2
func GetLbFlavorprofileV2(ctx *Context, name string, id IDInput, state *LbFlavorprofileV2State, opts ...ResourceOption) (*LbFlavorprofileV2, error)
public static LbFlavorprofileV2 Get(string name, Input<string> id, LbFlavorprofileV2State? state, CustomResourceOptions? opts = null)
public static LbFlavorprofileV2 get(String name, Output<String> id, LbFlavorprofileV2State state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Flavor
Data string - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - Name string
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- Provider
Name string - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- Region string
- Flavor
Data string - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - Name string
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- Provider
Name string - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- Region string
- flavor
Data String - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - name String
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- provider
Name String - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- region String
- flavor
Data string - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - name string
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- provider
Name string - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- region string
- flavor_
data str - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - name str
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- provider_
name str - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- region str
- flavor
Data String - String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the
provider_name
that is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile. - name String
- Name of the flavorprofile. Changing this updates the existing flavorprofile.
- provider
Name String - The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- region String
Import
flavorprofiles can be imported using their id
. Example:
$ pulumi import openstack:index/lbFlavorprofileV2:LbFlavorprofileV2 flavorprofile_1 2a0f2240-c5e6-41de-896d-e80d97428d6b
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.