@aws-sdk/client-health 3.490.0 → 3.495.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/Health.js +1 -39
- package/dist-cjs/HealthClient.js +1 -43
- package/dist-cjs/commands/DescribeAffectedAccountsForOrganizationCommand.js +1 -28
- package/dist-cjs/commands/DescribeAffectedEntitiesCommand.js +1 -28
- package/dist-cjs/commands/DescribeAffectedEntitiesForOrganizationCommand.js +1 -28
- package/dist-cjs/commands/DescribeEntityAggregatesCommand.js +1 -28
- package/dist-cjs/commands/DescribeEntityAggregatesForOrganizationCommand.js +1 -28
- package/dist-cjs/commands/DescribeEventAggregatesCommand.js +1 -28
- package/dist-cjs/commands/DescribeEventDetailsCommand.js +1 -28
- package/dist-cjs/commands/DescribeEventDetailsForOrganizationCommand.js +1 -28
- package/dist-cjs/commands/DescribeEventTypesCommand.js +1 -28
- package/dist-cjs/commands/DescribeEventsCommand.js +1 -28
- package/dist-cjs/commands/DescribeEventsForOrganizationCommand.js +1 -28
- package/dist-cjs/commands/DescribeHealthServiceStatusForOrganizationCommand.js +1 -28
- package/dist-cjs/commands/DisableHealthServiceAccessForOrganizationCommand.js +1 -28
- package/dist-cjs/commands/EnableHealthServiceAccessForOrganizationCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -17
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1402 -11
- package/dist-cjs/models/HealthServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -69
- package/dist-cjs/pagination/DescribeAffectedAccountsForOrganizationPaginator.js +1 -7
- package/dist-cjs/pagination/DescribeAffectedEntitiesForOrganizationPaginator.js +1 -7
- package/dist-cjs/pagination/DescribeAffectedEntitiesPaginator.js +1 -7
- package/dist-cjs/pagination/DescribeEventAggregatesPaginator.js +1 -7
- package/dist-cjs/pagination/DescribeEventTypesPaginator.js +1 -7
- package/dist-cjs/pagination/DescribeEventsForOrganizationPaginator.js +1 -7
- package/dist-cjs/pagination/DescribeEventsPaginator.js +1 -7
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/index.js +1 -11
- package/dist-cjs/protocols/Aws_json1_1.js +1 -874
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,874 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_EnableHealthServiceAccessForOrganizationCommand = exports.de_DisableHealthServiceAccessForOrganizationCommand = exports.de_DescribeHealthServiceStatusForOrganizationCommand = exports.de_DescribeEventTypesCommand = exports.de_DescribeEventsForOrganizationCommand = exports.de_DescribeEventsCommand = exports.de_DescribeEventDetailsForOrganizationCommand = exports.de_DescribeEventDetailsCommand = exports.de_DescribeEventAggregatesCommand = exports.de_DescribeEntityAggregatesForOrganizationCommand = exports.de_DescribeEntityAggregatesCommand = exports.de_DescribeAffectedEntitiesForOrganizationCommand = exports.de_DescribeAffectedEntitiesCommand = exports.de_DescribeAffectedAccountsForOrganizationCommand = exports.se_EnableHealthServiceAccessForOrganizationCommand = exports.se_DisableHealthServiceAccessForOrganizationCommand = exports.se_DescribeHealthServiceStatusForOrganizationCommand = exports.se_DescribeEventTypesCommand = exports.se_DescribeEventsForOrganizationCommand = exports.se_DescribeEventsCommand = exports.se_DescribeEventDetailsForOrganizationCommand = exports.se_DescribeEventDetailsCommand = exports.se_DescribeEventAggregatesCommand = exports.se_DescribeEntityAggregatesForOrganizationCommand = exports.se_DescribeEntityAggregatesCommand = exports.se_DescribeAffectedEntitiesForOrganizationCommand = exports.se_DescribeAffectedEntitiesCommand = exports.se_DescribeAffectedAccountsForOrganizationCommand = void 0;
|
|
4
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const HealthServiceException_1 = require("../models/HealthServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_DescribeAffectedAccountsForOrganizationCommand = async (input, context) => {
|
|
9
|
-
const headers = sharedHeaders("DescribeAffectedAccountsForOrganization");
|
|
10
|
-
let body;
|
|
11
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
12
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
-
};
|
|
14
|
-
exports.se_DescribeAffectedAccountsForOrganizationCommand = se_DescribeAffectedAccountsForOrganizationCommand;
|
|
15
|
-
const se_DescribeAffectedEntitiesCommand = async (input, context) => {
|
|
16
|
-
const headers = sharedHeaders("DescribeAffectedEntities");
|
|
17
|
-
let body;
|
|
18
|
-
body = JSON.stringify(se_DescribeAffectedEntitiesRequest(input, context));
|
|
19
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
20
|
-
};
|
|
21
|
-
exports.se_DescribeAffectedEntitiesCommand = se_DescribeAffectedEntitiesCommand;
|
|
22
|
-
const se_DescribeAffectedEntitiesForOrganizationCommand = async (input, context) => {
|
|
23
|
-
const headers = sharedHeaders("DescribeAffectedEntitiesForOrganization");
|
|
24
|
-
let body;
|
|
25
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
26
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
|
-
};
|
|
28
|
-
exports.se_DescribeAffectedEntitiesForOrganizationCommand = se_DescribeAffectedEntitiesForOrganizationCommand;
|
|
29
|
-
const se_DescribeEntityAggregatesCommand = async (input, context) => {
|
|
30
|
-
const headers = sharedHeaders("DescribeEntityAggregates");
|
|
31
|
-
let body;
|
|
32
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
33
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
|
-
};
|
|
35
|
-
exports.se_DescribeEntityAggregatesCommand = se_DescribeEntityAggregatesCommand;
|
|
36
|
-
const se_DescribeEntityAggregatesForOrganizationCommand = async (input, context) => {
|
|
37
|
-
const headers = sharedHeaders("DescribeEntityAggregatesForOrganization");
|
|
38
|
-
let body;
|
|
39
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
40
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
-
};
|
|
42
|
-
exports.se_DescribeEntityAggregatesForOrganizationCommand = se_DescribeEntityAggregatesForOrganizationCommand;
|
|
43
|
-
const se_DescribeEventAggregatesCommand = async (input, context) => {
|
|
44
|
-
const headers = sharedHeaders("DescribeEventAggregates");
|
|
45
|
-
let body;
|
|
46
|
-
body = JSON.stringify(se_DescribeEventAggregatesRequest(input, context));
|
|
47
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
|
-
};
|
|
49
|
-
exports.se_DescribeEventAggregatesCommand = se_DescribeEventAggregatesCommand;
|
|
50
|
-
const se_DescribeEventDetailsCommand = async (input, context) => {
|
|
51
|
-
const headers = sharedHeaders("DescribeEventDetails");
|
|
52
|
-
let body;
|
|
53
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
54
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
55
|
-
};
|
|
56
|
-
exports.se_DescribeEventDetailsCommand = se_DescribeEventDetailsCommand;
|
|
57
|
-
const se_DescribeEventDetailsForOrganizationCommand = async (input, context) => {
|
|
58
|
-
const headers = sharedHeaders("DescribeEventDetailsForOrganization");
|
|
59
|
-
let body;
|
|
60
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
61
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
62
|
-
};
|
|
63
|
-
exports.se_DescribeEventDetailsForOrganizationCommand = se_DescribeEventDetailsForOrganizationCommand;
|
|
64
|
-
const se_DescribeEventsCommand = async (input, context) => {
|
|
65
|
-
const headers = sharedHeaders("DescribeEvents");
|
|
66
|
-
let body;
|
|
67
|
-
body = JSON.stringify(se_DescribeEventsRequest(input, context));
|
|
68
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
69
|
-
};
|
|
70
|
-
exports.se_DescribeEventsCommand = se_DescribeEventsCommand;
|
|
71
|
-
const se_DescribeEventsForOrganizationCommand = async (input, context) => {
|
|
72
|
-
const headers = sharedHeaders("DescribeEventsForOrganization");
|
|
73
|
-
let body;
|
|
74
|
-
body = JSON.stringify(se_DescribeEventsForOrganizationRequest(input, context));
|
|
75
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
-
};
|
|
77
|
-
exports.se_DescribeEventsForOrganizationCommand = se_DescribeEventsForOrganizationCommand;
|
|
78
|
-
const se_DescribeEventTypesCommand = async (input, context) => {
|
|
79
|
-
const headers = sharedHeaders("DescribeEventTypes");
|
|
80
|
-
let body;
|
|
81
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
82
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
83
|
-
};
|
|
84
|
-
exports.se_DescribeEventTypesCommand = se_DescribeEventTypesCommand;
|
|
85
|
-
const se_DescribeHealthServiceStatusForOrganizationCommand = async (input, context) => {
|
|
86
|
-
const headers = sharedHeaders("DescribeHealthServiceStatusForOrganization");
|
|
87
|
-
const body = "{}";
|
|
88
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
89
|
-
};
|
|
90
|
-
exports.se_DescribeHealthServiceStatusForOrganizationCommand = se_DescribeHealthServiceStatusForOrganizationCommand;
|
|
91
|
-
const se_DisableHealthServiceAccessForOrganizationCommand = async (input, context) => {
|
|
92
|
-
const headers = sharedHeaders("DisableHealthServiceAccessForOrganization");
|
|
93
|
-
const body = "{}";
|
|
94
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
95
|
-
};
|
|
96
|
-
exports.se_DisableHealthServiceAccessForOrganizationCommand = se_DisableHealthServiceAccessForOrganizationCommand;
|
|
97
|
-
const se_EnableHealthServiceAccessForOrganizationCommand = async (input, context) => {
|
|
98
|
-
const headers = sharedHeaders("EnableHealthServiceAccessForOrganization");
|
|
99
|
-
const body = "{}";
|
|
100
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
101
|
-
};
|
|
102
|
-
exports.se_EnableHealthServiceAccessForOrganizationCommand = se_EnableHealthServiceAccessForOrganizationCommand;
|
|
103
|
-
const de_DescribeAffectedAccountsForOrganizationCommand = async (output, context) => {
|
|
104
|
-
if (output.statusCode >= 300) {
|
|
105
|
-
return de_DescribeAffectedAccountsForOrganizationCommandError(output, context);
|
|
106
|
-
}
|
|
107
|
-
const data = await parseBody(output.body, context);
|
|
108
|
-
let contents = {};
|
|
109
|
-
contents = (0, smithy_client_1._json)(data);
|
|
110
|
-
const response = {
|
|
111
|
-
$metadata: deserializeMetadata(output),
|
|
112
|
-
...contents,
|
|
113
|
-
};
|
|
114
|
-
return response;
|
|
115
|
-
};
|
|
116
|
-
exports.de_DescribeAffectedAccountsForOrganizationCommand = de_DescribeAffectedAccountsForOrganizationCommand;
|
|
117
|
-
const de_DescribeAffectedAccountsForOrganizationCommandError = async (output, context) => {
|
|
118
|
-
const parsedOutput = {
|
|
119
|
-
...output,
|
|
120
|
-
body: await parseErrorBody(output.body, context),
|
|
121
|
-
};
|
|
122
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
123
|
-
switch (errorCode) {
|
|
124
|
-
case "InvalidPaginationToken":
|
|
125
|
-
case "com.amazonaws.health#InvalidPaginationToken":
|
|
126
|
-
throw await de_InvalidPaginationTokenRes(parsedOutput, context);
|
|
127
|
-
default:
|
|
128
|
-
const parsedBody = parsedOutput.body;
|
|
129
|
-
return throwDefaultError({
|
|
130
|
-
output,
|
|
131
|
-
parsedBody,
|
|
132
|
-
errorCode,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
const de_DescribeAffectedEntitiesCommand = async (output, context) => {
|
|
137
|
-
if (output.statusCode >= 300) {
|
|
138
|
-
return de_DescribeAffectedEntitiesCommandError(output, context);
|
|
139
|
-
}
|
|
140
|
-
const data = await parseBody(output.body, context);
|
|
141
|
-
let contents = {};
|
|
142
|
-
contents = de_DescribeAffectedEntitiesResponse(data, context);
|
|
143
|
-
const response = {
|
|
144
|
-
$metadata: deserializeMetadata(output),
|
|
145
|
-
...contents,
|
|
146
|
-
};
|
|
147
|
-
return response;
|
|
148
|
-
};
|
|
149
|
-
exports.de_DescribeAffectedEntitiesCommand = de_DescribeAffectedEntitiesCommand;
|
|
150
|
-
const de_DescribeAffectedEntitiesCommandError = async (output, context) => {
|
|
151
|
-
const parsedOutput = {
|
|
152
|
-
...output,
|
|
153
|
-
body: await parseErrorBody(output.body, context),
|
|
154
|
-
};
|
|
155
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
156
|
-
switch (errorCode) {
|
|
157
|
-
case "InvalidPaginationToken":
|
|
158
|
-
case "com.amazonaws.health#InvalidPaginationToken":
|
|
159
|
-
throw await de_InvalidPaginationTokenRes(parsedOutput, context);
|
|
160
|
-
case "UnsupportedLocale":
|
|
161
|
-
case "com.amazonaws.health#UnsupportedLocale":
|
|
162
|
-
throw await de_UnsupportedLocaleRes(parsedOutput, context);
|
|
163
|
-
default:
|
|
164
|
-
const parsedBody = parsedOutput.body;
|
|
165
|
-
return throwDefaultError({
|
|
166
|
-
output,
|
|
167
|
-
parsedBody,
|
|
168
|
-
errorCode,
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
const de_DescribeAffectedEntitiesForOrganizationCommand = async (output, context) => {
|
|
173
|
-
if (output.statusCode >= 300) {
|
|
174
|
-
return de_DescribeAffectedEntitiesForOrganizationCommandError(output, context);
|
|
175
|
-
}
|
|
176
|
-
const data = await parseBody(output.body, context);
|
|
177
|
-
let contents = {};
|
|
178
|
-
contents = de_DescribeAffectedEntitiesForOrganizationResponse(data, context);
|
|
179
|
-
const response = {
|
|
180
|
-
$metadata: deserializeMetadata(output),
|
|
181
|
-
...contents,
|
|
182
|
-
};
|
|
183
|
-
return response;
|
|
184
|
-
};
|
|
185
|
-
exports.de_DescribeAffectedEntitiesForOrganizationCommand = de_DescribeAffectedEntitiesForOrganizationCommand;
|
|
186
|
-
const de_DescribeAffectedEntitiesForOrganizationCommandError = async (output, context) => {
|
|
187
|
-
const parsedOutput = {
|
|
188
|
-
...output,
|
|
189
|
-
body: await parseErrorBody(output.body, context),
|
|
190
|
-
};
|
|
191
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
192
|
-
switch (errorCode) {
|
|
193
|
-
case "InvalidPaginationToken":
|
|
194
|
-
case "com.amazonaws.health#InvalidPaginationToken":
|
|
195
|
-
throw await de_InvalidPaginationTokenRes(parsedOutput, context);
|
|
196
|
-
case "UnsupportedLocale":
|
|
197
|
-
case "com.amazonaws.health#UnsupportedLocale":
|
|
198
|
-
throw await de_UnsupportedLocaleRes(parsedOutput, context);
|
|
199
|
-
default:
|
|
200
|
-
const parsedBody = parsedOutput.body;
|
|
201
|
-
return throwDefaultError({
|
|
202
|
-
output,
|
|
203
|
-
parsedBody,
|
|
204
|
-
errorCode,
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
const de_DescribeEntityAggregatesCommand = async (output, context) => {
|
|
209
|
-
if (output.statusCode >= 300) {
|
|
210
|
-
return de_DescribeEntityAggregatesCommandError(output, context);
|
|
211
|
-
}
|
|
212
|
-
const data = await parseBody(output.body, context);
|
|
213
|
-
let contents = {};
|
|
214
|
-
contents = (0, smithy_client_1._json)(data);
|
|
215
|
-
const response = {
|
|
216
|
-
$metadata: deserializeMetadata(output),
|
|
217
|
-
...contents,
|
|
218
|
-
};
|
|
219
|
-
return response;
|
|
220
|
-
};
|
|
221
|
-
exports.de_DescribeEntityAggregatesCommand = de_DescribeEntityAggregatesCommand;
|
|
222
|
-
const de_DescribeEntityAggregatesCommandError = async (output, context) => {
|
|
223
|
-
const parsedOutput = {
|
|
224
|
-
...output,
|
|
225
|
-
body: await parseErrorBody(output.body, context),
|
|
226
|
-
};
|
|
227
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
228
|
-
const parsedBody = parsedOutput.body;
|
|
229
|
-
return throwDefaultError({
|
|
230
|
-
output,
|
|
231
|
-
parsedBody,
|
|
232
|
-
errorCode,
|
|
233
|
-
});
|
|
234
|
-
};
|
|
235
|
-
const de_DescribeEntityAggregatesForOrganizationCommand = async (output, context) => {
|
|
236
|
-
if (output.statusCode >= 300) {
|
|
237
|
-
return de_DescribeEntityAggregatesForOrganizationCommandError(output, context);
|
|
238
|
-
}
|
|
239
|
-
const data = await parseBody(output.body, context);
|
|
240
|
-
let contents = {};
|
|
241
|
-
contents = (0, smithy_client_1._json)(data);
|
|
242
|
-
const response = {
|
|
243
|
-
$metadata: deserializeMetadata(output),
|
|
244
|
-
...contents,
|
|
245
|
-
};
|
|
246
|
-
return response;
|
|
247
|
-
};
|
|
248
|
-
exports.de_DescribeEntityAggregatesForOrganizationCommand = de_DescribeEntityAggregatesForOrganizationCommand;
|
|
249
|
-
const de_DescribeEntityAggregatesForOrganizationCommandError = async (output, context) => {
|
|
250
|
-
const parsedOutput = {
|
|
251
|
-
...output,
|
|
252
|
-
body: await parseErrorBody(output.body, context),
|
|
253
|
-
};
|
|
254
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
255
|
-
const parsedBody = parsedOutput.body;
|
|
256
|
-
return throwDefaultError({
|
|
257
|
-
output,
|
|
258
|
-
parsedBody,
|
|
259
|
-
errorCode,
|
|
260
|
-
});
|
|
261
|
-
};
|
|
262
|
-
const de_DescribeEventAggregatesCommand = async (output, context) => {
|
|
263
|
-
if (output.statusCode >= 300) {
|
|
264
|
-
return de_DescribeEventAggregatesCommandError(output, context);
|
|
265
|
-
}
|
|
266
|
-
const data = await parseBody(output.body, context);
|
|
267
|
-
let contents = {};
|
|
268
|
-
contents = (0, smithy_client_1._json)(data);
|
|
269
|
-
const response = {
|
|
270
|
-
$metadata: deserializeMetadata(output),
|
|
271
|
-
...contents,
|
|
272
|
-
};
|
|
273
|
-
return response;
|
|
274
|
-
};
|
|
275
|
-
exports.de_DescribeEventAggregatesCommand = de_DescribeEventAggregatesCommand;
|
|
276
|
-
const de_DescribeEventAggregatesCommandError = async (output, context) => {
|
|
277
|
-
const parsedOutput = {
|
|
278
|
-
...output,
|
|
279
|
-
body: await parseErrorBody(output.body, context),
|
|
280
|
-
};
|
|
281
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
282
|
-
switch (errorCode) {
|
|
283
|
-
case "InvalidPaginationToken":
|
|
284
|
-
case "com.amazonaws.health#InvalidPaginationToken":
|
|
285
|
-
throw await de_InvalidPaginationTokenRes(parsedOutput, context);
|
|
286
|
-
default:
|
|
287
|
-
const parsedBody = parsedOutput.body;
|
|
288
|
-
return throwDefaultError({
|
|
289
|
-
output,
|
|
290
|
-
parsedBody,
|
|
291
|
-
errorCode,
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
};
|
|
295
|
-
const de_DescribeEventDetailsCommand = async (output, context) => {
|
|
296
|
-
if (output.statusCode >= 300) {
|
|
297
|
-
return de_DescribeEventDetailsCommandError(output, context);
|
|
298
|
-
}
|
|
299
|
-
const data = await parseBody(output.body, context);
|
|
300
|
-
let contents = {};
|
|
301
|
-
contents = de_DescribeEventDetailsResponse(data, context);
|
|
302
|
-
const response = {
|
|
303
|
-
$metadata: deserializeMetadata(output),
|
|
304
|
-
...contents,
|
|
305
|
-
};
|
|
306
|
-
return response;
|
|
307
|
-
};
|
|
308
|
-
exports.de_DescribeEventDetailsCommand = de_DescribeEventDetailsCommand;
|
|
309
|
-
const de_DescribeEventDetailsCommandError = async (output, context) => {
|
|
310
|
-
const parsedOutput = {
|
|
311
|
-
...output,
|
|
312
|
-
body: await parseErrorBody(output.body, context),
|
|
313
|
-
};
|
|
314
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
315
|
-
switch (errorCode) {
|
|
316
|
-
case "UnsupportedLocale":
|
|
317
|
-
case "com.amazonaws.health#UnsupportedLocale":
|
|
318
|
-
throw await de_UnsupportedLocaleRes(parsedOutput, context);
|
|
319
|
-
default:
|
|
320
|
-
const parsedBody = parsedOutput.body;
|
|
321
|
-
return throwDefaultError({
|
|
322
|
-
output,
|
|
323
|
-
parsedBody,
|
|
324
|
-
errorCode,
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
const de_DescribeEventDetailsForOrganizationCommand = async (output, context) => {
|
|
329
|
-
if (output.statusCode >= 300) {
|
|
330
|
-
return de_DescribeEventDetailsForOrganizationCommandError(output, context);
|
|
331
|
-
}
|
|
332
|
-
const data = await parseBody(output.body, context);
|
|
333
|
-
let contents = {};
|
|
334
|
-
contents = de_DescribeEventDetailsForOrganizationResponse(data, context);
|
|
335
|
-
const response = {
|
|
336
|
-
$metadata: deserializeMetadata(output),
|
|
337
|
-
...contents,
|
|
338
|
-
};
|
|
339
|
-
return response;
|
|
340
|
-
};
|
|
341
|
-
exports.de_DescribeEventDetailsForOrganizationCommand = de_DescribeEventDetailsForOrganizationCommand;
|
|
342
|
-
const de_DescribeEventDetailsForOrganizationCommandError = async (output, context) => {
|
|
343
|
-
const parsedOutput = {
|
|
344
|
-
...output,
|
|
345
|
-
body: await parseErrorBody(output.body, context),
|
|
346
|
-
};
|
|
347
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
348
|
-
switch (errorCode) {
|
|
349
|
-
case "UnsupportedLocale":
|
|
350
|
-
case "com.amazonaws.health#UnsupportedLocale":
|
|
351
|
-
throw await de_UnsupportedLocaleRes(parsedOutput, context);
|
|
352
|
-
default:
|
|
353
|
-
const parsedBody = parsedOutput.body;
|
|
354
|
-
return throwDefaultError({
|
|
355
|
-
output,
|
|
356
|
-
parsedBody,
|
|
357
|
-
errorCode,
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
};
|
|
361
|
-
const de_DescribeEventsCommand = async (output, context) => {
|
|
362
|
-
if (output.statusCode >= 300) {
|
|
363
|
-
return de_DescribeEventsCommandError(output, context);
|
|
364
|
-
}
|
|
365
|
-
const data = await parseBody(output.body, context);
|
|
366
|
-
let contents = {};
|
|
367
|
-
contents = de_DescribeEventsResponse(data, context);
|
|
368
|
-
const response = {
|
|
369
|
-
$metadata: deserializeMetadata(output),
|
|
370
|
-
...contents,
|
|
371
|
-
};
|
|
372
|
-
return response;
|
|
373
|
-
};
|
|
374
|
-
exports.de_DescribeEventsCommand = de_DescribeEventsCommand;
|
|
375
|
-
const de_DescribeEventsCommandError = async (output, context) => {
|
|
376
|
-
const parsedOutput = {
|
|
377
|
-
...output,
|
|
378
|
-
body: await parseErrorBody(output.body, context),
|
|
379
|
-
};
|
|
380
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
381
|
-
switch (errorCode) {
|
|
382
|
-
case "InvalidPaginationToken":
|
|
383
|
-
case "com.amazonaws.health#InvalidPaginationToken":
|
|
384
|
-
throw await de_InvalidPaginationTokenRes(parsedOutput, context);
|
|
385
|
-
case "UnsupportedLocale":
|
|
386
|
-
case "com.amazonaws.health#UnsupportedLocale":
|
|
387
|
-
throw await de_UnsupportedLocaleRes(parsedOutput, context);
|
|
388
|
-
default:
|
|
389
|
-
const parsedBody = parsedOutput.body;
|
|
390
|
-
return throwDefaultError({
|
|
391
|
-
output,
|
|
392
|
-
parsedBody,
|
|
393
|
-
errorCode,
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
};
|
|
397
|
-
const de_DescribeEventsForOrganizationCommand = async (output, context) => {
|
|
398
|
-
if (output.statusCode >= 300) {
|
|
399
|
-
return de_DescribeEventsForOrganizationCommandError(output, context);
|
|
400
|
-
}
|
|
401
|
-
const data = await parseBody(output.body, context);
|
|
402
|
-
let contents = {};
|
|
403
|
-
contents = de_DescribeEventsForOrganizationResponse(data, context);
|
|
404
|
-
const response = {
|
|
405
|
-
$metadata: deserializeMetadata(output),
|
|
406
|
-
...contents,
|
|
407
|
-
};
|
|
408
|
-
return response;
|
|
409
|
-
};
|
|
410
|
-
exports.de_DescribeEventsForOrganizationCommand = de_DescribeEventsForOrganizationCommand;
|
|
411
|
-
const de_DescribeEventsForOrganizationCommandError = async (output, context) => {
|
|
412
|
-
const parsedOutput = {
|
|
413
|
-
...output,
|
|
414
|
-
body: await parseErrorBody(output.body, context),
|
|
415
|
-
};
|
|
416
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
417
|
-
switch (errorCode) {
|
|
418
|
-
case "InvalidPaginationToken":
|
|
419
|
-
case "com.amazonaws.health#InvalidPaginationToken":
|
|
420
|
-
throw await de_InvalidPaginationTokenRes(parsedOutput, context);
|
|
421
|
-
case "UnsupportedLocale":
|
|
422
|
-
case "com.amazonaws.health#UnsupportedLocale":
|
|
423
|
-
throw await de_UnsupportedLocaleRes(parsedOutput, context);
|
|
424
|
-
default:
|
|
425
|
-
const parsedBody = parsedOutput.body;
|
|
426
|
-
return throwDefaultError({
|
|
427
|
-
output,
|
|
428
|
-
parsedBody,
|
|
429
|
-
errorCode,
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
};
|
|
433
|
-
const de_DescribeEventTypesCommand = async (output, context) => {
|
|
434
|
-
if (output.statusCode >= 300) {
|
|
435
|
-
return de_DescribeEventTypesCommandError(output, context);
|
|
436
|
-
}
|
|
437
|
-
const data = await parseBody(output.body, context);
|
|
438
|
-
let contents = {};
|
|
439
|
-
contents = (0, smithy_client_1._json)(data);
|
|
440
|
-
const response = {
|
|
441
|
-
$metadata: deserializeMetadata(output),
|
|
442
|
-
...contents,
|
|
443
|
-
};
|
|
444
|
-
return response;
|
|
445
|
-
};
|
|
446
|
-
exports.de_DescribeEventTypesCommand = de_DescribeEventTypesCommand;
|
|
447
|
-
const de_DescribeEventTypesCommandError = async (output, context) => {
|
|
448
|
-
const parsedOutput = {
|
|
449
|
-
...output,
|
|
450
|
-
body: await parseErrorBody(output.body, context),
|
|
451
|
-
};
|
|
452
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
453
|
-
switch (errorCode) {
|
|
454
|
-
case "InvalidPaginationToken":
|
|
455
|
-
case "com.amazonaws.health#InvalidPaginationToken":
|
|
456
|
-
throw await de_InvalidPaginationTokenRes(parsedOutput, context);
|
|
457
|
-
case "UnsupportedLocale":
|
|
458
|
-
case "com.amazonaws.health#UnsupportedLocale":
|
|
459
|
-
throw await de_UnsupportedLocaleRes(parsedOutput, context);
|
|
460
|
-
default:
|
|
461
|
-
const parsedBody = parsedOutput.body;
|
|
462
|
-
return throwDefaultError({
|
|
463
|
-
output,
|
|
464
|
-
parsedBody,
|
|
465
|
-
errorCode,
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
const de_DescribeHealthServiceStatusForOrganizationCommand = async (output, context) => {
|
|
470
|
-
if (output.statusCode >= 300) {
|
|
471
|
-
return de_DescribeHealthServiceStatusForOrganizationCommandError(output, context);
|
|
472
|
-
}
|
|
473
|
-
const data = await parseBody(output.body, context);
|
|
474
|
-
let contents = {};
|
|
475
|
-
contents = (0, smithy_client_1._json)(data);
|
|
476
|
-
const response = {
|
|
477
|
-
$metadata: deserializeMetadata(output),
|
|
478
|
-
...contents,
|
|
479
|
-
};
|
|
480
|
-
return response;
|
|
481
|
-
};
|
|
482
|
-
exports.de_DescribeHealthServiceStatusForOrganizationCommand = de_DescribeHealthServiceStatusForOrganizationCommand;
|
|
483
|
-
const de_DescribeHealthServiceStatusForOrganizationCommandError = async (output, context) => {
|
|
484
|
-
const parsedOutput = {
|
|
485
|
-
...output,
|
|
486
|
-
body: await parseErrorBody(output.body, context),
|
|
487
|
-
};
|
|
488
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
489
|
-
const parsedBody = parsedOutput.body;
|
|
490
|
-
return throwDefaultError({
|
|
491
|
-
output,
|
|
492
|
-
parsedBody,
|
|
493
|
-
errorCode,
|
|
494
|
-
});
|
|
495
|
-
};
|
|
496
|
-
const de_DisableHealthServiceAccessForOrganizationCommand = async (output, context) => {
|
|
497
|
-
if (output.statusCode >= 300) {
|
|
498
|
-
return de_DisableHealthServiceAccessForOrganizationCommandError(output, context);
|
|
499
|
-
}
|
|
500
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
501
|
-
const response = {
|
|
502
|
-
$metadata: deserializeMetadata(output),
|
|
503
|
-
};
|
|
504
|
-
return response;
|
|
505
|
-
};
|
|
506
|
-
exports.de_DisableHealthServiceAccessForOrganizationCommand = de_DisableHealthServiceAccessForOrganizationCommand;
|
|
507
|
-
const de_DisableHealthServiceAccessForOrganizationCommandError = async (output, context) => {
|
|
508
|
-
const parsedOutput = {
|
|
509
|
-
...output,
|
|
510
|
-
body: await parseErrorBody(output.body, context),
|
|
511
|
-
};
|
|
512
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
513
|
-
switch (errorCode) {
|
|
514
|
-
case "ConcurrentModificationException":
|
|
515
|
-
case "com.amazonaws.health#ConcurrentModificationException":
|
|
516
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
517
|
-
default:
|
|
518
|
-
const parsedBody = parsedOutput.body;
|
|
519
|
-
return throwDefaultError({
|
|
520
|
-
output,
|
|
521
|
-
parsedBody,
|
|
522
|
-
errorCode,
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
const de_EnableHealthServiceAccessForOrganizationCommand = async (output, context) => {
|
|
527
|
-
if (output.statusCode >= 300) {
|
|
528
|
-
return de_EnableHealthServiceAccessForOrganizationCommandError(output, context);
|
|
529
|
-
}
|
|
530
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
531
|
-
const response = {
|
|
532
|
-
$metadata: deserializeMetadata(output),
|
|
533
|
-
};
|
|
534
|
-
return response;
|
|
535
|
-
};
|
|
536
|
-
exports.de_EnableHealthServiceAccessForOrganizationCommand = de_EnableHealthServiceAccessForOrganizationCommand;
|
|
537
|
-
const de_EnableHealthServiceAccessForOrganizationCommandError = async (output, context) => {
|
|
538
|
-
const parsedOutput = {
|
|
539
|
-
...output,
|
|
540
|
-
body: await parseErrorBody(output.body, context),
|
|
541
|
-
};
|
|
542
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
543
|
-
switch (errorCode) {
|
|
544
|
-
case "ConcurrentModificationException":
|
|
545
|
-
case "com.amazonaws.health#ConcurrentModificationException":
|
|
546
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
547
|
-
default:
|
|
548
|
-
const parsedBody = parsedOutput.body;
|
|
549
|
-
return throwDefaultError({
|
|
550
|
-
output,
|
|
551
|
-
parsedBody,
|
|
552
|
-
errorCode,
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
557
|
-
const body = parsedOutput.body;
|
|
558
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
559
|
-
const exception = new models_0_1.ConcurrentModificationException({
|
|
560
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
561
|
-
...deserialized,
|
|
562
|
-
});
|
|
563
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
564
|
-
};
|
|
565
|
-
const de_InvalidPaginationTokenRes = async (parsedOutput, context) => {
|
|
566
|
-
const body = parsedOutput.body;
|
|
567
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
568
|
-
const exception = new models_0_1.InvalidPaginationToken({
|
|
569
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
570
|
-
...deserialized,
|
|
571
|
-
});
|
|
572
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
573
|
-
};
|
|
574
|
-
const de_UnsupportedLocaleRes = async (parsedOutput, context) => {
|
|
575
|
-
const body = parsedOutput.body;
|
|
576
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
577
|
-
const exception = new models_0_1.UnsupportedLocale({
|
|
578
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
579
|
-
...deserialized,
|
|
580
|
-
});
|
|
581
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
582
|
-
};
|
|
583
|
-
const se_DateTimeRange = (input, context) => {
|
|
584
|
-
return (0, smithy_client_1.take)(input, {
|
|
585
|
-
from: (_) => Math.round(_.getTime() / 1000),
|
|
586
|
-
to: (_) => Math.round(_.getTime() / 1000),
|
|
587
|
-
});
|
|
588
|
-
};
|
|
589
|
-
const se_dateTimeRangeList = (input, context) => {
|
|
590
|
-
return input
|
|
591
|
-
.filter((e) => e != null)
|
|
592
|
-
.map((entry) => {
|
|
593
|
-
return se_DateTimeRange(entry, context);
|
|
594
|
-
});
|
|
595
|
-
};
|
|
596
|
-
const se_DescribeAffectedEntitiesRequest = (input, context) => {
|
|
597
|
-
return (0, smithy_client_1.take)(input, {
|
|
598
|
-
filter: (_) => se_EntityFilter(_, context),
|
|
599
|
-
locale: [],
|
|
600
|
-
maxResults: [],
|
|
601
|
-
nextToken: [],
|
|
602
|
-
});
|
|
603
|
-
};
|
|
604
|
-
const se_DescribeEventAggregatesRequest = (input, context) => {
|
|
605
|
-
return (0, smithy_client_1.take)(input, {
|
|
606
|
-
aggregateField: [],
|
|
607
|
-
filter: (_) => se_EventFilter(_, context),
|
|
608
|
-
maxResults: [],
|
|
609
|
-
nextToken: [],
|
|
610
|
-
});
|
|
611
|
-
};
|
|
612
|
-
const se_DescribeEventsForOrganizationRequest = (input, context) => {
|
|
613
|
-
return (0, smithy_client_1.take)(input, {
|
|
614
|
-
filter: (_) => se_OrganizationEventFilter(_, context),
|
|
615
|
-
locale: [],
|
|
616
|
-
maxResults: [],
|
|
617
|
-
nextToken: [],
|
|
618
|
-
});
|
|
619
|
-
};
|
|
620
|
-
const se_DescribeEventsRequest = (input, context) => {
|
|
621
|
-
return (0, smithy_client_1.take)(input, {
|
|
622
|
-
filter: (_) => se_EventFilter(_, context),
|
|
623
|
-
locale: [],
|
|
624
|
-
maxResults: [],
|
|
625
|
-
nextToken: [],
|
|
626
|
-
});
|
|
627
|
-
};
|
|
628
|
-
const se_EntityFilter = (input, context) => {
|
|
629
|
-
return (0, smithy_client_1.take)(input, {
|
|
630
|
-
entityArns: smithy_client_1._json,
|
|
631
|
-
entityValues: smithy_client_1._json,
|
|
632
|
-
eventArns: smithy_client_1._json,
|
|
633
|
-
lastUpdatedTimes: (_) => se_dateTimeRangeList(_, context),
|
|
634
|
-
statusCodes: smithy_client_1._json,
|
|
635
|
-
tags: smithy_client_1._json,
|
|
636
|
-
});
|
|
637
|
-
};
|
|
638
|
-
const se_EventFilter = (input, context) => {
|
|
639
|
-
return (0, smithy_client_1.take)(input, {
|
|
640
|
-
availabilityZones: smithy_client_1._json,
|
|
641
|
-
endTimes: (_) => se_dateTimeRangeList(_, context),
|
|
642
|
-
entityArns: smithy_client_1._json,
|
|
643
|
-
entityValues: smithy_client_1._json,
|
|
644
|
-
eventArns: smithy_client_1._json,
|
|
645
|
-
eventStatusCodes: smithy_client_1._json,
|
|
646
|
-
eventTypeCategories: smithy_client_1._json,
|
|
647
|
-
eventTypeCodes: smithy_client_1._json,
|
|
648
|
-
lastUpdatedTimes: (_) => se_dateTimeRangeList(_, context),
|
|
649
|
-
regions: smithy_client_1._json,
|
|
650
|
-
services: smithy_client_1._json,
|
|
651
|
-
startTimes: (_) => se_dateTimeRangeList(_, context),
|
|
652
|
-
tags: smithy_client_1._json,
|
|
653
|
-
});
|
|
654
|
-
};
|
|
655
|
-
const se_OrganizationEventFilter = (input, context) => {
|
|
656
|
-
return (0, smithy_client_1.take)(input, {
|
|
657
|
-
awsAccountIds: smithy_client_1._json,
|
|
658
|
-
endTime: (_) => se_DateTimeRange(_, context),
|
|
659
|
-
entityArns: smithy_client_1._json,
|
|
660
|
-
entityValues: smithy_client_1._json,
|
|
661
|
-
eventStatusCodes: smithy_client_1._json,
|
|
662
|
-
eventTypeCategories: smithy_client_1._json,
|
|
663
|
-
eventTypeCodes: smithy_client_1._json,
|
|
664
|
-
lastUpdatedTime: (_) => se_DateTimeRange(_, context),
|
|
665
|
-
regions: smithy_client_1._json,
|
|
666
|
-
services: smithy_client_1._json,
|
|
667
|
-
startTime: (_) => se_DateTimeRange(_, context),
|
|
668
|
-
});
|
|
669
|
-
};
|
|
670
|
-
const de_AffectedEntity = (output, context) => {
|
|
671
|
-
return (0, smithy_client_1.take)(output, {
|
|
672
|
-
awsAccountId: smithy_client_1.expectString,
|
|
673
|
-
entityArn: smithy_client_1.expectString,
|
|
674
|
-
entityUrl: smithy_client_1.expectString,
|
|
675
|
-
entityValue: smithy_client_1.expectString,
|
|
676
|
-
eventArn: smithy_client_1.expectString,
|
|
677
|
-
lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
678
|
-
statusCode: smithy_client_1.expectString,
|
|
679
|
-
tags: smithy_client_1._json,
|
|
680
|
-
});
|
|
681
|
-
};
|
|
682
|
-
const de_DescribeAffectedEntitiesForOrganizationResponse = (output, context) => {
|
|
683
|
-
return (0, smithy_client_1.take)(output, {
|
|
684
|
-
entities: (_) => de_EntityList(_, context),
|
|
685
|
-
failedSet: smithy_client_1._json,
|
|
686
|
-
nextToken: smithy_client_1.expectString,
|
|
687
|
-
});
|
|
688
|
-
};
|
|
689
|
-
const de_DescribeAffectedEntitiesResponse = (output, context) => {
|
|
690
|
-
return (0, smithy_client_1.take)(output, {
|
|
691
|
-
entities: (_) => de_EntityList(_, context),
|
|
692
|
-
nextToken: smithy_client_1.expectString,
|
|
693
|
-
});
|
|
694
|
-
};
|
|
695
|
-
const de_DescribeEventDetailsForOrganizationResponse = (output, context) => {
|
|
696
|
-
return (0, smithy_client_1.take)(output, {
|
|
697
|
-
failedSet: smithy_client_1._json,
|
|
698
|
-
successfulSet: (_) => de_DescribeEventDetailsForOrganizationSuccessfulSet(_, context),
|
|
699
|
-
});
|
|
700
|
-
};
|
|
701
|
-
const de_DescribeEventDetailsForOrganizationSuccessfulSet = (output, context) => {
|
|
702
|
-
const retVal = (output || [])
|
|
703
|
-
.filter((e) => e != null)
|
|
704
|
-
.map((entry) => {
|
|
705
|
-
return de_OrganizationEventDetails(entry, context);
|
|
706
|
-
});
|
|
707
|
-
return retVal;
|
|
708
|
-
};
|
|
709
|
-
const de_DescribeEventDetailsResponse = (output, context) => {
|
|
710
|
-
return (0, smithy_client_1.take)(output, {
|
|
711
|
-
failedSet: smithy_client_1._json,
|
|
712
|
-
successfulSet: (_) => de_DescribeEventDetailsSuccessfulSet(_, context),
|
|
713
|
-
});
|
|
714
|
-
};
|
|
715
|
-
const de_DescribeEventDetailsSuccessfulSet = (output, context) => {
|
|
716
|
-
const retVal = (output || [])
|
|
717
|
-
.filter((e) => e != null)
|
|
718
|
-
.map((entry) => {
|
|
719
|
-
return de_EventDetails(entry, context);
|
|
720
|
-
});
|
|
721
|
-
return retVal;
|
|
722
|
-
};
|
|
723
|
-
const de_DescribeEventsForOrganizationResponse = (output, context) => {
|
|
724
|
-
return (0, smithy_client_1.take)(output, {
|
|
725
|
-
events: (_) => de_OrganizationEventList(_, context),
|
|
726
|
-
nextToken: smithy_client_1.expectString,
|
|
727
|
-
});
|
|
728
|
-
};
|
|
729
|
-
const de_DescribeEventsResponse = (output, context) => {
|
|
730
|
-
return (0, smithy_client_1.take)(output, {
|
|
731
|
-
events: (_) => de_EventList(_, context),
|
|
732
|
-
nextToken: smithy_client_1.expectString,
|
|
733
|
-
});
|
|
734
|
-
};
|
|
735
|
-
const de_EntityList = (output, context) => {
|
|
736
|
-
const retVal = (output || [])
|
|
737
|
-
.filter((e) => e != null)
|
|
738
|
-
.map((entry) => {
|
|
739
|
-
return de_AffectedEntity(entry, context);
|
|
740
|
-
});
|
|
741
|
-
return retVal;
|
|
742
|
-
};
|
|
743
|
-
const de_Event = (output, context) => {
|
|
744
|
-
return (0, smithy_client_1.take)(output, {
|
|
745
|
-
arn: smithy_client_1.expectString,
|
|
746
|
-
availabilityZone: smithy_client_1.expectString,
|
|
747
|
-
endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
748
|
-
eventScopeCode: smithy_client_1.expectString,
|
|
749
|
-
eventTypeCategory: smithy_client_1.expectString,
|
|
750
|
-
eventTypeCode: smithy_client_1.expectString,
|
|
751
|
-
lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
752
|
-
region: smithy_client_1.expectString,
|
|
753
|
-
service: smithy_client_1.expectString,
|
|
754
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
755
|
-
statusCode: smithy_client_1.expectString,
|
|
756
|
-
});
|
|
757
|
-
};
|
|
758
|
-
const de_EventDetails = (output, context) => {
|
|
759
|
-
return (0, smithy_client_1.take)(output, {
|
|
760
|
-
event: (_) => de_Event(_, context),
|
|
761
|
-
eventDescription: smithy_client_1._json,
|
|
762
|
-
eventMetadata: smithy_client_1._json,
|
|
763
|
-
});
|
|
764
|
-
};
|
|
765
|
-
const de_EventList = (output, context) => {
|
|
766
|
-
const retVal = (output || [])
|
|
767
|
-
.filter((e) => e != null)
|
|
768
|
-
.map((entry) => {
|
|
769
|
-
return de_Event(entry, context);
|
|
770
|
-
});
|
|
771
|
-
return retVal;
|
|
772
|
-
};
|
|
773
|
-
const de_OrganizationEvent = (output, context) => {
|
|
774
|
-
return (0, smithy_client_1.take)(output, {
|
|
775
|
-
arn: smithy_client_1.expectString,
|
|
776
|
-
endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
777
|
-
eventScopeCode: smithy_client_1.expectString,
|
|
778
|
-
eventTypeCategory: smithy_client_1.expectString,
|
|
779
|
-
eventTypeCode: smithy_client_1.expectString,
|
|
780
|
-
lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
781
|
-
region: smithy_client_1.expectString,
|
|
782
|
-
service: smithy_client_1.expectString,
|
|
783
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
784
|
-
statusCode: smithy_client_1.expectString,
|
|
785
|
-
});
|
|
786
|
-
};
|
|
787
|
-
const de_OrganizationEventDetails = (output, context) => {
|
|
788
|
-
return (0, smithy_client_1.take)(output, {
|
|
789
|
-
awsAccountId: smithy_client_1.expectString,
|
|
790
|
-
event: (_) => de_Event(_, context),
|
|
791
|
-
eventDescription: smithy_client_1._json,
|
|
792
|
-
eventMetadata: smithy_client_1._json,
|
|
793
|
-
});
|
|
794
|
-
};
|
|
795
|
-
const de_OrganizationEventList = (output, context) => {
|
|
796
|
-
const retVal = (output || [])
|
|
797
|
-
.filter((e) => e != null)
|
|
798
|
-
.map((entry) => {
|
|
799
|
-
return de_OrganizationEvent(entry, context);
|
|
800
|
-
});
|
|
801
|
-
return retVal;
|
|
802
|
-
};
|
|
803
|
-
const deserializeMetadata = (output) => ({
|
|
804
|
-
httpStatusCode: output.statusCode,
|
|
805
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
806
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
807
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
808
|
-
});
|
|
809
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
810
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(HealthServiceException_1.HealthServiceException);
|
|
811
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
812
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
813
|
-
const contents = {
|
|
814
|
-
protocol,
|
|
815
|
-
hostname,
|
|
816
|
-
port,
|
|
817
|
-
method: "POST",
|
|
818
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
819
|
-
headers,
|
|
820
|
-
};
|
|
821
|
-
if (resolvedHostname !== undefined) {
|
|
822
|
-
contents.hostname = resolvedHostname;
|
|
823
|
-
}
|
|
824
|
-
if (body !== undefined) {
|
|
825
|
-
contents.body = body;
|
|
826
|
-
}
|
|
827
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
828
|
-
};
|
|
829
|
-
function sharedHeaders(operation) {
|
|
830
|
-
return {
|
|
831
|
-
"content-type": "application/x-amz-json-1.1",
|
|
832
|
-
"x-amz-target": `AWSHealth_20160804.${operation}`,
|
|
833
|
-
};
|
|
834
|
-
}
|
|
835
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
836
|
-
if (encoded.length) {
|
|
837
|
-
return JSON.parse(encoded);
|
|
838
|
-
}
|
|
839
|
-
return {};
|
|
840
|
-
});
|
|
841
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
842
|
-
const value = await parseBody(errorBody, context);
|
|
843
|
-
value.message = value.message ?? value.Message;
|
|
844
|
-
return value;
|
|
845
|
-
};
|
|
846
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
847
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
848
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
849
|
-
let cleanValue = rawValue;
|
|
850
|
-
if (typeof cleanValue === "number") {
|
|
851
|
-
cleanValue = cleanValue.toString();
|
|
852
|
-
}
|
|
853
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
854
|
-
cleanValue = cleanValue.split(",")[0];
|
|
855
|
-
}
|
|
856
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
857
|
-
cleanValue = cleanValue.split(":")[0];
|
|
858
|
-
}
|
|
859
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
860
|
-
cleanValue = cleanValue.split("#")[1];
|
|
861
|
-
}
|
|
862
|
-
return cleanValue;
|
|
863
|
-
};
|
|
864
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
865
|
-
if (headerKey !== undefined) {
|
|
866
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
867
|
-
}
|
|
868
|
-
if (data.code !== undefined) {
|
|
869
|
-
return sanitizeErrorCode(data.code);
|
|
870
|
-
}
|
|
871
|
-
if (data["__type"] !== undefined) {
|
|
872
|
-
return sanitizeErrorCode(data["__type"]);
|
|
873
|
-
}
|
|
874
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|