forked from aliyun/oos-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathACS::RDS::RecoveryDbInstance.yml
75 lines (75 loc) · 2.23 KB
/
ACS::RDS::RecoveryDbInstance.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
FormatVersion: OOS-2019-06-01
Description: Recoveries database to an existed or new instance.
Parameters:
regionId:
Description: The ID of region.
Type: String
Default: '{{ ACS::RegionId }}'
targetDBInstanceId:
Description: The ID of target DB Instance that will be handled.
Type: String
dBInstanceId:
Description: The ID of DB instance that will be handled.
Type: String
dBInstanceClass:
Description: The class of DB Instance will be recovered.
Type: String
restoreTime:
Description: The time that database will be recovered.
Type: String
instanceNetworkType:
Description: The network type of DB Instance will be recovered.
Type: String
payType:
Description: The billing method of the instance.
Type: String
vPCId:
Description: The VPC ID of DB Instance will be recovered.
Type: String
vSwitchId:
Description: The vSwitch ID of DB Instance will be recovered.
Type: String
dBInstanceStorage:
Description: The Storage of DB Instance will be recovered.
Type: String
dBName:
Description: The name of DB Instance will be recovered.
Type: String
Tasks:
- Name: recoveryDBInstance
Action: ACS::ExecuteAPI
Description: Recoveries database to an existed or new instance.
Properties:
Service: RDS
API: RecoveryDBInstance
Parameters:
RegionId: '{{ regionId }}'
DBInstanceClass: '{{ dBInstanceClass }}'
DBInstanceId: '{{ dBInstanceId }}'
DBInstanceStorage: '{{ dBInstanceStorage }}'
InstanceNetworkType: '{{ instanceNetworkType }}'
PayType: '{{ payType }}'
RestoreTime: '{{ restoreTime }}'
VPCId: '{{ vPCId }}'
VSwitchId: '{{ vSwitchId }}'
Outputs:
dBInstanceId:
Type: String
ValueSelector: DBInstanceId
- Name: untilInstanceReady
Action: ACS::WaitFor
Description: Waits for the database to enter running status.
Properties:
Service: RDS
API: DescribeDatabases
Parameters:
RegionId: '{{ regionId }}'
DBInstanceId: '{{ recoveryDBInstance.dBInstanceId }}'
DBName: '{{ dBName }}'
DesiredValues:
- Running
PropertySelector: Databases.Database[].DBStatus
Outputs:
dBInstanceId:
Type: String
Value: '{{ recoveryDBInstance.dBInstanceId }}'