1. Packages
  2. Linode
  3. API Docs
  4. getVolume
Linode v4.22.0 published on Tuesday, Jun 25, 2024 by Pulumi

linode.getVolume

Explore with Pulumi AI

linode logo
Linode v4.22.0 published on Tuesday, Jun 25, 2024 by Pulumi

    Provides information about a Linode Volume.

    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,
    });
    
    import pulumi
    import pulumi_linode as linode
    
    foo = linode.get_volume(id=1234567)
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          Function: linode:getVolume
          Arguments:
            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)
    }
    public static CompletableFuture<GetVolumeResult> getVolume(GetVolumeArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: linode:index/getVolume:getVolume
      arguments:
        # arguments dictionary

    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 Integer
    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.
    id 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.
    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.
    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.
    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.
    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.
    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.
    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 logo
    Linode v4.22.0 published on Tuesday, Jun 25, 2024 by Pulumi