forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ram-create-sub-account.yml
74 lines (74 loc) · 2.28 KB
/
ram-create-sub-account.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: Create a sub account, enable the console login, and create access key.
zh-cn: 创建子账户,启用控制台登录,并创建访问密钥。
Parameters:
UserName:
Type: String
Label:
zh-cn: 账号名称
en: Account Name
Description:
zh-cn: 用户名, [1, 64]英文或中文字符,必须以字母,可以包含数字、下划线或“.”、“-”。
en: The name of sub account, [1, 64]Consist of lowercase letter, number, '@',
'.', '_' or '-'.
ConstraintDescription:
zh-cn: '[1, 64]. 由小写字母、数字、''@''、''.''、''_'' 或 ''-'' 组成'
en: '[1, 64]. Consist of lowercase letter, number, ''@'', ''.'', ''_'' or ''-'''
Default: DefaultUserTest
AllowedPattern: ^[a-zA-Z0-9.@-_]+$
Password:
Type: String
Label:
zh-cn: 账户登录密码
en: Account Password
Description:
zh-cn: 账户登录密码。密码是一个8到30个字符的字符串,必须包含大写/小写字母和数字。
en: The login password of sub account. The password is a string of 8 to 30 characters
and must contain uppercase/lowercase letters, numbers.
ConstraintDescription:
zh-cn: 密码是8到30个字符的字符串,必须包含大写/小写字母、数字。
en: The password is a string of 8 to 30 characters and must contain uppercase/lowercase
letters, numbers.
AllowedPattern: '[a-zA-Z0-9-\(\)\`\~\!@\#\$%\^&\*-+=\|\{\}\[\]\:\;\‘\,\.\?\/]*'
MinLength: '8'
MaxLength: '30'
NoEcho: true
Resources:
RamUser:
Type: ALIYUN::RAM::User
Properties:
LoginProfile:
Password:
Ref: Password
PasswordResetRequired: false
UserName:
Ref: UserName
RamAK:
Type: ALIYUN::RAM::AccessKey
Properties:
UserName:
Fn::GetAtt:
- RamUser
- UserName
Outputs:
ak_id:
Value:
Fn::GetAtt:
- RamAK
- AccessKeyId
user_id:
Value:
Fn::GetAtt:
- RamUser
- UserId
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- UserName
- Password
Label:
default: RAM
TemplateTags:
- acs:example:安全:创建子帐号并生成ak及开启控制台登录