-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathgenerator.yaml
339 lines (339 loc) · 9.65 KB
/
generator.yaml
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
ignore:
field_paths:
- DescribeSnapshotsInput.ClusterName
- DescribeSnapshotsInput.Source
resources:
Cluster:
exceptions:
errors:
404:
code: ClusterNotFoundFault
terminal_codes:
- ClusterAlreadyExistsFault
- InvalidParameterValueException
- InvalidParameterCombinationException
- NoOperationFault
renames:
operations:
CreateCluster:
input_fields:
ClusterName: Name
UpdateCluster:
input_fields:
ClusterName: Name
DeleteCluster:
input_fields:
ClusterName: Name
DescribeClusters:
input_fields:
ClusterName: Name
fields:
ACLName:
references:
resource: ACL
path: Spec.Name
AllowedScaleUpNodeTypes:
is_read_only: true
from:
operation: ListAllowedNodeTypeUpdates
path: ScaleUpNodeTypes
AllowedScaleDownNodeTypes:
is_read_only: true
from:
operation: ListAllowedNodeTypeUpdates
path: ScaleDownNodeTypes
Events:
is_read_only: true
from:
operation: DescribeEvents
path: Events
ParameterGroupName:
references:
resource: ParameterGroup
path: Spec.Name
SecurityGroupIDs:
references:
resource: SecurityGroup
service_name: ec2
path: Status.ID
SnapshotName:
references:
resource: Snapshot
path: Spec.Name
SNSTopicARN:
references:
resource: Topic
service_name: sns
path: Status.ACKResourceMetadata.ARN
SubnetGroupName:
references:
resource: SubnetGroup
path: Spec.Name
hooks:
sdk_read_many_post_set_output:
template_path: hooks/cluster/sdk_read_many_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/cluster/sdk_create_many_post_set_output.go.tpl
sdk_update_post_set_output:
template_path: hooks/cluster/sdk_update_many_post_set_output.go.tpl
sdk_update_post_build_request:
template_path: hooks/cluster/sdk_update_post_build_request.go.tpl
sdk_update_pre_build_request:
template_path: hooks/cluster/sdk_update_pre_build_request.go.tpl
sdk_delete_post_request:
template_path: hooks/cluster/sdk_delete_post_request.go.tpl
sdk_delete_pre_build_request:
template_path: hooks/cluster/sdk_delete_pre_build_request.go.tpl
synced:
when:
- path: Status.Status
in:
- available
- create-failed
SubnetGroup:
exceptions:
errors:
404:
code: SubnetGroupNotFoundFault
terminal_codes:
- InvalidSubnet
- InvalidParameterValueException
- SubnetGroupAlreadyExistsFault
- SubnetNotAllowedFault
fields:
SubnetIDs:
references:
service_name: ec2
resource: Subnet
path: Status.SubnetID
hooks:
sdk_create_post_set_output:
template_path: hooks/subnetgroup/sdk_create_post_set_output.go.tpl
sdk_read_many_pre_set_output:
template_path: hooks/subnetgroup/sdk_read_many_pre_set_output.go.tpl
sdk_read_many_post_set_output:
template_path: hooks/subnetgroup/sdk_read_many_post_set_output.go.tpl
sdk_update_post_set_output:
template_path: hooks/subnetgroup/sdk_create_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: hooks/subnetgroup/sdk_update_pre_build_request.go.tpl
renames:
operations:
CreateSubnetGroup:
input_fields:
SubnetGroupName: Name
UpdateSubnetGroup:
input_fields:
SubnetGroupName: Name
DeleteSubnetGroup:
input_fields:
SubnetGroupName: Name
DescribeSubnetGroups:
input_fields:
SubnetGroupName: Name
ACL:
exceptions:
errors:
404:
code: ACLNotFoundFault
terminal_codes:
- ACLAlreadyExistsFault
- DefaultUserRequired
- DuplicateUserNameFault
- InvalidParameterValueException
- InvalidParameterCombinationException
fields:
Events:
is_read_only: true
from:
operation: DescribeEvents
path: Events
UserNames:
references:
resource: User
path: Spec.Name
hooks:
sdk_read_many_post_set_output:
template_path: hooks/acl/sdk_read_many_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: hooks/acl/sdk_update_pre_build_request.go.tpl
sdk_update_post_build_request:
template_path: hooks/acl/sdk_update_post_build_request.go.tpl
sdk_update_post_set_output:
code: "ko.Spec.UserNames = desired.ko.Spec.UserNames"
renames:
operations:
CreateACL:
input_fields:
ACLName: Name
UpdateACL:
input_fields:
ACLName: Name
DeleteACL:
input_fields:
ACLName: Name
DescribeACLs:
input_fields:
ACLName: Name
synced:
when:
- path: Status.Status
in:
- active
User:
exceptions:
errors:
404:
code: UserNotFoundFault
terminal_codes:
- UserAlreadyExistsFault
- InvalidParameterValueException
- DuplicateUserNameFault
- InvalidParameterCombinationException
fields:
AuthenticationMode.Passwords:
is_secret: true
compare:
is_ignored: true
Events:
is_read_only: true
from:
operation: DescribeEvents
path: Events
hooks:
sdk_create_post_set_output:
code: "rm.setAnnotationsFields(desired, ko)"
sdk_read_many_post_set_output:
template_path: hooks/user/sdk_read_many_post_set_output.go.tpl
sdk_update_post_set_output:
code: "rm.setAnnotationsFields(desired, ko)"
sdk_update_pre_build_request:
template_path: hooks/user/sdk_update_pre_build_request.go.tpl
renames:
operations:
CreateUser:
input_fields:
UserName: Name
UpdateUser:
input_fields:
UserName: Name
DeleteUser:
input_fields:
UserName: Name
DescribeUsers:
input_fields:
UserName: Name
synced:
when:
- path: Status.Status
in:
- active
Snapshot:
exceptions:
errors:
404:
code: SnapshotNotFoundFault
terminal_codes:
- InvalidParameterCombinationException
- InvalidParameterValueException
- InvalidParameter
- SnapshotAlreadyExistsFault
fields:
SourceSnapshotName:
from:
operation: CopySnapshot
path: SourceSnapshotName
ClusterName:
is_primary_key: false
is_required: false
from:
operation: CreateSnapshot
path: ClusterName
references:
resource: Cluster
path: Spec.Name
KmsKeyId:
references:
resource: Key
service_name: kms
path: Status.ACKResourceMetadata.ARN
update_operation:
custom_method_name: customUpdate
hooks:
sdk_create_pre_build_request:
template_path: hooks/snapshot/sdk_create_pre_build_request.go.tpl
sdk_create_post_set_output:
template_path: hooks/snapshot/sdk_create_post_set_output.go.tpl
sdk_read_many_post_set_output:
template_path: hooks/snapshot/sdk_read_many_post_set_output.go.tpl
sdk_delete_pre_build_request:
template_path: hooks/snapshot/sdk_delete_pre_build_request.go.tpl
sdk_delete_post_request:
template_path: hooks/snapshot/sdk_delete_post_request.go.tpl
renames:
operations:
CreateSnapshot:
input_fields:
SnapshotName: Name
DeleteSnapshot:
input_fields:
SnapshotName: Name
DescribeSnapshots:
input_fields:
SnapshotName: Name
synced:
when:
- path: Status.Status
in:
- available
ParameterGroup:
exceptions:
errors:
404:
code: ParameterGroupNotFoundFault
terminal_codes:
- InvalidParameterGroupStateFault
- InvalidParameterValueException
- InvalidParameterCombinationException
- ParameterGroupAlreadyExistsFault
fields:
Name:
is_primary_key: true
is_required: true
from:
operation: CreateParameterGroup
path: ParameterGroupName
ParameterNameValues:
from:
operation: UpdateParameterGroup
path: ParameterNameValues
Parameters:
is_read_only: true
from:
operation: DescribeParameters
path: Parameters
update_operation:
custom_method_name: customUpdate
hooks:
sdk_read_many_post_set_output:
template_path: hooks/parametergroup/sdk_read_many_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/parametergroup/sdk_create_post_set_output.go.tpl
renames:
operations:
CreateParameterGroup:
input_fields:
ParameterGroupName: Name
UpdateParameterGroup:
input_fields:
ParameterGroupName: Name
DeleteParameterGroup:
input_fields:
ParameterGroupName: Name
DescribeParameterGroups:
input_fields:
ParameterGroupName: Name
operations:
DescribeClusters:
override_values:
ShowShardDetails: true