1. Packages
  2. Scaleway
  3. API Docs
  4. BlockSnapshot
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

scaleway.BlockSnapshot

Explore with Pulumi AI

scaleway logo
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const blockSnapshot = new scaleway.BlockSnapshot("blockSnapshot", {volumeId: "11111111-1111-1111-1111-111111111111"});
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    block_snapshot = scaleway.BlockSnapshot("blockSnapshot", 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.NewBlockSnapshot(ctx, "blockSnapshot", &scaleway.BlockSnapshotArgs{
    			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 blockSnapshot = new Scaleway.BlockSnapshot("blockSnapshot", new()
        {
            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.BlockSnapshot;
    import com.pulumi.scaleway.BlockSnapshotArgs;
    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 blockSnapshot = new BlockSnapshot("blockSnapshot", BlockSnapshotArgs.builder()        
                .volumeId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    resources:
      blockSnapshot:
        type: scaleway:BlockSnapshot
        properties:
          volumeId: 11111111-1111-1111-1111-111111111111
    

    Create BlockSnapshot Resource

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

    Constructor syntax

    new BlockSnapshot(name: string, args: BlockSnapshotArgs, opts?: CustomResourceOptions);
    @overload
    def BlockSnapshot(resource_name: str,
                      args: BlockSnapshotArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def BlockSnapshot(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      volume_id: Optional[str] = None,
                      name: Optional[str] = None,
                      project_id: Optional[str] = None,
                      tags: Optional[Sequence[str]] = None,
                      zone: Optional[str] = None)
    func NewBlockSnapshot(ctx *Context, name string, args BlockSnapshotArgs, opts ...ResourceOption) (*BlockSnapshot, error)
    public BlockSnapshot(string name, BlockSnapshotArgs args, CustomResourceOptions? opts = null)
    public BlockSnapshot(String name, BlockSnapshotArgs args)
    public BlockSnapshot(String name, BlockSnapshotArgs args, CustomResourceOptions options)
    
    type: scaleway:BlockSnapshot
    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 BlockSnapshotArgs
    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 BlockSnapshotArgs
    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 BlockSnapshotArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BlockSnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BlockSnapshotArgs
    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 blockSnapshotResource = new Scaleway.BlockSnapshot("blockSnapshotResource", new()
    {
        VolumeId = "string",
        Name = "string",
        ProjectId = "string",
        Tags = new[]
        {
            "string",
        },
        Zone = "string",
    });
    
    example, err := scaleway.NewBlockSnapshot(ctx, "blockSnapshotResource", &scaleway.BlockSnapshotArgs{
    	VolumeId:  pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Zone: pulumi.String("string"),
    })
    
    var blockSnapshotResource = new BlockSnapshot("blockSnapshotResource", BlockSnapshotArgs.builder()
        .volumeId("string")
        .name("string")
        .projectId("string")
        .tags("string")
        .zone("string")
        .build());
    
    block_snapshot_resource = scaleway.BlockSnapshot("blockSnapshotResource",
        volume_id="string",
        name="string",
        project_id="string",
        tags=["string"],
        zone="string")
    
    const blockSnapshotResource = new scaleway.BlockSnapshot("blockSnapshotResource", {
        volumeId: "string",
        name: "string",
        projectId: "string",
        tags: ["string"],
        zone: "string",
    });
    
    type: scaleway:BlockSnapshot
    properties:
        name: string
        projectId: string
        tags:
            - string
        volumeId: string
        zone: string
    

    BlockSnapshot Resource Properties

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

    Inputs

    The BlockSnapshot resource accepts the following input properties:

    VolumeId string
    The ID of the volume to take a snapshot from.
    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.
    Zone string
    zone) The zone in which the snapshot should be created.
    VolumeId string
    The ID of the volume to take a snapshot from.
    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.
    Zone string
    zone) The zone in which the snapshot should be created.
    volumeId String
    The ID of the volume to take a snapshot from.
    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.
    zone String
    zone) The zone in which the snapshot should be created.
    volumeId string
    The ID of the volume to take a snapshot from.
    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.
    zone string
    zone) The zone in which the snapshot should be created.
    volume_id str
    The ID of the volume to take a snapshot from.
    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.
    zone str
    zone) The zone in which the snapshot should be created.
    volumeId String
    The ID of the volume to take a snapshot from.
    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.
    zone String
    zone) The zone in which the snapshot should be created.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BlockSnapshot Resource

    Get an existing BlockSnapshot 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?: BlockSnapshotState, opts?: CustomResourceOptions): BlockSnapshot
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            volume_id: Optional[str] = None,
            zone: Optional[str] = None) -> BlockSnapshot
    func GetBlockSnapshot(ctx *Context, name string, id IDInput, state *BlockSnapshotState, opts ...ResourceOption) (*BlockSnapshot, error)
    public static BlockSnapshot Get(string name, Input<string> id, BlockSnapshotState? state, CustomResourceOptions? opts = null)
    public static BlockSnapshot get(String name, Output<String> id, BlockSnapshotState 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:
    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.
    VolumeId string
    The ID of the volume to take a snapshot from.
    Zone string
    zone) The zone in which the snapshot should be created.
    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.
    VolumeId string
    The ID of the volume to take a snapshot from.
    Zone string
    zone) The zone in which the snapshot should be created.
    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.
    volumeId String
    The ID of the volume to take a snapshot from.
    zone String
    zone) The zone in which the snapshot should be created.
    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.
    volumeId string
    The ID of the volume to take a snapshot from.
    zone string
    zone) The zone in which the snapshot should be created.
    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.
    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.
    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.
    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

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

    bash

    $ pulumi import scaleway:index/blockSnapshot:BlockSnapshot 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.14.0 published on Thursday, Jun 6, 2024 by pulumiverse