-
Notifications
You must be signed in to change notification settings - Fork 4
/
generator.yaml
229 lines (229 loc) · 6.05 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
ignore:
resource_names:
# Listener
# LoadBalancer
# Rule
# TargetGroup
- TrustStore
field_paths:
- DescribeLoadBalancersOutput.NextMarker
sdk_names:
model_name: elasticloadbalancingv2
operations:
DescribeLoadBalancers:
operation_type:
- ReadMany
resource_name: LoadBalancer
output_wrapper_field_path: LoadBalancers
CreateLoadBalancer:
operation_type:
- Create
resource_name: LoadBalancer
output_wrapper_field_path: LoadBalancers
DescribeListeners:
operation_type:
- ReadMany
resource_name: Listener
output_wrapper_field_path: Listeners
custom_check_required_fields_missing_method: customCheckRequiredFieldsMissingMethod
CreateListener:
operation_type:
- Create
resource_name: Listener
output_wrapper_field_path: Listeners
ModifyListener:
operation_type:
- Update
resource_name: Listener
output_wrapper_field_path: Listeners
DescribeTargetGroups:
operation_type:
- ReadMany
resource_name: TargetGroup
output_wrapper_field_path: TargetGroups
CreateTargetGroup:
operation_type:
- Create
resource_name: TargetGroup
output_wrapper_field_path: TargetGroups
ModifyTargetGroup:
operation_type:
- Update
resource_name: TargetGroup
output_wrapper_field_path: TargetGroups
DescribeRules:
operation_type:
- ReadMany
resource_name: Rule
output_wrapper_field_path: Rules
custom_check_required_fields_missing_method: customCheckRequiredFieldsMissingMethod
CreateRule:
operation_type:
- Create
resource_name: Rule
output_wrapper_field_path: Rules
ModifyRule:
operation_type:
- Update
resource_name: Rule
output_wrapper_field_path: Rules
resources:
LoadBalancer:
fields:
Name:
is_primary_key: true
Type:
go_tag: json:"type,omitempty"
Attributes:
from:
operation: ModifyLoadBalancerAttributes
path: Attributes
compare:
is_ignored: true
SecurityGroups:
references:
resource: SecurityGroup
path: Status.ID
service_name: ec2
Subnets:
references:
resource: Subnet
path: Status.SubnetID
service_name: ec2
SubnetMappings.SubnetID:
references:
resource: Subnet
path: Status.SubnetID
service_name: ec2
update_operation:
custom_method_name: customUpdateLoadBalancer
renames:
operations:
DescribeLoadBalancers:
output_fields:
LoadBalancerName: Name
CreateLoadBalancer:
output_fields:
LoadBalancerName: Name
exceptions:
errors:
404:
code: LoadBalancerNotFound
terminal_codes:
- ValidationError
- InvalidConfigurationRequest
- InvalidScheme
hooks:
delta_pre_compare:
code: customPreCompare(delta, a, b)
sdk_read_many_post_set_output:
template_path: hooks/load_balancer/sdk_read_many_post_set_output.go.tpl
Listener:
fields:
DefaultActions.TargetGroupARN:
references:
resource: TargetGroup
path: Status.ACKResourceMetadata.ARN
DefaultActions.ForwardConfig.TargetGroups.TargetGroupARN:
references:
resource: TargetGroup
path: Status.ACKResourceMetadata.ARN
LoadBalancerArn:
is_read_only: false
is_primary_key: true
references:
resource: LoadBalancer
path: Status.ACKResourceMetadata.ARN
DefaultActions.Type:
go_tag: json:"type,omitempty"
exceptions:
errors:
404:
code: ListenerNotFound
terminal_codes:
- ValidationError
- ALPNPolicyNotFound
- DuplicateListener
- IncompatibleProtocols
- InvalidConfigurationRequest
- InvalidLoadBalancerAction
- SSLPolicyNotFound
- UnsupportedProtocol
- InvalidParameter
tags:
ignore: true
hooks:
sdk_read_many_post_build_request:
template_path: hooks/listener/sdk_read_many_post_build_request.go.tpl
TargetGroup:
fields:
Name:
is_required: true
VpcId:
references:
resource: VPC
path: Status.VPCID
service_name: ec2
Targets:
from:
operation: RegisterTargets
path: Targets
compare:
is_ignored: true
hooks:
delta_pre_compare:
code: customCompare(delta, a, b)
sdk_create_post_set_output:
template_path: hooks/target_group/sdk_create_post_set_output.go.tpl
sdk_read_many_post_set_output:
template_path: hooks/target_group/sdk_read_many_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: hooks/target_group/sdk_update_pre_build_request.go.tpl
exceptions:
errors:
404:
code: TargetGroupNotFound
terminal_codes:
- InvalidConfigurationRequest
tags:
ignore: true
renames:
operations:
DescribeTargetGroups:
output_fields:
TargetGroupName: Name
CreateTargetGroup:
output_fields:
TargetGroupName: Name
Rule:
fields:
ListenerArn:
is_primary_key: true
references:
resource: Listener
path: Status.ACKResourceMetadata.ARN
Actions.targetGroupARN:
references:
resource: TargetGroup
path: Status.ACKResourceMetadata.ARN
Priority:
set:
- ignore: true
exceptions:
errors:
404:
code: RuleNotFound
terminal_codes:
- InvalidConfigurationRequest
- IncompatibleProtocols
- UnsupportedProtocol
- InvalidLoadBalancerAction
tags:
ignore: true
hooks:
sdk_read_many_post_build_request:
template_path: hooks/rule/sdk_read_many_post_build_request.go.tpl
sdk_update_pre_build_request:
template_path: hooks/rule/sdk_update_pre_build_request.go.tpl
sdk_read_many_post_set_output:
template_path: hooks/rule/sdk_read_many_post_set_output.go.tpl