openstack.LbFlavorprofileV2
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.loadbalancer.FlavorprofileV2("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.loadbalancer.FlavorprofileV2("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/loadbalancer"
	"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 = loadbalancer.NewFlavorprofileV2(ctx, "flavorprofile_1", &loadbalancer.FlavorprofileV2Args{
			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.LoadBalancer.FlavorprofileV2("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.loadbalancer.FlavorprofileV2;
import com.pulumi.openstack.loadbalancer.FlavorprofileV2Args;
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 FlavorprofileV2("flavorprofile1", FlavorprofileV2Args.builder()
            .name("amphora-single-profile")
            .providerName("amphora")
            .flavorData(serializeJson(
                jsonObject(
                    jsonProperty("loadbalancer_topology", "SINGLE")
                )))
            .build());
    }
}
resources:
  flavorprofile1:
    type: openstack:loadbalancer:FlavorprofileV2
    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.loadbalancer.FlavorprofileV2("flavorprofile_1", {
    name: "amphora-single-profile",
    providerName: "amphora",
    flavorData: "{\"loadbalancer_topology\": \"SINGLE\"}",
});
import pulumi
import pulumi_openstack as openstack
flavorprofile1 = openstack.loadbalancer.FlavorprofileV2("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/loadbalancer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := loadbalancer.NewFlavorprofileV2(ctx, "flavorprofile_1", &loadbalancer.FlavorprofileV2Args{
			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.LoadBalancer.FlavorprofileV2("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.loadbalancer.FlavorprofileV2;
import com.pulumi.openstack.loadbalancer.FlavorprofileV2Args;
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 FlavorprofileV2("flavorprofile1", FlavorprofileV2Args.builder()
            .name("amphora-single-profile")
            .providerName("amphora")
            .flavorData("{\"loadbalancer_topology\": \"SINGLE\"}")
            .build());
    }
}
resources:
  flavorprofile1:
    type: openstack:loadbalancer:FlavorprofileV2
    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,
                      name: Optional[str] = None,
                      provider_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.
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:
- FlavorData string
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile.
- ProviderName 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
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
- FlavorData string
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile.
- ProviderName 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
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
- flavorData String
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile.
- providerName 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
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
- flavorData string
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile.
- providerName 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
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
- flavor_data str
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat 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
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
- flavorData String
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat is passed. jsonencode can be used for readability as shown in the example above. Changing this updates the existing flavorprofile.
- providerName 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
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
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) -> LbFlavorprofileV2func 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)resources:  _:    type: openstack:LbFlavorprofileV2    get:      id: ${id}- 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.
- FlavorData string
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat 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.
- ProviderName string
- The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
- FlavorData string
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat 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.
- ProviderName string
- The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
- flavorData String
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat 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.
- providerName String
- The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
- flavorData string
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat 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.
- providerName string
- The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
- flavor_data str
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat 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
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
- flavorData String
- String that passes the flavor_data for the flavorprofile.
The data that are allowed depend on the provider_namethat 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.
- providerName String
- The provider_name that the flavor_profile will use. Changing this updates the existing flavorprofile.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create an LB member. If omitted, the
regionargument of the provider is used. Changing this creates a new LB flavorprofile.
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 openstackTerraform Provider.
