@aws-sdk/client-glacier 3.1008.0 → 3.1009.0
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/README.md +26 -46
- package/package.json +38 -38
package/README.md
CHANGED
|
@@ -46,8 +46,9 @@ retrieving the job output, and deleting archives.</p>
|
|
|
46
46
|
</ul>
|
|
47
47
|
|
|
48
48
|
## Installing
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
|
|
50
|
+
To install this package, use the CLI of your favorite package manager:
|
|
51
|
+
|
|
51
52
|
- `npm install @aws-sdk/client-glacier`
|
|
52
53
|
- `yarn add @aws-sdk/client-glacier`
|
|
53
54
|
- `pnpm add @aws-sdk/client-glacier`
|
|
@@ -72,15 +73,15 @@ import { GlacierClient, ListVaultsCommand } from "@aws-sdk/client-glacier";
|
|
|
72
73
|
|
|
73
74
|
### Usage
|
|
74
75
|
|
|
75
|
-
To send a request
|
|
76
|
+
To send a request:
|
|
76
77
|
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
78
|
+
- Instantiate a client with configuration (e.g. credentials, region).
|
|
79
|
+
- See [docs/CLIENTS](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md) for configuration details.
|
|
80
|
+
- See [@aws-sdk/config](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/config/README.md) for additional options.
|
|
81
|
+
- Instantiate a command with input parameters.
|
|
82
|
+
- Call the `send` operation on the client, providing the command object as input.
|
|
81
83
|
|
|
82
84
|
```js
|
|
83
|
-
// a client can be shared by different commands.
|
|
84
85
|
const client = new GlacierClient({ region: "REGION" });
|
|
85
86
|
|
|
86
87
|
const params = { /** input parameters */ };
|
|
@@ -89,7 +90,7 @@ const command = new ListVaultsCommand(params);
|
|
|
89
90
|
|
|
90
91
|
#### Async/await
|
|
91
92
|
|
|
92
|
-
We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
|
|
93
|
+
We recommend using the [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
|
|
93
94
|
operator to wait for the promise returned by send operation as follows:
|
|
94
95
|
|
|
95
96
|
```js
|
|
@@ -104,26 +105,9 @@ try {
|
|
|
104
105
|
}
|
|
105
106
|
```
|
|
106
107
|
|
|
107
|
-
Async-await is clean, concise, intuitive, easy to debug and has better error handling
|
|
108
|
-
as compared to using Promise chains or callbacks.
|
|
109
|
-
|
|
110
108
|
#### Promises
|
|
111
109
|
|
|
112
|
-
You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
|
|
113
|
-
to execute send operation.
|
|
114
|
-
|
|
115
|
-
```js
|
|
116
|
-
client.send(command).then(
|
|
117
|
-
(data) => {
|
|
118
|
-
// process data.
|
|
119
|
-
},
|
|
120
|
-
(error) => {
|
|
121
|
-
// error handling.
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Promises can also be called using `.catch()` and `.finally()` as follows:
|
|
110
|
+
You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining).
|
|
127
111
|
|
|
128
112
|
```js
|
|
129
113
|
client
|
|
@@ -139,27 +123,21 @@ client
|
|
|
139
123
|
});
|
|
140
124
|
```
|
|
141
125
|
|
|
142
|
-
####
|
|
143
|
-
|
|
144
|
-
We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
|
|
145
|
-
but they are supported by the send operation.
|
|
126
|
+
#### Aggregated client
|
|
146
127
|
|
|
147
|
-
|
|
148
|
-
// callbacks.
|
|
149
|
-
client.send(command, (err, data) => {
|
|
150
|
-
// process err and data.
|
|
151
|
-
});
|
|
152
|
-
```
|
|
128
|
+
The aggregated client class is exported from the same package, but without the "Client" suffix.
|
|
153
129
|
|
|
154
|
-
|
|
130
|
+
`Glacier` extends `GlacierClient` and additionally supports all operations, waiters, and paginators as methods.
|
|
131
|
+
This style may be familiar to you from the AWS SDK for JavaScript v2.
|
|
155
132
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
133
|
+
If you are bundling the AWS SDK, we recommend using only the bare-bones client (`GlacierClient`).
|
|
134
|
+
More details are in the blog post on
|
|
135
|
+
[modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/).
|
|
159
136
|
|
|
160
137
|
```ts
|
|
161
|
-
import
|
|
162
|
-
|
|
138
|
+
import { Glacier } from "@aws-sdk/client-glacier";
|
|
139
|
+
|
|
140
|
+
const client = new Glacier({ region: "REGION" });
|
|
163
141
|
|
|
164
142
|
// async/await.
|
|
165
143
|
try {
|
|
@@ -179,7 +157,7 @@ client
|
|
|
179
157
|
// error handling.
|
|
180
158
|
});
|
|
181
159
|
|
|
182
|
-
// callbacks.
|
|
160
|
+
// callbacks (not recommended).
|
|
183
161
|
client.listVaults(params, (err, data) => {
|
|
184
162
|
// process err and data.
|
|
185
163
|
});
|
|
@@ -207,12 +185,14 @@ try {
|
|
|
207
185
|
}
|
|
208
186
|
```
|
|
209
187
|
|
|
188
|
+
See also [docs/ERROR_HANDLING](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/ERROR_HANDLING.md).
|
|
189
|
+
|
|
210
190
|
## Getting Help
|
|
211
191
|
|
|
212
192
|
Please use these community resources for getting help.
|
|
213
|
-
We use
|
|
193
|
+
We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
|
|
214
194
|
|
|
215
|
-
- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
|
|
195
|
+
- Visit the [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
|
|
216
196
|
or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
|
|
217
197
|
- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
|
|
218
198
|
on AWS Developer Blog.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-glacier",
|
|
3
3
|
"description": "AWS SDK for JavaScript Glacier Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1009.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-glacier",
|
|
@@ -21,47 +21,47 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
24
|
-
"@aws-sdk/body-checksum-browser": "^3.972.
|
|
25
|
-
"@aws-sdk/body-checksum-node": "^3.972.
|
|
26
|
-
"@aws-sdk/core": "^3.973.
|
|
27
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
28
|
-
"@aws-sdk/middleware-host-header": "^3.972.
|
|
29
|
-
"@aws-sdk/middleware-logger": "^3.972.
|
|
30
|
-
"@aws-sdk/middleware-recursion-detection": "^3.972.
|
|
31
|
-
"@aws-sdk/middleware-sdk-glacier": "^3.972.
|
|
32
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
33
|
-
"@aws-sdk/region-config-resolver": "^3.972.
|
|
34
|
-
"@aws-sdk/types": "^3.973.
|
|
35
|
-
"@aws-sdk/util-endpoints": "^3.996.
|
|
36
|
-
"@aws-sdk/util-user-agent-browser": "^3.972.
|
|
37
|
-
"@aws-sdk/util-user-agent-node": "^3.973.
|
|
38
|
-
"@smithy/config-resolver": "^4.4.
|
|
39
|
-
"@smithy/core": "^3.23.
|
|
40
|
-
"@smithy/fetch-http-handler": "^5.3.
|
|
41
|
-
"@smithy/hash-node": "^4.2.
|
|
42
|
-
"@smithy/invalid-dependency": "^4.2.
|
|
43
|
-
"@smithy/middleware-content-length": "^4.2.
|
|
44
|
-
"@smithy/middleware-endpoint": "^4.4.
|
|
45
|
-
"@smithy/middleware-retry": "^4.4.
|
|
46
|
-
"@smithy/middleware-serde": "^4.2.
|
|
47
|
-
"@smithy/middleware-stack": "^4.2.
|
|
48
|
-
"@smithy/node-config-provider": "^4.3.
|
|
49
|
-
"@smithy/node-http-handler": "^4.4.
|
|
50
|
-
"@smithy/protocol-http": "^5.3.
|
|
51
|
-
"@smithy/smithy-client": "^4.12.
|
|
52
|
-
"@smithy/types": "^4.13.
|
|
53
|
-
"@smithy/url-parser": "^4.2.
|
|
24
|
+
"@aws-sdk/body-checksum-browser": "^3.972.8",
|
|
25
|
+
"@aws-sdk/body-checksum-node": "^3.972.8",
|
|
26
|
+
"@aws-sdk/core": "^3.973.20",
|
|
27
|
+
"@aws-sdk/credential-provider-node": "^3.972.21",
|
|
28
|
+
"@aws-sdk/middleware-host-header": "^3.972.8",
|
|
29
|
+
"@aws-sdk/middleware-logger": "^3.972.8",
|
|
30
|
+
"@aws-sdk/middleware-recursion-detection": "^3.972.8",
|
|
31
|
+
"@aws-sdk/middleware-sdk-glacier": "^3.972.8",
|
|
32
|
+
"@aws-sdk/middleware-user-agent": "^3.972.21",
|
|
33
|
+
"@aws-sdk/region-config-resolver": "^3.972.8",
|
|
34
|
+
"@aws-sdk/types": "^3.973.6",
|
|
35
|
+
"@aws-sdk/util-endpoints": "^3.996.5",
|
|
36
|
+
"@aws-sdk/util-user-agent-browser": "^3.972.8",
|
|
37
|
+
"@aws-sdk/util-user-agent-node": "^3.973.7",
|
|
38
|
+
"@smithy/config-resolver": "^4.4.11",
|
|
39
|
+
"@smithy/core": "^3.23.11",
|
|
40
|
+
"@smithy/fetch-http-handler": "^5.3.15",
|
|
41
|
+
"@smithy/hash-node": "^4.2.12",
|
|
42
|
+
"@smithy/invalid-dependency": "^4.2.12",
|
|
43
|
+
"@smithy/middleware-content-length": "^4.2.12",
|
|
44
|
+
"@smithy/middleware-endpoint": "^4.4.25",
|
|
45
|
+
"@smithy/middleware-retry": "^4.4.42",
|
|
46
|
+
"@smithy/middleware-serde": "^4.2.14",
|
|
47
|
+
"@smithy/middleware-stack": "^4.2.12",
|
|
48
|
+
"@smithy/node-config-provider": "^4.3.12",
|
|
49
|
+
"@smithy/node-http-handler": "^4.4.16",
|
|
50
|
+
"@smithy/protocol-http": "^5.3.12",
|
|
51
|
+
"@smithy/smithy-client": "^4.12.5",
|
|
52
|
+
"@smithy/types": "^4.13.1",
|
|
53
|
+
"@smithy/url-parser": "^4.2.12",
|
|
54
54
|
"@smithy/util-base64": "^4.3.2",
|
|
55
55
|
"@smithy/util-body-length-browser": "^4.2.2",
|
|
56
56
|
"@smithy/util-body-length-node": "^4.2.3",
|
|
57
|
-
"@smithy/util-defaults-mode-browser": "^4.3.
|
|
58
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
59
|
-
"@smithy/util-endpoints": "^3.3.
|
|
60
|
-
"@smithy/util-middleware": "^4.2.
|
|
61
|
-
"@smithy/util-retry": "^4.2.
|
|
62
|
-
"@smithy/util-stream": "^4.5.
|
|
57
|
+
"@smithy/util-defaults-mode-browser": "^4.3.41",
|
|
58
|
+
"@smithy/util-defaults-mode-node": "^4.2.44",
|
|
59
|
+
"@smithy/util-endpoints": "^3.3.3",
|
|
60
|
+
"@smithy/util-middleware": "^4.2.12",
|
|
61
|
+
"@smithy/util-retry": "^4.2.12",
|
|
62
|
+
"@smithy/util-stream": "^4.5.19",
|
|
63
63
|
"@smithy/util-utf8": "^4.2.2",
|
|
64
|
-
"@smithy/util-waiter": "^4.2.
|
|
64
|
+
"@smithy/util-waiter": "^4.2.13",
|
|
65
65
|
"tslib": "^2.6.2"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|