# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
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__ = [
    'GetGroupResult',
    'AwaitableGetGroupResult',
    'get_group',
    'get_group_output',
]

@pulumi.output_type
class GetGroupResult:
    """
    A collection of values returned by getGroup.
    """
    def __init__(__self__, alias_canonical_id=None, alias_creation_time=None, alias_id=None, alias_last_update_time=None, alias_merged_from_canonical_ids=None, alias_metadata=None, alias_mount_accessor=None, alias_mount_path=None, alias_mount_type=None, alias_name=None, creation_time=None, data_json=None, group_id=None, group_name=None, id=None, last_update_time=None, member_entity_ids=None, member_group_ids=None, metadata=None, modify_index=None, namespace=None, namespace_id=None, parent_group_ids=None, policies=None, type=None):
        if alias_canonical_id and not isinstance(alias_canonical_id, str):
            raise TypeError("Expected argument 'alias_canonical_id' to be a str")
        pulumi.set(__self__, "alias_canonical_id", alias_canonical_id)
        if alias_creation_time and not isinstance(alias_creation_time, str):
            raise TypeError("Expected argument 'alias_creation_time' to be a str")
        pulumi.set(__self__, "alias_creation_time", alias_creation_time)
        if alias_id and not isinstance(alias_id, str):
            raise TypeError("Expected argument 'alias_id' to be a str")
        pulumi.set(__self__, "alias_id", alias_id)
        if alias_last_update_time and not isinstance(alias_last_update_time, str):
            raise TypeError("Expected argument 'alias_last_update_time' to be a str")
        pulumi.set(__self__, "alias_last_update_time", alias_last_update_time)
        if alias_merged_from_canonical_ids and not isinstance(alias_merged_from_canonical_ids, list):
            raise TypeError("Expected argument 'alias_merged_from_canonical_ids' to be a list")
        pulumi.set(__self__, "alias_merged_from_canonical_ids", alias_merged_from_canonical_ids)
        if alias_metadata and not isinstance(alias_metadata, dict):
            raise TypeError("Expected argument 'alias_metadata' to be a dict")
        pulumi.set(__self__, "alias_metadata", alias_metadata)
        if alias_mount_accessor and not isinstance(alias_mount_accessor, str):
            raise TypeError("Expected argument 'alias_mount_accessor' to be a str")
        pulumi.set(__self__, "alias_mount_accessor", alias_mount_accessor)
        if alias_mount_path and not isinstance(alias_mount_path, str):
            raise TypeError("Expected argument 'alias_mount_path' to be a str")
        pulumi.set(__self__, "alias_mount_path", alias_mount_path)
        if alias_mount_type and not isinstance(alias_mount_type, str):
            raise TypeError("Expected argument 'alias_mount_type' to be a str")
        pulumi.set(__self__, "alias_mount_type", alias_mount_type)
        if alias_name and not isinstance(alias_name, str):
            raise TypeError("Expected argument 'alias_name' to be a str")
        pulumi.set(__self__, "alias_name", alias_name)
        if creation_time and not isinstance(creation_time, str):
            raise TypeError("Expected argument 'creation_time' to be a str")
        pulumi.set(__self__, "creation_time", creation_time)
        if data_json and not isinstance(data_json, str):
            raise TypeError("Expected argument 'data_json' to be a str")
        pulumi.set(__self__, "data_json", data_json)
        if group_id and not isinstance(group_id, str):
            raise TypeError("Expected argument 'group_id' to be a str")
        pulumi.set(__self__, "group_id", group_id)
        if group_name and not isinstance(group_name, str):
            raise TypeError("Expected argument 'group_name' to be a str")
        pulumi.set(__self__, "group_name", group_name)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if last_update_time and not isinstance(last_update_time, str):
            raise TypeError("Expected argument 'last_update_time' to be a str")
        pulumi.set(__self__, "last_update_time", last_update_time)
        if member_entity_ids and not isinstance(member_entity_ids, list):
            raise TypeError("Expected argument 'member_entity_ids' to be a list")
        pulumi.set(__self__, "member_entity_ids", member_entity_ids)
        if member_group_ids and not isinstance(member_group_ids, list):
            raise TypeError("Expected argument 'member_group_ids' to be a list")
        pulumi.set(__self__, "member_group_ids", member_group_ids)
        if metadata and not isinstance(metadata, dict):
            raise TypeError("Expected argument 'metadata' to be a dict")
        pulumi.set(__self__, "metadata", metadata)
        if modify_index and not isinstance(modify_index, int):
            raise TypeError("Expected argument 'modify_index' to be a int")
        pulumi.set(__self__, "modify_index", modify_index)
        if namespace and not isinstance(namespace, str):
            raise TypeError("Expected argument 'namespace' to be a str")
        pulumi.set(__self__, "namespace", namespace)
        if namespace_id and not isinstance(namespace_id, str):
            raise TypeError("Expected argument 'namespace_id' to be a str")
        pulumi.set(__self__, "namespace_id", namespace_id)
        if parent_group_ids and not isinstance(parent_group_ids, list):
            raise TypeError("Expected argument 'parent_group_ids' to be a list")
        pulumi.set(__self__, "parent_group_ids", parent_group_ids)
        if policies and not isinstance(policies, list):
            raise TypeError("Expected argument 'policies' to be a list")
        pulumi.set(__self__, "policies", policies)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)

    @_builtins.property
    @pulumi.getter(name="aliasCanonicalId")
    def alias_canonical_id(self) -> _builtins.str:
        """
        Canonical ID of the Alias
        """
        return pulumi.get(self, "alias_canonical_id")

    @_builtins.property
    @pulumi.getter(name="aliasCreationTime")
    def alias_creation_time(self) -> _builtins.str:
        """
        Creation time of the Alias
        """
        return pulumi.get(self, "alias_creation_time")

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

    @_builtins.property
    @pulumi.getter(name="aliasLastUpdateTime")
    def alias_last_update_time(self) -> _builtins.str:
        """
        Last update time of the alias
        """
        return pulumi.get(self, "alias_last_update_time")

    @_builtins.property
    @pulumi.getter(name="aliasMergedFromCanonicalIds")
    def alias_merged_from_canonical_ids(self) -> Sequence[_builtins.str]:
        """
        List of canonical IDs merged with this alias
        """
        return pulumi.get(self, "alias_merged_from_canonical_ids")

    @_builtins.property
    @pulumi.getter(name="aliasMetadata")
    def alias_metadata(self) -> Mapping[str, _builtins.str]:
        """
        Arbitrary metadata
        """
        return pulumi.get(self, "alias_metadata")

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

    @_builtins.property
    @pulumi.getter(name="aliasMountPath")
    def alias_mount_path(self) -> _builtins.str:
        """
        Authentication mount path which this alias belongs to
        """
        return pulumi.get(self, "alias_mount_path")

    @_builtins.property
    @pulumi.getter(name="aliasMountType")
    def alias_mount_type(self) -> _builtins.str:
        """
        Authentication mount type which this alias belongs to
        """
        return pulumi.get(self, "alias_mount_type")

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

    @_builtins.property
    @pulumi.getter(name="creationTime")
    def creation_time(self) -> _builtins.str:
        """
        Creation timestamp of the group
        """
        return pulumi.get(self, "creation_time")

    @_builtins.property
    @pulumi.getter(name="dataJson")
    def data_json(self) -> _builtins.str:
        """
        A string containing the full data payload retrieved from
        Vault, serialized in JSON format.
        """
        return pulumi.get(self, "data_json")

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

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

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

    @_builtins.property
    @pulumi.getter(name="lastUpdateTime")
    def last_update_time(self) -> _builtins.str:
        """
        Last updated time of the group
        """
        return pulumi.get(self, "last_update_time")

    @_builtins.property
    @pulumi.getter(name="memberEntityIds")
    def member_entity_ids(self) -> Sequence[_builtins.str]:
        """
        List of Entity IDs which are members of this group
        """
        return pulumi.get(self, "member_entity_ids")

    @_builtins.property
    @pulumi.getter(name="memberGroupIds")
    def member_group_ids(self) -> Sequence[_builtins.str]:
        """
        List of Group IDs which are members of this group
        """
        return pulumi.get(self, "member_group_ids")

    @_builtins.property
    @pulumi.getter
    def metadata(self) -> Mapping[str, _builtins.str]:
        """
        Arbitrary metadata
        """
        return pulumi.get(self, "metadata")

    @_builtins.property
    @pulumi.getter(name="modifyIndex")
    def modify_index(self) -> _builtins.int:
        """
        Modify index of the group
        """
        return pulumi.get(self, "modify_index")

    @_builtins.property
    @pulumi.getter
    def namespace(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "namespace")

    @_builtins.property
    @pulumi.getter(name="namespaceId")
    def namespace_id(self) -> _builtins.str:
        """
        Namespace of which the group is part of
        """
        return pulumi.get(self, "namespace_id")

    @_builtins.property
    @pulumi.getter(name="parentGroupIds")
    def parent_group_ids(self) -> Sequence[_builtins.str]:
        """
        List of Group IDs which are parents of this group.
        """
        return pulumi.get(self, "parent_group_ids")

    @_builtins.property
    @pulumi.getter
    def policies(self) -> Sequence[_builtins.str]:
        """
        List of policies attached to the group
        """
        return pulumi.get(self, "policies")

    @_builtins.property
    @pulumi.getter
    def type(self) -> _builtins.str:
        """
        Type of group
        """
        return pulumi.get(self, "type")


class AwaitableGetGroupResult(GetGroupResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetGroupResult(
            alias_canonical_id=self.alias_canonical_id,
            alias_creation_time=self.alias_creation_time,
            alias_id=self.alias_id,
            alias_last_update_time=self.alias_last_update_time,
            alias_merged_from_canonical_ids=self.alias_merged_from_canonical_ids,
            alias_metadata=self.alias_metadata,
            alias_mount_accessor=self.alias_mount_accessor,
            alias_mount_path=self.alias_mount_path,
            alias_mount_type=self.alias_mount_type,
            alias_name=self.alias_name,
            creation_time=self.creation_time,
            data_json=self.data_json,
            group_id=self.group_id,
            group_name=self.group_name,
            id=self.id,
            last_update_time=self.last_update_time,
            member_entity_ids=self.member_entity_ids,
            member_group_ids=self.member_group_ids,
            metadata=self.metadata,
            modify_index=self.modify_index,
            namespace=self.namespace,
            namespace_id=self.namespace_id,
            parent_group_ids=self.parent_group_ids,
            policies=self.policies,
            type=self.type)


def get_group(alias_id: Optional[_builtins.str] = None,
              alias_mount_accessor: Optional[_builtins.str] = None,
              alias_name: Optional[_builtins.str] = None,
              group_id: Optional[_builtins.str] = None,
              group_name: Optional[_builtins.str] = None,
              namespace: Optional[_builtins.str] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGroupResult:
    """
    Lookup an Identity Group for Vault. The Identity secrets engine is the identity management solution
    for Vault. It internally maintains the clients who are recognized by Vault.

    > **Important** All data provided in the resource configuration will be
    written in cleartext to state and plan files generated by Terraform, and
    will appear in the console output when Terraform runs. Protect these
    artifacts accordingly. See
    the main provider documentation
    for more details.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_vault as vault

    group = vault.identity.get_group(group_name="user")
    ```

    ## Required Vault Capabilities

    Use of this resource requires the `create` capability on `/identity/lookup/group`.


    :param _builtins.str alias_id: ID of the alias.
    :param _builtins.str alias_mount_accessor: Accessor of the mount to which the alias belongs to.
           This should be supplied in conjunction with `alias_name`.
           
           The lookup criteria can be `group_name`, `group_id`, `alias_id`, or a combination of
           `alias_name` and `alias_mount_accessor`.
    :param _builtins.str alias_name: Name of the alias. This should be supplied in conjunction with
           `alias_mount_accessor`.
    :param _builtins.str group_id: ID of the group.
    :param _builtins.str group_name: Name of the group.
    :param _builtins.str namespace: The namespace of the target resource.
           The value should not contain leading or trailing forward slashes.
           The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
           *Available only for Vault Enterprise*.
    """
    __args__ = dict()
    __args__['aliasId'] = alias_id
    __args__['aliasMountAccessor'] = alias_mount_accessor
    __args__['aliasName'] = alias_name
    __args__['groupId'] = group_id
    __args__['groupName'] = group_name
    __args__['namespace'] = namespace
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vault:identity/getGroup:getGroup', __args__, opts=opts, typ=GetGroupResult).value

    return AwaitableGetGroupResult(
        alias_canonical_id=pulumi.get(__ret__, 'alias_canonical_id'),
        alias_creation_time=pulumi.get(__ret__, 'alias_creation_time'),
        alias_id=pulumi.get(__ret__, 'alias_id'),
        alias_last_update_time=pulumi.get(__ret__, 'alias_last_update_time'),
        alias_merged_from_canonical_ids=pulumi.get(__ret__, 'alias_merged_from_canonical_ids'),
        alias_metadata=pulumi.get(__ret__, 'alias_metadata'),
        alias_mount_accessor=pulumi.get(__ret__, 'alias_mount_accessor'),
        alias_mount_path=pulumi.get(__ret__, 'alias_mount_path'),
        alias_mount_type=pulumi.get(__ret__, 'alias_mount_type'),
        alias_name=pulumi.get(__ret__, 'alias_name'),
        creation_time=pulumi.get(__ret__, 'creation_time'),
        data_json=pulumi.get(__ret__, 'data_json'),
        group_id=pulumi.get(__ret__, 'group_id'),
        group_name=pulumi.get(__ret__, 'group_name'),
        id=pulumi.get(__ret__, 'id'),
        last_update_time=pulumi.get(__ret__, 'last_update_time'),
        member_entity_ids=pulumi.get(__ret__, 'member_entity_ids'),
        member_group_ids=pulumi.get(__ret__, 'member_group_ids'),
        metadata=pulumi.get(__ret__, 'metadata'),
        modify_index=pulumi.get(__ret__, 'modify_index'),
        namespace=pulumi.get(__ret__, 'namespace'),
        namespace_id=pulumi.get(__ret__, 'namespace_id'),
        parent_group_ids=pulumi.get(__ret__, 'parent_group_ids'),
        policies=pulumi.get(__ret__, 'policies'),
        type=pulumi.get(__ret__, 'type'))
def get_group_output(alias_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     alias_mount_accessor: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     alias_name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     group_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     group_name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     namespace: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGroupResult]:
    """
    Lookup an Identity Group for Vault. The Identity secrets engine is the identity management solution
    for Vault. It internally maintains the clients who are recognized by Vault.

    > **Important** All data provided in the resource configuration will be
    written in cleartext to state and plan files generated by Terraform, and
    will appear in the console output when Terraform runs. Protect these
    artifacts accordingly. See
    the main provider documentation
    for more details.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_vault as vault

    group = vault.identity.get_group(group_name="user")
    ```

    ## Required Vault Capabilities

    Use of this resource requires the `create` capability on `/identity/lookup/group`.


    :param _builtins.str alias_id: ID of the alias.
    :param _builtins.str alias_mount_accessor: Accessor of the mount to which the alias belongs to.
           This should be supplied in conjunction with `alias_name`.
           
           The lookup criteria can be `group_name`, `group_id`, `alias_id`, or a combination of
           `alias_name` and `alias_mount_accessor`.
    :param _builtins.str alias_name: Name of the alias. This should be supplied in conjunction with
           `alias_mount_accessor`.
    :param _builtins.str group_id: ID of the group.
    :param _builtins.str group_name: Name of the group.
    :param _builtins.str namespace: The namespace of the target resource.
           The value should not contain leading or trailing forward slashes.
           The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
           *Available only for Vault Enterprise*.
    """
    __args__ = dict()
    __args__['aliasId'] = alias_id
    __args__['aliasMountAccessor'] = alias_mount_accessor
    __args__['aliasName'] = alias_name
    __args__['groupId'] = group_id
    __args__['groupName'] = group_name
    __args__['namespace'] = namespace
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('vault:identity/getGroup:getGroup', __args__, opts=opts, typ=GetGroupResult)
    return __ret__.apply(lambda __response__: GetGroupResult(
        alias_canonical_id=pulumi.get(__response__, 'alias_canonical_id'),
        alias_creation_time=pulumi.get(__response__, 'alias_creation_time'),
        alias_id=pulumi.get(__response__, 'alias_id'),
        alias_last_update_time=pulumi.get(__response__, 'alias_last_update_time'),
        alias_merged_from_canonical_ids=pulumi.get(__response__, 'alias_merged_from_canonical_ids'),
        alias_metadata=pulumi.get(__response__, 'alias_metadata'),
        alias_mount_accessor=pulumi.get(__response__, 'alias_mount_accessor'),
        alias_mount_path=pulumi.get(__response__, 'alias_mount_path'),
        alias_mount_type=pulumi.get(__response__, 'alias_mount_type'),
        alias_name=pulumi.get(__response__, 'alias_name'),
        creation_time=pulumi.get(__response__, 'creation_time'),
        data_json=pulumi.get(__response__, 'data_json'),
        group_id=pulumi.get(__response__, 'group_id'),
        group_name=pulumi.get(__response__, 'group_name'),
        id=pulumi.get(__response__, 'id'),
        last_update_time=pulumi.get(__response__, 'last_update_time'),
        member_entity_ids=pulumi.get(__response__, 'member_entity_ids'),
        member_group_ids=pulumi.get(__response__, 'member_group_ids'),
        metadata=pulumi.get(__response__, 'metadata'),
        modify_index=pulumi.get(__response__, 'modify_index'),
        namespace=pulumi.get(__response__, 'namespace'),
        namespace_id=pulumi.get(__response__, 'namespace_id'),
        parent_group_ids=pulumi.get(__response__, 'parent_group_ids'),
        policies=pulumi.get(__response__, 'policies'),
        type=pulumi.get(__response__, 'type')))
