Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

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. (creating, active, resizing, 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. See all regions here.

  • 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/v3/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := linode.LookupVolume(ctx, &GetVolumeArgs{
			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,
}));

Using getVolume

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 getVolume(args: GetVolumeArgs, opts?: InvokeOptions): Promise<GetVolumeResult>
function getVolumeOutput(args: GetVolumeOutputArgs, opts?: InvokeOptions): Output<GetVolumeResult>
def get_volume(id: Optional[int] = None,
               opts: Optional[InvokeOptions] = None) -> GetVolumeResult
def get_volume_output(id: Optional[pulumi.Input[int]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetVolumeResult]
func LookupVolume(ctx *Context, args *LookupVolumeArgs, opts ...InvokeOption) (*LookupVolumeResult, error)
func LookupVolumeOutput(ctx *Context, args *LookupVolumeOutputArgs, opts ...InvokeOption) LookupVolumeResultOutput

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

public static class GetVolume 
{
    public static Task<GetVolumeResult> InvokeAsync(GetVolumeArgs args, InvokeOptions? opts = null)
    public static Output<GetVolumeResult> Invoke(GetVolumeInvokeArgs 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.