1. Packages
  2. Scaleway
  3. API Docs
  4. BlockVolume
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

scaleway.BlockVolume

Explore with Pulumi AI

scaleway logo
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const blockVolume = new scaleway.BlockVolume("blockVolume", {
        iops: 5000,
        sizeInGb: 20,
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    block_volume = scaleway.BlockVolume("blockVolume",
        iops=5000,
        size_in_gb=20)
    
    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.NewBlockVolume(ctx, "blockVolume", &scaleway.BlockVolumeArgs{
    			Iops:     pulumi.Int(5000),
    			SizeInGb: pulumi.Int(20),
    		})
    		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 blockVolume = new Scaleway.BlockVolume("blockVolume", new()
        {
            Iops = 5000,
            SizeInGb = 20,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.BlockVolume;
    import com.pulumi.scaleway.BlockVolumeArgs;
    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 blockVolume = new BlockVolume("blockVolume", BlockVolumeArgs.builder()        
                .iops(5000)
                .sizeInGb(20)
                .build());
    
        }
    }
    
    resources:
      blockVolume:
        type: scaleway:BlockVolume
        properties:
          iops: 5000
          sizeInGb: 20
    

    Create BlockVolume Resource

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

    Constructor syntax

    new BlockVolume(name: string, args: BlockVolumeArgs, opts?: CustomResourceOptions);
    @overload
    def BlockVolume(resource_name: str,
                    args: BlockVolumeArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def BlockVolume(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    iops: Optional[int] = None,
                    name: Optional[str] = None,
                    project_id: Optional[str] = None,
                    size_in_gb: Optional[int] = None,
                    snapshot_id: Optional[str] = None,
                    tags: Optional[Sequence[str]] = None,
                    zone: Optional[str] = None)
    func NewBlockVolume(ctx *Context, name string, args BlockVolumeArgs, opts ...ResourceOption) (*BlockVolume, error)
    public BlockVolume(string name, BlockVolumeArgs args, CustomResourceOptions? opts = null)
    public BlockVolume(String name, BlockVolumeArgs args)
    public BlockVolume(String name, BlockVolumeArgs args, CustomResourceOptions options)
    
    type: scaleway:BlockVolume
    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 BlockVolumeArgs
    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 BlockVolumeArgs
    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 BlockVolumeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BlockVolumeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BlockVolumeArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var blockVolumeResource = new Scaleway.BlockVolume("blockVolumeResource", new()
    {
        Iops = 0,
        Name = "string",
        ProjectId = "string",
        SizeInGb = 0,
        SnapshotId = "string",
        Tags = new[]
        {
            "string",
        },
        Zone = "string",
    });
    
    example, err := scaleway.NewBlockVolume(ctx, "blockVolumeResource", &scaleway.BlockVolumeArgs{
    	Iops:       pulumi.Int(0),
    	Name:       pulumi.String("string"),
    	ProjectId:  pulumi.String("string"),
    	SizeInGb:   pulumi.Int(0),
    	SnapshotId: pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Zone: pulumi.String("string"),
    })
    
    var blockVolumeResource = new BlockVolume("blockVolumeResource", BlockVolumeArgs.builder()        
        .iops(0)
        .name("string")
        .projectId("string")
        .sizeInGb(0)
        .snapshotId("string")
        .tags("string")
        .zone("string")
        .build());
    
    block_volume_resource = scaleway.BlockVolume("blockVolumeResource",
        iops=0,
        name="string",
        project_id="string",
        size_in_gb=0,
        snapshot_id="string",
        tags=["string"],
        zone="string")
    
    const blockVolumeResource = new scaleway.BlockVolume("blockVolumeResource", {
        iops: 0,
        name: "string",
        projectId: "string",
        sizeInGb: 0,
        snapshotId: "string",
        tags: ["string"],
        zone: "string",
    });
    
    type: scaleway:BlockVolume
    properties:
        iops: 0
        name: string
        projectId: string
        sizeInGb: 0
        snapshotId: string
        tags:
            - string
        zone: string
    

    BlockVolume 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 BlockVolume resource accepts the following input properties:

    Iops int
    The maximum IO/s expected, must match available options.
    Name string
    The name of the volume. If not provided it will be randomly generated.
    ProjectId string
    project_id) The ID of the project the volume is associated with.
    SizeInGb int
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    SnapshotId string
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    Tags List<string>
    A list of tags to apply to the volume.
    Zone string
    zone) The zone in which the volume should be created.
    Iops int
    The maximum IO/s expected, must match available options.
    Name string
    The name of the volume. If not provided it will be randomly generated.
    ProjectId string
    project_id) The ID of the project the volume is associated with.
    SizeInGb int
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    SnapshotId string
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    Tags []string
    A list of tags to apply to the volume.
    Zone string
    zone) The zone in which the volume should be created.
    iops Integer
    The maximum IO/s expected, must match available options.
    name String
    The name of the volume. If not provided it will be randomly generated.
    projectId String
    project_id) The ID of the project the volume is associated with.
    sizeInGb Integer
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    snapshotId String
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    tags List<String>
    A list of tags to apply to the volume.
    zone String
    zone) The zone in which the volume should be created.
    iops number
    The maximum IO/s expected, must match available options.
    name string
    The name of the volume. If not provided it will be randomly generated.
    projectId string
    project_id) The ID of the project the volume is associated with.
    sizeInGb number
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    snapshotId string
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    tags string[]
    A list of tags to apply to the volume.
    zone string
    zone) The zone in which the volume should be created.
    iops int
    The maximum IO/s expected, must match available options.
    name str
    The name of the volume. If not provided it will be randomly generated.
    project_id str
    project_id) The ID of the project the volume is associated with.
    size_in_gb int
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    snapshot_id str
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    tags Sequence[str]
    A list of tags to apply to the volume.
    zone str
    zone) The zone in which the volume should be created.
    iops Number
    The maximum IO/s expected, must match available options.
    name String
    The name of the volume. If not provided it will be randomly generated.
    projectId String
    project_id) The ID of the project the volume is associated with.
    sizeInGb Number
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    snapshotId String
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    tags List<String>
    A list of tags to apply to the volume.
    zone String
    zone) The zone in which the volume should be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BlockVolume 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 BlockVolume Resource

    Get an existing BlockVolume 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?: BlockVolumeState, opts?: CustomResourceOptions): BlockVolume
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            iops: Optional[int] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            size_in_gb: Optional[int] = None,
            snapshot_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            zone: Optional[str] = None) -> BlockVolume
    func GetBlockVolume(ctx *Context, name string, id IDInput, state *BlockVolumeState, opts ...ResourceOption) (*BlockVolume, error)
    public static BlockVolume Get(string name, Input<string> id, BlockVolumeState? state, CustomResourceOptions? opts = null)
    public static BlockVolume get(String name, Output<String> id, BlockVolumeState 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:
    Iops int
    The maximum IO/s expected, must match available options.
    Name string
    The name of the volume. If not provided it will be randomly generated.
    ProjectId string
    project_id) The ID of the project the volume is associated with.
    SizeInGb int
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    SnapshotId string
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    Tags List<string>
    A list of tags to apply to the volume.
    Zone string
    zone) The zone in which the volume should be created.
    Iops int
    The maximum IO/s expected, must match available options.
    Name string
    The name of the volume. If not provided it will be randomly generated.
    ProjectId string
    project_id) The ID of the project the volume is associated with.
    SizeInGb int
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    SnapshotId string
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    Tags []string
    A list of tags to apply to the volume.
    Zone string
    zone) The zone in which the volume should be created.
    iops Integer
    The maximum IO/s expected, must match available options.
    name String
    The name of the volume. If not provided it will be randomly generated.
    projectId String
    project_id) The ID of the project the volume is associated with.
    sizeInGb Integer
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    snapshotId String
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    tags List<String>
    A list of tags to apply to the volume.
    zone String
    zone) The zone in which the volume should be created.
    iops number
    The maximum IO/s expected, must match available options.
    name string
    The name of the volume. If not provided it will be randomly generated.
    projectId string
    project_id) The ID of the project the volume is associated with.
    sizeInGb number
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    snapshotId string
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    tags string[]
    A list of tags to apply to the volume.
    zone string
    zone) The zone in which the volume should be created.
    iops int
    The maximum IO/s expected, must match available options.
    name str
    The name of the volume. If not provided it will be randomly generated.
    project_id str
    project_id) The ID of the project the volume is associated with.
    size_in_gb int
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    snapshot_id str
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    tags Sequence[str]
    A list of tags to apply to the volume.
    zone str
    zone) The zone in which the volume should be created.
    iops Number
    The maximum IO/s expected, must match available options.
    name String
    The name of the volume. If not provided it will be randomly generated.
    projectId String
    project_id) The ID of the project the volume is associated with.
    sizeInGb Number
    The size of the volume. Only one of size_in_gb, and snapshot_id should be specified.
    snapshotId String
    If set, the new volume will be created from this snapshot. Only one of size_in_gb, snapshot_id should be specified.
    tags List<String>
    A list of tags to apply to the volume.
    zone String
    zone) The zone in which the volume should be created.

    Import

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

    bash

    $ pulumi import scaleway:index/blockVolume:BlockVolume block_volume 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.12.1 published on Monday, Apr 15, 2024 by pulumiverse