Skip to content

Commit

Permalink
2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
james-hu committed Jan 22, 2024
1 parent 6646a04 commit 26c5ee3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 28 deletions.
32 changes: 7 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,9 @@ ___
`Static` **promiseWithRetry**\<`Result`, `TError`\>(`operation`, `backoff?`, `statusCodes?`): `Promise`\<`Result`\>

Perform an AWS operation (returning a Request) with retry.
This function is quite handy when you are using AWS SDK v2.
If you are using AWS SDK v3, use `withRetry(...)` instead.

The retry could happen only if the error coming from AWS has property `retryable`/`$retryable` equals to true.
If you don't want `retryable`/`$retryable` property to be checked, use `PromiseUtils.withRetry(...)` directly.

Expand Down Expand Up @@ -451,9 +454,10 @@ ___

`Static` **withRetry**\<`Result`, `TError`\>(`operation`, `backoff?`, `statusCodes?`): `Promise`\<`Result`\>

Usually you would find `promiseWithRetry(...)` more convenient.

Perform an AWS operation (returning a Promise) with retry.
This function is quite handy when you are using AWS SDK v3.
If you are using AWS SDK v2, `promiseWithRetry(...)` could be more convenient.

The retry could happen only if the error coming from AWS has property `retryable`/`$retryable` equals to true.
If you don't want `retryable`/`$retryable` property to be checked, use `PromiseUtils.withRetry(...)` directly.

Expand Down Expand Up @@ -595,7 +599,7 @@ ___

**deleteS3Object**(`s3`, `bucket`, `key`): `Promise`\<`DeleteObjectCommandOutput`\>

Delete an existing S3 object
Delete an S3 object. No error would be thrown if the object does not exist.

###### Parameters

Expand All @@ -613,28 +617,6 @@ S3 command output

___

##### deleteS3ObjectSilently

**deleteS3ObjectSilently**(`s3`, `bucket`, `key`): `Promise`\<`void`\>

Delete an S3 object, and does not throw an error if the object does not already exist.

###### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `s3` | `S3Client` | S3Client |
| `bucket` | `string` | bucket name |
| `key` | `string` | object key (without URL encoding) |

###### Returns

`Promise`\<`void`\>

void

___

##### encodeS3ObjectKey

**encodeS3ObjectKey**(`key`): `string`
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@handy-common-utils/aws-utils",
"version": "2.5.0",
"version": "2.6.0",
"description": "AWS related utilities",
"scripts": {
"pretest": "eslint . --ext .ts",
Expand Down

0 comments on commit 26c5ee3

Please sign in to comment.