# 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__ = ['ClusterUserGroupArgs', 'ClusterUserGroup']

@pulumi.input_type
class ClusterUserGroupArgs:
    def __init__(__self__, *,
                 cluster_id: pulumi.Input[builtins.str],
                 user_group_name: pulumi.Input[builtins.str],
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 members: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None):
        """
        The set of arguments for constructing a ClusterUserGroup resource.
        :param pulumi.Input[builtins.str] cluster_id: 集群ID。
        :param pulumi.Input[builtins.str] user_group_name: 用户组名称。
        :param pulumi.Input[builtins.str] description: 用户组描述。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] members: 用户组成员。不支持操作特殊用户，如admin等。
        """
        pulumi.set(__self__, "cluster_id", cluster_id)
        pulumi.set(__self__, "user_group_name", user_group_name)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if members is not None:
            pulumi.set(__self__, "members", members)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> pulumi.Input[builtins.str]:
        """
        集群ID。
        """
        return pulumi.get(self, "cluster_id")

    @cluster_id.setter
    def cluster_id(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "cluster_id", value)

    @property
    @pulumi.getter(name="userGroupName")
    def user_group_name(self) -> pulumi.Input[builtins.str]:
        """
        用户组名称。
        """
        return pulumi.get(self, "user_group_name")

    @user_group_name.setter
    def user_group_name(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "user_group_name", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        用户组描述。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter
    def members(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        用户组成员。不支持操作特殊用户，如admin等。
        """
        return pulumi.get(self, "members")

    @members.setter
    def members(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
        pulumi.set(self, "members", value)


@pulumi.input_type
class _ClusterUserGroupState:
    def __init__(__self__, *,
                 cluster_id: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 members: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 user_group_name: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering ClusterUserGroup resources.
        :param pulumi.Input[builtins.str] cluster_id: 集群ID。
        :param pulumi.Input[builtins.str] description: 用户组描述。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] members: 用户组成员。不支持操作特殊用户，如admin等。
        :param pulumi.Input[builtins.str] user_group_name: 用户组名称。
        """
        if cluster_id is not None:
            pulumi.set(__self__, "cluster_id", cluster_id)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if members is not None:
            pulumi.set(__self__, "members", members)
        if user_group_name is not None:
            pulumi.set(__self__, "user_group_name", user_group_name)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        集群ID。
        """
        return pulumi.get(self, "cluster_id")

    @cluster_id.setter
    def cluster_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "cluster_id", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        用户组描述。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter
    def members(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        用户组成员。不支持操作特殊用户，如admin等。
        """
        return pulumi.get(self, "members")

    @members.setter
    def members(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]):
        pulumi.set(self, "members", value)

    @property
    @pulumi.getter(name="userGroupName")
    def user_group_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        用户组名称。
        """
        return pulumi.get(self, "user_group_name")

    @user_group_name.setter
    def user_group_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "user_group_name", value)


@pulumi.type_token("bytepluscc:emr/clusterUserGroup:ClusterUserGroup")
class ClusterUserGroup(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 cluster_id: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 members: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 user_group_name: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        E-MapReduce（EMR）集群中支持对用户进行组管理，允许您创建、编辑和删除用户组。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        e_mr_cluster_user_group_demo = bytepluscc.emr.ClusterUserGroup("EMRClusterUserGroupDemo",
            cluster_id="emr-xxxxxxxxxx",
            user_group_name="ccapi-tf-users-2",
            description="EMRClusterUserGroupDemo",
            members=[
                "emrclusteruserdemo1",
                "emrclusteruserdemo3",
            ])
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:emr/clusterUserGroup:ClusterUserGroup example "cluster_id|user_group_name"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] cluster_id: 集群ID。
        :param pulumi.Input[builtins.str] description: 用户组描述。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] members: 用户组成员。不支持操作特殊用户，如admin等。
        :param pulumi.Input[builtins.str] user_group_name: 用户组名称。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ClusterUserGroupArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        E-MapReduce（EMR）集群中支持对用户进行组管理，允许您创建、编辑和删除用户组。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        e_mr_cluster_user_group_demo = bytepluscc.emr.ClusterUserGroup("EMRClusterUserGroupDemo",
            cluster_id="emr-xxxxxxxxxx",
            user_group_name="ccapi-tf-users-2",
            description="EMRClusterUserGroupDemo",
            members=[
                "emrclusteruserdemo1",
                "emrclusteruserdemo3",
            ])
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:emr/clusterUserGroup:ClusterUserGroup example "cluster_id|user_group_name"
        ```

        :param str resource_name: The name of the resource.
        :param ClusterUserGroupArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(ClusterUserGroupArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 cluster_id: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 members: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 user_group_name: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = ClusterUserGroupArgs.__new__(ClusterUserGroupArgs)

            if cluster_id is None and not opts.urn:
                raise TypeError("Missing required property 'cluster_id'")
            __props__.__dict__["cluster_id"] = cluster_id
            __props__.__dict__["description"] = description
            __props__.__dict__["members"] = members
            if user_group_name is None and not opts.urn:
                raise TypeError("Missing required property 'user_group_name'")
            __props__.__dict__["user_group_name"] = user_group_name
        super(ClusterUserGroup, __self__).__init__(
            'bytepluscc:emr/clusterUserGroup:ClusterUserGroup',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            cluster_id: Optional[pulumi.Input[builtins.str]] = None,
            description: Optional[pulumi.Input[builtins.str]] = None,
            members: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
            user_group_name: Optional[pulumi.Input[builtins.str]] = None) -> 'ClusterUserGroup':
        """
        Get an existing ClusterUserGroup resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] cluster_id: 集群ID。
        :param pulumi.Input[builtins.str] description: 用户组描述。
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] members: 用户组成员。不支持操作特殊用户，如admin等。
        :param pulumi.Input[builtins.str] user_group_name: 用户组名称。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _ClusterUserGroupState.__new__(_ClusterUserGroupState)

        __props__.__dict__["cluster_id"] = cluster_id
        __props__.__dict__["description"] = description
        __props__.__dict__["members"] = members
        __props__.__dict__["user_group_name"] = user_group_name
        return ClusterUserGroup(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> pulumi.Output[builtins.str]:
        """
        集群ID。
        """
        return pulumi.get(self, "cluster_id")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[builtins.str]:
        """
        用户组描述。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def members(self) -> pulumi.Output[Sequence[builtins.str]]:
        """
        用户组成员。不支持操作特殊用户，如admin等。
        """
        return pulumi.get(self, "members")

    @property
    @pulumi.getter(name="userGroupName")
    def user_group_name(self) -> pulumi.Output[builtins.str]:
        """
        用户组名称。
        """
        return pulumi.get(self, "user_group_name")

