published on Thursday, Mar 26, 2026 by Volcengine
published on Thursday, Mar 26, 2026 by Volcengine
E-MapReduce(EMR)集群中的用户分为普通用户和系统用户两类。其中:普通用户是您在用户管理模块手动通过导入、创建操作向集群中添加的用户;系统用户则是集群在初始化过程中为每个组件内置的管理用户,不支持编辑和删除操作。
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
const eMRClusterUserDemo = new volcenginecc.emr.ClusterUser("EMRClusterUserDemo", {
clusterId: "emr-xxxxxxxxxx",
userName: "emrclusteruserdemo",
password: "UserDemo1234",
userGroupNames: [
"users",
"ccapi",
],
description: "EMRClusterUserDemo",
});
import pulumi
import pulumi_volcenginecc as volcenginecc
e_mr_cluster_user_demo = volcenginecc.emr.ClusterUser("EMRClusterUserDemo",
cluster_id="emr-xxxxxxxxxx",
user_name="emrclusteruserdemo",
password="UserDemo1234",
user_group_names=[
"users",
"ccapi",
],
description="EMRClusterUserDemo")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/emr"
)
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 Volcenginecc = Volcengine.Pulumi.Volcenginecc;
return await Deployment.RunAsync(() =>
{
var eMRClusterUserDemo = new Volcenginecc.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.volcengine.volcenginecc.emr.ClusterUser;
import com.volcengine.volcenginecc.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: volcenginecc: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: volcenginecc: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 Volcenginecc.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 = volcenginecc.emr.ClusterUser("clusterUserResource",
cluster_id="string",
password="string",
user_name="string",
description="string",
old_password="string",
user_group_names=["string"])
const clusterUserResource = new volcenginecc.emr.ClusterUser("clusterUserResource", {
clusterId: "string",
password: "string",
userName: "string",
description: "string",
oldPassword: "string",
userGroupNames: ["string"],
});
type: volcenginecc: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:
- Cluster
Id string - 集群ID。
- Password string
- 新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
- User
Name string - 集群用户名。仅支持小写字母。
- Description string
- 用户组描述。
- Old
Password string - 旧的用户的登录密码。修改密码时必填。
- User
Group List<string>Names - 所属用户组名称。
- Cluster
Id string - 集群ID。
- Password string
- 新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
- User
Name string - 集群用户名。仅支持小写字母。
- Description string
- 用户组描述。
- Old
Password string - 旧的用户的登录密码。修改密码时必填。
- User
Group []stringNames - 所属用户组名称。
- cluster
Id String - 集群ID。
- password String
- 新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
- user
Name String - 集群用户名。仅支持小写字母。
- description String
- 用户组描述。
- old
Password String - 旧的用户的登录密码。修改密码时必填。
- user
Group List<String>Names - 所属用户组名称。
- cluster
Id string - 集群ID。
- password string
- 新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
- user
Name string - 集群用户名。仅支持小写字母。
- description string
- 用户组描述。
- old
Password string - 旧的用户的登录密码。修改密码时必填。
- user
Group string[]Names - 所属用户组名称。
- cluster_
id str - 集群ID。
- password str
- 新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
- user_
name str - 集群用户名。仅支持小写字母。
- description str
- 用户组描述。
- old_
password str - 旧的用户的登录密码。修改密码时必填。
- user_
group_ Sequence[str]names - 所属用户组名称。
- cluster
Id String - 集群ID。
- password String
- 新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
- user
Name String - 集群用户名。仅支持小写字母。
- description String
- 用户组描述。
- old
Password String - 旧的用户的登录密码。修改密码时必填。
- user
Group List<String>Names - 所属用户组名称。
Outputs
All input properties are implicitly available as output properties. Additionally, the ClusterUser resource produces the following output properties:
- Created
Time int - 创建时间。
- Creator
Name string - 创建者用户名。
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
Time int - 更新时间。
- Created
Time int - 创建时间。
- Creator
Name string - 创建者用户名。
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated
Time int - 更新时间。
- created
Time Integer - 创建时间。
- creator
Name String - 创建者用户名。
- id String
- The provider-assigned unique ID for this managed resource.
- updated
Time Integer - 更新时间。
- created
Time number - 创建时间。
- creator
Name string - 创建者用户名。
- id string
- The provider-assigned unique ID for this managed resource.
- updated
Time number - 更新时间。
- created_
time int - 创建时间。
- creator_
name str - 创建者用户名。
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
time int - 更新时间。
- created
Time Number - 创建时间。
- creator
Name String - 创建者用户名。
- id String
- The provider-assigned unique ID for this managed resource.
- updated
Time 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) -> ClusterUserfunc 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: volcenginecc: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.
- Cluster
Id string - 集群ID。
- Created
Time int - 创建时间。
- Creator
Name string - 创建者用户名。
- Description string
- 用户组描述。
- Old
Password string - 旧的用户的登录密码。修改密码时必填。
- Password string
- 新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
- Updated
Time int - 更新时间。
- User
Group List<string>Names - 所属用户组名称。
- User
Name string - 集群用户名。仅支持小写字母。
- Cluster
Id string - 集群ID。
- Created
Time int - 创建时间。
- Creator
Name string - 创建者用户名。
- Description string
- 用户组描述。
- Old
Password string - 旧的用户的登录密码。修改密码时必填。
- Password string
- 新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
- Updated
Time int - 更新时间。
- User
Group []stringNames - 所属用户组名称。
- User
Name string - 集群用户名。仅支持小写字母。
- cluster
Id String - 集群ID。
- created
Time Integer - 创建时间。
- creator
Name String - 创建者用户名。
- description String
- 用户组描述。
- old
Password String - 旧的用户的登录密码。修改密码时必填。
- password String
- 新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
- updated
Time Integer - 更新时间。
- user
Group List<String>Names - 所属用户组名称。
- user
Name String - 集群用户名。仅支持小写字母。
- cluster
Id string - 集群ID。
- created
Time number - 创建时间。
- creator
Name string - 创建者用户名。
- description string
- 用户组描述。
- old
Password string - 旧的用户的登录密码。修改密码时必填。
- password string
- 新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
- updated
Time number - 更新时间。
- user
Group string[]Names - 所属用户组名称。
- user
Name 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_ Sequence[str]names - 所属用户组名称。
- user_
name str - 集群用户名。仅支持小写字母。
- cluster
Id String - 集群ID。
- created
Time Number - 创建时间。
- creator
Name String - 创建者用户名。
- description String
- 用户组描述。
- old
Password String - 旧的用户的登录密码。修改密码时必填。
- password String
- 新的用户的登录密码。密码的长度需在8-20个字符之间,支持数字,字母,-,_ 且 至少包含1个数字和1个字母。
- updated
Time Number - 更新时间。
- user
Group List<String>Names - 所属用户组名称。
- user
Name String - 集群用户名。仅支持小写字母。
Import
$ pulumi import volcenginecc:emr/clusterUser:ClusterUser example "cluster_id|user_name"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
published on Thursday, Mar 26, 2026 by Volcengine
