-
Notifications
You must be signed in to change notification settings - Fork 17
/
ACS::RDS::CreateAccount.yml
88 lines (88 loc) · 2.41 KB
/
ACS::RDS::CreateAccount.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS::RDS::CreateAccount
name-zh-cn: 在RDS实例中创建新帐户
en: Create new account in a db instance
zh-cn: 在RDS实例中创建新帐户
Parameters:
regionId:
Description:
en: The region ID of DB instance
zh-cn: DB实例的地域ID
Type: String
Default: '{{ ACS::RegionId }}'
dbInstanceId:
Description:
en: The ID of DB instance to create account in
zh-cn: 要创建帐户的DB实例ID
Type: String
accountName:
Description:
en: The account name to create
zh-cn: 要创建的帐户名
Type: String
accountType:
Description:
en: The account type to create
zh-cn: 要创建的帐户类型
Type: String
AllowedValues:
- Normal
- Super
Default: Normal
accountPassword:
Description:
en: The account password to create
zh-cn: 要创建的帐户密码
Type: String
accountDescription:
Description:
en: The account description to create
zh-cn: 要创建的帐户描述
Type: String
Default: ''
Tasks:
- Name: checkForInstanceReady
Action: ACS::CheckFor
Description:
en: Checks wether the DB instance is running status
zh-cn: 检查DB实例是否为运行中状态
Properties:
Service: RDS
API: DescribeDBInstanceAttribute
Parameters:
RegionId: '{{ regionId }}'
DBInstanceId: '{{ dbInstanceId }}'
DesiredValues:
- Running
PropertySelector: Items.DBInstanceAttribute[].DBInstanceStatus
- Name: CreateAccount
Action: ACS::ExecuteAPI
Description:
en: Creates new account in DB instance
zh-cn: 在实例中创建新帐户
Properties:
Service: RDS
API: CreateAccount
Parameters:
RegionId: '{{ regionId }}'
DBInstanceId: '{{ dbInstanceId }}'
AccountName: '{{ accountName }}'
AccountType: '{{ accountType }}'
AccountPassword: '{{ accountPassword }}'
AccountDescription: '{{ accountDescription }}'
- Name: untilAccountReady
Action: ACS::WaitFor
Description:
en: Waits for new account to enter Available status
zh-cn: 等待新帐户进入可用状态
Properties:
Service: RDS
API: DescribeAccounts
Parameters:
RegionId: '{{ regionId }}'
DBInstanceId: '{{ dbInstanceId }}'
AccountName: '{{ accountName }}'
DesiredValues:
- Available
PropertySelector: Accounts.DBInstanceAccount[].AccountStatus