# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs

__all__ = [
    'GetBackupVaultResult',
    'AwaitableGetBackupVaultResult',
    'get_backup_vault',
    'get_backup_vault_output',
]

@pulumi.output_type
class GetBackupVaultResult:
    """
    A collection of values returned by getBackupVault.
    """
    def __init__(__self__, datastore_type=None, id=None, identities=None, location=None, name=None, redundancy=None, resource_group_name=None, tags=None):
        if datastore_type and not isinstance(datastore_type, str):
            raise TypeError("Expected argument 'datastore_type' to be a str")
        pulumi.set(__self__, "datastore_type", datastore_type)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if identities and not isinstance(identities, list):
            raise TypeError("Expected argument 'identities' to be a list")
        pulumi.set(__self__, "identities", identities)
        if location and not isinstance(location, str):
            raise TypeError("Expected argument 'location' to be a str")
        pulumi.set(__self__, "location", location)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if redundancy and not isinstance(redundancy, str):
            raise TypeError("Expected argument 'redundancy' to be a str")
        pulumi.set(__self__, "redundancy", redundancy)
        if resource_group_name and not isinstance(resource_group_name, str):
            raise TypeError("Expected argument 'resource_group_name' to be a str")
        pulumi.set(__self__, "resource_group_name", resource_group_name)
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        pulumi.set(__self__, "tags", tags)

    @property
    @pulumi.getter(name="datastoreType")
    def datastore_type(self) -> str:
        """
        Specifies the type of the data store.
        """
        return pulumi.get(self, "datastore_type")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def identities(self) -> Sequence['outputs.GetBackupVaultIdentityResult']:
        """
        A `identity` block as defined below.
        """
        return pulumi.get(self, "identities")

    @property
    @pulumi.getter
    def location(self) -> str:
        """
        The Azure Region where the Backup Vault exists.
        """
        return pulumi.get(self, "location")

    @property
    @pulumi.getter
    def name(self) -> str:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def redundancy(self) -> str:
        """
        Specifies the backup storage redundancy.
        """
        return pulumi.get(self, "redundancy")

    @property
    @pulumi.getter(name="resourceGroupName")
    def resource_group_name(self) -> str:
        return pulumi.get(self, "resource_group_name")

    @property
    @pulumi.getter
    def tags(self) -> Mapping[str, str]:
        """
        A mapping of tags which are assigned to the Backup Vault.
        """
        return pulumi.get(self, "tags")


class AwaitableGetBackupVaultResult(GetBackupVaultResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetBackupVaultResult(
            datastore_type=self.datastore_type,
            id=self.id,
            identities=self.identities,
            location=self.location,
            name=self.name,
            redundancy=self.redundancy,
            resource_group_name=self.resource_group_name,
            tags=self.tags)


def get_backup_vault(name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetBackupVaultResult:
    """
    Use this data source to access information about an existing Backup Vault.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_azure as azure

    example = azure.dataprotection.get_backup_vault(name="existing-backup-vault",
        resource_group_name="existing-resource-group")
    pulumi.export("azurermDataProtectionBackupVaultId", data["azurerm_vpn_gateway"]["example"]["id"])
    pulumi.export("azurermDataProtectionBackupVaultPrincipalId", example.identities[0].principal_id)
    ```


    :param str name: Specifies the name of the Backup Vault.
    :param str resource_group_name: The name of the Resource Group where the Backup Vault exists.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['resourceGroupName'] = resource_group_name
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('azure:dataprotection/getBackupVault:getBackupVault', __args__, opts=opts, typ=GetBackupVaultResult).value

    return AwaitableGetBackupVaultResult(
        datastore_type=__ret__.datastore_type,
        id=__ret__.id,
        identities=__ret__.identities,
        location=__ret__.location,
        name=__ret__.name,
        redundancy=__ret__.redundancy,
        resource_group_name=__ret__.resource_group_name,
        tags=__ret__.tags)


@_utilities.lift_output_func(get_backup_vault)
def get_backup_vault_output(name: Optional[pulumi.Input[str]] = None,
                            resource_group_name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetBackupVaultResult]:
    """
    Use this data source to access information about an existing Backup Vault.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_azure as azure

    example = azure.dataprotection.get_backup_vault(name="existing-backup-vault",
        resource_group_name="existing-resource-group")
    pulumi.export("azurermDataProtectionBackupVaultId", data["azurerm_vpn_gateway"]["example"]["id"])
    pulumi.export("azurermDataProtectionBackupVaultPrincipalId", example.identities[0].principal_id)
    ```


    :param str name: Specifies the name of the Backup Vault.
    :param str resource_group_name: The name of the Resource Group where the Backup Vault exists.
    """
    ...
