@mavogel/awscdk-rootmail 0.0.329 → 0.0.330
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/.jsii +3 -3
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/README.md +26 -46
- package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +37 -37
- package/node_modules/@aws-sdk/client-route-53/README.md +26 -46
- package/node_modules/@aws-sdk/client-route-53/package.json +36 -36
- package/node_modules/@aws-sdk/client-s3/README.md +26 -46
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-cjs/schemas/schemas_0.js +6 -4
- package/node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +4 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +6 -4
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/CopyObjectCommand.d.ts +5 -4
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateBucketCommand.d.ts +9 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketTaggingCommand.d.ts +0 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketTaggingCommand.d.ts +0 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadBucketCommand.d.ts +5 -4
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/UploadPartCopyCommand.d.ts +5 -4
- package/node_modules/@aws-sdk/client-s3/dist-types/models/enums.d.ts +12 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +24 -2
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/enums.d.ts +6 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_0.d.ts +2 -0
- package/node_modules/@aws-sdk/client-s3/package.json +50 -50
- package/node_modules/@aws-sdk/client-ses/README.md +26 -46
- package/node_modules/@aws-sdk/client-ses/package.json +34 -34
- package/node_modules/@aws-sdk/client-ssm/README.md +26 -46
- package/node_modules/@aws-sdk/client-ssm/package.json +34 -34
- package/node_modules/@aws-sdk/core/package.json +11 -11
- package/node_modules/@aws-sdk/crc64-nvme/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +14 -14
- package/node_modules/@aws-sdk/credential-provider-login/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
- package/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-expect-continue/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/index.js +19 -7
- package/node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/flexibleChecksumsResponseMiddleware.js +10 -2
- package/node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/getChecksumAlgorithmListForResponse.js +10 -6
- package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +10 -10
- package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-location-constraint/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-sdk-route53/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +11 -11
- package/node_modules/@aws-sdk/middleware-ssec/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +8 -8
- package/node_modules/@aws-sdk/nested-clients/package.json +32 -32
- package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +6 -6
- package/node_modules/@aws-sdk/token-providers/package.json +7 -7
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/util-endpoints/package.json +5 -5
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +75 -19
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getNodeModulesParentDirs.js +15 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getSanitizedDevTypeScriptVersion.js +14 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptUserAgentPair.js +53 -7
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/{getTypeScriptPackageJsonPaths.d.ts → getNodeModulesParentDirs.d.ts} +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getSanitizedDevTypeScriptVersion.d.ts +8 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getNodeModulesParentDirs.d.ts +1 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getSanitizedDevTypeScriptVersion.d.ts +3 -0
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +6 -5
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@smithy/abort-controller/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +5 -5
- package/node_modules/@smithy/core/dist-cjs/index.js +1 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +7 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +22 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +11 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +41 -4
- package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +17 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +10 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +3 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +30 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +5 -1
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/toEndpointV1.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/translateTraits.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/toEndpointV1.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +6 -0
- package/node_modules/@smithy/core/endpoints.d.ts +7 -0
- package/node_modules/@smithy/core/endpoints.js +6 -0
- package/node_modules/@smithy/core/package.json +16 -7
- package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
- package/node_modules/@smithy/eventstream-codec/package.json +2 -2
- package/node_modules/@smithy/eventstream-serde-browser/package.json +3 -3
- package/node_modules/@smithy/eventstream-serde-config-resolver/package.json +2 -2
- package/node_modules/@smithy/eventstream-serde-node/package.json +3 -3
- package/node_modules/@smithy/eventstream-serde-universal/package.json +3 -3
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +4 -1
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +4 -1
- package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
- package/node_modules/@smithy/hash-blob-browser/package.json +2 -2
- package/node_modules/@smithy/hash-node/package.json +2 -2
- package/node_modules/@smithy/hash-stream-node/package.json +2 -2
- package/node_modules/@smithy/invalid-dependency/package.json +2 -2
- package/node_modules/@smithy/md5-js/package.json +2 -2
- package/node_modules/@smithy/middleware-content-length/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +17 -1
- package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +9 -0
- package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js +8 -1
- package/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/toEndpointV1.d.ts +1 -0
- package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/toEndpointV1.d.ts +1 -0
- package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
- package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +9 -12
- package/node_modules/@smithy/middleware-retry/dist-es/configurations.js +9 -12
- package/node_modules/@smithy/middleware-retry/package.json +8 -8
- package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +3 -2
- package/node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js +3 -2
- package/node_modules/@smithy/middleware-serde/package.json +4 -3
- package/node_modules/@smithy/middleware-stack/package.json +2 -2
- package/node_modules/@smithy/node-config-provider/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +48 -38
- package/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +4 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +38 -31
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +6 -6
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +4 -3
- package/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +4 -4
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +3 -3
- package/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +4 -3
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +4 -4
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +3 -3
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/package.json +5 -5
- package/node_modules/@smithy/property-provider/package.json +2 -2
- package/node_modules/@smithy/protocol-http/package.json +2 -2
- package/node_modules/@smithy/querystring-builder/package.json +2 -2
- package/node_modules/@smithy/querystring-parser/package.json +2 -2
- package/node_modules/@smithy/service-error-classification/package.json +2 -2
- package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +4 -4
- package/node_modules/@smithy/smithy-client/package.json +7 -7
- package/node_modules/@smithy/types/dist-types/http.d.ts +1 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +1 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@smithy/url-parser/package.json +3 -3
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
- package/node_modules/@smithy/util-endpoints/package.json +3 -3
- package/node_modules/@smithy/util-middleware/package.json +2 -2
- package/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@smithy/util-stream/package.json +4 -4
- package/node_modules/@smithy/util-waiter/dist-cjs/index.js +1 -1
- package/node_modules/@smithy/util-waiter/dist-es/poller.js +1 -1
- package/node_modules/@smithy/util-waiter/package.json +3 -3
- package/package.json +1 -1
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptPackageJsonPaths.js +0 -17
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getTypeScriptPackageJsonPaths.d.ts +0 -3
package/.jsii
CHANGED
|
@@ -8715,7 +8715,7 @@
|
|
|
8715
8715
|
"stability": "experimental"
|
|
8716
8716
|
},
|
|
8717
8717
|
"homepage": "https://github.com/MV-Consulting/awscdk-rootmail",
|
|
8718
|
-
"jsiiVersion": "5.9.
|
|
8718
|
+
"jsiiVersion": "5.9.33 (build 8ebb533)",
|
|
8719
8719
|
"keywords": [
|
|
8720
8720
|
"aws",
|
|
8721
8721
|
"cdk",
|
|
@@ -9167,6 +9167,6 @@
|
|
|
9167
9167
|
"symbolId": "src/ses-receive:SESReceiveProps"
|
|
9168
9168
|
}
|
|
9169
9169
|
},
|
|
9170
|
-
"version": "0.0.
|
|
9171
|
-
"fingerprint": "
|
|
9170
|
+
"version": "0.0.330",
|
|
9171
|
+
"fingerprint": "xA91s+zQY6LTGjjjSj2WYA+uWZrXCI8sUkqiL2Mt5sk="
|
|
9172
9172
|
}
|
package/lib/rootmail.js
CHANGED
|
@@ -82,7 +82,7 @@ class Rootmail extends constructs_1.Construct {
|
|
|
82
82
|
}
|
|
83
83
|
exports.Rootmail = Rootmail;
|
|
84
84
|
_a = JSII_RTTI_SYMBOL_1;
|
|
85
|
-
Rootmail[_a] = { fqn: "@mavogel/awscdk-rootmail.Rootmail", version: "0.0.
|
|
85
|
+
Rootmail[_a] = { fqn: "@mavogel/awscdk-rootmail.Rootmail", version: "0.0.330" };
|
|
86
86
|
/**
|
|
87
87
|
* Aspect for setting all removal policies to DESTROY
|
|
88
88
|
*/
|
package/lib/ses-receive.js
CHANGED
|
@@ -130,7 +130,7 @@ class SESReceive extends constructs_1.Construct {
|
|
|
130
130
|
}
|
|
131
131
|
exports.SESReceive = SESReceive;
|
|
132
132
|
_a = JSII_RTTI_SYMBOL_1;
|
|
133
|
-
SESReceive[_a] = { fqn: "@mavogel/awscdk-rootmail.SESReceive", version: "0.0.
|
|
133
|
+
SESReceive[_a] = { fqn: "@mavogel/awscdk-rootmail.SESReceive", version: "0.0.330" };
|
|
134
134
|
/**
|
|
135
135
|
* Aspect for setting all removal policies to DESTROY
|
|
136
136
|
*/
|
|
@@ -43,8 +43,9 @@ into the log service. You can then access the raw log data when you need it.</p>
|
|
|
43
43
|
</ul>
|
|
44
44
|
|
|
45
45
|
## Installing
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
|
|
47
|
+
To install this package, use the CLI of your favorite package manager:
|
|
48
|
+
|
|
48
49
|
- `npm install @aws-sdk/client-cloudwatch-logs`
|
|
49
50
|
- `yarn add @aws-sdk/client-cloudwatch-logs`
|
|
50
51
|
- `pnpm add @aws-sdk/client-cloudwatch-logs`
|
|
@@ -69,15 +70,15 @@ import { CloudWatchLogsClient, ListAnomaliesCommand } from "@aws-sdk/client-clou
|
|
|
69
70
|
|
|
70
71
|
### Usage
|
|
71
72
|
|
|
72
|
-
To send a request
|
|
73
|
+
To send a request:
|
|
73
74
|
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
75
|
+
- Instantiate a client with configuration (e.g. credentials, region).
|
|
76
|
+
- See [docs/CLIENTS](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md) for configuration details.
|
|
77
|
+
- See [@aws-sdk/config](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/config/README.md) for additional options.
|
|
78
|
+
- Instantiate a command with input parameters.
|
|
79
|
+
- Call the `send` operation on the client, providing the command object as input.
|
|
78
80
|
|
|
79
81
|
```js
|
|
80
|
-
// a client can be shared by different commands.
|
|
81
82
|
const client = new CloudWatchLogsClient({ region: "REGION" });
|
|
82
83
|
|
|
83
84
|
const params = { /** input parameters */ };
|
|
@@ -86,7 +87,7 @@ const command = new ListAnomaliesCommand(params);
|
|
|
86
87
|
|
|
87
88
|
#### Async/await
|
|
88
89
|
|
|
89
|
-
We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
|
|
90
|
+
We recommend using the [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
|
|
90
91
|
operator to wait for the promise returned by send operation as follows:
|
|
91
92
|
|
|
92
93
|
```js
|
|
@@ -101,26 +102,9 @@ try {
|
|
|
101
102
|
}
|
|
102
103
|
```
|
|
103
104
|
|
|
104
|
-
Async-await is clean, concise, intuitive, easy to debug and has better error handling
|
|
105
|
-
as compared to using Promise chains or callbacks.
|
|
106
|
-
|
|
107
105
|
#### Promises
|
|
108
106
|
|
|
109
|
-
You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
|
|
110
|
-
to execute send operation.
|
|
111
|
-
|
|
112
|
-
```js
|
|
113
|
-
client.send(command).then(
|
|
114
|
-
(data) => {
|
|
115
|
-
// process data.
|
|
116
|
-
},
|
|
117
|
-
(error) => {
|
|
118
|
-
// error handling.
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Promises can also be called using `.catch()` and `.finally()` as follows:
|
|
107
|
+
You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining).
|
|
124
108
|
|
|
125
109
|
```js
|
|
126
110
|
client
|
|
@@ -136,27 +120,21 @@ client
|
|
|
136
120
|
});
|
|
137
121
|
```
|
|
138
122
|
|
|
139
|
-
####
|
|
140
|
-
|
|
141
|
-
We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
|
|
142
|
-
but they are supported by the send operation.
|
|
123
|
+
#### Aggregated client
|
|
143
124
|
|
|
144
|
-
|
|
145
|
-
// callbacks.
|
|
146
|
-
client.send(command, (err, data) => {
|
|
147
|
-
// process err and data.
|
|
148
|
-
});
|
|
149
|
-
```
|
|
125
|
+
The aggregated client class is exported from the same package, but without the "Client" suffix.
|
|
150
126
|
|
|
151
|
-
|
|
127
|
+
`CloudWatchLogs` extends `CloudWatchLogsClient` and additionally supports all operations, waiters, and paginators as methods.
|
|
128
|
+
This style may be familiar to you from the AWS SDK for JavaScript v2.
|
|
152
129
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
130
|
+
If you are bundling the AWS SDK, we recommend using only the bare-bones client (`CloudWatchLogsClient`).
|
|
131
|
+
More details are in the blog post on
|
|
132
|
+
[modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/).
|
|
156
133
|
|
|
157
134
|
```ts
|
|
158
|
-
import
|
|
159
|
-
|
|
135
|
+
import { CloudWatchLogs } from "@aws-sdk/client-cloudwatch-logs";
|
|
136
|
+
|
|
137
|
+
const client = new CloudWatchLogs({ region: "REGION" });
|
|
160
138
|
|
|
161
139
|
// async/await.
|
|
162
140
|
try {
|
|
@@ -176,7 +154,7 @@ client
|
|
|
176
154
|
// error handling.
|
|
177
155
|
});
|
|
178
156
|
|
|
179
|
-
// callbacks.
|
|
157
|
+
// callbacks (not recommended).
|
|
180
158
|
client.listAnomalies(params, (err, data) => {
|
|
181
159
|
// process err and data.
|
|
182
160
|
});
|
|
@@ -204,12 +182,14 @@ try {
|
|
|
204
182
|
}
|
|
205
183
|
```
|
|
206
184
|
|
|
185
|
+
See also [docs/ERROR_HANDLING](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/ERROR_HANDLING.md).
|
|
186
|
+
|
|
207
187
|
## Getting Help
|
|
208
188
|
|
|
209
189
|
Please use these community resources for getting help.
|
|
210
|
-
We use
|
|
190
|
+
We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
|
|
211
191
|
|
|
212
|
-
- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
|
|
192
|
+
- Visit the [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
|
|
213
193
|
or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
|
|
214
194
|
- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
|
|
215
195
|
on AWS Developer Blog.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-cloudwatch-logs",
|
|
3
3
|
"description": "AWS SDK for JavaScript Cloudwatch Logs Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1010.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-cloudwatch-logs",
|
|
@@ -27,49 +27,49 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
29
29
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
30
|
-
"@aws-sdk/core": "^3.973.
|
|
31
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
32
|
-
"@aws-sdk/middleware-host-header": "^3.972.
|
|
33
|
-
"@aws-sdk/middleware-logger": "^3.972.
|
|
34
|
-
"@aws-sdk/middleware-recursion-detection": "^3.972.
|
|
35
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
36
|
-
"@aws-sdk/region-config-resolver": "^3.972.
|
|
37
|
-
"@aws-sdk/types": "^3.973.
|
|
38
|
-
"@aws-sdk/util-endpoints": "^3.996.
|
|
39
|
-
"@aws-sdk/util-user-agent-browser": "^3.972.
|
|
40
|
-
"@aws-sdk/util-user-agent-node": "^3.973.
|
|
41
|
-
"@smithy/config-resolver": "^4.4.
|
|
42
|
-
"@smithy/core": "^3.23.
|
|
43
|
-
"@smithy/eventstream-serde-browser": "^4.2.
|
|
44
|
-
"@smithy/eventstream-serde-config-resolver": "^4.3.
|
|
45
|
-
"@smithy/eventstream-serde-node": "^4.2.
|
|
46
|
-
"@smithy/fetch-http-handler": "^5.3.
|
|
47
|
-
"@smithy/hash-node": "^4.2.
|
|
48
|
-
"@smithy/invalid-dependency": "^4.2.
|
|
49
|
-
"@smithy/middleware-content-length": "^4.2.
|
|
50
|
-
"@smithy/middleware-endpoint": "^4.4.
|
|
51
|
-
"@smithy/middleware-retry": "^4.4.
|
|
52
|
-
"@smithy/middleware-serde": "^4.2.
|
|
53
|
-
"@smithy/middleware-stack": "^4.2.
|
|
54
|
-
"@smithy/node-config-provider": "^4.3.
|
|
55
|
-
"@smithy/node-http-handler": "^4.4.
|
|
56
|
-
"@smithy/protocol-http": "^5.3.
|
|
57
|
-
"@smithy/smithy-client": "^4.12.
|
|
58
|
-
"@smithy/types": "^4.13.
|
|
59
|
-
"@smithy/url-parser": "^4.2.
|
|
30
|
+
"@aws-sdk/core": "^3.973.20",
|
|
31
|
+
"@aws-sdk/credential-provider-node": "^3.972.21",
|
|
32
|
+
"@aws-sdk/middleware-host-header": "^3.972.8",
|
|
33
|
+
"@aws-sdk/middleware-logger": "^3.972.8",
|
|
34
|
+
"@aws-sdk/middleware-recursion-detection": "^3.972.8",
|
|
35
|
+
"@aws-sdk/middleware-user-agent": "^3.972.21",
|
|
36
|
+
"@aws-sdk/region-config-resolver": "^3.972.8",
|
|
37
|
+
"@aws-sdk/types": "^3.973.6",
|
|
38
|
+
"@aws-sdk/util-endpoints": "^3.996.5",
|
|
39
|
+
"@aws-sdk/util-user-agent-browser": "^3.972.8",
|
|
40
|
+
"@aws-sdk/util-user-agent-node": "^3.973.7",
|
|
41
|
+
"@smithy/config-resolver": "^4.4.11",
|
|
42
|
+
"@smithy/core": "^3.23.11",
|
|
43
|
+
"@smithy/eventstream-serde-browser": "^4.2.12",
|
|
44
|
+
"@smithy/eventstream-serde-config-resolver": "^4.3.12",
|
|
45
|
+
"@smithy/eventstream-serde-node": "^4.2.12",
|
|
46
|
+
"@smithy/fetch-http-handler": "^5.3.15",
|
|
47
|
+
"@smithy/hash-node": "^4.2.12",
|
|
48
|
+
"@smithy/invalid-dependency": "^4.2.12",
|
|
49
|
+
"@smithy/middleware-content-length": "^4.2.12",
|
|
50
|
+
"@smithy/middleware-endpoint": "^4.4.25",
|
|
51
|
+
"@smithy/middleware-retry": "^4.4.42",
|
|
52
|
+
"@smithy/middleware-serde": "^4.2.14",
|
|
53
|
+
"@smithy/middleware-stack": "^4.2.12",
|
|
54
|
+
"@smithy/node-config-provider": "^4.3.12",
|
|
55
|
+
"@smithy/node-http-handler": "^4.4.16",
|
|
56
|
+
"@smithy/protocol-http": "^5.3.12",
|
|
57
|
+
"@smithy/smithy-client": "^4.12.5",
|
|
58
|
+
"@smithy/types": "^4.13.1",
|
|
59
|
+
"@smithy/url-parser": "^4.2.12",
|
|
60
60
|
"@smithy/util-base64": "^4.3.2",
|
|
61
61
|
"@smithy/util-body-length-browser": "^4.2.2",
|
|
62
62
|
"@smithy/util-body-length-node": "^4.2.3",
|
|
63
|
-
"@smithy/util-defaults-mode-browser": "^4.3.
|
|
64
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
65
|
-
"@smithy/util-endpoints": "^3.3.
|
|
66
|
-
"@smithy/util-middleware": "^4.2.
|
|
67
|
-
"@smithy/util-retry": "^4.2.
|
|
63
|
+
"@smithy/util-defaults-mode-browser": "^4.3.41",
|
|
64
|
+
"@smithy/util-defaults-mode-node": "^4.2.44",
|
|
65
|
+
"@smithy/util-endpoints": "^3.3.3",
|
|
66
|
+
"@smithy/util-middleware": "^4.2.12",
|
|
67
|
+
"@smithy/util-retry": "^4.2.12",
|
|
68
68
|
"@smithy/util-utf8": "^4.2.2",
|
|
69
69
|
"tslib": "^2.6.2"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@smithy/snapshot-testing": "^
|
|
72
|
+
"@smithy/snapshot-testing": "^2.0.2",
|
|
73
73
|
"@tsconfig/node20": "20.1.8",
|
|
74
74
|
"@types/node": "^20.14.8",
|
|
75
75
|
"concurrently": "7.0.0",
|
|
@@ -25,8 +25,9 @@ service.</p>
|
|
|
25
25
|
</ul>
|
|
26
26
|
|
|
27
27
|
## Installing
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
|
|
29
|
+
To install this package, use the CLI of your favorite package manager:
|
|
30
|
+
|
|
30
31
|
- `npm install @aws-sdk/client-route-53`
|
|
31
32
|
- `yarn add @aws-sdk/client-route-53`
|
|
32
33
|
- `pnpm add @aws-sdk/client-route-53`
|
|
@@ -51,15 +52,15 @@ import { Route53Client, ListGeoLocationsCommand } from "@aws-sdk/client-route-53
|
|
|
51
52
|
|
|
52
53
|
### Usage
|
|
53
54
|
|
|
54
|
-
To send a request
|
|
55
|
+
To send a request:
|
|
55
56
|
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
57
|
+
- Instantiate a client with configuration (e.g. credentials, region).
|
|
58
|
+
- See [docs/CLIENTS](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md) for configuration details.
|
|
59
|
+
- See [@aws-sdk/config](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/config/README.md) for additional options.
|
|
60
|
+
- Instantiate a command with input parameters.
|
|
61
|
+
- Call the `send` operation on the client, providing the command object as input.
|
|
60
62
|
|
|
61
63
|
```js
|
|
62
|
-
// a client can be shared by different commands.
|
|
63
64
|
const client = new Route53Client({ region: "REGION" });
|
|
64
65
|
|
|
65
66
|
const params = { /** input parameters */ };
|
|
@@ -68,7 +69,7 @@ const command = new ListGeoLocationsCommand(params);
|
|
|
68
69
|
|
|
69
70
|
#### Async/await
|
|
70
71
|
|
|
71
|
-
We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
|
|
72
|
+
We recommend using the [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
|
|
72
73
|
operator to wait for the promise returned by send operation as follows:
|
|
73
74
|
|
|
74
75
|
```js
|
|
@@ -83,26 +84,9 @@ try {
|
|
|
83
84
|
}
|
|
84
85
|
```
|
|
85
86
|
|
|
86
|
-
Async-await is clean, concise, intuitive, easy to debug and has better error handling
|
|
87
|
-
as compared to using Promise chains or callbacks.
|
|
88
|
-
|
|
89
87
|
#### Promises
|
|
90
88
|
|
|
91
|
-
You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
|
|
92
|
-
to execute send operation.
|
|
93
|
-
|
|
94
|
-
```js
|
|
95
|
-
client.send(command).then(
|
|
96
|
-
(data) => {
|
|
97
|
-
// process data.
|
|
98
|
-
},
|
|
99
|
-
(error) => {
|
|
100
|
-
// error handling.
|
|
101
|
-
}
|
|
102
|
-
);
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Promises can also be called using `.catch()` and `.finally()` as follows:
|
|
89
|
+
You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining).
|
|
106
90
|
|
|
107
91
|
```js
|
|
108
92
|
client
|
|
@@ -118,27 +102,21 @@ client
|
|
|
118
102
|
});
|
|
119
103
|
```
|
|
120
104
|
|
|
121
|
-
####
|
|
122
|
-
|
|
123
|
-
We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
|
|
124
|
-
but they are supported by the send operation.
|
|
105
|
+
#### Aggregated client
|
|
125
106
|
|
|
126
|
-
|
|
127
|
-
// callbacks.
|
|
128
|
-
client.send(command, (err, data) => {
|
|
129
|
-
// process err and data.
|
|
130
|
-
});
|
|
131
|
-
```
|
|
107
|
+
The aggregated client class is exported from the same package, but without the "Client" suffix.
|
|
132
108
|
|
|
133
|
-
|
|
109
|
+
`Route53` extends `Route53Client` and additionally supports all operations, waiters, and paginators as methods.
|
|
110
|
+
This style may be familiar to you from the AWS SDK for JavaScript v2.
|
|
134
111
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
112
|
+
If you are bundling the AWS SDK, we recommend using only the bare-bones client (`Route53Client`).
|
|
113
|
+
More details are in the blog post on
|
|
114
|
+
[modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/).
|
|
138
115
|
|
|
139
116
|
```ts
|
|
140
|
-
import
|
|
141
|
-
|
|
117
|
+
import { Route53 } from "@aws-sdk/client-route-53";
|
|
118
|
+
|
|
119
|
+
const client = new Route53({ region: "REGION" });
|
|
142
120
|
|
|
143
121
|
// async/await.
|
|
144
122
|
try {
|
|
@@ -158,7 +136,7 @@ client
|
|
|
158
136
|
// error handling.
|
|
159
137
|
});
|
|
160
138
|
|
|
161
|
-
// callbacks.
|
|
139
|
+
// callbacks (not recommended).
|
|
162
140
|
client.listGeoLocations(params, (err, data) => {
|
|
163
141
|
// process err and data.
|
|
164
142
|
});
|
|
@@ -186,12 +164,14 @@ try {
|
|
|
186
164
|
}
|
|
187
165
|
```
|
|
188
166
|
|
|
167
|
+
See also [docs/ERROR_HANDLING](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/ERROR_HANDLING.md).
|
|
168
|
+
|
|
189
169
|
## Getting Help
|
|
190
170
|
|
|
191
171
|
Please use these community resources for getting help.
|
|
192
|
-
We use
|
|
172
|
+
We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
|
|
193
173
|
|
|
194
|
-
- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
|
|
174
|
+
- Visit the [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
|
|
195
175
|
or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
|
|
196
176
|
- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
|
|
197
177
|
on AWS Developer Blog.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-route-53",
|
|
3
3
|
"description": "AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1010.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-route-53",
|
|
@@ -27,48 +27,48 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
29
29
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
30
|
-
"@aws-sdk/core": "^3.973.
|
|
31
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
32
|
-
"@aws-sdk/middleware-host-header": "^3.972.
|
|
33
|
-
"@aws-sdk/middleware-logger": "^3.972.
|
|
34
|
-
"@aws-sdk/middleware-recursion-detection": "^3.972.
|
|
35
|
-
"@aws-sdk/middleware-sdk-route53": "^3.972.
|
|
36
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
37
|
-
"@aws-sdk/region-config-resolver": "^3.972.
|
|
38
|
-
"@aws-sdk/types": "^3.973.
|
|
39
|
-
"@aws-sdk/util-endpoints": "^3.996.
|
|
40
|
-
"@aws-sdk/util-user-agent-browser": "^3.972.
|
|
41
|
-
"@aws-sdk/util-user-agent-node": "^3.973.
|
|
42
|
-
"@smithy/config-resolver": "^4.4.
|
|
43
|
-
"@smithy/core": "^3.23.
|
|
44
|
-
"@smithy/fetch-http-handler": "^5.3.
|
|
45
|
-
"@smithy/hash-node": "^4.2.
|
|
46
|
-
"@smithy/invalid-dependency": "^4.2.
|
|
47
|
-
"@smithy/middleware-content-length": "^4.2.
|
|
48
|
-
"@smithy/middleware-endpoint": "^4.4.
|
|
49
|
-
"@smithy/middleware-retry": "^4.4.
|
|
50
|
-
"@smithy/middleware-serde": "^4.2.
|
|
51
|
-
"@smithy/middleware-stack": "^4.2.
|
|
52
|
-
"@smithy/node-config-provider": "^4.3.
|
|
53
|
-
"@smithy/node-http-handler": "^4.4.
|
|
54
|
-
"@smithy/protocol-http": "^5.3.
|
|
55
|
-
"@smithy/smithy-client": "^4.12.
|
|
56
|
-
"@smithy/types": "^4.13.
|
|
57
|
-
"@smithy/url-parser": "^4.2.
|
|
30
|
+
"@aws-sdk/core": "^3.973.20",
|
|
31
|
+
"@aws-sdk/credential-provider-node": "^3.972.21",
|
|
32
|
+
"@aws-sdk/middleware-host-header": "^3.972.8",
|
|
33
|
+
"@aws-sdk/middleware-logger": "^3.972.8",
|
|
34
|
+
"@aws-sdk/middleware-recursion-detection": "^3.972.8",
|
|
35
|
+
"@aws-sdk/middleware-sdk-route53": "^3.972.10",
|
|
36
|
+
"@aws-sdk/middleware-user-agent": "^3.972.21",
|
|
37
|
+
"@aws-sdk/region-config-resolver": "^3.972.8",
|
|
38
|
+
"@aws-sdk/types": "^3.973.6",
|
|
39
|
+
"@aws-sdk/util-endpoints": "^3.996.5",
|
|
40
|
+
"@aws-sdk/util-user-agent-browser": "^3.972.8",
|
|
41
|
+
"@aws-sdk/util-user-agent-node": "^3.973.7",
|
|
42
|
+
"@smithy/config-resolver": "^4.4.11",
|
|
43
|
+
"@smithy/core": "^3.23.11",
|
|
44
|
+
"@smithy/fetch-http-handler": "^5.3.15",
|
|
45
|
+
"@smithy/hash-node": "^4.2.12",
|
|
46
|
+
"@smithy/invalid-dependency": "^4.2.12",
|
|
47
|
+
"@smithy/middleware-content-length": "^4.2.12",
|
|
48
|
+
"@smithy/middleware-endpoint": "^4.4.25",
|
|
49
|
+
"@smithy/middleware-retry": "^4.4.42",
|
|
50
|
+
"@smithy/middleware-serde": "^4.2.14",
|
|
51
|
+
"@smithy/middleware-stack": "^4.2.12",
|
|
52
|
+
"@smithy/node-config-provider": "^4.3.12",
|
|
53
|
+
"@smithy/node-http-handler": "^4.4.16",
|
|
54
|
+
"@smithy/protocol-http": "^5.3.12",
|
|
55
|
+
"@smithy/smithy-client": "^4.12.5",
|
|
56
|
+
"@smithy/types": "^4.13.1",
|
|
57
|
+
"@smithy/url-parser": "^4.2.12",
|
|
58
58
|
"@smithy/util-base64": "^4.3.2",
|
|
59
59
|
"@smithy/util-body-length-browser": "^4.2.2",
|
|
60
60
|
"@smithy/util-body-length-node": "^4.2.3",
|
|
61
|
-
"@smithy/util-defaults-mode-browser": "^4.3.
|
|
62
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
63
|
-
"@smithy/util-endpoints": "^3.3.
|
|
64
|
-
"@smithy/util-middleware": "^4.2.
|
|
65
|
-
"@smithy/util-retry": "^4.2.
|
|
61
|
+
"@smithy/util-defaults-mode-browser": "^4.3.41",
|
|
62
|
+
"@smithy/util-defaults-mode-node": "^4.2.44",
|
|
63
|
+
"@smithy/util-endpoints": "^3.3.3",
|
|
64
|
+
"@smithy/util-middleware": "^4.2.12",
|
|
65
|
+
"@smithy/util-retry": "^4.2.12",
|
|
66
66
|
"@smithy/util-utf8": "^4.2.2",
|
|
67
|
-
"@smithy/util-waiter": "^4.2.
|
|
67
|
+
"@smithy/util-waiter": "^4.2.13",
|
|
68
68
|
"tslib": "^2.6.2"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@smithy/snapshot-testing": "^
|
|
71
|
+
"@smithy/snapshot-testing": "^2.0.2",
|
|
72
72
|
"@tsconfig/node20": "20.1.8",
|
|
73
73
|
"@types/node": "^20.14.8",
|
|
74
74
|
"concurrently": "7.0.0",
|
|
@@ -9,8 +9,9 @@ AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native.
|
|
|
9
9
|
<p></p>
|
|
10
10
|
|
|
11
11
|
## Installing
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
|
|
13
|
+
To install this package, use the CLI of your favorite package manager:
|
|
14
|
+
|
|
14
15
|
- `npm install @aws-sdk/client-s3`
|
|
15
16
|
- `yarn add @aws-sdk/client-s3`
|
|
16
17
|
- `pnpm add @aws-sdk/client-s3`
|
|
@@ -35,15 +36,15 @@ import { S3Client, ListBucketsCommand } from "@aws-sdk/client-s3";
|
|
|
35
36
|
|
|
36
37
|
### Usage
|
|
37
38
|
|
|
38
|
-
To send a request
|
|
39
|
+
To send a request:
|
|
39
40
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
41
|
+
- Instantiate a client with configuration (e.g. credentials, region).
|
|
42
|
+
- See [docs/CLIENTS](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md) for configuration details.
|
|
43
|
+
- See [@aws-sdk/config](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/config/README.md) for additional options.
|
|
44
|
+
- Instantiate a command with input parameters.
|
|
45
|
+
- Call the `send` operation on the client, providing the command object as input.
|
|
44
46
|
|
|
45
47
|
```js
|
|
46
|
-
// a client can be shared by different commands.
|
|
47
48
|
const client = new S3Client({ region: "REGION" });
|
|
48
49
|
|
|
49
50
|
const params = { /** input parameters */ };
|
|
@@ -52,7 +53,7 @@ const command = new ListBucketsCommand(params);
|
|
|
52
53
|
|
|
53
54
|
#### Async/await
|
|
54
55
|
|
|
55
|
-
We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
|
|
56
|
+
We recommend using the [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
|
|
56
57
|
operator to wait for the promise returned by send operation as follows:
|
|
57
58
|
|
|
58
59
|
```js
|
|
@@ -67,26 +68,9 @@ try {
|
|
|
67
68
|
}
|
|
68
69
|
```
|
|
69
70
|
|
|
70
|
-
Async-await is clean, concise, intuitive, easy to debug and has better error handling
|
|
71
|
-
as compared to using Promise chains or callbacks.
|
|
72
|
-
|
|
73
71
|
#### Promises
|
|
74
72
|
|
|
75
|
-
You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
|
|
76
|
-
to execute send operation.
|
|
77
|
-
|
|
78
|
-
```js
|
|
79
|
-
client.send(command).then(
|
|
80
|
-
(data) => {
|
|
81
|
-
// process data.
|
|
82
|
-
},
|
|
83
|
-
(error) => {
|
|
84
|
-
// error handling.
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Promises can also be called using `.catch()` and `.finally()` as follows:
|
|
73
|
+
You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining).
|
|
90
74
|
|
|
91
75
|
```js
|
|
92
76
|
client
|
|
@@ -102,27 +86,21 @@ client
|
|
|
102
86
|
});
|
|
103
87
|
```
|
|
104
88
|
|
|
105
|
-
####
|
|
106
|
-
|
|
107
|
-
We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
|
|
108
|
-
but they are supported by the send operation.
|
|
89
|
+
#### Aggregated client
|
|
109
90
|
|
|
110
|
-
|
|
111
|
-
// callbacks.
|
|
112
|
-
client.send(command, (err, data) => {
|
|
113
|
-
// process err and data.
|
|
114
|
-
});
|
|
115
|
-
```
|
|
91
|
+
The aggregated client class is exported from the same package, but without the "Client" suffix.
|
|
116
92
|
|
|
117
|
-
|
|
93
|
+
`S3` extends `S3Client` and additionally supports all operations, waiters, and paginators as methods.
|
|
94
|
+
This style may be familiar to you from the AWS SDK for JavaScript v2.
|
|
118
95
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
96
|
+
If you are bundling the AWS SDK, we recommend using only the bare-bones client (`S3Client`).
|
|
97
|
+
More details are in the blog post on
|
|
98
|
+
[modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/).
|
|
122
99
|
|
|
123
100
|
```ts
|
|
124
|
-
import
|
|
125
|
-
|
|
101
|
+
import { S3 } from "@aws-sdk/client-s3";
|
|
102
|
+
|
|
103
|
+
const client = new S3({ region: "REGION" });
|
|
126
104
|
|
|
127
105
|
// async/await.
|
|
128
106
|
try {
|
|
@@ -142,7 +120,7 @@ client
|
|
|
142
120
|
// error handling.
|
|
143
121
|
});
|
|
144
122
|
|
|
145
|
-
// callbacks.
|
|
123
|
+
// callbacks (not recommended).
|
|
146
124
|
client.listBuckets(params, (err, data) => {
|
|
147
125
|
// process err and data.
|
|
148
126
|
});
|
|
@@ -170,12 +148,14 @@ try {
|
|
|
170
148
|
}
|
|
171
149
|
```
|
|
172
150
|
|
|
151
|
+
See also [docs/ERROR_HANDLING](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/ERROR_HANDLING.md).
|
|
152
|
+
|
|
173
153
|
## Getting Help
|
|
174
154
|
|
|
175
155
|
Please use these community resources for getting help.
|
|
176
|
-
We use
|
|
156
|
+
We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
|
|
177
157
|
|
|
178
|
-
- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
|
|
158
|
+
- Visit the [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
|
|
179
159
|
or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
|
|
180
160
|
- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
|
|
181
161
|
on AWS Developer Blog.
|
|
@@ -2526,6 +2526,10 @@ const BucketCannedACL = {
|
|
|
2526
2526
|
public_read: "public-read",
|
|
2527
2527
|
public_read_write: "public-read-write",
|
|
2528
2528
|
};
|
|
2529
|
+
const BucketNamespace = {
|
|
2530
|
+
ACCOUNT_REGIONAL: "account-regional",
|
|
2531
|
+
GLOBAL: "global",
|
|
2532
|
+
};
|
|
2529
2533
|
const DataRedundancy = {
|
|
2530
2534
|
SingleAvailabilityZone: "SingleAvailabilityZone",
|
|
2531
2535
|
SingleLocalZone: "SingleLocalZone",
|
|
@@ -2845,6 +2849,7 @@ exports.BucketAccelerateStatus = BucketAccelerateStatus;
|
|
|
2845
2849
|
exports.BucketCannedACL = BucketCannedACL;
|
|
2846
2850
|
exports.BucketLocationConstraint = BucketLocationConstraint;
|
|
2847
2851
|
exports.BucketLogsPermission = BucketLogsPermission;
|
|
2852
|
+
exports.BucketNamespace = BucketNamespace;
|
|
2848
2853
|
exports.BucketType = BucketType;
|
|
2849
2854
|
exports.BucketVersioningStatus = BucketVersioningStatus;
|
|
2850
2855
|
exports.ChecksumAlgorithm = ChecksumAlgorithm;
|