1. Packages
  2. Scaleway
  3. API Docs
  4. InstanceSnapshot
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

scaleway.InstanceSnapshot

Explore with Pulumi AI

scaleway logo
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

    Creates and manages Scaleway Compute Snapshots. For more information, see the documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.InstanceSnapshot("main", {
        name: "some-snapshot-name",
        volumeId: "11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.InstanceSnapshot("main",
        name="some-snapshot-name",
        volume_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.NewInstanceSnapshot(ctx, "main", &scaleway.InstanceSnapshotArgs{
    			Name:     pulumi.String("some-snapshot-name"),
    			VolumeId: pulumi.String("11111111-1111-1111-1111-111111111111"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.InstanceSnapshot("main", new()
        {
            Name = "some-snapshot-name",
            VolumeId = "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.InstanceSnapshot;
    import com.pulumi.scaleway.InstanceSnapshotArgs;
    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) {
            var main = new InstanceSnapshot("main", InstanceSnapshotArgs.builder()
                .name("some-snapshot-name")
                .volumeId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:InstanceSnapshot
        properties:
          name: some-snapshot-name
          volumeId: 11111111-1111-1111-1111-111111111111
    

    Example with Unified type snapshot

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.InstanceVolume("main", {
        type: "l_ssd",
        sizeInGb: 10,
    });
    const mainInstanceServer = new scaleway.InstanceServer("main", {
        image: "ubuntu_jammy",
        type: "DEV1-S",
        rootVolume: {
            sizeInGb: 10,
            volumeType: "l_ssd",
        },
        additionalVolumeIds: [main.id],
    });
    const mainInstanceSnapshot = new scaleway.InstanceSnapshot("main", {
        volumeId: main.id,
        type: "unified",
    }, {
        dependsOn: [mainInstanceServer],
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.InstanceVolume("main",
        type="l_ssd",
        size_in_gb=10)
    main_instance_server = scaleway.InstanceServer("main",
        image="ubuntu_jammy",
        type="DEV1-S",
        root_volume={
            "size_in_gb": 10,
            "volume_type": "l_ssd",
        },
        additional_volume_ids=[main.id])
    main_instance_snapshot = scaleway.InstanceSnapshot("main",
        volume_id=main.id,
        type="unified",
        opts = pulumi.ResourceOptions(depends_on=[main_instance_server]))
    
    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 {
    		main, err := scaleway.NewInstanceVolume(ctx, "main", &scaleway.InstanceVolumeArgs{
    			Type:     pulumi.String("l_ssd"),
    			SizeInGb: pulumi.Int(10),
    		})
    		if err != nil {
    			return err
    		}
    		mainInstanceServer, err := scaleway.NewInstanceServer(ctx, "main", &scaleway.InstanceServerArgs{
    			Image: pulumi.String("ubuntu_jammy"),
    			Type:  pulumi.String("DEV1-S"),
    			RootVolume: &scaleway.InstanceServerRootVolumeArgs{
    				SizeInGb:   pulumi.Int(10),
    				VolumeType: pulumi.String("l_ssd"),
    			},
    			AdditionalVolumeIds: pulumi.StringArray{
    				main.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewInstanceSnapshot(ctx, "main", &scaleway.InstanceSnapshotArgs{
    			VolumeId: main.ID(),
    			Type:     pulumi.String("unified"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			mainInstanceServer,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.InstanceVolume("main", new()
        {
            Type = "l_ssd",
            SizeInGb = 10,
        });
    
        var mainInstanceServer = new Scaleway.InstanceServer("main", new()
        {
            Image = "ubuntu_jammy",
            Type = "DEV1-S",
            RootVolume = new Scaleway.Inputs.InstanceServerRootVolumeArgs
            {
                SizeInGb = 10,
                VolumeType = "l_ssd",
            },
            AdditionalVolumeIds = new[]
            {
                main.Id,
            },
        });
    
        var mainInstanceSnapshot = new Scaleway.InstanceSnapshot("main", new()
        {
            VolumeId = main.Id,
            Type = "unified",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                mainInstanceServer,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.InstanceVolume;
    import com.pulumi.scaleway.InstanceVolumeArgs;
    import com.pulumi.scaleway.InstanceServer;
    import com.pulumi.scaleway.InstanceServerArgs;
    import com.pulumi.scaleway.inputs.InstanceServerRootVolumeArgs;
    import com.pulumi.scaleway.InstanceSnapshot;
    import com.pulumi.scaleway.InstanceSnapshotArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            var main = new InstanceVolume("main", InstanceVolumeArgs.builder()
                .type("l_ssd")
                .sizeInGb(10)
                .build());
    
            var mainInstanceServer = new InstanceServer("mainInstanceServer", InstanceServerArgs.builder()
                .image("ubuntu_jammy")
                .type("DEV1-S")
                .rootVolume(InstanceServerRootVolumeArgs.builder()
                    .sizeInGb(10)
                    .volumeType("l_ssd")
                    .build())
                .additionalVolumeIds(main.id())
                .build());
    
            var mainInstanceSnapshot = new InstanceSnapshot("mainInstanceSnapshot", InstanceSnapshotArgs.builder()
                .volumeId(main.id())
                .type("unified")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(mainInstanceServer)
                    .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:InstanceVolume
        properties:
          type: l_ssd
          sizeInGb: 10
      mainInstanceServer:
        type: scaleway:InstanceServer
        name: main
        properties:
          image: ubuntu_jammy
          type: DEV1-S
          rootVolume:
            sizeInGb: 10
            volumeType: l_ssd
          additionalVolumeIds:
            - ${main.id}
      mainInstanceSnapshot:
        type: scaleway:InstanceSnapshot
        name: main
        properties:
          volumeId: ${main.id}
          type: unified
        options:
          dependson:
            - ${mainInstanceServer}
    

    Example importing a local qcow2 file

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const bucket = new scaleway.ObjectBucket("bucket", {name: "snapshot-qcow-import"});
    const qcow = new scaleway.ObjectItem("qcow", {
        bucket: bucket.name,
        key: "server.qcow2",
        file: "myqcow.qcow2",
    });
    const snapshot = new scaleway.InstanceSnapshot("snapshot", {
        type: "unified",
        "import": {
            bucket: qcow.bucket,
            key: qcow.key,
        },
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    bucket = scaleway.ObjectBucket("bucket", name="snapshot-qcow-import")
    qcow = scaleway.ObjectItem("qcow",
        bucket=bucket.name,
        key="server.qcow2",
        file="myqcow.qcow2")
    snapshot = scaleway.InstanceSnapshot("snapshot",
        type="unified",
        import_={
            "bucket": qcow.bucket,
            "key": qcow.key,
        })
    
    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 {
    		bucket, err := scaleway.NewObjectBucket(ctx, "bucket", &scaleway.ObjectBucketArgs{
    			Name: pulumi.String("snapshot-qcow-import"),
    		})
    		if err != nil {
    			return err
    		}
    		qcow, err := scaleway.NewObjectItem(ctx, "qcow", &scaleway.ObjectItemArgs{
    			Bucket: bucket.Name,
    			Key:    pulumi.String("server.qcow2"),
    			File:   pulumi.String("myqcow.qcow2"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewInstanceSnapshot(ctx, "snapshot", &scaleway.InstanceSnapshotArgs{
    			Type: pulumi.String("unified"),
    			Import: &scaleway.InstanceSnapshotImportArgs{
    				Bucket: qcow.Bucket,
    				Key:    qcow.Key,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var bucket = new Scaleway.ObjectBucket("bucket", new()
        {
            Name = "snapshot-qcow-import",
        });
    
        var qcow = new Scaleway.ObjectItem("qcow", new()
        {
            Bucket = bucket.Name,
            Key = "server.qcow2",
            File = "myqcow.qcow2",
        });
    
        var snapshot = new Scaleway.InstanceSnapshot("snapshot", new()
        {
            Type = "unified",
            Import = new Scaleway.Inputs.InstanceSnapshotImportArgs
            {
                Bucket = qcow.Bucket,
                Key = qcow.Key,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ObjectBucket;
    import com.pulumi.scaleway.ObjectBucketArgs;
    import com.pulumi.scaleway.ObjectItem;
    import com.pulumi.scaleway.ObjectItemArgs;
    import com.pulumi.scaleway.InstanceSnapshot;
    import com.pulumi.scaleway.InstanceSnapshotArgs;
    import com.pulumi.scaleway.inputs.InstanceSnapshotImportArgs;
    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) {
            var bucket = new ObjectBucket("bucket", ObjectBucketArgs.builder()
                .name("snapshot-qcow-import")
                .build());
    
            var qcow = new ObjectItem("qcow", ObjectItemArgs.builder()
                .bucket(bucket.name())
                .key("server.qcow2")
                .file("myqcow.qcow2")
                .build());
    
            var snapshot = new InstanceSnapshot("snapshot", InstanceSnapshotArgs.builder()
                .type("unified")
                .import_(InstanceSnapshotImportArgs.builder()
                    .bucket(qcow.bucket())
                    .key(qcow.key())
                    .build())
                .build());
    
        }
    }
    
    resources:
      bucket:
        type: scaleway:ObjectBucket
        properties:
          name: snapshot-qcow-import
      qcow:
        type: scaleway:ObjectItem
        properties:
          bucket: ${bucket.name}
          key: server.qcow2
          file: myqcow.qcow2
      snapshot:
        type: scaleway:InstanceSnapshot
        properties:
          type: unified
          import:
            bucket: ${qcow.bucket}
            key: ${qcow.key}
    

    Create InstanceSnapshot Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new InstanceSnapshot(name: string, args?: InstanceSnapshotArgs, opts?: CustomResourceOptions);
    @overload
    def InstanceSnapshot(resource_name: str,
                         args: Optional[InstanceSnapshotArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def InstanceSnapshot(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         import_: Optional[InstanceSnapshotImportArgs] = None,
                         name: Optional[str] = None,
                         project_id: Optional[str] = None,
                         tags: Optional[Sequence[str]] = None,
                         type: Optional[str] = None,
                         volume_id: Optional[str] = None,
                         zone: Optional[str] = None)
    func NewInstanceSnapshot(ctx *Context, name string, args *InstanceSnapshotArgs, opts ...ResourceOption) (*InstanceSnapshot, error)
    public InstanceSnapshot(string name, InstanceSnapshotArgs? args = null, CustomResourceOptions? opts = null)
    public InstanceSnapshot(String name, InstanceSnapshotArgs args)
    public InstanceSnapshot(String name, InstanceSnapshotArgs args, CustomResourceOptions options)
    
    type: scaleway:InstanceSnapshot
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args InstanceSnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args InstanceSnapshotArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args InstanceSnapshotArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceSnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceSnapshotArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var instanceSnapshotResource = new Scaleway.InstanceSnapshot("instanceSnapshotResource", new()
    {
        Import = new Scaleway.Inputs.InstanceSnapshotImportArgs
        {
            Bucket = "string",
            Key = "string",
        },
        Name = "string",
        ProjectId = "string",
        Tags = new[]
        {
            "string",
        },
        Type = "string",
        VolumeId = "string",
        Zone = "string",
    });
    
    example, err := scaleway.NewInstanceSnapshot(ctx, "instanceSnapshotResource", &scaleway.InstanceSnapshotArgs{
    	Import: &scaleway.InstanceSnapshotImportArgs{
    		Bucket: pulumi.String("string"),
    		Key:    pulumi.String("string"),
    	},
    	Name:      pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Type:     pulumi.String("string"),
    	VolumeId: pulumi.String("string"),
    	Zone:     pulumi.String("string"),
    })
    
    var instanceSnapshotResource = new InstanceSnapshot("instanceSnapshotResource", InstanceSnapshotArgs.builder()
        .import_(InstanceSnapshotImportArgs.builder()
            .bucket("string")
            .key("string")
            .build())
        .name("string")
        .projectId("string")
        .tags("string")
        .type("string")
        .volumeId("string")
        .zone("string")
        .build());
    
    instance_snapshot_resource = scaleway.InstanceSnapshot("instanceSnapshotResource",
        import_={
            "bucket": "string",
            "key": "string",
        },
        name="string",
        project_id="string",
        tags=["string"],
        type="string",
        volume_id="string",
        zone="string")
    
    const instanceSnapshotResource = new scaleway.InstanceSnapshot("instanceSnapshotResource", {
        "import": {
            bucket: "string",
            key: "string",
        },
        name: "string",
        projectId: "string",
        tags: ["string"],
        type: "string",
        volumeId: "string",
        zone: "string",
    });
    
    type: scaleway:InstanceSnapshot
    properties:
        import:
            bucket: string
            key: string
        name: string
        projectId: string
        tags:
            - string
        type: string
        volumeId: string
        zone: string
    

    InstanceSnapshot Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The InstanceSnapshot resource accepts the following input properties:

    Import Pulumiverse.Scaleway.Inputs.InstanceSnapshotImport
    Import a snapshot from a qcow2 file located in a bucket
    Name string
    The name of the snapshot. If not provided it will be randomly generated.
    ProjectId string
    project_id) The ID of the project the snapshot is associated with.
    Tags List<string>
    A list of tags to apply to the snapshot.
    Type string
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    VolumeId string
    The ID of the volume to take a snapshot from.
    Zone string
    zone) The zone in which the snapshot should be created.
    Import InstanceSnapshotImportArgs
    Import a snapshot from a qcow2 file located in a bucket
    Name string
    The name of the snapshot. If not provided it will be randomly generated.
    ProjectId string
    project_id) The ID of the project the snapshot is associated with.
    Tags []string
    A list of tags to apply to the snapshot.
    Type string
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    VolumeId string
    The ID of the volume to take a snapshot from.
    Zone string
    zone) The zone in which the snapshot should be created.
    import_ InstanceSnapshotImport
    Import a snapshot from a qcow2 file located in a bucket
    name String
    The name of the snapshot. If not provided it will be randomly generated.
    projectId String
    project_id) The ID of the project the snapshot is associated with.
    tags List<String>
    A list of tags to apply to the snapshot.
    type String
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    volumeId String
    The ID of the volume to take a snapshot from.
    zone String
    zone) The zone in which the snapshot should be created.
    import InstanceSnapshotImport
    Import a snapshot from a qcow2 file located in a bucket
    name string
    The name of the snapshot. If not provided it will be randomly generated.
    projectId string
    project_id) The ID of the project the snapshot is associated with.
    tags string[]
    A list of tags to apply to the snapshot.
    type string
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    volumeId string
    The ID of the volume to take a snapshot from.
    zone string
    zone) The zone in which the snapshot should be created.
    import_ InstanceSnapshotImportArgs
    Import a snapshot from a qcow2 file located in a bucket
    name str
    The name of the snapshot. If not provided it will be randomly generated.
    project_id str
    project_id) The ID of the project the snapshot is associated with.
    tags Sequence[str]
    A list of tags to apply to the snapshot.
    type str
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    volume_id str
    The ID of the volume to take a snapshot from.
    zone str
    zone) The zone in which the snapshot should be created.
    import Property Map
    Import a snapshot from a qcow2 file located in a bucket
    name String
    The name of the snapshot. If not provided it will be randomly generated.
    projectId String
    project_id) The ID of the project the snapshot is associated with.
    tags List<String>
    A list of tags to apply to the snapshot.
    type String
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    volumeId String
    The ID of the volume to take a snapshot from.
    zone String
    zone) The zone in which the snapshot should be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the InstanceSnapshot resource produces the following output properties:

    CreatedAt string
    The snapshot creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The organization ID the snapshot is associated with.
    SizeInGb int
    (Optional) The size of the snapshot.
    CreatedAt string
    The snapshot creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The organization ID the snapshot is associated with.
    SizeInGb int
    (Optional) The size of the snapshot.
    createdAt String
    The snapshot creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The organization ID the snapshot is associated with.
    sizeInGb Integer
    (Optional) The size of the snapshot.
    createdAt string
    The snapshot creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    organizationId string
    The organization ID the snapshot is associated with.
    sizeInGb number
    (Optional) The size of the snapshot.
    created_at str
    The snapshot creation time.
    id str
    The provider-assigned unique ID for this managed resource.
    organization_id str
    The organization ID the snapshot is associated with.
    size_in_gb int
    (Optional) The size of the snapshot.
    createdAt String
    The snapshot creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The organization ID the snapshot is associated with.
    sizeInGb Number
    (Optional) The size of the snapshot.

    Look up Existing InstanceSnapshot Resource

    Get an existing InstanceSnapshot resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: InstanceSnapshotState, opts?: CustomResourceOptions): InstanceSnapshot
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            import_: Optional[InstanceSnapshotImportArgs] = None,
            name: Optional[str] = None,
            organization_id: Optional[str] = None,
            project_id: Optional[str] = None,
            size_in_gb: Optional[int] = None,
            tags: Optional[Sequence[str]] = None,
            type: Optional[str] = None,
            volume_id: Optional[str] = None,
            zone: Optional[str] = None) -> InstanceSnapshot
    func GetInstanceSnapshot(ctx *Context, name string, id IDInput, state *InstanceSnapshotState, opts ...ResourceOption) (*InstanceSnapshot, error)
    public static InstanceSnapshot Get(string name, Input<string> id, InstanceSnapshotState? state, CustomResourceOptions? opts = null)
    public static InstanceSnapshot get(String name, Output<String> id, InstanceSnapshotState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreatedAt string
    The snapshot creation time.
    Import Pulumiverse.Scaleway.Inputs.InstanceSnapshotImport
    Import a snapshot from a qcow2 file located in a bucket
    Name string
    The name of the snapshot. If not provided it will be randomly generated.
    OrganizationId string
    The organization ID the snapshot is associated with.
    ProjectId string
    project_id) The ID of the project the snapshot is associated with.
    SizeInGb int
    (Optional) The size of the snapshot.
    Tags List<string>
    A list of tags to apply to the snapshot.
    Type string
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    VolumeId string
    The ID of the volume to take a snapshot from.
    Zone string
    zone) The zone in which the snapshot should be created.
    CreatedAt string
    The snapshot creation time.
    Import InstanceSnapshotImportArgs
    Import a snapshot from a qcow2 file located in a bucket
    Name string
    The name of the snapshot. If not provided it will be randomly generated.
    OrganizationId string
    The organization ID the snapshot is associated with.
    ProjectId string
    project_id) The ID of the project the snapshot is associated with.
    SizeInGb int
    (Optional) The size of the snapshot.
    Tags []string
    A list of tags to apply to the snapshot.
    Type string
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    VolumeId string
    The ID of the volume to take a snapshot from.
    Zone string
    zone) The zone in which the snapshot should be created.
    createdAt String
    The snapshot creation time.
    import_ InstanceSnapshotImport
    Import a snapshot from a qcow2 file located in a bucket
    name String
    The name of the snapshot. If not provided it will be randomly generated.
    organizationId String
    The organization ID the snapshot is associated with.
    projectId String
    project_id) The ID of the project the snapshot is associated with.
    sizeInGb Integer
    (Optional) The size of the snapshot.
    tags List<String>
    A list of tags to apply to the snapshot.
    type String
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    volumeId String
    The ID of the volume to take a snapshot from.
    zone String
    zone) The zone in which the snapshot should be created.
    createdAt string
    The snapshot creation time.
    import InstanceSnapshotImport
    Import a snapshot from a qcow2 file located in a bucket
    name string
    The name of the snapshot. If not provided it will be randomly generated.
    organizationId string
    The organization ID the snapshot is associated with.
    projectId string
    project_id) The ID of the project the snapshot is associated with.
    sizeInGb number
    (Optional) The size of the snapshot.
    tags string[]
    A list of tags to apply to the snapshot.
    type string
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    volumeId string
    The ID of the volume to take a snapshot from.
    zone string
    zone) The zone in which the snapshot should be created.
    created_at str
    The snapshot creation time.
    import_ InstanceSnapshotImportArgs
    Import a snapshot from a qcow2 file located in a bucket
    name str
    The name of the snapshot. If not provided it will be randomly generated.
    organization_id str
    The organization ID the snapshot is associated with.
    project_id str
    project_id) The ID of the project the snapshot is associated with.
    size_in_gb int
    (Optional) The size of the snapshot.
    tags Sequence[str]
    A list of tags to apply to the snapshot.
    type str
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    volume_id str
    The ID of the volume to take a snapshot from.
    zone str
    zone) The zone in which the snapshot should be created.
    createdAt String
    The snapshot creation time.
    import Property Map
    Import a snapshot from a qcow2 file located in a bucket
    name String
    The name of the snapshot. If not provided it will be randomly generated.
    organizationId String
    The organization ID the snapshot is associated with.
    projectId String
    project_id) The ID of the project the snapshot is associated with.
    sizeInGb Number
    (Optional) The size of the snapshot.
    tags List<String>
    A list of tags to apply to the snapshot.
    type String
    The snapshot's volume type. The possible values are: b_ssd (Block SSD), l_ssd (Local SSD) and unified. Updates to this field will recreate a new resource.
    volumeId String
    The ID of the volume to take a snapshot from.
    zone String
    zone) The zone in which the snapshot should be created.

    Supporting Types

    InstanceSnapshotImport, InstanceSnapshotImportArgs

    Bucket string
    Bucket name containing qcow2 to import
    Key string

    Key of the object to import

    Note: The type unified could be instantiated on both l_ssd and b_ssd volumes.

    Bucket string
    Bucket name containing qcow2 to import
    Key string

    Key of the object to import

    Note: The type unified could be instantiated on both l_ssd and b_ssd volumes.

    bucket String
    Bucket name containing qcow2 to import
    key String

    Key of the object to import

    Note: The type unified could be instantiated on both l_ssd and b_ssd volumes.

    bucket string
    Bucket name containing qcow2 to import
    key string

    Key of the object to import

    Note: The type unified could be instantiated on both l_ssd and b_ssd volumes.

    bucket str
    Bucket name containing qcow2 to import
    key str

    Key of the object to import

    Note: The type unified could be instantiated on both l_ssd and b_ssd volumes.

    bucket String
    Bucket name containing qcow2 to import
    key String

    Key of the object to import

    Note: The type unified could be instantiated on both l_ssd and b_ssd volumes.

    Import

    Snapshots can be imported using the {zone}/{id}, e.g.

    bash

    $ pulumi import scaleway:index/instanceSnapshot:InstanceSnapshot main fr-par-1/11111111-1111-1111-1111-111111111111
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.20.0 published on Monday, Nov 4, 2024 by pulumiverse