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

scaleway.getInstanceSnapshot

Explore with Pulumi AI

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

    Gets information about an instance snapshot.

    Example Usage

    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",
    });
    
    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")
    
    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.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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    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 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());
    
        }
    }
    
    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,
                              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]
    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.
    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 string
    Bucket containing qcow
    Key string
    Key of the qcow file in the specified bucket
    Bucket string
    Bucket containing qcow
    Key string
    Key of the qcow file in the specified bucket
    bucket String
    Bucket containing qcow
    key String
    Key of the qcow file in the specified bucket
    bucket string
    Bucket containing qcow
    key string
    Key of the qcow file in the specified bucket
    bucket str
    Bucket containing qcow
    key str
    Key of the qcow file in the specified bucket
    bucket String
    Bucket containing qcow
    key 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.
    scaleway logo
    Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse