1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudStorageBlockVolumeSnapshots
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

    List the snapshots of 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 snapshots = ovh.getCloudStorageBlockVolumeSnapshots({
        serviceName: "xxxxxxxxx",
        region: "GRA9",
        volumeId: volume.id,
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    snapshots = ovh.get_cloud_storage_block_volume_snapshots(service_name="xxxxxxxxx",
        region="GRA9",
        volume_id=volume["id"])
    
    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.GetCloudStorageBlockVolumeSnapshots(ctx, &ovh.GetCloudStorageBlockVolumeSnapshotsArgs{
    			ServiceName: "xxxxxxxxx",
    			Region:      "GRA9",
    			VolumeId:    volume.Id,
    		}, 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 snapshots = Ovh.GetCloudStorageBlockVolumeSnapshots.Invoke(new()
        {
            ServiceName = "xxxxxxxxx",
            Region = "GRA9",
            VolumeId = volume.Id,
        });
    
    });
    
    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.GetCloudStorageBlockVolumeSnapshotsArgs;
    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 snapshots = OvhFunctions.getCloudStorageBlockVolumeSnapshots(GetCloudStorageBlockVolumeSnapshotsArgs.builder()
                .serviceName("xxxxxxxxx")
                .region("GRA9")
                .volumeId(volume.id())
                .build());
    
        }
    }
    
    variables:
      snapshots:
        fn::invoke:
          function: ovh:getCloudStorageBlockVolumeSnapshots
          arguments:
            serviceName: xxxxxxxxx
            region: GRA9
            volumeId: ${volume.id}
    
    Example coming soon!
    

    Using getCloudStorageBlockVolumeSnapshots

    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 getCloudStorageBlockVolumeSnapshots(args: GetCloudStorageBlockVolumeSnapshotsArgs, opts?: InvokeOptions): Promise<GetCloudStorageBlockVolumeSnapshotsResult>
    function getCloudStorageBlockVolumeSnapshotsOutput(args: GetCloudStorageBlockVolumeSnapshotsOutputArgs, opts?: InvokeOptions): Output<GetCloudStorageBlockVolumeSnapshotsResult>
    def get_cloud_storage_block_volume_snapshots(region: Optional[str] = None,
                                                 service_name: Optional[str] = None,
                                                 volume_id: Optional[str] = None,
                                                 opts: Optional[InvokeOptions] = None) -> GetCloudStorageBlockVolumeSnapshotsResult
    def get_cloud_storage_block_volume_snapshots_output(region: pulumi.Input[Optional[str]] = None,
                                                 service_name: pulumi.Input[Optional[str]] = None,
                                                 volume_id: pulumi.Input[Optional[str]] = None,
                                                 opts: Optional[InvokeOptions] = None) -> Output[GetCloudStorageBlockVolumeSnapshotsResult]
    func GetCloudStorageBlockVolumeSnapshots(ctx *Context, args *GetCloudStorageBlockVolumeSnapshotsArgs, opts ...InvokeOption) (*GetCloudStorageBlockVolumeSnapshotsResult, error)
    func GetCloudStorageBlockVolumeSnapshotsOutput(ctx *Context, args *GetCloudStorageBlockVolumeSnapshotsOutputArgs, opts ...InvokeOption) GetCloudStorageBlockVolumeSnapshotsResultOutput

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

    public static class GetCloudStorageBlockVolumeSnapshots 
    {
        public static Task<GetCloudStorageBlockVolumeSnapshotsResult> InvokeAsync(GetCloudStorageBlockVolumeSnapshotsArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudStorageBlockVolumeSnapshotsResult> Invoke(GetCloudStorageBlockVolumeSnapshotsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudStorageBlockVolumeSnapshotsResult> getCloudStorageBlockVolumeSnapshots(GetCloudStorageBlockVolumeSnapshotsArgs args, InvokeOptions options)
    public static Output<GetCloudStorageBlockVolumeSnapshotsResult> getCloudStorageBlockVolumeSnapshots(GetCloudStorageBlockVolumeSnapshotsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudStorageBlockVolumeSnapshots:getCloudStorageBlockVolumeSnapshots
      arguments:
        # arguments dictionary
    data "ovh_getcloudstorageblockvolumesnapshots" "name" {
        # arguments
    }

    The following arguments are supported:

    Region string
    The region where the snapshots reside.
    ServiceName string
    The id of the public cloud project.
    VolumeId string
    The ID of the volume whose snapshots to list.
    Region string
    The region where the snapshots reside.
    ServiceName string
    The id of the public cloud project.
    VolumeId string
    The ID of the volume whose snapshots to list.
    region string
    The region where the snapshots reside.
    service_name string
    The id of the public cloud project.
    volume_id string
    The ID of the volume whose snapshots to list.
    region String
    The region where the snapshots reside.
    serviceName String
    The id of the public cloud project.
    volumeId String
    The ID of the volume whose snapshots to list.
    region string
    The region where the snapshots reside.
    serviceName string
    The id of the public cloud project.
    volumeId string
    The ID of the volume whose snapshots to list.
    region str
    The region where the snapshots reside.
    service_name str
    The id of the public cloud project.
    volume_id str
    The ID of the volume whose snapshots to list.
    region String
    The region where the snapshots reside.
    serviceName String
    The id of the public cloud project.
    volumeId String
    The ID of the volume whose snapshots to list.

    getCloudStorageBlockVolumeSnapshots Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    Region.
    ServiceName string
    Snapshots List<GetCloudStorageBlockVolumeSnapshotsSnapshot>
    List of snapshots for the volume:
    VolumeId string
    ID of the snapshotted volume.
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    Region.
    ServiceName string
    Snapshots []GetCloudStorageBlockVolumeSnapshotsSnapshot
    List of snapshots for the volume:
    VolumeId string
    ID of the snapshotted volume.
    id string
    The provider-assigned unique ID for this managed resource.
    region string
    Region.
    service_name string
    snapshots list(object)
    List of snapshots for the volume:
    volume_id string
    ID of the snapshotted volume.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    Region.
    serviceName String
    snapshots List<GetCloudStorageBlockVolumeSnapshotsSnapshot>
    List of snapshots for the volume:
    volumeId String
    ID of the snapshotted volume.
    id string
    The provider-assigned unique ID for this managed resource.
    region string
    Region.
    serviceName string
    snapshots GetCloudStorageBlockVolumeSnapshotsSnapshot[]
    List of snapshots for the volume:
    volumeId string
    ID of the snapshotted volume.
    id str
    The provider-assigned unique ID for this managed resource.
    region str
    Region.
    service_name str
    snapshots Sequence[GetCloudStorageBlockVolumeSnapshotsSnapshot]
    List of snapshots for the volume:
    volume_id str
    ID of the snapshotted volume.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    Region.
    serviceName String
    snapshots List<Property Map>
    List of snapshots for the volume:
    volumeId String
    ID of the snapshotted volume.

    Supporting Types

    GetCloudStorageBlockVolumeSnapshotsSnapshot

    Description string
    Snapshot description.
    Id string
    Snapshot ID.
    Location GetCloudStorageBlockVolumeSnapshotsSnapshotLocation
    Location of the snapshot:
    Name string
    Snapshot name.
    ResourceStatus string
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    Size int
    Size of the snapshot in GB.
    VolumeId string
    The ID of the volume whose snapshots to list.
    Description string
    Snapshot description.
    Id string
    Snapshot ID.
    Location GetCloudStorageBlockVolumeSnapshotsSnapshotLocation
    Location of the snapshot:
    Name string
    Snapshot name.
    ResourceStatus string
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    Size int
    Size of the snapshot in GB.
    VolumeId string
    The ID of the volume whose snapshots to list.
    description string
    Snapshot description.
    id string
    Snapshot ID.
    location object
    Location of the snapshot:
    name string
    Snapshot name.
    resource_status string
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    size number
    Size of the snapshot in GB.
    volume_id string
    The ID of the volume whose snapshots to list.
    description String
    Snapshot description.
    id String
    Snapshot ID.
    location GetCloudStorageBlockVolumeSnapshotsSnapshotLocation
    Location of the snapshot:
    name String
    Snapshot name.
    resourceStatus String
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    size Integer
    Size of the snapshot in GB.
    volumeId String
    The ID of the volume whose snapshots to list.
    description string
    Snapshot description.
    id string
    Snapshot ID.
    location GetCloudStorageBlockVolumeSnapshotsSnapshotLocation
    Location of the snapshot:
    name string
    Snapshot name.
    resourceStatus string
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    size number
    Size of the snapshot in GB.
    volumeId string
    The ID of the volume whose snapshots to list.
    description str
    Snapshot description.
    id str
    Snapshot ID.
    location GetCloudStorageBlockVolumeSnapshotsSnapshotLocation
    Location of the snapshot:
    name str
    Snapshot name.
    resource_status str
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    size int
    Size of the snapshot in GB.
    volume_id str
    The ID of the volume whose snapshots to list.
    description String
    Snapshot description.
    id String
    Snapshot ID.
    location Property Map
    Location of the snapshot:
    name String
    Snapshot name.
    resourceStatus String
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    size Number
    Size of the snapshot in GB.
    volumeId String
    The ID of the volume whose snapshots to list.

    GetCloudStorageBlockVolumeSnapshotsSnapshotLocation

    Region string
    The region where the snapshots reside.
    Region string
    The region where the snapshots reside.
    region string
    The region where the snapshots reside.
    region String
    The region where the snapshots reside.
    region string
    The region where the snapshots reside.
    region str
    The region where the snapshots reside.
    region String
    The region where the snapshots reside.

    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