# 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

__all__ = ['SnapshotArgs', 'Snapshot']

@pulumi.input_type
class SnapshotArgs:
    def __init__(__self__, *,
                 file_system_id: pulumi.Input[builtins.str],
                 snapshot_name: pulumi.Input[builtins.str],
                 description: Optional[pulumi.Input[builtins.str]] = None):
        """
        The set of arguments for constructing a Snapshot resource.
        :param pulumi.Input[builtins.str] file_system_id: 文件系统 ID。
        :param pulumi.Input[builtins.str] snapshot_name: 快照名称。
        :param pulumi.Input[builtins.str] description: 快照描述信息。
        """
        pulumi.set(__self__, "file_system_id", file_system_id)
        pulumi.set(__self__, "snapshot_name", snapshot_name)
        if description is not None:
            pulumi.set(__self__, "description", description)

    @property
    @pulumi.getter(name="fileSystemId")
    def file_system_id(self) -> pulumi.Input[builtins.str]:
        """
        文件系统 ID。
        """
        return pulumi.get(self, "file_system_id")

    @file_system_id.setter
    def file_system_id(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "file_system_id", value)

    @property
    @pulumi.getter(name="snapshotName")
    def snapshot_name(self) -> pulumi.Input[builtins.str]:
        """
        快照名称。
        """
        return pulumi.get(self, "snapshot_name")

    @snapshot_name.setter
    def snapshot_name(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "snapshot_name", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        快照描述信息。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)


@pulumi.input_type
class _SnapshotState:
    def __init__(__self__, *,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 file_system_id: Optional[pulumi.Input[builtins.str]] = None,
                 file_system_name: Optional[pulumi.Input[builtins.str]] = None,
                 is_encrypt: Optional[pulumi.Input[builtins.bool]] = None,
                 progress: Optional[pulumi.Input[builtins.str]] = None,
                 retention_days: Optional[pulumi.Input[builtins.int]] = None,
                 snapshot_id: Optional[pulumi.Input[builtins.str]] = None,
                 snapshot_name: Optional[pulumi.Input[builtins.str]] = None,
                 snapshot_type: Optional[pulumi.Input[builtins.str]] = None,
                 source_size: Optional[pulumi.Input[builtins.int]] = None,
                 source_version: Optional[pulumi.Input[builtins.str]] = None,
                 status: Optional[pulumi.Input[builtins.str]] = None,
                 zone_id: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering Snapshot resources.
        :param pulumi.Input[builtins.str] created_time: 快照创建时间。
        :param pulumi.Input[builtins.str] description: 快照描述信息。
        :param pulumi.Input[builtins.str] file_system_id: 文件系统 ID。
        :param pulumi.Input[builtins.str] file_system_name: 文件系统名称。
        :param pulumi.Input[builtins.bool] is_encrypt: 是否加密，当前仅支持false，即不加密。
        :param pulumi.Input[builtins.str] progress: 快照创建进度。
        :param pulumi.Input[builtins.int] retention_days: 快照保留时间，默认为2147483647，即永久保留。
        :param pulumi.Input[builtins.str] snapshot_id: 快照 ID。
        :param pulumi.Input[builtins.str] snapshot_name: 快照名称。
        :param pulumi.Input[builtins.str] snapshot_type: 快照类型，默认为Manual，即手动快照。
        :param pulumi.Input[builtins.int] source_size: 文件系统容量，单位为 GiB。
        :param pulumi.Input[builtins.str] source_version: 文件系统版本。
        :param pulumi.Input[builtins.str] status: 快照状态。说明如下：Progressing：正在创建。Accomplished：创建成功。Failed：创建失败。
        :param pulumi.Input[builtins.str] zone_id: 可用区 ID。
        """
        if created_time is not None:
            pulumi.set(__self__, "created_time", created_time)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if file_system_id is not None:
            pulumi.set(__self__, "file_system_id", file_system_id)
        if file_system_name is not None:
            pulumi.set(__self__, "file_system_name", file_system_name)
        if is_encrypt is not None:
            pulumi.set(__self__, "is_encrypt", is_encrypt)
        if progress is not None:
            pulumi.set(__self__, "progress", progress)
        if retention_days is not None:
            pulumi.set(__self__, "retention_days", retention_days)
        if snapshot_id is not None:
            pulumi.set(__self__, "snapshot_id", snapshot_id)
        if snapshot_name is not None:
            pulumi.set(__self__, "snapshot_name", snapshot_name)
        if snapshot_type is not None:
            pulumi.set(__self__, "snapshot_type", snapshot_type)
        if source_size is not None:
            pulumi.set(__self__, "source_size", source_size)
        if source_version is not None:
            pulumi.set(__self__, "source_version", source_version)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if zone_id is not None:
            pulumi.set(__self__, "zone_id", zone_id)

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        快照创建时间。
        """
        return pulumi.get(self, "created_time")

    @created_time.setter
    def created_time(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "created_time", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        快照描述信息。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="fileSystemId")
    def file_system_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        文件系统 ID。
        """
        return pulumi.get(self, "file_system_id")

    @file_system_id.setter
    def file_system_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "file_system_id", value)

    @property
    @pulumi.getter(name="fileSystemName")
    def file_system_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        文件系统名称。
        """
        return pulumi.get(self, "file_system_name")

    @file_system_name.setter
    def file_system_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "file_system_name", value)

    @property
    @pulumi.getter(name="isEncrypt")
    def is_encrypt(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        是否加密，当前仅支持false，即不加密。
        """
        return pulumi.get(self, "is_encrypt")

    @is_encrypt.setter
    def is_encrypt(self, value: Optional[pulumi.Input[builtins.bool]]):
        pulumi.set(self, "is_encrypt", value)

    @property
    @pulumi.getter
    def progress(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        快照创建进度。
        """
        return pulumi.get(self, "progress")

    @progress.setter
    def progress(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "progress", value)

    @property
    @pulumi.getter(name="retentionDays")
    def retention_days(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        快照保留时间，默认为2147483647，即永久保留。
        """
        return pulumi.get(self, "retention_days")

    @retention_days.setter
    def retention_days(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "retention_days", value)

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

    @snapshot_id.setter
    def snapshot_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "snapshot_id", value)

    @property
    @pulumi.getter(name="snapshotName")
    def snapshot_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        快照名称。
        """
        return pulumi.get(self, "snapshot_name")

    @snapshot_name.setter
    def snapshot_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "snapshot_name", value)

    @property
    @pulumi.getter(name="snapshotType")
    def snapshot_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        快照类型，默认为Manual，即手动快照。
        """
        return pulumi.get(self, "snapshot_type")

    @snapshot_type.setter
    def snapshot_type(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "snapshot_type", value)

    @property
    @pulumi.getter(name="sourceSize")
    def source_size(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        文件系统容量，单位为 GiB。
        """
        return pulumi.get(self, "source_size")

    @source_size.setter
    def source_size(self, value: Optional[pulumi.Input[builtins.int]]):
        pulumi.set(self, "source_size", value)

    @property
    @pulumi.getter(name="sourceVersion")
    def source_version(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        文件系统版本。
        """
        return pulumi.get(self, "source_version")

    @source_version.setter
    def source_version(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "source_version", value)

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        快照状态。说明如下：Progressing：正在创建。Accomplished：创建成功。Failed：创建失败。
        """
        return pulumi.get(self, "status")

    @status.setter
    def status(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "status", value)

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

    @zone_id.setter
    def zone_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "zone_id", value)


@pulumi.type_token("bytepluscc:filenas/snapshot:Snapshot")
class Snapshot(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 file_system_id: Optional[pulumi.Input[builtins.str]] = None,
                 snapshot_name: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        快照是一种备份方式，每个快照都是文件存储在某个时间点的备份。当数据丢失或故障时，您可以通过快照恢复文件存储数据，找回丢失的数据。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        file_nas_snapshot_demo = bytepluscc.filenas.Snapshot("FileNASSnapshotDemo",
            file_system_id="enas-apse1a059****",
            snapshot_name="FileNASSnapshotDemo",
            description="FileNASSnapshotDemo description")
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:filenas/snapshot:Snapshot example "snapshot_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] description: 快照描述信息。
        :param pulumi.Input[builtins.str] file_system_id: 文件系统 ID。
        :param pulumi.Input[builtins.str] snapshot_name: 快照名称。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: SnapshotArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        快照是一种备份方式，每个快照都是文件存储在某个时间点的备份。当数据丢失或故障时，您可以通过快照恢复文件存储数据，找回丢失的数据。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        file_nas_snapshot_demo = bytepluscc.filenas.Snapshot("FileNASSnapshotDemo",
            file_system_id="enas-apse1a059****",
            snapshot_name="FileNASSnapshotDemo",
            description="FileNASSnapshotDemo description")
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:filenas/snapshot:Snapshot example "snapshot_id"
        ```

        :param str resource_name: The name of the resource.
        :param SnapshotArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(SnapshotArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 file_system_id: Optional[pulumi.Input[builtins.str]] = None,
                 snapshot_name: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = SnapshotArgs.__new__(SnapshotArgs)

            __props__.__dict__["description"] = description
            if file_system_id is None and not opts.urn:
                raise TypeError("Missing required property 'file_system_id'")
            __props__.__dict__["file_system_id"] = file_system_id
            if snapshot_name is None and not opts.urn:
                raise TypeError("Missing required property 'snapshot_name'")
            __props__.__dict__["snapshot_name"] = snapshot_name
            __props__.__dict__["created_time"] = None
            __props__.__dict__["file_system_name"] = None
            __props__.__dict__["is_encrypt"] = None
            __props__.__dict__["progress"] = None
            __props__.__dict__["retention_days"] = None
            __props__.__dict__["snapshot_id"] = None
            __props__.__dict__["snapshot_type"] = None
            __props__.__dict__["source_size"] = None
            __props__.__dict__["source_version"] = None
            __props__.__dict__["status"] = None
            __props__.__dict__["zone_id"] = None
        super(Snapshot, __self__).__init__(
            'bytepluscc:filenas/snapshot:Snapshot',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            description: Optional[pulumi.Input[builtins.str]] = None,
            file_system_id: Optional[pulumi.Input[builtins.str]] = None,
            file_system_name: Optional[pulumi.Input[builtins.str]] = None,
            is_encrypt: Optional[pulumi.Input[builtins.bool]] = None,
            progress: Optional[pulumi.Input[builtins.str]] = None,
            retention_days: Optional[pulumi.Input[builtins.int]] = None,
            snapshot_id: Optional[pulumi.Input[builtins.str]] = None,
            snapshot_name: Optional[pulumi.Input[builtins.str]] = None,
            snapshot_type: Optional[pulumi.Input[builtins.str]] = None,
            source_size: Optional[pulumi.Input[builtins.int]] = None,
            source_version: Optional[pulumi.Input[builtins.str]] = None,
            status: Optional[pulumi.Input[builtins.str]] = None,
            zone_id: Optional[pulumi.Input[builtins.str]] = None) -> 'Snapshot':
        """
        Get an existing Snapshot resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] created_time: 快照创建时间。
        :param pulumi.Input[builtins.str] description: 快照描述信息。
        :param pulumi.Input[builtins.str] file_system_id: 文件系统 ID。
        :param pulumi.Input[builtins.str] file_system_name: 文件系统名称。
        :param pulumi.Input[builtins.bool] is_encrypt: 是否加密，当前仅支持false，即不加密。
        :param pulumi.Input[builtins.str] progress: 快照创建进度。
        :param pulumi.Input[builtins.int] retention_days: 快照保留时间，默认为2147483647，即永久保留。
        :param pulumi.Input[builtins.str] snapshot_id: 快照 ID。
        :param pulumi.Input[builtins.str] snapshot_name: 快照名称。
        :param pulumi.Input[builtins.str] snapshot_type: 快照类型，默认为Manual，即手动快照。
        :param pulumi.Input[builtins.int] source_size: 文件系统容量，单位为 GiB。
        :param pulumi.Input[builtins.str] source_version: 文件系统版本。
        :param pulumi.Input[builtins.str] status: 快照状态。说明如下：Progressing：正在创建。Accomplished：创建成功。Failed：创建失败。
        :param pulumi.Input[builtins.str] zone_id: 可用区 ID。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _SnapshotState.__new__(_SnapshotState)

        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["description"] = description
        __props__.__dict__["file_system_id"] = file_system_id
        __props__.__dict__["file_system_name"] = file_system_name
        __props__.__dict__["is_encrypt"] = is_encrypt
        __props__.__dict__["progress"] = progress
        __props__.__dict__["retention_days"] = retention_days
        __props__.__dict__["snapshot_id"] = snapshot_id
        __props__.__dict__["snapshot_name"] = snapshot_name
        __props__.__dict__["snapshot_type"] = snapshot_type
        __props__.__dict__["source_size"] = source_size
        __props__.__dict__["source_version"] = source_version
        __props__.__dict__["status"] = status
        __props__.__dict__["zone_id"] = zone_id
        return Snapshot(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> pulumi.Output[builtins.str]:
        """
        快照创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[builtins.str]:
        """
        快照描述信息。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="fileSystemId")
    def file_system_id(self) -> pulumi.Output[builtins.str]:
        """
        文件系统 ID。
        """
        return pulumi.get(self, "file_system_id")

    @property
    @pulumi.getter(name="fileSystemName")
    def file_system_name(self) -> pulumi.Output[builtins.str]:
        """
        文件系统名称。
        """
        return pulumi.get(self, "file_system_name")

    @property
    @pulumi.getter(name="isEncrypt")
    def is_encrypt(self) -> pulumi.Output[builtins.bool]:
        """
        是否加密，当前仅支持false，即不加密。
        """
        return pulumi.get(self, "is_encrypt")

    @property
    @pulumi.getter
    def progress(self) -> pulumi.Output[builtins.str]:
        """
        快照创建进度。
        """
        return pulumi.get(self, "progress")

    @property
    @pulumi.getter(name="retentionDays")
    def retention_days(self) -> pulumi.Output[builtins.int]:
        """
        快照保留时间，默认为2147483647，即永久保留。
        """
        return pulumi.get(self, "retention_days")

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

    @property
    @pulumi.getter(name="snapshotName")
    def snapshot_name(self) -> pulumi.Output[builtins.str]:
        """
        快照名称。
        """
        return pulumi.get(self, "snapshot_name")

    @property
    @pulumi.getter(name="snapshotType")
    def snapshot_type(self) -> pulumi.Output[builtins.str]:
        """
        快照类型，默认为Manual，即手动快照。
        """
        return pulumi.get(self, "snapshot_type")

    @property
    @pulumi.getter(name="sourceSize")
    def source_size(self) -> pulumi.Output[builtins.int]:
        """
        文件系统容量，单位为 GiB。
        """
        return pulumi.get(self, "source_size")

    @property
    @pulumi.getter(name="sourceVersion")
    def source_version(self) -> pulumi.Output[builtins.str]:
        """
        文件系统版本。
        """
        return pulumi.get(self, "source_version")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[builtins.str]:
        """
        快照状态。说明如下：Progressing：正在创建。Accomplished：创建成功。Failed：创建失败。
        """
        return pulumi.get(self, "status")

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

