1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudStorageBlockVolume
Viewing docs for OVHCloud v2.14.0
published on Monday, Jun 15, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.14.0
published on Monday, Jun 15, 2026 by OVHcloud

    Get a block storage volume in a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const volume = ovh.getCloudStorageBlockVolume({
        serviceName: "xxxxxxxxx",
        id: "00000000-0000-0000-0000-000000000000",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    volume = ovh.get_cloud_storage_block_volume(service_name="xxxxxxxxx",
        id="00000000-0000-0000-0000-000000000000")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ovh.LookupCloudStorageBlockVolume(ctx, &ovh.LookupCloudStorageBlockVolumeArgs{
    			ServiceName: "xxxxxxxxx",
    			Id:          "00000000-0000-0000-0000-000000000000",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var volume = Ovh.GetCloudStorageBlockVolume.Invoke(new()
        {
            ServiceName = "xxxxxxxxx",
            Id = "00000000-0000-0000-0000-000000000000",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetCloudStorageBlockVolumeArgs;
    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 = OvhFunctions.getCloudStorageBlockVolume(GetCloudStorageBlockVolumeArgs.builder()
                .serviceName("xxxxxxxxx")
                .id("00000000-0000-0000-0000-000000000000")
                .build());
    
        }
    }
    
    variables:
      volume:
        fn::invoke:
          function: ovh:getCloudStorageBlockVolume
          arguments:
            serviceName: xxxxxxxxx
            id: 00000000-0000-0000-0000-000000000000
    
    Example coming soon!
    

    Using getCloudStorageBlockVolume

    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 getCloudStorageBlockVolume(args: GetCloudStorageBlockVolumeArgs, opts?: InvokeOptions): Promise<GetCloudStorageBlockVolumeResult>
    function getCloudStorageBlockVolumeOutput(args: GetCloudStorageBlockVolumeOutputArgs, opts?: InvokeOptions): Output<GetCloudStorageBlockVolumeResult>
    def get_cloud_storage_block_volume(id: Optional[str] = None,
                                       service_name: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetCloudStorageBlockVolumeResult
    def get_cloud_storage_block_volume_output(id: pulumi.Input[Optional[str]] = None,
                                       service_name: pulumi.Input[Optional[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetCloudStorageBlockVolumeResult]
    func LookupCloudStorageBlockVolume(ctx *Context, args *LookupCloudStorageBlockVolumeArgs, opts ...InvokeOption) (*LookupCloudStorageBlockVolumeResult, error)
    func LookupCloudStorageBlockVolumeOutput(ctx *Context, args *LookupCloudStorageBlockVolumeOutputArgs, opts ...InvokeOption) LookupCloudStorageBlockVolumeResultOutput

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

    public static class GetCloudStorageBlockVolume 
    {
        public static Task<GetCloudStorageBlockVolumeResult> InvokeAsync(GetCloudStorageBlockVolumeArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudStorageBlockVolumeResult> Invoke(GetCloudStorageBlockVolumeInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudStorageBlockVolumeResult> getCloudStorageBlockVolume(GetCloudStorageBlockVolumeArgs args, InvokeOptions options)
    public static Output<GetCloudStorageBlockVolumeResult> getCloudStorageBlockVolume(GetCloudStorageBlockVolumeArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudStorageBlockVolume:getCloudStorageBlockVolume
      arguments:
        # arguments dictionary
    data "ovh_getcloudstorageblockvolume" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    The ID of the volume.
    ServiceName string
    The id of the public cloud project.
    Id string
    The ID of the volume.
    ServiceName string
    The id of the public cloud project.
    id string
    The ID of the volume.
    service_name string
    The id of the public cloud project.
    id String
    The ID of the volume.
    serviceName String
    The id of the public cloud project.
    id string
    The ID of the volume.
    serviceName string
    The id of the public cloud project.
    id str
    The ID of the volume.
    service_name str
    The id of the public cloud project.
    id String
    The ID of the volume.
    serviceName String
    The id of the public cloud project.

    getCloudStorageBlockVolume Result

    The following output properties are available:

    AttachedInstances List<GetCloudStorageBlockVolumeAttachedInstance>
    Instances the volume is attached to:
    Bootable bool
    Whether the volume is bootable.
    Encryption GetCloudStorageBlockVolumeEncryption
    Encryption configuration of the volume:
    Id string
    Instance ID.
    Location GetCloudStorageBlockVolumeLocation
    Location of the volume:
    Name string
    Volume name.
    ResourceStatus string
    Volume readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    ServiceName string
    Size int
    Size of the volume in GB.
    Status string
    Volume status (AVAILABLE, IN_USE, CREATING, DELETING, ATTACHING, DETACHING, EXTENDING, ERROR, ERROR_DELETING, ERROR_BACKING_UP, ERROR_RESTORING, ERROR_EXTENDING).
    VolumeType string
    Volume type (CLASSIC, HIGH_SPEED, HIGH_SPEED_GEN2).
    AttachedInstances []GetCloudStorageBlockVolumeAttachedInstance
    Instances the volume is attached to:
    Bootable bool
    Whether the volume is bootable.
    Encryption GetCloudStorageBlockVolumeEncryption
    Encryption configuration of the volume:
    Id string
    Instance ID.
    Location GetCloudStorageBlockVolumeLocation
    Location of the volume:
    Name string
    Volume name.
    ResourceStatus string
    Volume readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    ServiceName string
    Size int
    Size of the volume in GB.
    Status string
    Volume status (AVAILABLE, IN_USE, CREATING, DELETING, ATTACHING, DETACHING, EXTENDING, ERROR, ERROR_DELETING, ERROR_BACKING_UP, ERROR_RESTORING, ERROR_EXTENDING).
    VolumeType string
    Volume type (CLASSIC, HIGH_SPEED, HIGH_SPEED_GEN2).
    attached_instances list(object)
    Instances the volume is attached to:
    bootable bool
    Whether the volume is bootable.
    encryption object
    Encryption configuration of the volume:
    id string
    Instance ID.
    location object
    Location of the volume:
    name string
    Volume name.
    resource_status string
    Volume readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    service_name string
    size number
    Size of the volume in GB.
    status string
    Volume status (AVAILABLE, IN_USE, CREATING, DELETING, ATTACHING, DETACHING, EXTENDING, ERROR, ERROR_DELETING, ERROR_BACKING_UP, ERROR_RESTORING, ERROR_EXTENDING).
    volume_type string
    Volume type (CLASSIC, HIGH_SPEED, HIGH_SPEED_GEN2).
    attachedInstances List<GetCloudStorageBlockVolumeAttachedInstance>
    Instances the volume is attached to:
    bootable Boolean
    Whether the volume is bootable.
    encryption GetCloudStorageBlockVolumeEncryption
    Encryption configuration of the volume:
    id String
    Instance ID.
    location GetCloudStorageBlockVolumeLocation
    Location of the volume:
    name String
    Volume name.
    resourceStatus String
    Volume readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName String
    size Integer
    Size of the volume in GB.
    status String
    Volume status (AVAILABLE, IN_USE, CREATING, DELETING, ATTACHING, DETACHING, EXTENDING, ERROR, ERROR_DELETING, ERROR_BACKING_UP, ERROR_RESTORING, ERROR_EXTENDING).
    volumeType String
    Volume type (CLASSIC, HIGH_SPEED, HIGH_SPEED_GEN2).
    attachedInstances GetCloudStorageBlockVolumeAttachedInstance[]
    Instances the volume is attached to:
    bootable boolean
    Whether the volume is bootable.
    encryption GetCloudStorageBlockVolumeEncryption
    Encryption configuration of the volume:
    id string
    Instance ID.
    location GetCloudStorageBlockVolumeLocation
    Location of the volume:
    name string
    Volume name.
    resourceStatus string
    Volume readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName string
    size number
    Size of the volume in GB.
    status string
    Volume status (AVAILABLE, IN_USE, CREATING, DELETING, ATTACHING, DETACHING, EXTENDING, ERROR, ERROR_DELETING, ERROR_BACKING_UP, ERROR_RESTORING, ERROR_EXTENDING).
    volumeType string
    Volume type (CLASSIC, HIGH_SPEED, HIGH_SPEED_GEN2).
    attached_instances Sequence[GetCloudStorageBlockVolumeAttachedInstance]
    Instances the volume is attached to:
    bootable bool
    Whether the volume is bootable.
    encryption GetCloudStorageBlockVolumeEncryption
    Encryption configuration of the volume:
    id str
    Instance ID.
    location GetCloudStorageBlockVolumeLocation
    Location of the volume:
    name str
    Volume name.
    resource_status str
    Volume readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    service_name str
    size int
    Size of the volume in GB.
    status str
    Volume status (AVAILABLE, IN_USE, CREATING, DELETING, ATTACHING, DETACHING, EXTENDING, ERROR, ERROR_DELETING, ERROR_BACKING_UP, ERROR_RESTORING, ERROR_EXTENDING).
    volume_type str
    Volume type (CLASSIC, HIGH_SPEED, HIGH_SPEED_GEN2).
    attachedInstances List<Property Map>
    Instances the volume is attached to:
    bootable Boolean
    Whether the volume is bootable.
    encryption Property Map
    Encryption configuration of the volume:
    id String
    Instance ID.
    location Property Map
    Location of the volume:
    name String
    Volume name.
    resourceStatus String
    Volume readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    serviceName String
    size Number
    Size of the volume in GB.
    status String
    Volume status (AVAILABLE, IN_USE, CREATING, DELETING, ATTACHING, DETACHING, EXTENDING, ERROR, ERROR_DELETING, ERROR_BACKING_UP, ERROR_RESTORING, ERROR_EXTENDING).
    volumeType String
    Volume type (CLASSIC, HIGH_SPEED, HIGH_SPEED_GEN2).

    Supporting Types

    GetCloudStorageBlockVolumeAttachedInstance

    Id string
    The ID of the volume.
    Id string
    The ID of the volume.
    id string
    The ID of the volume.
    id String
    The ID of the volume.
    id string
    The ID of the volume.
    id str
    The ID of the volume.
    id String
    The ID of the volume.

    GetCloudStorageBlockVolumeEncryption

    Enabled bool
    Whether the volume is encrypted at rest with LUKS.
    Enabled bool
    Whether the volume is encrypted at rest with LUKS.
    enabled bool
    Whether the volume is encrypted at rest with LUKS.
    enabled Boolean
    Whether the volume is encrypted at rest with LUKS.
    enabled boolean
    Whether the volume is encrypted at rest with LUKS.
    enabled bool
    Whether the volume is encrypted at rest with LUKS.
    enabled Boolean
    Whether the volume is encrypted at rest with LUKS.

    GetCloudStorageBlockVolumeLocation

    Region string
    Region.
    Region string
    Region.
    region string
    Region.
    region String
    Region.
    region string
    Region.
    region str
    Region.
    region String
    Region.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.14.0
    published on Monday, Jun 15, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial