1. Packages
  2. Bytepluscc Provider
  3. API Docs
  4. emr
  5. ClusterUser
Viewing docs for bytepluscc v0.0.20
published on Thursday, Mar 26, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.20
published on Thursday, Mar 26, 2026 by Byteplus

    E-MapReduce(EMR)集群中的用户分为普通用户和系统用户两类。其中:普通用户是您在用户管理模块手动通过导入、创建操作向集群中添加的用户;系统用户则是集群在初始化过程中为每个组件内置的管理用户,不支持编辑和删除操作。

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
    
    const eMRClusterUserDemo = new bytepluscc.emr.ClusterUser("EMRClusterUserDemo", {
        clusterId: "emr-xxxxxxxxxx",
        userName: "emrclusteruserdemo",
        password: "UserDemo1234",
        userGroupNames: [
            "users",
            "ccapi",
        ],
        description: "EMRClusterUserDemo",
    });
    
    import pulumi
    import pulumi_bytepluscc as bytepluscc
    
    e_mr_cluster_user_demo = bytepluscc.emr.ClusterUser("EMRClusterUserDemo",
        cluster_id="emr-xxxxxxxxxx",
        user_name="emrclusteruserdemo",
        password="UserDemo1234",
        user_group_names=[
            "users",
            "ccapi",
        ],
        description="EMRClusterUserDemo")
    
    package main
    
    import (
    	"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/emr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := emr.NewClusterUser(ctx, "EMRClusterUserDemo", &emr.ClusterUserArgs{
    			ClusterId: pulumi.String("emr-xxxxxxxxxx"),
    			UserName:  pulumi.String("emrclusteruserdemo"),
    			Password:  pulumi.String("UserDemo1234"),
    			UserGroupNames: pulumi.StringArray{
    				pulumi.String("users"),
    				pulumi.String("ccapi"),
    			},
    			Description: pulumi.String("EMRClusterUserDemo"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
    
    return await Deployment.RunAsync(() => 
    {
        var eMRClusterUserDemo = new Bytepluscc.Emr.ClusterUser("EMRClusterUserDemo", new()
        {
            ClusterId = "emr-xxxxxxxxxx",
            UserName = "emrclusteruserdemo",
            Password = "UserDemo1234",
            UserGroupNames = new[]
            {
                "users",
                "ccapi",
            },
            Description = "EMRClusterUserDemo",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.byteplus.bytepluscc.emr.ClusterUser;
    import com.byteplus.bytepluscc.emr.ClusterUserArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var eMRClusterUserDemo = new ClusterUser("eMRClusterUserDemo", ClusterUserArgs.builder()
                .clusterId("emr-xxxxxxxxxx")
                .userName("emrclusteruserdemo")
                .password("UserDemo1234")
                .userGroupNames(            
                    "users",
                    "ccapi")
                .description("EMRClusterUserDemo")
                .build());
    
        }
    }
    
    resources:
      eMRClusterUserDemo:
        type: bytepluscc:emr:ClusterUser
        name: EMRClusterUserDemo
        properties:
          clusterId: emr-xxxxxxxxxx
          userName: emrclusteruserdemo
          password: UserDemo1234
          userGroupNames:
            - users
            - ccapi
          description: EMRClusterUserDemo
    

    Create ClusterUser Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ClusterUser(name: string, args: ClusterUserArgs, opts?: CustomResourceOptions);
    @overload
    def ClusterUser(resource_name: str,
                    args: ClusterUserArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClusterUser(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    cluster_id: Optional[str] = None,
                    password: Optional[str] = None,
                    user_name: Optional[str] = None,
                    description: Optional[str] = None,
                    old_password: Optional[str] = None,
                    user_group_names: Optional[Sequence[str]] = None)
    func NewClusterUser(ctx *Context, name string, args ClusterUserArgs, opts ...ResourceOption) (*ClusterUser, error)
    public ClusterUser(string name, ClusterUserArgs args, CustomResourceOptions? opts = null)
    public ClusterUser(String name, ClusterUserArgs args)
    public ClusterUser(String name, ClusterUserArgs args, CustomResourceOptions options)
    
    type: bytepluscc:emr:ClusterUser
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ClusterUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ClusterUserArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ClusterUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClusterUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClusterUserArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var clusterUserResource = new Bytepluscc.Emr.ClusterUser("clusterUserResource", new()
    {
        ClusterId = "string",
        Password = "string",
        UserName = "string",
        Description = "string",
        OldPassword = "string",
        UserGroupNames = new[]
        {
            "string",
        },
    });
    
    example, err := emr.NewClusterUser(ctx, "clusterUserResource", &emr.ClusterUserArgs{
    	ClusterId:   pulumi.String("string"),
    	Password:    pulumi.String("string"),
    	UserName:    pulumi.String("string"),
    	Description: pulumi.String("string"),
    	OldPassword: pulumi.String("string"),
    	UserGroupNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var clusterUserResource = new ClusterUser("clusterUserResource", ClusterUserArgs.builder()
        .clusterId("string")
        .password("string")
        .userName("string")
        .description("string")
        .oldPassword("string")
        .userGroupNames("string")
        .build());
    
    cluster_user_resource = bytepluscc.emr.ClusterUser("clusterUserResource",
        cluster_id="string",
        password="string",
        user_name="string",
        description="string",
        old_password="string",
        user_group_names=["string"])
    
    const clusterUserResource = new bytepluscc.emr.ClusterUser("clusterUserResource", {
        clusterId: "string",
        password: "string",
        userName: "string",
        description: "string",
        oldPassword: "string",
        userGroupNames: ["string"],
    });
    
    type: bytepluscc:emr:ClusterUser
    properties:
        clusterId: string
        description: string
        oldPassword: string
        password: string
        userGroupNames:
            - string
        userName: string
    

    ClusterUser Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ClusterUser resource accepts the following input properties:

    ClusterId string
    集群ID。
    Password string
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    UserName string
    集群用户名。仅支持小写字母。
    Description string
    用户组描述。
    OldPassword string
    旧的用户的登录密码。修改密码时必填。
    UserGroupNames List<string>
    所属用户组名称。
    ClusterId string
    集群ID。
    Password string
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    UserName string
    集群用户名。仅支持小写字母。
    Description string
    用户组描述。
    OldPassword string
    旧的用户的登录密码。修改密码时必填。
    UserGroupNames []string
    所属用户组名称。
    clusterId String
    集群ID。
    password String
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    userName String
    集群用户名。仅支持小写字母。
    description String
    用户组描述。
    oldPassword String
    旧的用户的登录密码。修改密码时必填。
    userGroupNames List<String>
    所属用户组名称。
    clusterId string
    集群ID。
    password string
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    userName string
    集群用户名。仅支持小写字母。
    description string
    用户组描述。
    oldPassword string
    旧的用户的登录密码。修改密码时必填。
    userGroupNames string[]
    所属用户组名称。
    cluster_id str
    集群ID。
    password str
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    user_name str
    集群用户名。仅支持小写字母。
    description str
    用户组描述。
    old_password str
    旧的用户的登录密码。修改密码时必填。
    user_group_names Sequence[str]
    所属用户组名称。
    clusterId String
    集群ID。
    password String
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    userName String
    集群用户名。仅支持小写字母。
    description String
    用户组描述。
    oldPassword String
    旧的用户的登录密码。修改密码时必填。
    userGroupNames List<String>
    所属用户组名称。

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClusterUser resource produces the following output properties:

    CreatedTime int
    创建时间。
    CreatorName string
    创建者用户名。
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedTime int
    更新时间。
    CreatedTime int
    创建时间。
    CreatorName string
    创建者用户名。
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedTime int
    更新时间。
    createdTime Integer
    创建时间。
    creatorName String
    创建者用户名。
    id String
    The provider-assigned unique ID for this managed resource.
    updatedTime Integer
    更新时间。
    createdTime number
    创建时间。
    creatorName string
    创建者用户名。
    id string
    The provider-assigned unique ID for this managed resource.
    updatedTime number
    更新时间。
    created_time int
    创建时间。
    creator_name str
    创建者用户名。
    id str
    The provider-assigned unique ID for this managed resource.
    updated_time int
    更新时间。
    createdTime Number
    创建时间。
    creatorName String
    创建者用户名。
    id String
    The provider-assigned unique ID for this managed resource.
    updatedTime Number
    更新时间。

    Look up Existing ClusterUser Resource

    Get an existing ClusterUser resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ClusterUserState, opts?: CustomResourceOptions): ClusterUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_id: Optional[str] = None,
            created_time: Optional[int] = None,
            creator_name: Optional[str] = None,
            description: Optional[str] = None,
            old_password: Optional[str] = None,
            password: Optional[str] = None,
            updated_time: Optional[int] = None,
            user_group_names: Optional[Sequence[str]] = None,
            user_name: Optional[str] = None) -> ClusterUser
    func GetClusterUser(ctx *Context, name string, id IDInput, state *ClusterUserState, opts ...ResourceOption) (*ClusterUser, error)
    public static ClusterUser Get(string name, Input<string> id, ClusterUserState? state, CustomResourceOptions? opts = null)
    public static ClusterUser get(String name, Output<String> id, ClusterUserState state, CustomResourceOptions options)
    resources:  _:    type: bytepluscc:emr:ClusterUser    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClusterId string
    集群ID。
    CreatedTime int
    创建时间。
    CreatorName string
    创建者用户名。
    Description string
    用户组描述。
    OldPassword string
    旧的用户的登录密码。修改密码时必填。
    Password string
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    UpdatedTime int
    更新时间。
    UserGroupNames List<string>
    所属用户组名称。
    UserName string
    集群用户名。仅支持小写字母。
    ClusterId string
    集群ID。
    CreatedTime int
    创建时间。
    CreatorName string
    创建者用户名。
    Description string
    用户组描述。
    OldPassword string
    旧的用户的登录密码。修改密码时必填。
    Password string
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    UpdatedTime int
    更新时间。
    UserGroupNames []string
    所属用户组名称。
    UserName string
    集群用户名。仅支持小写字母。
    clusterId String
    集群ID。
    createdTime Integer
    创建时间。
    creatorName String
    创建者用户名。
    description String
    用户组描述。
    oldPassword String
    旧的用户的登录密码。修改密码时必填。
    password String
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    updatedTime Integer
    更新时间。
    userGroupNames List<String>
    所属用户组名称。
    userName String
    集群用户名。仅支持小写字母。
    clusterId string
    集群ID。
    createdTime number
    创建时间。
    creatorName string
    创建者用户名。
    description string
    用户组描述。
    oldPassword string
    旧的用户的登录密码。修改密码时必填。
    password string
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    updatedTime number
    更新时间。
    userGroupNames string[]
    所属用户组名称。
    userName string
    集群用户名。仅支持小写字母。
    cluster_id str
    集群ID。
    created_time int
    创建时间。
    creator_name str
    创建者用户名。
    description str
    用户组描述。
    old_password str
    旧的用户的登录密码。修改密码时必填。
    password str
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    updated_time int
    更新时间。
    user_group_names Sequence[str]
    所属用户组名称。
    user_name str
    集群用户名。仅支持小写字母。
    clusterId String
    集群ID。
    createdTime Number
    创建时间。
    creatorName String
    创建者用户名。
    description String
    用户组描述。
    oldPassword String
    旧的用户的登录密码。修改密码时必填。
    password String
    新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
    updatedTime Number
    更新时间。
    userGroupNames List<String>
    所属用户组名称。
    userName String
    集群用户名。仅支持小写字母。

    Import

    $ pulumi import bytepluscc:emr/clusterUser:ClusterUser example "cluster_id|user_name"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    bytepluscc byteplus-sdk/pulumi-bytepluscc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the bytepluscc Terraform Provider.
    bytepluscc logo
    Viewing docs for bytepluscc v0.0.20
    published on Thursday, Mar 26, 2026 by Byteplus
      Try Pulumi Cloud free. Your team will thank you.