-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgenerator.yaml
231 lines (231 loc) · 6.62 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:
resource_names:
# AccessPoint
# FileSystem
# MountTarget
- ReplicationConfiguration
field_paths:
- CreateFileSystemInput.CreationToken
- UpdateFileSystemOutput.CreationToken
- FileSystemDescription.CreationToken
- DescribeFileSystemsInput.CreationToken
- CreateFileSystemOutput.CreationToken
- PutBackupPolicyInput.FileSystemId
- PutLifecycleConfigurationInput.FileSystemId
- PutFileSystemPolicyInput.FileSystemId
- UpdateFileSystemProtectionInput.FileSystemId
# Well, FileSystem idempotency token is called CreationToken
# and AccessPoint idempotency token is called ClientToken.....
- CreateAccessPointInput.ClientToken
- AccessPointDescription.ClientToken
shape_names:
- SecondaryGids
- ClientToken
model_name: elasticfilesystem
controller_name: efs
resources:
FileSystem:
fields:
KMSKeyID:
references:
resource: Key
path: Status.ACKResourceMetadata.ARN
service_name: kms
FileSystemProtection:
is_read_only: false
from:
operation: UpdateFileSystemProtection
path: .
BackupPolicy:
from:
operation: PutBackupPolicy
path: BackupPolicy
Policy:
from:
operation: PutFileSystemPolicy
path: Policy
LifecyclePolicies:
from:
operation: PutLifecycleConfiguration
path: LifecyclePolicies
hooks:
delta_pre_compare:
code: customPreCompare(delta, a, b)
sdk_update_post_request:
code: return desired, nil
sdk_create_post_set_output:
template_path: hooks/file_system/sdk_create_post_set_output.go.tpl
sdk_create_post_build_request:
template_path: hooks/file_system/sdk_create_post_build_request.go.tpl
sdk_read_many_post_set_output:
template_path: hooks/file_system/sdk_read_many_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: hooks/file_system/sdk_update_pre_build_request.go.tpl
print:
add_age_column: true
add_synced_column: true
order_by: index
additional_columns:
- name: ID
json_path: .status.fileSystemID
type: string
index: 10
- name: ENCRYPTED
json_path: .spec.encrypted
type: boolean
index: 11
- name: PERFORMANCEMODE
json_path: .spec.performanceMode
type: string
index: 15
priority: 1
- name: THROUGHPUTMODE
json_path: .spec.throughputMode
type: string
index: 16
priority: 1
- name: PROVISIONEDTHROUGHPUT
json_path: .status.provisionedThroughputInMiBps
type: string
index: 17
priority: 1
- name: SIZE
json_path: .status.sizeInBytes.value
type: integer
index: 20
- name: MOUNTTARGETS
json_path: .status.numberOfMountTargets
type: integer
index: 25
- name: STATE
json_path: .status.lifeCycleState
type: string
index: 30
MountTarget:
tags:
ignore: true
fields:
FileSystemId:
references:
resource: FileSystem
path: Status.FileSystemID
SubnetId:
references:
resource: Subnet
path: Status.SubnetID
service_name: ec2
SecurityGroups:
references:
resource: SecurityGroup
path: Status.ID
service_name: ec2
update_operation:
custom_method_name: customUpdateMountTarget
hooks:
sdk_create_post_set_output:
template_path: hooks/mount_target/sdk_create_post_set_output.go.tpl
sdk_read_many_post_build_request:
template_path: hooks/mount_target/sdk_read_many_post_build_request.go.tpl
sdk_read_many_post_set_output:
template_path: hooks/mount_target/sdk_read_many_post_set_output.go.tpl
print:
add_age_column: true
add_synced_column: true
order_by: index
additional_columns:
- name: FILESYSTEMID
json_path: .spec.fileSystemID
type: string
index: 10
- name: MOUNTTARGETID
json_path: .status.mountTargetID
type: string
index: 30
- name: IPADDRESS
json_path: .spec.ipAddress
type: string
index: 20
- name: SUBNETID
json_path: .spec.subnetID
type: string
index: 30
- name: VPCID
json_path: .status.vpcID
type: string
index: 35
priority: 1
- name: AVAILABILITYZONEID
json_path: .status.availabilityZoneID
type: string
index: 36
priority: 1
- name: AVAILABILITYZONENAME
json_path: .status.availabilityZoneName
type: string
index: 37
priority: 1
- name: STATE
json_path: .status.lifeCycleState
type: string
index: 40
AccessPoint:
fields:
PosixUser:
is_immutable: true
RootDirectory:
is_immutable: true
PosixUser.SecondaryGids:
type: "[]*int64"
compare:
is_ignored: true
# This is a workaround for the fact that code-generator
# isn't smart enough to understand this.
# TODO(a-hilaly): Remove this once the issue is fixed
PosixUser.SecondaryGIDs:
compare:
is_ignored: true
FileSystemId:
references:
resource: FileSystem
path: Status.FileSystemID
is_immutable: true
update_operation:
custom_method_name: customUpdateAccessPoint
hooks:
delta_pre_compare:
code: customPreCompare(delta, a, b)
sdk_create_post_build_request:
template_path: hooks/access_point/sdk_create_post_build_request.go.tpl
sdk_read_many_post_build_request:
template_path: hooks/access_point/sdk_read_many_post_build_request.go.tpl
sdk_read_many_post_set_output:
template_path: hooks/access_point/sdk_read_many_post_set_output.go.tpl
print:
add_age_column: true
add_synced_column: true
order_by: index
additional_columns:
- name: ID
json_path: .status.accessPointID
type: string
index: 5
- name: FILESYSTEMID
json_path: .spec.fileSystemID
type: string
index: 10
- name: ROOTDIRECTORY
json_path: .spec.rootDirectory.path
type: string
index: 20
- name: POSIXUSERUID
json_path: .spec.posixUser.uid
type: integer
index: 25
- name: POSIXUSERGID
json_path: .spec.posixUser.gid
type: integer
index: 30
- name: STATE
json_path: .status.lifeCycleState
type: string
index: 40