@cumulus/aws-client 9.7.1 → 9.9.2
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.
- package/CloudFormation.js +10 -7
- package/CloudFormationGateway.js +2 -2
- package/CloudwatchEvents.js +8 -4
- package/DynamoDb.js +12 -11
- package/DynamoDbSearchQueue.d.ts +2 -2
- package/DynamoDbSearchQueue.js +1 -1
- package/KMS.js +8 -5
- package/Kinesis.js +3 -2
- package/Lambda.js +4 -3
- package/README.md +245 -237
- package/S3.d.ts +2 -2
- package/S3.js +111 -76
- package/S3ListObjectsV2Queue.js +1 -1
- package/S3ObjectStore.js +5 -5
- package/SNS.js +3 -2
- package/SQS.d.ts +6 -3
- package/SQS.js +31 -23
- package/SecretsManager.js +2 -1
- package/StepFunctions.d.ts +3 -1
- package/StepFunctions.js +15 -12
- package/client.js +2 -2
- package/index.js +2 -1
- package/lib/S3MultipartUploads.js +11 -6
- package/package.json +5 -5
- package/services.js +1 -1
- package/test-utils.js +4 -2
- package/utils.js +8 -5
package/README.md
CHANGED
|
@@ -74,44 +74,44 @@ them all into memory at once. Handles paging of listS3ObjectsV2 requests.</p>
|
|
|
74
74
|
## CloudFormation
|
|
75
75
|
|
|
76
76
|
* [CloudFormation](#module_CloudFormation)
|
|
77
|
-
* [
|
|
78
|
-
* [
|
|
79
|
-
* [
|
|
77
|
+
* [~describeCfStack(StackName)](#module_CloudFormation..describeCfStack) ⇒ <code>Promise.<CloudFormation.Stack></code>
|
|
78
|
+
* [~describeCfStackResources(StackName)](#module_CloudFormation..describeCfStackResources) ⇒ <code>Promise.<CloudFormation.StackResources></code>
|
|
79
|
+
* [~getCfStackParameterValues(stackName, parameterKeys)](#module_CloudFormation..getCfStackParameterValues) ⇒ <code>Promise.<Object></code>
|
|
80
80
|
|
|
81
|
-
<a name="module_CloudFormation
|
|
81
|
+
<a name="module_CloudFormation..describeCfStack"></a>
|
|
82
82
|
|
|
83
|
-
### CloudFormation
|
|
83
|
+
### CloudFormation~describeCfStack(StackName) ⇒ <code>Promise.<CloudFormation.Stack></code>
|
|
84
84
|
Describes a given CloudFormation stack
|
|
85
85
|
|
|
86
86
|
See [CloudFormation.Stack](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudFormation.html#describeStacks-property)
|
|
87
87
|
|
|
88
|
-
**Kind**:
|
|
88
|
+
**Kind**: inner method of [<code>CloudFormation</code>](#module_CloudFormation)
|
|
89
89
|
**Returns**: <code>Promise.<CloudFormation.Stack></code> - The resources belonging to the stack
|
|
90
90
|
|
|
91
91
|
| Param | Type | Description |
|
|
92
92
|
| --- | --- | --- |
|
|
93
93
|
| StackName | <code>string</code> | The name of the CloudFormation stack to query |
|
|
94
94
|
|
|
95
|
-
<a name="module_CloudFormation
|
|
95
|
+
<a name="module_CloudFormation..describeCfStackResources"></a>
|
|
96
96
|
|
|
97
|
-
### CloudFormation
|
|
97
|
+
### CloudFormation~describeCfStackResources(StackName) ⇒ <code>Promise.<CloudFormation.StackResources></code>
|
|
98
98
|
Describes the resources belonging to a given CloudFormation stack
|
|
99
99
|
|
|
100
100
|
See [CloudFormation.StackResources](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudFormation.html#describeStackResources-property)
|
|
101
101
|
|
|
102
|
-
**Kind**:
|
|
102
|
+
**Kind**: inner method of [<code>CloudFormation</code>](#module_CloudFormation)
|
|
103
103
|
**Returns**: <code>Promise.<CloudFormation.StackResources></code> - The resources belonging to the stack
|
|
104
104
|
|
|
105
105
|
| Param | Type | Description |
|
|
106
106
|
| --- | --- | --- |
|
|
107
107
|
| StackName | <code>string</code> | The name of the CloudFormation stack to query |
|
|
108
108
|
|
|
109
|
-
<a name="module_CloudFormation
|
|
109
|
+
<a name="module_CloudFormation..getCfStackParameterValues"></a>
|
|
110
110
|
|
|
111
|
-
### CloudFormation
|
|
111
|
+
### CloudFormation~getCfStackParameterValues(stackName, parameterKeys) ⇒ <code>Promise.<Object></code>
|
|
112
112
|
Get parameter values for the given CloudFormation stack
|
|
113
113
|
|
|
114
|
-
**Kind**:
|
|
114
|
+
**Kind**: inner method of [<code>CloudFormation</code>](#module_CloudFormation)
|
|
115
115
|
**Returns**: <code>Promise.<Object></code> - Object keyed by parameter names
|
|
116
116
|
|
|
117
117
|
| Param | Type | Description |
|
|
@@ -122,12 +122,12 @@ Get parameter values for the given CloudFormation stack
|
|
|
122
122
|
<a name="module_CloudwatchEvents"></a>
|
|
123
123
|
|
|
124
124
|
## CloudwatchEvents
|
|
125
|
-
<a name="module_CloudwatchEvents
|
|
125
|
+
<a name="module_CloudwatchEvents..putEvent"></a>
|
|
126
126
|
|
|
127
|
-
### CloudwatchEvents
|
|
127
|
+
### CloudwatchEvents~putEvent(name, schedule, state, [description], [role]) ⇒ <code>Promise.<CloudWatchEvents.PutRuleResponse></code>
|
|
128
128
|
Create a CloudWatch Events rule
|
|
129
129
|
|
|
130
|
-
**Kind**:
|
|
130
|
+
**Kind**: inner method of [<code>CloudwatchEvents</code>](#module_CloudwatchEvents)
|
|
131
131
|
|
|
132
132
|
| Param | Type | Description |
|
|
133
133
|
| --- | --- | --- |
|
|
@@ -142,11 +142,13 @@ Create a CloudWatch Events rule
|
|
|
142
142
|
## DynamoDb
|
|
143
143
|
|
|
144
144
|
* [DynamoDb](#module_DynamoDb)
|
|
145
|
-
*
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
* _static_
|
|
146
|
+
* [.get](#module_DynamoDb.get) ⇒ <code>Promise.<Object></code>
|
|
147
|
+
* [.scan](#module_DynamoDb.scan) ⇒ <code>Promise.<Object></code>
|
|
148
|
+
* [.createAndWaitForDynamoDbTable(params)](#module_DynamoDb.createAndWaitForDynamoDbTable) ⇒ <code>Promise.<Object></code>
|
|
149
|
+
* [.deleteAndWaitForDynamoDbTableNotExists(params)](#module_DynamoDb.deleteAndWaitForDynamoDbTableNotExists) ⇒ <code>Promise</code>
|
|
150
|
+
* _inner_
|
|
151
|
+
* [~parallelScan(params)](#module_DynamoDb..parallelScan) ⇒ <code>Promise</code>
|
|
150
152
|
|
|
151
153
|
<a name="module_DynamoDb.get"></a>
|
|
152
154
|
|
|
@@ -184,25 +186,6 @@ for descriptions of `params` and the return data.
|
|
|
184
186
|
| --- | --- |
|
|
185
187
|
| params | <code>Object</code> |
|
|
186
188
|
|
|
187
|
-
<a name="module_DynamoDb.parallelScan"></a>
|
|
188
|
-
|
|
189
|
-
### DynamoDb.parallelScan(params) ⇒ <code>Promise</code>
|
|
190
|
-
Do a parallel scan of DynamoDB table using a document client.
|
|
191
|
-
|
|
192
|
-
See https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.ParallelScan.
|
|
193
|
-
See [DocumentClient.scan()](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#scan-property).
|
|
194
|
-
|
|
195
|
-
**Kind**: static method of [<code>DynamoDb</code>](#module_DynamoDb)
|
|
196
|
-
|
|
197
|
-
| Param | Type | Description |
|
|
198
|
-
| --- | --- | --- |
|
|
199
|
-
| params | <code>Object</code> | |
|
|
200
|
-
| params.totalSegments | <code>number</code> | Total number of segments to divide table into for parallel scanning |
|
|
201
|
-
| params.scanParams | <code>DocumentClient.ScanInput</code> | Params for the DynamoDB client scan operation See https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html |
|
|
202
|
-
| params.processItemsFunc | <code>function</code> | Function used to process returned items by scan |
|
|
203
|
-
| [params.dynamoDbClient] | <code>DocumentClient</code> | Instance of Dynamo DB document client |
|
|
204
|
-
| [params.retryOptions] | <code>pRetry.Options</code> | Retry options for scan operations |
|
|
205
|
-
|
|
206
189
|
<a name="module_DynamoDb.createAndWaitForDynamoDbTable"></a>
|
|
207
190
|
|
|
208
191
|
### DynamoDb.createAndWaitForDynamoDbTable(params) ⇒ <code>Promise.<Object></code>
|
|
@@ -226,35 +209,54 @@ Delete a DynamoDB table and then wait for the table to not exist
|
|
|
226
209
|
| --- | --- | --- |
|
|
227
210
|
| params | <code>Object</code> | the same params that you would pass to AWS.deleteTable See https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#deleteTable-property |
|
|
228
211
|
|
|
212
|
+
<a name="module_DynamoDb..parallelScan"></a>
|
|
213
|
+
|
|
214
|
+
### DynamoDb~parallelScan(params) ⇒ <code>Promise</code>
|
|
215
|
+
Do a parallel scan of DynamoDB table using a document client.
|
|
216
|
+
|
|
217
|
+
See https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.ParallelScan.
|
|
218
|
+
See [DocumentClient.scan()](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#scan-property).
|
|
219
|
+
|
|
220
|
+
**Kind**: inner method of [<code>DynamoDb</code>](#module_DynamoDb)
|
|
221
|
+
|
|
222
|
+
| Param | Type | Description |
|
|
223
|
+
| --- | --- | --- |
|
|
224
|
+
| params | <code>Object</code> | |
|
|
225
|
+
| params.totalSegments | <code>number</code> | Total number of segments to divide table into for parallel scanning |
|
|
226
|
+
| params.scanParams | <code>DocumentClient.ScanInput</code> | Params for the DynamoDB client scan operation See https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html |
|
|
227
|
+
| params.processItemsFunc | <code>function</code> | Function used to process returned items by scan |
|
|
228
|
+
| [params.dynamoDbClient] | <code>DocumentClient</code> | Instance of Dynamo DB document client |
|
|
229
|
+
| [params.retryOptions] | <code>pRetry.Options</code> | Retry options for scan operations |
|
|
230
|
+
|
|
229
231
|
<a name="module_KMS"></a>
|
|
230
232
|
|
|
231
233
|
## KMS
|
|
232
234
|
|
|
233
235
|
* [KMS](#module_KMS)
|
|
234
|
-
* [
|
|
235
|
-
* [
|
|
236
|
-
* [
|
|
236
|
+
* [~createKey(params)](#module_KMS..createKey) ⇒ <code>Promise.<Object></code>
|
|
237
|
+
* [~encrypt(KeyId, Plaintext)](#module_KMS..encrypt) ⇒ <code>Promise.<string></code>
|
|
238
|
+
* [~decryptBase64String(ciphertext)](#module_KMS..decryptBase64String) ⇒ <code>string</code>
|
|
237
239
|
|
|
238
|
-
<a name="module_KMS
|
|
240
|
+
<a name="module_KMS..createKey"></a>
|
|
239
241
|
|
|
240
|
-
### KMS
|
|
242
|
+
### KMS~createKey(params) ⇒ <code>Promise.<Object></code>
|
|
241
243
|
Create a KMS key
|
|
242
244
|
|
|
243
245
|
See https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/KMS.html#createKey-property
|
|
244
246
|
for allowed params and return value.
|
|
245
247
|
|
|
246
|
-
**Kind**:
|
|
248
|
+
**Kind**: inner method of [<code>KMS</code>](#module_KMS)
|
|
247
249
|
|
|
248
250
|
| Param | Type |
|
|
249
251
|
| --- | --- |
|
|
250
252
|
| params | <code>Object</code> |
|
|
251
253
|
|
|
252
|
-
<a name="module_KMS
|
|
254
|
+
<a name="module_KMS..encrypt"></a>
|
|
253
255
|
|
|
254
|
-
### KMS
|
|
256
|
+
### KMS~encrypt(KeyId, Plaintext) ⇒ <code>Promise.<string></code>
|
|
255
257
|
Encrypt a string using KMS
|
|
256
258
|
|
|
257
|
-
**Kind**:
|
|
259
|
+
**Kind**: inner method of [<code>KMS</code>](#module_KMS)
|
|
258
260
|
**Returns**: <code>Promise.<string></code> - the Base 64 encoding of the encrypted value
|
|
259
261
|
|
|
260
262
|
| Param | Type | Description |
|
|
@@ -262,12 +264,12 @@ Encrypt a string using KMS
|
|
|
262
264
|
| KeyId | <code>string</code> | the KMS key to use for encryption |
|
|
263
265
|
| Plaintext | <code>string</code> | the string to be encrypted |
|
|
264
266
|
|
|
265
|
-
<a name="module_KMS
|
|
267
|
+
<a name="module_KMS..decryptBase64String"></a>
|
|
266
268
|
|
|
267
|
-
### KMS
|
|
269
|
+
### KMS~decryptBase64String(ciphertext) ⇒ <code>string</code>
|
|
268
270
|
Decrypt a KMS-encrypted string, Base 64 encoded
|
|
269
271
|
|
|
270
|
-
**Kind**:
|
|
272
|
+
**Kind**: inner method of [<code>KMS</code>](#module_KMS)
|
|
271
273
|
**Returns**: <code>string</code> - the plaintext
|
|
272
274
|
|
|
273
275
|
| Param | Type | Description |
|
|
@@ -277,12 +279,12 @@ Decrypt a KMS-encrypted string, Base 64 encoded
|
|
|
277
279
|
<a name="module_Kinesis"></a>
|
|
278
280
|
|
|
279
281
|
## Kinesis
|
|
280
|
-
<a name="module_Kinesis
|
|
282
|
+
<a name="module_Kinesis..describeStream"></a>
|
|
281
283
|
|
|
282
|
-
### Kinesis
|
|
284
|
+
### Kinesis~describeStream(params, retryOptions) ⇒ <code>Promise.<Object></code>
|
|
283
285
|
Describe a Kinesis stream.
|
|
284
286
|
|
|
285
|
-
**Kind**:
|
|
287
|
+
**Kind**: inner method of [<code>Kinesis</code>](#module_Kinesis)
|
|
286
288
|
**Returns**: <code>Promise.<Object></code> - The stream description response
|
|
287
289
|
|
|
288
290
|
| Param | Type | Description |
|
|
@@ -301,54 +303,56 @@ Invoke a Lambda function
|
|
|
301
303
|
|
|
302
304
|
**Kind**: static method of [<code>Lambda</code>](#module_Lambda)
|
|
303
305
|
|
|
304
|
-
| Param | Type | Description |
|
|
305
|
-
| --- | --- | --- |
|
|
306
|
-
| name | <code>string</code> | Lambda function name |
|
|
307
|
-
| payload | <code>any</code> | the payload to the Lambda function |
|
|
308
|
-
| type | <code>string</code> | the invocation type |
|
|
306
|
+
| Param | Type | Default | Description |
|
|
307
|
+
| --- | --- | --- | --- |
|
|
308
|
+
| name | <code>string</code> | | Lambda function name |
|
|
309
|
+
| payload | <code>any</code> | | the payload to the Lambda function |
|
|
310
|
+
| type | <code>string</code> | <code>"Event"</code> | the invocation type |
|
|
309
311
|
|
|
310
312
|
<a name="module_S3"></a>
|
|
311
313
|
|
|
312
314
|
## S3
|
|
313
315
|
|
|
314
316
|
* [S3](#module_S3)
|
|
315
|
-
*
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
*
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
317
|
+
* _static_
|
|
318
|
+
* [.deleteS3Object](#module_S3.deleteS3Object)
|
|
319
|
+
* [.headObject](#module_S3.headObject) ⇒ <code>Promise</code>
|
|
320
|
+
* [.s3PutObject](#module_S3.s3PutObject)
|
|
321
|
+
* [.s3CopyObject](#module_S3.s3CopyObject) ⇒ <code>Promise</code>
|
|
322
|
+
* [.promiseS3Upload](#module_S3.promiseS3Upload) ⇒ <code>Promise</code>
|
|
323
|
+
* [.s3GetObjectTagging](#module_S3.s3GetObjectTagging) ⇒ <code>Promise.<AWS.S3.GetObjectTaggingOutput></code>
|
|
324
|
+
* [.s3PutObjectTagging](#module_S3.s3PutObjectTagging) ⇒ <code>Promise</code>
|
|
325
|
+
* ~~[.getS3Object](#module_S3.getS3Object) ⇒ <code>Promise</code>~~
|
|
326
|
+
* [.recursivelyDeleteS3Bucket](#module_S3.recursivelyDeleteS3Bucket) ⇒ <code>Promise</code>
|
|
327
|
+
* [.listS3ObjectsV2(params)](#module_S3.listS3ObjectsV2) ⇒ <code>Promise.<Array></code>
|
|
328
|
+
* _inner_
|
|
329
|
+
* [~s3Join(...args)](#module_S3..s3Join) ⇒ <code>string</code>
|
|
330
|
+
* [~parseS3Uri(uri)](#module_S3..parseS3Uri) ⇒ <code>Object</code>
|
|
331
|
+
* [~buildS3Uri(bucket, key)](#module_S3..buildS3Uri) ⇒ <code>string</code>
|
|
332
|
+
* [~s3TagSetToQueryString(tagset)](#module_S3..s3TagSetToQueryString) ⇒ <code>string</code>
|
|
333
|
+
* [~s3ObjectExists(params)](#module_S3..s3ObjectExists) ⇒ <code>Promise.<boolean></code>
|
|
334
|
+
* [~waitForObjectToExist(params)](#module_S3..waitForObjectToExist) ⇒ <code>Promise.<undefined></code>
|
|
335
|
+
* [~putFile(bucket, key, filename)](#module_S3..putFile) ⇒ <code>Promise</code>
|
|
336
|
+
* [~streamS3Upload(uploadStream, uploadParams)](#module_S3..streamS3Upload) ⇒ <code>Promise</code>
|
|
337
|
+
* [~downloadS3File(s3Obj, filepath)](#module_S3..downloadS3File) ⇒ <code>Promise.<string></code>
|
|
338
|
+
* [~getObjectSize(params)](#module_S3..getObjectSize) ⇒ <code>Promise.<(number\|undefined)></code>
|
|
339
|
+
* [~getObject(s3Client, params)](#module_S3..getObject) ⇒ <code>Promise.<AWS.S3.GetObjectOutput></code>
|
|
340
|
+
* [~waitForObject(s3Client, params, [retryOptions])](#module_S3..waitForObject) ⇒ <code>Promise.<AWS.S3.GetObjectOutput></code>
|
|
341
|
+
* [~getTextObject(bucket, key)](#module_S3..getTextObject) ⇒ <code>Promise.<string></code>
|
|
342
|
+
* [~getJsonS3Object(bucket, key)](#module_S3..getJsonS3Object) ⇒ <code>Promise.<\*></code>
|
|
343
|
+
* [~getObjectReadStream(params)](#module_S3..getObjectReadStream) ⇒ <code>Readable</code>
|
|
344
|
+
* [~fileExists(bucket, key)](#module_S3..fileExists) ⇒ <code>Promise</code>
|
|
345
|
+
* [~deleteS3Files(s3Objs)](#module_S3..deleteS3Files) ⇒ <code>Promise</code>
|
|
346
|
+
* [~deleteS3Buckets(buckets)](#module_S3..deleteS3Buckets) ⇒ <code>Promise</code>
|
|
347
|
+
* [~uploadS3FileStream(fileStream, bucket, key, s3opts)](#module_S3..uploadS3FileStream) ⇒ <code>Promise</code>
|
|
348
|
+
* [~listS3Objects(bucket, prefix, skipFolders)](#module_S3..listS3Objects) ⇒ <code>Promise</code>
|
|
349
|
+
* [~calculateObjectHash(params)](#module_S3..calculateObjectHash)
|
|
350
|
+
* [~validateS3ObjectChecksum(params)](#module_S3..validateS3ObjectChecksum) ⇒ <code>Promise.<boolean></code>
|
|
351
|
+
* [~getFileBucketAndKey(pathParams)](#module_S3..getFileBucketAndKey) ⇒ <code>Array.<string></code>
|
|
352
|
+
* [~createBucket(Bucket)](#module_S3..createBucket) ⇒ <code>Promise</code>
|
|
353
|
+
* [~createS3Buckets(buckets)](#module_S3..createS3Buckets) ⇒ <code>Promise</code>
|
|
354
|
+
* [~multipartCopyObject(params)](#module_S3..multipartCopyObject) ⇒ <code>Promise.<{etag: string}></code>
|
|
355
|
+
* [~moveObject(params)](#module_S3..moveObject) ⇒ <code>Promise.<undefined></code>
|
|
352
356
|
|
|
353
357
|
<a name="module_S3.deleteS3Object"></a>
|
|
354
358
|
|
|
@@ -469,36 +473,56 @@ Delete a bucket and all of its objects from S3
|
|
|
469
473
|
| --- | --- | --- |
|
|
470
474
|
| bucket | <code>string</code> | name of the bucket |
|
|
471
475
|
|
|
472
|
-
<a name="module_S3.
|
|
476
|
+
<a name="module_S3.listS3ObjectsV2"></a>
|
|
473
477
|
|
|
474
|
-
### S3.
|
|
475
|
-
|
|
478
|
+
### S3.listS3ObjectsV2(params) ⇒ <code>Promise.<Array></code>
|
|
479
|
+
Fetch complete list of S3 objects
|
|
480
|
+
|
|
481
|
+
listObjectsV2 is limited to 1,000 results per call. This function continues
|
|
482
|
+
listing objects until there are no more to be fetched.
|
|
483
|
+
|
|
484
|
+
The passed params must be compatible with the listObjectsV2 call.
|
|
485
|
+
|
|
486
|
+
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#listObjectsV2-property
|
|
476
487
|
|
|
477
488
|
**Kind**: static method of [<code>S3</code>](#module_S3)
|
|
489
|
+
**Returns**: <code>Promise.<Array></code> - resolves to an array of objects corresponding to
|
|
490
|
+
the Contents property of the listObjectsV2 response
|
|
491
|
+
|
|
492
|
+
| Param | Type | Description |
|
|
493
|
+
| --- | --- | --- |
|
|
494
|
+
| params | <code>Object</code> | params for the s3.listObjectsV2 call |
|
|
495
|
+
|
|
496
|
+
<a name="module_S3..s3Join"></a>
|
|
497
|
+
|
|
498
|
+
### S3~s3Join(...args) ⇒ <code>string</code>
|
|
499
|
+
Join strings into an S3 key without a leading slash
|
|
500
|
+
|
|
501
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
478
502
|
**Returns**: <code>string</code> - the full S3 key
|
|
479
503
|
|
|
480
504
|
| Param | Type | Description |
|
|
481
505
|
| --- | --- | --- |
|
|
482
|
-
| args | <code>string</code> \| <code>Array.<string></code> | the strings to join |
|
|
506
|
+
| ...args | <code>string</code> \| <code>Array.<string></code> | the strings to join |
|
|
483
507
|
|
|
484
|
-
<a name="module_S3
|
|
508
|
+
<a name="module_S3..parseS3Uri"></a>
|
|
485
509
|
|
|
486
|
-
### S3
|
|
510
|
+
### S3~parseS3Uri(uri) ⇒ <code>Object</code>
|
|
487
511
|
parse an s3 uri to get the bucket and key
|
|
488
512
|
|
|
489
|
-
**Kind**:
|
|
513
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
490
514
|
**Returns**: <code>Object</code> - Returns an object with `Bucket` and `Key` properties
|
|
491
515
|
|
|
492
516
|
| Param | Type | Description |
|
|
493
517
|
| --- | --- | --- |
|
|
494
518
|
| uri | <code>string</code> | must be a uri with the `s3://` protocol |
|
|
495
519
|
|
|
496
|
-
<a name="module_S3
|
|
520
|
+
<a name="module_S3..buildS3Uri"></a>
|
|
497
521
|
|
|
498
|
-
### S3
|
|
522
|
+
### S3~buildS3Uri(bucket, key) ⇒ <code>string</code>
|
|
499
523
|
Given a bucket and key, return an S3 URI
|
|
500
524
|
|
|
501
|
-
**Kind**:
|
|
525
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
502
526
|
**Returns**: <code>string</code> - an S3 URI
|
|
503
527
|
|
|
504
528
|
| Param | Type | Description |
|
|
@@ -506,25 +530,25 @@ Given a bucket and key, return an S3 URI
|
|
|
506
530
|
| bucket | <code>string</code> | an S3 bucket name |
|
|
507
531
|
| key | <code>string</code> | an S3 key |
|
|
508
532
|
|
|
509
|
-
<a name="module_S3
|
|
533
|
+
<a name="module_S3..s3TagSetToQueryString"></a>
|
|
510
534
|
|
|
511
|
-
### S3
|
|
535
|
+
### S3~s3TagSetToQueryString(tagset) ⇒ <code>string</code>
|
|
512
536
|
Convert S3 TagSet Object to query string
|
|
513
537
|
e.g. [{ Key: 'tag', Value: 'value }] to 'tag=value'
|
|
514
538
|
|
|
515
|
-
**Kind**:
|
|
539
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
516
540
|
**Returns**: <code>string</code> - tags query string
|
|
517
541
|
|
|
518
542
|
| Param | Type | Description |
|
|
519
543
|
| --- | --- | --- |
|
|
520
544
|
| tagset | <code>Array.<Object></code> | S3 TagSet array |
|
|
521
545
|
|
|
522
|
-
<a name="module_S3
|
|
546
|
+
<a name="module_S3..s3ObjectExists"></a>
|
|
523
547
|
|
|
524
|
-
### S3
|
|
548
|
+
### S3~s3ObjectExists(params) ⇒ <code>Promise.<boolean></code>
|
|
525
549
|
Test if an object exists in S3
|
|
526
550
|
|
|
527
|
-
**Kind**:
|
|
551
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
528
552
|
**Returns**: <code>Promise.<boolean></code> - a Promise that will resolve to a boolean indicating
|
|
529
553
|
if the object exists
|
|
530
554
|
|
|
@@ -532,12 +556,12 @@ Test if an object exists in S3
|
|
|
532
556
|
| --- | --- | --- |
|
|
533
557
|
| params | <code>Object</code> | same params as https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#headObject-property |
|
|
534
558
|
|
|
535
|
-
<a name="module_S3
|
|
559
|
+
<a name="module_S3..waitForObjectToExist"></a>
|
|
536
560
|
|
|
537
|
-
### S3
|
|
561
|
+
### S3~waitForObjectToExist(params) ⇒ <code>Promise.<undefined></code>
|
|
538
562
|
Wait for an object to exist in S3
|
|
539
563
|
|
|
540
|
-
**Kind**:
|
|
564
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
541
565
|
|
|
542
566
|
| Param | Type | Default | Description |
|
|
543
567
|
| --- | --- | --- | --- |
|
|
@@ -547,12 +571,12 @@ Wait for an object to exist in S3
|
|
|
547
571
|
| [params.interval] | <code>number</code> | <code>1000</code> | interval before retries, in ms |
|
|
548
572
|
| [params.timeout] | <code>number</code> | <code>30000</code> | timeout, in ms |
|
|
549
573
|
|
|
550
|
-
<a name="module_S3
|
|
574
|
+
<a name="module_S3..putFile"></a>
|
|
551
575
|
|
|
552
|
-
### S3
|
|
576
|
+
### S3~putFile(bucket, key, filename) ⇒ <code>Promise</code>
|
|
553
577
|
Upload a file to S3
|
|
554
578
|
|
|
555
|
-
**Kind**:
|
|
579
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
556
580
|
|
|
557
581
|
| Param | Type | Description |
|
|
558
582
|
| --- | --- | --- |
|
|
@@ -560,28 +584,28 @@ Upload a file to S3
|
|
|
560
584
|
| key | <code>string</code> | the destination S3 key |
|
|
561
585
|
| filename | <code>filename</code> | the local file to be uploaded |
|
|
562
586
|
|
|
563
|
-
<a name="module_S3
|
|
587
|
+
<a name="module_S3..streamS3Upload"></a>
|
|
564
588
|
|
|
565
|
-
### S3
|
|
589
|
+
### S3~streamS3Upload(uploadStream, uploadParams) ⇒ <code>Promise</code>
|
|
566
590
|
Upload data to S3 using a stream
|
|
567
591
|
|
|
568
592
|
We are not using `s3.upload().promise()` due to errors observed in testing
|
|
569
593
|
with uncaught exceptions. By creating our own promise, we can ensure any
|
|
570
594
|
errors from the streams or upload cause this promise to reject.
|
|
571
595
|
|
|
572
|
-
**Kind**:
|
|
596
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
573
597
|
|
|
574
598
|
| Param | Type | Description |
|
|
575
599
|
| --- | --- | --- |
|
|
576
600
|
| uploadStream | <code>Readable</code> | Stream of data to upload |
|
|
577
601
|
| uploadParams | <code>Object</code> | see [S3.upload()](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property) |
|
|
578
602
|
|
|
579
|
-
<a name="module_S3
|
|
603
|
+
<a name="module_S3..downloadS3File"></a>
|
|
580
604
|
|
|
581
|
-
### S3
|
|
605
|
+
### S3~downloadS3File(s3Obj, filepath) ⇒ <code>Promise.<string></code>
|
|
582
606
|
Downloads the given s3Obj to the given filename in a streaming manner
|
|
583
607
|
|
|
584
|
-
**Kind**:
|
|
608
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
585
609
|
**Returns**: <code>Promise.<string></code> - returns filename if successful
|
|
586
610
|
|
|
587
611
|
| Param | Type | Description |
|
|
@@ -589,12 +613,12 @@ Downloads the given s3Obj to the given filename in a streaming manner
|
|
|
589
613
|
| s3Obj | <code>Object</code> | The parameters to send to S3 getObject call |
|
|
590
614
|
| filepath | <code>string</code> | The filepath of the file that is downloaded |
|
|
591
615
|
|
|
592
|
-
<a name="module_S3
|
|
616
|
+
<a name="module_S3..getObjectSize"></a>
|
|
593
617
|
|
|
594
|
-
### S3
|
|
618
|
+
### S3~getObjectSize(params) ⇒ <code>Promise.<(number\|undefined)></code>
|
|
595
619
|
Get the size of an S3 object
|
|
596
620
|
|
|
597
|
-
**Kind**:
|
|
621
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
598
622
|
**Returns**: <code>Promise.<(number\|undefined)></code> - object size, in bytes
|
|
599
623
|
|
|
600
624
|
| Param | Type | Description |
|
|
@@ -604,31 +628,31 @@ Get the size of an S3 object
|
|
|
604
628
|
| params.key | <code>string</code> | |
|
|
605
629
|
| params.s3 | <code>AWS.S3</code> | an S3 client instance |
|
|
606
630
|
|
|
607
|
-
<a name="module_S3
|
|
631
|
+
<a name="module_S3..getObject"></a>
|
|
608
632
|
|
|
609
|
-
### S3
|
|
633
|
+
### S3~getObject(s3Client, params) ⇒ <code>Promise.<AWS.S3.GetObjectOutput></code>
|
|
610
634
|
Gets an object from S3.
|
|
611
635
|
|
|
612
|
-
**Kind**:
|
|
636
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
613
637
|
**Returns**: <code>Promise.<AWS.S3.GetObjectOutput></code> - response from `AWS.S3.getObject()`
|
|
614
638
|
as a Promise
|
|
615
639
|
|
|
616
640
|
| Param | Type | Description |
|
|
617
641
|
| --- | --- | --- |
|
|
618
|
-
|
|
|
642
|
+
| s3Client | <code>AWS.S3</code> | an `AWS.S3` instance |
|
|
619
643
|
| params | <code>AWS.S3.GetObjectRequest</code> | parameters object to pass through to `AWS.S3.getObject()` |
|
|
620
644
|
|
|
621
645
|
**Example**
|
|
622
646
|
```js
|
|
623
647
|
const obj = await getObject(s3(), { Bucket: 'b', Key: 'k' })
|
|
624
648
|
```
|
|
625
|
-
<a name="module_S3
|
|
649
|
+
<a name="module_S3..waitForObject"></a>
|
|
626
650
|
|
|
627
|
-
### S3
|
|
651
|
+
### S3~waitForObject(s3Client, params, [retryOptions]) ⇒ <code>Promise.<AWS.S3.GetObjectOutput></code>
|
|
628
652
|
Get an object from S3, waiting for it to exist and, if specified, have the
|
|
629
653
|
correct ETag.
|
|
630
654
|
|
|
631
|
-
**Kind**:
|
|
655
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
632
656
|
|
|
633
657
|
| Param | Type | Default |
|
|
634
658
|
| --- | --- | --- |
|
|
@@ -636,12 +660,12 @@ correct ETag.
|
|
|
636
660
|
| params | <code>AWS.S3.GetObjectRequest</code> | |
|
|
637
661
|
| [retryOptions] | <code>pRetry.Options</code> | <code>{}</code> |
|
|
638
662
|
|
|
639
|
-
<a name="module_S3
|
|
663
|
+
<a name="module_S3..getTextObject"></a>
|
|
640
664
|
|
|
641
|
-
### S3
|
|
665
|
+
### S3~getTextObject(bucket, key) ⇒ <code>Promise.<string></code>
|
|
642
666
|
Fetch the contents of an S3 object
|
|
643
667
|
|
|
644
|
-
**Kind**:
|
|
668
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
645
669
|
**Returns**: <code>Promise.<string></code> - the contents of the S3 object
|
|
646
670
|
|
|
647
671
|
| Param | Type | Description |
|
|
@@ -649,12 +673,12 @@ Fetch the contents of an S3 object
|
|
|
649
673
|
| bucket | <code>string</code> | the S3 object's bucket |
|
|
650
674
|
| key | <code>string</code> | the S3 object's key |
|
|
651
675
|
|
|
652
|
-
<a name="module_S3
|
|
676
|
+
<a name="module_S3..getJsonS3Object"></a>
|
|
653
677
|
|
|
654
|
-
### S3
|
|
678
|
+
### S3~getJsonS3Object(bucket, key) ⇒ <code>Promise.<\*></code>
|
|
655
679
|
Fetch JSON stored in an S3 object
|
|
656
680
|
|
|
657
|
-
**Kind**:
|
|
681
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
658
682
|
**Returns**: <code>Promise.<\*></code> - the contents of the S3 object, parsed as JSON
|
|
659
683
|
|
|
660
684
|
| Param | Type | Description |
|
|
@@ -662,12 +686,12 @@ Fetch JSON stored in an S3 object
|
|
|
662
686
|
| bucket | <code>string</code> | the S3 object's bucket |
|
|
663
687
|
| key | <code>string</code> | the S3 object's key |
|
|
664
688
|
|
|
665
|
-
<a name="module_S3
|
|
689
|
+
<a name="module_S3..getObjectReadStream"></a>
|
|
666
690
|
|
|
667
|
-
### S3
|
|
691
|
+
### S3~getObjectReadStream(params) ⇒ <code>Readable</code>
|
|
668
692
|
Get a readable stream for an S3 object
|
|
669
693
|
|
|
670
|
-
**Kind**:
|
|
694
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
671
695
|
|
|
672
696
|
| Param | Type | Description |
|
|
673
697
|
| --- | --- | --- |
|
|
@@ -676,12 +700,12 @@ Get a readable stream for an S3 object
|
|
|
676
700
|
| params.bucket | <code>string</code> | the bucket of the requested object |
|
|
677
701
|
| params.key | <code>string</code> | the key of the requested object |
|
|
678
702
|
|
|
679
|
-
<a name="module_S3
|
|
703
|
+
<a name="module_S3..fileExists"></a>
|
|
680
704
|
|
|
681
|
-
### S3
|
|
705
|
+
### S3~fileExists(bucket, key) ⇒ <code>Promise</code>
|
|
682
706
|
Check if a file exists in an S3 object
|
|
683
707
|
|
|
684
|
-
**Kind**:
|
|
708
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
685
709
|
**Returns**: <code>Promise</code> - returns the response from `S3.headObject` as a promise
|
|
686
710
|
|
|
687
711
|
| Param | Type | Description |
|
|
@@ -689,12 +713,12 @@ Check if a file exists in an S3 object
|
|
|
689
713
|
| bucket | <code>string</code> | name of the S3 bucket |
|
|
690
714
|
| key | <code>string</code> | key of the file in the S3 bucket |
|
|
691
715
|
|
|
692
|
-
<a name="module_S3
|
|
716
|
+
<a name="module_S3..deleteS3Files"></a>
|
|
693
717
|
|
|
694
|
-
### S3
|
|
718
|
+
### S3~deleteS3Files(s3Objs) ⇒ <code>Promise</code>
|
|
695
719
|
Delete files from S3
|
|
696
720
|
|
|
697
|
-
**Kind**:
|
|
721
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
698
722
|
**Returns**: <code>Promise</code> - A promise that resolves to an Array of the data returned
|
|
699
723
|
from the deletion operations
|
|
700
724
|
|
|
@@ -702,24 +726,24 @@ Delete files from S3
|
|
|
702
726
|
| --- | --- | --- |
|
|
703
727
|
| s3Objs | <code>Array</code> | An array of objects containing keys 'Bucket' and 'Key' |
|
|
704
728
|
|
|
705
|
-
<a name="module_S3
|
|
729
|
+
<a name="module_S3..deleteS3Buckets"></a>
|
|
706
730
|
|
|
707
|
-
### S3
|
|
731
|
+
### S3~deleteS3Buckets(buckets) ⇒ <code>Promise</code>
|
|
708
732
|
Delete a list of buckets and all of their objects from S3
|
|
709
733
|
|
|
710
|
-
**Kind**:
|
|
734
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
711
735
|
**Returns**: <code>Promise</code> - the promised result of `S3.deleteBucket`
|
|
712
736
|
|
|
713
737
|
| Param | Type | Description |
|
|
714
738
|
| --- | --- | --- |
|
|
715
739
|
| buckets | <code>Array</code> | list of bucket names |
|
|
716
740
|
|
|
717
|
-
<a name="module_S3
|
|
741
|
+
<a name="module_S3..uploadS3FileStream"></a>
|
|
718
742
|
|
|
719
|
-
### S3
|
|
743
|
+
### S3~uploadS3FileStream(fileStream, bucket, key, s3opts) ⇒ <code>Promise</code>
|
|
720
744
|
Upload the file associated with the given stream to an S3 bucket
|
|
721
745
|
|
|
722
|
-
**Kind**:
|
|
746
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
723
747
|
**Returns**: <code>Promise</code> - A promise
|
|
724
748
|
|
|
725
749
|
| Param | Type | Description |
|
|
@@ -729,48 +753,28 @@ Upload the file associated with the given stream to an S3 bucket
|
|
|
729
753
|
| key | <code>string</code> | The key to the file in the bucket |
|
|
730
754
|
| s3opts | <code>Object</code> | Options to pass to the AWS sdk call (defaults to `{}`) |
|
|
731
755
|
|
|
732
|
-
<a name="module_S3
|
|
756
|
+
<a name="module_S3..listS3Objects"></a>
|
|
733
757
|
|
|
734
|
-
### S3
|
|
758
|
+
### S3~listS3Objects(bucket, prefix, skipFolders) ⇒ <code>Promise</code>
|
|
735
759
|
List the objects in an S3 bucket
|
|
736
760
|
|
|
737
|
-
**Kind**:
|
|
761
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
738
762
|
**Returns**: <code>Promise</code> - A promise that resolves to the list of objects. Each S3
|
|
739
763
|
object is represented as a JS object with the following attributes: `Key`,
|
|
740
764
|
`ETag`, `LastModified`, `Owner`, `Size`, `StorageClass`.
|
|
741
765
|
|
|
742
|
-
| Param | Type | Description |
|
|
743
|
-
| --- | --- | --- |
|
|
744
|
-
| bucket | <code>string</code> | The name of the bucket |
|
|
745
|
-
| prefix | <code>string</code> | Only objects with keys starting with this prefix will be included (useful for searching folders in buckets, e.g., '/PDR') |
|
|
746
|
-
| skipFolders | <code>boolean</code> | If true don't return objects that are folders (defaults to true) |
|
|
747
|
-
|
|
748
|
-
<a name="module_S3.listS3ObjectsV2"></a>
|
|
749
|
-
|
|
750
|
-
### S3.listS3ObjectsV2(params) ⇒ <code>Promise.<Array></code>
|
|
751
|
-
Fetch complete list of S3 objects
|
|
752
|
-
|
|
753
|
-
listObjectsV2 is limited to 1,000 results per call. This function continues
|
|
754
|
-
listing objects until there are no more to be fetched.
|
|
755
|
-
|
|
756
|
-
The passed params must be compatible with the listObjectsV2 call.
|
|
757
|
-
|
|
758
|
-
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#listObjectsV2-property
|
|
759
|
-
|
|
760
|
-
**Kind**: static method of [<code>S3</code>](#module_S3)
|
|
761
|
-
**Returns**: <code>Promise.<Array></code> - resolves to an array of objects corresponding to
|
|
762
|
-
the Contents property of the listObjectsV2 response
|
|
763
|
-
|
|
764
|
-
| Param | Type | Description |
|
|
765
|
-
| --- | --- | --- |
|
|
766
|
-
| params | <code>Object</code> | params for the s3.listObjectsV2 call |
|
|
766
|
+
| Param | Type | Default | Description |
|
|
767
|
+
| --- | --- | --- | --- |
|
|
768
|
+
| bucket | <code>string</code> | | The name of the bucket |
|
|
769
|
+
| prefix | <code>string</code> | | Only objects with keys starting with this prefix will be included (useful for searching folders in buckets, e.g., '/PDR') |
|
|
770
|
+
| skipFolders | <code>boolean</code> | <code>true</code> | If true don't return objects that are folders (defaults to true) |
|
|
767
771
|
|
|
768
|
-
<a name="module_S3
|
|
772
|
+
<a name="module_S3..calculateObjectHash"></a>
|
|
769
773
|
|
|
770
|
-
### S3
|
|
774
|
+
### S3~calculateObjectHash(params)
|
|
771
775
|
Calculate the cryptographic hash of an S3 object
|
|
772
776
|
|
|
773
|
-
**Kind**:
|
|
777
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
774
778
|
|
|
775
779
|
| Param | Type | Description |
|
|
776
780
|
| --- | --- | --- |
|
|
@@ -780,12 +784,12 @@ Calculate the cryptographic hash of an S3 object
|
|
|
780
784
|
| params.bucket | <code>string</code> | |
|
|
781
785
|
| params.key | <code>string</code> | |
|
|
782
786
|
|
|
783
|
-
<a name="module_S3
|
|
787
|
+
<a name="module_S3..validateS3ObjectChecksum"></a>
|
|
784
788
|
|
|
785
|
-
### S3
|
|
789
|
+
### S3~validateS3ObjectChecksum(params) ⇒ <code>Promise.<boolean></code>
|
|
786
790
|
Validate S3 object checksum against expected sum
|
|
787
791
|
|
|
788
|
-
**Kind**:
|
|
792
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
789
793
|
**Returns**: <code>Promise.<boolean></code> - returns true for success
|
|
790
794
|
**Throws**:
|
|
791
795
|
|
|
@@ -801,46 +805,46 @@ Validate S3 object checksum against expected sum
|
|
|
801
805
|
| params.expectedSum | <code>number</code> \| <code>string</code> | expected checksum |
|
|
802
806
|
| [params.options] | <code>Object</code> | crypto.createHash options |
|
|
803
807
|
|
|
804
|
-
<a name="module_S3
|
|
808
|
+
<a name="module_S3..getFileBucketAndKey"></a>
|
|
805
809
|
|
|
806
|
-
### S3
|
|
810
|
+
### S3~getFileBucketAndKey(pathParams) ⇒ <code>Array.<string></code>
|
|
807
811
|
Extract the S3 bucket and key from the URL path parameters
|
|
808
812
|
|
|
809
|
-
**Kind**:
|
|
813
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
810
814
|
**Returns**: <code>Array.<string></code> - `[Bucket, Key]`
|
|
811
815
|
|
|
812
816
|
| Param | Type | Description |
|
|
813
817
|
| --- | --- | --- |
|
|
814
818
|
| pathParams | <code>string</code> | path parameters from the URL bucket/key in the form of |
|
|
815
819
|
|
|
816
|
-
<a name="module_S3
|
|
820
|
+
<a name="module_S3..createBucket"></a>
|
|
817
821
|
|
|
818
|
-
### S3
|
|
822
|
+
### S3~createBucket(Bucket) ⇒ <code>Promise</code>
|
|
819
823
|
Create an S3 bucket
|
|
820
824
|
|
|
821
|
-
**Kind**:
|
|
825
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
822
826
|
|
|
823
827
|
| Param | Type | Description |
|
|
824
828
|
| --- | --- | --- |
|
|
825
829
|
| Bucket | <code>string</code> | the name of the S3 bucket to create |
|
|
826
830
|
|
|
827
|
-
<a name="module_S3
|
|
831
|
+
<a name="module_S3..createS3Buckets"></a>
|
|
828
832
|
|
|
829
|
-
### S3
|
|
833
|
+
### S3~createS3Buckets(buckets) ⇒ <code>Promise</code>
|
|
830
834
|
Create multiple S3 buckets
|
|
831
835
|
|
|
832
|
-
**Kind**:
|
|
836
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
833
837
|
|
|
834
838
|
| Param | Type | Description |
|
|
835
839
|
| --- | --- | --- |
|
|
836
840
|
| buckets | <code>Array.<string></code> | the names of the S3 buckets to create |
|
|
837
841
|
|
|
838
|
-
<a name="module_S3
|
|
842
|
+
<a name="module_S3..multipartCopyObject"></a>
|
|
839
843
|
|
|
840
|
-
### S3
|
|
844
|
+
### S3~multipartCopyObject(params) ⇒ <code>Promise.<{etag: string}></code>
|
|
841
845
|
Copy an S3 object to another location in S3 using a multipart copy
|
|
842
846
|
|
|
843
|
-
**Kind**:
|
|
847
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
844
848
|
**Returns**: <code>Promise.<{etag: string}></code> - object containing the ETag of the
|
|
845
849
|
destination object
|
|
846
850
|
|
|
@@ -855,12 +859,12 @@ Copy an S3 object to another location in S3 using a multipart copy
|
|
|
855
859
|
| [params.ACL] | <code>string</code> | | an [S3 Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) |
|
|
856
860
|
| [params.copyTags] | <code>boolean</code> | <code>false</code> | |
|
|
857
861
|
|
|
858
|
-
<a name="module_S3
|
|
862
|
+
<a name="module_S3..moveObject"></a>
|
|
859
863
|
|
|
860
|
-
### S3
|
|
864
|
+
### S3~moveObject(params) ⇒ <code>Promise.<undefined></code>
|
|
861
865
|
Move an S3 object to another location in S3
|
|
862
866
|
|
|
863
|
-
**Kind**:
|
|
867
|
+
**Kind**: inner method of [<code>S3</code>](#module_S3)
|
|
864
868
|
|
|
865
869
|
| Param | Type | Default | Description |
|
|
866
870
|
| --- | --- | --- | --- |
|
|
@@ -875,13 +879,13 @@ Move an S3 object to another location in S3
|
|
|
875
879
|
<a name="module_SNS"></a>
|
|
876
880
|
|
|
877
881
|
## SNS
|
|
878
|
-
<a name="module_SNS
|
|
882
|
+
<a name="module_SNS..publishSnsMessage"></a>
|
|
879
883
|
|
|
880
|
-
### SNS
|
|
884
|
+
### SNS~publishSnsMessage(snsTopicArn, message, retryOptions) ⇒ <code>Promise.<undefined></code>
|
|
881
885
|
Publish a message to an SNS topic. Does not catch
|
|
882
886
|
errors, to allow more specific handling by the caller.
|
|
883
887
|
|
|
884
|
-
**Kind**:
|
|
888
|
+
**Kind**: inner method of [<code>SNS</code>](#module_SNS)
|
|
885
889
|
|
|
886
890
|
| Param | Type | Description |
|
|
887
891
|
| --- | --- | --- |
|
|
@@ -894,11 +898,13 @@ errors, to allow more specific handling by the caller.
|
|
|
894
898
|
## SQS
|
|
895
899
|
|
|
896
900
|
* [SQS](#module_SQS)
|
|
897
|
-
*
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
*
|
|
901
|
+
* _static_
|
|
902
|
+
* [.sendSQSMessage](#module_SQS.sendSQSMessage) ⇒ <code>Promise</code>
|
|
903
|
+
* [.deleteSQSMessage](#module_SQS.deleteSQSMessage) ⇒ <code>Promise</code>
|
|
904
|
+
* [.createQueue(QueueName)](#module_SQS.createQueue) ⇒ <code>Promise.<string></code>
|
|
905
|
+
* _inner_
|
|
906
|
+
* [~receiveSQSMessages(queueUrl, options)](#module_SQS..receiveSQSMessages) ⇒ <code>Promise.<Array></code>
|
|
907
|
+
* [~sqsQueueExists(queueUrl)](#module_SQS..sqsQueueExists) ⇒ <code>Promise.<boolean></code>
|
|
902
908
|
|
|
903
909
|
<a name="module_SQS.sendSQSMessage"></a>
|
|
904
910
|
|
|
@@ -939,13 +945,13 @@ Create an SQS Queue. Properly handles localstack queue URLs
|
|
|
939
945
|
| --- | --- | --- |
|
|
940
946
|
| QueueName | <code>string</code> | queue name |
|
|
941
947
|
|
|
942
|
-
<a name="module_SQS
|
|
948
|
+
<a name="module_SQS..receiveSQSMessages"></a>
|
|
943
949
|
|
|
944
|
-
### SQS
|
|
950
|
+
### SQS~receiveSQSMessages(queueUrl, options) ⇒ <code>Promise.<Array></code>
|
|
945
951
|
Receives SQS messages from a given queue. The number of messages received
|
|
946
952
|
can be set and the timeout is also adjustable.
|
|
947
953
|
|
|
948
|
-
**Kind**:
|
|
954
|
+
**Kind**: inner method of [<code>SQS</code>](#module_SQS)
|
|
949
955
|
**Returns**: <code>Promise.<Array></code> - an array of messages
|
|
950
956
|
|
|
951
957
|
| Param | Type | Default | Description |
|
|
@@ -956,12 +962,12 @@ can be set and the timeout is also adjustable.
|
|
|
956
962
|
| [options.visibilityTimeout] | <code>integer</code> | <code>30</code> | number of seconds a message is invisible after read |
|
|
957
963
|
| [options.waitTimeSeconds] | <code>integer</code> | <code>0</code> | number of seconds to poll SQS queue (long polling) |
|
|
958
964
|
|
|
959
|
-
<a name="module_SQS
|
|
965
|
+
<a name="module_SQS..sqsQueueExists"></a>
|
|
960
966
|
|
|
961
|
-
### SQS
|
|
967
|
+
### SQS~sqsQueueExists(queueUrl) ⇒ <code>Promise.<boolean></code>
|
|
962
968
|
Test if an SQS queue exists
|
|
963
969
|
|
|
964
|
-
**Kind**:
|
|
970
|
+
**Kind**: inner method of [<code>SQS</code>](#module_SQS)
|
|
965
971
|
**Returns**: <code>Promise.<boolean></code> - - a Promise that will resolve to a boolean indicating
|
|
966
972
|
if the queue exists
|
|
967
973
|
|
|
@@ -977,11 +983,13 @@ Test if an SQS queue exists
|
|
|
977
983
|
## StepFunctions
|
|
978
984
|
|
|
979
985
|
* [StepFunctions](#module_StepFunctions)
|
|
980
|
-
*
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
986
|
+
* _static_
|
|
987
|
+
* [.describeExecution(params)](#module_StepFunctions.describeExecution) ⇒ <code>Promise.<Object></code>
|
|
988
|
+
* [.describeStateMachine(params)](#module_StepFunctions.describeStateMachine) ⇒ <code>Promise.<Object></code>
|
|
989
|
+
* [.getExecutionHistory(params)](#module_StepFunctions.getExecutionHistory) ⇒ <code>Promise.<Object></code>
|
|
990
|
+
* [.listExecutions(params)](#module_StepFunctions.listExecutions) ⇒ <code>Promise.<Object></code>
|
|
991
|
+
* _inner_
|
|
992
|
+
* [~executionExists(executionArn)](#module_StepFunctions..executionExists) ⇒ <code>Promise.<boolean></code>
|
|
985
993
|
|
|
986
994
|
<a name="module_StepFunctions.describeExecution"></a>
|
|
987
995
|
|
|
@@ -1017,20 +1025,6 @@ exponential backoff.
|
|
|
1017
1025
|
| --- | --- |
|
|
1018
1026
|
| params | <code>Object</code> |
|
|
1019
1027
|
|
|
1020
|
-
<a name="module_StepFunctions.executionExists"></a>
|
|
1021
|
-
|
|
1022
|
-
### StepFunctions.executionExists(executionArn) ⇒ <code>Promise.<boolean></code>
|
|
1023
|
-
Check if a Step Function Execution exists
|
|
1024
|
-
|
|
1025
|
-
If a ThrottlingException is received, this function will retry using an
|
|
1026
|
-
exponential backoff.
|
|
1027
|
-
|
|
1028
|
-
**Kind**: static method of [<code>StepFunctions</code>](#module_StepFunctions)
|
|
1029
|
-
|
|
1030
|
-
| Param | Type | Description |
|
|
1031
|
-
| --- | --- | --- |
|
|
1032
|
-
| executionArn | <code>string</code> | the ARN of the Step Function Execution to check for |
|
|
1033
|
-
|
|
1034
1028
|
<a name="module_StepFunctions.getExecutionHistory"></a>
|
|
1035
1029
|
|
|
1036
1030
|
### StepFunctions.getExecutionHistory(params) ⇒ <code>Promise.<Object></code>
|
|
@@ -1065,6 +1059,20 @@ exponential backoff.
|
|
|
1065
1059
|
| --- | --- |
|
|
1066
1060
|
| params | <code>Object</code> |
|
|
1067
1061
|
|
|
1062
|
+
<a name="module_StepFunctions..executionExists"></a>
|
|
1063
|
+
|
|
1064
|
+
### StepFunctions~executionExists(executionArn) ⇒ <code>Promise.<boolean></code>
|
|
1065
|
+
Check if a Step Function Execution exists
|
|
1066
|
+
|
|
1067
|
+
If a ThrottlingException is received, this function will retry using an
|
|
1068
|
+
exponential backoff.
|
|
1069
|
+
|
|
1070
|
+
**Kind**: inner method of [<code>StepFunctions</code>](#module_StepFunctions)
|
|
1071
|
+
|
|
1072
|
+
| Param | Type | Description |
|
|
1073
|
+
| --- | --- | --- |
|
|
1074
|
+
| executionArn | <code>string</code> | the ARN of the Step Function Execution to check for |
|
|
1075
|
+
|
|
1068
1076
|
<a name="DynamoDbSearchQueue"></a>
|
|
1069
1077
|
|
|
1070
1078
|
## DynamoDbSearchQueue
|