1. Packages
  2. Scaleway
  3. API Docs
  4. getBlockSnapshot
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

scaleway.getBlockSnapshot

Explore with Pulumi AI

scaleway logo
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

    Gets information about a Block Snapshot.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const mySnapshot = scaleway.getBlockSnapshot({
        snapshotId: "11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    my_snapshot = scaleway.get_block_snapshot(snapshot_id="11111111-1111-1111-1111-111111111111")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.LookupBlockSnapshot(ctx, &scaleway.LookupBlockSnapshotArgs{
    			SnapshotId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var mySnapshot = Scaleway.GetBlockSnapshot.Invoke(new()
        {
            SnapshotId = "11111111-1111-1111-1111-111111111111",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetBlockSnapshotArgs;
    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 mySnapshot = ScalewayFunctions.getBlockSnapshot(GetBlockSnapshotArgs.builder()
                .snapshotId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    variables:
      mySnapshot:
        fn::invoke:
          Function: scaleway:getBlockSnapshot
          Arguments:
            snapshotId: 11111111-1111-1111-1111-111111111111
    

    Using getBlockSnapshot

    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 getBlockSnapshot(args: GetBlockSnapshotArgs, opts?: InvokeOptions): Promise<GetBlockSnapshotResult>
    function getBlockSnapshotOutput(args: GetBlockSnapshotOutputArgs, opts?: InvokeOptions): Output<GetBlockSnapshotResult>
    def get_block_snapshot(name: Optional[str] = None,
                           project_id: Optional[str] = None,
                           snapshot_id: Optional[str] = None,
                           volume_id: Optional[str] = None,
                           zone: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetBlockSnapshotResult
    def get_block_snapshot_output(name: Optional[pulumi.Input[str]] = None,
                           project_id: Optional[pulumi.Input[str]] = None,
                           snapshot_id: Optional[pulumi.Input[str]] = None,
                           volume_id: Optional[pulumi.Input[str]] = None,
                           zone: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetBlockSnapshotResult]
    func LookupBlockSnapshot(ctx *Context, args *LookupBlockSnapshotArgs, opts ...InvokeOption) (*LookupBlockSnapshotResult, error)
    func LookupBlockSnapshotOutput(ctx *Context, args *LookupBlockSnapshotOutputArgs, opts ...InvokeOption) LookupBlockSnapshotResultOutput

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

    public static class GetBlockSnapshot 
    {
        public static Task<GetBlockSnapshotResult> InvokeAsync(GetBlockSnapshotArgs args, InvokeOptions? opts = null)
        public static Output<GetBlockSnapshotResult> Invoke(GetBlockSnapshotInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBlockSnapshotResult> getBlockSnapshot(GetBlockSnapshotArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getBlockSnapshot:getBlockSnapshot
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the snapshot. Only one of name and snapshot_id should be specified.
    ProjectId string
    The ID of the project the snapshot is associated with.
    SnapshotId string
    The ID of the snapshot. Only one of name and snapshot_id should be specified.
    VolumeId string
    The ID of the volume from which the snapshot has been created.
    Zone string
    zone) The zone in which the snapshot exists.
    Name string
    The name of the snapshot. Only one of name and snapshot_id should be specified.
    ProjectId string
    The ID of the project the snapshot is associated with.
    SnapshotId string
    The ID of the snapshot. Only one of name and snapshot_id should be specified.
    VolumeId string
    The ID of the volume from which the snapshot has been created.
    Zone string
    zone) The zone in which the snapshot exists.
    name String
    The name of the snapshot. Only one of name and snapshot_id should be specified.
    projectId String
    The ID of the project the snapshot is associated with.
    snapshotId String
    The ID of the snapshot. Only one of name and snapshot_id should be specified.
    volumeId String
    The ID of the volume from which the snapshot has been created.
    zone String
    zone) The zone in which the snapshot exists.
    name string
    The name of the snapshot. Only one of name and snapshot_id should be specified.
    projectId string
    The ID of the project the snapshot is associated with.
    snapshotId string
    The ID of the snapshot. Only one of name and snapshot_id should be specified.
    volumeId string
    The ID of the volume from which the snapshot has been created.
    zone string
    zone) The zone in which the snapshot exists.
    name str
    The name of the snapshot. Only one of name and snapshot_id should be specified.
    project_id str
    The ID of the project the snapshot is associated with.
    snapshot_id str
    The ID of the snapshot. Only one of name and snapshot_id should be specified.
    volume_id str
    The ID of the volume from which the snapshot has been created.
    zone str
    zone) The zone in which the snapshot exists.
    name String
    The name of the snapshot. Only one of name and snapshot_id should be specified.
    projectId String
    The ID of the project the snapshot is associated with.
    snapshotId String
    The ID of the snapshot. Only one of name and snapshot_id should be specified.
    volumeId String
    The ID of the volume from which the snapshot has been created.
    zone String
    zone) The zone in which the snapshot exists.

    getBlockSnapshot Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Tags List<string>
    Name string
    ProjectId string
    SnapshotId string
    VolumeId string
    Zone string
    Id string
    The provider-assigned unique ID for this managed resource.
    Tags []string
    Name string
    ProjectId string
    SnapshotId string
    VolumeId string
    Zone string
    id String
    The provider-assigned unique ID for this managed resource.
    tags List<String>
    name String
    projectId String
    snapshotId String
    volumeId String
    zone String
    id string
    The provider-assigned unique ID for this managed resource.
    tags string[]
    name string
    projectId string
    snapshotId string
    volumeId string
    zone string
    id str
    The provider-assigned unique ID for this managed resource.
    tags Sequence[str]
    name str
    project_id str
    snapshot_id str
    volume_id str
    zone str
    id String
    The provider-assigned unique ID for this managed resource.
    tags List<String>
    name String
    projectId String
    snapshotId String
    volumeId String
    zone String

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse