@aws-sdk/client-networkmonitor 3.899.0 → 3.906.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/dist-cjs/index.js +967 -1100
- package/package.json +38 -38
package/dist-cjs/index.js
CHANGED
|
@@ -1,1145 +1,1012 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
|
|
4
|
+
var middlewareLogger = require('@aws-sdk/middleware-logger');
|
|
5
|
+
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
|
|
6
|
+
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
|
+
var configResolver = require('@smithy/config-resolver');
|
|
8
|
+
var core = require('@smithy/core');
|
|
9
|
+
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
10
|
+
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
11
|
+
var middlewareRetry = require('@smithy/middleware-retry');
|
|
12
|
+
var smithyClient = require('@smithy/smithy-client');
|
|
13
|
+
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
14
|
+
var runtimeConfig = require('./runtimeConfig');
|
|
15
|
+
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
16
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
17
|
+
var middlewareSerde = require('@smithy/middleware-serde');
|
|
18
|
+
var core$1 = require('@aws-sdk/core');
|
|
19
|
+
var uuid = require('@smithy/uuid');
|
|
20
|
+
|
|
21
|
+
const resolveClientEndpointParameters = (options) => {
|
|
22
|
+
return Object.assign(options, {
|
|
23
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
24
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
25
|
+
defaultSigningName: "networkmonitor",
|
|
26
|
+
});
|
|
10
27
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
28
|
+
const commonParams = {
|
|
29
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
30
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
31
|
+
Region: { type: "builtInParams", name: "region" },
|
|
32
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
18
33
|
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/index.ts
|
|
22
|
-
var index_exports = {};
|
|
23
|
-
__export(index_exports, {
|
|
24
|
-
AccessDeniedException: () => AccessDeniedException,
|
|
25
|
-
AddressFamily: () => AddressFamily,
|
|
26
|
-
ConflictException: () => ConflictException,
|
|
27
|
-
CreateMonitorCommand: () => CreateMonitorCommand,
|
|
28
|
-
CreateProbeCommand: () => CreateProbeCommand,
|
|
29
|
-
DeleteMonitorCommand: () => DeleteMonitorCommand,
|
|
30
|
-
DeleteProbeCommand: () => DeleteProbeCommand,
|
|
31
|
-
GetMonitorCommand: () => GetMonitorCommand,
|
|
32
|
-
GetProbeCommand: () => GetProbeCommand,
|
|
33
|
-
InternalServerException: () => InternalServerException,
|
|
34
|
-
ListMonitorsCommand: () => ListMonitorsCommand,
|
|
35
|
-
ListTagsForResourceCommand: () => ListTagsForResourceCommand,
|
|
36
|
-
MonitorState: () => MonitorState,
|
|
37
|
-
NetworkMonitor: () => NetworkMonitor,
|
|
38
|
-
NetworkMonitorClient: () => NetworkMonitorClient,
|
|
39
|
-
NetworkMonitorServiceException: () => NetworkMonitorServiceException,
|
|
40
|
-
ProbeState: () => ProbeState,
|
|
41
|
-
Protocol: () => Protocol,
|
|
42
|
-
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
43
|
-
ServiceQuotaExceededException: () => ServiceQuotaExceededException,
|
|
44
|
-
TagResourceCommand: () => TagResourceCommand,
|
|
45
|
-
ThrottlingException: () => ThrottlingException,
|
|
46
|
-
UntagResourceCommand: () => UntagResourceCommand,
|
|
47
|
-
UpdateMonitorCommand: () => UpdateMonitorCommand,
|
|
48
|
-
UpdateProbeCommand: () => UpdateProbeCommand,
|
|
49
|
-
ValidationException: () => ValidationException,
|
|
50
|
-
__Client: () => import_smithy_client.Client,
|
|
51
|
-
paginateListMonitors: () => paginateListMonitors
|
|
52
|
-
});
|
|
53
|
-
module.exports = __toCommonJS(index_exports);
|
|
54
|
-
|
|
55
|
-
// src/NetworkMonitorClient.ts
|
|
56
|
-
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
57
|
-
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
58
|
-
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
59
|
-
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
60
|
-
var import_config_resolver = require("@smithy/config-resolver");
|
|
61
|
-
var import_core = require("@smithy/core");
|
|
62
|
-
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
63
|
-
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
64
|
-
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
65
|
-
|
|
66
|
-
var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
|
|
67
34
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
35
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
36
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
37
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
38
|
+
let _credentials = runtimeConfig.credentials;
|
|
39
|
+
return {
|
|
40
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
41
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
42
|
+
if (index === -1) {
|
|
43
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
httpAuthSchemes() {
|
|
50
|
+
return _httpAuthSchemes;
|
|
51
|
+
},
|
|
52
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
53
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
54
|
+
},
|
|
55
|
+
httpAuthSchemeProvider() {
|
|
56
|
+
return _httpAuthSchemeProvider;
|
|
57
|
+
},
|
|
58
|
+
setCredentials(credentials) {
|
|
59
|
+
_credentials = credentials;
|
|
60
|
+
},
|
|
61
|
+
credentials() {
|
|
62
|
+
return _credentials;
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
67
|
+
return {
|
|
68
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
69
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
70
|
+
credentials: config.credentials(),
|
|
71
|
+
};
|
|
81
72
|
};
|
|
82
73
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
var import_protocol_http = require("@smithy/protocol-http");
|
|
89
|
-
var import_smithy_client = require("@smithy/smithy-client");
|
|
74
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
75
|
+
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
76
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
77
|
+
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
78
|
+
};
|
|
90
79
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
80
|
+
class NetworkMonitorClient extends smithyClient.Client {
|
|
81
|
+
config;
|
|
82
|
+
constructor(...[configuration]) {
|
|
83
|
+
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
|
84
|
+
super(_config_0);
|
|
85
|
+
this.initConfig = _config_0;
|
|
86
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
87
|
+
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
88
|
+
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
|
|
89
|
+
const _config_4 = configResolver.resolveRegionConfig(_config_3);
|
|
90
|
+
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
91
|
+
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
|
|
92
|
+
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
93
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
94
|
+
this.config = _config_8;
|
|
95
|
+
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
96
|
+
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
97
|
+
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
98
|
+
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
100
|
+
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
101
|
+
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
102
|
+
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultNetworkMonitorHttpAuthSchemeParametersProvider,
|
|
103
|
+
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
104
|
+
"aws.auth#sigv4": config.credentials,
|
|
105
|
+
}),
|
|
106
|
+
}));
|
|
107
|
+
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
119
108
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
125
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
126
|
-
credentials: config.credentials()
|
|
127
|
-
};
|
|
128
|
-
}, "resolveHttpAuthRuntimeConfig");
|
|
129
|
-
|
|
130
|
-
// src/runtimeExtensions.ts
|
|
131
|
-
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
132
|
-
const extensionConfiguration = Object.assign(
|
|
133
|
-
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
|
|
134
|
-
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
|
|
135
|
-
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
|
|
136
|
-
getHttpAuthExtensionConfiguration(runtimeConfig)
|
|
137
|
-
);
|
|
138
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
139
|
-
return Object.assign(
|
|
140
|
-
runtimeConfig,
|
|
141
|
-
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
142
|
-
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
143
|
-
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
144
|
-
resolveHttpAuthRuntimeConfig(extensionConfiguration)
|
|
145
|
-
);
|
|
146
|
-
}, "resolveRuntimeExtensions");
|
|
109
|
+
destroy() {
|
|
110
|
+
super.destroy();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
147
113
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
171
|
-
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
172
|
-
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
173
|
-
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
174
|
-
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
175
|
-
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
176
|
-
this.middlewareStack.use(
|
|
177
|
-
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
178
|
-
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultNetworkMonitorHttpAuthSchemeParametersProvider,
|
|
179
|
-
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
|
|
180
|
-
"aws.auth#sigv4": config.credentials
|
|
181
|
-
}), "identityProviderConfigProvider")
|
|
182
|
-
})
|
|
183
|
-
);
|
|
184
|
-
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
188
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
189
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
190
|
-
*/
|
|
191
|
-
destroy() {
|
|
192
|
-
super.destroy();
|
|
193
|
-
}
|
|
114
|
+
class NetworkMonitorServiceException extends smithyClient.ServiceException {
|
|
115
|
+
constructor(options) {
|
|
116
|
+
super(options);
|
|
117
|
+
Object.setPrototypeOf(this, NetworkMonitorServiceException.prototype);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
class AccessDeniedException extends NetworkMonitorServiceException {
|
|
122
|
+
name = "AccessDeniedException";
|
|
123
|
+
$fault = "client";
|
|
124
|
+
constructor(opts) {
|
|
125
|
+
super({
|
|
126
|
+
name: "AccessDeniedException",
|
|
127
|
+
$fault: "client",
|
|
128
|
+
...opts,
|
|
129
|
+
});
|
|
130
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const AddressFamily = {
|
|
134
|
+
IPV4: "IPV4",
|
|
135
|
+
IPV6: "IPV6",
|
|
194
136
|
};
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
// src/models/NetworkMonitorServiceException.ts
|
|
211
|
-
|
|
212
|
-
var NetworkMonitorServiceException = class _NetworkMonitorServiceException extends import_smithy_client.ServiceException {
|
|
213
|
-
static {
|
|
214
|
-
__name(this, "NetworkMonitorServiceException");
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* @internal
|
|
218
|
-
*/
|
|
219
|
-
constructor(options) {
|
|
220
|
-
super(options);
|
|
221
|
-
Object.setPrototypeOf(this, _NetworkMonitorServiceException.prototype);
|
|
222
|
-
}
|
|
137
|
+
class ConflictException extends NetworkMonitorServiceException {
|
|
138
|
+
name = "ConflictException";
|
|
139
|
+
$fault = "client";
|
|
140
|
+
constructor(opts) {
|
|
141
|
+
super({
|
|
142
|
+
name: "ConflictException",
|
|
143
|
+
$fault: "client",
|
|
144
|
+
...opts,
|
|
145
|
+
});
|
|
146
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const Protocol = {
|
|
150
|
+
ICMP: "ICMP",
|
|
151
|
+
TCP: "TCP",
|
|
223
152
|
};
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
153
|
+
const MonitorState = {
|
|
154
|
+
ACTIVE: "ACTIVE",
|
|
155
|
+
DELETING: "DELETING",
|
|
156
|
+
ERROR: "ERROR",
|
|
157
|
+
INACTIVE: "INACTIVE",
|
|
158
|
+
PENDING: "PENDING",
|
|
159
|
+
};
|
|
160
|
+
class InternalServerException extends NetworkMonitorServiceException {
|
|
161
|
+
name = "InternalServerException";
|
|
162
|
+
$fault = "server";
|
|
163
|
+
$retryable = {};
|
|
164
|
+
constructor(opts) {
|
|
165
|
+
super({
|
|
166
|
+
name: "InternalServerException",
|
|
167
|
+
$fault: "server",
|
|
168
|
+
...opts,
|
|
169
|
+
});
|
|
170
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
class ServiceQuotaExceededException extends NetworkMonitorServiceException {
|
|
174
|
+
name = "ServiceQuotaExceededException";
|
|
175
|
+
$fault = "client";
|
|
176
|
+
constructor(opts) {
|
|
177
|
+
super({
|
|
178
|
+
name: "ServiceQuotaExceededException",
|
|
179
|
+
$fault: "client",
|
|
180
|
+
...opts,
|
|
181
|
+
});
|
|
182
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
class ThrottlingException extends NetworkMonitorServiceException {
|
|
186
|
+
name = "ThrottlingException";
|
|
187
|
+
$fault = "client";
|
|
188
|
+
$retryable = {
|
|
189
|
+
throttling: true,
|
|
190
|
+
};
|
|
191
|
+
constructor(opts) {
|
|
192
|
+
super({
|
|
193
|
+
name: "ThrottlingException",
|
|
194
|
+
$fault: "client",
|
|
195
|
+
...opts,
|
|
196
|
+
});
|
|
197
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
class ValidationException extends NetworkMonitorServiceException {
|
|
201
|
+
name = "ValidationException";
|
|
202
|
+
$fault = "client";
|
|
203
|
+
constructor(opts) {
|
|
204
|
+
super({
|
|
205
|
+
name: "ValidationException",
|
|
206
|
+
$fault: "client",
|
|
207
|
+
...opts,
|
|
208
|
+
});
|
|
209
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
const ProbeState = {
|
|
213
|
+
ACTIVE: "ACTIVE",
|
|
214
|
+
DELETED: "DELETED",
|
|
215
|
+
DELETING: "DELETING",
|
|
216
|
+
ERROR: "ERROR",
|
|
217
|
+
INACTIVE: "INACTIVE",
|
|
218
|
+
PENDING: "PENDING",
|
|
219
|
+
};
|
|
220
|
+
class ResourceNotFoundException extends NetworkMonitorServiceException {
|
|
221
|
+
name = "ResourceNotFoundException";
|
|
222
|
+
$fault = "client";
|
|
223
|
+
constructor(opts) {
|
|
224
|
+
super({
|
|
225
|
+
name: "ResourceNotFoundException",
|
|
226
|
+
$fault: "client",
|
|
227
|
+
...opts,
|
|
228
|
+
});
|
|
229
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const se_CreateMonitorCommand = async (input, context) => {
|
|
234
|
+
const b = core.requestBuilder(input, context);
|
|
235
|
+
const headers = {
|
|
236
|
+
"content-type": "application/json",
|
|
237
|
+
};
|
|
238
|
+
b.bp("/monitors");
|
|
239
|
+
let body;
|
|
240
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
241
|
+
aggregationPeriod: [],
|
|
242
|
+
clientToken: [true, (_) => _ ?? uuid.v4()],
|
|
243
|
+
monitorName: [],
|
|
244
|
+
probes: (_) => smithyClient._json(_),
|
|
245
|
+
tags: (_) => smithyClient._json(_),
|
|
246
|
+
}));
|
|
247
|
+
b.m("POST").h(headers).b(body);
|
|
248
|
+
return b.build();
|
|
249
|
+
};
|
|
250
|
+
const se_CreateProbeCommand = async (input, context) => {
|
|
251
|
+
const b = core.requestBuilder(input, context);
|
|
252
|
+
const headers = {
|
|
253
|
+
"content-type": "application/json",
|
|
254
|
+
};
|
|
255
|
+
b.bp("/monitors/{monitorName}/probes");
|
|
256
|
+
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
257
|
+
let body;
|
|
258
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
259
|
+
clientToken: [true, (_) => _ ?? uuid.v4()],
|
|
260
|
+
probe: (_) => smithyClient._json(_),
|
|
261
|
+
tags: (_) => smithyClient._json(_),
|
|
262
|
+
}));
|
|
263
|
+
b.m("POST").h(headers).b(body);
|
|
264
|
+
return b.build();
|
|
265
|
+
};
|
|
266
|
+
const se_DeleteMonitorCommand = async (input, context) => {
|
|
267
|
+
const b = core.requestBuilder(input, context);
|
|
268
|
+
const headers = {};
|
|
269
|
+
b.bp("/monitors/{monitorName}");
|
|
270
|
+
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
271
|
+
let body;
|
|
272
|
+
b.m("DELETE").h(headers).b(body);
|
|
273
|
+
return b.build();
|
|
274
|
+
};
|
|
275
|
+
const se_DeleteProbeCommand = async (input, context) => {
|
|
276
|
+
const b = core.requestBuilder(input, context);
|
|
277
|
+
const headers = {};
|
|
278
|
+
b.bp("/monitors/{monitorName}/probes/{probeId}");
|
|
279
|
+
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
280
|
+
b.p("probeId", () => input.probeId, "{probeId}", false);
|
|
281
|
+
let body;
|
|
282
|
+
b.m("DELETE").h(headers).b(body);
|
|
283
|
+
return b.build();
|
|
284
|
+
};
|
|
285
|
+
const se_GetMonitorCommand = async (input, context) => {
|
|
286
|
+
const b = core.requestBuilder(input, context);
|
|
287
|
+
const headers = {};
|
|
288
|
+
b.bp("/monitors/{monitorName}");
|
|
289
|
+
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
290
|
+
let body;
|
|
291
|
+
b.m("GET").h(headers).b(body);
|
|
292
|
+
return b.build();
|
|
293
|
+
};
|
|
294
|
+
const se_GetProbeCommand = async (input, context) => {
|
|
295
|
+
const b = core.requestBuilder(input, context);
|
|
296
|
+
const headers = {};
|
|
297
|
+
b.bp("/monitors/{monitorName}/probes/{probeId}");
|
|
298
|
+
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
299
|
+
b.p("probeId", () => input.probeId, "{probeId}", false);
|
|
300
|
+
let body;
|
|
301
|
+
b.m("GET").h(headers).b(body);
|
|
302
|
+
return b.build();
|
|
303
|
+
};
|
|
304
|
+
const se_ListMonitorsCommand = async (input, context) => {
|
|
305
|
+
const b = core.requestBuilder(input, context);
|
|
306
|
+
const headers = {};
|
|
307
|
+
b.bp("/monitors");
|
|
308
|
+
const query = smithyClient.map({
|
|
309
|
+
[_nT]: [, input[_nT]],
|
|
310
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
311
|
+
[_s]: [, input[_s]],
|
|
240
312
|
});
|
|
241
|
-
|
|
242
|
-
|
|
313
|
+
let body;
|
|
314
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
315
|
+
return b.build();
|
|
243
316
|
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
317
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
318
|
+
const b = core.requestBuilder(input, context);
|
|
319
|
+
const headers = {};
|
|
320
|
+
b.bp("/tags/{resourceArn}");
|
|
321
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
322
|
+
let body;
|
|
323
|
+
b.m("GET").h(headers).b(body);
|
|
324
|
+
return b.build();
|
|
247
325
|
};
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
326
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
327
|
+
const b = core.requestBuilder(input, context);
|
|
328
|
+
const headers = {
|
|
329
|
+
"content-type": "application/json",
|
|
330
|
+
};
|
|
331
|
+
b.bp("/tags/{resourceArn}");
|
|
332
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
333
|
+
let body;
|
|
334
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
335
|
+
tags: (_) => smithyClient._json(_),
|
|
336
|
+
}));
|
|
337
|
+
b.m("POST").h(headers).b(body);
|
|
338
|
+
return b.build();
|
|
339
|
+
};
|
|
340
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
341
|
+
const b = core.requestBuilder(input, context);
|
|
342
|
+
const headers = {};
|
|
343
|
+
b.bp("/tags/{resourceArn}");
|
|
344
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
345
|
+
const query = smithyClient.map({
|
|
346
|
+
[_tK]: [smithyClient.expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
|
|
262
347
|
});
|
|
263
|
-
|
|
264
|
-
|
|
348
|
+
let body;
|
|
349
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
350
|
+
return b.build();
|
|
265
351
|
};
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
352
|
+
const se_UpdateMonitorCommand = async (input, context) => {
|
|
353
|
+
const b = core.requestBuilder(input, context);
|
|
354
|
+
const headers = {
|
|
355
|
+
"content-type": "application/json",
|
|
356
|
+
};
|
|
357
|
+
b.bp("/monitors/{monitorName}");
|
|
358
|
+
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
359
|
+
let body;
|
|
360
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
361
|
+
aggregationPeriod: [],
|
|
362
|
+
}));
|
|
363
|
+
b.m("PATCH").h(headers).b(body);
|
|
364
|
+
return b.build();
|
|
269
365
|
};
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
366
|
+
const se_UpdateProbeCommand = async (input, context) => {
|
|
367
|
+
const b = core.requestBuilder(input, context);
|
|
368
|
+
const headers = {
|
|
369
|
+
"content-type": "application/json",
|
|
370
|
+
};
|
|
371
|
+
b.bp("/monitors/{monitorName}/probes/{probeId}");
|
|
372
|
+
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
373
|
+
b.p("probeId", () => input.probeId, "{probeId}", false);
|
|
374
|
+
let body;
|
|
375
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
376
|
+
destination: [],
|
|
377
|
+
destinationPort: [],
|
|
378
|
+
packetSize: [],
|
|
379
|
+
protocol: [],
|
|
380
|
+
state: [],
|
|
381
|
+
}));
|
|
382
|
+
b.m("PATCH").h(headers).b(body);
|
|
383
|
+
return b.build();
|
|
276
384
|
};
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
$retryable = {};
|
|
284
|
-
/**
|
|
285
|
-
* @internal
|
|
286
|
-
*/
|
|
287
|
-
constructor(opts) {
|
|
288
|
-
super({
|
|
289
|
-
name: "InternalServerException",
|
|
290
|
-
$fault: "server",
|
|
291
|
-
...opts
|
|
385
|
+
const de_CreateMonitorCommand = async (output, context) => {
|
|
386
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
387
|
+
return de_CommandError(output, context);
|
|
388
|
+
}
|
|
389
|
+
const contents = smithyClient.map({
|
|
390
|
+
$metadata: deserializeMetadata(output),
|
|
292
391
|
});
|
|
293
|
-
|
|
294
|
-
|
|
392
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
393
|
+
const doc = smithyClient.take(data, {
|
|
394
|
+
aggregationPeriod: smithyClient.expectLong,
|
|
395
|
+
monitorArn: smithyClient.expectString,
|
|
396
|
+
monitorName: smithyClient.expectString,
|
|
397
|
+
state: smithyClient.expectString,
|
|
398
|
+
tags: smithyClient._json,
|
|
399
|
+
});
|
|
400
|
+
Object.assign(contents, doc);
|
|
401
|
+
return contents;
|
|
295
402
|
};
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* @internal
|
|
304
|
-
*/
|
|
305
|
-
constructor(opts) {
|
|
306
|
-
super({
|
|
307
|
-
name: "ServiceQuotaExceededException",
|
|
308
|
-
$fault: "client",
|
|
309
|
-
...opts
|
|
403
|
+
const de_CreateProbeCommand = async (output, context) => {
|
|
404
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
405
|
+
return de_CommandError(output, context);
|
|
406
|
+
}
|
|
407
|
+
const contents = smithyClient.map({
|
|
408
|
+
$metadata: deserializeMetadata(output),
|
|
310
409
|
});
|
|
311
|
-
|
|
312
|
-
|
|
410
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
411
|
+
const doc = smithyClient.take(data, {
|
|
412
|
+
addressFamily: smithyClient.expectString,
|
|
413
|
+
createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
414
|
+
destination: smithyClient.expectString,
|
|
415
|
+
destinationPort: smithyClient.expectInt32,
|
|
416
|
+
modifiedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
417
|
+
packetSize: smithyClient.expectInt32,
|
|
418
|
+
probeArn: smithyClient.expectString,
|
|
419
|
+
probeId: smithyClient.expectString,
|
|
420
|
+
protocol: smithyClient.expectString,
|
|
421
|
+
sourceArn: smithyClient.expectString,
|
|
422
|
+
state: smithyClient.expectString,
|
|
423
|
+
tags: smithyClient._json,
|
|
424
|
+
vpcId: smithyClient.expectString,
|
|
425
|
+
});
|
|
426
|
+
Object.assign(contents, doc);
|
|
427
|
+
return contents;
|
|
313
428
|
};
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
$retryable = {
|
|
321
|
-
throttling: true
|
|
322
|
-
};
|
|
323
|
-
/**
|
|
324
|
-
* @internal
|
|
325
|
-
*/
|
|
326
|
-
constructor(opts) {
|
|
327
|
-
super({
|
|
328
|
-
name: "ThrottlingException",
|
|
329
|
-
$fault: "client",
|
|
330
|
-
...opts
|
|
429
|
+
const de_DeleteMonitorCommand = async (output, context) => {
|
|
430
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
431
|
+
return de_CommandError(output, context);
|
|
432
|
+
}
|
|
433
|
+
const contents = smithyClient.map({
|
|
434
|
+
$metadata: deserializeMetadata(output),
|
|
331
435
|
});
|
|
332
|
-
|
|
333
|
-
|
|
436
|
+
await smithyClient.collectBody(output.body, context);
|
|
437
|
+
return contents;
|
|
334
438
|
};
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* @internal
|
|
343
|
-
*/
|
|
344
|
-
constructor(opts) {
|
|
345
|
-
super({
|
|
346
|
-
name: "ValidationException",
|
|
347
|
-
$fault: "client",
|
|
348
|
-
...opts
|
|
439
|
+
const de_DeleteProbeCommand = async (output, context) => {
|
|
440
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
441
|
+
return de_CommandError(output, context);
|
|
442
|
+
}
|
|
443
|
+
const contents = smithyClient.map({
|
|
444
|
+
$metadata: deserializeMetadata(output),
|
|
349
445
|
});
|
|
350
|
-
|
|
351
|
-
|
|
446
|
+
await smithyClient.collectBody(output.body, context);
|
|
447
|
+
return contents;
|
|
352
448
|
};
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
449
|
+
const de_GetMonitorCommand = async (output, context) => {
|
|
450
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
451
|
+
return de_CommandError(output, context);
|
|
452
|
+
}
|
|
453
|
+
const contents = smithyClient.map({
|
|
454
|
+
$metadata: deserializeMetadata(output),
|
|
455
|
+
});
|
|
456
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
457
|
+
const doc = smithyClient.take(data, {
|
|
458
|
+
aggregationPeriod: smithyClient.expectLong,
|
|
459
|
+
createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
460
|
+
modifiedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
461
|
+
monitorArn: smithyClient.expectString,
|
|
462
|
+
monitorName: smithyClient.expectString,
|
|
463
|
+
probes: (_) => de_ProbeList(_),
|
|
464
|
+
state: smithyClient.expectString,
|
|
465
|
+
tags: smithyClient._json,
|
|
466
|
+
});
|
|
467
|
+
Object.assign(contents, doc);
|
|
468
|
+
return contents;
|
|
360
469
|
};
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
470
|
+
const de_GetProbeCommand = async (output, context) => {
|
|
471
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
472
|
+
return de_CommandError(output, context);
|
|
473
|
+
}
|
|
474
|
+
const contents = smithyClient.map({
|
|
475
|
+
$metadata: deserializeMetadata(output),
|
|
476
|
+
});
|
|
477
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
478
|
+
const doc = smithyClient.take(data, {
|
|
479
|
+
addressFamily: smithyClient.expectString,
|
|
480
|
+
createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
481
|
+
destination: smithyClient.expectString,
|
|
482
|
+
destinationPort: smithyClient.expectInt32,
|
|
483
|
+
modifiedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
484
|
+
packetSize: smithyClient.expectInt32,
|
|
485
|
+
probeArn: smithyClient.expectString,
|
|
486
|
+
probeId: smithyClient.expectString,
|
|
487
|
+
protocol: smithyClient.expectString,
|
|
488
|
+
sourceArn: smithyClient.expectString,
|
|
489
|
+
state: smithyClient.expectString,
|
|
490
|
+
tags: smithyClient._json,
|
|
491
|
+
vpcId: smithyClient.expectString,
|
|
375
492
|
});
|
|
376
|
-
Object.
|
|
377
|
-
|
|
493
|
+
Object.assign(contents, doc);
|
|
494
|
+
return contents;
|
|
378
495
|
};
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
probes: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "probes"),
|
|
394
|
-
tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tags")
|
|
395
|
-
})
|
|
396
|
-
);
|
|
397
|
-
b.m("POST").h(headers).b(body);
|
|
398
|
-
return b.build();
|
|
399
|
-
}, "se_CreateMonitorCommand");
|
|
400
|
-
var se_CreateProbeCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
401
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
402
|
-
const headers = {
|
|
403
|
-
"content-type": "application/json"
|
|
404
|
-
};
|
|
405
|
-
b.bp("/monitors/{monitorName}/probes");
|
|
406
|
-
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
407
|
-
let body;
|
|
408
|
-
body = JSON.stringify(
|
|
409
|
-
(0, import_smithy_client.take)(input, {
|
|
410
|
-
clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
|
|
411
|
-
probe: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "probe"),
|
|
412
|
-
tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tags")
|
|
413
|
-
})
|
|
414
|
-
);
|
|
415
|
-
b.m("POST").h(headers).b(body);
|
|
416
|
-
return b.build();
|
|
417
|
-
}, "se_CreateProbeCommand");
|
|
418
|
-
var se_DeleteMonitorCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
419
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
420
|
-
const headers = {};
|
|
421
|
-
b.bp("/monitors/{monitorName}");
|
|
422
|
-
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
423
|
-
let body;
|
|
424
|
-
b.m("DELETE").h(headers).b(body);
|
|
425
|
-
return b.build();
|
|
426
|
-
}, "se_DeleteMonitorCommand");
|
|
427
|
-
var se_DeleteProbeCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
428
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
429
|
-
const headers = {};
|
|
430
|
-
b.bp("/monitors/{monitorName}/probes/{probeId}");
|
|
431
|
-
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
432
|
-
b.p("probeId", () => input.probeId, "{probeId}", false);
|
|
433
|
-
let body;
|
|
434
|
-
b.m("DELETE").h(headers).b(body);
|
|
435
|
-
return b.build();
|
|
436
|
-
}, "se_DeleteProbeCommand");
|
|
437
|
-
var se_GetMonitorCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
438
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
439
|
-
const headers = {};
|
|
440
|
-
b.bp("/monitors/{monitorName}");
|
|
441
|
-
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
442
|
-
let body;
|
|
443
|
-
b.m("GET").h(headers).b(body);
|
|
444
|
-
return b.build();
|
|
445
|
-
}, "se_GetMonitorCommand");
|
|
446
|
-
var se_GetProbeCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
447
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
448
|
-
const headers = {};
|
|
449
|
-
b.bp("/monitors/{monitorName}/probes/{probeId}");
|
|
450
|
-
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
451
|
-
b.p("probeId", () => input.probeId, "{probeId}", false);
|
|
452
|
-
let body;
|
|
453
|
-
b.m("GET").h(headers).b(body);
|
|
454
|
-
return b.build();
|
|
455
|
-
}, "se_GetProbeCommand");
|
|
456
|
-
var se_ListMonitorsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
457
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
458
|
-
const headers = {};
|
|
459
|
-
b.bp("/monitors");
|
|
460
|
-
const query = (0, import_smithy_client.map)({
|
|
461
|
-
[_nT]: [, input[_nT]],
|
|
462
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
463
|
-
[_s]: [, input[_s]]
|
|
464
|
-
});
|
|
465
|
-
let body;
|
|
466
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
467
|
-
return b.build();
|
|
468
|
-
}, "se_ListMonitorsCommand");
|
|
469
|
-
var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
470
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
471
|
-
const headers = {};
|
|
472
|
-
b.bp("/tags/{resourceArn}");
|
|
473
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
474
|
-
let body;
|
|
475
|
-
b.m("GET").h(headers).b(body);
|
|
476
|
-
return b.build();
|
|
477
|
-
}, "se_ListTagsForResourceCommand");
|
|
478
|
-
var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
479
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
480
|
-
const headers = {
|
|
481
|
-
"content-type": "application/json"
|
|
482
|
-
};
|
|
483
|
-
b.bp("/tags/{resourceArn}");
|
|
484
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
485
|
-
let body;
|
|
486
|
-
body = JSON.stringify(
|
|
487
|
-
(0, import_smithy_client.take)(input, {
|
|
488
|
-
tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tags")
|
|
489
|
-
})
|
|
490
|
-
);
|
|
491
|
-
b.m("POST").h(headers).b(body);
|
|
492
|
-
return b.build();
|
|
493
|
-
}, "se_TagResourceCommand");
|
|
494
|
-
var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
495
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
496
|
-
const headers = {};
|
|
497
|
-
b.bp("/tags/{resourceArn}");
|
|
498
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
499
|
-
const query = (0, import_smithy_client.map)({
|
|
500
|
-
[_tK]: [(0, import_smithy_client.expectNonNull)(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []]
|
|
501
|
-
});
|
|
502
|
-
let body;
|
|
503
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
504
|
-
return b.build();
|
|
505
|
-
}, "se_UntagResourceCommand");
|
|
506
|
-
var se_UpdateMonitorCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
507
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
508
|
-
const headers = {
|
|
509
|
-
"content-type": "application/json"
|
|
510
|
-
};
|
|
511
|
-
b.bp("/monitors/{monitorName}");
|
|
512
|
-
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
513
|
-
let body;
|
|
514
|
-
body = JSON.stringify(
|
|
515
|
-
(0, import_smithy_client.take)(input, {
|
|
516
|
-
aggregationPeriod: []
|
|
517
|
-
})
|
|
518
|
-
);
|
|
519
|
-
b.m("PATCH").h(headers).b(body);
|
|
520
|
-
return b.build();
|
|
521
|
-
}, "se_UpdateMonitorCommand");
|
|
522
|
-
var se_UpdateProbeCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
523
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
524
|
-
const headers = {
|
|
525
|
-
"content-type": "application/json"
|
|
526
|
-
};
|
|
527
|
-
b.bp("/monitors/{monitorName}/probes/{probeId}");
|
|
528
|
-
b.p("monitorName", () => input.monitorName, "{monitorName}", false);
|
|
529
|
-
b.p("probeId", () => input.probeId, "{probeId}", false);
|
|
530
|
-
let body;
|
|
531
|
-
body = JSON.stringify(
|
|
532
|
-
(0, import_smithy_client.take)(input, {
|
|
533
|
-
destination: [],
|
|
534
|
-
destinationPort: [],
|
|
535
|
-
packetSize: [],
|
|
536
|
-
protocol: [],
|
|
537
|
-
state: []
|
|
538
|
-
})
|
|
539
|
-
);
|
|
540
|
-
b.m("PATCH").h(headers).b(body);
|
|
541
|
-
return b.build();
|
|
542
|
-
}, "se_UpdateProbeCommand");
|
|
543
|
-
var de_CreateMonitorCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
544
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
545
|
-
return de_CommandError(output, context);
|
|
546
|
-
}
|
|
547
|
-
const contents = (0, import_smithy_client.map)({
|
|
548
|
-
$metadata: deserializeMetadata(output)
|
|
549
|
-
});
|
|
550
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
551
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
552
|
-
aggregationPeriod: import_smithy_client.expectLong,
|
|
553
|
-
monitorArn: import_smithy_client.expectString,
|
|
554
|
-
monitorName: import_smithy_client.expectString,
|
|
555
|
-
state: import_smithy_client.expectString,
|
|
556
|
-
tags: import_smithy_client._json
|
|
557
|
-
});
|
|
558
|
-
Object.assign(contents, doc);
|
|
559
|
-
return contents;
|
|
560
|
-
}, "de_CreateMonitorCommand");
|
|
561
|
-
var de_CreateProbeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
562
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
563
|
-
return de_CommandError(output, context);
|
|
564
|
-
}
|
|
565
|
-
const contents = (0, import_smithy_client.map)({
|
|
566
|
-
$metadata: deserializeMetadata(output)
|
|
567
|
-
});
|
|
568
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
569
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
570
|
-
addressFamily: import_smithy_client.expectString,
|
|
571
|
-
createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"),
|
|
572
|
-
destination: import_smithy_client.expectString,
|
|
573
|
-
destinationPort: import_smithy_client.expectInt32,
|
|
574
|
-
modifiedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "modifiedAt"),
|
|
575
|
-
packetSize: import_smithy_client.expectInt32,
|
|
576
|
-
probeArn: import_smithy_client.expectString,
|
|
577
|
-
probeId: import_smithy_client.expectString,
|
|
578
|
-
protocol: import_smithy_client.expectString,
|
|
579
|
-
sourceArn: import_smithy_client.expectString,
|
|
580
|
-
state: import_smithy_client.expectString,
|
|
581
|
-
tags: import_smithy_client._json,
|
|
582
|
-
vpcId: import_smithy_client.expectString
|
|
583
|
-
});
|
|
584
|
-
Object.assign(contents, doc);
|
|
585
|
-
return contents;
|
|
586
|
-
}, "de_CreateProbeCommand");
|
|
587
|
-
var de_DeleteMonitorCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
588
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
589
|
-
return de_CommandError(output, context);
|
|
590
|
-
}
|
|
591
|
-
const contents = (0, import_smithy_client.map)({
|
|
592
|
-
$metadata: deserializeMetadata(output)
|
|
593
|
-
});
|
|
594
|
-
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
595
|
-
return contents;
|
|
596
|
-
}, "de_DeleteMonitorCommand");
|
|
597
|
-
var de_DeleteProbeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
598
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
599
|
-
return de_CommandError(output, context);
|
|
600
|
-
}
|
|
601
|
-
const contents = (0, import_smithy_client.map)({
|
|
602
|
-
$metadata: deserializeMetadata(output)
|
|
603
|
-
});
|
|
604
|
-
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
605
|
-
return contents;
|
|
606
|
-
}, "de_DeleteProbeCommand");
|
|
607
|
-
var de_GetMonitorCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
608
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
609
|
-
return de_CommandError(output, context);
|
|
610
|
-
}
|
|
611
|
-
const contents = (0, import_smithy_client.map)({
|
|
612
|
-
$metadata: deserializeMetadata(output)
|
|
613
|
-
});
|
|
614
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
615
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
616
|
-
aggregationPeriod: import_smithy_client.expectLong,
|
|
617
|
-
createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"),
|
|
618
|
-
modifiedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "modifiedAt"),
|
|
619
|
-
monitorArn: import_smithy_client.expectString,
|
|
620
|
-
monitorName: import_smithy_client.expectString,
|
|
621
|
-
probes: /* @__PURE__ */ __name((_) => de_ProbeList(_, context), "probes"),
|
|
622
|
-
state: import_smithy_client.expectString,
|
|
623
|
-
tags: import_smithy_client._json
|
|
624
|
-
});
|
|
625
|
-
Object.assign(contents, doc);
|
|
626
|
-
return contents;
|
|
627
|
-
}, "de_GetMonitorCommand");
|
|
628
|
-
var de_GetProbeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
629
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
630
|
-
return de_CommandError(output, context);
|
|
631
|
-
}
|
|
632
|
-
const contents = (0, import_smithy_client.map)({
|
|
633
|
-
$metadata: deserializeMetadata(output)
|
|
634
|
-
});
|
|
635
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
636
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
637
|
-
addressFamily: import_smithy_client.expectString,
|
|
638
|
-
createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"),
|
|
639
|
-
destination: import_smithy_client.expectString,
|
|
640
|
-
destinationPort: import_smithy_client.expectInt32,
|
|
641
|
-
modifiedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "modifiedAt"),
|
|
642
|
-
packetSize: import_smithy_client.expectInt32,
|
|
643
|
-
probeArn: import_smithy_client.expectString,
|
|
644
|
-
probeId: import_smithy_client.expectString,
|
|
645
|
-
protocol: import_smithy_client.expectString,
|
|
646
|
-
sourceArn: import_smithy_client.expectString,
|
|
647
|
-
state: import_smithy_client.expectString,
|
|
648
|
-
tags: import_smithy_client._json,
|
|
649
|
-
vpcId: import_smithy_client.expectString
|
|
650
|
-
});
|
|
651
|
-
Object.assign(contents, doc);
|
|
652
|
-
return contents;
|
|
653
|
-
}, "de_GetProbeCommand");
|
|
654
|
-
var de_ListMonitorsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
655
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
656
|
-
return de_CommandError(output, context);
|
|
657
|
-
}
|
|
658
|
-
const contents = (0, import_smithy_client.map)({
|
|
659
|
-
$metadata: deserializeMetadata(output)
|
|
660
|
-
});
|
|
661
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
662
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
663
|
-
monitors: import_smithy_client._json,
|
|
664
|
-
nextToken: import_smithy_client.expectString
|
|
665
|
-
});
|
|
666
|
-
Object.assign(contents, doc);
|
|
667
|
-
return contents;
|
|
668
|
-
}, "de_ListMonitorsCommand");
|
|
669
|
-
var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
670
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
671
|
-
return de_CommandError(output, context);
|
|
672
|
-
}
|
|
673
|
-
const contents = (0, import_smithy_client.map)({
|
|
674
|
-
$metadata: deserializeMetadata(output)
|
|
675
|
-
});
|
|
676
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
677
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
678
|
-
tags: import_smithy_client._json
|
|
679
|
-
});
|
|
680
|
-
Object.assign(contents, doc);
|
|
681
|
-
return contents;
|
|
682
|
-
}, "de_ListTagsForResourceCommand");
|
|
683
|
-
var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
684
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
685
|
-
return de_CommandError(output, context);
|
|
686
|
-
}
|
|
687
|
-
const contents = (0, import_smithy_client.map)({
|
|
688
|
-
$metadata: deserializeMetadata(output)
|
|
689
|
-
});
|
|
690
|
-
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
691
|
-
return contents;
|
|
692
|
-
}, "de_TagResourceCommand");
|
|
693
|
-
var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
694
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
695
|
-
return de_CommandError(output, context);
|
|
696
|
-
}
|
|
697
|
-
const contents = (0, import_smithy_client.map)({
|
|
698
|
-
$metadata: deserializeMetadata(output)
|
|
699
|
-
});
|
|
700
|
-
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
701
|
-
return contents;
|
|
702
|
-
}, "de_UntagResourceCommand");
|
|
703
|
-
var de_UpdateMonitorCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
704
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
705
|
-
return de_CommandError(output, context);
|
|
706
|
-
}
|
|
707
|
-
const contents = (0, import_smithy_client.map)({
|
|
708
|
-
$metadata: deserializeMetadata(output)
|
|
709
|
-
});
|
|
710
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
711
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
712
|
-
aggregationPeriod: import_smithy_client.expectLong,
|
|
713
|
-
monitorArn: import_smithy_client.expectString,
|
|
714
|
-
monitorName: import_smithy_client.expectString,
|
|
715
|
-
state: import_smithy_client.expectString,
|
|
716
|
-
tags: import_smithy_client._json
|
|
717
|
-
});
|
|
718
|
-
Object.assign(contents, doc);
|
|
719
|
-
return contents;
|
|
720
|
-
}, "de_UpdateMonitorCommand");
|
|
721
|
-
var de_UpdateProbeCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
722
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
723
|
-
return de_CommandError(output, context);
|
|
724
|
-
}
|
|
725
|
-
const contents = (0, import_smithy_client.map)({
|
|
726
|
-
$metadata: deserializeMetadata(output)
|
|
727
|
-
});
|
|
728
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
729
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
730
|
-
addressFamily: import_smithy_client.expectString,
|
|
731
|
-
createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"),
|
|
732
|
-
destination: import_smithy_client.expectString,
|
|
733
|
-
destinationPort: import_smithy_client.expectInt32,
|
|
734
|
-
modifiedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "modifiedAt"),
|
|
735
|
-
packetSize: import_smithy_client.expectInt32,
|
|
736
|
-
probeArn: import_smithy_client.expectString,
|
|
737
|
-
probeId: import_smithy_client.expectString,
|
|
738
|
-
protocol: import_smithy_client.expectString,
|
|
739
|
-
sourceArn: import_smithy_client.expectString,
|
|
740
|
-
state: import_smithy_client.expectString,
|
|
741
|
-
tags: import_smithy_client._json,
|
|
742
|
-
vpcId: import_smithy_client.expectString
|
|
743
|
-
});
|
|
744
|
-
Object.assign(contents, doc);
|
|
745
|
-
return contents;
|
|
746
|
-
}, "de_UpdateProbeCommand");
|
|
747
|
-
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
748
|
-
const parsedOutput = {
|
|
749
|
-
...output,
|
|
750
|
-
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
751
|
-
};
|
|
752
|
-
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
753
|
-
switch (errorCode) {
|
|
754
|
-
case "AccessDeniedException":
|
|
755
|
-
case "com.amazonaws.networkmonitor#AccessDeniedException":
|
|
756
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
757
|
-
case "ConflictException":
|
|
758
|
-
case "com.amazonaws.networkmonitor#ConflictException":
|
|
759
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
760
|
-
case "InternalServerException":
|
|
761
|
-
case "com.amazonaws.networkmonitor#InternalServerException":
|
|
762
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
763
|
-
case "ServiceQuotaExceededException":
|
|
764
|
-
case "com.amazonaws.networkmonitor#ServiceQuotaExceededException":
|
|
765
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
766
|
-
case "ThrottlingException":
|
|
767
|
-
case "com.amazonaws.networkmonitor#ThrottlingException":
|
|
768
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
769
|
-
case "ValidationException":
|
|
770
|
-
case "com.amazonaws.networkmonitor#ValidationException":
|
|
771
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
772
|
-
case "ResourceNotFoundException":
|
|
773
|
-
case "com.amazonaws.networkmonitor#ResourceNotFoundException":
|
|
774
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
775
|
-
default:
|
|
776
|
-
const parsedBody = parsedOutput.body;
|
|
777
|
-
return throwDefaultError({
|
|
778
|
-
output,
|
|
779
|
-
parsedBody,
|
|
780
|
-
errorCode
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
}, "de_CommandError");
|
|
784
|
-
var throwDefaultError = (0, import_smithy_client.withBaseException)(NetworkMonitorServiceException);
|
|
785
|
-
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
786
|
-
const contents = (0, import_smithy_client.map)({});
|
|
787
|
-
const data = parsedOutput.body;
|
|
788
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
789
|
-
message: import_smithy_client.expectString
|
|
790
|
-
});
|
|
791
|
-
Object.assign(contents, doc);
|
|
792
|
-
const exception = new AccessDeniedException({
|
|
793
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
794
|
-
...contents
|
|
795
|
-
});
|
|
796
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
797
|
-
}, "de_AccessDeniedExceptionRes");
|
|
798
|
-
var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
799
|
-
const contents = (0, import_smithy_client.map)({});
|
|
800
|
-
const data = parsedOutput.body;
|
|
801
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
802
|
-
message: import_smithy_client.expectString
|
|
803
|
-
});
|
|
804
|
-
Object.assign(contents, doc);
|
|
805
|
-
const exception = new ConflictException({
|
|
806
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
807
|
-
...contents
|
|
808
|
-
});
|
|
809
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
810
|
-
}, "de_ConflictExceptionRes");
|
|
811
|
-
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
812
|
-
const contents = (0, import_smithy_client.map)({});
|
|
813
|
-
const data = parsedOutput.body;
|
|
814
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
815
|
-
message: import_smithy_client.expectString
|
|
816
|
-
});
|
|
817
|
-
Object.assign(contents, doc);
|
|
818
|
-
const exception = new InternalServerException({
|
|
819
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
820
|
-
...contents
|
|
821
|
-
});
|
|
822
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
823
|
-
}, "de_InternalServerExceptionRes");
|
|
824
|
-
var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
825
|
-
const contents = (0, import_smithy_client.map)({});
|
|
826
|
-
const data = parsedOutput.body;
|
|
827
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
828
|
-
message: import_smithy_client.expectString
|
|
829
|
-
});
|
|
830
|
-
Object.assign(contents, doc);
|
|
831
|
-
const exception = new ResourceNotFoundException({
|
|
832
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
833
|
-
...contents
|
|
834
|
-
});
|
|
835
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
836
|
-
}, "de_ResourceNotFoundExceptionRes");
|
|
837
|
-
var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
838
|
-
const contents = (0, import_smithy_client.map)({});
|
|
839
|
-
const data = parsedOutput.body;
|
|
840
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
841
|
-
message: import_smithy_client.expectString
|
|
842
|
-
});
|
|
843
|
-
Object.assign(contents, doc);
|
|
844
|
-
const exception = new ServiceQuotaExceededException({
|
|
845
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
846
|
-
...contents
|
|
847
|
-
});
|
|
848
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
849
|
-
}, "de_ServiceQuotaExceededExceptionRes");
|
|
850
|
-
var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
851
|
-
const contents = (0, import_smithy_client.map)({});
|
|
852
|
-
const data = parsedOutput.body;
|
|
853
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
854
|
-
message: import_smithy_client.expectString
|
|
855
|
-
});
|
|
856
|
-
Object.assign(contents, doc);
|
|
857
|
-
const exception = new ThrottlingException({
|
|
858
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
859
|
-
...contents
|
|
860
|
-
});
|
|
861
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
862
|
-
}, "de_ThrottlingExceptionRes");
|
|
863
|
-
var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
864
|
-
const contents = (0, import_smithy_client.map)({});
|
|
865
|
-
const data = parsedOutput.body;
|
|
866
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
867
|
-
message: import_smithy_client.expectString
|
|
868
|
-
});
|
|
869
|
-
Object.assign(contents, doc);
|
|
870
|
-
const exception = new ValidationException({
|
|
871
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
872
|
-
...contents
|
|
873
|
-
});
|
|
874
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
875
|
-
}, "de_ValidationExceptionRes");
|
|
876
|
-
var de_Probe = /* @__PURE__ */ __name((output, context) => {
|
|
877
|
-
return (0, import_smithy_client.take)(output, {
|
|
878
|
-
addressFamily: import_smithy_client.expectString,
|
|
879
|
-
createdAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "createdAt"),
|
|
880
|
-
destination: import_smithy_client.expectString,
|
|
881
|
-
destinationPort: import_smithy_client.expectInt32,
|
|
882
|
-
modifiedAt: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "modifiedAt"),
|
|
883
|
-
packetSize: import_smithy_client.expectInt32,
|
|
884
|
-
probeArn: import_smithy_client.expectString,
|
|
885
|
-
probeId: import_smithy_client.expectString,
|
|
886
|
-
protocol: import_smithy_client.expectString,
|
|
887
|
-
sourceArn: import_smithy_client.expectString,
|
|
888
|
-
state: import_smithy_client.expectString,
|
|
889
|
-
tags: import_smithy_client._json,
|
|
890
|
-
vpcId: import_smithy_client.expectString
|
|
891
|
-
});
|
|
892
|
-
}, "de_Probe");
|
|
893
|
-
var de_ProbeList = /* @__PURE__ */ __name((output, context) => {
|
|
894
|
-
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
895
|
-
return de_Probe(entry, context);
|
|
896
|
-
});
|
|
897
|
-
return retVal;
|
|
898
|
-
}, "de_ProbeList");
|
|
899
|
-
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
900
|
-
httpStatusCode: output.statusCode,
|
|
901
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
902
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
903
|
-
cfId: output.headers["x-amz-cf-id"]
|
|
904
|
-
}), "deserializeMetadata");
|
|
905
|
-
var _mR = "maxResults";
|
|
906
|
-
var _nT = "nextToken";
|
|
907
|
-
var _s = "state";
|
|
908
|
-
var _tK = "tagKeys";
|
|
909
|
-
|
|
910
|
-
// src/commands/CreateMonitorCommand.ts
|
|
911
|
-
var CreateMonitorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
912
|
-
return [
|
|
913
|
-
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
914
|
-
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
915
|
-
];
|
|
916
|
-
}).s("NetworkMonitor", "CreateMonitor", {}).n("NetworkMonitorClient", "CreateMonitorCommand").f(void 0, void 0).ser(se_CreateMonitorCommand).de(de_CreateMonitorCommand).build() {
|
|
917
|
-
static {
|
|
918
|
-
__name(this, "CreateMonitorCommand");
|
|
919
|
-
}
|
|
496
|
+
const de_ListMonitorsCommand = async (output, context) => {
|
|
497
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
498
|
+
return de_CommandError(output, context);
|
|
499
|
+
}
|
|
500
|
+
const contents = smithyClient.map({
|
|
501
|
+
$metadata: deserializeMetadata(output),
|
|
502
|
+
});
|
|
503
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
504
|
+
const doc = smithyClient.take(data, {
|
|
505
|
+
monitors: smithyClient._json,
|
|
506
|
+
nextToken: smithyClient.expectString,
|
|
507
|
+
});
|
|
508
|
+
Object.assign(contents, doc);
|
|
509
|
+
return contents;
|
|
920
510
|
};
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
(
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
})
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
}
|
|
511
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
512
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
513
|
+
return de_CommandError(output, context);
|
|
514
|
+
}
|
|
515
|
+
const contents = smithyClient.map({
|
|
516
|
+
$metadata: deserializeMetadata(output),
|
|
517
|
+
});
|
|
518
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
519
|
+
const doc = smithyClient.take(data, {
|
|
520
|
+
tags: smithyClient._json,
|
|
521
|
+
});
|
|
522
|
+
Object.assign(contents, doc);
|
|
523
|
+
return contents;
|
|
935
524
|
};
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
];
|
|
946
|
-
}).s("NetworkMonitor", "DeleteMonitor", {}).n("NetworkMonitorClient", "DeleteMonitorCommand").f(void 0, void 0).ser(se_DeleteMonitorCommand).de(de_DeleteMonitorCommand).build() {
|
|
947
|
-
static {
|
|
948
|
-
__name(this, "DeleteMonitorCommand");
|
|
949
|
-
}
|
|
525
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
526
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
527
|
+
return de_CommandError(output, context);
|
|
528
|
+
}
|
|
529
|
+
const contents = smithyClient.map({
|
|
530
|
+
$metadata: deserializeMetadata(output),
|
|
531
|
+
});
|
|
532
|
+
await smithyClient.collectBody(output.body, context);
|
|
533
|
+
return contents;
|
|
950
534
|
};
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
];
|
|
961
|
-
}).s("NetworkMonitor", "DeleteProbe", {}).n("NetworkMonitorClient", "DeleteProbeCommand").f(void 0, void 0).ser(se_DeleteProbeCommand).de(de_DeleteProbeCommand).build() {
|
|
962
|
-
static {
|
|
963
|
-
__name(this, "DeleteProbeCommand");
|
|
964
|
-
}
|
|
535
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
536
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
537
|
+
return de_CommandError(output, context);
|
|
538
|
+
}
|
|
539
|
+
const contents = smithyClient.map({
|
|
540
|
+
$metadata: deserializeMetadata(output),
|
|
541
|
+
});
|
|
542
|
+
await smithyClient.collectBody(output.body, context);
|
|
543
|
+
return contents;
|
|
965
544
|
};
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
(
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
545
|
+
const de_UpdateMonitorCommand = async (output, context) => {
|
|
546
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
547
|
+
return de_CommandError(output, context);
|
|
548
|
+
}
|
|
549
|
+
const contents = smithyClient.map({
|
|
550
|
+
$metadata: deserializeMetadata(output),
|
|
551
|
+
});
|
|
552
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
553
|
+
const doc = smithyClient.take(data, {
|
|
554
|
+
aggregationPeriod: smithyClient.expectLong,
|
|
555
|
+
monitorArn: smithyClient.expectString,
|
|
556
|
+
monitorName: smithyClient.expectString,
|
|
557
|
+
state: smithyClient.expectString,
|
|
558
|
+
tags: smithyClient._json,
|
|
559
|
+
});
|
|
560
|
+
Object.assign(contents, doc);
|
|
561
|
+
return contents;
|
|
980
562
|
};
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
(
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
563
|
+
const de_UpdateProbeCommand = async (output, context) => {
|
|
564
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
565
|
+
return de_CommandError(output, context);
|
|
566
|
+
}
|
|
567
|
+
const contents = smithyClient.map({
|
|
568
|
+
$metadata: deserializeMetadata(output),
|
|
569
|
+
});
|
|
570
|
+
const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
571
|
+
const doc = smithyClient.take(data, {
|
|
572
|
+
addressFamily: smithyClient.expectString,
|
|
573
|
+
createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
574
|
+
destination: smithyClient.expectString,
|
|
575
|
+
destinationPort: smithyClient.expectInt32,
|
|
576
|
+
modifiedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
577
|
+
packetSize: smithyClient.expectInt32,
|
|
578
|
+
probeArn: smithyClient.expectString,
|
|
579
|
+
probeId: smithyClient.expectString,
|
|
580
|
+
protocol: smithyClient.expectString,
|
|
581
|
+
sourceArn: smithyClient.expectString,
|
|
582
|
+
state: smithyClient.expectString,
|
|
583
|
+
tags: smithyClient._json,
|
|
584
|
+
vpcId: smithyClient.expectString,
|
|
585
|
+
});
|
|
586
|
+
Object.assign(contents, doc);
|
|
587
|
+
return contents;
|
|
995
588
|
};
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
589
|
+
const de_CommandError = async (output, context) => {
|
|
590
|
+
const parsedOutput = {
|
|
591
|
+
...output,
|
|
592
|
+
body: await core$1.parseJsonErrorBody(output.body, context),
|
|
593
|
+
};
|
|
594
|
+
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
595
|
+
switch (errorCode) {
|
|
596
|
+
case "AccessDeniedException":
|
|
597
|
+
case "com.amazonaws.networkmonitor#AccessDeniedException":
|
|
598
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput);
|
|
599
|
+
case "ConflictException":
|
|
600
|
+
case "com.amazonaws.networkmonitor#ConflictException":
|
|
601
|
+
throw await de_ConflictExceptionRes(parsedOutput);
|
|
602
|
+
case "InternalServerException":
|
|
603
|
+
case "com.amazonaws.networkmonitor#InternalServerException":
|
|
604
|
+
throw await de_InternalServerExceptionRes(parsedOutput);
|
|
605
|
+
case "ServiceQuotaExceededException":
|
|
606
|
+
case "com.amazonaws.networkmonitor#ServiceQuotaExceededException":
|
|
607
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput);
|
|
608
|
+
case "ThrottlingException":
|
|
609
|
+
case "com.amazonaws.networkmonitor#ThrottlingException":
|
|
610
|
+
throw await de_ThrottlingExceptionRes(parsedOutput);
|
|
611
|
+
case "ValidationException":
|
|
612
|
+
case "com.amazonaws.networkmonitor#ValidationException":
|
|
613
|
+
throw await de_ValidationExceptionRes(parsedOutput);
|
|
614
|
+
case "ResourceNotFoundException":
|
|
615
|
+
case "com.amazonaws.networkmonitor#ResourceNotFoundException":
|
|
616
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput);
|
|
617
|
+
default:
|
|
618
|
+
const parsedBody = parsedOutput.body;
|
|
619
|
+
return throwDefaultError({
|
|
620
|
+
output,
|
|
621
|
+
parsedBody,
|
|
622
|
+
errorCode,
|
|
623
|
+
});
|
|
624
|
+
}
|
|
1010
625
|
};
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
}
|
|
626
|
+
const throwDefaultError = smithyClient.withBaseException(NetworkMonitorServiceException);
|
|
627
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
628
|
+
const contents = smithyClient.map({});
|
|
629
|
+
const data = parsedOutput.body;
|
|
630
|
+
const doc = smithyClient.take(data, {
|
|
631
|
+
message: smithyClient.expectString,
|
|
632
|
+
});
|
|
633
|
+
Object.assign(contents, doc);
|
|
634
|
+
const exception = new AccessDeniedException({
|
|
635
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
636
|
+
...contents,
|
|
637
|
+
});
|
|
638
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1025
639
|
};
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
})
|
|
1037
|
-
|
|
1038
|
-
__name(this, "TagResourceCommand");
|
|
1039
|
-
}
|
|
640
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
641
|
+
const contents = smithyClient.map({});
|
|
642
|
+
const data = parsedOutput.body;
|
|
643
|
+
const doc = smithyClient.take(data, {
|
|
644
|
+
message: smithyClient.expectString,
|
|
645
|
+
});
|
|
646
|
+
Object.assign(contents, doc);
|
|
647
|
+
const exception = new ConflictException({
|
|
648
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
649
|
+
...contents,
|
|
650
|
+
});
|
|
651
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1040
652
|
};
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
})
|
|
1052
|
-
|
|
1053
|
-
__name(this, "UntagResourceCommand");
|
|
1054
|
-
}
|
|
653
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
654
|
+
const contents = smithyClient.map({});
|
|
655
|
+
const data = parsedOutput.body;
|
|
656
|
+
const doc = smithyClient.take(data, {
|
|
657
|
+
message: smithyClient.expectString,
|
|
658
|
+
});
|
|
659
|
+
Object.assign(contents, doc);
|
|
660
|
+
const exception = new InternalServerException({
|
|
661
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
662
|
+
...contents,
|
|
663
|
+
});
|
|
664
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1055
665
|
};
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
})
|
|
1067
|
-
|
|
1068
|
-
__name(this, "UpdateMonitorCommand");
|
|
1069
|
-
}
|
|
666
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
667
|
+
const contents = smithyClient.map({});
|
|
668
|
+
const data = parsedOutput.body;
|
|
669
|
+
const doc = smithyClient.take(data, {
|
|
670
|
+
message: smithyClient.expectString,
|
|
671
|
+
});
|
|
672
|
+
Object.assign(contents, doc);
|
|
673
|
+
const exception = new ResourceNotFoundException({
|
|
674
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
675
|
+
...contents,
|
|
676
|
+
});
|
|
677
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1070
678
|
};
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
})
|
|
1082
|
-
|
|
1083
|
-
__name(this, "UpdateProbeCommand");
|
|
1084
|
-
}
|
|
679
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
680
|
+
const contents = smithyClient.map({});
|
|
681
|
+
const data = parsedOutput.body;
|
|
682
|
+
const doc = smithyClient.take(data, {
|
|
683
|
+
message: smithyClient.expectString,
|
|
684
|
+
});
|
|
685
|
+
Object.assign(contents, doc);
|
|
686
|
+
const exception = new ServiceQuotaExceededException({
|
|
687
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
688
|
+
...contents,
|
|
689
|
+
});
|
|
690
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1085
691
|
};
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
UntagResourceCommand,
|
|
1099
|
-
UpdateMonitorCommand,
|
|
1100
|
-
UpdateProbeCommand
|
|
692
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
693
|
+
const contents = smithyClient.map({});
|
|
694
|
+
const data = parsedOutput.body;
|
|
695
|
+
const doc = smithyClient.take(data, {
|
|
696
|
+
message: smithyClient.expectString,
|
|
697
|
+
});
|
|
698
|
+
Object.assign(contents, doc);
|
|
699
|
+
const exception = new ThrottlingException({
|
|
700
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
701
|
+
...contents,
|
|
702
|
+
});
|
|
703
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1101
704
|
};
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
705
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
706
|
+
const contents = smithyClient.map({});
|
|
707
|
+
const data = parsedOutput.body;
|
|
708
|
+
const doc = smithyClient.take(data, {
|
|
709
|
+
message: smithyClient.expectString,
|
|
710
|
+
});
|
|
711
|
+
Object.assign(contents, doc);
|
|
712
|
+
const exception = new ValidationException({
|
|
713
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
714
|
+
...contents,
|
|
715
|
+
});
|
|
716
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
1106
717
|
};
|
|
1107
|
-
(
|
|
1108
|
-
|
|
1109
|
-
|
|
718
|
+
const de_Probe = (output, context) => {
|
|
719
|
+
return smithyClient.take(output, {
|
|
720
|
+
addressFamily: smithyClient.expectString,
|
|
721
|
+
createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
722
|
+
destination: smithyClient.expectString,
|
|
723
|
+
destinationPort: smithyClient.expectInt32,
|
|
724
|
+
modifiedAt: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
725
|
+
packetSize: smithyClient.expectInt32,
|
|
726
|
+
probeArn: smithyClient.expectString,
|
|
727
|
+
probeId: smithyClient.expectString,
|
|
728
|
+
protocol: smithyClient.expectString,
|
|
729
|
+
sourceArn: smithyClient.expectString,
|
|
730
|
+
state: smithyClient.expectString,
|
|
731
|
+
tags: smithyClient._json,
|
|
732
|
+
vpcId: smithyClient.expectString,
|
|
733
|
+
});
|
|
734
|
+
};
|
|
735
|
+
const de_ProbeList = (output, context) => {
|
|
736
|
+
const retVal = (output || [])
|
|
737
|
+
.filter((e) => e != null)
|
|
738
|
+
.map((entry) => {
|
|
739
|
+
return de_Probe(entry);
|
|
740
|
+
});
|
|
741
|
+
return retVal;
|
|
742
|
+
};
|
|
743
|
+
const deserializeMetadata = (output) => ({
|
|
744
|
+
httpStatusCode: output.statusCode,
|
|
745
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
746
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
747
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
748
|
+
});
|
|
749
|
+
const _mR = "maxResults";
|
|
750
|
+
const _nT = "nextToken";
|
|
751
|
+
const _s = "state";
|
|
752
|
+
const _tK = "tagKeys";
|
|
753
|
+
|
|
754
|
+
class CreateMonitorCommand extends smithyClient.Command
|
|
755
|
+
.classBuilder()
|
|
756
|
+
.ep(commonParams)
|
|
757
|
+
.m(function (Command, cs, config, o) {
|
|
758
|
+
return [
|
|
759
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
760
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
761
|
+
];
|
|
762
|
+
})
|
|
763
|
+
.s("NetworkMonitor", "CreateMonitor", {})
|
|
764
|
+
.n("NetworkMonitorClient", "CreateMonitorCommand")
|
|
765
|
+
.f(void 0, void 0)
|
|
766
|
+
.ser(se_CreateMonitorCommand)
|
|
767
|
+
.de(de_CreateMonitorCommand)
|
|
768
|
+
.build() {
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
class CreateProbeCommand extends smithyClient.Command
|
|
772
|
+
.classBuilder()
|
|
773
|
+
.ep(commonParams)
|
|
774
|
+
.m(function (Command, cs, config, o) {
|
|
775
|
+
return [
|
|
776
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
777
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
778
|
+
];
|
|
779
|
+
})
|
|
780
|
+
.s("NetworkMonitor", "CreateProbe", {})
|
|
781
|
+
.n("NetworkMonitorClient", "CreateProbeCommand")
|
|
782
|
+
.f(void 0, void 0)
|
|
783
|
+
.ser(se_CreateProbeCommand)
|
|
784
|
+
.de(de_CreateProbeCommand)
|
|
785
|
+
.build() {
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
class DeleteMonitorCommand extends smithyClient.Command
|
|
789
|
+
.classBuilder()
|
|
790
|
+
.ep(commonParams)
|
|
791
|
+
.m(function (Command, cs, config, o) {
|
|
792
|
+
return [
|
|
793
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
794
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
795
|
+
];
|
|
796
|
+
})
|
|
797
|
+
.s("NetworkMonitor", "DeleteMonitor", {})
|
|
798
|
+
.n("NetworkMonitorClient", "DeleteMonitorCommand")
|
|
799
|
+
.f(void 0, void 0)
|
|
800
|
+
.ser(se_DeleteMonitorCommand)
|
|
801
|
+
.de(de_DeleteMonitorCommand)
|
|
802
|
+
.build() {
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
class DeleteProbeCommand extends smithyClient.Command
|
|
806
|
+
.classBuilder()
|
|
807
|
+
.ep(commonParams)
|
|
808
|
+
.m(function (Command, cs, config, o) {
|
|
809
|
+
return [
|
|
810
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
811
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
812
|
+
];
|
|
813
|
+
})
|
|
814
|
+
.s("NetworkMonitor", "DeleteProbe", {})
|
|
815
|
+
.n("NetworkMonitorClient", "DeleteProbeCommand")
|
|
816
|
+
.f(void 0, void 0)
|
|
817
|
+
.ser(se_DeleteProbeCommand)
|
|
818
|
+
.de(de_DeleteProbeCommand)
|
|
819
|
+
.build() {
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
class GetMonitorCommand extends smithyClient.Command
|
|
823
|
+
.classBuilder()
|
|
824
|
+
.ep(commonParams)
|
|
825
|
+
.m(function (Command, cs, config, o) {
|
|
826
|
+
return [
|
|
827
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
828
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
829
|
+
];
|
|
830
|
+
})
|
|
831
|
+
.s("NetworkMonitor", "GetMonitor", {})
|
|
832
|
+
.n("NetworkMonitorClient", "GetMonitorCommand")
|
|
833
|
+
.f(void 0, void 0)
|
|
834
|
+
.ser(se_GetMonitorCommand)
|
|
835
|
+
.de(de_GetMonitorCommand)
|
|
836
|
+
.build() {
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
class GetProbeCommand extends smithyClient.Command
|
|
840
|
+
.classBuilder()
|
|
841
|
+
.ep(commonParams)
|
|
842
|
+
.m(function (Command, cs, config, o) {
|
|
843
|
+
return [
|
|
844
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
845
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
846
|
+
];
|
|
847
|
+
})
|
|
848
|
+
.s("NetworkMonitor", "GetProbe", {})
|
|
849
|
+
.n("NetworkMonitorClient", "GetProbeCommand")
|
|
850
|
+
.f(void 0, void 0)
|
|
851
|
+
.ser(se_GetProbeCommand)
|
|
852
|
+
.de(de_GetProbeCommand)
|
|
853
|
+
.build() {
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
class ListMonitorsCommand extends smithyClient.Command
|
|
857
|
+
.classBuilder()
|
|
858
|
+
.ep(commonParams)
|
|
859
|
+
.m(function (Command, cs, config, o) {
|
|
860
|
+
return [
|
|
861
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
862
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
863
|
+
];
|
|
864
|
+
})
|
|
865
|
+
.s("NetworkMonitor", "ListMonitors", {})
|
|
866
|
+
.n("NetworkMonitorClient", "ListMonitorsCommand")
|
|
867
|
+
.f(void 0, void 0)
|
|
868
|
+
.ser(se_ListMonitorsCommand)
|
|
869
|
+
.de(de_ListMonitorsCommand)
|
|
870
|
+
.build() {
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
class ListTagsForResourceCommand extends smithyClient.Command
|
|
874
|
+
.classBuilder()
|
|
875
|
+
.ep(commonParams)
|
|
876
|
+
.m(function (Command, cs, config, o) {
|
|
877
|
+
return [
|
|
878
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
879
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
880
|
+
];
|
|
881
|
+
})
|
|
882
|
+
.s("NetworkMonitor", "ListTagsForResource", {})
|
|
883
|
+
.n("NetworkMonitorClient", "ListTagsForResourceCommand")
|
|
884
|
+
.f(void 0, void 0)
|
|
885
|
+
.ser(se_ListTagsForResourceCommand)
|
|
886
|
+
.de(de_ListTagsForResourceCommand)
|
|
887
|
+
.build() {
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
class TagResourceCommand extends smithyClient.Command
|
|
891
|
+
.classBuilder()
|
|
892
|
+
.ep(commonParams)
|
|
893
|
+
.m(function (Command, cs, config, o) {
|
|
894
|
+
return [
|
|
895
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
896
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
897
|
+
];
|
|
898
|
+
})
|
|
899
|
+
.s("NetworkMonitor", "TagResource", {})
|
|
900
|
+
.n("NetworkMonitorClient", "TagResourceCommand")
|
|
901
|
+
.f(void 0, void 0)
|
|
902
|
+
.ser(se_TagResourceCommand)
|
|
903
|
+
.de(de_TagResourceCommand)
|
|
904
|
+
.build() {
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
class UntagResourceCommand extends smithyClient.Command
|
|
908
|
+
.classBuilder()
|
|
909
|
+
.ep(commonParams)
|
|
910
|
+
.m(function (Command, cs, config, o) {
|
|
911
|
+
return [
|
|
912
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
913
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
914
|
+
];
|
|
915
|
+
})
|
|
916
|
+
.s("NetworkMonitor", "UntagResource", {})
|
|
917
|
+
.n("NetworkMonitorClient", "UntagResourceCommand")
|
|
918
|
+
.f(void 0, void 0)
|
|
919
|
+
.ser(se_UntagResourceCommand)
|
|
920
|
+
.de(de_UntagResourceCommand)
|
|
921
|
+
.build() {
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
class UpdateMonitorCommand extends smithyClient.Command
|
|
925
|
+
.classBuilder()
|
|
926
|
+
.ep(commonParams)
|
|
927
|
+
.m(function (Command, cs, config, o) {
|
|
928
|
+
return [
|
|
929
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
930
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
931
|
+
];
|
|
932
|
+
})
|
|
933
|
+
.s("NetworkMonitor", "UpdateMonitor", {})
|
|
934
|
+
.n("NetworkMonitorClient", "UpdateMonitorCommand")
|
|
935
|
+
.f(void 0, void 0)
|
|
936
|
+
.ser(se_UpdateMonitorCommand)
|
|
937
|
+
.de(de_UpdateMonitorCommand)
|
|
938
|
+
.build() {
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
class UpdateProbeCommand extends smithyClient.Command
|
|
942
|
+
.classBuilder()
|
|
943
|
+
.ep(commonParams)
|
|
944
|
+
.m(function (Command, cs, config, o) {
|
|
945
|
+
return [
|
|
946
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
947
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
948
|
+
];
|
|
949
|
+
})
|
|
950
|
+
.s("NetworkMonitor", "UpdateProbe", {})
|
|
951
|
+
.n("NetworkMonitorClient", "UpdateProbeCommand")
|
|
952
|
+
.f(void 0, void 0)
|
|
953
|
+
.ser(se_UpdateProbeCommand)
|
|
954
|
+
.de(de_UpdateProbeCommand)
|
|
955
|
+
.build() {
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
const commands = {
|
|
959
|
+
CreateMonitorCommand,
|
|
960
|
+
CreateProbeCommand,
|
|
961
|
+
DeleteMonitorCommand,
|
|
962
|
+
DeleteProbeCommand,
|
|
963
|
+
GetMonitorCommand,
|
|
964
|
+
GetProbeCommand,
|
|
965
|
+
ListMonitorsCommand,
|
|
966
|
+
ListTagsForResourceCommand,
|
|
967
|
+
TagResourceCommand,
|
|
968
|
+
UntagResourceCommand,
|
|
969
|
+
UpdateMonitorCommand,
|
|
970
|
+
UpdateProbeCommand,
|
|
971
|
+
};
|
|
972
|
+
class NetworkMonitor extends NetworkMonitorClient {
|
|
973
|
+
}
|
|
974
|
+
smithyClient.createAggregatedClient(commands, NetworkMonitor);
|
|
1110
975
|
|
|
1111
|
-
|
|
1112
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
976
|
+
const paginateListMonitors = core.createPaginator(NetworkMonitorClient, ListMonitorsCommand, "nextToken", "nextToken", "maxResults");
|
|
1113
977
|
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
NetworkMonitorClient,
|
|
1118
|
-
NetworkMonitor,
|
|
1119
|
-
$Command,
|
|
1120
|
-
CreateMonitorCommand,
|
|
1121
|
-
CreateProbeCommand,
|
|
1122
|
-
DeleteMonitorCommand,
|
|
1123
|
-
DeleteProbeCommand,
|
|
1124
|
-
GetMonitorCommand,
|
|
1125
|
-
GetProbeCommand,
|
|
1126
|
-
ListMonitorsCommand,
|
|
1127
|
-
ListTagsForResourceCommand,
|
|
1128
|
-
TagResourceCommand,
|
|
1129
|
-
UntagResourceCommand,
|
|
1130
|
-
UpdateMonitorCommand,
|
|
1131
|
-
UpdateProbeCommand,
|
|
1132
|
-
paginateListMonitors,
|
|
1133
|
-
AccessDeniedException,
|
|
1134
|
-
AddressFamily,
|
|
1135
|
-
ConflictException,
|
|
1136
|
-
Protocol,
|
|
1137
|
-
MonitorState,
|
|
1138
|
-
InternalServerException,
|
|
1139
|
-
ServiceQuotaExceededException,
|
|
1140
|
-
ThrottlingException,
|
|
1141
|
-
ValidationException,
|
|
1142
|
-
ProbeState,
|
|
1143
|
-
ResourceNotFoundException
|
|
978
|
+
Object.defineProperty(exports, "$Command", {
|
|
979
|
+
enumerable: true,
|
|
980
|
+
get: function () { return smithyClient.Command; }
|
|
1144
981
|
});
|
|
1145
|
-
|
|
982
|
+
Object.defineProperty(exports, "__Client", {
|
|
983
|
+
enumerable: true,
|
|
984
|
+
get: function () { return smithyClient.Client; }
|
|
985
|
+
});
|
|
986
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
987
|
+
exports.AddressFamily = AddressFamily;
|
|
988
|
+
exports.ConflictException = ConflictException;
|
|
989
|
+
exports.CreateMonitorCommand = CreateMonitorCommand;
|
|
990
|
+
exports.CreateProbeCommand = CreateProbeCommand;
|
|
991
|
+
exports.DeleteMonitorCommand = DeleteMonitorCommand;
|
|
992
|
+
exports.DeleteProbeCommand = DeleteProbeCommand;
|
|
993
|
+
exports.GetMonitorCommand = GetMonitorCommand;
|
|
994
|
+
exports.GetProbeCommand = GetProbeCommand;
|
|
995
|
+
exports.InternalServerException = InternalServerException;
|
|
996
|
+
exports.ListMonitorsCommand = ListMonitorsCommand;
|
|
997
|
+
exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
|
|
998
|
+
exports.MonitorState = MonitorState;
|
|
999
|
+
exports.NetworkMonitor = NetworkMonitor;
|
|
1000
|
+
exports.NetworkMonitorClient = NetworkMonitorClient;
|
|
1001
|
+
exports.NetworkMonitorServiceException = NetworkMonitorServiceException;
|
|
1002
|
+
exports.ProbeState = ProbeState;
|
|
1003
|
+
exports.Protocol = Protocol;
|
|
1004
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
1005
|
+
exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
|
|
1006
|
+
exports.TagResourceCommand = TagResourceCommand;
|
|
1007
|
+
exports.ThrottlingException = ThrottlingException;
|
|
1008
|
+
exports.UntagResourceCommand = UntagResourceCommand;
|
|
1009
|
+
exports.UpdateMonitorCommand = UpdateMonitorCommand;
|
|
1010
|
+
exports.UpdateProbeCommand = UpdateProbeCommand;
|
|
1011
|
+
exports.ValidationException = ValidationException;
|
|
1012
|
+
exports.paginateListMonitors = paginateListMonitors;
|