# 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
from ._inputs import *

__all__ = ['BackupArgs', 'Backup']

@pulumi.input_type
class BackupArgs:
    def __init__(__self__, *,
                 instance_id: pulumi.Input[builtins.str],
                 backup_metas: Optional[pulumi.Input[Sequence[pulumi.Input['BackupBackupMetaArgs']]]] = None,
                 backup_method: Optional[pulumi.Input[builtins.str]] = None,
                 backup_type: Optional[pulumi.Input[builtins.str]] = None):
        """
        The set of arguments for constructing a Backup resource.
        :param pulumi.Input[builtins.str] instance_id: 实例 ID。
        :param pulumi.Input[builtins.str] backup_method: 备份类型，取值：Physical（物理备份）、Logical（逻辑备份）、Snapshot（快照备份）。
        :param pulumi.Input[builtins.str] backup_type: 备份方式，取值：Full（全量/库表备）、Increment（增量备份）、DumpAll（全库备份）。
        """
        pulumi.set(__self__, "instance_id", instance_id)
        if backup_metas is not None:
            pulumi.set(__self__, "backup_metas", backup_metas)
        if backup_method is not None:
            pulumi.set(__self__, "backup_method", backup_method)
        if backup_type is not None:
            pulumi.set(__self__, "backup_type", backup_type)

    @property
    @pulumi.getter(name="instanceId")
    def instance_id(self) -> pulumi.Input[builtins.str]:
        """
        实例 ID。
        """
        return pulumi.get(self, "instance_id")

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

    @property
    @pulumi.getter(name="backupMetas")
    def backup_metas(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['BackupBackupMetaArgs']]]]:
        return pulumi.get(self, "backup_metas")

    @backup_metas.setter
    def backup_metas(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['BackupBackupMetaArgs']]]]):
        pulumi.set(self, "backup_metas", value)

    @property
    @pulumi.getter(name="backupMethod")
    def backup_method(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份类型，取值：Physical（物理备份）、Logical（逻辑备份）、Snapshot（快照备份）。
        """
        return pulumi.get(self, "backup_method")

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

    @property
    @pulumi.getter(name="backupType")
    def backup_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份方式，取值：Full（全量/库表备）、Increment（增量备份）、DumpAll（全库备份）。
        """
        return pulumi.get(self, "backup_type")

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


@pulumi.input_type
class _BackupState:
    def __init__(__self__, *,
                 backup_end_time: Optional[pulumi.Input[builtins.str]] = None,
                 backup_file_name: Optional[pulumi.Input[builtins.str]] = None,
                 backup_file_size: Optional[pulumi.Input[builtins.int]] = None,
                 backup_id: Optional[pulumi.Input[builtins.str]] = None,
                 backup_metas: Optional[pulumi.Input[Sequence[pulumi.Input['BackupBackupMetaArgs']]]] = None,
                 backup_method: Optional[pulumi.Input[builtins.str]] = None,
                 backup_name: Optional[pulumi.Input[builtins.str]] = None,
                 backup_region: Optional[pulumi.Input[builtins.str]] = None,
                 backup_start_time: Optional[pulumi.Input[builtins.str]] = None,
                 backup_status: Optional[pulumi.Input[builtins.str]] = None,
                 backup_type: Optional[pulumi.Input[builtins.str]] = None,
                 consistent_time: Optional[pulumi.Input[builtins.str]] = None,
                 create_type: Optional[pulumi.Input[builtins.str]] = None,
                 db_engine_version: Optional[pulumi.Input[builtins.str]] = None,
                 db_table_infos: Optional[pulumi.Input[Sequence[pulumi.Input['BackupDbTableInfoArgs']]]] = None,
                 download_status: Optional[pulumi.Input[builtins.str]] = None,
                 engine_type: Optional[pulumi.Input[builtins.str]] = None,
                 error_message: Optional[pulumi.Input[builtins.str]] = None,
                 expired_time: Optional[pulumi.Input[builtins.str]] = None,
                 instance_id: Optional[pulumi.Input[builtins.str]] = None,
                 is_encrypted: Optional[pulumi.Input[builtins.bool]] = None,
                 is_expired: Optional[pulumi.Input[builtins.bool]] = None):
        """
        Input properties used for looking up and filtering Backup resources.
        :param pulumi.Input[builtins.str] backup_end_time: 备份创建结束时间（UTC）。
        :param pulumi.Input[builtins.str] backup_file_name: 备份文件名。
        :param pulumi.Input[builtins.int] backup_file_size: 备份文件大小，单位为字节。
        :param pulumi.Input[builtins.str] backup_id: 备份 ID。
        :param pulumi.Input[builtins.str] backup_method: 备份类型，取值：Physical（物理备份）、Logical（逻辑备份）、Snapshot（快照备份）。
        :param pulumi.Input[builtins.str] backup_name: 备份的名称。
        :param pulumi.Input[builtins.str] backup_region: 备份所在区域。
        :param pulumi.Input[builtins.str] backup_start_time: 备份创建开始时间（UTC）。
        :param pulumi.Input[builtins.str] backup_status: 备份状态，取值：Success（成功）、Failed（失败）、Running（执行中）。
        :param pulumi.Input[builtins.str] backup_type: 备份方式，取值：Full（全量/库表备）、Increment（增量备份）、DumpAll（全库备份）。
        :param pulumi.Input[builtins.str] consistent_time: 一致性时间点。
        :param pulumi.Input[builtins.str] create_type: 备份创建者，取值：System（系统）、User（用户）。
        :param pulumi.Input[builtins.str] db_engine_version: 兼容版本。取值：MySQL*5*7：MySQL 5.7 版本。MySQL*8*0：MySQL 8.0 版本。
        :param pulumi.Input[builtins.str] download_status: 下载状态。
        :param pulumi.Input[builtins.str] engine_type: 数据库引擎类型。取值：InnoDB：InnoDB 引擎。RocksDB：RocksDB 引擎。
        :param pulumi.Input[builtins.str] error_message: 备份失败的错误信息。
        :param pulumi.Input[builtins.str] expired_time: 备份过期时间（UTC）。
        :param pulumi.Input[builtins.str] instance_id: 实例 ID。
        :param pulumi.Input[builtins.bool] is_encrypted: 是否加密。
        :param pulumi.Input[builtins.bool] is_expired: 是否已过期。
        """
        if backup_end_time is not None:
            pulumi.set(__self__, "backup_end_time", backup_end_time)
        if backup_file_name is not None:
            pulumi.set(__self__, "backup_file_name", backup_file_name)
        if backup_file_size is not None:
            pulumi.set(__self__, "backup_file_size", backup_file_size)
        if backup_id is not None:
            pulumi.set(__self__, "backup_id", backup_id)
        if backup_metas is not None:
            pulumi.set(__self__, "backup_metas", backup_metas)
        if backup_method is not None:
            pulumi.set(__self__, "backup_method", backup_method)
        if backup_name is not None:
            pulumi.set(__self__, "backup_name", backup_name)
        if backup_region is not None:
            pulumi.set(__self__, "backup_region", backup_region)
        if backup_start_time is not None:
            pulumi.set(__self__, "backup_start_time", backup_start_time)
        if backup_status is not None:
            pulumi.set(__self__, "backup_status", backup_status)
        if backup_type is not None:
            pulumi.set(__self__, "backup_type", backup_type)
        if consistent_time is not None:
            pulumi.set(__self__, "consistent_time", consistent_time)
        if create_type is not None:
            pulumi.set(__self__, "create_type", create_type)
        if db_engine_version is not None:
            pulumi.set(__self__, "db_engine_version", db_engine_version)
        if db_table_infos is not None:
            pulumi.set(__self__, "db_table_infos", db_table_infos)
        if download_status is not None:
            pulumi.set(__self__, "download_status", download_status)
        if engine_type is not None:
            pulumi.set(__self__, "engine_type", engine_type)
        if error_message is not None:
            pulumi.set(__self__, "error_message", error_message)
        if expired_time is not None:
            pulumi.set(__self__, "expired_time", expired_time)
        if instance_id is not None:
            pulumi.set(__self__, "instance_id", instance_id)
        if is_encrypted is not None:
            pulumi.set(__self__, "is_encrypted", is_encrypted)
        if is_expired is not None:
            pulumi.set(__self__, "is_expired", is_expired)

    @property
    @pulumi.getter(name="backupEndTime")
    def backup_end_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份创建结束时间（UTC）。
        """
        return pulumi.get(self, "backup_end_time")

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

    @property
    @pulumi.getter(name="backupFileName")
    def backup_file_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份文件名。
        """
        return pulumi.get(self, "backup_file_name")

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

    @property
    @pulumi.getter(name="backupFileSize")
    def backup_file_size(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        备份文件大小，单位为字节。
        """
        return pulumi.get(self, "backup_file_size")

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

    @property
    @pulumi.getter(name="backupId")
    def backup_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份 ID。
        """
        return pulumi.get(self, "backup_id")

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

    @property
    @pulumi.getter(name="backupMetas")
    def backup_metas(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['BackupBackupMetaArgs']]]]:
        return pulumi.get(self, "backup_metas")

    @backup_metas.setter
    def backup_metas(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['BackupBackupMetaArgs']]]]):
        pulumi.set(self, "backup_metas", value)

    @property
    @pulumi.getter(name="backupMethod")
    def backup_method(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份类型，取值：Physical（物理备份）、Logical（逻辑备份）、Snapshot（快照备份）。
        """
        return pulumi.get(self, "backup_method")

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

    @property
    @pulumi.getter(name="backupName")
    def backup_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份的名称。
        """
        return pulumi.get(self, "backup_name")

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

    @property
    @pulumi.getter(name="backupRegion")
    def backup_region(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份所在区域。
        """
        return pulumi.get(self, "backup_region")

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

    @property
    @pulumi.getter(name="backupStartTime")
    def backup_start_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份创建开始时间（UTC）。
        """
        return pulumi.get(self, "backup_start_time")

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

    @property
    @pulumi.getter(name="backupStatus")
    def backup_status(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份状态，取值：Success（成功）、Failed（失败）、Running（执行中）。
        """
        return pulumi.get(self, "backup_status")

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

    @property
    @pulumi.getter(name="backupType")
    def backup_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份方式，取值：Full（全量/库表备）、Increment（增量备份）、DumpAll（全库备份）。
        """
        return pulumi.get(self, "backup_type")

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

    @property
    @pulumi.getter(name="consistentTime")
    def consistent_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        一致性时间点。
        """
        return pulumi.get(self, "consistent_time")

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

    @property
    @pulumi.getter(name="createType")
    def create_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份创建者，取值：System（系统）、User（用户）。
        """
        return pulumi.get(self, "create_type")

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

    @property
    @pulumi.getter(name="dbEngineVersion")
    def db_engine_version(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        兼容版本。取值：MySQL*5*7：MySQL 5.7 版本。MySQL*8*0：MySQL 8.0 版本。
        """
        return pulumi.get(self, "db_engine_version")

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

    @property
    @pulumi.getter(name="dbTableInfos")
    def db_table_infos(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['BackupDbTableInfoArgs']]]]:
        return pulumi.get(self, "db_table_infos")

    @db_table_infos.setter
    def db_table_infos(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['BackupDbTableInfoArgs']]]]):
        pulumi.set(self, "db_table_infos", value)

    @property
    @pulumi.getter(name="downloadStatus")
    def download_status(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        下载状态。
        """
        return pulumi.get(self, "download_status")

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

    @property
    @pulumi.getter(name="engineType")
    def engine_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        数据库引擎类型。取值：InnoDB：InnoDB 引擎。RocksDB：RocksDB 引擎。
        """
        return pulumi.get(self, "engine_type")

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

    @property
    @pulumi.getter(name="errorMessage")
    def error_message(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份失败的错误信息。
        """
        return pulumi.get(self, "error_message")

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

    @property
    @pulumi.getter(name="expiredTime")
    def expired_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        备份过期时间（UTC）。
        """
        return pulumi.get(self, "expired_time")

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

    @property
    @pulumi.getter(name="instanceId")
    def instance_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        实例 ID。
        """
        return pulumi.get(self, "instance_id")

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

    @property
    @pulumi.getter(name="isEncrypted")
    def is_encrypted(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        是否加密。
        """
        return pulumi.get(self, "is_encrypted")

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

    @property
    @pulumi.getter(name="isExpired")
    def is_expired(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        是否已过期。
        """
        return pulumi.get(self, "is_expired")

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


@pulumi.type_token("bytepluscc:rdsmysql/backup:Backup")
class Backup(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 backup_metas: Optional[pulumi.Input[Sequence[pulumi.Input[Union['BackupBackupMetaArgs', 'BackupBackupMetaArgsDict']]]]] = None,
                 backup_method: Optional[pulumi.Input[builtins.str]] = None,
                 backup_type: Optional[pulumi.Input[builtins.str]] = None,
                 instance_id: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        备份是数据库的重要运行时文件，基于备份文件，数据库能够实现容灾、恢复等功能。云数据库 MySQL 版提供了数据备份和日志备份两种备份能力：通过数据备份可将数据库恢复至某个备份集，通过日志备份可将数据库恢复至指定时间点。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        rdsmysqlbackup_demo = bytepluscc.rdsmysql.Backup("rdsmysqlbackupDemo",
            instance_id="mysql-9e2c59****",
            backup_method="Logical",
            backup_metas=[{
                "database": "test",
                "tables": [],
            }])
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:rdsmysql/backup:Backup example "instance_id|backup_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] backup_method: 备份类型，取值：Physical（物理备份）、Logical（逻辑备份）、Snapshot（快照备份）。
        :param pulumi.Input[builtins.str] backup_type: 备份方式，取值：Full（全量/库表备）、Increment（增量备份）、DumpAll（全库备份）。
        :param pulumi.Input[builtins.str] instance_id: 实例 ID。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: BackupArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        备份是数据库的重要运行时文件，基于备份文件，数据库能够实现容灾、恢复等功能。云数据库 MySQL 版提供了数据备份和日志备份两种备份能力：通过数据备份可将数据库恢复至某个备份集，通过日志备份可将数据库恢复至指定时间点。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        rdsmysqlbackup_demo = bytepluscc.rdsmysql.Backup("rdsmysqlbackupDemo",
            instance_id="mysql-9e2c59****",
            backup_method="Logical",
            backup_metas=[{
                "database": "test",
                "tables": [],
            }])
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:rdsmysql/backup:Backup example "instance_id|backup_id"
        ```

        :param str resource_name: The name of the resource.
        :param BackupArgs 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(BackupArgs, 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,
                 backup_metas: Optional[pulumi.Input[Sequence[pulumi.Input[Union['BackupBackupMetaArgs', 'BackupBackupMetaArgsDict']]]]] = None,
                 backup_method: Optional[pulumi.Input[builtins.str]] = None,
                 backup_type: Optional[pulumi.Input[builtins.str]] = None,
                 instance_id: 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__ = BackupArgs.__new__(BackupArgs)

            __props__.__dict__["backup_metas"] = backup_metas
            __props__.__dict__["backup_method"] = backup_method
            __props__.__dict__["backup_type"] = backup_type
            if instance_id is None and not opts.urn:
                raise TypeError("Missing required property 'instance_id'")
            __props__.__dict__["instance_id"] = instance_id
            __props__.__dict__["backup_end_time"] = None
            __props__.__dict__["backup_file_name"] = None
            __props__.__dict__["backup_file_size"] = None
            __props__.__dict__["backup_id"] = None
            __props__.__dict__["backup_name"] = None
            __props__.__dict__["backup_region"] = None
            __props__.__dict__["backup_start_time"] = None
            __props__.__dict__["backup_status"] = None
            __props__.__dict__["consistent_time"] = None
            __props__.__dict__["create_type"] = None
            __props__.__dict__["db_engine_version"] = None
            __props__.__dict__["db_table_infos"] = None
            __props__.__dict__["download_status"] = None
            __props__.__dict__["engine_type"] = None
            __props__.__dict__["error_message"] = None
            __props__.__dict__["expired_time"] = None
            __props__.__dict__["is_encrypted"] = None
            __props__.__dict__["is_expired"] = None
        super(Backup, __self__).__init__(
            'bytepluscc:rdsmysql/backup:Backup',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            backup_end_time: Optional[pulumi.Input[builtins.str]] = None,
            backup_file_name: Optional[pulumi.Input[builtins.str]] = None,
            backup_file_size: Optional[pulumi.Input[builtins.int]] = None,
            backup_id: Optional[pulumi.Input[builtins.str]] = None,
            backup_metas: Optional[pulumi.Input[Sequence[pulumi.Input[Union['BackupBackupMetaArgs', 'BackupBackupMetaArgsDict']]]]] = None,
            backup_method: Optional[pulumi.Input[builtins.str]] = None,
            backup_name: Optional[pulumi.Input[builtins.str]] = None,
            backup_region: Optional[pulumi.Input[builtins.str]] = None,
            backup_start_time: Optional[pulumi.Input[builtins.str]] = None,
            backup_status: Optional[pulumi.Input[builtins.str]] = None,
            backup_type: Optional[pulumi.Input[builtins.str]] = None,
            consistent_time: Optional[pulumi.Input[builtins.str]] = None,
            create_type: Optional[pulumi.Input[builtins.str]] = None,
            db_engine_version: Optional[pulumi.Input[builtins.str]] = None,
            db_table_infos: Optional[pulumi.Input[Sequence[pulumi.Input[Union['BackupDbTableInfoArgs', 'BackupDbTableInfoArgsDict']]]]] = None,
            download_status: Optional[pulumi.Input[builtins.str]] = None,
            engine_type: Optional[pulumi.Input[builtins.str]] = None,
            error_message: Optional[pulumi.Input[builtins.str]] = None,
            expired_time: Optional[pulumi.Input[builtins.str]] = None,
            instance_id: Optional[pulumi.Input[builtins.str]] = None,
            is_encrypted: Optional[pulumi.Input[builtins.bool]] = None,
            is_expired: Optional[pulumi.Input[builtins.bool]] = None) -> 'Backup':
        """
        Get an existing Backup 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] backup_end_time: 备份创建结束时间（UTC）。
        :param pulumi.Input[builtins.str] backup_file_name: 备份文件名。
        :param pulumi.Input[builtins.int] backup_file_size: 备份文件大小，单位为字节。
        :param pulumi.Input[builtins.str] backup_id: 备份 ID。
        :param pulumi.Input[builtins.str] backup_method: 备份类型，取值：Physical（物理备份）、Logical（逻辑备份）、Snapshot（快照备份）。
        :param pulumi.Input[builtins.str] backup_name: 备份的名称。
        :param pulumi.Input[builtins.str] backup_region: 备份所在区域。
        :param pulumi.Input[builtins.str] backup_start_time: 备份创建开始时间（UTC）。
        :param pulumi.Input[builtins.str] backup_status: 备份状态，取值：Success（成功）、Failed（失败）、Running（执行中）。
        :param pulumi.Input[builtins.str] backup_type: 备份方式，取值：Full（全量/库表备）、Increment（增量备份）、DumpAll（全库备份）。
        :param pulumi.Input[builtins.str] consistent_time: 一致性时间点。
        :param pulumi.Input[builtins.str] create_type: 备份创建者，取值：System（系统）、User（用户）。
        :param pulumi.Input[builtins.str] db_engine_version: 兼容版本。取值：MySQL*5*7：MySQL 5.7 版本。MySQL*8*0：MySQL 8.0 版本。
        :param pulumi.Input[builtins.str] download_status: 下载状态。
        :param pulumi.Input[builtins.str] engine_type: 数据库引擎类型。取值：InnoDB：InnoDB 引擎。RocksDB：RocksDB 引擎。
        :param pulumi.Input[builtins.str] error_message: 备份失败的错误信息。
        :param pulumi.Input[builtins.str] expired_time: 备份过期时间（UTC）。
        :param pulumi.Input[builtins.str] instance_id: 实例 ID。
        :param pulumi.Input[builtins.bool] is_encrypted: 是否加密。
        :param pulumi.Input[builtins.bool] is_expired: 是否已过期。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _BackupState.__new__(_BackupState)

        __props__.__dict__["backup_end_time"] = backup_end_time
        __props__.__dict__["backup_file_name"] = backup_file_name
        __props__.__dict__["backup_file_size"] = backup_file_size
        __props__.__dict__["backup_id"] = backup_id
        __props__.__dict__["backup_metas"] = backup_metas
        __props__.__dict__["backup_method"] = backup_method
        __props__.__dict__["backup_name"] = backup_name
        __props__.__dict__["backup_region"] = backup_region
        __props__.__dict__["backup_start_time"] = backup_start_time
        __props__.__dict__["backup_status"] = backup_status
        __props__.__dict__["backup_type"] = backup_type
        __props__.__dict__["consistent_time"] = consistent_time
        __props__.__dict__["create_type"] = create_type
        __props__.__dict__["db_engine_version"] = db_engine_version
        __props__.__dict__["db_table_infos"] = db_table_infos
        __props__.__dict__["download_status"] = download_status
        __props__.__dict__["engine_type"] = engine_type
        __props__.__dict__["error_message"] = error_message
        __props__.__dict__["expired_time"] = expired_time
        __props__.__dict__["instance_id"] = instance_id
        __props__.__dict__["is_encrypted"] = is_encrypted
        __props__.__dict__["is_expired"] = is_expired
        return Backup(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="backupEndTime")
    def backup_end_time(self) -> pulumi.Output[builtins.str]:
        """
        备份创建结束时间（UTC）。
        """
        return pulumi.get(self, "backup_end_time")

    @property
    @pulumi.getter(name="backupFileName")
    def backup_file_name(self) -> pulumi.Output[builtins.str]:
        """
        备份文件名。
        """
        return pulumi.get(self, "backup_file_name")

    @property
    @pulumi.getter(name="backupFileSize")
    def backup_file_size(self) -> pulumi.Output[builtins.int]:
        """
        备份文件大小，单位为字节。
        """
        return pulumi.get(self, "backup_file_size")

    @property
    @pulumi.getter(name="backupId")
    def backup_id(self) -> pulumi.Output[builtins.str]:
        """
        备份 ID。
        """
        return pulumi.get(self, "backup_id")

    @property
    @pulumi.getter(name="backupMetas")
    def backup_metas(self) -> pulumi.Output[Sequence['outputs.BackupBackupMeta']]:
        return pulumi.get(self, "backup_metas")

    @property
    @pulumi.getter(name="backupMethod")
    def backup_method(self) -> pulumi.Output[builtins.str]:
        """
        备份类型，取值：Physical（物理备份）、Logical（逻辑备份）、Snapshot（快照备份）。
        """
        return pulumi.get(self, "backup_method")

    @property
    @pulumi.getter(name="backupName")
    def backup_name(self) -> pulumi.Output[builtins.str]:
        """
        备份的名称。
        """
        return pulumi.get(self, "backup_name")

    @property
    @pulumi.getter(name="backupRegion")
    def backup_region(self) -> pulumi.Output[builtins.str]:
        """
        备份所在区域。
        """
        return pulumi.get(self, "backup_region")

    @property
    @pulumi.getter(name="backupStartTime")
    def backup_start_time(self) -> pulumi.Output[builtins.str]:
        """
        备份创建开始时间（UTC）。
        """
        return pulumi.get(self, "backup_start_time")

    @property
    @pulumi.getter(name="backupStatus")
    def backup_status(self) -> pulumi.Output[builtins.str]:
        """
        备份状态，取值：Success（成功）、Failed（失败）、Running（执行中）。
        """
        return pulumi.get(self, "backup_status")

    @property
    @pulumi.getter(name="backupType")
    def backup_type(self) -> pulumi.Output[builtins.str]:
        """
        备份方式，取值：Full（全量/库表备）、Increment（增量备份）、DumpAll（全库备份）。
        """
        return pulumi.get(self, "backup_type")

    @property
    @pulumi.getter(name="consistentTime")
    def consistent_time(self) -> pulumi.Output[builtins.str]:
        """
        一致性时间点。
        """
        return pulumi.get(self, "consistent_time")

    @property
    @pulumi.getter(name="createType")
    def create_type(self) -> pulumi.Output[builtins.str]:
        """
        备份创建者，取值：System（系统）、User（用户）。
        """
        return pulumi.get(self, "create_type")

    @property
    @pulumi.getter(name="dbEngineVersion")
    def db_engine_version(self) -> pulumi.Output[builtins.str]:
        """
        兼容版本。取值：MySQL*5*7：MySQL 5.7 版本。MySQL*8*0：MySQL 8.0 版本。
        """
        return pulumi.get(self, "db_engine_version")

    @property
    @pulumi.getter(name="dbTableInfos")
    def db_table_infos(self) -> pulumi.Output[Sequence['outputs.BackupDbTableInfo']]:
        return pulumi.get(self, "db_table_infos")

    @property
    @pulumi.getter(name="downloadStatus")
    def download_status(self) -> pulumi.Output[builtins.str]:
        """
        下载状态。
        """
        return pulumi.get(self, "download_status")

    @property
    @pulumi.getter(name="engineType")
    def engine_type(self) -> pulumi.Output[builtins.str]:
        """
        数据库引擎类型。取值：InnoDB：InnoDB 引擎。RocksDB：RocksDB 引擎。
        """
        return pulumi.get(self, "engine_type")

    @property
    @pulumi.getter(name="errorMessage")
    def error_message(self) -> pulumi.Output[builtins.str]:
        """
        备份失败的错误信息。
        """
        return pulumi.get(self, "error_message")

    @property
    @pulumi.getter(name="expiredTime")
    def expired_time(self) -> pulumi.Output[builtins.str]:
        """
        备份过期时间（UTC）。
        """
        return pulumi.get(self, "expired_time")

    @property
    @pulumi.getter(name="instanceId")
    def instance_id(self) -> pulumi.Output[builtins.str]:
        """
        实例 ID。
        """
        return pulumi.get(self, "instance_id")

    @property
    @pulumi.getter(name="isEncrypted")
    def is_encrypted(self) -> pulumi.Output[builtins.bool]:
        """
        是否加密。
        """
        return pulumi.get(self, "is_encrypted")

    @property
    @pulumi.getter(name="isExpired")
    def is_expired(self) -> pulumi.Output[builtins.bool]:
        """
        是否已过期。
        """
        return pulumi.get(self, "is_expired")

