-
Notifications
You must be signed in to change notification settings - Fork 17
/
ACS::ECS::CloneReservedInstance.json
164 lines (164 loc) · 4.72 KB
/
ACS::ECS::CloneReservedInstance.json
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"name-en": "ACS::ECS::CloneReservedInstance",
"name-zh-cn": "克隆预留实例券",
"en": "Clone reserved instance",
"zh-cn": "克隆预留实例券"
},
"Parameters": {
"regionId": {
"Type": "String",
"Description": {
"en": "The ID of region",
"zh-cn": "地域ID"
},
"Default": "{{ ACS::RegionId }}"
},
"reservedInstanceId": {
"Description": {
"en": "The ID of reserved instance",
"zh-cn": "预留实例券ID"
},
"Type": "String"
},
"period": {
"Description": {
"en": "The term of the reserved instance",
"zh-cn": "购买预留实例券的时长"
},
"Type": "Number"
},
"periodUnit": {
"Description": {
"en": "The term unit of the reserved instance",
"zh-cn": "购买预留实例券的时长单位"
},
"Type": "String"
},
"offeringType": {
"Description": {
"en": "Payment Types for Reserved Instances",
"zh-cn": "预留实例券的付款类型"
},
"Type": "String",
"AllowedValues": [
"No Upfront",
"Partial Upfront",
"All Upfront"
],
"Default": "All Upfront"
}
},
"Tasks": [
{
"Name": "describeReservedInstances",
"Action": "ACS::ExecuteAPI",
"Description": {
"en": "Queries purchased reserved instances infos",
"zh-cn": "获取已购买预留实例券的信息"
},
"Properties": {
"Service": "ECS",
"API": "DescribeReservedInstances",
"Parameters": {
"RegionId": "{{ regionId }}",
"ReservedInstanceId": [
"{{ reservedInstanceId }}"
]
}
},
"Outputs": {
"instanceType": {
"Type": "String",
"ValueSelector": ".ReservedInstances.ReservedInstance[].InstanceType"
},
"resourceGroupId": {
"Type": "String",
"ValueSelector": ".ReservedInstances.ReservedInstance[].ResourceGroupId"
},
"zoneId": {
"Type": "String",
"ValueSelector": ".ReservedInstances.ReservedInstance[].ZoneId"
},
"scope": {
"Type": "String",
"ValueSelector": ".ReservedInstances.ReservedInstance[].Scope"
},
"instanceAmount": {
"Type": "String",
"ValueSelector": ".ReservedInstances.ReservedInstance[].InstanceAmount"
},
"description": {
"Type": "String",
"ValueSelector": ".ReservedInstances.ReservedInstance[].Description"
},
"platform": {
"Type": "String",
"ValueSelector": ".ReservedInstances.ReservedInstance[].Platform"
},
"tags": {
"Type": "List",
"ValueSelector": ".ReservedInstances.ReservedInstance[].Tags"
}
}
},
{
"Name": "purchaseReservedInstance",
"Action": "ACS::ExecuteAPI",
"Description": {
"en": "Purchases new reserved instances",
"zh-cn": "购买新预留实例券"
},
"Properties": {
"Service": "ECS",
"API": "PurchaseReservedInstancesOffering",
"Parameters": {
"RegionId": "{{ regionId }}",
"InstanceType": "{{ describeReservedInstances.instanceType }}",
"ResourceGroupId": "{{ describeReservedInstances.ResourceGroupId }}",
"ZoneId": "{{ describeReservedInstances.zoneId }}",
"Scope": "{{ describeReservedInstances.scope }}",
"InstanceAmount": "{{ describeReservedInstances.instanceAmount }}",
"Description": "{{ describeReservedInstances.description }}",
"Platform": "{{ describeReservedInstances.platform }}",
"Period": "{{ period }}",
"PeriodUnit": "{{ periodUnit }}",
"OfferingType": "{{ offeringType }}",
"Tags": {
"Fn::If": [
{
"Fn::Equals": [
[
null
],
"{{ describeReservedInstances.tags }}"
]
},
null,
{
"Fn::Jq": [
"All",
".[].Tag | .[] | {\"Key\": .TagKey, \"Value\": .TagValue}",
"{{describeReservedInstances.tags}}"
]
}
]
}
}
},
"Outputs": {
"reservedInstanceId": {
"Type": "String",
"ValueSelector": "ReservedInstanceIdSets.ReservedInstanceId[]"
}
}
}
],
"Outputs": {
"reservedInstanceId": {
"Type": "String",
"Value": "{{ purchaseReservedInstance.reservedInstanceId }}"
}
}
}