# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from . import utilities, tables

class GetVolumeResult:
    """
    A collection of values returned by getVolume.
    """
    def __init__(__self__, created=None, filesystem_path=None, id=None, label=None, linode_id=None, region=None, size=None, status=None, tags=None, updated=None):
        if created and not isinstance(created, str):
            raise TypeError("Expected argument 'created' to be a str")
        __self__.created = created
        if filesystem_path and not isinstance(filesystem_path, str):
            raise TypeError("Expected argument 'filesystem_path' to be a str")
        __self__.filesystem_path = filesystem_path
        if id and not isinstance(id, float):
            raise TypeError("Expected argument 'id' to be a float")
        __self__.id = id
        if label and not isinstance(label, str):
            raise TypeError("Expected argument 'label' to be a str")
        __self__.label = label
        if linode_id and not isinstance(linode_id, float):
            raise TypeError("Expected argument 'linode_id' to be a float")
        __self__.linode_id = linode_id
        if region and not isinstance(region, str):
            raise TypeError("Expected argument 'region' to be a str")
        __self__.region = region
        if size and not isinstance(size, float):
            raise TypeError("Expected argument 'size' to be a float")
        __self__.size = size
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        __self__.status = status
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        __self__.tags = tags
        if updated and not isinstance(updated, str):
            raise TypeError("Expected argument 'updated' to be a str")
        __self__.updated = updated
class AwaitableGetVolumeResult(GetVolumeResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVolumeResult(
            created=self.created,
            filesystem_path=self.filesystem_path,
            id=self.id,
            label=self.label,
            linode_id=self.linode_id,
            region=self.region,
            size=self.size,
            status=self.status,
            tags=self.tags,
            updated=self.updated)

def get_volume(id=None,opts=None):
    """
    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.

    > This content is derived from https://github.com/terraform-providers/terraform-provider-linode/blob/master/website/docs/d/volume.html.md.
    """
    __args__ = dict()


    __args__['id'] = id
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('linode:index/getVolume:getVolume', __args__, opts=opts).value

    return AwaitableGetVolumeResult(
        created=__ret__.get('created'),
        filesystem_path=__ret__.get('filesystemPath'),
        id=__ret__.get('id'),
        label=__ret__.get('label'),
        linode_id=__ret__.get('linodeId'),
        region=__ret__.get('region'),
        size=__ret__.get('size'),
        status=__ret__.get('status'),
        tags=__ret__.get('tags'),
        updated=__ret__.get('updated'))
