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