@aws-sdk/client-networkmonitor 3.928.0 → 3.930.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.
Files changed (33) hide show
  1. package/dist-cjs/index.js +505 -627
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/NetworkMonitorClient.js +2 -0
  4. package/dist-es/commands/CreateMonitorCommand.js +3 -9
  5. package/dist-es/commands/CreateProbeCommand.js +3 -9
  6. package/dist-es/commands/DeleteMonitorCommand.js +3 -9
  7. package/dist-es/commands/DeleteProbeCommand.js +3 -9
  8. package/dist-es/commands/GetMonitorCommand.js +3 -9
  9. package/dist-es/commands/GetProbeCommand.js +3 -9
  10. package/dist-es/commands/ListMonitorsCommand.js +3 -9
  11. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  12. package/dist-es/commands/TagResourceCommand.js +3 -9
  13. package/dist-es/commands/UntagResourceCommand.js +3 -9
  14. package/dist-es/commands/UpdateMonitorCommand.js +3 -9
  15. package/dist-es/commands/UpdateProbeCommand.js +3 -9
  16. package/dist-es/runtimeConfig.shared.js +2 -0
  17. package/dist-es/schemas/schemas_0.js +465 -0
  18. package/dist-types/NetworkMonitorClient.d.ts +10 -1
  19. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  20. package/dist-types/runtimeConfig.d.ts +1 -0
  21. package/dist-types/runtimeConfig.native.d.ts +1 -0
  22. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  23. package/dist-types/schemas/schemas_0.d.ts +55 -0
  24. package/dist-types/ts3.4/NetworkMonitorClient.d.ts +4 -0
  25. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  26. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  27. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  28. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  29. package/dist-types/ts3.4/schemas/schemas_0.d.ts +60 -0
  30. package/package.json +33 -34
  31. package/dist-es/protocols/Aws_restJson1.js +0 -527
  32. package/dist-types/protocols/Aws_restJson1.d.ts +0 -110
  33. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -149
@@ -0,0 +1,60 @@
1
+ import {
2
+ StaticErrorSchema,
3
+ StaticListSchema,
4
+ StaticOperationSchema,
5
+ StaticStructureSchema,
6
+ } from "@smithy/types";
7
+ export declare var AccessDeniedException: StaticErrorSchema;
8
+ export declare var ConflictException: StaticErrorSchema;
9
+ export declare var CreateMonitorInput: StaticStructureSchema;
10
+ export declare var CreateMonitorOutput: StaticStructureSchema;
11
+ export declare var CreateMonitorProbeInput: StaticStructureSchema;
12
+ export declare var CreateProbeInput: StaticStructureSchema;
13
+ export declare var CreateProbeOutput: StaticStructureSchema;
14
+ export declare var DeleteMonitorInput: StaticStructureSchema;
15
+ export declare var DeleteMonitorOutput: StaticStructureSchema;
16
+ export declare var DeleteProbeInput: StaticStructureSchema;
17
+ export declare var DeleteProbeOutput: StaticStructureSchema;
18
+ export declare var GetMonitorInput: StaticStructureSchema;
19
+ export declare var GetMonitorOutput: StaticStructureSchema;
20
+ export declare var GetProbeInput: StaticStructureSchema;
21
+ export declare var GetProbeOutput: StaticStructureSchema;
22
+ export declare var InternalServerException: StaticErrorSchema;
23
+ export declare var ListMonitorsInput: StaticStructureSchema;
24
+ export declare var ListMonitorsOutput: StaticStructureSchema;
25
+ export declare var ListTagsForResourceInput: StaticStructureSchema;
26
+ export declare var ListTagsForResourceOutput: StaticStructureSchema;
27
+ export declare var MonitorSummary: StaticStructureSchema;
28
+ export declare var Probe: StaticStructureSchema;
29
+ export declare var ProbeInput: StaticStructureSchema;
30
+ export declare var ResourceNotFoundException: StaticErrorSchema;
31
+ export declare var ServiceQuotaExceededException: StaticErrorSchema;
32
+ export declare var TagResourceInput: StaticStructureSchema;
33
+ export declare var TagResourceOutput: StaticStructureSchema;
34
+ export declare var ThrottlingException: StaticErrorSchema;
35
+ export declare var UntagResourceInput: StaticStructureSchema;
36
+ export declare var UntagResourceOutput: StaticStructureSchema;
37
+ export declare var UpdateMonitorInput: StaticStructureSchema;
38
+ export declare var UpdateMonitorOutput: StaticStructureSchema;
39
+ export declare var UpdateProbeInput: StaticStructureSchema;
40
+ export declare var UpdateProbeOutput: StaticStructureSchema;
41
+ export declare var ValidationException: StaticErrorSchema;
42
+ export declare var __Unit: "unit";
43
+ export declare var NetworkMonitorServiceException: StaticErrorSchema;
44
+ export declare var CreateMonitorProbeInputList: StaticListSchema;
45
+ export declare var MonitorList: StaticListSchema;
46
+ export declare var ProbeList: StaticListSchema;
47
+ export declare var TagKeyList: number;
48
+ export declare var TagMap: number;
49
+ export declare var CreateMonitor: StaticOperationSchema;
50
+ export declare var CreateProbe: StaticOperationSchema;
51
+ export declare var DeleteMonitor: StaticOperationSchema;
52
+ export declare var DeleteProbe: StaticOperationSchema;
53
+ export declare var GetMonitor: StaticOperationSchema;
54
+ export declare var GetProbe: StaticOperationSchema;
55
+ export declare var ListMonitors: StaticOperationSchema;
56
+ export declare var ListTagsForResource: StaticOperationSchema;
57
+ export declare var TagResource: StaticOperationSchema;
58
+ export declare var UntagResource: StaticOperationSchema;
59
+ export declare var UpdateMonitor: StaticOperationSchema;
60
+ export declare var UpdateProbe: StaticOperationSchema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-networkmonitor",
3
3
  "description": "AWS SDK for JavaScript Networkmonitor Client for Node.js, Browser and React Native",
4
- "version": "3.928.0",
4
+ "version": "3.930.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-networkmonitor",
@@ -20,43 +20,42 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "3.928.0",
24
- "@aws-sdk/credential-provider-node": "3.928.0",
25
- "@aws-sdk/middleware-host-header": "3.922.0",
26
- "@aws-sdk/middleware-logger": "3.922.0",
27
- "@aws-sdk/middleware-recursion-detection": "3.922.0",
28
- "@aws-sdk/middleware-user-agent": "3.928.0",
29
- "@aws-sdk/region-config-resolver": "3.925.0",
30
- "@aws-sdk/types": "3.922.0",
31
- "@aws-sdk/util-endpoints": "3.922.0",
32
- "@aws-sdk/util-user-agent-browser": "3.922.0",
33
- "@aws-sdk/util-user-agent-node": "3.928.0",
34
- "@smithy/config-resolver": "^4.4.2",
35
- "@smithy/core": "^3.17.2",
36
- "@smithy/fetch-http-handler": "^5.3.5",
37
- "@smithy/hash-node": "^4.2.4",
38
- "@smithy/invalid-dependency": "^4.2.4",
39
- "@smithy/middleware-content-length": "^4.2.4",
40
- "@smithy/middleware-endpoint": "^4.3.6",
41
- "@smithy/middleware-retry": "^4.4.6",
42
- "@smithy/middleware-serde": "^4.2.4",
43
- "@smithy/middleware-stack": "^4.2.4",
44
- "@smithy/node-config-provider": "^4.3.4",
45
- "@smithy/node-http-handler": "^4.4.4",
46
- "@smithy/protocol-http": "^5.3.4",
47
- "@smithy/smithy-client": "^4.9.2",
48
- "@smithy/types": "^4.8.1",
49
- "@smithy/url-parser": "^4.2.4",
23
+ "@aws-sdk/core": "3.930.0",
24
+ "@aws-sdk/credential-provider-node": "3.930.0",
25
+ "@aws-sdk/middleware-host-header": "3.930.0",
26
+ "@aws-sdk/middleware-logger": "3.930.0",
27
+ "@aws-sdk/middleware-recursion-detection": "3.930.0",
28
+ "@aws-sdk/middleware-user-agent": "3.930.0",
29
+ "@aws-sdk/region-config-resolver": "3.930.0",
30
+ "@aws-sdk/types": "3.930.0",
31
+ "@aws-sdk/util-endpoints": "3.930.0",
32
+ "@aws-sdk/util-user-agent-browser": "3.930.0",
33
+ "@aws-sdk/util-user-agent-node": "3.930.0",
34
+ "@smithy/config-resolver": "^4.4.3",
35
+ "@smithy/core": "^3.18.2",
36
+ "@smithy/fetch-http-handler": "^5.3.6",
37
+ "@smithy/hash-node": "^4.2.5",
38
+ "@smithy/invalid-dependency": "^4.2.5",
39
+ "@smithy/middleware-content-length": "^4.2.5",
40
+ "@smithy/middleware-endpoint": "^4.3.9",
41
+ "@smithy/middleware-retry": "^4.4.9",
42
+ "@smithy/middleware-serde": "^4.2.5",
43
+ "@smithy/middleware-stack": "^4.2.5",
44
+ "@smithy/node-config-provider": "^4.3.5",
45
+ "@smithy/node-http-handler": "^4.4.5",
46
+ "@smithy/protocol-http": "^5.3.5",
47
+ "@smithy/smithy-client": "^4.9.5",
48
+ "@smithy/types": "^4.9.0",
49
+ "@smithy/url-parser": "^4.2.5",
50
50
  "@smithy/util-base64": "^4.3.0",
51
51
  "@smithy/util-body-length-browser": "^4.2.0",
52
52
  "@smithy/util-body-length-node": "^4.2.1",
53
- "@smithy/util-defaults-mode-browser": "^4.3.5",
54
- "@smithy/util-defaults-mode-node": "^4.2.8",
55
- "@smithy/util-endpoints": "^3.2.4",
56
- "@smithy/util-middleware": "^4.2.4",
57
- "@smithy/util-retry": "^4.2.4",
53
+ "@smithy/util-defaults-mode-browser": "^4.3.8",
54
+ "@smithy/util-defaults-mode-node": "^4.2.11",
55
+ "@smithy/util-endpoints": "^3.2.5",
56
+ "@smithy/util-middleware": "^4.2.5",
57
+ "@smithy/util-retry": "^4.2.5",
58
58
  "@smithy/util-utf8": "^4.2.0",
59
- "@smithy/uuid": "^1.1.0",
60
59
  "tslib": "^2.6.2"
61
60
  },
62
61
  "devDependencies": {
@@ -1,527 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
- import { NetworkMonitorServiceException as __BaseException } from "../models/NetworkMonitorServiceException";
7
- export const se_CreateMonitorCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {
10
- "content-type": "application/json",
11
- };
12
- b.bp("/monitors");
13
- let body;
14
- body = JSON.stringify(take(input, {
15
- aggregationPeriod: [],
16
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
17
- monitorName: [],
18
- probes: (_) => _json(_),
19
- tags: (_) => _json(_),
20
- }));
21
- b.m("POST").h(headers).b(body);
22
- return b.build();
23
- };
24
- export const se_CreateProbeCommand = async (input, context) => {
25
- const b = rb(input, context);
26
- const headers = {
27
- "content-type": "application/json",
28
- };
29
- b.bp("/monitors/{monitorName}/probes");
30
- b.p("monitorName", () => input.monitorName, "{monitorName}", false);
31
- let body;
32
- body = JSON.stringify(take(input, {
33
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
34
- probe: (_) => _json(_),
35
- tags: (_) => _json(_),
36
- }));
37
- b.m("POST").h(headers).b(body);
38
- return b.build();
39
- };
40
- export const se_DeleteMonitorCommand = async (input, context) => {
41
- const b = rb(input, context);
42
- const headers = {};
43
- b.bp("/monitors/{monitorName}");
44
- b.p("monitorName", () => input.monitorName, "{monitorName}", false);
45
- let body;
46
- b.m("DELETE").h(headers).b(body);
47
- return b.build();
48
- };
49
- export const se_DeleteProbeCommand = async (input, context) => {
50
- const b = rb(input, context);
51
- const headers = {};
52
- b.bp("/monitors/{monitorName}/probes/{probeId}");
53
- b.p("monitorName", () => input.monitorName, "{monitorName}", false);
54
- b.p("probeId", () => input.probeId, "{probeId}", false);
55
- let body;
56
- b.m("DELETE").h(headers).b(body);
57
- return b.build();
58
- };
59
- export const se_GetMonitorCommand = async (input, context) => {
60
- const b = rb(input, context);
61
- const headers = {};
62
- b.bp("/monitors/{monitorName}");
63
- b.p("monitorName", () => input.monitorName, "{monitorName}", false);
64
- let body;
65
- b.m("GET").h(headers).b(body);
66
- return b.build();
67
- };
68
- export const se_GetProbeCommand = async (input, context) => {
69
- const b = rb(input, context);
70
- const headers = {};
71
- b.bp("/monitors/{monitorName}/probes/{probeId}");
72
- b.p("monitorName", () => input.monitorName, "{monitorName}", false);
73
- b.p("probeId", () => input.probeId, "{probeId}", false);
74
- let body;
75
- b.m("GET").h(headers).b(body);
76
- return b.build();
77
- };
78
- export const se_ListMonitorsCommand = async (input, context) => {
79
- const b = rb(input, context);
80
- const headers = {};
81
- b.bp("/monitors");
82
- const query = map({
83
- [_nT]: [, input[_nT]],
84
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
85
- [_s]: [, input[_s]],
86
- });
87
- let body;
88
- b.m("GET").h(headers).q(query).b(body);
89
- return b.build();
90
- };
91
- export const se_ListTagsForResourceCommand = async (input, context) => {
92
- const b = rb(input, context);
93
- const headers = {};
94
- b.bp("/tags/{resourceArn}");
95
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
96
- let body;
97
- b.m("GET").h(headers).b(body);
98
- return b.build();
99
- };
100
- export const se_TagResourceCommand = async (input, context) => {
101
- const b = rb(input, context);
102
- const headers = {
103
- "content-type": "application/json",
104
- };
105
- b.bp("/tags/{resourceArn}");
106
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
107
- let body;
108
- body = JSON.stringify(take(input, {
109
- tags: (_) => _json(_),
110
- }));
111
- b.m("POST").h(headers).b(body);
112
- return b.build();
113
- };
114
- export const se_UntagResourceCommand = async (input, context) => {
115
- const b = rb(input, context);
116
- const headers = {};
117
- b.bp("/tags/{resourceArn}");
118
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
119
- const query = map({
120
- [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
121
- });
122
- let body;
123
- b.m("DELETE").h(headers).q(query).b(body);
124
- return b.build();
125
- };
126
- export const se_UpdateMonitorCommand = async (input, context) => {
127
- const b = rb(input, context);
128
- const headers = {
129
- "content-type": "application/json",
130
- };
131
- b.bp("/monitors/{monitorName}");
132
- b.p("monitorName", () => input.monitorName, "{monitorName}", false);
133
- let body;
134
- body = JSON.stringify(take(input, {
135
- aggregationPeriod: [],
136
- }));
137
- b.m("PATCH").h(headers).b(body);
138
- return b.build();
139
- };
140
- export const se_UpdateProbeCommand = async (input, context) => {
141
- const b = rb(input, context);
142
- const headers = {
143
- "content-type": "application/json",
144
- };
145
- b.bp("/monitors/{monitorName}/probes/{probeId}");
146
- b.p("monitorName", () => input.monitorName, "{monitorName}", false);
147
- b.p("probeId", () => input.probeId, "{probeId}", false);
148
- let body;
149
- body = JSON.stringify(take(input, {
150
- destination: [],
151
- destinationPort: [],
152
- packetSize: [],
153
- protocol: [],
154
- state: [],
155
- }));
156
- b.m("PATCH").h(headers).b(body);
157
- return b.build();
158
- };
159
- export const de_CreateMonitorCommand = async (output, context) => {
160
- if (output.statusCode !== 200 && output.statusCode >= 300) {
161
- return de_CommandError(output, context);
162
- }
163
- const contents = map({
164
- $metadata: deserializeMetadata(output),
165
- });
166
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
167
- const doc = take(data, {
168
- aggregationPeriod: __expectLong,
169
- monitorArn: __expectString,
170
- monitorName: __expectString,
171
- state: __expectString,
172
- tags: _json,
173
- });
174
- Object.assign(contents, doc);
175
- return contents;
176
- };
177
- export const de_CreateProbeCommand = async (output, context) => {
178
- if (output.statusCode !== 200 && output.statusCode >= 300) {
179
- return de_CommandError(output, context);
180
- }
181
- const contents = map({
182
- $metadata: deserializeMetadata(output),
183
- });
184
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
185
- const doc = take(data, {
186
- addressFamily: __expectString,
187
- createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
188
- destination: __expectString,
189
- destinationPort: __expectInt32,
190
- modifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
191
- packetSize: __expectInt32,
192
- probeArn: __expectString,
193
- probeId: __expectString,
194
- protocol: __expectString,
195
- sourceArn: __expectString,
196
- state: __expectString,
197
- tags: _json,
198
- vpcId: __expectString,
199
- });
200
- Object.assign(contents, doc);
201
- return contents;
202
- };
203
- export const de_DeleteMonitorCommand = async (output, context) => {
204
- if (output.statusCode !== 200 && output.statusCode >= 300) {
205
- return de_CommandError(output, context);
206
- }
207
- const contents = map({
208
- $metadata: deserializeMetadata(output),
209
- });
210
- await collectBody(output.body, context);
211
- return contents;
212
- };
213
- export const de_DeleteProbeCommand = async (output, context) => {
214
- if (output.statusCode !== 200 && output.statusCode >= 300) {
215
- return de_CommandError(output, context);
216
- }
217
- const contents = map({
218
- $metadata: deserializeMetadata(output),
219
- });
220
- await collectBody(output.body, context);
221
- return contents;
222
- };
223
- export const de_GetMonitorCommand = async (output, context) => {
224
- if (output.statusCode !== 200 && output.statusCode >= 300) {
225
- return de_CommandError(output, context);
226
- }
227
- const contents = map({
228
- $metadata: deserializeMetadata(output),
229
- });
230
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
231
- const doc = take(data, {
232
- aggregationPeriod: __expectLong,
233
- createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
234
- modifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
235
- monitorArn: __expectString,
236
- monitorName: __expectString,
237
- probes: (_) => de_ProbeList(_, context),
238
- state: __expectString,
239
- tags: _json,
240
- });
241
- Object.assign(contents, doc);
242
- return contents;
243
- };
244
- export const de_GetProbeCommand = async (output, context) => {
245
- if (output.statusCode !== 200 && output.statusCode >= 300) {
246
- return de_CommandError(output, context);
247
- }
248
- const contents = map({
249
- $metadata: deserializeMetadata(output),
250
- });
251
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
252
- const doc = take(data, {
253
- addressFamily: __expectString,
254
- createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
255
- destination: __expectString,
256
- destinationPort: __expectInt32,
257
- modifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
258
- packetSize: __expectInt32,
259
- probeArn: __expectString,
260
- probeId: __expectString,
261
- protocol: __expectString,
262
- sourceArn: __expectString,
263
- state: __expectString,
264
- tags: _json,
265
- vpcId: __expectString,
266
- });
267
- Object.assign(contents, doc);
268
- return contents;
269
- };
270
- export const de_ListMonitorsCommand = async (output, context) => {
271
- if (output.statusCode !== 200 && output.statusCode >= 300) {
272
- return de_CommandError(output, context);
273
- }
274
- const contents = map({
275
- $metadata: deserializeMetadata(output),
276
- });
277
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
278
- const doc = take(data, {
279
- monitors: _json,
280
- nextToken: __expectString,
281
- });
282
- Object.assign(contents, doc);
283
- return contents;
284
- };
285
- export const de_ListTagsForResourceCommand = async (output, context) => {
286
- if (output.statusCode !== 200 && output.statusCode >= 300) {
287
- return de_CommandError(output, context);
288
- }
289
- const contents = map({
290
- $metadata: deserializeMetadata(output),
291
- });
292
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
293
- const doc = take(data, {
294
- tags: _json,
295
- });
296
- Object.assign(contents, doc);
297
- return contents;
298
- };
299
- export const de_TagResourceCommand = async (output, context) => {
300
- if (output.statusCode !== 200 && output.statusCode >= 300) {
301
- return de_CommandError(output, context);
302
- }
303
- const contents = map({
304
- $metadata: deserializeMetadata(output),
305
- });
306
- await collectBody(output.body, context);
307
- return contents;
308
- };
309
- export const de_UntagResourceCommand = async (output, context) => {
310
- if (output.statusCode !== 200 && output.statusCode >= 300) {
311
- return de_CommandError(output, context);
312
- }
313
- const contents = map({
314
- $metadata: deserializeMetadata(output),
315
- });
316
- await collectBody(output.body, context);
317
- return contents;
318
- };
319
- export const de_UpdateMonitorCommand = async (output, context) => {
320
- if (output.statusCode !== 200 && output.statusCode >= 300) {
321
- return de_CommandError(output, context);
322
- }
323
- const contents = map({
324
- $metadata: deserializeMetadata(output),
325
- });
326
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
327
- const doc = take(data, {
328
- aggregationPeriod: __expectLong,
329
- monitorArn: __expectString,
330
- monitorName: __expectString,
331
- state: __expectString,
332
- tags: _json,
333
- });
334
- Object.assign(contents, doc);
335
- return contents;
336
- };
337
- export const de_UpdateProbeCommand = async (output, context) => {
338
- if (output.statusCode !== 200 && output.statusCode >= 300) {
339
- return de_CommandError(output, context);
340
- }
341
- const contents = map({
342
- $metadata: deserializeMetadata(output),
343
- });
344
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
345
- const doc = take(data, {
346
- addressFamily: __expectString,
347
- createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
348
- destination: __expectString,
349
- destinationPort: __expectInt32,
350
- modifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
351
- packetSize: __expectInt32,
352
- probeArn: __expectString,
353
- probeId: __expectString,
354
- protocol: __expectString,
355
- sourceArn: __expectString,
356
- state: __expectString,
357
- tags: _json,
358
- vpcId: __expectString,
359
- });
360
- Object.assign(contents, doc);
361
- return contents;
362
- };
363
- const de_CommandError = async (output, context) => {
364
- const parsedOutput = {
365
- ...output,
366
- body: await parseErrorBody(output.body, context),
367
- };
368
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
369
- switch (errorCode) {
370
- case "AccessDeniedException":
371
- case "com.amazonaws.networkmonitor#AccessDeniedException":
372
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
373
- case "ConflictException":
374
- case "com.amazonaws.networkmonitor#ConflictException":
375
- throw await de_ConflictExceptionRes(parsedOutput, context);
376
- case "InternalServerException":
377
- case "com.amazonaws.networkmonitor#InternalServerException":
378
- throw await de_InternalServerExceptionRes(parsedOutput, context);
379
- case "ServiceQuotaExceededException":
380
- case "com.amazonaws.networkmonitor#ServiceQuotaExceededException":
381
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
382
- case "ThrottlingException":
383
- case "com.amazonaws.networkmonitor#ThrottlingException":
384
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
385
- case "ValidationException":
386
- case "com.amazonaws.networkmonitor#ValidationException":
387
- throw await de_ValidationExceptionRes(parsedOutput, context);
388
- case "ResourceNotFoundException":
389
- case "com.amazonaws.networkmonitor#ResourceNotFoundException":
390
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
391
- default:
392
- const parsedBody = parsedOutput.body;
393
- return throwDefaultError({
394
- output,
395
- parsedBody,
396
- errorCode,
397
- });
398
- }
399
- };
400
- const throwDefaultError = withBaseException(__BaseException);
401
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
402
- const contents = map({});
403
- const data = parsedOutput.body;
404
- const doc = take(data, {
405
- message: __expectString,
406
- });
407
- Object.assign(contents, doc);
408
- const exception = new AccessDeniedException({
409
- $metadata: deserializeMetadata(parsedOutput),
410
- ...contents,
411
- });
412
- return __decorateServiceException(exception, parsedOutput.body);
413
- };
414
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
415
- const contents = map({});
416
- const data = parsedOutput.body;
417
- const doc = take(data, {
418
- message: __expectString,
419
- });
420
- Object.assign(contents, doc);
421
- const exception = new ConflictException({
422
- $metadata: deserializeMetadata(parsedOutput),
423
- ...contents,
424
- });
425
- return __decorateServiceException(exception, parsedOutput.body);
426
- };
427
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
428
- const contents = map({});
429
- const data = parsedOutput.body;
430
- const doc = take(data, {
431
- message: __expectString,
432
- });
433
- Object.assign(contents, doc);
434
- const exception = new InternalServerException({
435
- $metadata: deserializeMetadata(parsedOutput),
436
- ...contents,
437
- });
438
- return __decorateServiceException(exception, parsedOutput.body);
439
- };
440
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
441
- const contents = map({});
442
- const data = parsedOutput.body;
443
- const doc = take(data, {
444
- message: __expectString,
445
- });
446
- Object.assign(contents, doc);
447
- const exception = new ResourceNotFoundException({
448
- $metadata: deserializeMetadata(parsedOutput),
449
- ...contents,
450
- });
451
- return __decorateServiceException(exception, parsedOutput.body);
452
- };
453
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
454
- const contents = map({});
455
- const data = parsedOutput.body;
456
- const doc = take(data, {
457
- message: __expectString,
458
- });
459
- Object.assign(contents, doc);
460
- const exception = new ServiceQuotaExceededException({
461
- $metadata: deserializeMetadata(parsedOutput),
462
- ...contents,
463
- });
464
- return __decorateServiceException(exception, parsedOutput.body);
465
- };
466
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
467
- const contents = map({});
468
- const data = parsedOutput.body;
469
- const doc = take(data, {
470
- message: __expectString,
471
- });
472
- Object.assign(contents, doc);
473
- const exception = new ThrottlingException({
474
- $metadata: deserializeMetadata(parsedOutput),
475
- ...contents,
476
- });
477
- return __decorateServiceException(exception, parsedOutput.body);
478
- };
479
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
480
- const contents = map({});
481
- const data = parsedOutput.body;
482
- const doc = take(data, {
483
- message: __expectString,
484
- });
485
- Object.assign(contents, doc);
486
- const exception = new ValidationException({
487
- $metadata: deserializeMetadata(parsedOutput),
488
- ...contents,
489
- });
490
- return __decorateServiceException(exception, parsedOutput.body);
491
- };
492
- const de_Probe = (output, context) => {
493
- return take(output, {
494
- addressFamily: __expectString,
495
- createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
496
- destination: __expectString,
497
- destinationPort: __expectInt32,
498
- modifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
499
- packetSize: __expectInt32,
500
- probeArn: __expectString,
501
- probeId: __expectString,
502
- protocol: __expectString,
503
- sourceArn: __expectString,
504
- state: __expectString,
505
- tags: _json,
506
- vpcId: __expectString,
507
- });
508
- };
509
- const de_ProbeList = (output, context) => {
510
- const retVal = (output || [])
511
- .filter((e) => e != null)
512
- .map((entry) => {
513
- return de_Probe(entry, context);
514
- });
515
- return retVal;
516
- };
517
- const deserializeMetadata = (output) => ({
518
- httpStatusCode: output.statusCode,
519
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
520
- extendedRequestId: output.headers["x-amz-id-2"],
521
- cfId: output.headers["x-amz-cf-id"],
522
- });
523
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
524
- const _mR = "maxResults";
525
- const _nT = "nextToken";
526
- const _s = "state";
527
- const _tK = "tagKeys";