-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.awssdk.json
More file actions
77 lines (77 loc) · 3.52 KB
/
app.awssdk.json
File metadata and controls
77 lines (77 loc) · 3.52 KB
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
{
"version": "0.1.0",
"appName": "awssdk",
"description": "AWS SDK Boiling Data Source App",
"templateType": "json-templates",
"templateVersion": "1.0.0",
"funcTemplate": "async ({ S3, Glue, Lambda }) => { const results = []; let ContinuationToken = \"\"; let NextToken = \"\"; let params = {{params}}; while (ContinuationToken != undefined || NextToken != undefined) { if (\"{{service}}\" === \"S3\") {NextToken = undefined; if (ContinuationToken != \"\") params.ContinuationToken = ContinuationToken; const batch = await {{service}}.{{apicall}}(params).promise(); ContinuationToken = batch.ContinuationToken; results.push(...batch{{resultPath}}); } else { ContinuationToken = undefined; if (NextToken != \"\") params.NextToken = NextToken; const batch = await {{service}}.{{apicall}}(params).promise(); NextToken = batch.NextToken; results.push(...batch{{resultPath}}); } } return results; };",
"parameters": [
{
"name": "service",
"description": "AWS Service to use: S3, Glue, or Lambda"
},
{
"name": "apicall",
"description": "SDK method to call, like \"listObjectsV2\""
},
{
"name": "params",
"description": "What parameters to pass to the method call, like \"{\"Bucket\":\"boilingdata-demo\",\"Delimiter\":\"/\"}\""
},
{
"name": "resultPath",
"description": "What part to pick up from the AWS JSON resopnse (e.g. \".Contents\"). The response must be an array of objects."
}
],
"aliases": [
{
"aliasTableName": "allBuckets",
"parameters": ["S3", "listBuckets", "", ".Buckets"],
"description": "Table that contains all S3 Buckets listing"
},
{
"aliasTableName": "demoBucketRootListing",
"fixedParameters": ["S3", "listObjectsV2", "{\"Bucket\":\"boilingdata-demo\",\"Delimiter\":\"/\"}", ".Contents"],
"description": "Table that contains the listing of boilingdata-demo S3 bucket, root folder only"
},
{
"aliasTableName": "demoBucketRecursiveListing",
"fixedParameters": ["S3", "listObjectsV2", "{\"Bucket\":\"boilingdata-demo\"}", ".Contents"],
"description": "Table that contains a recursive listing of boilingdata-demo S3 bucket"
},
{
"aliasTableName": "bucketRecursiveListing",
"fixedParameters": ["S3", "listObjectsV2", "{\"Bucket\":\"{{bucket}}\"}", ".Contents"],
"parameters": [{ "name": "bucket" }],
"description": "Table that contains a recursive listing of a given S3 bucket"
},
{
"aliasTableName": "bucketRootListing",
"fixedParameters": ["S3", "listObjectsV2", "{\"Bucket\":\"{{bucket}}\",\"Delimiter\":\"/\"}", ".Contents"],
"parameters": [{ "name": "bucket" }],
"description": "Table that contains a root listing of a given S3 bucket"
},
{
"aliasTableName": "bucketRecursiveListingWithDelimiter",
"fixedParameters": [
"S3",
"listObjectsV2",
"{\"Bucket\":\"{{bucket}}\",\"Delimiter\":\"{{delimiter}}\"}",
".Contents"
],
"parameters": [{ "name": "bucket" }, { "name": "delimiter" }],
"description": "Table that contains recursive listing of a given S3 bucket and with given delimiter"
},
{
"aliasTableName": "gluePartitions",
"fixedParameters": [
"Glue",
"getPartitions",
"{\"DatabaseName\":\"{{database}}\",\"TableName\":\"{{table}}\"}",
".Partitions"
],
"parameters": [{ "name": "database" }, { "name": "table" }],
"description": "Table that contains partitions for <database>.<table> Glue Table"
}
]
}