1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. getBlockstorageVolumeV2
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.getBlockstorageVolumeV2

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Use this data source to get the ID of an available FlexibleEngine volume.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const volume = flexibleengine.getBlockstorageVolumeV2({
        name: "test_volume",
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    volume = flexibleengine.get_blockstorage_volume_v2(name="test_volume")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := flexibleengine.LookupBlockstorageVolumeV2(ctx, &flexibleengine.LookupBlockstorageVolumeV2Args{
    			Name: pulumi.StringRef("test_volume"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var volume = Flexibleengine.GetBlockstorageVolumeV2.Invoke(new()
        {
            Name = "test_volume",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.FlexibleengineFunctions;
    import com.pulumi.flexibleengine.inputs.GetBlockstorageVolumeV2Args;
    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 volume = FlexibleengineFunctions.getBlockstorageVolumeV2(GetBlockstorageVolumeV2Args.builder()
                .name("test_volume")
                .build());
    
        }
    }
    
    variables:
      volume:
        fn::invoke:
          function: flexibleengine:getBlockstorageVolumeV2
          arguments:
            name: test_volume
    

    Using getBlockstorageVolumeV2

    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 getBlockstorageVolumeV2(args: GetBlockstorageVolumeV2Args, opts?: InvokeOptions): Promise<GetBlockstorageVolumeV2Result>
    function getBlockstorageVolumeV2Output(args: GetBlockstorageVolumeV2OutputArgs, opts?: InvokeOptions): Output<GetBlockstorageVolumeV2Result>
    def get_blockstorage_volume_v2(id: Optional[str] = None,
                                   name: Optional[str] = None,
                                   region: Optional[str] = None,
                                   status: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetBlockstorageVolumeV2Result
    def get_blockstorage_volume_v2_output(id: Optional[pulumi.Input[str]] = None,
                                   name: Optional[pulumi.Input[str]] = None,
                                   region: Optional[pulumi.Input[str]] = None,
                                   status: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetBlockstorageVolumeV2Result]
    func LookupBlockstorageVolumeV2(ctx *Context, args *LookupBlockstorageVolumeV2Args, opts ...InvokeOption) (*LookupBlockstorageVolumeV2Result, error)
    func LookupBlockstorageVolumeV2Output(ctx *Context, args *LookupBlockstorageVolumeV2OutputArgs, opts ...InvokeOption) LookupBlockstorageVolumeV2ResultOutput

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

    public static class GetBlockstorageVolumeV2 
    {
        public static Task<GetBlockstorageVolumeV2Result> InvokeAsync(GetBlockstorageVolumeV2Args args, InvokeOptions? opts = null)
        public static Output<GetBlockstorageVolumeV2Result> Invoke(GetBlockstorageVolumeV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBlockstorageVolumeV2Result> getBlockstorageVolumeV2(GetBlockstorageVolumeV2Args args, InvokeOptions options)
    public static Output<GetBlockstorageVolumeV2Result> getBlockstorageVolumeV2(GetBlockstorageVolumeV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: flexibleengine:index/getBlockstorageVolumeV2:getBlockstorageVolumeV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of the volume.
    Name string
    The name of the volume.
    Region string
    The region in which to obtain the V2 Volume client. If omitted, the region argument of the provider is used.
    Status string
    The status of the volume.
    Id string
    The ID of the volume.
    Name string
    The name of the volume.
    Region string
    The region in which to obtain the V2 Volume client. If omitted, the region argument of the provider is used.
    Status string
    The status of the volume.
    id String
    The ID of the volume.
    name String
    The name of the volume.
    region String
    The region in which to obtain the V2 Volume client. If omitted, the region argument of the provider is used.
    status String
    The status of the volume.
    id string
    The ID of the volume.
    name string
    The name of the volume.
    region string
    The region in which to obtain the V2 Volume client. If omitted, the region argument of the provider is used.
    status string
    The status of the volume.
    id str
    The ID of the volume.
    name str
    The name of the volume.
    region str
    The region in which to obtain the V2 Volume client. If omitted, the region argument of the provider is used.
    status str
    The status of the volume.
    id String
    The ID of the volume.
    name String
    The name of the volume.
    region String
    The region in which to obtain the V2 Volume client. If omitted, the region argument of the provider is used.
    status String
    The status of the volume.

    getBlockstorageVolumeV2 Result

    The following output properties are available:

    Id string
    The ID of the volume.
    Region string
    Name string
    Status string
    Id string
    The ID of the volume.
    Region string
    Name string
    Status string
    id String
    The ID of the volume.
    region String
    name String
    status String
    id string
    The ID of the volume.
    region string
    name string
    status string
    id str
    The ID of the volume.
    region str
    name str
    status str
    id String
    The ID of the volume.
    region String
    name String
    status String

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud