-
Notifications
You must be signed in to change notification settings - Fork 18
/
generator.yaml
231 lines (231 loc) · 7.42 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
ignore:
field_paths:
- ChangeResourceRecordSetsOutput.ChangeInfo.Comment
- CreateHostedZoneInput.CallerReference
- CreateHealthCheckInput.CallerReference
operations: null
resource_names:
- CidrCollection
# - HealthCheck
# - HostedZone
- KeySigningKey
- QueryLoggingConfig
- ReusableDelegationSet
- TrafficPolicy
- TrafficPolicyInstance
- TrafficPolicyVersion
- VPCAssociationAuthorization
- CidrCollection
shape_names: null
model_name: route53
operations:
ChangeResourceRecordSets:
operation_type:
- Create
- Delete
resource_name:
RecordSet
ListResourceRecordSets:
operation_type:
- List
resource_name:
RecordSet
CreateHostedZone:
output_wrapper_field_path: HostedZone
GetHostedZone:
output_wrapper_field_path: HostedZone
CreateHealthCheck:
output_wrapper_field_path: HealthCheck
GetHealthCheck:
output_wrapper_field_path: HealthCheck
UpdateHealthCheck:
output_wrapper_field_path: HealthCheck
prefix_config: {}
resources:
RecordSet:
exceptions:
terminal_codes:
- InvalidChangeBatch
- InvalidInput
- NoSuchHostedZone
- NoSuchHealthCheck
fields:
AliasTarget:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.AliasTarget
# This field cannot be ignored, but values for this will be overriden and should not be used
ChangeBatch:
is_required: false
CidrRoutingConfig:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.CidrRoutingConfig
Failover:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.Failover
GeoLocation:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.GeoLocation
HealthCheckId:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.HealthCheckId
# Changing this value after a CR has been created could result in orphaned record sets
HostedZoneId:
references:
resource: HostedZone
path: Status.ID
is_required: true
is_immutable: true
ID:
is_primary_key: true
documentation: "ID represents the ChangeID that is returned after a successful
ChangeResourceRecordSet request"
MultiValueAnswer:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.MultiValueAnswer
# Changing this value after a CR has been created could result in orphaned record sets.
# Note that the name refers to the subdomain value of a record set and not the fully
# qualified DNS name
Name:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.Name
is_immutable: true
# Changing this value after a CR has been created could result in orphaned record sets
RecordType:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.Type
is_required: true
is_immutable: true
Region:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.Region
ResourceRecords:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.ResourceRecords
# Changing this value after a CR has been created could result in orphaned record sets
SetIdentifier:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.SetIdentifier
is_immutable: true
Status:
print:
name: STATUS
TTL:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.TTL
Weight:
from:
operation: ChangeResourceRecordSets
path: ChangeBatch.Changes.ResourceRecordSet.Weight
hooks:
sdk_create_post_build_request:
template_path: hooks/record_set/sdk_create_post_build_request.go.tpl
sdk_delete_post_build_request:
template_path: hooks/record_set/sdk_delete_post_build_request.go.tpl
sdk_read_many_post_build_request:
template_path: hooks/record_set/sdk_read_many_post_build_request.go.tpl
sdk_read_many_pre_set_output:
template_path: hooks/record_set/sdk_read_many_pre_set_output.go.tpl
sdk_read_many_post_set_output:
template_path: hooks/record_set/sdk_read_many_post_set_output.go.tpl
post_set_resource_identifiers:
template_path: hooks/record_set/post_set_resource_identifiers.go.tpl
post_populate_resource_from_annotation:
template_path: hooks/record_set/post_populate_resource_from_annotation.go.tpl
list_operation:
match_fields:
- HostedZoneId
- Name
- SetIdentifier
# This resource does not have tags
tags:
ignore: true
update_operation:
custom_method_name: customUpdateRecordSet
HostedZone:
exceptions:
terminal_codes:
- DelegationSetNotReusable
- InvalidDomainName
- InvalidInput
- InvalidVPCId
fields:
Tags:
from:
operation: ChangeTagsForResource
path: AddTags
compare:
is_ignored: True
hooks:
delta_pre_compare:
code: compareTags(delta, a, b)
sdk_read_one_post_set_output:
template_path: hooks/hosted_zone/sdk_read_one_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/hosted_zone/sdk_create_post_set_output.go.tpl
sdk_create_post_build_request:
template_path: hooks/hosted_zone/sdk_create_post_build_request.go.tpl
sdk_file_end:
template_path: hooks/hosted_zone/sdk_file_end.go.tpl
ensure_tags:
template_path: hooks/hosted_zone/sdk_ensure_tags.go.tpl
tags:
ignore: true
update_operation:
custom_method_name: customUpdateHostedZone
HealthCheck:
renames:
operations:
GetHealthCheck:
input_fields:
HealthCheckId: Id
UpdateHealthCheck:
input_fields:
HealthCheckId: Id
DeleteHealthCheck:
input_fields:
HealthCheckId: Id
exceptions:
terminal_codes:
- InvalidInput
- HealthCheckInUse
fields:
Tags:
from:
operation: ChangeTagsForResource
path: AddTags
compare:
is_ignored: True
HealthCheckConfig.Type:
go_tag: json:"type,omitempty"
is_immutable: true
HealthCheckConfig.MeasureLatency:
is_immutable: true
HealthCheckConfig.RequestInterval:
is_immutable: true
HealthCheckConfig.RoutingControlArn:
is_immutable: true
hooks:
delta_pre_compare:
code: compareTags(delta, a, b)
sdk_read_one_post_set_output:
template_path: hooks/health_check/sdk_read_one_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/health_check/sdk_create_post_set_output.go.tpl
sdk_create_post_build_request:
template_path: hooks/health_check/sdk_create_post_build_request.go.tpl
sdk_file_end:
template_path: hooks/health_check/sdk_file_end.go.tpl
update_operation:
custom_method_name: customUpdateHealthCheck