Skip to content

Commit fd489a2

Browse files
authored
Fix typos and add missing options to aws jslib's sign() (#1202)
1 parent 10d9853 commit fd489a2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/data/markdown/docs/20 jslib/01 jslib/01 aws.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ This documentation is for the last version only. If you discover that some code
3737
| [KMSClient](/javascript-api/jslib/aws/kmsclient) | Client class to interact with AWS Key Management Service. |
3838
| [S3Client](/javascript-api/jslib/aws/s3client) | Client class to interact with AWS S3 buckets and objects. |
3939
| [SecretsManager](/javascript-api/jslib/aws/secretsmanagerclient) | Client class to interact with AWS secrets stored in Secrets Manager. |
40+
| [SignatureV4](/javascript-api/jslib/aws/signaturev4) | Class to sign and pre-sign requests to AWS services. |
4041
| [SQSClient](/javascript-api/jslib/aws/sqsclient) | Client class to interact with AWS Simple Queue Service. |
4142
| [SystemsManagerClient](/javascript-api/jslib/aws/systemsmanagerclient) | Client class to interact with AWS Systems Manager Service. |

src/data/markdown/docs/20 jslib/01 jslib/01 aws/SignatureV4/00 sign().md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ The first parameter of the `sign` method consists of an Object with the followin
1717
| hostname | string | The hostname the request is sent to |
1818
| path | string | The path of the request |
1919
| headers | Object | The headers of the HTTP request |
20-
| body? | string or ArrayBuffer | The optional body of the HTTP request |
2120
| uriEscapePath | boolean | Whether to uri-escape the request URI path as part of computing the canonical request string. This is required for every AWS service, except Amazon S3, as of late 2017. |
2221
| applyChecksum | boolean | Whether to calculate a checksum of the request body and include it as either a request header (when signing) or as a query string parameter (when pre-signing). This is required for AWS Glacier and Amazon S3 and optional for every other AWS service as of late 2017. |
23-
| | | |
22+
| body (optional) | string or ArrayBuffer | The optional body of the HTTP request |
23+
| query (optional) | `Object.<string, string \| Array.<string>>` | The optional query parameters of the HTTP request |
24+
2425

2526
You can override SignatureV4 options in the context of this specific request. To do this, pass a second parameter to the `sign` method, which is an Object with the following parameters.
2627

@@ -46,7 +47,7 @@ You can override SignatureV4 options in the context of this specific request. To
4647
```javascript
4748
import http from 'k6/http.js'
4849

49-
import { AWSConfig, SignatureV4 } from 'https://jslib.k6.io/aws/0.7.2/kms.js'
50+
import { AWSConfig, SignatureV4 } from 'https://jslib.k6.io/aws/0.7.2/signature.js'
5051

5152
const awsConfig = new AWSConfig({
5253
region: __ENV.AWS_REGION,

0 commit comments

Comments
 (0)