-
Notifications
You must be signed in to change notification settings - Fork 19
/
generator.yaml
226 lines (226 loc) · 6.47 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
ignore:
resource_names:
- SMSSandboxPhoneNumber
field_paths:
- SubscribeInput.ReturnSubscriptionArn
operations:
# NOTE(jaypipes): Because OF COURSE the name of the API doesn't match the
# name of the API Resource :( grrrr...
GetEndpointAttributes:
resource_name: PlatformEndpoint
operation_type: GET_ATTRIBUTES
SetEndpointAttributes:
resource_name: PlatformEndpoint
operation_type: SET_ATTRIBUTES
# NOTE(jaypipes): The Subscription resource has a number of usage caveats in
# order to make it fit into the Kubernetes declarative resource model and
# behaviour expectations. Notably, we constrain Subscribe operations to only
# topics and endpoints that are owned by the same AWS account as the
# subscriber and where the protocol is NOT "http(s)" or "email". This is
# because there is a manual 2-step multi-account ConfirmSubscription workflow
# that is required if the endpoint is owned by a different AWS account or
# those protocols are used...
Subscribe:
resource_name: Subscription
operation_type: CREATE
Unsubscribe:
resource_name: Subscription
operation_type: DELETE
GetSubscriptionAttributes:
resource_name: Subscription
operation_type: GET_ATTRIBUTES
SetSubscriptionAttributes:
resource_name: Subscription
operation_type: SET_ATTRIBUTES
resources:
Topic:
print:
add_age_column: true
add_synced_column: true
additional_columns:
- name: ARN
json_path: .status.ackResourceMetadata.arn
type: string
priority: 1 # shows only in -o view
- name: DISPLAYNAME
json_path: .spec.displayName
type: string
priority: 0
is_arn_primary_key: true
update_operation:
custom_method_name: customUpdate
unpack_attributes_map:
set_attributes_single_attribute: true
exceptions:
terminal_codes:
- InvalidParameter
hooks:
delta_pre_compare:
code: compareTags(delta, a, b)
sdk_get_attributes_pre_set_output:
template_path: hooks/topic/sdk_get_attributes_pre_set_output.go.tpl
sdk_get_attributes_post_set_output:
template_path: hooks/topic/sdk_get_attributes_post_set_output.go.tpl
fields:
Name:
is_immutable: true
TopicArn:
is_attribute: true
is_arn: true
is_read_only: true
type: string
FifoTopic:
is_attribute: true
ContentBasedDeduplication:
is_attribute: true
TracingConfig:
is_attribute: true
DeliveryPolicy:
is_attribute: true
DisplayName:
is_attribute: true
Policy:
is_attribute: true
type: string
references:
service_name: iam
resource: Policy
path: Spec.PolicyDocument
# The topic policy is apparently automatically set on the server side
# if not supplied during create
late_initialize: {}
KmsMasterKeyId:
is_attribute: true
type: string
references:
service_name: kms
resource: Key
path: Status.KeyID
Owner:
is_attribute: true
is_read_only: true
is_owner_account_id: true
EffectiveDeliveryPolicy:
is_attribute: true
is_read_only: true
SignatureVersion:
is_attribute: true
Tags:
compare:
is_ignored: true
PlatformApplication:
is_arn_primary_key: true
unpack_attributes_map:
set_attributes_single_attribute: false
fields:
PlatformCredential:
is_attribute: true
PlatformPrincipal:
is_attribute: true
EventEndpointCreated:
is_attribute: true
type: string
references:
resource: Topic
path: Status.ACKResourceMetadata.ARN
EventEndpointDeleted:
is_attribute: true
type: string
references:
resource: Topic
path: Status.ACKResourceMetadata.ARN
EventEndpointUpdated:
is_attribute: true
type: string
references:
resource: Topic
path: Status.ACKResourceMetadata.ARN
EventDeliveryFailure:
is_attribute: true
SuccessFeedbackRoleArn:
is_attribute: true
type: string
references:
service_name: iam
resource: Role
path: Status.ACKResourceMetadata.ARN
FailureFeedbackRoleArn:
is_attribute: true
type: string
references:
service_name: iam
resource: Role
path: Status.ACKResourceMetadata.ARN
SuccessFeedbackSampleRate:
is_attribute: true
tags:
ignore: true
PlatformEndpoint:
is_arn_primary_key: true
unpack_attributes_map:
set_attributes_single_attribute: false
fields:
CustomUserData:
is_attribute: true
Enabled:
is_attribute: true
Token:
is_attribute: true
tags:
ignore: true
Subscription:
print:
add_age_column: true
add_synced_column: true
additional_columns:
- name: ARN
json_path: .status.ackResourceMetadata.arn
type: string
priority: 1 # shows only in -o view
is_arn_primary_key: true
update_operation:
custom_method_name: customUpdate
unpack_attributes_map:
set_attributes_single_attribute: true
exceptions:
terminal_codes:
- InvalidParameter
hooks:
sdk_create_post_build_request:
template_path: hooks/subscription/sdk_create_post_build_request.go.tpl
sdk_get_attributes_pre_set_output:
template_path: hooks/subscription/sdk_get_attributes_pre_set_output.go.tpl
delta_pre_compare:
code: customPreCompare(delta, a, b)
fields:
ConfirmationWasAuthenticated:
is_attribute: true
is_read_only: true
DeliveryPolicy:
is_attribute: true
EffectiveDeliveryPolicy:
is_attribute: true
is_read_only: true
FilterPolicy:
is_attribute: true
FilterPolicyScope:
is_attribute: true
Owner:
is_attribute: true
is_read_only: true
is_owner_account_id: true
PendingConfirmation:
is_attribute: true
is_read_only: true
RawMessageDelivery:
is_attribute: true
RedrivePolicy:
is_attribute: true
SubscriptionRoleArn:
is_attribute: true
TopicArn:
references:
resource: Topic
path: Status.ACKResourceMetadata.ARN
tags:
ignore: true