1. Packages
  2. Scaleway
  3. API Docs
  4. getInstanceSnapshot
Scaleway v1.27.0 published on Monday, Apr 21, 2025 by pulumiverse

scaleway.getInstanceSnapshot

Explore with Pulumi AI

Deprecated: scaleway.index/getinstancesnapshot.getInstanceSnapshot has been deprecated in favor of scaleway.instance/getsnapshot.getSnapshot

Gets information about an instance snapshot.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";

// Get info by snapshot name
const byName = scaleway.instance.getSnapshot({
    name: "my-snapshot-name",
});
// Get info by snapshot ID
const byId = scaleway.instance.getSnapshot({
    snapshotId: "11111111-1111-1111-1111-111111111111",
});
Copy
import pulumi
import pulumi_scaleway as scaleway

# Get info by snapshot name
by_name = scaleway.instance.get_snapshot(name="my-snapshot-name")
# Get info by snapshot ID
by_id = scaleway.instance.get_snapshot(snapshot_id="11111111-1111-1111-1111-111111111111")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/instance"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Get info by snapshot name
		_, err := instance.LookupSnapshot(ctx, &instance.LookupSnapshotArgs{
			Name: pulumi.StringRef("my-snapshot-name"),
		}, nil)
		if err != nil {
			return err
		}
		// Get info by snapshot ID
		_, err = instance.LookupSnapshot(ctx, &instance.LookupSnapshotArgs{
			SnapshotId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

return await Deployment.RunAsync(() => 
{
    // Get info by snapshot name
    var byName = Scaleway.Instance.GetSnapshot.Invoke(new()
    {
        Name = "my-snapshot-name",
    });

    // Get info by snapshot ID
    var byId = Scaleway.Instance.GetSnapshot.Invoke(new()
    {
        SnapshotId = "11111111-1111-1111-1111-111111111111",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.instance.InstanceFunctions;
import com.pulumi.scaleway.instance.inputs.GetSnapshotArgs;
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) {
        // Get info by snapshot name
        final var byName = InstanceFunctions.getSnapshot(GetSnapshotArgs.builder()
            .name("my-snapshot-name")
            .build());

        // Get info by snapshot ID
        final var byId = InstanceFunctions.getSnapshot(GetSnapshotArgs.builder()
            .snapshotId("11111111-1111-1111-1111-111111111111")
            .build());

    }
}
Copy
variables:
  # Get info by snapshot name
  byName:
    fn::invoke:
      function: scaleway:instance:getSnapshot
      arguments:
        name: my-snapshot-name
  # Get info by snapshot ID
  byId:
    fn::invoke:
      function: scaleway:instance:getSnapshot
      arguments:
        snapshotId: 11111111-1111-1111-1111-111111111111
Copy

Using getInstanceSnapshot

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 getInstanceSnapshot(args: GetInstanceSnapshotArgs, opts?: InvokeOptions): Promise<GetInstanceSnapshotResult>
function getInstanceSnapshotOutput(args: GetInstanceSnapshotOutputArgs, opts?: InvokeOptions): Output<GetInstanceSnapshotResult>
Copy
def get_instance_snapshot(name: Optional[str] = None,
                          project_id: Optional[str] = None,
                          snapshot_id: Optional[str] = None,
                          zone: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetInstanceSnapshotResult
def get_instance_snapshot_output(name: Optional[pulumi.Input[str]] = None,
                          project_id: Optional[pulumi.Input[str]] = None,
                          snapshot_id: Optional[pulumi.Input[str]] = None,
                          zone: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetInstanceSnapshotResult]
Copy
func LookupInstanceSnapshot(ctx *Context, args *LookupInstanceSnapshotArgs, opts ...InvokeOption) (*LookupInstanceSnapshotResult, error)
func LookupInstanceSnapshotOutput(ctx *Context, args *LookupInstanceSnapshotOutputArgs, opts ...InvokeOption) LookupInstanceSnapshotResultOutput
Copy

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

public static class GetInstanceSnapshot 
{
    public static Task<GetInstanceSnapshotResult> InvokeAsync(GetInstanceSnapshotArgs args, InvokeOptions? opts = null)
    public static Output<GetInstanceSnapshotResult> Invoke(GetInstanceSnapshotInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetInstanceSnapshotResult> getInstanceSnapshot(GetInstanceSnapshotArgs args, InvokeOptions options)
public static Output<GetInstanceSnapshotResult> getInstanceSnapshot(GetInstanceSnapshotArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:index/getInstanceSnapshot:getInstanceSnapshot
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name string
The snapshot name. Only one of name and snapshot_id should be specified.
ProjectId string
project_id) The ID of the project the snapshot is associated with.
SnapshotId string
The snapshot id. Only one of name and snapshot_id should be specified.
Zone string
zone) The zone in which the snapshot exists.
Name string
The snapshot name. Only one of name and snapshot_id should be specified.
ProjectId string
project_id) The ID of the project the snapshot is associated with.
SnapshotId string
The snapshot id. Only one of name and snapshot_id should be specified.
Zone string
zone) The zone in which the snapshot exists.
name String
The snapshot name. Only one of name and snapshot_id should be specified.
projectId String
project_id) The ID of the project the snapshot is associated with.
snapshotId String
The snapshot id. Only one of name and snapshot_id should be specified.
zone String
zone) The zone in which the snapshot exists.
name string
The snapshot name. Only one of name and snapshot_id should be specified.
projectId string
project_id) The ID of the project the snapshot is associated with.
snapshotId string
The snapshot id. Only one of name and snapshot_id should be specified.
zone string
zone) The zone in which the snapshot exists.
name str
The snapshot name. Only one of name and snapshot_id should be specified.
project_id str
project_id) The ID of the project the snapshot is associated with.
snapshot_id str
The snapshot id. Only one of name and snapshot_id should be specified.
zone str
zone) The zone in which the snapshot exists.
name String
The snapshot name. Only one of name and snapshot_id should be specified.
projectId String
project_id) The ID of the project the snapshot is associated with.
snapshotId String
The snapshot id. Only one of name and snapshot_id should be specified.
zone String
zone) The zone in which the snapshot exists.

getInstanceSnapshot Result

The following output properties are available:

CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
Imports List<Pulumiverse.Scaleway.Outputs.GetInstanceSnapshotImport>
OrganizationId string
SizeInGb int
Tags List<string>
Type string
VolumeId string
Name string
ProjectId string
SnapshotId string
Zone string
CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
Imports []GetInstanceSnapshotImport
OrganizationId string
SizeInGb int
Tags []string
Type string
VolumeId string
Name string
ProjectId string
SnapshotId string
Zone string
createdAt String
id String
The provider-assigned unique ID for this managed resource.
imports List<GetInstanceSnapshotImport>
organizationId String
sizeInGb Integer
tags List<String>
type String
volumeId String
name String
projectId String
snapshotId String
zone String
createdAt string
id string
The provider-assigned unique ID for this managed resource.
imports GetInstanceSnapshotImport[]
organizationId string
sizeInGb number
tags string[]
type string
volumeId string
name string
projectId string
snapshotId string
zone string
created_at str
id str
The provider-assigned unique ID for this managed resource.
imports Sequence[GetInstanceSnapshotImport]
organization_id str
size_in_gb int
tags Sequence[str]
type str
volume_id str
name str
project_id str
snapshot_id str
zone str
createdAt String
id String
The provider-assigned unique ID for this managed resource.
imports List<Property Map>
organizationId String
sizeInGb Number
tags List<String>
type String
volumeId String
name String
projectId String
snapshotId String
zone String

Supporting Types

GetInstanceSnapshotImport

Bucket This property is required. string
Bucket containing qcow
Key This property is required. string
Key of the qcow file in the specified bucket
Bucket This property is required. string
Bucket containing qcow
Key This property is required. string
Key of the qcow file in the specified bucket
bucket This property is required. String
Bucket containing qcow
key This property is required. String
Key of the qcow file in the specified bucket
bucket This property is required. string
Bucket containing qcow
key This property is required. string
Key of the qcow file in the specified bucket
bucket This property is required. str
Bucket containing qcow
key This property is required. str
Key of the qcow file in the specified bucket
bucket This property is required. String
Bucket containing qcow
key This property is required. String
Key of the qcow file in the specified bucket

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.