# 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__ = [
    'GetSnapshotResult',
    'AwaitableGetSnapshotResult',
    'get_snapshot',
    'get_snapshot_output',
]

@pulumi.output_type
class GetSnapshotResult:
    """
    A collection of values returned by getSnapshot.
    """
    def __init__(__self__, creation_time=None, description=None, id=None, image_id=None, instant_access=None, progress=None, project_name=None, retention_days=None, shared=None, snapshot_group_id=None, snapshot_id=None, snapshot_name=None, snapshot_type=None, status=None, tags=None, volume_id=None, volume_kind=None, volume_name=None, volume_size=None, volume_status=None, volume_type=None, zone_id=None):
        if creation_time and not isinstance(creation_time, str):
            raise TypeError("Expected argument 'creation_time' to be a str")
        pulumi.set(__self__, "creation_time", creation_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        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 instant_access and not isinstance(instant_access, bool):
            raise TypeError("Expected argument 'instant_access' to be a bool")
        pulumi.set(__self__, "instant_access", instant_access)
        if progress and not isinstance(progress, int):
            raise TypeError("Expected argument 'progress' to be a int")
        pulumi.set(__self__, "progress", progress)
        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 retention_days and not isinstance(retention_days, int):
            raise TypeError("Expected argument 'retention_days' to be a int")
        pulumi.set(__self__, "retention_days", retention_days)
        if shared and not isinstance(shared, bool):
            raise TypeError("Expected argument 'shared' to be a bool")
        pulumi.set(__self__, "shared", shared)
        if snapshot_group_id and not isinstance(snapshot_group_id, str):
            raise TypeError("Expected argument 'snapshot_group_id' to be a str")
        pulumi.set(__self__, "snapshot_group_id", snapshot_group_id)
        if snapshot_id and not isinstance(snapshot_id, str):
            raise TypeError("Expected argument 'snapshot_id' to be a str")
        pulumi.set(__self__, "snapshot_id", snapshot_id)
        if snapshot_name and not isinstance(snapshot_name, str):
            raise TypeError("Expected argument 'snapshot_name' to be a str")
        pulumi.set(__self__, "snapshot_name", snapshot_name)
        if snapshot_type and not isinstance(snapshot_type, str):
            raise TypeError("Expected argument 'snapshot_type' to be a str")
        pulumi.set(__self__, "snapshot_type", snapshot_type)
        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 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_kind and not isinstance(volume_kind, str):
            raise TypeError("Expected argument 'volume_kind' to be a str")
        pulumi.set(__self__, "volume_kind", volume_kind)
        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_size and not isinstance(volume_size, int):
            raise TypeError("Expected argument 'volume_size' to be a int")
        pulumi.set(__self__, "volume_size", volume_size)
        if volume_status and not isinstance(volume_status, str):
            raise TypeError("Expected argument 'volume_status' to be a str")
        pulumi.set(__self__, "volume_status", volume_status)
        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="creationTime")
    def creation_time(self) -> builtins.str:
        """
        快照创建时间。
        """
        return pulumi.get(self, "creation_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        快照描述信息，默认为空，长度限制为0~255个字符。
        """
        return pulumi.get(self, "description")

    @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="instantAccess")
    def instant_access(self) -> builtins.bool:
        """
        快照是否开启极速可用能力，取值说明如下：true：已开启极速可用能力。false：未开启极速可用能力。
        """
        return pulumi.get(self, "instant_access")

    @property
    @pulumi.getter
    def progress(self) -> builtins.int:
        """
        快照转储进度。
        """
        return pulumi.get(self, "progress")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> builtins.str:
        """
        快照所要加入的Project（项目）名称。注意快照不会继承云盘的项目，即快照与云盘可以所属不同的项目。如果您在创建快照时未设置ProjectName，快照会默认加入default项目。
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="retentionDays")
    def retention_days(self) -> builtins.int:
        """
        快照保留时间，单位为天，取值说明如下：空：永久保留快照 。1~65536：指定保存天数。默认为空，即默认永久保留快照。说明快照保留时间从快照创建时刻开始计算。
        """
        return pulumi.get(self, "retention_days")

    @property
    @pulumi.getter
    def shared(self) -> builtins.bool:
        """
        快照是否共享。
        """
        return pulumi.get(self, "shared")

    @property
    @pulumi.getter(name="snapshotGroupId")
    def snapshot_group_id(self) -> builtins.str:
        """
        快照一致性组ID。
        """
        return pulumi.get(self, "snapshot_group_id")

    @property
    @pulumi.getter(name="snapshotId")
    def snapshot_id(self) -> builtins.str:
        """
        快照ID。
        """
        return pulumi.get(self, "snapshot_id")

    @property
    @pulumi.getter(name="snapshotName")
    def snapshot_name(self) -> builtins.str:
        """
        创建的快照名称。命名规范如下：长度限制为1~128个字符。只能包含中文、字母、数字、下划线（_）、中划线（-）和英文句号（.）。为防止和自动快照的名称冲突，不能以“auto”开头。
        """
        return pulumi.get(self, "snapshot_name")

    @property
    @pulumi.getter(name="snapshotType")
    def snapshot_type(self) -> builtins.str:
        """
        快照类型，取值说明如下：user：查询手动快照。auto：查询自动快照。share：查询共享快照。默认查询所有快照。
        """
        return pulumi.get(self, "snapshot_type")

    @property
    @pulumi.getter
    def status(self) -> builtins.str:
        """
        快照状态，取值说明如下：available：可用。creating：创建中。rollbacking：回滚中。deleted：已删除。failed：错误。
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetSnapshotTagResult']:
        """
        快照的标签信息。
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="volumeId")
    def volume_id(self) -> builtins.str:
        """
        快照相关的云盘ID。
        """
        return pulumi.get(self, "volume_id")

    @property
    @pulumi.getter(name="volumeKind")
    def volume_kind(self) -> builtins.str:
        """
        云盘种类，取值说明如下：system：系统盘。data：数据盘。
        """
        return pulumi.get(self, "volume_kind")

    @property
    @pulumi.getter(name="volumeName")
    def volume_name(self) -> builtins.str:
        """
        云盘名称。
        """
        return pulumi.get(self, "volume_name")

    @property
    @pulumi.getter(name="volumeSize")
    def volume_size(self) -> builtins.int:
        """
        云盘大小，单位为GiB。
        """
        return pulumi.get(self, "volume_size")

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

    @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 AwaitableGetSnapshotResult(GetSnapshotResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetSnapshotResult(
            creation_time=self.creation_time,
            description=self.description,
            id=self.id,
            image_id=self.image_id,
            instant_access=self.instant_access,
            progress=self.progress,
            project_name=self.project_name,
            retention_days=self.retention_days,
            shared=self.shared,
            snapshot_group_id=self.snapshot_group_id,
            snapshot_id=self.snapshot_id,
            snapshot_name=self.snapshot_name,
            snapshot_type=self.snapshot_type,
            status=self.status,
            tags=self.tags,
            volume_id=self.volume_id,
            volume_kind=self.volume_kind,
            volume_name=self.volume_name,
            volume_size=self.volume_size,
            volume_status=self.volume_status,
            volume_type=self.volume_type,
            zone_id=self.zone_id)


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


    :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/getSnapshot:getSnapshot', __args__, opts=opts, typ=GetSnapshotResult).value

    return AwaitableGetSnapshotResult(
        creation_time=pulumi.get(__ret__, 'creation_time'),
        description=pulumi.get(__ret__, 'description'),
        id=pulumi.get(__ret__, 'id'),
        image_id=pulumi.get(__ret__, 'image_id'),
        instant_access=pulumi.get(__ret__, 'instant_access'),
        progress=pulumi.get(__ret__, 'progress'),
        project_name=pulumi.get(__ret__, 'project_name'),
        retention_days=pulumi.get(__ret__, 'retention_days'),
        shared=pulumi.get(__ret__, 'shared'),
        snapshot_group_id=pulumi.get(__ret__, 'snapshot_group_id'),
        snapshot_id=pulumi.get(__ret__, 'snapshot_id'),
        snapshot_name=pulumi.get(__ret__, 'snapshot_name'),
        snapshot_type=pulumi.get(__ret__, 'snapshot_type'),
        status=pulumi.get(__ret__, 'status'),
        tags=pulumi.get(__ret__, 'tags'),
        volume_id=pulumi.get(__ret__, 'volume_id'),
        volume_kind=pulumi.get(__ret__, 'volume_kind'),
        volume_name=pulumi.get(__ret__, 'volume_name'),
        volume_size=pulumi.get(__ret__, 'volume_size'),
        volume_status=pulumi.get(__ret__, 'volume_status'),
        volume_type=pulumi.get(__ret__, 'volume_type'),
        zone_id=pulumi.get(__ret__, 'zone_id'))
def get_snapshot_output(id: Optional[pulumi.Input[builtins.str]] = None,
                        opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetSnapshotResult]:
    """
    Data Source schema for Byteplus::StorageEBS::Snapshot


    :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/getSnapshot:getSnapshot', __args__, opts=opts, typ=GetSnapshotResult)
    return __ret__.apply(lambda __response__: GetSnapshotResult(
        creation_time=pulumi.get(__response__, 'creation_time'),
        description=pulumi.get(__response__, 'description'),
        id=pulumi.get(__response__, 'id'),
        image_id=pulumi.get(__response__, 'image_id'),
        instant_access=pulumi.get(__response__, 'instant_access'),
        progress=pulumi.get(__response__, 'progress'),
        project_name=pulumi.get(__response__, 'project_name'),
        retention_days=pulumi.get(__response__, 'retention_days'),
        shared=pulumi.get(__response__, 'shared'),
        snapshot_group_id=pulumi.get(__response__, 'snapshot_group_id'),
        snapshot_id=pulumi.get(__response__, 'snapshot_id'),
        snapshot_name=pulumi.get(__response__, 'snapshot_name'),
        snapshot_type=pulumi.get(__response__, 'snapshot_type'),
        status=pulumi.get(__response__, 'status'),
        tags=pulumi.get(__response__, 'tags'),
        volume_id=pulumi.get(__response__, 'volume_id'),
        volume_kind=pulumi.get(__response__, 'volume_kind'),
        volume_name=pulumi.get(__response__, 'volume_name'),
        volume_size=pulumi.get(__response__, 'volume_size'),
        volume_status=pulumi.get(__response__, 'volume_status'),
        volume_type=pulumi.get(__response__, 'volume_type'),
        zone_id=pulumi.get(__response__, 'zone_id')))
