1. Packages
  2. Linode Provider
  3. API Docs
  4. getVolume
Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi

linode.getVolume

Explore with Pulumi AI

Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi

Provides information about a Linode Volume. For more information, see the Linode APIv4 docs.

Example Usage

The following example shows how one might use this data source to access information about a Linode Volume.

import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const foo = linode.getVolume({
    id: 1234567,
});
Copy
import pulumi
import pulumi_linode as linode

foo = linode.get_volume(id=1234567)
Copy
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var foo = Linode.GetVolume.Invoke(new()
    {
        Id = 1234567,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetVolumeArgs;
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) {
        final var foo = LinodeFunctions.getVolume(GetVolumeArgs.builder()
            .id(1234567)
            .build());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: linode:getVolume
      arguments:
        id: '1234567'
Copy

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>
Copy
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]
Copy
func LookupVolume(ctx *Context, args *LookupVolumeArgs, opts ...InvokeOption) (*LookupVolumeResult, error)
func LookupVolumeOutput(ctx *Context, args *LookupVolumeOutputArgs, opts ...InvokeOption) LookupVolumeResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
public static Output<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: linode:index/getVolume:getVolume
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. int
The unique numeric ID of the Volume record to query.
Id This property is required. int
The unique numeric ID of the Volume record to query.
id This property is required. Integer
The unique numeric ID of the Volume record to query.
id This property is required. number
The unique numeric ID of the Volume record to query.
id This property is required. int
The unique numeric ID of the Volume record to query.
id This property is required. Number
The unique numeric ID of the Volume record to query.

getVolume Result

The following output properties are available:

Created string
When this Volume was created.
Encryption string
Whether Block Storage Disk Encryption is enabled or disabled on this Volume. Note: Block Storage Disk Encryption is not currently available to all users.
FilesystemPath string
The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
Id int
The unique ID of this Volume.
Label string
This Volume's label is for display purposes only.
LinodeId int
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.
Region string
The datacenter in which this Volume is located. See all regions here.
Size int
The Volume's size, in GiB.
Status string
The current status of the Volume. (creating, active, resizing, contact_support)
Tags List<string>
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
Updated string
When this Volume was last updated.
Created string
When this Volume was created.
Encryption string
Whether Block Storage Disk Encryption is enabled or disabled on this Volume. Note: Block Storage Disk Encryption is not currently available to all users.
FilesystemPath string
The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
Id int
The unique ID of this Volume.
Label string
This Volume's label is for display purposes only.
LinodeId int
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.
Region string
The datacenter in which this Volume is located. See all regions here.
Size int
The Volume's size, in GiB.
Status string
The current status of the Volume. (creating, active, resizing, contact_support)
Tags []string
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
Updated string
When this Volume was last updated.
created String
When this Volume was created.
encryption String
Whether Block Storage Disk Encryption is enabled or disabled on this Volume. Note: Block Storage Disk Encryption is not currently available to all users.
filesystemPath String
The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
id Integer
The unique ID of this Volume.
label String
This Volume's label is for display purposes only.
linodeId Integer
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.
region String
The datacenter in which this Volume is located. See all regions here.
size Integer
The Volume's size, in GiB.
status String
The current status of the Volume. (creating, active, resizing, contact_support)
tags List<String>
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
updated String
When this Volume was last updated.
created string
When this Volume was created.
encryption string
Whether Block Storage Disk Encryption is enabled or disabled on this Volume. Note: Block Storage Disk Encryption is not currently available to all users.
filesystemPath string
The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
id number
The unique ID of this Volume.
label string
This Volume's label is for display purposes only.
linodeId number
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.
region string
The datacenter in which this Volume is located. See all regions here.
size number
The Volume's size, in GiB.
status string
The current status of the Volume. (creating, active, resizing, contact_support)
tags string[]
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
updated string
When this Volume was last updated.
created str
When this Volume was created.
encryption str
Whether Block Storage Disk Encryption is enabled or disabled on this Volume. Note: Block Storage Disk Encryption is not currently available to all users.
filesystem_path str
The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
id int
The unique ID of this Volume.
label str
This Volume's label is for display purposes only.
linode_id int
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.
region str
The datacenter in which this Volume is located. See all regions here.
size int
The Volume's size, in GiB.
status str
The current status of the Volume. (creating, active, resizing, contact_support)
tags Sequence[str]
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
updated str
When this Volume was last updated.
created String
When this Volume was created.
encryption String
Whether Block Storage Disk Encryption is enabled or disabled on this Volume. Note: Block Storage Disk Encryption is not currently available to all users.
filesystemPath String
The full filesystem path for the Volume based on the Volume's label. Path is /dev/disk/by-id/scsi-0LinodeVolume + Volume label.
id Number
The unique ID of this Volume.
label String
This Volume's label is for display purposes only.
linodeId Number
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.
region String
The datacenter in which this Volume is located. See all regions here.
size Number
The Volume's size, in GiB.
status String
The current status of the Volume. (creating, active, resizing, contact_support)
tags List<String>
An array of tags applied to this object. Tags are case-insensitive and are for organizational purposes only.
updated String
When this Volume was last updated.

Package Details

Repository
Linode pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.
Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi