-
Notifications
You must be signed in to change notification settings - Fork 35
/
sub-account-pass-role.yml
73 lines (73 loc) · 1.8 KB
/
sub-account-pass-role.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建子账号,赋予PassRole权限,允许指定服务托管角色访问。
en: Create sub-accounts and grant PassRole permissions, enabling designated service-managed
roles to access.
Parameters:
UserName:
Type: String
Label:
zh-cn: 用户名
en: User Name
Description:
zh-cn: 由1-128个英文字母、数字、“.”、“_”或“-”组成,账号内唯一。
en: Consists of 1-128 English letters, numbers, ".", "_", Or "-", unique in
the account
Default: TestPassRole
Service:
Type: String
Label:
zh-cn: 授信服务
en: Trusted Service
Description:
zh-cn: 授信服务地址
en: Trusted Service Address
Default: oos.aliyuncs.com
Resource:
Type: Json
Label:
zh-cn: 授信角色
en: Credit Role
Description:
zh-cn: 授信角色的Arn,“*”表示授信给所有RAM角色
en: Credit for role Arn, "*" for all RAM roles
Default:
- '*'
Resources:
User:
Type: ALIYUN::RAM::User
Properties:
UserName:
Ref: UserName
Policies:
- PolicyName:
Fn::Sub: PassRole-${ALIYUN::StackId}
PolicyDocument:
Version: '1'
Statement:
- Effect: Allow
Resource:
Ref: Resource
Action:
- ram:PassRole
Condition:
StringEquals:
acs:Service:
Ref: Service
Outputs:
UserName:
Value:
Fn::GetAtt:
- User
- UserName
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- UserName
- Service
- Resource
Label:
default: RAM
TemplateTags:
- acs:example:安全:子账户PassRole权限