# 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 builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs

__all__ = [
    'GetVolumeResult',
    'AwaitableGetVolumeResult',
    'get_volume',
    'get_volume_output',
]

@pulumi.output_type
class GetVolumeResult:
    """
    A collection of values returned by getVolume.
    """
    def __init__(__self__, auto_snapshot_policy_id=None, auto_snapshot_policy_name=None, baseline_performance=None, created_at=None, delete_with_instance=None, description=None, device_name=None, error_detail=None, expired_time=None, extra_performance=None, id=None, image_id=None, instance_id=None, kind=None, overdue_reclaim_time=None, overdue_time=None, pay_type=None, project_name=None, renew_type=None, size=None, snapshot_count=None, source_snapshot_id=None, status=None, tags=None, total_performance=None, trade_status=None, updated_at=None, volume_id=None, volume_name=None, volume_type=None, zone_id=None):
        if auto_snapshot_policy_id and not isinstance(auto_snapshot_policy_id, str):
            raise TypeError("Expected argument 'auto_snapshot_policy_id' to be a str")
        pulumi.set(__self__, "auto_snapshot_policy_id", auto_snapshot_policy_id)
        if auto_snapshot_policy_name and not isinstance(auto_snapshot_policy_name, str):
            raise TypeError("Expected argument 'auto_snapshot_policy_name' to be a str")
        pulumi.set(__self__, "auto_snapshot_policy_name", auto_snapshot_policy_name)
        if baseline_performance and not isinstance(baseline_performance, dict):
            raise TypeError("Expected argument 'baseline_performance' to be a dict")
        pulumi.set(__self__, "baseline_performance", baseline_performance)
        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 delete_with_instance and not isinstance(delete_with_instance, bool):
            raise TypeError("Expected argument 'delete_with_instance' to be a bool")
        pulumi.set(__self__, "delete_with_instance", delete_with_instance)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if device_name and not isinstance(device_name, str):
            raise TypeError("Expected argument 'device_name' to be a str")
        pulumi.set(__self__, "device_name", device_name)
        if error_detail and not isinstance(error_detail, str):
            raise TypeError("Expected argument 'error_detail' to be a str")
        pulumi.set(__self__, "error_detail", error_detail)
        if expired_time and not isinstance(expired_time, str):
            raise TypeError("Expected argument 'expired_time' to be a str")
        pulumi.set(__self__, "expired_time", expired_time)
        if extra_performance and not isinstance(extra_performance, dict):
            raise TypeError("Expected argument 'extra_performance' to be a dict")
        pulumi.set(__self__, "extra_performance", extra_performance)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if image_id and not isinstance(image_id, str):
            raise TypeError("Expected argument 'image_id' to be a str")
        pulumi.set(__self__, "image_id", image_id)
        if instance_id and not isinstance(instance_id, str):
            raise TypeError("Expected argument 'instance_id' to be a str")
        pulumi.set(__self__, "instance_id", instance_id)
        if kind and not isinstance(kind, str):
            raise TypeError("Expected argument 'kind' to be a str")
        pulumi.set(__self__, "kind", kind)
        if overdue_reclaim_time and not isinstance(overdue_reclaim_time, str):
            raise TypeError("Expected argument 'overdue_reclaim_time' to be a str")
        pulumi.set(__self__, "overdue_reclaim_time", overdue_reclaim_time)
        if overdue_time and not isinstance(overdue_time, str):
            raise TypeError("Expected argument 'overdue_time' to be a str")
        pulumi.set(__self__, "overdue_time", overdue_time)
        if pay_type and not isinstance(pay_type, str):
            raise TypeError("Expected argument 'pay_type' to be a str")
        pulumi.set(__self__, "pay_type", pay_type)
        if project_name and not isinstance(project_name, str):
            raise TypeError("Expected argument 'project_name' to be a str")
        pulumi.set(__self__, "project_name", project_name)
        if renew_type and not isinstance(renew_type, float):
            raise TypeError("Expected argument 'renew_type' to be a float")
        pulumi.set(__self__, "renew_type", renew_type)
        if size and not isinstance(size, float):
            raise TypeError("Expected argument 'size' to be a float")
        pulumi.set(__self__, "size", size)
        if snapshot_count and not isinstance(snapshot_count, float):
            raise TypeError("Expected argument 'snapshot_count' to be a float")
        pulumi.set(__self__, "snapshot_count", snapshot_count)
        if source_snapshot_id and not isinstance(source_snapshot_id, str):
            raise TypeError("Expected argument 'source_snapshot_id' to be a str")
        pulumi.set(__self__, "source_snapshot_id", source_snapshot_id)
        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 total_performance and not isinstance(total_performance, dict):
            raise TypeError("Expected argument 'total_performance' to be a dict")
        pulumi.set(__self__, "total_performance", total_performance)
        if trade_status and not isinstance(trade_status, float):
            raise TypeError("Expected argument 'trade_status' to be a float")
        pulumi.set(__self__, "trade_status", trade_status)
        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)
        if volume_id and not isinstance(volume_id, str):
            raise TypeError("Expected argument 'volume_id' to be a str")
        pulumi.set(__self__, "volume_id", volume_id)
        if volume_name and not isinstance(volume_name, str):
            raise TypeError("Expected argument 'volume_name' to be a str")
        pulumi.set(__self__, "volume_name", volume_name)
        if volume_type and not isinstance(volume_type, str):
            raise TypeError("Expected argument 'volume_type' to be a str")
        pulumi.set(__self__, "volume_type", volume_type)
        if zone_id and not isinstance(zone_id, str):
            raise TypeError("Expected argument 'zone_id' to be a str")
        pulumi.set(__self__, "zone_id", zone_id)

    @property
    @pulumi.getter(name="autoSnapshotPolicyId")
    def auto_snapshot_policy_id(self) -> builtins.str:
        """
        自动快照策略ID。
        """
        return pulumi.get(self, "auto_snapshot_policy_id")

    @property
    @pulumi.getter(name="autoSnapshotPolicyName")
    def auto_snapshot_policy_name(self) -> builtins.str:
        """
        自动快照策略名称。
        """
        return pulumi.get(self, "auto_snapshot_policy_name")

    @property
    @pulumi.getter(name="baselinePerformance")
    def baseline_performance(self) -> 'outputs.GetVolumeBaselinePerformanceResult':
        """
        基本性能。
        """
        return pulumi.get(self, "baseline_performance")

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> builtins.str:
        """
        云盘创建时间。
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="deleteWithInstance")
    def delete_with_instance(self) -> builtins.bool:
        """
        释放实例时，该云盘是否随实例一起释放，取值说明如下：true：云盘随实例一起释放。false：云盘不随实例一起释放。
        """
        return pulumi.get(self, "delete_with_instance")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        云盘的描述信息，默认为空，长度限制在1 ~ 255字符之间。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="deviceName")
    def device_name(self) -> builtins.str:
        """
        设备名称
        """
        return pulumi.get(self, "device_name")

    @property
    @pulumi.getter(name="errorDetail")
    def error_detail(self) -> builtins.str:
        """
        具体错误
        """
        return pulumi.get(self, "error_detail")

    @property
    @pulumi.getter(name="expiredTime")
    def expired_time(self) -> builtins.str:
        """
        包年包月到期时间。
        """
        return pulumi.get(self, "expired_time")

    @property
    @pulumi.getter(name="extraPerformance")
    def extra_performance(self) -> 'outputs.GetVolumeExtraPerformanceResult':
        """
        额外性能。
        """
        return pulumi.get(self, "extra_performance")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="imageId")
    def image_id(self) -> builtins.str:
        """
        云盘中的镜像ID。
        """
        return pulumi.get(self, "image_id")

    @property
    @pulumi.getter(name="instanceId")
    def instance_id(self) -> builtins.str:
        """
        创建云盘的同时挂载的ECS实例ID。
        """
        return pulumi.get(self, "instance_id")

    @property
    @pulumi.getter
    def kind(self) -> builtins.str:
        """
        云盘属性，data表示数据盘。默认值为data。说明： 仅支持创建数据盘。
        """
        return pulumi.get(self, "kind")

    @property
    @pulumi.getter(name="overdueReclaimTime")
    def overdue_reclaim_time(self) -> builtins.str:
        """
        云盘欠费回收时间。
        """
        return pulumi.get(self, "overdue_reclaim_time")

    @property
    @pulumi.getter(name="overdueTime")
    def overdue_time(self) -> builtins.str:
        """
        云盘欠费关停时间。
        """
        return pulumi.get(self, "overdue_time")

    @property
    @pulumi.getter(name="payType")
    def pay_type(self) -> builtins.str:
        """
        付费类型，说明如下： Pre：预付费（包年包月） Post：后付费（按量计费）。
        """
        return pulumi.get(self, "pay_type")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        云盘所要加入的Project（项目）名称。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="renewType")
    def renew_type(self) -> builtins.float:
        """
        续费方式 1：手动续费 2 ：自动续费 3 ：到期不续费。
        """
        return pulumi.get(self, "renew_type")

    @property
    @pulumi.getter
    def size(self) -> builtins.float:
        """
        Size，数据盘容量大小，单位为GiB。不同类型的数据盘容量范围如下：ESSD*PL0：10~65536 GiB；ESSD*FlexPL：10~65536 GiB；TSSD_TL0：40~65536 GiB
        """
        return pulumi.get(self, "size")

    @property
    @pulumi.getter(name="snapshotCount")
    def snapshot_count(self) -> builtins.float:
        """
        快照计数
        """
        return pulumi.get(self, "snapshot_count")

    @property
    @pulumi.getter(name="sourceSnapshotId")
    def source_snapshot_id(self) -> builtins.str:
        """
        源快照。
        """
        return pulumi.get(self, "source_snapshot_id")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        云盘状态，取值说明如下：available：可用。attaching：挂载中。attached：已挂载。detaching：卸载中。creating：创建中。deleting：删除中。error：错误。extending：扩容中。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetVolumeTagResult']:
        """
        云盘的标签信息
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="totalPerformance")
    def total_performance(self) -> 'outputs.GetVolumeTotalPerformanceResult':
        """
        总性能。
        """
        return pulumi.get(self, "total_performance")

    @property
    @pulumi.getter(name="tradeStatus")
    def trade_status(self) -> builtins.float:
        """
        交易状态 0：创建中 1：运行中 2：创建失败
        """
        return pulumi.get(self, "trade_status")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> builtins.str:
        """
        云盘更新时间。
        """
        return pulumi.get(self, "updated_at")

    @property
    @pulumi.getter(name="volumeId")
    def volume_id(self) -> builtins.str:
        """
        云盘id。
        """
        return pulumi.get(self, "volume_id")

    @property
    @pulumi.getter(name="volumeName")
    def volume_name(self) -> builtins.str:
        """
        云盘显示名称。命名规则如下：首字符仅支持中文、字母或下划线（*）。可包含中文、字母、数字、下划线（*）或中划线（-）。长度限制在1~128字符之间。
        """
        return pulumi.get(self, "volume_name")

    @property
    @pulumi.getter(name="volumeType")
    def volume_type(self) -> builtins.str:
        """
        云盘类型，取值说明如下：ESSD*PL0：极速型SSD云盘，PL0规格。ESSD*FlexPL: 极速型SSD云盘，FlexPL规格。TSSD_TL0: 吞吐型SSD云盘。
        """
        return pulumi.get(self, "volume_type")

    @property
    @pulumi.getter(name="zoneId")
    def zone_id(self) -> builtins.str:
        """
        可用区ID。
        """
        return pulumi.get(self, "zone_id")


class AwaitableGetVolumeResult(GetVolumeResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVolumeResult(
            auto_snapshot_policy_id=self.auto_snapshot_policy_id,
            auto_snapshot_policy_name=self.auto_snapshot_policy_name,
            baseline_performance=self.baseline_performance,
            created_at=self.created_at,
            delete_with_instance=self.delete_with_instance,
            description=self.description,
            device_name=self.device_name,
            error_detail=self.error_detail,
            expired_time=self.expired_time,
            extra_performance=self.extra_performance,
            id=self.id,
            image_id=self.image_id,
            instance_id=self.instance_id,
            kind=self.kind,
            overdue_reclaim_time=self.overdue_reclaim_time,
            overdue_time=self.overdue_time,
            pay_type=self.pay_type,
            project_name=self.project_name,
            renew_type=self.renew_type,
            size=self.size,
            snapshot_count=self.snapshot_count,
            source_snapshot_id=self.source_snapshot_id,
            status=self.status,
            tags=self.tags,
            total_performance=self.total_performance,
            trade_status=self.trade_status,
            updated_at=self.updated_at,
            volume_id=self.volume_id,
            volume_name=self.volume_name,
            volume_type=self.volume_type,
            zone_id=self.zone_id)


def get_volume(id: Optional[builtins.str] = None,
               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVolumeResult:
    """
    Data Source schema for Byteplus::StorageEBS::Volume


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:storageebs/getVolume:getVolume', __args__, opts=opts, typ=GetVolumeResult).value

    return AwaitableGetVolumeResult(
        auto_snapshot_policy_id=pulumi.get(__ret__, 'auto_snapshot_policy_id'),
        auto_snapshot_policy_name=pulumi.get(__ret__, 'auto_snapshot_policy_name'),
        baseline_performance=pulumi.get(__ret__, 'baseline_performance'),
        created_at=pulumi.get(__ret__, 'created_at'),
        delete_with_instance=pulumi.get(__ret__, 'delete_with_instance'),
        description=pulumi.get(__ret__, 'description'),
        device_name=pulumi.get(__ret__, 'device_name'),
        error_detail=pulumi.get(__ret__, 'error_detail'),
        expired_time=pulumi.get(__ret__, 'expired_time'),
        extra_performance=pulumi.get(__ret__, 'extra_performance'),
        id=pulumi.get(__ret__, 'id'),
        image_id=pulumi.get(__ret__, 'image_id'),
        instance_id=pulumi.get(__ret__, 'instance_id'),
        kind=pulumi.get(__ret__, 'kind'),
        overdue_reclaim_time=pulumi.get(__ret__, 'overdue_reclaim_time'),
        overdue_time=pulumi.get(__ret__, 'overdue_time'),
        pay_type=pulumi.get(__ret__, 'pay_type'),
        project_name=pulumi.get(__ret__, 'project_name'),
        renew_type=pulumi.get(__ret__, 'renew_type'),
        size=pulumi.get(__ret__, 'size'),
        snapshot_count=pulumi.get(__ret__, 'snapshot_count'),
        source_snapshot_id=pulumi.get(__ret__, 'source_snapshot_id'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        total_performance=pulumi.get(__ret__, 'total_performance'),
        trade_status=pulumi.get(__ret__, 'trade_status'),
        updated_at=pulumi.get(__ret__, 'updated_at'),
        volume_id=pulumi.get(__ret__, 'volume_id'),
        volume_name=pulumi.get(__ret__, 'volume_name'),
        volume_type=pulumi.get(__ret__, 'volume_type'),
        zone_id=pulumi.get(__ret__, 'zone_id'))
def get_volume_output(id: Optional[pulumi.Input[builtins.str]] = None,
                      opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetVolumeResult]:
    """
    Data Source schema for Byteplus::StorageEBS::Volume


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:storageebs/getVolume:getVolume', __args__, opts=opts, typ=GetVolumeResult)
    return __ret__.apply(lambda __response__: GetVolumeResult(
        auto_snapshot_policy_id=pulumi.get(__response__, 'auto_snapshot_policy_id'),
        auto_snapshot_policy_name=pulumi.get(__response__, 'auto_snapshot_policy_name'),
        baseline_performance=pulumi.get(__response__, 'baseline_performance'),
        created_at=pulumi.get(__response__, 'created_at'),
        delete_with_instance=pulumi.get(__response__, 'delete_with_instance'),
        description=pulumi.get(__response__, 'description'),
        device_name=pulumi.get(__response__, 'device_name'),
        error_detail=pulumi.get(__response__, 'error_detail'),
        expired_time=pulumi.get(__response__, 'expired_time'),
        extra_performance=pulumi.get(__response__, 'extra_performance'),
        id=pulumi.get(__response__, 'id'),
        image_id=pulumi.get(__response__, 'image_id'),
        instance_id=pulumi.get(__response__, 'instance_id'),
        kind=pulumi.get(__response__, 'kind'),
        overdue_reclaim_time=pulumi.get(__response__, 'overdue_reclaim_time'),
        overdue_time=pulumi.get(__response__, 'overdue_time'),
        pay_type=pulumi.get(__response__, 'pay_type'),
        project_name=pulumi.get(__response__, 'project_name'),
        renew_type=pulumi.get(__response__, 'renew_type'),
        size=pulumi.get(__response__, 'size'),
        snapshot_count=pulumi.get(__response__, 'snapshot_count'),
        source_snapshot_id=pulumi.get(__response__, 'source_snapshot_id'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        total_performance=pulumi.get(__response__, 'total_performance'),
        trade_status=pulumi.get(__response__, 'trade_status'),
        updated_at=pulumi.get(__response__, 'updated_at'),
        volume_id=pulumi.get(__response__, 'volume_id'),
        volume_name=pulumi.get(__response__, 'volume_name'),
        volume_type=pulumi.get(__response__, 'volume_type'),
        zone_id=pulumi.get(__response__, 'zone_id')))
