# 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 json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from . import utilities, tables

class GetEtcdBackupResult:
    """
    A collection of values returned by getEtcdBackup.
    """
    def __init__(__self__, annotations=None, backup_config=None, cluster_id=None, filename=None, id=None, labels=None, manual=None, name=None, namespace_id=None):
        if annotations and not isinstance(annotations, dict):
            raise TypeError("Expected argument 'annotations' to be a dict")
        __self__.annotations = annotations
        """
        (Computed) Annotations for Etcd Backup object (map)
        """
        if backup_config and not isinstance(backup_config, dict):
            raise TypeError("Expected argument 'backup_config' to be a dict")
        __self__.backup_config = backup_config
        """
        (Computed) Backup config for etcd backup (list maxitems:1)
        """
        if cluster_id and not isinstance(cluster_id, str):
            raise TypeError("Expected argument 'cluster_id' to be a str")
        __self__.cluster_id = cluster_id
        if filename and not isinstance(filename, str):
            raise TypeError("Expected argument 'filename' to be a str")
        __self__.filename = filename
        """
        (Computed) Filename of the Etcd Backup (string)
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        The provider-assigned unique ID for this managed resource.
        """
        if labels and not isinstance(labels, dict):
            raise TypeError("Expected argument 'labels' to be a dict")
        __self__.labels = labels
        """
        (Computed) Labels for Etcd Backup object (map)
        """
        if manual and not isinstance(manual, bool):
            raise TypeError("Expected argument 'manual' to be a bool")
        __self__.manual = manual
        """
        (Computed) Manual execution of the Etcd Backup. Default `false` (bool)
        """
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        if namespace_id and not isinstance(namespace_id, str):
            raise TypeError("Expected argument 'namespace_id' to be a str")
        __self__.namespace_id = namespace_id
        """
        (Computed) Description for the Etcd Backup (string)
        """
class AwaitableGetEtcdBackupResult(GetEtcdBackupResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetEtcdBackupResult(
            annotations=self.annotations,
            backup_config=self.backup_config,
            cluster_id=self.cluster_id,
            filename=self.filename,
            id=self.id,
            labels=self.labels,
            manual=self.manual,
            name=self.name,
            namespace_id=self.namespace_id)

def get_etcd_backup(cluster_id=None,name=None,opts=None):
    """
    Use this data source to retrieve information about a Rancher v2 etcd backup.




    :param str cluster_id: Cluster ID to config Etcd Backup (string)
    :param str name: The name of the Etcd Backup (string)
    """
    __args__ = dict()


    __args__['clusterId'] = cluster_id
    __args__['name'] = name
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('rancher2:index/getEtcdBackup:getEtcdBackup', __args__, opts=opts).value

    return AwaitableGetEtcdBackupResult(
        annotations=__ret__.get('annotations'),
        backup_config=__ret__.get('backupConfig'),
        cluster_id=__ret__.get('clusterId'),
        filename=__ret__.get('filename'),
        id=__ret__.get('id'),
        labels=__ret__.get('labels'),
        manual=__ret__.get('manual'),
        name=__ret__.get('name'),
        namespace_id=__ret__.get('namespaceId'))
