scaleway logo
Scaleway v1.6.0, Dec 17 22

scaleway.getInstanceSnapshot

Gets information about an instance snapshot.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

return await Deployment.RunAsync(() => 
{
    var byName = Scaleway.GetInstanceSnapshot.Invoke(new()
    {
        Name = "my-snapshot-name",
    });

    var byId = Scaleway.GetInstanceSnapshot.Invoke(new()
    {
        SnapshotId = "11111111-1111-1111-1111-111111111111",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err = scaleway.LookupInstanceSnapshot(ctx, &scaleway.LookupInstanceSnapshotArgs{
			Name: pulumi.StringRef("my-snapshot-name"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = scaleway.LookupInstanceSnapshot(ctx, &scaleway.LookupInstanceSnapshotArgs{
			SnapshotId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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.GetInstanceSnapshotArgs;
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 byName = ScalewayFunctions.getInstanceSnapshot(GetInstanceSnapshotArgs.builder()
            .name("my-snapshot-name")
            .build());

        final var byId = ScalewayFunctions.getInstanceSnapshot(GetInstanceSnapshotArgs.builder()
            .snapshotId("11111111-1111-1111-1111-111111111111")
            .build());

    }
}
import pulumi
import pulumi_scaleway as scaleway

by_name = scaleway.get_instance_snapshot(name="my-snapshot-name")
by_id = scaleway.get_instance_snapshot(snapshot_id="11111111-1111-1111-1111-111111111111")
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";

const byName = scaleway.getInstanceSnapshot({
    name: "my-snapshot-name",
});
const byId = scaleway.getInstanceSnapshot({
    snapshotId: "11111111-1111-1111-1111-111111111111",
});
variables:
  byName:
    fn::invoke:
      Function: scaleway:getInstanceSnapshot
      Arguments:
        name: my-snapshot-name
  byId:
    fn::invoke:
      Function: scaleway:getInstanceSnapshot
      Arguments:
        snapshotId: 11111111-1111-1111-1111-111111111111

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

> 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)
}
public static CompletableFuture<GetInstanceSnapshotResult> getInstanceSnapshot(GetInstanceSnapshotArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: scaleway:index/getInstanceSnapshot:getInstanceSnapshot
  arguments:
    # arguments dictionary

The following arguments are supported:

Name string

The snapshot name. Only one of name and snapshot_id should be specified.

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.

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.

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.

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.

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.

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<Lbrlabs.PulumiPackage.Scaleway.Outputs.GetInstanceSnapshotImport>
OrganizationId string
ProjectId string
SizeInGb int
Tags List<string>
Type string
VolumeId string
Name string
SnapshotId string
Zone string
CreatedAt string
Id string

The provider-assigned unique ID for this managed resource.

Imports []GetInstanceSnapshotImport
OrganizationId string
ProjectId string
SizeInGb int
Tags []string
Type string
VolumeId string
Name string
SnapshotId string
Zone string
createdAt String
id String

The provider-assigned unique ID for this managed resource.

imports List<GetInstanceSnapshotImport>
organizationId String
projectId String
sizeInGb Integer
tags List<String>
type String
volumeId String
name String
snapshotId String
zone String
createdAt string
id string

The provider-assigned unique ID for this managed resource.

imports GetInstanceSnapshotImport[]
organizationId string
projectId string
sizeInGb number
tags string[]
type string
volumeId string
name 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
project_id str
size_in_gb int
tags Sequence[str]
type str
volume_id str
name 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
projectId String
sizeInGb Number
tags List<String>
type String
volumeId String
name String
snapshotId String
zone String

Supporting Types

GetInstanceSnapshotImport

Bucket string
Key string
Bucket string
Key string
bucket String
key String
bucket string
key string
bucket str
key str
bucket String
key String

Package Details

Repository
scaleway lbrlabs/pulumi-scaleway
License
Apache-2.0
Notes

This Pulumi package is based on the scaleway Terraform Provider.