ALIYUN::EHPC::Users类型用于为指定集群新增一个或多个用户。
语法
{
"Type": "ALIYUN::EHPC::Users",
"Properties": {
"ClusterId": String,
"Users": List
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ClusterId | String | 是 | 否 | 集群ID。 | 无 |
Users | List | 是 | 是 | 用户信息。 | 添加的用户数量小于100。更多信息,请参见Users属性。 |
Users语法
"Users": [
{
"Group": String,
"Password": String,
"Name": String
}
]
Users属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Group | String | 是 | 是 | 新增用户的用户组。 | 取值:
|
Password | String | 是 | 是 | 新增用户的密码。 | 长度为8~30个字符,必须同时包含以下四项中的三项:
|
Name | String | 是 | 否 | 新增的用户名。 | 长度为6~30个字符,必须以英文字母开头,可以包含数字、特殊字符(.)。 |
返回值
Fn::GetAtt
无
示例
YAML
格式ROSTemplateFormatVersion: '2015-09-01' Parameters: ClusterId: Type: String Description: en: The cluster ID. Default: ehpc-hz-FYUr32**** Users: AssociationPropertyMetadata: Parameter: AssociationPropertyMetadata: Parameters: Group: Type: String Description: en: |- The permission group to which the user N belongs. Valid values: - **users**: an ordinary permission group. It is applicable to ordinary users that need only to submit and debug jobs. - **wheel**: a sudo permission group. It is applicable to the administrator who needs to manage the cluster. In addition to submitting and debugging jobs, users who have sudo permissions can run sudo commands to install software and restart nodes. Valid values of N: 1 to 100. Password: Type: String Description: en: |- The password of the Nth user. The password must be 8 to 30 characters in length and contain three of the following items: - Uppercase letter - Lowercase letter - Digit - Special character: ()~!@#$%^&*-_+=|{}[]:;'/<>,.?/ Valid values of N: 1 to 100. Name: Type: String Description: en: |- The name of the user that you want to add. The name must be 6 to 30 characters in length and can contain letters, digits, and periods (.). It must start with a letter. Valid values of N: 1 to 100. Type: Json AssociationProperty: List[Parameter] Type: Json Description: en: The information about the users. MaxLength: 100 Default: - Group: user1 Password: 1@a2**** Name: users Resources: EHPCUsers: Type: ALIYUN::EHPC::Users Properties: ClusterId: Ref: ClusterId Users: Ref: Users
JSON
格式{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "ClusterId": { "Type": "String", "Description": { "en": "The cluster ID." }, "Default": "ehpc-hz-FYUr32****" }, "Users": { "AssociationPropertyMetadata": { "Parameter": { "AssociationPropertyMetadata": { "Parameters": { "Group": { "Type": "String", "Description": { "en": "The permission group to which the user N belongs. Valid values:\n- **users**: an ordinary permission group. It is applicable to ordinary users that need only to submit and debug jobs.\n- **wheel**: a sudo permission group. It is applicable to the administrator who needs to manage the cluster. In addition to submitting and debugging jobs, users who have sudo permissions can run sudo commands to install software and restart nodes.\nValid values of N: 1 to 100." } }, "Password": { "Type": "String", "Description": { "en": "The password of the Nth user. The password must be 8 to 30 characters in length and contain three of the following items:\n- Uppercase letter\n- Lowercase letter\n- Digit\n- Special character: ()~!@#$%^&*-_+=|{}[]:;'/<>,.?/\nValid values of N: 1 to 100." } }, "Name": { "Type": "String", "Description": { "en": "The name of the user that you want to add. The name must be 6 to 30 characters in length and can contain letters, digits, and periods (.). It must start with a letter. \nValid values of N: 1 to 100." } } } }, "Type": "Json" } }, "AssociationProperty": "List[Parameter]", "Type": "Json", "Description": { "en": "The information about the users." }, "MaxLength": 100, "Default": [ { "Group": "user1", "Password": "1@a2****", "Name": "users" } ] } }, "Resources": { "EHPCUsers": { "Type": "ALIYUN::EHPC::Users", "Properties": { "ClusterId": { "Ref": "ClusterId" }, "Users": { "Ref": "Users" } } } } }