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

__all__ = [
    'GetVaultResult',
    'AwaitableGetVaultResult',
    'get_vault',
    'get_vault_output',
]

@pulumi.output_type
class GetVaultResult:
    """
    A collection of values returned by getVault.
    """
    def __init__(__self__, compartment_id=None, crypto_endpoint=None, defined_tags=None, display_name=None, freeform_tags=None, id=None, is_primary=None, management_endpoint=None, replica_details=None, restore_from_files=None, restore_from_object_stores=None, restore_trigger=None, restored_from_vault_id=None, state=None, time_created=None, time_of_deletion=None, vault_id=None, vault_type=None):
        if compartment_id and not isinstance(compartment_id, str):
            raise TypeError("Expected argument 'compartment_id' to be a str")
        pulumi.set(__self__, "compartment_id", compartment_id)
        if crypto_endpoint and not isinstance(crypto_endpoint, str):
            raise TypeError("Expected argument 'crypto_endpoint' to be a str")
        pulumi.set(__self__, "crypto_endpoint", crypto_endpoint)
        if defined_tags and not isinstance(defined_tags, dict):
            raise TypeError("Expected argument 'defined_tags' to be a dict")
        pulumi.set(__self__, "defined_tags", defined_tags)
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        if freeform_tags and not isinstance(freeform_tags, dict):
            raise TypeError("Expected argument 'freeform_tags' to be a dict")
        pulumi.set(__self__, "freeform_tags", freeform_tags)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if is_primary and not isinstance(is_primary, bool):
            raise TypeError("Expected argument 'is_primary' to be a bool")
        pulumi.set(__self__, "is_primary", is_primary)
        if management_endpoint and not isinstance(management_endpoint, str):
            raise TypeError("Expected argument 'management_endpoint' to be a str")
        pulumi.set(__self__, "management_endpoint", management_endpoint)
        if replica_details and not isinstance(replica_details, list):
            raise TypeError("Expected argument 'replica_details' to be a list")
        pulumi.set(__self__, "replica_details", replica_details)
        if restore_from_files and not isinstance(restore_from_files, list):
            raise TypeError("Expected argument 'restore_from_files' to be a list")
        pulumi.set(__self__, "restore_from_files", restore_from_files)
        if restore_from_object_stores and not isinstance(restore_from_object_stores, list):
            raise TypeError("Expected argument 'restore_from_object_stores' to be a list")
        pulumi.set(__self__, "restore_from_object_stores", restore_from_object_stores)
        if restore_trigger and not isinstance(restore_trigger, bool):
            raise TypeError("Expected argument 'restore_trigger' to be a bool")
        pulumi.set(__self__, "restore_trigger", restore_trigger)
        if restored_from_vault_id and not isinstance(restored_from_vault_id, str):
            raise TypeError("Expected argument 'restored_from_vault_id' to be a str")
        pulumi.set(__self__, "restored_from_vault_id", restored_from_vault_id)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if time_created and not isinstance(time_created, str):
            raise TypeError("Expected argument 'time_created' to be a str")
        pulumi.set(__self__, "time_created", time_created)
        if time_of_deletion and not isinstance(time_of_deletion, str):
            raise TypeError("Expected argument 'time_of_deletion' to be a str")
        pulumi.set(__self__, "time_of_deletion", time_of_deletion)
        if vault_id and not isinstance(vault_id, str):
            raise TypeError("Expected argument 'vault_id' to be a str")
        pulumi.set(__self__, "vault_id", vault_id)
        if vault_type and not isinstance(vault_type, str):
            raise TypeError("Expected argument 'vault_type' to be a str")
        pulumi.set(__self__, "vault_type", vault_type)

    @property
    @pulumi.getter(name="compartmentId")
    def compartment_id(self) -> str:
        """
        The OCID of the compartment that contains a particular vault.
        """
        return pulumi.get(self, "compartment_id")

    @property
    @pulumi.getter(name="cryptoEndpoint")
    def crypto_endpoint(self) -> str:
        """
        The service endpoint to perform cryptographic operations against. Cryptographic operations include [Encrypt](https://docs.cloud.oracle.com/iaas/api/#/en/key/latest/EncryptedData/Encrypt), [Decrypt](https://docs.cloud.oracle.com/iaas/api/#/en/key/latest/DecryptedData/Decrypt), and [GenerateDataEncryptionKey](https://docs.cloud.oracle.com/iaas/api/#/en/key/latest/GeneratedKey/GenerateDataEncryptionKey) operations.
        """
        return pulumi.get(self, "crypto_endpoint")

    @property
    @pulumi.getter(name="definedTags")
    def defined_tags(self) -> Mapping[str, Any]:
        """
        Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
        """
        return pulumi.get(self, "defined_tags")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> str:
        """
        A user-friendly name for the vault. It does not have to be unique, and it is changeable. Avoid entering confidential information.
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter(name="freeformTags")
    def freeform_tags(self) -> Mapping[str, Any]:
        """
        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
        """
        return pulumi.get(self, "freeform_tags")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The OCID of the vault.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="isPrimary")
    def is_primary(self) -> bool:
        """
        A boolean that will be true when vault is primary, and will be false when vault is a replica from a primary vault.
        """
        return pulumi.get(self, "is_primary")

    @property
    @pulumi.getter(name="managementEndpoint")
    def management_endpoint(self) -> str:
        """
        The service endpoint to perform management operations against. Management operations include "Create," "Update," "List," "Get," and "Delete" operations.
        """
        return pulumi.get(self, "management_endpoint")

    @property
    @pulumi.getter(name="replicaDetails")
    def replica_details(self) -> Sequence['outputs.GetVaultReplicaDetailResult']:
        """
        Vault replica details
        """
        return pulumi.get(self, "replica_details")

    @property
    @pulumi.getter(name="restoreFromFiles")
    def restore_from_files(self) -> Sequence['outputs.GetVaultRestoreFromFileResult']:
        """
        Details where vault was backed up.
        """
        return pulumi.get(self, "restore_from_files")

    @property
    @pulumi.getter(name="restoreFromObjectStores")
    def restore_from_object_stores(self) -> Sequence['outputs.GetVaultRestoreFromObjectStoreResult']:
        """
        Details where vault was backed up
        """
        return pulumi.get(self, "restore_from_object_stores")

    @property
    @pulumi.getter(name="restoreTrigger")
    def restore_trigger(self) -> bool:
        """
        When flipped, triggers restore if restore options are provided. Values of 0 or 1 are supported
        """
        return pulumi.get(self, "restore_trigger")

    @property
    @pulumi.getter(name="restoredFromVaultId")
    def restored_from_vault_id(self) -> str:
        """
        The OCID of the vault from which this vault was restored, if it was restored from a backup file.  If you restore a vault to the same region, the vault retains the same OCID that it had when you  backed up the vault.
        """
        return pulumi.get(self, "restored_from_vault_id")

    @property
    @pulumi.getter
    def state(self) -> str:
        """
        The vault's current lifecycle state.  Example: `DELETED`
        """
        return pulumi.get(self, "state")

    @property
    @pulumi.getter(name="timeCreated")
    def time_created(self) -> str:
        """
        The date and time this vault was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.  Example: `2018-04-03T21:10:29.600Z`
        """
        return pulumi.get(self, "time_created")

    @property
    @pulumi.getter(name="timeOfDeletion")
    def time_of_deletion(self) -> str:
        """
        An optional property to indicate when to delete the vault, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2018-04-03T21:10:29.600Z`
        """
        return pulumi.get(self, "time_of_deletion")

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

    @property
    @pulumi.getter(name="vaultType")
    def vault_type(self) -> str:
        """
        The type of vault. Each type of vault stores the key with different degrees of isolation and has different options and pricing.
        """
        return pulumi.get(self, "vault_type")


class AwaitableGetVaultResult(GetVaultResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVaultResult(
            compartment_id=self.compartment_id,
            crypto_endpoint=self.crypto_endpoint,
            defined_tags=self.defined_tags,
            display_name=self.display_name,
            freeform_tags=self.freeform_tags,
            id=self.id,
            is_primary=self.is_primary,
            management_endpoint=self.management_endpoint,
            replica_details=self.replica_details,
            restore_from_files=self.restore_from_files,
            restore_from_object_stores=self.restore_from_object_stores,
            restore_trigger=self.restore_trigger,
            restored_from_vault_id=self.restored_from_vault_id,
            state=self.state,
            time_created=self.time_created,
            time_of_deletion=self.time_of_deletion,
            vault_id=self.vault_id,
            vault_type=self.vault_type)


def get_vault(vault_id: Optional[str] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVaultResult:
    """
    This data source provides details about a specific Vault resource in Oracle Cloud Infrastructure Kms service.

    Gets the specified vault's configuration information.

    As a provisioning operation, this call is subject to a Key Management limit that applies to
    the total number of requests across all provisioning read operations. Key Management might
    throttle this call to reject an otherwise valid request when the total rate of provisioning
    read operations exceeds 10 requests per second for a given tenancy.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_vault = oci.Kms.get_vault(vault_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str vault_id: The OCID of the vault.
    """
    __args__ = dict()
    __args__['vaultId'] = vault_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:Kms/getVault:getVault', __args__, opts=opts, typ=GetVaultResult).value

    return AwaitableGetVaultResult(
        compartment_id=__ret__.compartment_id,
        crypto_endpoint=__ret__.crypto_endpoint,
        defined_tags=__ret__.defined_tags,
        display_name=__ret__.display_name,
        freeform_tags=__ret__.freeform_tags,
        id=__ret__.id,
        is_primary=__ret__.is_primary,
        management_endpoint=__ret__.management_endpoint,
        replica_details=__ret__.replica_details,
        restore_from_files=__ret__.restore_from_files,
        restore_from_object_stores=__ret__.restore_from_object_stores,
        restore_trigger=__ret__.restore_trigger,
        restored_from_vault_id=__ret__.restored_from_vault_id,
        state=__ret__.state,
        time_created=__ret__.time_created,
        time_of_deletion=__ret__.time_of_deletion,
        vault_id=__ret__.vault_id,
        vault_type=__ret__.vault_type)


@_utilities.lift_output_func(get_vault)
def get_vault_output(vault_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetVaultResult]:
    """
    This data source provides details about a specific Vault resource in Oracle Cloud Infrastructure Kms service.

    Gets the specified vault's configuration information.

    As a provisioning operation, this call is subject to a Key Management limit that applies to
    the total number of requests across all provisioning read operations. Key Management might
    throttle this call to reject an otherwise valid request when the total rate of provisioning
    read operations exceeds 10 requests per second for a given tenancy.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_vault = oci.Kms.get_vault(vault_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str vault_id: The OCID of the vault.
    """
    ...
