@aws-sdk/client-internetmonitor 3.474.0 → 3.477.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.
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.de_UpdateMonitorCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopQueryCommand = exports.de_StartQueryCommand = exports.de_ListTagsForResourceCommand = exports.de_ListMonitorsCommand = exports.de_ListHealthEventsCommand = exports.de_GetQueryStatusCommand = exports.de_GetQueryResultsCommand = exports.de_GetMonitorCommand = exports.de_GetHealthEventCommand = exports.de_DeleteMonitorCommand = exports.de_CreateMonitorCommand = exports.se_UpdateMonitorCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopQueryCommand = exports.se_StartQueryCommand = exports.se_ListTagsForResourceCommand = exports.se_ListMonitorsCommand = exports.se_ListHealthEventsCommand = exports.se_GetQueryStatusCommand = exports.se_GetQueryResultsCommand = exports.se_GetMonitorCommand = exports.se_GetHealthEventCommand = exports.se_DeleteMonitorCommand = exports.se_CreateMonitorCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
7
7
|
const InternetMonitorServiceException_1 = require("../models/InternetMonitorServiceException");
|
|
8
8
|
const models_0_1 = require("../models/models_0");
|
|
9
9
|
const se_CreateMonitorCommand = async (input, context) => {
|
|
10
|
-
const
|
|
10
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
11
11
|
const headers = {
|
|
12
12
|
"content-type": "application/json",
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
b.bp("/v20210603/Monitors");
|
|
15
15
|
let body;
|
|
16
16
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
17
|
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
@@ -23,188 +23,115 @@ const se_CreateMonitorCommand = async (input, context) => {
|
|
|
23
23
|
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
24
24
|
TrafficPercentageToMonitor: [],
|
|
25
25
|
}));
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
hostname,
|
|
29
|
-
port,
|
|
30
|
-
method: "POST",
|
|
31
|
-
headers,
|
|
32
|
-
path: resolvedPath,
|
|
33
|
-
body,
|
|
34
|
-
});
|
|
26
|
+
b.m("POST").h(headers).b(body);
|
|
27
|
+
return b.build();
|
|
35
28
|
};
|
|
36
29
|
exports.se_CreateMonitorCommand = se_CreateMonitorCommand;
|
|
37
30
|
const se_DeleteMonitorCommand = async (input, context) => {
|
|
38
|
-
const
|
|
31
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
39
32
|
const headers = {};
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
b.bp("/v20210603/Monitors/{MonitorName}");
|
|
34
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
42
35
|
let body;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
hostname,
|
|
46
|
-
port,
|
|
47
|
-
method: "DELETE",
|
|
48
|
-
headers,
|
|
49
|
-
path: resolvedPath,
|
|
50
|
-
body,
|
|
51
|
-
});
|
|
36
|
+
b.m("DELETE").h(headers).b(body);
|
|
37
|
+
return b.build();
|
|
52
38
|
};
|
|
53
39
|
exports.se_DeleteMonitorCommand = se_DeleteMonitorCommand;
|
|
54
40
|
const se_GetHealthEventCommand = async (input, context) => {
|
|
55
|
-
const
|
|
41
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
56
42
|
const headers = {};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EventId", () => input.EventId, "{EventId}", false);
|
|
43
|
+
b.bp("/v20210603/Monitors/{MonitorName}/HealthEvents/{EventId}");
|
|
44
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
45
|
+
b.p("EventId", () => input.EventId, "{EventId}", false);
|
|
61
46
|
let body;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
hostname,
|
|
65
|
-
port,
|
|
66
|
-
method: "GET",
|
|
67
|
-
headers,
|
|
68
|
-
path: resolvedPath,
|
|
69
|
-
body,
|
|
70
|
-
});
|
|
47
|
+
b.m("GET").h(headers).b(body);
|
|
48
|
+
return b.build();
|
|
71
49
|
};
|
|
72
50
|
exports.se_GetHealthEventCommand = se_GetHealthEventCommand;
|
|
73
51
|
const se_GetMonitorCommand = async (input, context) => {
|
|
74
|
-
const
|
|
52
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
75
53
|
const headers = {};
|
|
76
|
-
|
|
77
|
-
|
|
54
|
+
b.bp("/v20210603/Monitors/{MonitorName}");
|
|
55
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
78
56
|
let body;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
hostname,
|
|
82
|
-
port,
|
|
83
|
-
method: "GET",
|
|
84
|
-
headers,
|
|
85
|
-
path: resolvedPath,
|
|
86
|
-
body,
|
|
87
|
-
});
|
|
57
|
+
b.m("GET").h(headers).b(body);
|
|
58
|
+
return b.build();
|
|
88
59
|
};
|
|
89
60
|
exports.se_GetMonitorCommand = se_GetMonitorCommand;
|
|
90
61
|
const se_GetQueryResultsCommand = async (input, context) => {
|
|
91
|
-
const
|
|
62
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
92
63
|
const headers = {};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueryId", () => input.QueryId, "{QueryId}", false);
|
|
64
|
+
b.bp("/v20210603/Monitors/{MonitorName}/Queries/{QueryId}/Results");
|
|
65
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
66
|
+
b.p("QueryId", () => input.QueryId, "{QueryId}", false);
|
|
97
67
|
const query = (0, smithy_client_1.map)({
|
|
98
|
-
|
|
99
|
-
|
|
68
|
+
[_NT]: [, input[_NT]],
|
|
69
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
100
70
|
});
|
|
101
71
|
let body;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
hostname,
|
|
105
|
-
port,
|
|
106
|
-
method: "GET",
|
|
107
|
-
headers,
|
|
108
|
-
path: resolvedPath,
|
|
109
|
-
query,
|
|
110
|
-
body,
|
|
111
|
-
});
|
|
72
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
73
|
+
return b.build();
|
|
112
74
|
};
|
|
113
75
|
exports.se_GetQueryResultsCommand = se_GetQueryResultsCommand;
|
|
114
76
|
const se_GetQueryStatusCommand = async (input, context) => {
|
|
115
|
-
const
|
|
77
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
116
78
|
const headers = {};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueryId", () => input.QueryId, "{QueryId}", false);
|
|
79
|
+
b.bp("/v20210603/Monitors/{MonitorName}/Queries/{QueryId}/Status");
|
|
80
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
81
|
+
b.p("QueryId", () => input.QueryId, "{QueryId}", false);
|
|
121
82
|
let body;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
hostname,
|
|
125
|
-
port,
|
|
126
|
-
method: "GET",
|
|
127
|
-
headers,
|
|
128
|
-
path: resolvedPath,
|
|
129
|
-
body,
|
|
130
|
-
});
|
|
83
|
+
b.m("GET").h(headers).b(body);
|
|
84
|
+
return b.build();
|
|
131
85
|
};
|
|
132
86
|
exports.se_GetQueryStatusCommand = se_GetQueryStatusCommand;
|
|
133
87
|
const se_ListHealthEventsCommand = async (input, context) => {
|
|
134
|
-
const
|
|
88
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
135
89
|
const headers = {};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
90
|
+
b.bp("/v20210603/Monitors/{MonitorName}/HealthEvents");
|
|
91
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
139
92
|
const query = (0, smithy_client_1.map)({
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
],
|
|
144
|
-
|
|
145
|
-
NextToken: [, input.NextToken],
|
|
146
|
-
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
147
|
-
EventStatus: [, input.EventStatus],
|
|
93
|
+
[_ST]: [() => input.StartTime !== void 0, () => (input[_ST].toISOString().split(".")[0] + "Z").toString()],
|
|
94
|
+
[_ET]: [() => input.EndTime !== void 0, () => (input[_ET].toISOString().split(".")[0] + "Z").toString()],
|
|
95
|
+
[_NT]: [, input[_NT]],
|
|
96
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
97
|
+
[_ES]: [, input[_ES]],
|
|
148
98
|
});
|
|
149
99
|
let body;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
hostname,
|
|
153
|
-
port,
|
|
154
|
-
method: "GET",
|
|
155
|
-
headers,
|
|
156
|
-
path: resolvedPath,
|
|
157
|
-
query,
|
|
158
|
-
body,
|
|
159
|
-
});
|
|
100
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
101
|
+
return b.build();
|
|
160
102
|
};
|
|
161
103
|
exports.se_ListHealthEventsCommand = se_ListHealthEventsCommand;
|
|
162
104
|
const se_ListMonitorsCommand = async (input, context) => {
|
|
163
|
-
const
|
|
105
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
164
106
|
const headers = {};
|
|
165
|
-
|
|
107
|
+
b.bp("/v20210603/Monitors");
|
|
166
108
|
const query = (0, smithy_client_1.map)({
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
109
|
+
[_NT]: [, input[_NT]],
|
|
110
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
111
|
+
[_MS]: [, input[_MS]],
|
|
170
112
|
});
|
|
171
113
|
let body;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
hostname,
|
|
175
|
-
port,
|
|
176
|
-
method: "GET",
|
|
177
|
-
headers,
|
|
178
|
-
path: resolvedPath,
|
|
179
|
-
query,
|
|
180
|
-
body,
|
|
181
|
-
});
|
|
114
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
115
|
+
return b.build();
|
|
182
116
|
};
|
|
183
117
|
exports.se_ListMonitorsCommand = se_ListMonitorsCommand;
|
|
184
118
|
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
185
|
-
const
|
|
119
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
186
120
|
const headers = {};
|
|
187
|
-
|
|
188
|
-
|
|
121
|
+
b.bp("/tags/{ResourceArn}");
|
|
122
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
189
123
|
let body;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
hostname,
|
|
193
|
-
port,
|
|
194
|
-
method: "GET",
|
|
195
|
-
headers,
|
|
196
|
-
path: resolvedPath,
|
|
197
|
-
body,
|
|
198
|
-
});
|
|
124
|
+
b.m("GET").h(headers).b(body);
|
|
125
|
+
return b.build();
|
|
199
126
|
};
|
|
200
127
|
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
201
128
|
const se_StartQueryCommand = async (input, context) => {
|
|
202
|
-
const
|
|
129
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
203
130
|
const headers = {
|
|
204
131
|
"content-type": "application/json",
|
|
205
132
|
};
|
|
206
|
-
|
|
207
|
-
|
|
133
|
+
b.bp("/v20210603/Monitors/{MonitorName}/Queries");
|
|
134
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
208
135
|
let body;
|
|
209
136
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
210
137
|
EndTime: (_) => _.toISOString().split(".")[0] + "Z",
|
|
@@ -212,89 +139,59 @@ const se_StartQueryCommand = async (input, context) => {
|
|
|
212
139
|
QueryType: [],
|
|
213
140
|
StartTime: (_) => _.toISOString().split(".")[0] + "Z",
|
|
214
141
|
}));
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
hostname,
|
|
218
|
-
port,
|
|
219
|
-
method: "POST",
|
|
220
|
-
headers,
|
|
221
|
-
path: resolvedPath,
|
|
222
|
-
body,
|
|
223
|
-
});
|
|
142
|
+
b.m("POST").h(headers).b(body);
|
|
143
|
+
return b.build();
|
|
224
144
|
};
|
|
225
145
|
exports.se_StartQueryCommand = se_StartQueryCommand;
|
|
226
146
|
const se_StopQueryCommand = async (input, context) => {
|
|
227
|
-
const
|
|
147
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
228
148
|
const headers = {};
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "QueryId", () => input.QueryId, "{QueryId}", false);
|
|
149
|
+
b.bp("/v20210603/Monitors/{MonitorName}/Queries/{QueryId}");
|
|
150
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
151
|
+
b.p("QueryId", () => input.QueryId, "{QueryId}", false);
|
|
233
152
|
let body;
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
hostname,
|
|
237
|
-
port,
|
|
238
|
-
method: "DELETE",
|
|
239
|
-
headers,
|
|
240
|
-
path: resolvedPath,
|
|
241
|
-
body,
|
|
242
|
-
});
|
|
153
|
+
b.m("DELETE").h(headers).b(body);
|
|
154
|
+
return b.build();
|
|
243
155
|
};
|
|
244
156
|
exports.se_StopQueryCommand = se_StopQueryCommand;
|
|
245
157
|
const se_TagResourceCommand = async (input, context) => {
|
|
246
|
-
const
|
|
158
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
247
159
|
const headers = {
|
|
248
160
|
"content-type": "application/json",
|
|
249
161
|
};
|
|
250
|
-
|
|
251
|
-
|
|
162
|
+
b.bp("/tags/{ResourceArn}");
|
|
163
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
252
164
|
let body;
|
|
253
165
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
254
166
|
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
255
167
|
}));
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
hostname,
|
|
259
|
-
port,
|
|
260
|
-
method: "POST",
|
|
261
|
-
headers,
|
|
262
|
-
path: resolvedPath,
|
|
263
|
-
body,
|
|
264
|
-
});
|
|
168
|
+
b.m("POST").h(headers).b(body);
|
|
169
|
+
return b.build();
|
|
265
170
|
};
|
|
266
171
|
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
267
172
|
const se_UntagResourceCommand = async (input, context) => {
|
|
268
|
-
const
|
|
173
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
269
174
|
const headers = {};
|
|
270
|
-
|
|
271
|
-
|
|
175
|
+
b.bp("/tags/{ResourceArn}");
|
|
176
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
272
177
|
const query = (0, smithy_client_1.map)({
|
|
273
|
-
|
|
178
|
+
[_tK]: [
|
|
274
179
|
(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
275
|
-
() => (input
|
|
180
|
+
() => (input[_TK] || []).map((_entry) => _entry),
|
|
276
181
|
],
|
|
277
182
|
});
|
|
278
183
|
let body;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
hostname,
|
|
282
|
-
port,
|
|
283
|
-
method: "DELETE",
|
|
284
|
-
headers,
|
|
285
|
-
path: resolvedPath,
|
|
286
|
-
query,
|
|
287
|
-
body,
|
|
288
|
-
});
|
|
184
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
185
|
+
return b.build();
|
|
289
186
|
};
|
|
290
187
|
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
291
188
|
const se_UpdateMonitorCommand = async (input, context) => {
|
|
292
|
-
const
|
|
189
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
293
190
|
const headers = {
|
|
294
191
|
"content-type": "application/json",
|
|
295
192
|
};
|
|
296
|
-
|
|
297
|
-
|
|
193
|
+
b.bp("/v20210603/Monitors/{MonitorName}");
|
|
194
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
298
195
|
let body;
|
|
299
196
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
300
197
|
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
@@ -306,15 +203,8 @@ const se_UpdateMonitorCommand = async (input, context) => {
|
|
|
306
203
|
Status: [],
|
|
307
204
|
TrafficPercentageToMonitor: [],
|
|
308
205
|
}));
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
hostname,
|
|
312
|
-
port,
|
|
313
|
-
method: "PATCH",
|
|
314
|
-
headers,
|
|
315
|
-
path: resolvedPath,
|
|
316
|
-
body,
|
|
317
|
-
});
|
|
206
|
+
b.m("PATCH").h(headers).b(body);
|
|
207
|
+
return b.build();
|
|
318
208
|
};
|
|
319
209
|
exports.se_UpdateMonitorCommand = se_UpdateMonitorCommand;
|
|
320
210
|
const de_CreateMonitorCommand = async (output, context) => {
|
|
@@ -1227,6 +1117,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1227
1117
|
value !== "" &&
|
|
1228
1118
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1229
1119
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1120
|
+
const _ES = "EventStatus";
|
|
1121
|
+
const _ET = "EndTime";
|
|
1122
|
+
const _MR = "MaxResults";
|
|
1123
|
+
const _MS = "MonitorStatus";
|
|
1124
|
+
const _NT = "NextToken";
|
|
1125
|
+
const _ST = "StartTime";
|
|
1126
|
+
const _TK = "TagKeys";
|
|
1127
|
+
const _tK = "tagKeys";
|
|
1230
1128
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1231
1129
|
if (encoded.length) {
|
|
1232
1130
|
return JSON.parse(encoded);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset,
|
|
1
|
+
import { requestBuilder as rb } from "@smithy/core";
|
|
2
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { InternetMonitorServiceException as __BaseException } from "../models/InternetMonitorServiceException";
|
|
5
5
|
import { AccessDeniedException, BadRequestException, ConflictException, InternalServerErrorException, InternalServerException, LimitExceededException, NotFoundException, ResourceNotFoundException, ThrottlingException, TooManyRequestsException, ValidationException, } from "../models/models_0";
|
|
6
6
|
export const se_CreateMonitorCommand = async (input, context) => {
|
|
7
|
-
const
|
|
7
|
+
const b = rb(input, context);
|
|
8
8
|
const headers = {
|
|
9
9
|
"content-type": "application/json",
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
b.bp("/v20210603/Monitors");
|
|
12
12
|
let body;
|
|
13
13
|
body = JSON.stringify(take(input, {
|
|
14
14
|
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
@@ -20,179 +20,106 @@ export const se_CreateMonitorCommand = async (input, context) => {
|
|
|
20
20
|
Tags: (_) => _json(_),
|
|
21
21
|
TrafficPercentageToMonitor: [],
|
|
22
22
|
}));
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
hostname,
|
|
26
|
-
port,
|
|
27
|
-
method: "POST",
|
|
28
|
-
headers,
|
|
29
|
-
path: resolvedPath,
|
|
30
|
-
body,
|
|
31
|
-
});
|
|
23
|
+
b.m("POST").h(headers).b(body);
|
|
24
|
+
return b.build();
|
|
32
25
|
};
|
|
33
26
|
export const se_DeleteMonitorCommand = async (input, context) => {
|
|
34
|
-
const
|
|
27
|
+
const b = rb(input, context);
|
|
35
28
|
const headers = {};
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
b.bp("/v20210603/Monitors/{MonitorName}");
|
|
30
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
38
31
|
let body;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
hostname,
|
|
42
|
-
port,
|
|
43
|
-
method: "DELETE",
|
|
44
|
-
headers,
|
|
45
|
-
path: resolvedPath,
|
|
46
|
-
body,
|
|
47
|
-
});
|
|
32
|
+
b.m("DELETE").h(headers).b(body);
|
|
33
|
+
return b.build();
|
|
48
34
|
};
|
|
49
35
|
export const se_GetHealthEventCommand = async (input, context) => {
|
|
50
|
-
const
|
|
36
|
+
const b = rb(input, context);
|
|
51
37
|
const headers = {};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "EventId", () => input.EventId, "{EventId}", false);
|
|
38
|
+
b.bp("/v20210603/Monitors/{MonitorName}/HealthEvents/{EventId}");
|
|
39
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
40
|
+
b.p("EventId", () => input.EventId, "{EventId}", false);
|
|
56
41
|
let body;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
hostname,
|
|
60
|
-
port,
|
|
61
|
-
method: "GET",
|
|
62
|
-
headers,
|
|
63
|
-
path: resolvedPath,
|
|
64
|
-
body,
|
|
65
|
-
});
|
|
42
|
+
b.m("GET").h(headers).b(body);
|
|
43
|
+
return b.build();
|
|
66
44
|
};
|
|
67
45
|
export const se_GetMonitorCommand = async (input, context) => {
|
|
68
|
-
const
|
|
46
|
+
const b = rb(input, context);
|
|
69
47
|
const headers = {};
|
|
70
|
-
|
|
71
|
-
|
|
48
|
+
b.bp("/v20210603/Monitors/{MonitorName}");
|
|
49
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
72
50
|
let body;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
hostname,
|
|
76
|
-
port,
|
|
77
|
-
method: "GET",
|
|
78
|
-
headers,
|
|
79
|
-
path: resolvedPath,
|
|
80
|
-
body,
|
|
81
|
-
});
|
|
51
|
+
b.m("GET").h(headers).b(body);
|
|
52
|
+
return b.build();
|
|
82
53
|
};
|
|
83
54
|
export const se_GetQueryResultsCommand = async (input, context) => {
|
|
84
|
-
const
|
|
55
|
+
const b = rb(input, context);
|
|
85
56
|
const headers = {};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "QueryId", () => input.QueryId, "{QueryId}", false);
|
|
57
|
+
b.bp("/v20210603/Monitors/{MonitorName}/Queries/{QueryId}/Results");
|
|
58
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
59
|
+
b.p("QueryId", () => input.QueryId, "{QueryId}", false);
|
|
90
60
|
const query = map({
|
|
91
|
-
|
|
92
|
-
|
|
61
|
+
[_NT]: [, input[_NT]],
|
|
62
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
93
63
|
});
|
|
94
64
|
let body;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
hostname,
|
|
98
|
-
port,
|
|
99
|
-
method: "GET",
|
|
100
|
-
headers,
|
|
101
|
-
path: resolvedPath,
|
|
102
|
-
query,
|
|
103
|
-
body,
|
|
104
|
-
});
|
|
65
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
66
|
+
return b.build();
|
|
105
67
|
};
|
|
106
68
|
export const se_GetQueryStatusCommand = async (input, context) => {
|
|
107
|
-
const
|
|
69
|
+
const b = rb(input, context);
|
|
108
70
|
const headers = {};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "QueryId", () => input.QueryId, "{QueryId}", false);
|
|
71
|
+
b.bp("/v20210603/Monitors/{MonitorName}/Queries/{QueryId}/Status");
|
|
72
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
73
|
+
b.p("QueryId", () => input.QueryId, "{QueryId}", false);
|
|
113
74
|
let body;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
hostname,
|
|
117
|
-
port,
|
|
118
|
-
method: "GET",
|
|
119
|
-
headers,
|
|
120
|
-
path: resolvedPath,
|
|
121
|
-
body,
|
|
122
|
-
});
|
|
75
|
+
b.m("GET").h(headers).b(body);
|
|
76
|
+
return b.build();
|
|
123
77
|
};
|
|
124
78
|
export const se_ListHealthEventsCommand = async (input, context) => {
|
|
125
|
-
const
|
|
79
|
+
const b = rb(input, context);
|
|
126
80
|
const headers = {};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
81
|
+
b.bp("/v20210603/Monitors/{MonitorName}/HealthEvents");
|
|
82
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
130
83
|
const query = map({
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
],
|
|
135
|
-
|
|
136
|
-
NextToken: [, input.NextToken],
|
|
137
|
-
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
138
|
-
EventStatus: [, input.EventStatus],
|
|
84
|
+
[_ST]: [() => input.StartTime !== void 0, () => (input[_ST].toISOString().split(".")[0] + "Z").toString()],
|
|
85
|
+
[_ET]: [() => input.EndTime !== void 0, () => (input[_ET].toISOString().split(".")[0] + "Z").toString()],
|
|
86
|
+
[_NT]: [, input[_NT]],
|
|
87
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
88
|
+
[_ES]: [, input[_ES]],
|
|
139
89
|
});
|
|
140
90
|
let body;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
hostname,
|
|
144
|
-
port,
|
|
145
|
-
method: "GET",
|
|
146
|
-
headers,
|
|
147
|
-
path: resolvedPath,
|
|
148
|
-
query,
|
|
149
|
-
body,
|
|
150
|
-
});
|
|
91
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
92
|
+
return b.build();
|
|
151
93
|
};
|
|
152
94
|
export const se_ListMonitorsCommand = async (input, context) => {
|
|
153
|
-
const
|
|
95
|
+
const b = rb(input, context);
|
|
154
96
|
const headers = {};
|
|
155
|
-
|
|
97
|
+
b.bp("/v20210603/Monitors");
|
|
156
98
|
const query = map({
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
99
|
+
[_NT]: [, input[_NT]],
|
|
100
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
101
|
+
[_MS]: [, input[_MS]],
|
|
160
102
|
});
|
|
161
103
|
let body;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
hostname,
|
|
165
|
-
port,
|
|
166
|
-
method: "GET",
|
|
167
|
-
headers,
|
|
168
|
-
path: resolvedPath,
|
|
169
|
-
query,
|
|
170
|
-
body,
|
|
171
|
-
});
|
|
104
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
105
|
+
return b.build();
|
|
172
106
|
};
|
|
173
107
|
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
174
|
-
const
|
|
108
|
+
const b = rb(input, context);
|
|
175
109
|
const headers = {};
|
|
176
|
-
|
|
177
|
-
|
|
110
|
+
b.bp("/tags/{ResourceArn}");
|
|
111
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
178
112
|
let body;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
hostname,
|
|
182
|
-
port,
|
|
183
|
-
method: "GET",
|
|
184
|
-
headers,
|
|
185
|
-
path: resolvedPath,
|
|
186
|
-
body,
|
|
187
|
-
});
|
|
113
|
+
b.m("GET").h(headers).b(body);
|
|
114
|
+
return b.build();
|
|
188
115
|
};
|
|
189
116
|
export const se_StartQueryCommand = async (input, context) => {
|
|
190
|
-
const
|
|
117
|
+
const b = rb(input, context);
|
|
191
118
|
const headers = {
|
|
192
119
|
"content-type": "application/json",
|
|
193
120
|
};
|
|
194
|
-
|
|
195
|
-
|
|
121
|
+
b.bp("/v20210603/Monitors/{MonitorName}/Queries");
|
|
122
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
196
123
|
let body;
|
|
197
124
|
body = JSON.stringify(take(input, {
|
|
198
125
|
EndTime: (_) => _.toISOString().split(".")[0] + "Z",
|
|
@@ -200,85 +127,55 @@ export const se_StartQueryCommand = async (input, context) => {
|
|
|
200
127
|
QueryType: [],
|
|
201
128
|
StartTime: (_) => _.toISOString().split(".")[0] + "Z",
|
|
202
129
|
}));
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
hostname,
|
|
206
|
-
port,
|
|
207
|
-
method: "POST",
|
|
208
|
-
headers,
|
|
209
|
-
path: resolvedPath,
|
|
210
|
-
body,
|
|
211
|
-
});
|
|
130
|
+
b.m("POST").h(headers).b(body);
|
|
131
|
+
return b.build();
|
|
212
132
|
};
|
|
213
133
|
export const se_StopQueryCommand = async (input, context) => {
|
|
214
|
-
const
|
|
134
|
+
const b = rb(input, context);
|
|
215
135
|
const headers = {};
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "QueryId", () => input.QueryId, "{QueryId}", false);
|
|
136
|
+
b.bp("/v20210603/Monitors/{MonitorName}/Queries/{QueryId}");
|
|
137
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
138
|
+
b.p("QueryId", () => input.QueryId, "{QueryId}", false);
|
|
220
139
|
let body;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
hostname,
|
|
224
|
-
port,
|
|
225
|
-
method: "DELETE",
|
|
226
|
-
headers,
|
|
227
|
-
path: resolvedPath,
|
|
228
|
-
body,
|
|
229
|
-
});
|
|
140
|
+
b.m("DELETE").h(headers).b(body);
|
|
141
|
+
return b.build();
|
|
230
142
|
};
|
|
231
143
|
export const se_TagResourceCommand = async (input, context) => {
|
|
232
|
-
const
|
|
144
|
+
const b = rb(input, context);
|
|
233
145
|
const headers = {
|
|
234
146
|
"content-type": "application/json",
|
|
235
147
|
};
|
|
236
|
-
|
|
237
|
-
|
|
148
|
+
b.bp("/tags/{ResourceArn}");
|
|
149
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
238
150
|
let body;
|
|
239
151
|
body = JSON.stringify(take(input, {
|
|
240
152
|
Tags: (_) => _json(_),
|
|
241
153
|
}));
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
hostname,
|
|
245
|
-
port,
|
|
246
|
-
method: "POST",
|
|
247
|
-
headers,
|
|
248
|
-
path: resolvedPath,
|
|
249
|
-
body,
|
|
250
|
-
});
|
|
154
|
+
b.m("POST").h(headers).b(body);
|
|
155
|
+
return b.build();
|
|
251
156
|
};
|
|
252
157
|
export const se_UntagResourceCommand = async (input, context) => {
|
|
253
|
-
const
|
|
158
|
+
const b = rb(input, context);
|
|
254
159
|
const headers = {};
|
|
255
|
-
|
|
256
|
-
|
|
160
|
+
b.bp("/tags/{ResourceArn}");
|
|
161
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
257
162
|
const query = map({
|
|
258
|
-
|
|
163
|
+
[_tK]: [
|
|
259
164
|
__expectNonNull(input.TagKeys, `TagKeys`) != null,
|
|
260
|
-
() => (input
|
|
165
|
+
() => (input[_TK] || []).map((_entry) => _entry),
|
|
261
166
|
],
|
|
262
167
|
});
|
|
263
168
|
let body;
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
hostname,
|
|
267
|
-
port,
|
|
268
|
-
method: "DELETE",
|
|
269
|
-
headers,
|
|
270
|
-
path: resolvedPath,
|
|
271
|
-
query,
|
|
272
|
-
body,
|
|
273
|
-
});
|
|
169
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
170
|
+
return b.build();
|
|
274
171
|
};
|
|
275
172
|
export const se_UpdateMonitorCommand = async (input, context) => {
|
|
276
|
-
const
|
|
173
|
+
const b = rb(input, context);
|
|
277
174
|
const headers = {
|
|
278
175
|
"content-type": "application/json",
|
|
279
176
|
};
|
|
280
|
-
|
|
281
|
-
|
|
177
|
+
b.bp("/v20210603/Monitors/{MonitorName}");
|
|
178
|
+
b.p("MonitorName", () => input.MonitorName, "{MonitorName}", false);
|
|
282
179
|
let body;
|
|
283
180
|
body = JSON.stringify(take(input, {
|
|
284
181
|
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
@@ -290,15 +187,8 @@ export const se_UpdateMonitorCommand = async (input, context) => {
|
|
|
290
187
|
Status: [],
|
|
291
188
|
TrafficPercentageToMonitor: [],
|
|
292
189
|
}));
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
hostname,
|
|
296
|
-
port,
|
|
297
|
-
method: "PATCH",
|
|
298
|
-
headers,
|
|
299
|
-
path: resolvedPath,
|
|
300
|
-
body,
|
|
301
|
-
});
|
|
190
|
+
b.m("PATCH").h(headers).b(body);
|
|
191
|
+
return b.build();
|
|
302
192
|
};
|
|
303
193
|
export const de_CreateMonitorCommand = async (output, context) => {
|
|
304
194
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1196,6 +1086,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1196
1086
|
value !== "" &&
|
|
1197
1087
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1198
1088
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1089
|
+
const _ES = "EventStatus";
|
|
1090
|
+
const _ET = "EndTime";
|
|
1091
|
+
const _MR = "MaxResults";
|
|
1092
|
+
const _MS = "MonitorStatus";
|
|
1093
|
+
const _NT = "NextToken";
|
|
1094
|
+
const _ST = "StartTime";
|
|
1095
|
+
const _TK = "TagKeys";
|
|
1096
|
+
const _tK = "tagKeys";
|
|
1199
1097
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1200
1098
|
if (encoded.length) {
|
|
1201
1099
|
return JSON.parse(encoded);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-internetmonitor",
|
|
3
3
|
"description": "AWS SDK for JavaScript Internetmonitor Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.477.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.477.0",
|
|
24
|
+
"@aws-sdk/core": "3.477.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.477.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.468.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.468.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.468.0",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@aws-sdk/util-user-agent-browser": "3.468.0",
|
|
35
35
|
"@aws-sdk/util-user-agent-node": "3.470.0",
|
|
36
36
|
"@smithy/config-resolver": "^2.0.21",
|
|
37
|
+
"@smithy/core": "^1.2.0",
|
|
37
38
|
"@smithy/fetch-http-handler": "^2.3.1",
|
|
38
39
|
"@smithy/hash-node": "^2.0.17",
|
|
39
40
|
"@smithy/invalid-dependency": "^2.0.15",
|