# 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__ = [
    'GetIdentityGroupsResult',
    'AwaitableGetIdentityGroupsResult',
    'get_identity_groups',
    'get_identity_groups_output',
]

@pulumi.output_type
class GetIdentityGroupsResult:
    """
    A collection of values returned by getIdentityGroups.
    """
    def __init__(__self__, groups=None, id=None):
        if groups and not isinstance(groups, list):
            raise TypeError("Expected argument 'groups' to be a list")
        pulumi.set(__self__, "groups", groups)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)

    @property
    @pulumi.getter
    def groups(self) -> Sequence[builtins.str]:
        """
        The list of the group names of all the identity groups.
        """
        return pulumi.get(self, "groups")

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


class AwaitableGetIdentityGroupsResult(GetIdentityGroupsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetIdentityGroupsResult(
            groups=self.groups,
            id=self.id)


def get_identity_groups(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetIdentityGroupsResult:
    """
    Use this data source to retrieve the list of the account's identity groups

    ## Example Usage

    ```python
    import pulumi
    import pulumi_ovh as ovh

    groups = ovh.Me.get_identity_groups()
    ```
    """
    __args__ = dict()
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('ovh:Me/getIdentityGroups:getIdentityGroups', __args__, opts=opts, typ=GetIdentityGroupsResult).value

    return AwaitableGetIdentityGroupsResult(
        groups=pulumi.get(__ret__, 'groups'),
        id=pulumi.get(__ret__, 'id'))
def get_identity_groups_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetIdentityGroupsResult]:
    """
    Use this data source to retrieve the list of the account's identity groups

    ## Example Usage

    ```python
    import pulumi
    import pulumi_ovh as ovh

    groups = ovh.Me.get_identity_groups()
    ```
    """
    __args__ = dict()
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('ovh:Me/getIdentityGroups:getIdentityGroups', __args__, opts=opts, typ=GetIdentityGroupsResult)
    return __ret__.apply(lambda __response__: GetIdentityGroupsResult(
        groups=pulumi.get(__response__, 'groups'),
        id=pulumi.get(__response__, 'id')))
