1. Registry
  2. Packages
  3. Scaleway
  4. API Docs
  5. block
  6. getSnapshots
Viewing docs for Scaleway v1.60.0
published on Saturday, Oct 24, 2026 by pulumiverse
scaleway logo
Viewing docs for Scaleway v1.60.0
published on Saturday, Oct 24, 2026 by pulumiverse

    Gets information about multiple Block Storage volume snapshots.

    For more information, see the main documentation or API documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    // List all snapshots in a zone
    const all = scaleway.block.getSnapshots({
        zone: "fr-par-1",
    });
    // Filter snapshots by name
    const byName = scaleway.block.getSnapshots({
        name: "my-snapshot",
        zone: "fr-par-1",
    });
    // Filter snapshots by tags
    const byTags = scaleway.block.getSnapshots({
        tags: [
            "backup",
            "daily",
        ],
        zone: "fr-par-1",
    });
    // Filter snapshots by the volume they were created from
    const byVolume = scaleway.block.getSnapshots({
        volumeId: main.id,
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # List all snapshots in a zone
    all = scaleway.block.get_snapshots(zone="fr-par-1")
    # Filter snapshots by name
    by_name = scaleway.block.get_snapshots(name="my-snapshot",
        zone="fr-par-1")
    # Filter snapshots by tags
    by_tags = scaleway.block.get_snapshots(tags=[
            "backup",
            "daily",
        ],
        zone="fr-par-1")
    # Filter snapshots by the volume they were created from
    by_volume = scaleway.block.get_snapshots(volume_id=main["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/block"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// List all snapshots in a zone
    		_, err := block.GetSnapshots(ctx, &block.GetSnapshotsArgs{
    			Zone: pulumi.StringRef("fr-par-1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Filter snapshots by name
    		_, err = block.GetSnapshots(ctx, &block.GetSnapshotsArgs{
    			Name: pulumi.StringRef("my-snapshot"),
    			Zone: pulumi.StringRef("fr-par-1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Filter snapshots by tags
    		_, err = block.GetSnapshots(ctx, &block.GetSnapshotsArgs{
    			Tags: []string{
    				"backup",
    				"daily",
    			},
    			Zone: pulumi.StringRef("fr-par-1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Filter snapshots by the volume they were created from
    		_, err = block.GetSnapshots(ctx, &block.GetSnapshotsArgs{
    			VolumeId: pulumi.StringRef(main.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        // List all snapshots in a zone
        var all = Scaleway.Block.GetSnapshots.Invoke(new()
        {
            Zone = "fr-par-1",
        });
    
        // Filter snapshots by name
        var byName = Scaleway.Block.GetSnapshots.Invoke(new()
        {
            Name = "my-snapshot",
            Zone = "fr-par-1",
        });
    
        // Filter snapshots by tags
        var byTags = Scaleway.Block.GetSnapshots.Invoke(new()
        {
            Tags = new[]
            {
                "backup",
                "daily",
            },
            Zone = "fr-par-1",
        });
    
        // Filter snapshots by the volume they were created from
        var byVolume = Scaleway.Block.GetSnapshots.Invoke(new()
        {
            VolumeId = main.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.block.BlockFunctions;
    import com.pulumi.scaleway.block.inputs.GetSnapshotsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // List all snapshots in a zone
            final var all = BlockFunctions.getSnapshots(GetSnapshotsArgs.builder()
                .zone("fr-par-1")
                .build());
    
            // Filter snapshots by name
            final var byName = BlockFunctions.getSnapshots(GetSnapshotsArgs.builder()
                .name("my-snapshot")
                .zone("fr-par-1")
                .build());
    
            // Filter snapshots by tags
            final var byTags = BlockFunctions.getSnapshots(GetSnapshotsArgs.builder()
                .tags(            
                    "backup",
                    "daily")
                .zone("fr-par-1")
                .build());
    
            // Filter snapshots by the volume they were created from
            final var byVolume = BlockFunctions.getSnapshots(GetSnapshotsArgs.builder()
                .volumeId(main.id())
                .build());
    
        }
    }
    
    variables:
      # List all snapshots in a zone
      all:
        fn::invoke:
          function: scaleway:block:getSnapshots
          arguments:
            zone: fr-par-1
      # Filter snapshots by name
      byName:
        fn::invoke:
          function: scaleway:block:getSnapshots
          arguments:
            name: my-snapshot
            zone: fr-par-1
      # Filter snapshots by tags
      byTags:
        fn::invoke:
          function: scaleway:block:getSnapshots
          arguments:
            tags:
              - backup
              - daily
            zone: fr-par-1
      # Filter snapshots by the volume they were created from
      byVolume:
        fn::invoke:
          function: scaleway:block:getSnapshots
          arguments:
            volumeId: ${main.id}
    
    pulumi {
      required_providers {
        scaleway = {
          source = "pulumi/scaleway"
        }
      }
    }
    
    data "scaleway_block_getsnapshots" "all" {
      zone = "fr-par-1"
    }
    data "scaleway_block_getsnapshots" "byName" {
      name = "my-snapshot"
      zone = "fr-par-1"
    }
    data "scaleway_block_getsnapshots" "byTags" {
      tags = ["backup", "daily"]
      zone = "fr-par-1"
    }
    data "scaleway_block_getsnapshots" "byVolume" {
      volume_id = main.id
    }
    
    # List all snapshots in a zone
    # Filter snapshots by name
    # Filter snapshots by tags
    # Filter snapshots by the volume they were created from
    

    Using getSnapshots

    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 getSnapshots(args: GetSnapshotsArgs, opts?: InvokeOptions): Promise<GetSnapshotsResult>
    function getSnapshotsOutput(args: GetSnapshotsOutputArgs, opts?: InvokeOutputOptions): Output<GetSnapshotsResult>
    def get_snapshots(name: Optional[str] = None,
                      order_by: Optional[str] = None,
                      organization_id: Optional[str] = None,
                      project_id: Optional[str] = None,
                      tags: Optional[Sequence[str]] = None,
                      volume_id: Optional[str] = None,
                      zone: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetSnapshotsResult
    def get_snapshots_output(name: pulumi.Input[Optional[str]] = None,
                      order_by: pulumi.Input[Optional[str]] = None,
                      organization_id: pulumi.Input[Optional[str]] = None,
                      project_id: pulumi.Input[Optional[str]] = None,
                      tags: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                      volume_id: pulumi.Input[Optional[str]] = None,
                      zone: pulumi.Input[Optional[str]] = None,
                      opts: Optional[InvokeOutputOptions] = None) -> Output[GetSnapshotsResult]
    func GetSnapshots(ctx *Context, args *GetSnapshotsArgs, opts ...InvokeOption) (*GetSnapshotsResult, error)
    func GetSnapshotsOutput(ctx *Context, args *GetSnapshotsOutputArgs, opts ...InvokeOption) GetSnapshotsResultOutput

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

    public static class GetSnapshots 
    {
        public static Task<GetSnapshotsResult> InvokeAsync(GetSnapshotsArgs args, InvokeOptions? opts = null)
        public static Output<GetSnapshotsResult> Invoke(GetSnapshotsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetSnapshotsResult> Invoke(GetSnapshotsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetSnapshotsResult> getSnapshots(GetSnapshotsArgs args, InvokeOptions options)
    public static Output<GetSnapshotsResult> getSnapshots(GetSnapshotsArgs args, InvokeOptions options)
    public static Output<GetSnapshotsResult> getSnapshots(GetSnapshotsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: scaleway:block/getSnapshots:getSnapshots
      arguments:
        # arguments dictionary
    data "scaleway_block_get_snapshots" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    Filter snapshots by their name. Snapshots with a matching name are listed.
    OrderBy string
    Criteria to use when ordering the list of snapshots. Possible values are: createdAtAsc (default), createdAtDesc, nameAsc and nameDesc. Use createdAtDesc to get the most recent snapshot first.
    OrganizationId string
    The ID of the Organization the snapshots are associated with, used as filter.
    ProjectId string
    The ID of the Project the snapshots are associated with, used as filter.
    Tags List<string>
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    VolumeId string
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    Zone string
    zone) The zone in which snapshots exist.
    Name string
    Filter snapshots by their name. Snapshots with a matching name are listed.
    OrderBy string
    Criteria to use when ordering the list of snapshots. Possible values are: createdAtAsc (default), createdAtDesc, nameAsc and nameDesc. Use createdAtDesc to get the most recent snapshot first.
    OrganizationId string
    The ID of the Organization the snapshots are associated with, used as filter.
    ProjectId string
    The ID of the Project the snapshots are associated with, used as filter.
    Tags []string
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    VolumeId string
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    Zone string
    zone) The zone in which snapshots exist.
    name string
    Filter snapshots by their name. Snapshots with a matching name are listed.
    order_by string
    Criteria to use when ordering the list of snapshots. Possible values are: createdAtAsc (default), createdAtDesc, nameAsc and nameDesc. Use createdAtDesc to get the most recent snapshot first.
    organization_id string
    The ID of the Organization the snapshots are associated with, used as filter.
    project_id string
    The ID of the Project the snapshots are associated with, used as filter.
    tags list(string)
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    volume_id string
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    zone string
    zone) The zone in which snapshots exist.
    name String
    Filter snapshots by their name. Snapshots with a matching name are listed.
    orderBy String
    Criteria to use when ordering the list of snapshots. Possible values are: createdAtAsc (default), createdAtDesc, nameAsc and nameDesc. Use createdAtDesc to get the most recent snapshot first.
    organizationId String
    The ID of the Organization the snapshots are associated with, used as filter.
    projectId String
    The ID of the Project the snapshots are associated with, used as filter.
    tags List<String>
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    volumeId String
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    zone String
    zone) The zone in which snapshots exist.
    name string
    Filter snapshots by their name. Snapshots with a matching name are listed.
    orderBy string
    Criteria to use when ordering the list of snapshots. Possible values are: createdAtAsc (default), createdAtDesc, nameAsc and nameDesc. Use createdAtDesc to get the most recent snapshot first.
    organizationId string
    The ID of the Organization the snapshots are associated with, used as filter.
    projectId string
    The ID of the Project the snapshots are associated with, used as filter.
    tags string[]
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    volumeId string
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    zone string
    zone) The zone in which snapshots exist.
    name str
    Filter snapshots by their name. Snapshots with a matching name are listed.
    order_by str
    Criteria to use when ordering the list of snapshots. Possible values are: createdAtAsc (default), createdAtDesc, nameAsc and nameDesc. Use createdAtDesc to get the most recent snapshot first.
    organization_id str
    The ID of the Organization the snapshots are associated with, used as filter.
    project_id str
    The ID of the Project the snapshots are associated with, used as filter.
    tags Sequence[str]
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    volume_id str
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    zone str
    zone) The zone in which snapshots exist.
    name String
    Filter snapshots by their name. Snapshots with a matching name are listed.
    orderBy String
    Criteria to use when ordering the list of snapshots. Possible values are: createdAtAsc (default), createdAtDesc, nameAsc and nameDesc. Use createdAtDesc to get the most recent snapshot first.
    organizationId String
    The ID of the Organization the snapshots are associated with, used as filter.
    projectId String
    The ID of the Project the snapshots are associated with, used as filter.
    tags List<String>
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    volumeId String
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    zone String
    zone) The zone in which snapshots exist.

    getSnapshots Result

    The following output properties are available:

    Snapshots List<Pulumiverse.Scaleway.Block.Outputs.GetSnapshotsSnapshot>
    List of snapshots matching the filters. Empty when no snapshot matches.
    Zone string
    The zone in which the snapshot is.
    Name string
    The name of the snapshot.
    OrderBy string
    OrganizationId string
    ProjectId string
    The ID of the Project the snapshot is associated with.
    Tags List<string>
    The list of tags assigned to the snapshot.
    VolumeId string
    The ID of the volume from which the snapshot was created. Empty if the parent volume was deleted.
    Snapshots []GetSnapshotsSnapshot
    List of snapshots matching the filters. Empty when no snapshot matches.
    Zone string
    The zone in which the snapshot is.
    Name string
    The name of the snapshot.
    OrderBy string
    OrganizationId string
    ProjectId string
    The ID of the Project the snapshot is associated with.
    Tags []string
    The list of tags assigned to the snapshot.
    VolumeId string
    The ID of the volume from which the snapshot was created. Empty if the parent volume was deleted.
    snapshots list(object)
    List of snapshots matching the filters. Empty when no snapshot matches.
    zone string
    The zone in which the snapshot is.
    name string
    The name of the snapshot.
    order_by string
    organization_id string
    project_id string
    The ID of the Project the snapshot is associated with.
    tags list(string)
    The list of tags assigned to the snapshot.
    volume_id string
    The ID of the volume from which the snapshot was created. Empty if the parent volume was deleted.
    snapshots List<GetSnapshotsSnapshot>
    List of snapshots matching the filters. Empty when no snapshot matches.
    zone String
    The zone in which the snapshot is.
    name String
    The name of the snapshot.
    orderBy String
    organizationId String
    projectId String
    The ID of the Project the snapshot is associated with.
    tags List<String>
    The list of tags assigned to the snapshot.
    volumeId String
    The ID of the volume from which the snapshot was created. Empty if the parent volume was deleted.
    snapshots GetSnapshotsSnapshot[]
    List of snapshots matching the filters. Empty when no snapshot matches.
    zone string
    The zone in which the snapshot is.
    name string
    The name of the snapshot.
    orderBy string
    organizationId string
    projectId string
    The ID of the Project the snapshot is associated with.
    tags string[]
    The list of tags assigned to the snapshot.
    volumeId string
    The ID of the volume from which the snapshot was created. Empty if the parent volume was deleted.
    snapshots Sequence[GetSnapshotsSnapshot]
    List of snapshots matching the filters. Empty when no snapshot matches.
    zone str
    The zone in which the snapshot is.
    name str
    The name of the snapshot.
    order_by str
    organization_id str
    project_id str
    The ID of the Project the snapshot is associated with.
    tags Sequence[str]
    The list of tags assigned to the snapshot.
    volume_id str
    The ID of the volume from which the snapshot was created. Empty if the parent volume was deleted.
    snapshots List<Property Map>
    List of snapshots matching the filters. Empty when no snapshot matches.
    zone String
    The zone in which the snapshot is.
    name String
    The name of the snapshot.
    orderBy String
    organizationId String
    projectId String
    The ID of the Project the snapshot is associated with.
    tags List<String>
    The list of tags assigned to the snapshot.
    volumeId String
    The ID of the volume from which the snapshot was created. Empty if the parent volume was deleted.

    Supporting Types

    GetSnapshotsSnapshot

    Id string
    The ID of the snapshot in the zone/uuid format.
    Name string
    Filter snapshots by their name. Snapshots with a matching name are listed.
    ProjectId string
    The ID of the Project the snapshots are associated with, used as filter.
    Srn string
    The Scaleway Resource Name (SRN) of the snapshot.
    Tags List<string>
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    VolumeId string
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    Zone string
    zone) The zone in which snapshots exist.
    Id string
    The ID of the snapshot in the zone/uuid format.
    Name string
    Filter snapshots by their name. Snapshots with a matching name are listed.
    ProjectId string
    The ID of the Project the snapshots are associated with, used as filter.
    Srn string
    The Scaleway Resource Name (SRN) of the snapshot.
    Tags []string
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    VolumeId string
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    Zone string
    zone) The zone in which snapshots exist.
    id string
    The ID of the snapshot in the zone/uuid format.
    name string
    Filter snapshots by their name. Snapshots with a matching name are listed.
    project_id string
    The ID of the Project the snapshots are associated with, used as filter.
    srn string
    The Scaleway Resource Name (SRN) of the snapshot.
    tags list(string)
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    volume_id string
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    zone string
    zone) The zone in which snapshots exist.
    id String
    The ID of the snapshot in the zone/uuid format.
    name String
    Filter snapshots by their name. Snapshots with a matching name are listed.
    projectId String
    The ID of the Project the snapshots are associated with, used as filter.
    srn String
    The Scaleway Resource Name (SRN) of the snapshot.
    tags List<String>
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    volumeId String
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    zone String
    zone) The zone in which snapshots exist.
    id string
    The ID of the snapshot in the zone/uuid format.
    name string
    Filter snapshots by their name. Snapshots with a matching name are listed.
    projectId string
    The ID of the Project the snapshots are associated with, used as filter.
    srn string
    The Scaleway Resource Name (SRN) of the snapshot.
    tags string[]
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    volumeId string
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    zone string
    zone) The zone in which snapshots exist.
    id str
    The ID of the snapshot in the zone/uuid format.
    name str
    Filter snapshots by their name. Snapshots with a matching name are listed.
    project_id str
    The ID of the Project the snapshots are associated with, used as filter.
    srn str
    The Scaleway Resource Name (SRN) of the snapshot.
    tags Sequence[str]
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    volume_id str
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    zone str
    zone) The zone in which snapshots exist.
    id String
    The ID of the snapshot in the zone/uuid format.
    name String
    Filter snapshots by their name. Snapshots with a matching name are listed.
    projectId String
    The ID of the Project the snapshots are associated with, used as filter.
    srn String
    The Scaleway Resource Name (SRN) of the snapshot.
    tags List<String>
    List of tags used as filter. Snapshots with one or more matching tags are listed.
    volumeId String
    The ID of the volume the snapshots were created from, used as filter. Can be a bare UUID or a zoned ID (zone/uuid).
    zone String
    zone) The zone in which snapshots exist.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Viewing docs for Scaleway v1.60.0
    published on Saturday, Oct 24, 2026 by pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial