Want to learn about running containers in Lambda? Join our free hands-on workshop. Register Now

GetVolume

Provides information about a Linode Volume.

Attributes

The Linode Volume resource exports the following attributes:

  • id - The unique ID of this Volume.

  • created - When this Volume was created.

  • status - The current status of the Volume. Can be one of “creating”, “active”, “resizing”, or “contact_support”.

  • label - This Volume’s label is for display purposes only.

  • tags - An array of tags applied to this object.

  • size - The Volume’s size, in GiB.

  • region - The datacenter in which this Volume is located.

  • updated - When this Volume was last updated.

  • linode_id - If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here. If the Volume is unattached, this value will be null.

  • filesystem_path - The full filesystem path for the Volume based on the Volume’s label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(Linode.GetVolume.InvokeAsync(new Linode.GetVolumeArgs
        {
            Id = 1234567,
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-linode/sdk/v2/go/linode"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := linode.LookupVolume(ctx, &linode.LookupVolumeArgs{
            Id: 1234567,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_linode as linode

foo = linode.get_volume(id=1234567)
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const foo = pulumi.output(linode.getVolume({
    id: 1234567,
}, { async: true }));

Using GetVolume

function getVolume(args: GetVolumeArgs, opts?: InvokeOptions): Promise<GetVolumeResult>
def get_volume(id: Optional[int] = None, opts: Optional[InvokeOptions] = None) -> GetVolumeResult
func LookupVolume(ctx *Context, args *LookupVolumeArgs, opts ...InvokeOption) (*LookupVolumeResult, error)

Note: This function is named LookupVolume in the Go SDK.

public static class GetVolume {
    public static Task<GetVolumeResult> InvokeAsync(GetVolumeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Id int

The unique numeric ID of the Volume record to query.

Id int

The unique numeric ID of the Volume record to query.

id number

The unique numeric ID of the Volume record to query.

id int

The unique numeric ID of the Volume record to query.

GetVolume Result

The following output properties are available:

Created string
FilesystemPath string
Id int
Label string
LinodeId int
Region string
Size int
Status string
Tags List<string>
Updated string
Created string
FilesystemPath string
Id int
Label string
LinodeId int
Region string
Size int
Status string
Tags []string
Updated string
created string
filesystemPath string
id number
label string
linodeId number
region string
size number
status string
tags string[]
updated string
created str
filesystem_path str
id int
label str
linode_id int
region str
size int
status str
tags Sequence[str]
updated str

Package Details

Repository
https://github.com/pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.