1. Packages
  2. Openstack Provider
  3. API Docs
  4. loadbalancer
  5. getFlavorV2
OpenStack v4.1.3 published on Wednesday, Aug 21, 2024 by Pulumi

openstack.loadbalancer.getFlavorV2

Explore with Pulumi AI

openstack logo
OpenStack v4.1.3 published on Wednesday, Aug 21, 2024 by Pulumi

    Use this data source to get the ID of an OpenStack Load Balancer flavor.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const flavor1 = openstack.loadbalancer.getFlavorV2({
        name: "flavor_1",
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    flavor1 = openstack.loadbalancer.get_flavor_v2(name="flavor_1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/loadbalancer"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := loadbalancer.GetFlavorV2(ctx, &loadbalancer.GetFlavorV2Args{
    			Name: pulumi.StringRef("flavor_1"),
    		}, nil)
    		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 flavor1 = OpenStack.LoadBalancer.GetFlavorV2.Invoke(new()
        {
            Name = "flavor_1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.loadbalancer.LoadbalancerFunctions;
    import com.pulumi.openstack.loadbalancer.inputs.GetFlavorV2Args;
    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) {
            final var flavor1 = LoadbalancerFunctions.getFlavorV2(GetFlavorV2Args.builder()
                .name("flavor_1")
                .build());
    
        }
    }
    
    variables:
      flavor1:
        fn::invoke:
          Function: openstack:loadbalancer:getFlavorV2
          Arguments:
            name: flavor_1
    

    Using getFlavorV2

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getFlavorV2(args: GetFlavorV2Args, opts?: InvokeOptions): Promise<GetFlavorV2Result>
    function getFlavorV2Output(args: GetFlavorV2OutputArgs, opts?: InvokeOptions): Output<GetFlavorV2Result>
    def get_flavor_v2(flavor_id: Optional[str] = None,
                      name: Optional[str] = None,
                      region: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetFlavorV2Result
    def get_flavor_v2_output(flavor_id: Optional[pulumi.Input[str]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      region: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetFlavorV2Result]
    func GetFlavorV2(ctx *Context, args *GetFlavorV2Args, opts ...InvokeOption) (*GetFlavorV2Result, error)
    func GetFlavorV2Output(ctx *Context, args *GetFlavorV2OutputArgs, opts ...InvokeOption) GetFlavorV2ResultOutput

    > Note: This function is named GetFlavorV2 in the Go SDK.

    public static class GetFlavorV2 
    {
        public static Task<GetFlavorV2Result> InvokeAsync(GetFlavorV2Args args, InvokeOptions? opts = null)
        public static Output<GetFlavorV2Result> Invoke(GetFlavorV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFlavorV2Result> getFlavorV2(GetFlavorV2Args args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: openstack:loadbalancer/getFlavorV2:getFlavorV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FlavorId string
    The ID of the flavor. Exactly one of name, flavor_id is required to be set.
    Name string
    The name of the flavor. Exactly one of name, flavor_id is required to be set.
    Region string
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.
    FlavorId string
    The ID of the flavor. Exactly one of name, flavor_id is required to be set.
    Name string
    The name of the flavor. Exactly one of name, flavor_id is required to be set.
    Region string
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.
    flavorId String
    The ID of the flavor. Exactly one of name, flavor_id is required to be set.
    name String
    The name of the flavor. Exactly one of name, flavor_id is required to be set.
    region String
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.
    flavorId string
    The ID of the flavor. Exactly one of name, flavor_id is required to be set.
    name string
    The name of the flavor. Exactly one of name, flavor_id is required to be set.
    region string
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.
    flavor_id str
    The ID of the flavor. Exactly one of name, flavor_id is required to be set.
    name str
    The name of the flavor. Exactly one of name, flavor_id is required to be set.
    region str
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.
    flavorId String
    The ID of the flavor. Exactly one of name, flavor_id is required to be set.
    name String
    The name of the flavor. Exactly one of name, flavor_id is required to be set.
    region String
    The region in which to obtain the V2 Load Balancer client. If omitted, the region argument of the provider is used.

    getFlavorV2 Result

    The following output properties are available:

    Description string
    The description of the flavor.
    Enabled bool
    Is the flavor enabled.
    FlavorId string
    The ID of the flavor.
    FlavorProfileId string
    The ID of the flavor profile.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the flavor.
    Region string
    Description string
    The description of the flavor.
    Enabled bool
    Is the flavor enabled.
    FlavorId string
    The ID of the flavor.
    FlavorProfileId string
    The ID of the flavor profile.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the flavor.
    Region string
    description String
    The description of the flavor.
    enabled Boolean
    Is the flavor enabled.
    flavorId String
    The ID of the flavor.
    flavorProfileId String
    The ID of the flavor profile.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the flavor.
    region String
    description string
    The description of the flavor.
    enabled boolean
    Is the flavor enabled.
    flavorId string
    The ID of the flavor.
    flavorProfileId string
    The ID of the flavor profile.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the flavor.
    region string
    description str
    The description of the flavor.
    enabled bool
    Is the flavor enabled.
    flavor_id str
    The ID of the flavor.
    flavor_profile_id str
    The ID of the flavor profile.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the flavor.
    region str
    description String
    The description of the flavor.
    enabled Boolean
    Is the flavor enabled.
    flavorId String
    The ID of the flavor.
    flavorProfileId String
    The ID of the flavor profile.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the flavor.
    region String

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v4.1.3 published on Wednesday, Aug 21, 2024 by Pulumi