# 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
from . import outputs

__all__ = [
    'GetGroupResult',
    'AwaitableGetGroupResult',
    'get_group',
    'get_group_output',
]

@pulumi.output_type
class GetGroupResult:
    """
    A collection of values returned by getGroup.
    """
    def __init__(__self__, account_id=None, attached_policies=None, created_time=None, description=None, display_name=None, id=None, updated_time=None, user_group_id=None, user_group_name=None, users=None):
        if account_id and not isinstance(account_id, int):
            raise TypeError("Expected argument 'account_id' to be a int")
        pulumi.set(__self__, "account_id", account_id)
        if attached_policies and not isinstance(attached_policies, list):
            raise TypeError("Expected argument 'attached_policies' to be a list")
        pulumi.set(__self__, "attached_policies", attached_policies)
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        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 id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if updated_time and not isinstance(updated_time, str):
            raise TypeError("Expected argument 'updated_time' to be a str")
        pulumi.set(__self__, "updated_time", updated_time)
        if user_group_id and not isinstance(user_group_id, int):
            raise TypeError("Expected argument 'user_group_id' to be a int")
        pulumi.set(__self__, "user_group_id", user_group_id)
        if user_group_name and not isinstance(user_group_name, str):
            raise TypeError("Expected argument 'user_group_name' to be a str")
        pulumi.set(__self__, "user_group_name", user_group_name)
        if users and not isinstance(users, list):
            raise TypeError("Expected argument 'users' to be a list")
        pulumi.set(__self__, "users", users)

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> builtins.int:
        """
        用户组所属主账号的ID。
        """
        return pulumi.get(self, "account_id")

    @property
    @pulumi.getter(name="attachedPolicies")
    def attached_policies(self) -> Sequence['outputs.GetGroupAttachedPolicyResult']:
        """
        用户组绑定的策略信息。
        """
        return pulumi.get(self, "attached_policies")

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> builtins.str:
        """
        用户组的创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter
    def description(self) -> builtins.str:
        """
        用户组描述信息。长度不超过128。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> builtins.str:
        """
        用户组显示名称。长度不超过64。
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> builtins.str:
        """
        用户组的更新时间。
        """
        return pulumi.get(self, "updated_time")

    @property
    @pulumi.getter(name="userGroupId")
    def user_group_id(self) -> builtins.int:
        """
        用户组ID。
        """
        return pulumi.get(self, "user_group_id")

    @property
    @pulumi.getter(name="userGroupName")
    def user_group_name(self) -> builtins.str:
        """
        用户组名称。长度1~64，支持英文、数字和.-_符号。
        """
        return pulumi.get(self, "user_group_name")

    @property
    @pulumi.getter
    def users(self) -> Sequence['outputs.GetGroupUserResult']:
        """
        用户组内绑定的用户信息。
        """
        return pulumi.get(self, "users")


class AwaitableGetGroupResult(GetGroupResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetGroupResult(
            account_id=self.account_id,
            attached_policies=self.attached_policies,
            created_time=self.created_time,
            description=self.description,
            display_name=self.display_name,
            id=self.id,
            updated_time=self.updated_time,
            user_group_id=self.user_group_id,
            user_group_name=self.user_group_name,
            users=self.users)


def get_group(id: Optional[builtins.str] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGroupResult:
    """
    Data Source schema for Byteplus::IAM::Group


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:iam/getGroup:getGroup', __args__, opts=opts, typ=GetGroupResult).value

    return AwaitableGetGroupResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        attached_policies=pulumi.get(__ret__, 'attached_policies'),
        created_time=pulumi.get(__ret__, 'created_time'),
        description=pulumi.get(__ret__, 'description'),
        display_name=pulumi.get(__ret__, 'display_name'),
        id=pulumi.get(__ret__, 'id'),
        updated_time=pulumi.get(__ret__, 'updated_time'),
        user_group_id=pulumi.get(__ret__, 'user_group_id'),
        user_group_name=pulumi.get(__ret__, 'user_group_name'),
        users=pulumi.get(__ret__, 'users'))
def get_group_output(id: Optional[pulumi.Input[builtins.str]] = None,
                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGroupResult]:
    """
    Data Source schema for Byteplus::IAM::Group


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:iam/getGroup:getGroup', __args__, opts=opts, typ=GetGroupResult)
    return __ret__.apply(lambda __response__: GetGroupResult(
        account_id=pulumi.get(__response__, 'account_id'),
        attached_policies=pulumi.get(__response__, 'attached_policies'),
        created_time=pulumi.get(__response__, 'created_time'),
        description=pulumi.get(__response__, 'description'),
        display_name=pulumi.get(__response__, 'display_name'),
        id=pulumi.get(__response__, 'id'),
        updated_time=pulumi.get(__response__, 'updated_time'),
        user_group_id=pulumi.get(__response__, 'user_group_id'),
        user_group_name=pulumi.get(__response__, 'user_group_name'),
        users=pulumi.get(__response__, 'users')))
