# 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__ = [
    'GetBackupResult',
    'AwaitableGetBackupResult',
    'get_backup',
    'get_backup_output',
]

@pulumi.output_type
class GetBackupResult:
    """
    A collection of values returned by getBackup.
    """
    def __init__(__self__, backup_end_time=None, backup_file_size=None, backup_id=None, backup_method=None, backup_retention_period=None, backup_start_time=None, backup_status=None, backup_time=None, backup_type=None, consistent_time=None, continue_backup=None, create_type=None, full_backup_period=None, id=None, instance_id=None):
        if backup_end_time and not isinstance(backup_end_time, str):
            raise TypeError("Expected argument 'backup_end_time' to be a str")
        pulumi.set(__self__, "backup_end_time", backup_end_time)
        if backup_file_size and not isinstance(backup_file_size, int):
            raise TypeError("Expected argument 'backup_file_size' to be a int")
        pulumi.set(__self__, "backup_file_size", backup_file_size)
        if backup_id and not isinstance(backup_id, str):
            raise TypeError("Expected argument 'backup_id' to be a str")
        pulumi.set(__self__, "backup_id", backup_id)
        if backup_method and not isinstance(backup_method, str):
            raise TypeError("Expected argument 'backup_method' to be a str")
        pulumi.set(__self__, "backup_method", backup_method)
        if backup_retention_period and not isinstance(backup_retention_period, int):
            raise TypeError("Expected argument 'backup_retention_period' to be a int")
        pulumi.set(__self__, "backup_retention_period", backup_retention_period)
        if backup_start_time and not isinstance(backup_start_time, str):
            raise TypeError("Expected argument 'backup_start_time' to be a str")
        pulumi.set(__self__, "backup_start_time", backup_start_time)
        if backup_status and not isinstance(backup_status, str):
            raise TypeError("Expected argument 'backup_status' to be a str")
        pulumi.set(__self__, "backup_status", backup_status)
        if backup_time and not isinstance(backup_time, str):
            raise TypeError("Expected argument 'backup_time' to be a str")
        pulumi.set(__self__, "backup_time", backup_time)
        if backup_type and not isinstance(backup_type, str):
            raise TypeError("Expected argument 'backup_type' to be a str")
        pulumi.set(__self__, "backup_type", backup_type)
        if consistent_time and not isinstance(consistent_time, str):
            raise TypeError("Expected argument 'consistent_time' to be a str")
        pulumi.set(__self__, "consistent_time", consistent_time)
        if continue_backup and not isinstance(continue_backup, bool):
            raise TypeError("Expected argument 'continue_backup' to be a bool")
        pulumi.set(__self__, "continue_backup", continue_backup)
        if create_type and not isinstance(create_type, str):
            raise TypeError("Expected argument 'create_type' to be a str")
        pulumi.set(__self__, "create_type", create_type)
        if full_backup_period and not isinstance(full_backup_period, str):
            raise TypeError("Expected argument 'full_backup_period' to be a str")
        pulumi.set(__self__, "full_backup_period", full_backup_period)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", 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)

    @property
    @pulumi.getter(name="backupEndTime")
    def backup_end_time(self) -> builtins.str:
        """
        备份的结束时间，格式：yyyy-MM-ddTHH:mm:ssZ（UTC 时间）。
        """
        return pulumi.get(self, "backup_end_time")

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

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

    @property
    @pulumi.getter(name="backupMethod")
    def backup_method(self) -> builtins.str:
        """
        备份方式，目前仅支持物理备份。
        """
        return pulumi.get(self, "backup_method")

    @property
    @pulumi.getter(name="backupRetentionPeriod")
    def backup_retention_period(self) -> builtins.int:
        """
        数据备份保留天数。
        """
        return pulumi.get(self, "backup_retention_period")

    @property
    @pulumi.getter(name="backupStartTime")
    def backup_start_time(self) -> builtins.str:
        """
        备份的开始时间，格式：yyyy-MM-ddTHH:mm:ssZ（UTC 时间）。
        """
        return pulumi.get(self, "backup_start_time")

    @property
    @pulumi.getter(name="backupStatus")
    def backup_status(self) -> builtins.str:
        """
        备份状态。
        """
        return pulumi.get(self, "backup_status")

    @property
    @pulumi.getter(name="backupTime")
    def backup_time(self) -> builtins.str:
        """
        执行备份任务的时间，间隔窗口为两小时。格式：HH:mmZ-HH:mmZ（UTC 时间）。
        """
        return pulumi.get(self, "backup_time")

    @property
    @pulumi.getter(name="backupType")
    def backup_type(self) -> builtins.str:
        """
        备份类型，目前仅支持全量备份。
        """
        return pulumi.get(self, "backup_type")

    @property
    @pulumi.getter(name="consistentTime")
    def consistent_time(self) -> builtins.str:
        """
        一致性备份的时间点，格式：yyyy-MM-ddTHH:mm:ssZ（UTC 时间）。
        """
        return pulumi.get(self, "consistent_time")

    @property
    @pulumi.getter(name="continueBackup")
    def continue_backup(self) -> builtins.bool:
        """
        是否开启持续备份，取值固定为 true。
        """
        return pulumi.get(self, "continue_backup")

    @property
    @pulumi.getter(name="createType")
    def create_type(self) -> builtins.str:
        """
        创建类型。
        """
        return pulumi.get(self, "create_type")

    @property
    @pulumi.getter(name="fullBackupPeriod")
    def full_backup_period(self) -> builtins.str:
        """
        全量备份周期，多个取值用英文逗号（,）隔开。
        """
        return pulumi.get(self, "full_backup_period")

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

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


class AwaitableGetBackupResult(GetBackupResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetBackupResult(
            backup_end_time=self.backup_end_time,
            backup_file_size=self.backup_file_size,
            backup_id=self.backup_id,
            backup_method=self.backup_method,
            backup_retention_period=self.backup_retention_period,
            backup_start_time=self.backup_start_time,
            backup_status=self.backup_status,
            backup_time=self.backup_time,
            backup_type=self.backup_type,
            consistent_time=self.consistent_time,
            continue_backup=self.continue_backup,
            create_type=self.create_type,
            full_backup_period=self.full_backup_period,
            id=self.id,
            instance_id=self.instance_id)


def get_backup(id: Optional[builtins.str] = None,
               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetBackupResult:
    """
    Data Source schema for Byteplus::VEDBM::Backup


    :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:vedbm/getBackup:getBackup', __args__, opts=opts, typ=GetBackupResult).value

    return AwaitableGetBackupResult(
        backup_end_time=pulumi.get(__ret__, 'backup_end_time'),
        backup_file_size=pulumi.get(__ret__, 'backup_file_size'),
        backup_id=pulumi.get(__ret__, 'backup_id'),
        backup_method=pulumi.get(__ret__, 'backup_method'),
        backup_retention_period=pulumi.get(__ret__, 'backup_retention_period'),
        backup_start_time=pulumi.get(__ret__, 'backup_start_time'),
        backup_status=pulumi.get(__ret__, 'backup_status'),
        backup_time=pulumi.get(__ret__, 'backup_time'),
        backup_type=pulumi.get(__ret__, 'backup_type'),
        consistent_time=pulumi.get(__ret__, 'consistent_time'),
        continue_backup=pulumi.get(__ret__, 'continue_backup'),
        create_type=pulumi.get(__ret__, 'create_type'),
        full_backup_period=pulumi.get(__ret__, 'full_backup_period'),
        id=pulumi.get(__ret__, 'id'),
        instance_id=pulumi.get(__ret__, 'instance_id'))
def get_backup_output(id: Optional[pulumi.Input[builtins.str]] = None,
                      opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetBackupResult]:
    """
    Data Source schema for Byteplus::VEDBM::Backup


    :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:vedbm/getBackup:getBackup', __args__, opts=opts, typ=GetBackupResult)
    return __ret__.apply(lambda __response__: GetBackupResult(
        backup_end_time=pulumi.get(__response__, 'backup_end_time'),
        backup_file_size=pulumi.get(__response__, 'backup_file_size'),
        backup_id=pulumi.get(__response__, 'backup_id'),
        backup_method=pulumi.get(__response__, 'backup_method'),
        backup_retention_period=pulumi.get(__response__, 'backup_retention_period'),
        backup_start_time=pulumi.get(__response__, 'backup_start_time'),
        backup_status=pulumi.get(__response__, 'backup_status'),
        backup_time=pulumi.get(__response__, 'backup_time'),
        backup_type=pulumi.get(__response__, 'backup_type'),
        consistent_time=pulumi.get(__response__, 'consistent_time'),
        continue_backup=pulumi.get(__response__, 'continue_backup'),
        create_type=pulumi.get(__response__, 'create_type'),
        full_backup_period=pulumi.get(__response__, 'full_backup_period'),
        id=pulumi.get(__response__, 'id'),
        instance_id=pulumi.get(__response__, 'instance_id')))
