全部产品
Search
文档中心

弹性高性能计算E-HPC:AddUsers - 批量新增集群用户

更新时间:Apr 09, 2024

调用AddUsers为指定集群新增一个或多个用户。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
ClusterIdstring

集群 ID。

您可以通过调用 ListClusters 获取集群 ID。

ehpc-hz-FYUr32****
Userobject []

用户信息。

Passwordstring

第 N 个新增用户的密码。长度为 8~30 个字符,必须同时包含以下四项中的三项:

  • 大写英文字母
  • 小写英文字母
  • 数字
  • 特殊字符:()~!@#$%^&*-_+=|{}[]:;'/<>,.?/

N 的取值范围:1~100

说明 建议使用 HTTPS 协议调用 API 以避免可能发生的密码泄露。
1@a2****
Namestring

第 N 个新增的用户名。长度为 6~30 个字符,必须以英文字母开头,可以包含数字、特殊字符(.)。

N 的取值范围:1~100

user1
Groupstring

第 N 个新增用户的用户组。取值范围:

  • users:普通权限组,适用于只有提交、调试作业需求的普通用户。
  • wheel:sudo 权限组,适用于需要管理集群的管理员,除提交、调试作业外,还可以执行 sudo 命令进行安装软件、重启节点等操作。

N 的取值范围:1~100

users
Asyncboolean

采用异步消息链路新增用户。

默认值:false。

false

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

04F0F334-1335-436C-A1D7-6C044FE7****

示例

正常返回示例

JSON格式

{
  "RequestId": "04F0F334-1335-436C-A1D7-6C044FE7****"
}

错误码

HTTP status code错误码错误信息描述
400InvalidParamsThe specified parameter %s is invalid.无效的参数:%s
400NotEnabledYou have not enabled this service您的账户还未开通此服务
400InDebtYour account has overdue payments.您的账户已欠费
403InvalidClusterStatusThe operation failed due to invalid cluster status.集群状态不允许执行本次操作。
404ClusterNotFoundThe specified cluster does not exist.指定的集群不存在,请您检查该参数是否正确。
404ManagerNotFoundThe manager nodes do not exist or their status is abnormal.管理节点不存在或状态异常。
406AgentErrorThe agent service request failed.集群侧命令运行失败
406AgentError.Account.GetentPasswdFailureFailed to get the user list: %s.获取域用户列表失败:{}
406AgentError.Account.UserAlreadyExistThe specified user already exists in domain: %s.用户在域中已存在:{}
406AgentError.Account.UserAddFailureFailed to add user to domain: %s.添加用户到域失败:{}
406AgentError.Account.DomainNotExistThe specified domain does not exist: %s.域服务不存在:{},请您检查该参数是否正确。
406AgentResponseTimeoutAgent response timeout: %s代理响应超时
407NotAuthorizedYou are not authorized by RAM for this request.此请求未获得RAM授权
409PartFailurePart of the batch operation failed.批量操作部分失败
500UnknownErrorAn unknown error occurred.未知错误
503ServiceUnavailableThe request has failed due to a temporary failure of the server请求失败,服务暂时不可用

访问错误中心查看更多错误码。