@itentialopensource/adapter-aws_lambda 0.1.1

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.
Files changed (77) hide show
  1. package/.eslintignore +6 -0
  2. package/.eslintrc.js +19 -0
  3. package/.gitlab/.gitkeep +0 -0
  4. package/.gitlab/issue_templates/.gitkeep +0 -0
  5. package/.gitlab/issue_templates/Default.md +17 -0
  6. package/.gitlab/issue_templates/bugReportTemplate.md +76 -0
  7. package/.gitlab/issue_templates/featureRequestTemplate.md +14 -0
  8. package/.jshintrc +0 -0
  9. package/AUTH.md +39 -0
  10. package/BROKER.md +211 -0
  11. package/CALLS.md +603 -0
  12. package/CODE_OF_CONDUCT.md +43 -0
  13. package/CONTRIBUTING.md +13 -0
  14. package/ENHANCE.md +69 -0
  15. package/LICENSE +201 -0
  16. package/PROPERTIES.md +661 -0
  17. package/README.md +344 -0
  18. package/SUMMARY.md +9 -0
  19. package/SYSTEMINFO.md +14 -0
  20. package/TROUBLESHOOT.md +56 -0
  21. package/UTILITIES.md +473 -0
  22. package/adapter.js +8845 -0
  23. package/adapterBase.js +1488 -0
  24. package/entities/.generic/action.json +214 -0
  25. package/entities/.generic/schema.json +28 -0
  26. package/entities/.system/action.json +50 -0
  27. package/entities/.system/mockdatafiles/getToken-default.json +3 -0
  28. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  29. package/entities/.system/schema.json +19 -0
  30. package/entities/.system/schemaTokenReq.json +53 -0
  31. package/entities/.system/schemaTokenResp.json +53 -0
  32. package/entities/AccountSettings/action.json +25 -0
  33. package/entities/AccountSettings/schema.json +19 -0
  34. package/entities/CodeSigningConfigs/action.json +127 -0
  35. package/entities/CodeSigningConfigs/schema.json +57 -0
  36. package/entities/EventSourceMappings/action.json +106 -0
  37. package/entities/EventSourceMappings/schema.json +78 -0
  38. package/entities/Functions/action.json +860 -0
  39. package/entities/Functions/schema.json +170 -0
  40. package/entities/Layers/action.json +189 -0
  41. package/entities/Layers/schema.json +126 -0
  42. package/entities/Tags/action.json +65 -0
  43. package/entities/Tags/schema.json +32 -0
  44. package/error.json +190 -0
  45. package/metadata.json +58 -0
  46. package/package.json +77 -0
  47. package/pronghorn.json +4833 -0
  48. package/propertiesDecorators.json +14 -0
  49. package/propertiesSchema.json +1635 -0
  50. package/report/AWS Lambda-swagger.fixed.json +15883 -0
  51. package/report/adapterInfo.json +10 -0
  52. package/report/creationReport.json +615 -0
  53. package/sampleProperties.json +274 -0
  54. package/test/integration/adapterTestBasicGet.js +117 -0
  55. package/test/integration/adapterTestConnectivity.js +117 -0
  56. package/test/integration/adapterTestIntegration.js +2103 -0
  57. package/test/unit/adapterBaseTestUnit.js +1626 -0
  58. package/test/unit/adapterTestUnit.js +3942 -0
  59. package/utils/adapterInfo.js +156 -0
  60. package/utils/argParser.js +44 -0
  61. package/utils/checkMigrate.js +102 -0
  62. package/utils/entitiesToDB.js +190 -0
  63. package/utils/findPath.js +74 -0
  64. package/utils/logger.js +26 -0
  65. package/utils/methodDocumentor.js +273 -0
  66. package/utils/modify.js +153 -0
  67. package/utils/mongoDbConnection.js +79 -0
  68. package/utils/mongoUtils.js +162 -0
  69. package/utils/pre-commit.sh +32 -0
  70. package/utils/removeHooks.js +20 -0
  71. package/utils/setup.js +33 -0
  72. package/utils/taskMover.js +308 -0
  73. package/utils/tbScript.js +103 -0
  74. package/utils/tbUtils.js +347 -0
  75. package/utils/testRunner.js +298 -0
  76. package/utils/troubleshootingAdapter.js +177 -0
  77. package/utils/updateAdapterConfig.js +158 -0
@@ -0,0 +1,170 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": true,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "addPermission",
12
+ "enum": [
13
+ "addPermission",
14
+ "getPolicy",
15
+ "createAlias",
16
+ "listAliases",
17
+ "createFunction",
18
+ "createFunctionUrlConfig",
19
+ "deleteFunctionUrlConfig",
20
+ "getFunctionUrlConfig",
21
+ "updateFunctionUrlConfig",
22
+ "deleteAlias",
23
+ "getAlias",
24
+ "updateAlias",
25
+ "deleteFunction",
26
+ "getFunction",
27
+ "deleteFunctionCodeSigningConfig",
28
+ "getFunctionCodeSigningConfig",
29
+ "putFunctionCodeSigningConfig",
30
+ "deleteFunctionConcurrency",
31
+ "putFunctionConcurrency",
32
+ "deleteFunctionEventInvokeConfig",
33
+ "getFunctionEventInvokeConfig",
34
+ "putFunctionEventInvokeConfig",
35
+ "updateFunctionEventInvokeConfig",
36
+ "deleteProvisionedConcurrencyConfig",
37
+ "getProvisionedConcurrencyConfig",
38
+ "putProvisionedConcurrencyConfig",
39
+ "getFunctionConcurrency",
40
+ "getFunctionConfiguration",
41
+ "updateFunctionConfiguration",
42
+ "getRuntimeManagementConfig",
43
+ "putRuntimeManagementConfig",
44
+ "invoke",
45
+ "invokeAsync",
46
+ "invokeWithResponseStream",
47
+ "listFunctionEventInvokeConfigs",
48
+ "listFunctionUrlConfigs",
49
+ "listFunctions",
50
+ "listProvisionedConcurrencyConfigs",
51
+ "listVersionsByFunction",
52
+ "publishVersion",
53
+ "removePermission",
54
+ "updateFunctionCode"
55
+ ],
56
+ "external_name": "ph_request_type"
57
+ },
58
+ "functionName": {
59
+ "type": "string",
60
+ "description": "The name of the Lambda function. Name formats Function name – my-function . Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-fu...(description truncated)",
61
+ "parse": false,
62
+ "encode": false,
63
+ "encrypt": {
64
+ "type": "AES",
65
+ "key": ""
66
+ },
67
+ "external_name": "FunctionName"
68
+ },
69
+ "qualifier": {
70
+ "type": "string",
71
+ "description": "Specify a version or alias to remove permissions from a published version of the function.",
72
+ "parse": false,
73
+ "encode": false,
74
+ "encrypt": {
75
+ "type": "AES",
76
+ "key": ""
77
+ },
78
+ "external_name": "Qualifier"
79
+ },
80
+ "functionVersion": {
81
+ "type": "string",
82
+ "description": "Set to ALL to include entries for all published versions of each function.",
83
+ "parse": false,
84
+ "encode": false,
85
+ "encrypt": {
86
+ "type": "AES",
87
+ "key": ""
88
+ },
89
+ "external_name": "FunctionVersion"
90
+ },
91
+ "marker": {
92
+ "type": "string",
93
+ "description": "Specify the pagination token that's returned by a previous request to retrieve the next page of results.",
94
+ "parse": false,
95
+ "encode": false,
96
+ "encrypt": {
97
+ "type": "AES",
98
+ "key": ""
99
+ },
100
+ "external_name": "Marker"
101
+ },
102
+ "maxItems": {
103
+ "type": "number",
104
+ "description": "The maximum number of versions to return. Note that ListVersionsByFunction returns a maximum of 50 items in each response, even if you set the number higher.",
105
+ "parse": false,
106
+ "encode": false,
107
+ "encrypt": {
108
+ "type": "AES",
109
+ "key": ""
110
+ },
111
+ "external_name": "MaxItems"
112
+ },
113
+ "name": {
114
+ "type": "string",
115
+ "description": "The name of the alias.",
116
+ "parse": false,
117
+ "encode": false,
118
+ "encrypt": {
119
+ "type": "AES",
120
+ "key": ""
121
+ },
122
+ "external_name": "Name"
123
+ },
124
+ "masterRegion": {
125
+ "type": "string",
126
+ "description": "For Lambda@Edge functions, the Amazon Web Services Region of the master function. For example, us-east-1 filters the list of functions to include only Lambda@Edge funct...(description truncated)",
127
+ "parse": false,
128
+ "encode": false,
129
+ "encrypt": {
130
+ "type": "AES",
131
+ "key": ""
132
+ },
133
+ "external_name": "MasterRegion"
134
+ },
135
+ "list": {
136
+ "type": "string",
137
+ "description": "",
138
+ "parse": false,
139
+ "encode": false,
140
+ "encrypt": {
141
+ "type": "AES",
142
+ "key": ""
143
+ },
144
+ "external_name": "List"
145
+ },
146
+ "statementId": {
147
+ "type": "string",
148
+ "description": "Statement ID of the permission to remove.",
149
+ "parse": false,
150
+ "encode": false,
151
+ "encrypt": {
152
+ "type": "AES",
153
+ "key": ""
154
+ },
155
+ "external_name": "StatementId"
156
+ },
157
+ "revisionId": {
158
+ "type": "string",
159
+ "description": "Update the policy only if the revision ID matches the ID that's specified. Use this option to avoid modifying a policy that has changed since you last read it.",
160
+ "parse": false,
161
+ "encode": false,
162
+ "encrypt": {
163
+ "type": "AES",
164
+ "key": ""
165
+ },
166
+ "external_name": "RevisionId"
167
+ }
168
+ },
169
+ "definitions": {}
170
+ }
@@ -0,0 +1,189 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "addLayerVersionPermission",
5
+ "protocol": "REST",
6
+ "method": "POST",
7
+ "entitypath": "{base_path}/{version}/2018-10-31/layers/{pathv1}/versions/{pathv2}/policy?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "requestDatatype": "JSON",
13
+ "responseDatatype": "JSON",
14
+ "headers": {},
15
+ "responseObjects": [
16
+ {
17
+ "type": "default",
18
+ "key": "",
19
+ "mockFile": ""
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "name": "getLayerVersionPolicy",
25
+ "protocol": "REST",
26
+ "method": "GET",
27
+ "entitypath": "{base_path}/{version}/2018-10-31/layers/{pathv1}/versions/{pathv2}/policy?{query}",
28
+ "requestSchema": "schema.json",
29
+ "responseSchema": "schema.json",
30
+ "timeout": 0,
31
+ "sendEmpty": false,
32
+ "sendGetBody": false,
33
+ "requestDatatype": "JSON",
34
+ "responseDatatype": "JSON",
35
+ "headers": {},
36
+ "responseObjects": [
37
+ {
38
+ "type": "default",
39
+ "key": "",
40
+ "mockFile": ""
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "deleteLayerVersion",
46
+ "protocol": "REST",
47
+ "method": "DELETE",
48
+ "entitypath": "{base_path}/{version}/2018-10-31/layers/{pathv1}/versions/{pathv2}?{query}",
49
+ "requestSchema": "schema.json",
50
+ "responseSchema": "schema.json",
51
+ "timeout": 0,
52
+ "sendEmpty": false,
53
+ "requestDatatype": "JSON",
54
+ "responseDatatype": "JSON",
55
+ "headers": {},
56
+ "responseObjects": [
57
+ {
58
+ "type": "default",
59
+ "key": "",
60
+ "mockFile": ""
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "name": "getLayerVersion",
66
+ "protocol": "REST",
67
+ "method": "GET",
68
+ "entitypath": "{base_path}/{version}/2018-10-31/layers/{pathv1}/versions/{pathv2}?{query}",
69
+ "requestSchema": "schema.json",
70
+ "responseSchema": "schema.json",
71
+ "timeout": 0,
72
+ "sendEmpty": false,
73
+ "sendGetBody": false,
74
+ "requestDatatype": "JSON",
75
+ "responseDatatype": "JSON",
76
+ "headers": {},
77
+ "responseObjects": [
78
+ {
79
+ "type": "default",
80
+ "key": "",
81
+ "mockFile": ""
82
+ }
83
+ ]
84
+ },
85
+ {
86
+ "name": "getLayerVersionByArn",
87
+ "protocol": "REST",
88
+ "method": "GET",
89
+ "entitypath": "{base_path}/{version}/2018-10-31/layers?{query}",
90
+ "requestSchema": "schema.json",
91
+ "responseSchema": "schema.json",
92
+ "timeout": 0,
93
+ "sendEmpty": false,
94
+ "sendGetBody": false,
95
+ "requestDatatype": "JSON",
96
+ "responseDatatype": "JSON",
97
+ "headers": {},
98
+ "responseObjects": [
99
+ {
100
+ "type": "default",
101
+ "key": "",
102
+ "mockFile": ""
103
+ }
104
+ ]
105
+ },
106
+ {
107
+ "name": "listLayerVersions",
108
+ "protocol": "REST",
109
+ "method": "GET",
110
+ "entitypath": "{base_path}/{version}/2018-10-31/layers/{pathv1}/versions?{query}",
111
+ "requestSchema": "schema.json",
112
+ "responseSchema": "schema.json",
113
+ "timeout": 0,
114
+ "sendEmpty": false,
115
+ "sendGetBody": false,
116
+ "requestDatatype": "JSON",
117
+ "responseDatatype": "JSON",
118
+ "headers": {},
119
+ "responseObjects": [
120
+ {
121
+ "type": "default",
122
+ "key": "",
123
+ "mockFile": ""
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "name": "publishLayerVersion",
129
+ "protocol": "REST",
130
+ "method": "POST",
131
+ "entitypath": "{base_path}/{version}/2018-10-31/layers/{pathv1}/versions?{query}",
132
+ "requestSchema": "schema.json",
133
+ "responseSchema": "schema.json",
134
+ "timeout": 0,
135
+ "sendEmpty": false,
136
+ "requestDatatype": "JSON",
137
+ "responseDatatype": "JSON",
138
+ "headers": {},
139
+ "responseObjects": [
140
+ {
141
+ "type": "default",
142
+ "key": "",
143
+ "mockFile": ""
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "name": "listLayers",
149
+ "protocol": "REST",
150
+ "method": "GET",
151
+ "entitypath": "{base_path}/{version}/2018-10-31/layers?{query}",
152
+ "requestSchema": "schema.json",
153
+ "responseSchema": "schema.json",
154
+ "timeout": 0,
155
+ "sendEmpty": false,
156
+ "sendGetBody": false,
157
+ "requestDatatype": "JSON",
158
+ "responseDatatype": "JSON",
159
+ "headers": {},
160
+ "responseObjects": [
161
+ {
162
+ "type": "default",
163
+ "key": "",
164
+ "mockFile": ""
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ "name": "removeLayerVersionPermission",
170
+ "protocol": "REST",
171
+ "method": "DELETE",
172
+ "entitypath": "{base_path}/{version}/2018-10-31/layers/{pathv1}/versions/{pathv2}/policy/{pathv3}?{query}",
173
+ "requestSchema": "schema.json",
174
+ "responseSchema": "schema.json",
175
+ "timeout": 0,
176
+ "sendEmpty": false,
177
+ "requestDatatype": "JSON",
178
+ "responseDatatype": "JSON",
179
+ "headers": {},
180
+ "responseObjects": [
181
+ {
182
+ "type": "default",
183
+ "key": "",
184
+ "mockFile": ""
185
+ }
186
+ ]
187
+ }
188
+ ]
189
+ }
@@ -0,0 +1,126 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": true,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "addLayerVersionPermission",
12
+ "enum": [
13
+ "addLayerVersionPermission",
14
+ "getLayerVersionPolicy",
15
+ "deleteLayerVersion",
16
+ "getLayerVersion",
17
+ "getLayerVersionByArn",
18
+ "listLayerVersions",
19
+ "publishLayerVersion",
20
+ "listLayers",
21
+ "removeLayerVersionPermission"
22
+ ],
23
+ "external_name": "ph_request_type"
24
+ },
25
+ "layerName": {
26
+ "type": "string",
27
+ "description": "The name or Amazon Resource Name (ARN) of the layer.",
28
+ "parse": false,
29
+ "encode": false,
30
+ "encrypt": {
31
+ "type": "AES",
32
+ "key": ""
33
+ },
34
+ "external_name": "LayerName"
35
+ },
36
+ "versionNumber": {
37
+ "type": "number",
38
+ "description": "The version number.",
39
+ "parse": false,
40
+ "encode": false,
41
+ "encrypt": {
42
+ "type": "AES",
43
+ "key": ""
44
+ },
45
+ "external_name": "VersionNumber"
46
+ },
47
+ "revisionId": {
48
+ "type": "string",
49
+ "description": "Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it.",
50
+ "parse": false,
51
+ "encode": false,
52
+ "encrypt": {
53
+ "type": "AES",
54
+ "key": ""
55
+ },
56
+ "external_name": "RevisionId"
57
+ },
58
+ "arn": {
59
+ "type": "string",
60
+ "description": "The ARN of the layer version.",
61
+ "parse": false,
62
+ "encode": false,
63
+ "encrypt": {
64
+ "type": "AES",
65
+ "key": ""
66
+ },
67
+ "external_name": "Arn"
68
+ },
69
+ "compatibleRuntime": {
70
+ "type": "string",
71
+ "description": "A runtime identifier. For example, go1.x .",
72
+ "parse": false,
73
+ "encode": false,
74
+ "encrypt": {
75
+ "type": "AES",
76
+ "key": ""
77
+ },
78
+ "external_name": "CompatibleRuntime"
79
+ },
80
+ "marker": {
81
+ "type": "string",
82
+ "description": "A pagination token returned by a previous call.",
83
+ "parse": false,
84
+ "encode": false,
85
+ "encrypt": {
86
+ "type": "AES",
87
+ "key": ""
88
+ },
89
+ "external_name": "Marker"
90
+ },
91
+ "maxItems": {
92
+ "type": "number",
93
+ "description": "The maximum number of layers to return.",
94
+ "parse": false,
95
+ "encode": false,
96
+ "encrypt": {
97
+ "type": "AES",
98
+ "key": ""
99
+ },
100
+ "external_name": "MaxItems"
101
+ },
102
+ "compatibleArchitecture": {
103
+ "type": "string",
104
+ "description": "The compatible instruction set architecture .",
105
+ "parse": false,
106
+ "encode": false,
107
+ "encrypt": {
108
+ "type": "AES",
109
+ "key": ""
110
+ },
111
+ "external_name": "CompatibleArchitecture"
112
+ },
113
+ "statementId": {
114
+ "type": "string",
115
+ "description": "The identifier that was specified when the statement was added.",
116
+ "parse": false,
117
+ "encode": false,
118
+ "encrypt": {
119
+ "type": "AES",
120
+ "key": ""
121
+ },
122
+ "external_name": "StatementId"
123
+ }
124
+ },
125
+ "definitions": {}
126
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "actions": [
3
+ {
4
+ "name": "listTags",
5
+ "protocol": "REST",
6
+ "method": "GET",
7
+ "entitypath": "{base_path}/{version}/2017-03-31/tags/{pathv1}?{query}",
8
+ "requestSchema": "schema.json",
9
+ "responseSchema": "schema.json",
10
+ "timeout": 0,
11
+ "sendEmpty": false,
12
+ "sendGetBody": false,
13
+ "requestDatatype": "JSON",
14
+ "responseDatatype": "JSON",
15
+ "headers": {},
16
+ "responseObjects": [
17
+ {
18
+ "type": "default",
19
+ "key": "",
20
+ "mockFile": ""
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "tagResource",
26
+ "protocol": "REST",
27
+ "method": "POST",
28
+ "entitypath": "{base_path}/{version}/2017-03-31/tags/{pathv1}?{query}",
29
+ "requestSchema": "schema.json",
30
+ "responseSchema": "schema.json",
31
+ "timeout": 0,
32
+ "sendEmpty": false,
33
+ "requestDatatype": "JSON",
34
+ "responseDatatype": "JSON",
35
+ "headers": {},
36
+ "responseObjects": [
37
+ {
38
+ "type": "default",
39
+ "key": "",
40
+ "mockFile": ""
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "untagResource",
46
+ "protocol": "REST",
47
+ "method": "DELETE",
48
+ "entitypath": "{base_path}/{version}/2017-03-31/tags/{pathv1}?{query}",
49
+ "requestSchema": "schema.json",
50
+ "responseSchema": "schema.json",
51
+ "timeout": 0,
52
+ "sendEmpty": false,
53
+ "requestDatatype": "JSON",
54
+ "responseDatatype": "JSON",
55
+ "headers": {},
56
+ "responseObjects": [
57
+ {
58
+ "type": "default",
59
+ "key": "",
60
+ "mockFile": ""
61
+ }
62
+ ]
63
+ }
64
+ ]
65
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$id": "schema.json",
3
+ "type": "object",
4
+ "schema": "http://json-schema.org/draft-07/schema#",
5
+ "translate": true,
6
+ "dynamicfields": true,
7
+ "properties": {
8
+ "ph_request_type": {
9
+ "type": "string",
10
+ "description": "type of request (internal to adapter)",
11
+ "default": "listTags",
12
+ "enum": [
13
+ "listTags",
14
+ "tagResource",
15
+ "untagResource"
16
+ ],
17
+ "external_name": "ph_request_type"
18
+ },
19
+ "aRN": {
20
+ "type": "string",
21
+ "description": "The function's Amazon Resource Name (ARN).",
22
+ "parse": false,
23
+ "encode": false,
24
+ "encrypt": {
25
+ "type": "AES",
26
+ "key": ""
27
+ },
28
+ "external_name": "ARN"
29
+ }
30
+ },
31
+ "definitions": {}
32
+ }