vgs-cli 0.0.1.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vgs_cli-0.0.1.dev0.data/data/vgscli/calm.yaml +16 -0
- vgs_cli-0.0.1.dev0.data/data/vgscli/checkout.yaml +21 -0
- vgs_cli-0.0.1.dev0.data/data/vgscli/http-route-template.yaml +61 -0
- vgs_cli-0.0.1.dev0.data/data/vgscli/mft-route-template.yaml +10 -0
- vgs_cli-0.0.1.dev0.data/data/vgscli/payments-admin.yaml +25 -0
- vgs_cli-0.0.1.dev0.data/data/vgscli/service-account-schema.yaml +54 -0
- vgs_cli-0.0.1.dev0.data/data/vgscli/sub-account-checkout.yaml +23 -0
- vgs_cli-0.0.1.dev0.data/data/vgscli/vault-resources.yaml +710 -0
- vgs_cli-0.0.1.dev0.data/data/vgscli/vault-schema.yaml +36 -0
- vgs_cli-0.0.1.dev0.data/data/vgscli/vault-template.yaml +12 -0
- vgs_cli-0.0.1.dev0.data/data/vgscli/vgs-cli.yaml +17 -0
- vgs_cli-0.0.1.dev0.dist-info/METADATA +139 -0
- vgs_cli-0.0.1.dev0.dist-info/RECORD +56 -0
- vgs_cli-0.0.1.dev0.dist-info/WHEEL +5 -0
- vgs_cli-0.0.1.dev0.dist-info/entry_points.txt +2 -0
- vgs_cli-0.0.1.dev0.dist-info/licenses/LICENSE +22 -0
- vgs_cli-0.0.1.dev0.dist-info/top_level.txt +1 -0
- vgscli/__init__.py +0 -0
- vgscli/_version.py +32 -0
- vgscli/access_logs.py +65 -0
- vgscli/audits_api.py +102 -0
- vgscli/auth.py +68 -0
- vgscli/auth_server.py +131 -0
- vgscli/auth_utils.py +24 -0
- vgscli/callback_server.py +41 -0
- vgscli/cert_manager_api.py +34 -0
- vgscli/cli/__init__.py +23 -0
- vgscli/cli/commands/__init__.py +3 -0
- vgscli/cli/commands/apply.py +307 -0
- vgscli/cli/commands/generate.py +134 -0
- vgscli/cli/commands/get.py +200 -0
- vgscli/cli/types/__init__.py +2 -0
- vgscli/cli/types/resource_id.py +39 -0
- vgscli/cli/types/variable.py +21 -0
- vgscli/cli_utils.py +132 -0
- vgscli/click_extensions.py +88 -0
- vgscli/config_file.py +58 -0
- vgscli/errors.py +263 -0
- vgscli/file_token_util.py +30 -0
- vgscli/id_generator.py +46 -0
- vgscli/keyring_token_util.py +128 -0
- vgscli/resource-templates/http-route-template.yaml +61 -0
- vgscli/resource-templates/mft-route-template.yaml +10 -0
- vgscli/resource-templates/service-account/calm.yaml +16 -0
- vgscli/resource-templates/service-account/checkout.yaml +21 -0
- vgscli/resource-templates/service-account/payments-admin.yaml +25 -0
- vgscli/resource-templates/service-account/sub-account-checkout.yaml +23 -0
- vgscli/resource-templates/service-account/vgs-cli.yaml +17 -0
- vgscli/resource-templates/vault-template.yaml +12 -0
- vgscli/testing.py +48 -0
- vgscli/text.py +9 -0
- vgscli/token_handler.py +11 -0
- vgscli/validation-schemas/service-account-schema.yaml +54 -0
- vgscli/validation-schemas/vault-resources.yaml +710 -0
- vgscli/validation-schemas/vault-schema.yaml +36 -0
- vgscli/vgs.py +249 -0
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
---
|
|
2
|
+
"$schema": https://json-schema.org/draft/2020-12/schema
|
|
3
|
+
"$id": https://vgs.io/docs/product.schema.json
|
|
4
|
+
title: Organization
|
|
5
|
+
description: All VGS resources in one handy place
|
|
6
|
+
type: object
|
|
7
|
+
properties:
|
|
8
|
+
apiVersion:
|
|
9
|
+
type: string
|
|
10
|
+
enum:
|
|
11
|
+
- vgs.io/v1beta
|
|
12
|
+
kind:
|
|
13
|
+
type: string
|
|
14
|
+
enum:
|
|
15
|
+
- Organization
|
|
16
|
+
spec:
|
|
17
|
+
type: object
|
|
18
|
+
"$ref": "#/definitions/Organization"
|
|
19
|
+
metadata:
|
|
20
|
+
type: object
|
|
21
|
+
definitions:
|
|
22
|
+
Organization:
|
|
23
|
+
type: object
|
|
24
|
+
properties:
|
|
25
|
+
attributes:
|
|
26
|
+
type: object
|
|
27
|
+
properties:
|
|
28
|
+
active:
|
|
29
|
+
type: boolean
|
|
30
|
+
name:
|
|
31
|
+
type: string
|
|
32
|
+
id:
|
|
33
|
+
type: string
|
|
34
|
+
example: ACmn5cbTDnpW8aTqioTSXar7
|
|
35
|
+
links:
|
|
36
|
+
type: object
|
|
37
|
+
relationships:
|
|
38
|
+
type: object
|
|
39
|
+
properties:
|
|
40
|
+
environments:
|
|
41
|
+
type: object
|
|
42
|
+
profile:
|
|
43
|
+
type: object
|
|
44
|
+
users:
|
|
45
|
+
type: object
|
|
46
|
+
vaults:
|
|
47
|
+
type: object
|
|
48
|
+
type:
|
|
49
|
+
type: string
|
|
50
|
+
enum: [organizations]
|
|
51
|
+
required: [id]
|
|
52
|
+
---
|
|
53
|
+
"$schema": https://json-schema.org/draft/2020-12/schema
|
|
54
|
+
"$id": https://vgs.io/docs/product.schema.json
|
|
55
|
+
title: MFT Route
|
|
56
|
+
description: All VGS resources in one handy place
|
|
57
|
+
type: object
|
|
58
|
+
properties:
|
|
59
|
+
apiVersion:
|
|
60
|
+
type: string
|
|
61
|
+
enum:
|
|
62
|
+
- mft.vgs.io/v1beta
|
|
63
|
+
kind:
|
|
64
|
+
type: string
|
|
65
|
+
enum:
|
|
66
|
+
- MftRoute
|
|
67
|
+
spec:
|
|
68
|
+
type: object
|
|
69
|
+
"$ref": "#/definitions/MftRoute"
|
|
70
|
+
metadata:
|
|
71
|
+
type: object
|
|
72
|
+
properties:
|
|
73
|
+
name:
|
|
74
|
+
type: string
|
|
75
|
+
required: [name]
|
|
76
|
+
# required: [apiVersion, kind, spec, metadata]
|
|
77
|
+
definitions:
|
|
78
|
+
MftRoute:
|
|
79
|
+
type: object
|
|
80
|
+
properties:
|
|
81
|
+
source:
|
|
82
|
+
type: object
|
|
83
|
+
properties:
|
|
84
|
+
s3Bucket:
|
|
85
|
+
type: object
|
|
86
|
+
properties:
|
|
87
|
+
url:
|
|
88
|
+
type: string
|
|
89
|
+
example: s3://my-existing-s3-bucket/path/to/source/
|
|
90
|
+
description: An S3 url pointing to the incoming bucket
|
|
91
|
+
pattern: ^s3://
|
|
92
|
+
region:
|
|
93
|
+
type: string
|
|
94
|
+
example: us-east-1
|
|
95
|
+
description: The region of the bucket
|
|
96
|
+
enum: [us-east-1, us-west-2]
|
|
97
|
+
required: [url, region]
|
|
98
|
+
SFTPServer:
|
|
99
|
+
type: object
|
|
100
|
+
properties:
|
|
101
|
+
host:
|
|
102
|
+
type: string
|
|
103
|
+
example: ftp.example.com
|
|
104
|
+
description: The qualified hostname of the upstream SFTP server
|
|
105
|
+
port:
|
|
106
|
+
type: integer
|
|
107
|
+
example: 22
|
|
108
|
+
description: The port of the upstream host to connect to
|
|
109
|
+
credentials:
|
|
110
|
+
type: object
|
|
111
|
+
properties:
|
|
112
|
+
username:
|
|
113
|
+
type: string
|
|
114
|
+
example: username
|
|
115
|
+
description: The key name of the SFTP username stored in the tenant secret
|
|
116
|
+
password:
|
|
117
|
+
type: string
|
|
118
|
+
example: sftp_ingress_password
|
|
119
|
+
description: The key name of the SFTP password stored in the tenant secret
|
|
120
|
+
key:
|
|
121
|
+
type: string
|
|
122
|
+
example: sftp_key
|
|
123
|
+
description: The key name of the SFTP SSH key stored in the tenant secret
|
|
124
|
+
oneOf:
|
|
125
|
+
- required: [username, password]
|
|
126
|
+
- required: [username, key]
|
|
127
|
+
required: [host, port, credentials]
|
|
128
|
+
schedule:
|
|
129
|
+
type: string
|
|
130
|
+
example: "*/5 * * * *"
|
|
131
|
+
description: The schedule upon which to performing syncing of files from the source, and monitoring for synced files. See https://airflow.apache.org/docs/apache-airflow/1.10.1/scheduler.html#dag-runs for examples
|
|
132
|
+
prefix:
|
|
133
|
+
type: string
|
|
134
|
+
example: "/from_HC3/sandbox_MFT/Chartway"
|
|
135
|
+
description: The path of the upstream we should look in for copying files. Note that this is treated as root, the prefix is not preserved.
|
|
136
|
+
prepend:
|
|
137
|
+
type: string
|
|
138
|
+
example: "/from_Fiserv/"
|
|
139
|
+
description: A path to prepend to incoming files, preserving the current path. /data/example.csv -> /from_Fiserv/data/example.csv
|
|
140
|
+
include:
|
|
141
|
+
type: array
|
|
142
|
+
example:
|
|
143
|
+
- "*parquet"
|
|
144
|
+
- "/csv/*/*.csv"
|
|
145
|
+
description: An array of unix wildcard paths, or plain values, which must appear in the path of the file. Only files matching this path will be copied.
|
|
146
|
+
items:
|
|
147
|
+
type: string
|
|
148
|
+
exclude:
|
|
149
|
+
type: array
|
|
150
|
+
example:
|
|
151
|
+
- "*.parquet"
|
|
152
|
+
- "/csv/*/*.csv"
|
|
153
|
+
- sfdc
|
|
154
|
+
description: An array of unix wildcard paths, or plain values, which cannot appear in the path of the file. Files matching this path will NOT be copied.
|
|
155
|
+
items:
|
|
156
|
+
type: string
|
|
157
|
+
retries:
|
|
158
|
+
type: integer
|
|
159
|
+
example: 1
|
|
160
|
+
description: The number of times to automatically retry processing a file from this source.
|
|
161
|
+
maximum: 10
|
|
162
|
+
minimum: 0
|
|
163
|
+
default: 0
|
|
164
|
+
log_level:
|
|
165
|
+
type: string
|
|
166
|
+
example: ERROR
|
|
167
|
+
description: Level of logging for the syncing job to display. One of IGNORE, ERROR, WARN, INFO, DEBUG in order of verbosity.
|
|
168
|
+
enum: [IGNORE, ERROR, WARN, INFO, DEBUG]
|
|
169
|
+
default: ERROR
|
|
170
|
+
extra_kwargs:
|
|
171
|
+
type: array
|
|
172
|
+
example:
|
|
173
|
+
- "--ignore-existing"
|
|
174
|
+
- "--max-age 1w"
|
|
175
|
+
- "--verbose"
|
|
176
|
+
description: Extra KWARGS to pass to RClone, see https://rclone.org/commands/rclone/
|
|
177
|
+
additionalProperties: false
|
|
178
|
+
destination:
|
|
179
|
+
type: object
|
|
180
|
+
properties:
|
|
181
|
+
s3Bucket:
|
|
182
|
+
type: object
|
|
183
|
+
properties:
|
|
184
|
+
url:
|
|
185
|
+
type: string
|
|
186
|
+
example: s3://my-existing-s3-bucket/path/to/destination/
|
|
187
|
+
description: An S3 url pointing to the outgoing bucket
|
|
188
|
+
required: [url]
|
|
189
|
+
minProperties: 1
|
|
190
|
+
additionalProperties: false
|
|
191
|
+
filters:
|
|
192
|
+
type: array
|
|
193
|
+
items:
|
|
194
|
+
type: object
|
|
195
|
+
properties:
|
|
196
|
+
when:
|
|
197
|
+
type: string
|
|
198
|
+
description: |
|
|
199
|
+
A statement that define when data should be operated on as it passes through a route.
|
|
200
|
+
|
|
201
|
+
Filters are evaluated in linear order and once the first filter has matched a message for the route futher filter evaluation is halted for this particular message.
|
|
202
|
+
|
|
203
|
+
Filters are implemented as python lambdas that take a single parameter called `file_name`. If the lambda returns a truthy value (True or non-null string or number above zero) then it will be considered to have matched.
|
|
204
|
+
|
|
205
|
+
You can emulate this behavior locally with code like this
|
|
206
|
+
|
|
207
|
+
```python
|
|
208
|
+
result = lambda file_name: file_name.endswith(".zip")
|
|
209
|
+
```
|
|
210
|
+
example: file_name.endswith(".zip")
|
|
211
|
+
then:
|
|
212
|
+
type: array
|
|
213
|
+
description: |
|
|
214
|
+
A series of transformations of, or actions on, a stream of information that is executed when the criteria on the filter evaluates to true.
|
|
215
|
+
|
|
216
|
+
Combined into a series called a Pipeline. In computing, a pipeline is a set of data processing elements connected in series, where the output of one element is the input of the next one.
|
|
217
|
+
|
|
218
|
+
A list of operations is executed in linear order from first to last.
|
|
219
|
+
|
|
220
|
+
If an operation encounters an error during execution processing is halted.
|
|
221
|
+
items:
|
|
222
|
+
type: [object, string]
|
|
223
|
+
pattern: DeliverFile
|
|
224
|
+
minProperties: 1
|
|
225
|
+
maxProperties: 1
|
|
226
|
+
properties:
|
|
227
|
+
DecompressFile:
|
|
228
|
+
type: object
|
|
229
|
+
properties:
|
|
230
|
+
process_files_matching:
|
|
231
|
+
type: string
|
|
232
|
+
example: "*.csv"
|
|
233
|
+
default: "*"
|
|
234
|
+
description: |
|
|
235
|
+
A glob style pattern to match files to process.
|
|
236
|
+
|
|
237
|
+
Files are re-processed from the beginning of the route and will match whichever filter has matching criteria according to the original file name.
|
|
238
|
+
folder:
|
|
239
|
+
type: string
|
|
240
|
+
example: "folder_name"
|
|
241
|
+
default: ""
|
|
242
|
+
description: |
|
|
243
|
+
The folder where each output file will reside.
|
|
244
|
+
|
|
245
|
+
Every file that is produced from the decompress step will be placed in this folder.
|
|
246
|
+
algo:
|
|
247
|
+
type: string
|
|
248
|
+
enum: [zip, gzip, tar]
|
|
249
|
+
example: zip
|
|
250
|
+
default: zip
|
|
251
|
+
description: |
|
|
252
|
+
The type of compression to use.
|
|
253
|
+
|
|
254
|
+
The specified algorithm will be used to decompress the input archives.
|
|
255
|
+
CompressFile:
|
|
256
|
+
type: object
|
|
257
|
+
properties:
|
|
258
|
+
algo:
|
|
259
|
+
type: string
|
|
260
|
+
enum: [zip, gzip, tar]
|
|
261
|
+
example: zip
|
|
262
|
+
default: zip
|
|
263
|
+
description: |
|
|
264
|
+
The type of compression to use.
|
|
265
|
+
|
|
266
|
+
The specified algorithm will be used to compress the input files.
|
|
267
|
+
DecryptFile:
|
|
268
|
+
type: object
|
|
269
|
+
properties:
|
|
270
|
+
key:
|
|
271
|
+
type: string
|
|
272
|
+
example: tok_asdf_1231243
|
|
273
|
+
description: |
|
|
274
|
+
The vault token that corresponds to the encryption key.
|
|
275
|
+
|
|
276
|
+
This token will be used to retrieve the encryption key from vault during runtime.
|
|
277
|
+
algo:
|
|
278
|
+
type: string
|
|
279
|
+
enum: [3des, aes256, rsa512]
|
|
280
|
+
example: 3des
|
|
281
|
+
description: |
|
|
282
|
+
The type of encryption to use.
|
|
283
|
+
|
|
284
|
+
The specified encryption algorithm will be used to decrypt the input files.
|
|
285
|
+
iv:
|
|
286
|
+
type: string
|
|
287
|
+
example: tok_asdf_1231243
|
|
288
|
+
description: |
|
|
289
|
+
The vault token that corresponds to the initialization vector.
|
|
290
|
+
|
|
291
|
+
This token will be used to retrieve the initialization vector from vault during runtime.
|
|
292
|
+
|
|
293
|
+
Must be included when the algo property is aes256.
|
|
294
|
+
required: [key, algo]
|
|
295
|
+
EncryptFile:
|
|
296
|
+
type: object
|
|
297
|
+
properties:
|
|
298
|
+
key:
|
|
299
|
+
type: string
|
|
300
|
+
example: tok_asdf_1231243
|
|
301
|
+
description: |
|
|
302
|
+
The vault token that corresponds to the encryption key.
|
|
303
|
+
|
|
304
|
+
This token will be used to retrieve the encryption key from vault during runtime.
|
|
305
|
+
algo:
|
|
306
|
+
type: string
|
|
307
|
+
enum: [3des, aes256, rsa512]
|
|
308
|
+
example: 3des
|
|
309
|
+
description: |
|
|
310
|
+
The type of encryption to use.
|
|
311
|
+
|
|
312
|
+
The specified encryption algorithm will be used to encrypt the input files.
|
|
313
|
+
required: [key, algo]
|
|
314
|
+
TransformFileContents:
|
|
315
|
+
type: object
|
|
316
|
+
description: |
|
|
317
|
+
A scripting operation that will execute against a file and allow transforming the contents of the file stream.
|
|
318
|
+
|
|
319
|
+
#### Python
|
|
320
|
+
Python scripts must implement the following interface:
|
|
321
|
+
|
|
322
|
+
```python
|
|
323
|
+
import typing
|
|
324
|
+
|
|
325
|
+
def transform(input_stream: typing.IO, ctx: dict) -> typing.Generator[bytes, None, None]:
|
|
326
|
+
line_count = 0
|
|
327
|
+
|
|
328
|
+
for line in input_stream:
|
|
329
|
+
yield line[::-1] # example - reverse file contents
|
|
330
|
+
line_count += 1
|
|
331
|
+
|
|
332
|
+
# this value will be made available in subsequent processing e.g. during ValidateFileContents
|
|
333
|
+
ctx['line_count'] = line_count
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
All standard python 3.8 libraries are available as well as
|
|
337
|
+
|
|
338
|
+
... requirements go here
|
|
339
|
+
|
|
340
|
+
Any values injected into the `ctx` dict will be made available to subsequent operations. Values prefixed with "vgs." are not user-writable.
|
|
341
|
+
|
|
342
|
+
The transformed file must be written to `path_to_output_file`.
|
|
343
|
+
|
|
344
|
+
properties:
|
|
345
|
+
src:
|
|
346
|
+
type: string
|
|
347
|
+
example: |
|
|
348
|
+
|
|
349
|
+
```python
|
|
350
|
+
import typing
|
|
351
|
+
def transform(input_stream: typing.IO, ctx: dict) -> typing.Generator[bytes, None, None]:
|
|
352
|
+
line_count = 0
|
|
353
|
+
for line in input_stream:
|
|
354
|
+
yield line[::-1] # example - reverse file contents
|
|
355
|
+
line_count += 1
|
|
356
|
+
# this value will be made available in subsequent processing e.g. during ValidateFileContents
|
|
357
|
+
ctx['line_count'] = line_count
|
|
358
|
+
```
|
|
359
|
+
description: |
|
|
360
|
+
Inline code used to transform the input files.
|
|
361
|
+
lang:
|
|
362
|
+
type: string
|
|
363
|
+
enum: [python3]
|
|
364
|
+
example: python3
|
|
365
|
+
description: |
|
|
366
|
+
The language that the transformation script is written in.
|
|
367
|
+
required: [src, lang]
|
|
368
|
+
ProcessFileContents:
|
|
369
|
+
type: object
|
|
370
|
+
description: |
|
|
371
|
+
A larky language based transform method that allows parallel processing chunks of the source file.
|
|
372
|
+
|
|
373
|
+
```larky
|
|
374
|
+
def transform(input: str, ctx: dict) -> str:
|
|
375
|
+
# your larky code goes here for a chunk of the file
|
|
376
|
+
return input[::-1] # example - reverse chunk
|
|
377
|
+
```
|
|
378
|
+
properties:
|
|
379
|
+
chunk_size:
|
|
380
|
+
type: integer
|
|
381
|
+
default: 1024
|
|
382
|
+
example: 1024
|
|
383
|
+
description: |
|
|
384
|
+
The size (in kilobytes) of chunks to process..
|
|
385
|
+
|
|
386
|
+
The input files will be broken up into chunks of the specified size, then each chunk will be processed. If the file cannot be divided evenly in to the specified size, the last chunk will be smaller.
|
|
387
|
+
exclude_header:
|
|
388
|
+
type: boolean
|
|
389
|
+
default: false
|
|
390
|
+
example: false
|
|
391
|
+
description: |
|
|
392
|
+
Specifies whether or not the file header should be processed.
|
|
393
|
+
|
|
394
|
+
If the value is true, then the file header will not be processed.
|
|
395
|
+
exclude_footer:
|
|
396
|
+
type: boolean
|
|
397
|
+
default: false
|
|
398
|
+
example: false
|
|
399
|
+
description: |
|
|
400
|
+
Specifies whether or not the file footer should be processed.
|
|
401
|
+
|
|
402
|
+
If the value is true, then the file footer will not be processed.
|
|
403
|
+
src:
|
|
404
|
+
type: string
|
|
405
|
+
example: process.star
|
|
406
|
+
description: |
|
|
407
|
+
Inline code used to process the input files.
|
|
408
|
+
lang:
|
|
409
|
+
type: string
|
|
410
|
+
enum: [larky, python3]
|
|
411
|
+
example: larky
|
|
412
|
+
description: |
|
|
413
|
+
The language that the process script is written in.
|
|
414
|
+
required: [src, lang]
|
|
415
|
+
ValidateFileContents:
|
|
416
|
+
type: object
|
|
417
|
+
description: |
|
|
418
|
+
A scripting operation that will execute against a file. The script must implement the following interface:
|
|
419
|
+
|
|
420
|
+
#### Python
|
|
421
|
+
```python
|
|
422
|
+
import typing
|
|
423
|
+
|
|
424
|
+
def validate(input_stream: typing.IO, ctx: dict) -> [bool, str]:
|
|
425
|
+
# validation logic goes here
|
|
426
|
+
ctx['line_count'] = len(input_stream)
|
|
427
|
+
return ctx['line_count'] > 1
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
All standard python 3.8 libraries are available as well as
|
|
431
|
+
|
|
432
|
+
... requirements go here
|
|
433
|
+
|
|
434
|
+
Any values injected into the `ctx` dict will be made available to subsequent operations. Values prefixed with "vgs." are not user-writable.
|
|
435
|
+
|
|
436
|
+
The validation script can return a boolean (True representing validation success), an error message, or throw an exception indicating failure.
|
|
437
|
+
properties:
|
|
438
|
+
src:
|
|
439
|
+
type: string
|
|
440
|
+
example: |
|
|
441
|
+
|
|
442
|
+
```python
|
|
443
|
+
def validate(input_stream: typing.IO, ctx: dict) -> [bool, str]:
|
|
444
|
+
# validation logic goes here
|
|
445
|
+
ctx['line_count'] = len(input_stream)
|
|
446
|
+
return ctx['line_count'] > 1
|
|
447
|
+
```
|
|
448
|
+
description: |
|
|
449
|
+
Inline code used to validate the input files.
|
|
450
|
+
lang:
|
|
451
|
+
type: string
|
|
452
|
+
enum: [larky, python3]
|
|
453
|
+
example: python3
|
|
454
|
+
description: |
|
|
455
|
+
The language that the validation script is written in.
|
|
456
|
+
required: [src, lang]
|
|
457
|
+
required: [when, then]
|
|
458
|
+
tests:
|
|
459
|
+
type: array
|
|
460
|
+
items:
|
|
461
|
+
type: object
|
|
462
|
+
description: |
|
|
463
|
+
Parameters to be used in synthetic pipeline runs. The pipeline will be triggered on the specified schedule using the provided input file.
|
|
464
|
+
properties:
|
|
465
|
+
schedule:
|
|
466
|
+
type: string
|
|
467
|
+
default: 0 0 * * *
|
|
468
|
+
input:
|
|
469
|
+
type: string
|
|
470
|
+
example: s3://my-existing-s3-bucket/path/to/source/input.csv
|
|
471
|
+
required: [input]
|
|
472
|
+
required: [source, destination, filters]
|
|
473
|
+
---
|
|
474
|
+
"$schema": https://json-schema.org/draft/2020-12/schema
|
|
475
|
+
"$id": https://vgs.io/mft-sla.schema.json
|
|
476
|
+
type: object
|
|
477
|
+
properties:
|
|
478
|
+
apiVersion:
|
|
479
|
+
type: string
|
|
480
|
+
const: mft.vgs.io/v1beta
|
|
481
|
+
kind:
|
|
482
|
+
type: string
|
|
483
|
+
const: MftSla
|
|
484
|
+
metadata:
|
|
485
|
+
type: object
|
|
486
|
+
properties:
|
|
487
|
+
name:
|
|
488
|
+
type: string
|
|
489
|
+
minLength: 1
|
|
490
|
+
version:
|
|
491
|
+
type: string
|
|
492
|
+
required:
|
|
493
|
+
- name
|
|
494
|
+
- version
|
|
495
|
+
spec:
|
|
496
|
+
type: object
|
|
497
|
+
properties:
|
|
498
|
+
routeId:
|
|
499
|
+
type: string
|
|
500
|
+
description: The route from MFT (This is where the file is coming from and going to)
|
|
501
|
+
filterId:
|
|
502
|
+
type: string
|
|
503
|
+
description: The filter which is processing this file (Each route will have a filter per file)
|
|
504
|
+
validatedBy:
|
|
505
|
+
type: object
|
|
506
|
+
properties:
|
|
507
|
+
name:
|
|
508
|
+
type: string
|
|
509
|
+
description: Name of the person who approved this SLA. Not enforced right now
|
|
510
|
+
validatedAt:
|
|
511
|
+
type: string
|
|
512
|
+
format: date-time
|
|
513
|
+
required:
|
|
514
|
+
- name
|
|
515
|
+
- validatedAt
|
|
516
|
+
sourceSLA:
|
|
517
|
+
type: object
|
|
518
|
+
description: |
|
|
519
|
+
The downstream SLA specifies when a file must arrive at VGS.
|
|
520
|
+
|
|
521
|
+
This time is not within VGS control but is used to communicate to customers and VGS staff if a file arrived on time. This is used to help identify violations by the party making the file available to VGS for processing so that it’s possible to identify third party violations that may cause VGS to dleiver files to customers later than expected.
|
|
522
|
+
|
|
523
|
+
Customers should expect files to arrive at their destination server before or at the source SLA time plus the absolute SLA time (or in the case of the relative SLA in the amount of time processing takes).
|
|
524
|
+
properties:
|
|
525
|
+
expectedFileArrivalCron:
|
|
526
|
+
type: string
|
|
527
|
+
required:
|
|
528
|
+
- expectedFileArrivalCron
|
|
529
|
+
absoluteSLA:
|
|
530
|
+
type: object
|
|
531
|
+
description: |
|
|
532
|
+
An absolute SLA provides absolute, fixed numbers for SLA data. This is specified in terms of a duration and, since handling time is dependent on size and complexity of the file, is also complemented with a maximum size of file and/or a maximum number of records within a file.
|
|
533
|
+
|
|
534
|
+
If the file being processed exceeds the size or number of records then a warning is thrown during processing and the file is no longer eligible to be scored against by the SLA.
|
|
535
|
+
properties:
|
|
536
|
+
handingDuration:
|
|
537
|
+
type: string
|
|
538
|
+
format: duration
|
|
539
|
+
maximumSizeBytes:
|
|
540
|
+
type: integer
|
|
541
|
+
minValue: 1
|
|
542
|
+
maximumSizeRecords:
|
|
543
|
+
type: integer
|
|
544
|
+
minValue: 1
|
|
545
|
+
required:
|
|
546
|
+
- handingDuration
|
|
547
|
+
- maximumSizeBytes
|
|
548
|
+
- maximumSizeRecords
|
|
549
|
+
relativeSLA:
|
|
550
|
+
type: object
|
|
551
|
+
description: |
|
|
552
|
+
When an absolute SLA is not useful (for instance when a file may grow over time in an unbounded manner) then customers can specify a relative SLA. A relative SLA is specified in terms of bytes handled per minute and/or records processed per minute.
|
|
553
|
+
properties:
|
|
554
|
+
bytesPerMinute:
|
|
555
|
+
type: integer
|
|
556
|
+
minValue: 1
|
|
557
|
+
recordsPerMinute:
|
|
558
|
+
type: integer
|
|
559
|
+
minValue: 1
|
|
560
|
+
required:
|
|
561
|
+
- bytesPerMinute
|
|
562
|
+
- recordsPerMinute
|
|
563
|
+
oneOf:
|
|
564
|
+
- required:
|
|
565
|
+
- routeId
|
|
566
|
+
- filterId
|
|
567
|
+
- validatedBy
|
|
568
|
+
- sourceSLA
|
|
569
|
+
- absoluteSLA
|
|
570
|
+
- required:
|
|
571
|
+
- routeId
|
|
572
|
+
- filterId
|
|
573
|
+
- validatedBy
|
|
574
|
+
- sourceSLA
|
|
575
|
+
- relativeSLA
|
|
576
|
+
required:
|
|
577
|
+
- apiVersion
|
|
578
|
+
- kind
|
|
579
|
+
- metadata
|
|
580
|
+
- spec
|
|
581
|
+
---
|
|
582
|
+
"$schema": https://json-schema.org/draft/2020-12/schema
|
|
583
|
+
"$id": https://vgs.io/docs/product.schema.json
|
|
584
|
+
title: HTTP Route
|
|
585
|
+
description: All VGS resources in one handy place
|
|
586
|
+
type: object
|
|
587
|
+
properties:
|
|
588
|
+
apiVersion:
|
|
589
|
+
type: string
|
|
590
|
+
enum:
|
|
591
|
+
- vault.vgs.io/v1
|
|
592
|
+
kind:
|
|
593
|
+
type: string
|
|
594
|
+
enum:
|
|
595
|
+
- HttpRoute
|
|
596
|
+
spec:
|
|
597
|
+
type: object
|
|
598
|
+
"$ref": "#/definitions/HttpRoute"
|
|
599
|
+
metadata:
|
|
600
|
+
type: object
|
|
601
|
+
properties:
|
|
602
|
+
name:
|
|
603
|
+
type: string
|
|
604
|
+
required: [name]
|
|
605
|
+
# required: [apiVersion, kind, spec, metadata]
|
|
606
|
+
definitions:
|
|
607
|
+
HttpRoute:
|
|
608
|
+
type: object
|
|
609
|
+
properties:
|
|
610
|
+
id:
|
|
611
|
+
type: string
|
|
612
|
+
type:
|
|
613
|
+
type: string
|
|
614
|
+
enum: [rule_chain]
|
|
615
|
+
attributes:
|
|
616
|
+
type: object
|
|
617
|
+
required: [id, type, attributes]
|
|
618
|
+
additionalProperties: true
|
|
619
|
+
---
|
|
620
|
+
"$schema": https://json-schema.org/draft/2020-12/schema
|
|
621
|
+
"$id": https://vgs.io/docs/product.schema.json
|
|
622
|
+
title: MFT Cluster
|
|
623
|
+
description: All VGS resources in one handy place
|
|
624
|
+
type: object
|
|
625
|
+
properties:
|
|
626
|
+
apiVersion:
|
|
627
|
+
type: string
|
|
628
|
+
enum:
|
|
629
|
+
- mft.vgs.io/v1beta
|
|
630
|
+
kind:
|
|
631
|
+
type: string
|
|
632
|
+
enum:
|
|
633
|
+
- MftCluster
|
|
634
|
+
spec:
|
|
635
|
+
type: object
|
|
636
|
+
"$ref": "#/definitions/MftCluster"
|
|
637
|
+
metadata:
|
|
638
|
+
type: object
|
|
639
|
+
properties:
|
|
640
|
+
name:
|
|
641
|
+
type: string
|
|
642
|
+
required: [name]
|
|
643
|
+
definitions:
|
|
644
|
+
MftCluster:
|
|
645
|
+
type: object
|
|
646
|
+
properties:
|
|
647
|
+
size:
|
|
648
|
+
type: string
|
|
649
|
+
description: Size of the MFT cluster
|
|
650
|
+
enum: [small, medium, large, xlarge, 2xlarge]
|
|
651
|
+
default: small
|
|
652
|
+
vaultId:
|
|
653
|
+
type: string
|
|
654
|
+
description: Vault Identifier
|
|
655
|
+
pattern: ^tnt.*$
|
|
656
|
+
environment:
|
|
657
|
+
type: string
|
|
658
|
+
enum: [dev/vault/sandbox, prod/vault/sandbox, prod/vault/live]
|
|
659
|
+
default: dev/vault/sandbox
|
|
660
|
+
kmsKeys:
|
|
661
|
+
type: array
|
|
662
|
+
description: Additional KMS keys that should be accessible to encrypt and decrypt for the MFT runtime
|
|
663
|
+
default: []
|
|
664
|
+
items:
|
|
665
|
+
type: string
|
|
666
|
+
pattern: "^arn:aws:kms:[a-z0-9-]+:[0-9]{12}:key/[a-f0-9-]+$"
|
|
667
|
+
s3Buckets:
|
|
668
|
+
type: array
|
|
669
|
+
default: []
|
|
670
|
+
description: Additional S3 buckets that should be CRUD accessible by the MFT platform. This is a list of objects containing the bucket ARN and associated path prefixes that should only be accessible. S3 prefixes should not begin with a `/`."
|
|
671
|
+
items:
|
|
672
|
+
type: object
|
|
673
|
+
properties:
|
|
674
|
+
# TODO: the naming is off because we pass this directly to tf and this is how tf names it.
|
|
675
|
+
bucket_arn:
|
|
676
|
+
type: string
|
|
677
|
+
description: "The ARN of the bucket."
|
|
678
|
+
example: "arn:aws:s3:::example-bucket"
|
|
679
|
+
pattern: "^arn:aws:s3:::[a-zA-Z0-9.-]{3,63}$"
|
|
680
|
+
prefixes:
|
|
681
|
+
type: array
|
|
682
|
+
items:
|
|
683
|
+
type: string
|
|
684
|
+
pattern: "^[^/].*$"
|
|
685
|
+
description: "List of prefixes within the bucket."
|
|
686
|
+
iamRoles:
|
|
687
|
+
type: array
|
|
688
|
+
description: Additional IAM roles that the MWAA role will be able to assume during processing
|
|
689
|
+
default: []
|
|
690
|
+
items:
|
|
691
|
+
type: string
|
|
692
|
+
pattern: "^arn:aws:iam::[0-9]{12}:role/[A-Za-z0-9+=,.@_-]{1,64}$"
|
|
693
|
+
computePlatform:
|
|
694
|
+
type: string
|
|
695
|
+
enum: ["kubernetes", "native"]
|
|
696
|
+
default: "kubernetes"
|
|
697
|
+
mwaaSchedulerCount:
|
|
698
|
+
type: integer
|
|
699
|
+
default: 2
|
|
700
|
+
minimum: 1
|
|
701
|
+
mwaaMinWorkerCount:
|
|
702
|
+
type: integer
|
|
703
|
+
default: 1
|
|
704
|
+
minimum: 1
|
|
705
|
+
mwaaMaxWorkerCount:
|
|
706
|
+
type: integer
|
|
707
|
+
minimum: 1
|
|
708
|
+
maximum: 25
|
|
709
|
+
default: 10
|
|
710
|
+
required: [vaultId]
|