# 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 copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetBlockDeviceResult',
    'AwaitableGetBlockDeviceResult',
    'get_block_device',
    'get_block_device_output',
]

@pulumi.output_type
class GetBlockDeviceResult:
    """
    A collection of values returned by getBlockDevice.
    """
    def __init__(__self__, capacity_in_gb=None, cloud_account_ids=None, created_at=None, custom_properties=None, deployment_id=None, description=None, expand_snapshots=None, external_id=None, external_region_id=None, external_zone_id=None, filter=None, id=None, links=None, name=None, org_id=None, owner=None, persistent=None, project_id=None, snapshots=None, status=None, tags=None, updated_at=None):
        if capacity_in_gb and not isinstance(capacity_in_gb, int):
            raise TypeError("Expected argument 'capacity_in_gb' to be a int")
        pulumi.set(__self__, "capacity_in_gb", capacity_in_gb)
        if cloud_account_ids and not isinstance(cloud_account_ids, list):
            raise TypeError("Expected argument 'cloud_account_ids' to be a list")
        pulumi.set(__self__, "cloud_account_ids", cloud_account_ids)
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if custom_properties and not isinstance(custom_properties, dict):
            raise TypeError("Expected argument 'custom_properties' to be a dict")
        pulumi.set(__self__, "custom_properties", custom_properties)
        if deployment_id and not isinstance(deployment_id, str):
            raise TypeError("Expected argument 'deployment_id' to be a str")
        pulumi.set(__self__, "deployment_id", deployment_id)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if expand_snapshots and not isinstance(expand_snapshots, bool):
            raise TypeError("Expected argument 'expand_snapshots' to be a bool")
        pulumi.set(__self__, "expand_snapshots", expand_snapshots)
        if external_id and not isinstance(external_id, str):
            raise TypeError("Expected argument 'external_id' to be a str")
        pulumi.set(__self__, "external_id", external_id)
        if external_region_id and not isinstance(external_region_id, str):
            raise TypeError("Expected argument 'external_region_id' to be a str")
        pulumi.set(__self__, "external_region_id", external_region_id)
        if external_zone_id and not isinstance(external_zone_id, str):
            raise TypeError("Expected argument 'external_zone_id' to be a str")
        pulumi.set(__self__, "external_zone_id", external_zone_id)
        if filter and not isinstance(filter, str):
            raise TypeError("Expected argument 'filter' to be a str")
        pulumi.set(__self__, "filter", filter)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if links and not isinstance(links, list):
            raise TypeError("Expected argument 'links' to be a list")
        pulumi.set(__self__, "links", links)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if org_id and not isinstance(org_id, str):
            raise TypeError("Expected argument 'org_id' to be a str")
        pulumi.set(__self__, "org_id", org_id)
        if owner and not isinstance(owner, str):
            raise TypeError("Expected argument 'owner' to be a str")
        pulumi.set(__self__, "owner", owner)
        if persistent and not isinstance(persistent, bool):
            raise TypeError("Expected argument 'persistent' to be a bool")
        pulumi.set(__self__, "persistent", persistent)
        if project_id and not isinstance(project_id, str):
            raise TypeError("Expected argument 'project_id' to be a str")
        pulumi.set(__self__, "project_id", project_id)
        if snapshots and not isinstance(snapshots, list):
            raise TypeError("Expected argument 'snapshots' to be a list")
        pulumi.set(__self__, "snapshots", snapshots)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)

    @property
    @pulumi.getter(name="capacityInGb")
    def capacity_in_gb(self) -> int:
        """
        Capacity of the block device in GB.
        """
        return pulumi.get(self, "capacity_in_gb")

    @property
    @pulumi.getter(name="cloudAccountIds")
    def cloud_account_ids(self) -> Sequence[str]:
        """
        Set of ids of the cloud accounts this entity belongs to.
        """
        return pulumi.get(self, "cloud_account_ids")

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> str:
        """
        Date when the entity was created. The date is in ISO 6801 and UTC.
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="customProperties")
    def custom_properties(self) -> Mapping[str, Any]:
        """
        Additional custom properties that may be used to extend the machine.
        """
        return pulumi.get(self, "custom_properties")

    @property
    @pulumi.getter(name="deploymentId")
    def deployment_id(self) -> str:
        """
        The id of the deployment that is associated with this resource.
        """
        return pulumi.get(self, "deployment_id")

    @property
    @pulumi.getter
    def description(self) -> Optional[str]:
        """
        Describes machine within the scope of your organization and is not propagated to the cloud.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="expandSnapshots")
    def expand_snapshots(self) -> Optional[bool]:
        return pulumi.get(self, "expand_snapshots")

    @property
    @pulumi.getter(name="externalId")
    def external_id(self) -> str:
        """
        External entity Id on the provider side.
        """
        return pulumi.get(self, "external_id")

    @property
    @pulumi.getter(name="externalRegionId")
    def external_region_id(self) -> str:
        """
        The external regionId of the resource.
        """
        return pulumi.get(self, "external_region_id")

    @property
    @pulumi.getter(name="externalZoneId")
    def external_zone_id(self) -> str:
        """
        The external zoneId of the resource.
        """
        return pulumi.get(self, "external_zone_id")

    @property
    @pulumi.getter
    def filter(self) -> Optional[str]:
        return pulumi.get(self, "filter")

    @property
    @pulumi.getter
    def id(self) -> str:
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def links(self) -> Sequence['outputs.GetBlockDeviceLinkResult']:
        """
        HATEOAS of the entity.
        """
        return pulumi.get(self, "links")

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        A human-friendly name used as an identifier in APIs that support this option.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="orgId")
    def org_id(self) -> str:
        """
        The id of the organization this entity belongs to.
        """
        return pulumi.get(self, "org_id")

    @property
    @pulumi.getter
    def owner(self) -> str:
        """
        Email of the user that owns the entity.
        """
        return pulumi.get(self, "owner")

    @property
    @pulumi.getter
    def persistent(self) -> bool:
        """
        Indicates whether the block device survives a delete action.
        """
        return pulumi.get(self, "persistent")

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> str:
        """
        The id of the project the current user belongs to.
        """
        return pulumi.get(self, "project_id")

    @property
    @pulumi.getter
    def snapshots(self) -> Sequence['outputs.GetBlockDeviceSnapshotResult']:
        return pulumi.get(self, "snapshots")

    @property
    @pulumi.getter
    def status(self) -> str:
        """
        Status of the block device.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetBlockDeviceTagResult']:
        """
        A set of tag keys and optional values that were set on this resource instance.
        example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> str:
        """
        Date when the entity was last updated. The date is ISO 8601 and UTC.
        """
        return pulumi.get(self, "updated_at")


class AwaitableGetBlockDeviceResult(GetBlockDeviceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetBlockDeviceResult(
            capacity_in_gb=self.capacity_in_gb,
            cloud_account_ids=self.cloud_account_ids,
            created_at=self.created_at,
            custom_properties=self.custom_properties,
            deployment_id=self.deployment_id,
            description=self.description,
            expand_snapshots=self.expand_snapshots,
            external_id=self.external_id,
            external_region_id=self.external_region_id,
            external_zone_id=self.external_zone_id,
            filter=self.filter,
            id=self.id,
            links=self.links,
            name=self.name,
            org_id=self.org_id,
            owner=self.owner,
            persistent=self.persistent,
            project_id=self.project_id,
            snapshots=self.snapshots,
            status=self.status,
            tags=self.tags,
            updated_at=self.updated_at)


def get_block_device(description: Optional[str] = None,
                     expand_snapshots: Optional[bool] = None,
                     filter: Optional[str] = None,
                     id: Optional[str] = None,
                     tags: Optional[Sequence[pulumi.InputType['GetBlockDeviceTagArgs']]] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetBlockDeviceResult:
    """
    ## ---layout: "vra"

    page_title: "VMware vRealize Automation: blockdevice.BlockDevice"
    description: |-
      Provides a data lookup for vra_block_device.
    ---

    # Data Source: blockdevice.BlockDevice

    Provides a data lookup for a vra_block_device.

    ## Example Usage
    ### S

    **Block device data source by its id:**

    This is an example of how to read a block device data source using its ID.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.blockdevice.get_block_device(id=var["block_device_id"])
    ```

    **Block device data source filter by name:**

    This is an example of how to read a block device data source using its name.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.blockdevice.get_block_device(filter=f"name eq '{var['block_device_name']}'")
    ```


    :param str description: Describes machine within the scope of your organization and is not propagated to the cloud.
    :param bool expand_snapshots: Indicates whether the snapshots of the block-devices should be included in the state. Applicable only for first class block devices.
    :param str filter: Search criteria to filter the list of block devices.
    :param str id: The id of the block device.
    :param Sequence[pulumi.InputType['GetBlockDeviceTagArgs']] tags: A set of tag keys and optional values that were set on this resource instance.
           example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
    """
    __args__ = dict()
    __args__['description'] = description
    __args__['expandSnapshots'] = expand_snapshots
    __args__['filter'] = filter
    __args__['id'] = id
    __args__['tags'] = tags
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vra:blockdevice/getBlockDevice:getBlockDevice', __args__, opts=opts, typ=GetBlockDeviceResult).value

    return AwaitableGetBlockDeviceResult(
        capacity_in_gb=__ret__.capacity_in_gb,
        cloud_account_ids=__ret__.cloud_account_ids,
        created_at=__ret__.created_at,
        custom_properties=__ret__.custom_properties,
        deployment_id=__ret__.deployment_id,
        description=__ret__.description,
        expand_snapshots=__ret__.expand_snapshots,
        external_id=__ret__.external_id,
        external_region_id=__ret__.external_region_id,
        external_zone_id=__ret__.external_zone_id,
        filter=__ret__.filter,
        id=__ret__.id,
        links=__ret__.links,
        name=__ret__.name,
        org_id=__ret__.org_id,
        owner=__ret__.owner,
        persistent=__ret__.persistent,
        project_id=__ret__.project_id,
        snapshots=__ret__.snapshots,
        status=__ret__.status,
        tags=__ret__.tags,
        updated_at=__ret__.updated_at)


@_utilities.lift_output_func(get_block_device)
def get_block_device_output(description: Optional[pulumi.Input[Optional[str]]] = None,
                            expand_snapshots: Optional[pulumi.Input[Optional[bool]]] = None,
                            filter: Optional[pulumi.Input[Optional[str]]] = None,
                            id: Optional[pulumi.Input[Optional[str]]] = None,
                            tags: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetBlockDeviceTagArgs']]]]] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetBlockDeviceResult]:
    """
    ## ---layout: "vra"

    page_title: "VMware vRealize Automation: blockdevice.BlockDevice"
    description: |-
      Provides a data lookup for vra_block_device.
    ---

    # Data Source: blockdevice.BlockDevice

    Provides a data lookup for a vra_block_device.

    ## Example Usage
    ### S

    **Block device data source by its id:**

    This is an example of how to read a block device data source using its ID.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.blockdevice.get_block_device(id=var["block_device_id"])
    ```

    **Block device data source filter by name:**

    This is an example of how to read a block device data source using its name.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.blockdevice.get_block_device(filter=f"name eq '{var['block_device_name']}'")
    ```


    :param str description: Describes machine within the scope of your organization and is not propagated to the cloud.
    :param bool expand_snapshots: Indicates whether the snapshots of the block-devices should be included in the state. Applicable only for first class block devices.
    :param str filter: Search criteria to filter the list of block devices.
    :param str id: The id of the block device.
    :param Sequence[pulumi.InputType['GetBlockDeviceTagArgs']] tags: A set of tag keys and optional values that were set on this resource instance.
           example:[ { "key" : "vmware.enumeration.type", "value": "nebs_block" } ]
    """
    ...
