@aws-sdk/client-amp 3.489.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/Amp.js +1 -63
- package/dist-cjs/AmpClient.js +1 -43
- package/dist-cjs/commands/CreateAlertManagerDefinitionCommand.js +1 -28
- package/dist-cjs/commands/CreateLoggingConfigurationCommand.js +1 -28
- package/dist-cjs/commands/CreateRuleGroupsNamespaceCommand.js +1 -28
- package/dist-cjs/commands/CreateScraperCommand.js +1 -28
- package/dist-cjs/commands/CreateWorkspaceCommand.js +1 -28
- package/dist-cjs/commands/DeleteAlertManagerDefinitionCommand.js +1 -28
- package/dist-cjs/commands/DeleteLoggingConfigurationCommand.js +1 -28
- package/dist-cjs/commands/DeleteRuleGroupsNamespaceCommand.js +1 -28
- package/dist-cjs/commands/DeleteScraperCommand.js +1 -28
- package/dist-cjs/commands/DeleteWorkspaceCommand.js +1 -28
- package/dist-cjs/commands/DescribeAlertManagerDefinitionCommand.js +1 -28
- package/dist-cjs/commands/DescribeLoggingConfigurationCommand.js +1 -28
- package/dist-cjs/commands/DescribeRuleGroupsNamespaceCommand.js +1 -28
- package/dist-cjs/commands/DescribeScraperCommand.js +1 -28
- package/dist-cjs/commands/DescribeWorkspaceCommand.js +1 -28
- package/dist-cjs/commands/GetDefaultScraperConfigurationCommand.js +1 -28
- package/dist-cjs/commands/ListRuleGroupsNamespacesCommand.js +1 -28
- package/dist-cjs/commands/ListScrapersCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/ListWorkspacesCommand.js +1 -28
- package/dist-cjs/commands/PutAlertManagerDefinitionCommand.js +1 -28
- package/dist-cjs/commands/PutRuleGroupsNamespaceCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateLoggingConfigurationCommand.js +1 -28
- package/dist-cjs/commands/UpdateWorkspaceAliasCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -29
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +3028 -12
- package/dist-cjs/models/AmpServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -179
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListRuleGroupsNamespacesPaginator.js +1 -7
- package/dist-cjs/pagination/ListScrapersPaginator.js +1 -7
- package/dist-cjs/pagination/ListWorkspacesPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -7
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1890
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/dist-cjs/waiters/index.js +1 -7
- package/dist-cjs/waiters/waitForScraperActive.js +1 -45
- package/dist-cjs/waiters/waitForScraperDeleted.js +1 -39
- package/dist-cjs/waiters/waitForWorkspaceActive.js +1 -54
- package/dist-cjs/waiters/waitForWorkspaceDeleted.js +1 -39
- package/package.json +41 -41
|
@@ -1,1890 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_PutRuleGroupsNamespaceCommand = exports.de_PutAlertManagerDefinitionCommand = exports.de_ListWorkspacesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListScrapersCommand = exports.de_ListRuleGroupsNamespacesCommand = exports.de_GetDefaultScraperConfigurationCommand = exports.de_DescribeWorkspaceCommand = exports.de_DescribeScraperCommand = exports.de_DescribeRuleGroupsNamespaceCommand = exports.de_DescribeLoggingConfigurationCommand = exports.de_DescribeAlertManagerDefinitionCommand = exports.de_DeleteWorkspaceCommand = exports.de_DeleteScraperCommand = exports.de_DeleteRuleGroupsNamespaceCommand = exports.de_DeleteLoggingConfigurationCommand = exports.de_DeleteAlertManagerDefinitionCommand = exports.de_CreateWorkspaceCommand = exports.de_CreateScraperCommand = exports.de_CreateRuleGroupsNamespaceCommand = exports.de_CreateLoggingConfigurationCommand = exports.de_CreateAlertManagerDefinitionCommand = exports.se_UpdateWorkspaceAliasCommand = exports.se_UpdateLoggingConfigurationCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_PutRuleGroupsNamespaceCommand = exports.se_PutAlertManagerDefinitionCommand = exports.se_ListWorkspacesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListScrapersCommand = exports.se_ListRuleGroupsNamespacesCommand = exports.se_GetDefaultScraperConfigurationCommand = exports.se_DescribeWorkspaceCommand = exports.se_DescribeScraperCommand = exports.se_DescribeRuleGroupsNamespaceCommand = exports.se_DescribeLoggingConfigurationCommand = exports.se_DescribeAlertManagerDefinitionCommand = exports.se_DeleteWorkspaceCommand = exports.se_DeleteScraperCommand = exports.se_DeleteRuleGroupsNamespaceCommand = exports.se_DeleteLoggingConfigurationCommand = exports.se_DeleteAlertManagerDefinitionCommand = exports.se_CreateWorkspaceCommand = exports.se_CreateScraperCommand = exports.se_CreateRuleGroupsNamespaceCommand = exports.se_CreateLoggingConfigurationCommand = exports.se_CreateAlertManagerDefinitionCommand = void 0;
|
|
4
|
-
exports.de_UpdateWorkspaceAliasCommand = exports.de_UpdateLoggingConfigurationCommand = void 0;
|
|
5
|
-
const core_1 = require("@aws-sdk/core");
|
|
6
|
-
const core_2 = require("@smithy/core");
|
|
7
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
|
-
const uuid_1 = require("uuid");
|
|
9
|
-
const AmpServiceException_1 = require("../models/AmpServiceException");
|
|
10
|
-
const models_0_1 = require("../models/models_0");
|
|
11
|
-
const se_CreateAlertManagerDefinitionCommand = async (input, context) => {
|
|
12
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
13
|
-
const headers = {
|
|
14
|
-
"content-type": "application/json",
|
|
15
|
-
};
|
|
16
|
-
b.bp("/workspaces/{workspaceId}/alertmanager/definition");
|
|
17
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
18
|
-
let body;
|
|
19
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
20
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
21
|
-
data: (_) => context.base64Encoder(_),
|
|
22
|
-
}));
|
|
23
|
-
b.m("POST").h(headers).b(body);
|
|
24
|
-
return b.build();
|
|
25
|
-
};
|
|
26
|
-
exports.se_CreateAlertManagerDefinitionCommand = se_CreateAlertManagerDefinitionCommand;
|
|
27
|
-
const se_CreateLoggingConfigurationCommand = async (input, context) => {
|
|
28
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
29
|
-
const headers = {
|
|
30
|
-
"content-type": "application/json",
|
|
31
|
-
};
|
|
32
|
-
b.bp("/workspaces/{workspaceId}/logging");
|
|
33
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
34
|
-
let body;
|
|
35
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
36
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
37
|
-
logGroupArn: [],
|
|
38
|
-
}));
|
|
39
|
-
b.m("POST").h(headers).b(body);
|
|
40
|
-
return b.build();
|
|
41
|
-
};
|
|
42
|
-
exports.se_CreateLoggingConfigurationCommand = se_CreateLoggingConfigurationCommand;
|
|
43
|
-
const se_CreateRuleGroupsNamespaceCommand = async (input, context) => {
|
|
44
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
45
|
-
const headers = {
|
|
46
|
-
"content-type": "application/json",
|
|
47
|
-
};
|
|
48
|
-
b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces");
|
|
49
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
50
|
-
let body;
|
|
51
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
52
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
53
|
-
data: (_) => context.base64Encoder(_),
|
|
54
|
-
name: [],
|
|
55
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
56
|
-
}));
|
|
57
|
-
b.m("POST").h(headers).b(body);
|
|
58
|
-
return b.build();
|
|
59
|
-
};
|
|
60
|
-
exports.se_CreateRuleGroupsNamespaceCommand = se_CreateRuleGroupsNamespaceCommand;
|
|
61
|
-
const se_CreateScraperCommand = async (input, context) => {
|
|
62
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
63
|
-
const headers = {
|
|
64
|
-
"content-type": "application/json",
|
|
65
|
-
};
|
|
66
|
-
b.bp("/scrapers");
|
|
67
|
-
let body;
|
|
68
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
69
|
-
alias: [],
|
|
70
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
71
|
-
destination: (_) => (0, smithy_client_1._json)(_),
|
|
72
|
-
scrapeConfiguration: (_) => se_ScrapeConfiguration(_, context),
|
|
73
|
-
source: (_) => (0, smithy_client_1._json)(_),
|
|
74
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
75
|
-
}));
|
|
76
|
-
b.m("POST").h(headers).b(body);
|
|
77
|
-
return b.build();
|
|
78
|
-
};
|
|
79
|
-
exports.se_CreateScraperCommand = se_CreateScraperCommand;
|
|
80
|
-
const se_CreateWorkspaceCommand = async (input, context) => {
|
|
81
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
82
|
-
const headers = {
|
|
83
|
-
"content-type": "application/json",
|
|
84
|
-
};
|
|
85
|
-
b.bp("/workspaces");
|
|
86
|
-
let body;
|
|
87
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
88
|
-
alias: [],
|
|
89
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
90
|
-
kmsKeyArn: [],
|
|
91
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
92
|
-
}));
|
|
93
|
-
b.m("POST").h(headers).b(body);
|
|
94
|
-
return b.build();
|
|
95
|
-
};
|
|
96
|
-
exports.se_CreateWorkspaceCommand = se_CreateWorkspaceCommand;
|
|
97
|
-
const se_DeleteAlertManagerDefinitionCommand = async (input, context) => {
|
|
98
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
99
|
-
const headers = {};
|
|
100
|
-
b.bp("/workspaces/{workspaceId}/alertmanager/definition");
|
|
101
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
102
|
-
const query = (0, smithy_client_1.map)({
|
|
103
|
-
[_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
|
|
104
|
-
});
|
|
105
|
-
let body;
|
|
106
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
107
|
-
return b.build();
|
|
108
|
-
};
|
|
109
|
-
exports.se_DeleteAlertManagerDefinitionCommand = se_DeleteAlertManagerDefinitionCommand;
|
|
110
|
-
const se_DeleteLoggingConfigurationCommand = async (input, context) => {
|
|
111
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
112
|
-
const headers = {};
|
|
113
|
-
b.bp("/workspaces/{workspaceId}/logging");
|
|
114
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
115
|
-
const query = (0, smithy_client_1.map)({
|
|
116
|
-
[_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
|
|
117
|
-
});
|
|
118
|
-
let body;
|
|
119
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
120
|
-
return b.build();
|
|
121
|
-
};
|
|
122
|
-
exports.se_DeleteLoggingConfigurationCommand = se_DeleteLoggingConfigurationCommand;
|
|
123
|
-
const se_DeleteRuleGroupsNamespaceCommand = async (input, context) => {
|
|
124
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
125
|
-
const headers = {};
|
|
126
|
-
b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
|
|
127
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
128
|
-
b.p("name", () => input.name, "{name}", false);
|
|
129
|
-
const query = (0, smithy_client_1.map)({
|
|
130
|
-
[_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
|
|
131
|
-
});
|
|
132
|
-
let body;
|
|
133
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
134
|
-
return b.build();
|
|
135
|
-
};
|
|
136
|
-
exports.se_DeleteRuleGroupsNamespaceCommand = se_DeleteRuleGroupsNamespaceCommand;
|
|
137
|
-
const se_DeleteScraperCommand = async (input, context) => {
|
|
138
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
139
|
-
const headers = {};
|
|
140
|
-
b.bp("/scrapers/{scraperId}");
|
|
141
|
-
b.p("scraperId", () => input.scraperId, "{scraperId}", false);
|
|
142
|
-
const query = (0, smithy_client_1.map)({
|
|
143
|
-
[_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
|
|
144
|
-
});
|
|
145
|
-
let body;
|
|
146
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
147
|
-
return b.build();
|
|
148
|
-
};
|
|
149
|
-
exports.se_DeleteScraperCommand = se_DeleteScraperCommand;
|
|
150
|
-
const se_DeleteWorkspaceCommand = async (input, context) => {
|
|
151
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
152
|
-
const headers = {};
|
|
153
|
-
b.bp("/workspaces/{workspaceId}");
|
|
154
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
155
|
-
const query = (0, smithy_client_1.map)({
|
|
156
|
-
[_cT]: [, input[_cT] ?? (0, uuid_1.v4)()],
|
|
157
|
-
});
|
|
158
|
-
let body;
|
|
159
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
160
|
-
return b.build();
|
|
161
|
-
};
|
|
162
|
-
exports.se_DeleteWorkspaceCommand = se_DeleteWorkspaceCommand;
|
|
163
|
-
const se_DescribeAlertManagerDefinitionCommand = async (input, context) => {
|
|
164
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
165
|
-
const headers = {};
|
|
166
|
-
b.bp("/workspaces/{workspaceId}/alertmanager/definition");
|
|
167
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
168
|
-
let body;
|
|
169
|
-
b.m("GET").h(headers).b(body);
|
|
170
|
-
return b.build();
|
|
171
|
-
};
|
|
172
|
-
exports.se_DescribeAlertManagerDefinitionCommand = se_DescribeAlertManagerDefinitionCommand;
|
|
173
|
-
const se_DescribeLoggingConfigurationCommand = async (input, context) => {
|
|
174
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
175
|
-
const headers = {};
|
|
176
|
-
b.bp("/workspaces/{workspaceId}/logging");
|
|
177
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
178
|
-
let body;
|
|
179
|
-
b.m("GET").h(headers).b(body);
|
|
180
|
-
return b.build();
|
|
181
|
-
};
|
|
182
|
-
exports.se_DescribeLoggingConfigurationCommand = se_DescribeLoggingConfigurationCommand;
|
|
183
|
-
const se_DescribeRuleGroupsNamespaceCommand = async (input, context) => {
|
|
184
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
185
|
-
const headers = {};
|
|
186
|
-
b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
|
|
187
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
188
|
-
b.p("name", () => input.name, "{name}", false);
|
|
189
|
-
let body;
|
|
190
|
-
b.m("GET").h(headers).b(body);
|
|
191
|
-
return b.build();
|
|
192
|
-
};
|
|
193
|
-
exports.se_DescribeRuleGroupsNamespaceCommand = se_DescribeRuleGroupsNamespaceCommand;
|
|
194
|
-
const se_DescribeScraperCommand = async (input, context) => {
|
|
195
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
196
|
-
const headers = {};
|
|
197
|
-
b.bp("/scrapers/{scraperId}");
|
|
198
|
-
b.p("scraperId", () => input.scraperId, "{scraperId}", false);
|
|
199
|
-
let body;
|
|
200
|
-
b.m("GET").h(headers).b(body);
|
|
201
|
-
return b.build();
|
|
202
|
-
};
|
|
203
|
-
exports.se_DescribeScraperCommand = se_DescribeScraperCommand;
|
|
204
|
-
const se_DescribeWorkspaceCommand = async (input, context) => {
|
|
205
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
206
|
-
const headers = {};
|
|
207
|
-
b.bp("/workspaces/{workspaceId}");
|
|
208
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
209
|
-
let body;
|
|
210
|
-
b.m("GET").h(headers).b(body);
|
|
211
|
-
return b.build();
|
|
212
|
-
};
|
|
213
|
-
exports.se_DescribeWorkspaceCommand = se_DescribeWorkspaceCommand;
|
|
214
|
-
const se_GetDefaultScraperConfigurationCommand = async (input, context) => {
|
|
215
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
216
|
-
const headers = {
|
|
217
|
-
"content-type": "application/json",
|
|
218
|
-
};
|
|
219
|
-
b.bp("/scraperconfiguration");
|
|
220
|
-
let body;
|
|
221
|
-
body = "";
|
|
222
|
-
b.m("GET").h(headers).b(body);
|
|
223
|
-
return b.build();
|
|
224
|
-
};
|
|
225
|
-
exports.se_GetDefaultScraperConfigurationCommand = se_GetDefaultScraperConfigurationCommand;
|
|
226
|
-
const se_ListRuleGroupsNamespacesCommand = async (input, context) => {
|
|
227
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
228
|
-
const headers = {};
|
|
229
|
-
b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces");
|
|
230
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
231
|
-
const query = (0, smithy_client_1.map)({
|
|
232
|
-
[_n]: [, input[_n]],
|
|
233
|
-
[_nT]: [, input[_nT]],
|
|
234
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
235
|
-
});
|
|
236
|
-
let body;
|
|
237
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
238
|
-
return b.build();
|
|
239
|
-
};
|
|
240
|
-
exports.se_ListRuleGroupsNamespacesCommand = se_ListRuleGroupsNamespacesCommand;
|
|
241
|
-
const se_ListScrapersCommand = async (input, context) => {
|
|
242
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
243
|
-
const headers = {};
|
|
244
|
-
b.bp("/scrapers");
|
|
245
|
-
const query = (0, smithy_client_1.map)({
|
|
246
|
-
...(0, smithy_client_1.convertMap)(input.filters),
|
|
247
|
-
[_nT]: [, input[_nT]],
|
|
248
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
249
|
-
});
|
|
250
|
-
let body;
|
|
251
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
252
|
-
return b.build();
|
|
253
|
-
};
|
|
254
|
-
exports.se_ListScrapersCommand = se_ListScrapersCommand;
|
|
255
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
256
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
257
|
-
const headers = {};
|
|
258
|
-
b.bp("/tags/{resourceArn}");
|
|
259
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
260
|
-
let body;
|
|
261
|
-
b.m("GET").h(headers).b(body);
|
|
262
|
-
return b.build();
|
|
263
|
-
};
|
|
264
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
265
|
-
const se_ListWorkspacesCommand = async (input, context) => {
|
|
266
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
267
|
-
const headers = {};
|
|
268
|
-
b.bp("/workspaces");
|
|
269
|
-
const query = (0, smithy_client_1.map)({
|
|
270
|
-
[_nT]: [, input[_nT]],
|
|
271
|
-
[_a]: [, input[_a]],
|
|
272
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
273
|
-
});
|
|
274
|
-
let body;
|
|
275
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
276
|
-
return b.build();
|
|
277
|
-
};
|
|
278
|
-
exports.se_ListWorkspacesCommand = se_ListWorkspacesCommand;
|
|
279
|
-
const se_PutAlertManagerDefinitionCommand = async (input, context) => {
|
|
280
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
281
|
-
const headers = {
|
|
282
|
-
"content-type": "application/json",
|
|
283
|
-
};
|
|
284
|
-
b.bp("/workspaces/{workspaceId}/alertmanager/definition");
|
|
285
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
286
|
-
let body;
|
|
287
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
288
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
289
|
-
data: (_) => context.base64Encoder(_),
|
|
290
|
-
}));
|
|
291
|
-
b.m("PUT").h(headers).b(body);
|
|
292
|
-
return b.build();
|
|
293
|
-
};
|
|
294
|
-
exports.se_PutAlertManagerDefinitionCommand = se_PutAlertManagerDefinitionCommand;
|
|
295
|
-
const se_PutRuleGroupsNamespaceCommand = async (input, context) => {
|
|
296
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
297
|
-
const headers = {
|
|
298
|
-
"content-type": "application/json",
|
|
299
|
-
};
|
|
300
|
-
b.bp("/workspaces/{workspaceId}/rulegroupsnamespaces/{name}");
|
|
301
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
302
|
-
b.p("name", () => input.name, "{name}", false);
|
|
303
|
-
let body;
|
|
304
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
305
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
306
|
-
data: (_) => context.base64Encoder(_),
|
|
307
|
-
}));
|
|
308
|
-
b.m("PUT").h(headers).b(body);
|
|
309
|
-
return b.build();
|
|
310
|
-
};
|
|
311
|
-
exports.se_PutRuleGroupsNamespaceCommand = se_PutRuleGroupsNamespaceCommand;
|
|
312
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
313
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
314
|
-
const headers = {
|
|
315
|
-
"content-type": "application/json",
|
|
316
|
-
};
|
|
317
|
-
b.bp("/tags/{resourceArn}");
|
|
318
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
319
|
-
let body;
|
|
320
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
321
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
322
|
-
}));
|
|
323
|
-
b.m("POST").h(headers).b(body);
|
|
324
|
-
return b.build();
|
|
325
|
-
};
|
|
326
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
327
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
328
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
329
|
-
const headers = {};
|
|
330
|
-
b.bp("/tags/{resourceArn}");
|
|
331
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
332
|
-
const query = (0, smithy_client_1.map)({
|
|
333
|
-
[_tK]: [
|
|
334
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
335
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
336
|
-
],
|
|
337
|
-
});
|
|
338
|
-
let body;
|
|
339
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
340
|
-
return b.build();
|
|
341
|
-
};
|
|
342
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
343
|
-
const se_UpdateLoggingConfigurationCommand = async (input, context) => {
|
|
344
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
345
|
-
const headers = {
|
|
346
|
-
"content-type": "application/json",
|
|
347
|
-
};
|
|
348
|
-
b.bp("/workspaces/{workspaceId}/logging");
|
|
349
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
350
|
-
let body;
|
|
351
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
352
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
353
|
-
logGroupArn: [],
|
|
354
|
-
}));
|
|
355
|
-
b.m("PUT").h(headers).b(body);
|
|
356
|
-
return b.build();
|
|
357
|
-
};
|
|
358
|
-
exports.se_UpdateLoggingConfigurationCommand = se_UpdateLoggingConfigurationCommand;
|
|
359
|
-
const se_UpdateWorkspaceAliasCommand = async (input, context) => {
|
|
360
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
361
|
-
const headers = {
|
|
362
|
-
"content-type": "application/json",
|
|
363
|
-
};
|
|
364
|
-
b.bp("/workspaces/{workspaceId}/alias");
|
|
365
|
-
b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
366
|
-
let body;
|
|
367
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
368
|
-
alias: [],
|
|
369
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
370
|
-
}));
|
|
371
|
-
b.m("POST").h(headers).b(body);
|
|
372
|
-
return b.build();
|
|
373
|
-
};
|
|
374
|
-
exports.se_UpdateWorkspaceAliasCommand = se_UpdateWorkspaceAliasCommand;
|
|
375
|
-
const de_CreateAlertManagerDefinitionCommand = async (output, context) => {
|
|
376
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
377
|
-
return de_CreateAlertManagerDefinitionCommandError(output, context);
|
|
378
|
-
}
|
|
379
|
-
const contents = (0, smithy_client_1.map)({
|
|
380
|
-
$metadata: deserializeMetadata(output),
|
|
381
|
-
});
|
|
382
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
383
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
384
|
-
status: smithy_client_1._json,
|
|
385
|
-
});
|
|
386
|
-
Object.assign(contents, doc);
|
|
387
|
-
return contents;
|
|
388
|
-
};
|
|
389
|
-
exports.de_CreateAlertManagerDefinitionCommand = de_CreateAlertManagerDefinitionCommand;
|
|
390
|
-
const de_CreateAlertManagerDefinitionCommandError = async (output, context) => {
|
|
391
|
-
const parsedOutput = {
|
|
392
|
-
...output,
|
|
393
|
-
body: await parseErrorBody(output.body, context),
|
|
394
|
-
};
|
|
395
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
396
|
-
switch (errorCode) {
|
|
397
|
-
case "AccessDeniedException":
|
|
398
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
399
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
400
|
-
case "ConflictException":
|
|
401
|
-
case "com.amazonaws.amp#ConflictException":
|
|
402
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
403
|
-
case "InternalServerException":
|
|
404
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
405
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
406
|
-
case "ResourceNotFoundException":
|
|
407
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
408
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
409
|
-
case "ServiceQuotaExceededException":
|
|
410
|
-
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
411
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
412
|
-
case "ThrottlingException":
|
|
413
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
414
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
415
|
-
case "ValidationException":
|
|
416
|
-
case "com.amazonaws.amp#ValidationException":
|
|
417
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
418
|
-
default:
|
|
419
|
-
const parsedBody = parsedOutput.body;
|
|
420
|
-
return throwDefaultError({
|
|
421
|
-
output,
|
|
422
|
-
parsedBody,
|
|
423
|
-
errorCode,
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
};
|
|
427
|
-
const de_CreateLoggingConfigurationCommand = async (output, context) => {
|
|
428
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
429
|
-
return de_CreateLoggingConfigurationCommandError(output, context);
|
|
430
|
-
}
|
|
431
|
-
const contents = (0, smithy_client_1.map)({
|
|
432
|
-
$metadata: deserializeMetadata(output),
|
|
433
|
-
});
|
|
434
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
435
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
436
|
-
status: smithy_client_1._json,
|
|
437
|
-
});
|
|
438
|
-
Object.assign(contents, doc);
|
|
439
|
-
return contents;
|
|
440
|
-
};
|
|
441
|
-
exports.de_CreateLoggingConfigurationCommand = de_CreateLoggingConfigurationCommand;
|
|
442
|
-
const de_CreateLoggingConfigurationCommandError = async (output, context) => {
|
|
443
|
-
const parsedOutput = {
|
|
444
|
-
...output,
|
|
445
|
-
body: await parseErrorBody(output.body, context),
|
|
446
|
-
};
|
|
447
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
448
|
-
switch (errorCode) {
|
|
449
|
-
case "AccessDeniedException":
|
|
450
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
451
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
452
|
-
case "InternalServerException":
|
|
453
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
454
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
455
|
-
case "ResourceNotFoundException":
|
|
456
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
457
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
458
|
-
case "ValidationException":
|
|
459
|
-
case "com.amazonaws.amp#ValidationException":
|
|
460
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
461
|
-
default:
|
|
462
|
-
const parsedBody = parsedOutput.body;
|
|
463
|
-
return throwDefaultError({
|
|
464
|
-
output,
|
|
465
|
-
parsedBody,
|
|
466
|
-
errorCode,
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
};
|
|
470
|
-
const de_CreateRuleGroupsNamespaceCommand = async (output, context) => {
|
|
471
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
472
|
-
return de_CreateRuleGroupsNamespaceCommandError(output, context);
|
|
473
|
-
}
|
|
474
|
-
const contents = (0, smithy_client_1.map)({
|
|
475
|
-
$metadata: deserializeMetadata(output),
|
|
476
|
-
});
|
|
477
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
478
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
479
|
-
arn: smithy_client_1.expectString,
|
|
480
|
-
name: smithy_client_1.expectString,
|
|
481
|
-
status: smithy_client_1._json,
|
|
482
|
-
tags: smithy_client_1._json,
|
|
483
|
-
});
|
|
484
|
-
Object.assign(contents, doc);
|
|
485
|
-
return contents;
|
|
486
|
-
};
|
|
487
|
-
exports.de_CreateRuleGroupsNamespaceCommand = de_CreateRuleGroupsNamespaceCommand;
|
|
488
|
-
const de_CreateRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
489
|
-
const parsedOutput = {
|
|
490
|
-
...output,
|
|
491
|
-
body: await parseErrorBody(output.body, context),
|
|
492
|
-
};
|
|
493
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
494
|
-
switch (errorCode) {
|
|
495
|
-
case "AccessDeniedException":
|
|
496
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
497
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
498
|
-
case "ConflictException":
|
|
499
|
-
case "com.amazonaws.amp#ConflictException":
|
|
500
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
501
|
-
case "InternalServerException":
|
|
502
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
503
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
504
|
-
case "ResourceNotFoundException":
|
|
505
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
506
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
507
|
-
case "ServiceQuotaExceededException":
|
|
508
|
-
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
509
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
510
|
-
case "ThrottlingException":
|
|
511
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
512
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
513
|
-
case "ValidationException":
|
|
514
|
-
case "com.amazonaws.amp#ValidationException":
|
|
515
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
516
|
-
default:
|
|
517
|
-
const parsedBody = parsedOutput.body;
|
|
518
|
-
return throwDefaultError({
|
|
519
|
-
output,
|
|
520
|
-
parsedBody,
|
|
521
|
-
errorCode,
|
|
522
|
-
});
|
|
523
|
-
}
|
|
524
|
-
};
|
|
525
|
-
const de_CreateScraperCommand = async (output, context) => {
|
|
526
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
527
|
-
return de_CreateScraperCommandError(output, context);
|
|
528
|
-
}
|
|
529
|
-
const contents = (0, smithy_client_1.map)({
|
|
530
|
-
$metadata: deserializeMetadata(output),
|
|
531
|
-
});
|
|
532
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
533
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
534
|
-
arn: smithy_client_1.expectString,
|
|
535
|
-
scraperId: smithy_client_1.expectString,
|
|
536
|
-
status: smithy_client_1._json,
|
|
537
|
-
tags: smithy_client_1._json,
|
|
538
|
-
});
|
|
539
|
-
Object.assign(contents, doc);
|
|
540
|
-
return contents;
|
|
541
|
-
};
|
|
542
|
-
exports.de_CreateScraperCommand = de_CreateScraperCommand;
|
|
543
|
-
const de_CreateScraperCommandError = async (output, context) => {
|
|
544
|
-
const parsedOutput = {
|
|
545
|
-
...output,
|
|
546
|
-
body: await parseErrorBody(output.body, context),
|
|
547
|
-
};
|
|
548
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
549
|
-
switch (errorCode) {
|
|
550
|
-
case "AccessDeniedException":
|
|
551
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
552
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
553
|
-
case "ConflictException":
|
|
554
|
-
case "com.amazonaws.amp#ConflictException":
|
|
555
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
556
|
-
case "InternalServerException":
|
|
557
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
558
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
559
|
-
case "ResourceNotFoundException":
|
|
560
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
561
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
562
|
-
case "ServiceQuotaExceededException":
|
|
563
|
-
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
564
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
565
|
-
case "ThrottlingException":
|
|
566
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
567
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
568
|
-
case "ValidationException":
|
|
569
|
-
case "com.amazonaws.amp#ValidationException":
|
|
570
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
571
|
-
default:
|
|
572
|
-
const parsedBody = parsedOutput.body;
|
|
573
|
-
return throwDefaultError({
|
|
574
|
-
output,
|
|
575
|
-
parsedBody,
|
|
576
|
-
errorCode,
|
|
577
|
-
});
|
|
578
|
-
}
|
|
579
|
-
};
|
|
580
|
-
const de_CreateWorkspaceCommand = async (output, context) => {
|
|
581
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
582
|
-
return de_CreateWorkspaceCommandError(output, context);
|
|
583
|
-
}
|
|
584
|
-
const contents = (0, smithy_client_1.map)({
|
|
585
|
-
$metadata: deserializeMetadata(output),
|
|
586
|
-
});
|
|
587
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
588
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
589
|
-
arn: smithy_client_1.expectString,
|
|
590
|
-
kmsKeyArn: smithy_client_1.expectString,
|
|
591
|
-
status: smithy_client_1._json,
|
|
592
|
-
tags: smithy_client_1._json,
|
|
593
|
-
workspaceId: smithy_client_1.expectString,
|
|
594
|
-
});
|
|
595
|
-
Object.assign(contents, doc);
|
|
596
|
-
return contents;
|
|
597
|
-
};
|
|
598
|
-
exports.de_CreateWorkspaceCommand = de_CreateWorkspaceCommand;
|
|
599
|
-
const de_CreateWorkspaceCommandError = async (output, context) => {
|
|
600
|
-
const parsedOutput = {
|
|
601
|
-
...output,
|
|
602
|
-
body: await parseErrorBody(output.body, context),
|
|
603
|
-
};
|
|
604
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
605
|
-
switch (errorCode) {
|
|
606
|
-
case "AccessDeniedException":
|
|
607
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
608
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
609
|
-
case "ConflictException":
|
|
610
|
-
case "com.amazonaws.amp#ConflictException":
|
|
611
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
612
|
-
case "InternalServerException":
|
|
613
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
614
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
615
|
-
case "ServiceQuotaExceededException":
|
|
616
|
-
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
617
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
618
|
-
case "ThrottlingException":
|
|
619
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
620
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
621
|
-
case "ValidationException":
|
|
622
|
-
case "com.amazonaws.amp#ValidationException":
|
|
623
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
624
|
-
default:
|
|
625
|
-
const parsedBody = parsedOutput.body;
|
|
626
|
-
return throwDefaultError({
|
|
627
|
-
output,
|
|
628
|
-
parsedBody,
|
|
629
|
-
errorCode,
|
|
630
|
-
});
|
|
631
|
-
}
|
|
632
|
-
};
|
|
633
|
-
const de_DeleteAlertManagerDefinitionCommand = async (output, context) => {
|
|
634
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
635
|
-
return de_DeleteAlertManagerDefinitionCommandError(output, context);
|
|
636
|
-
}
|
|
637
|
-
const contents = (0, smithy_client_1.map)({
|
|
638
|
-
$metadata: deserializeMetadata(output),
|
|
639
|
-
});
|
|
640
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
641
|
-
return contents;
|
|
642
|
-
};
|
|
643
|
-
exports.de_DeleteAlertManagerDefinitionCommand = de_DeleteAlertManagerDefinitionCommand;
|
|
644
|
-
const de_DeleteAlertManagerDefinitionCommandError = async (output, context) => {
|
|
645
|
-
const parsedOutput = {
|
|
646
|
-
...output,
|
|
647
|
-
body: await parseErrorBody(output.body, context),
|
|
648
|
-
};
|
|
649
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
650
|
-
switch (errorCode) {
|
|
651
|
-
case "AccessDeniedException":
|
|
652
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
653
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
654
|
-
case "ConflictException":
|
|
655
|
-
case "com.amazonaws.amp#ConflictException":
|
|
656
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
657
|
-
case "InternalServerException":
|
|
658
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
659
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
660
|
-
case "ResourceNotFoundException":
|
|
661
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
662
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
663
|
-
case "ThrottlingException":
|
|
664
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
665
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
666
|
-
case "ValidationException":
|
|
667
|
-
case "com.amazonaws.amp#ValidationException":
|
|
668
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
669
|
-
default:
|
|
670
|
-
const parsedBody = parsedOutput.body;
|
|
671
|
-
return throwDefaultError({
|
|
672
|
-
output,
|
|
673
|
-
parsedBody,
|
|
674
|
-
errorCode,
|
|
675
|
-
});
|
|
676
|
-
}
|
|
677
|
-
};
|
|
678
|
-
const de_DeleteLoggingConfigurationCommand = async (output, context) => {
|
|
679
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
680
|
-
return de_DeleteLoggingConfigurationCommandError(output, context);
|
|
681
|
-
}
|
|
682
|
-
const contents = (0, smithy_client_1.map)({
|
|
683
|
-
$metadata: deserializeMetadata(output),
|
|
684
|
-
});
|
|
685
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
686
|
-
return contents;
|
|
687
|
-
};
|
|
688
|
-
exports.de_DeleteLoggingConfigurationCommand = de_DeleteLoggingConfigurationCommand;
|
|
689
|
-
const de_DeleteLoggingConfigurationCommandError = async (output, context) => {
|
|
690
|
-
const parsedOutput = {
|
|
691
|
-
...output,
|
|
692
|
-
body: await parseErrorBody(output.body, context),
|
|
693
|
-
};
|
|
694
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
695
|
-
switch (errorCode) {
|
|
696
|
-
case "AccessDeniedException":
|
|
697
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
698
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
699
|
-
case "ConflictException":
|
|
700
|
-
case "com.amazonaws.amp#ConflictException":
|
|
701
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
702
|
-
case "InternalServerException":
|
|
703
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
704
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
705
|
-
case "ResourceNotFoundException":
|
|
706
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
707
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
708
|
-
case "ValidationException":
|
|
709
|
-
case "com.amazonaws.amp#ValidationException":
|
|
710
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
711
|
-
default:
|
|
712
|
-
const parsedBody = parsedOutput.body;
|
|
713
|
-
return throwDefaultError({
|
|
714
|
-
output,
|
|
715
|
-
parsedBody,
|
|
716
|
-
errorCode,
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
|
-
};
|
|
720
|
-
const de_DeleteRuleGroupsNamespaceCommand = async (output, context) => {
|
|
721
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
722
|
-
return de_DeleteRuleGroupsNamespaceCommandError(output, context);
|
|
723
|
-
}
|
|
724
|
-
const contents = (0, smithy_client_1.map)({
|
|
725
|
-
$metadata: deserializeMetadata(output),
|
|
726
|
-
});
|
|
727
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
728
|
-
return contents;
|
|
729
|
-
};
|
|
730
|
-
exports.de_DeleteRuleGroupsNamespaceCommand = de_DeleteRuleGroupsNamespaceCommand;
|
|
731
|
-
const de_DeleteRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
732
|
-
const parsedOutput = {
|
|
733
|
-
...output,
|
|
734
|
-
body: await parseErrorBody(output.body, context),
|
|
735
|
-
};
|
|
736
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
737
|
-
switch (errorCode) {
|
|
738
|
-
case "AccessDeniedException":
|
|
739
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
740
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
741
|
-
case "ConflictException":
|
|
742
|
-
case "com.amazonaws.amp#ConflictException":
|
|
743
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
744
|
-
case "InternalServerException":
|
|
745
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
746
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
747
|
-
case "ResourceNotFoundException":
|
|
748
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
749
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
750
|
-
case "ThrottlingException":
|
|
751
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
752
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
753
|
-
case "ValidationException":
|
|
754
|
-
case "com.amazonaws.amp#ValidationException":
|
|
755
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
756
|
-
default:
|
|
757
|
-
const parsedBody = parsedOutput.body;
|
|
758
|
-
return throwDefaultError({
|
|
759
|
-
output,
|
|
760
|
-
parsedBody,
|
|
761
|
-
errorCode,
|
|
762
|
-
});
|
|
763
|
-
}
|
|
764
|
-
};
|
|
765
|
-
const de_DeleteScraperCommand = async (output, context) => {
|
|
766
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
767
|
-
return de_DeleteScraperCommandError(output, context);
|
|
768
|
-
}
|
|
769
|
-
const contents = (0, smithy_client_1.map)({
|
|
770
|
-
$metadata: deserializeMetadata(output),
|
|
771
|
-
});
|
|
772
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
773
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
774
|
-
scraperId: smithy_client_1.expectString,
|
|
775
|
-
status: smithy_client_1._json,
|
|
776
|
-
});
|
|
777
|
-
Object.assign(contents, doc);
|
|
778
|
-
return contents;
|
|
779
|
-
};
|
|
780
|
-
exports.de_DeleteScraperCommand = de_DeleteScraperCommand;
|
|
781
|
-
const de_DeleteScraperCommandError = async (output, context) => {
|
|
782
|
-
const parsedOutput = {
|
|
783
|
-
...output,
|
|
784
|
-
body: await parseErrorBody(output.body, context),
|
|
785
|
-
};
|
|
786
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
787
|
-
switch (errorCode) {
|
|
788
|
-
case "AccessDeniedException":
|
|
789
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
790
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
791
|
-
case "ConflictException":
|
|
792
|
-
case "com.amazonaws.amp#ConflictException":
|
|
793
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
794
|
-
case "InternalServerException":
|
|
795
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
796
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
797
|
-
case "ResourceNotFoundException":
|
|
798
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
799
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
800
|
-
case "ThrottlingException":
|
|
801
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
802
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
803
|
-
case "ValidationException":
|
|
804
|
-
case "com.amazonaws.amp#ValidationException":
|
|
805
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
806
|
-
default:
|
|
807
|
-
const parsedBody = parsedOutput.body;
|
|
808
|
-
return throwDefaultError({
|
|
809
|
-
output,
|
|
810
|
-
parsedBody,
|
|
811
|
-
errorCode,
|
|
812
|
-
});
|
|
813
|
-
}
|
|
814
|
-
};
|
|
815
|
-
const de_DeleteWorkspaceCommand = async (output, context) => {
|
|
816
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
817
|
-
return de_DeleteWorkspaceCommandError(output, context);
|
|
818
|
-
}
|
|
819
|
-
const contents = (0, smithy_client_1.map)({
|
|
820
|
-
$metadata: deserializeMetadata(output),
|
|
821
|
-
});
|
|
822
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
823
|
-
return contents;
|
|
824
|
-
};
|
|
825
|
-
exports.de_DeleteWorkspaceCommand = de_DeleteWorkspaceCommand;
|
|
826
|
-
const de_DeleteWorkspaceCommandError = async (output, context) => {
|
|
827
|
-
const parsedOutput = {
|
|
828
|
-
...output,
|
|
829
|
-
body: await parseErrorBody(output.body, context),
|
|
830
|
-
};
|
|
831
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
832
|
-
switch (errorCode) {
|
|
833
|
-
case "AccessDeniedException":
|
|
834
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
835
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
836
|
-
case "ConflictException":
|
|
837
|
-
case "com.amazonaws.amp#ConflictException":
|
|
838
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
839
|
-
case "InternalServerException":
|
|
840
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
841
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
842
|
-
case "ResourceNotFoundException":
|
|
843
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
844
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
845
|
-
case "ThrottlingException":
|
|
846
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
847
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
848
|
-
case "ValidationException":
|
|
849
|
-
case "com.amazonaws.amp#ValidationException":
|
|
850
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
851
|
-
default:
|
|
852
|
-
const parsedBody = parsedOutput.body;
|
|
853
|
-
return throwDefaultError({
|
|
854
|
-
output,
|
|
855
|
-
parsedBody,
|
|
856
|
-
errorCode,
|
|
857
|
-
});
|
|
858
|
-
}
|
|
859
|
-
};
|
|
860
|
-
const de_DescribeAlertManagerDefinitionCommand = async (output, context) => {
|
|
861
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
862
|
-
return de_DescribeAlertManagerDefinitionCommandError(output, context);
|
|
863
|
-
}
|
|
864
|
-
const contents = (0, smithy_client_1.map)({
|
|
865
|
-
$metadata: deserializeMetadata(output),
|
|
866
|
-
});
|
|
867
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
868
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
869
|
-
alertManagerDefinition: (_) => de_AlertManagerDefinitionDescription(_, context),
|
|
870
|
-
});
|
|
871
|
-
Object.assign(contents, doc);
|
|
872
|
-
return contents;
|
|
873
|
-
};
|
|
874
|
-
exports.de_DescribeAlertManagerDefinitionCommand = de_DescribeAlertManagerDefinitionCommand;
|
|
875
|
-
const de_DescribeAlertManagerDefinitionCommandError = async (output, context) => {
|
|
876
|
-
const parsedOutput = {
|
|
877
|
-
...output,
|
|
878
|
-
body: await parseErrorBody(output.body, context),
|
|
879
|
-
};
|
|
880
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
881
|
-
switch (errorCode) {
|
|
882
|
-
case "AccessDeniedException":
|
|
883
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
884
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
885
|
-
case "InternalServerException":
|
|
886
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
887
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
888
|
-
case "ResourceNotFoundException":
|
|
889
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
890
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
891
|
-
case "ThrottlingException":
|
|
892
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
893
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
894
|
-
case "ValidationException":
|
|
895
|
-
case "com.amazonaws.amp#ValidationException":
|
|
896
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
897
|
-
default:
|
|
898
|
-
const parsedBody = parsedOutput.body;
|
|
899
|
-
return throwDefaultError({
|
|
900
|
-
output,
|
|
901
|
-
parsedBody,
|
|
902
|
-
errorCode,
|
|
903
|
-
});
|
|
904
|
-
}
|
|
905
|
-
};
|
|
906
|
-
const de_DescribeLoggingConfigurationCommand = async (output, context) => {
|
|
907
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
908
|
-
return de_DescribeLoggingConfigurationCommandError(output, context);
|
|
909
|
-
}
|
|
910
|
-
const contents = (0, smithy_client_1.map)({
|
|
911
|
-
$metadata: deserializeMetadata(output),
|
|
912
|
-
});
|
|
913
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
914
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
915
|
-
loggingConfiguration: (_) => de_LoggingConfigurationMetadata(_, context),
|
|
916
|
-
});
|
|
917
|
-
Object.assign(contents, doc);
|
|
918
|
-
return contents;
|
|
919
|
-
};
|
|
920
|
-
exports.de_DescribeLoggingConfigurationCommand = de_DescribeLoggingConfigurationCommand;
|
|
921
|
-
const de_DescribeLoggingConfigurationCommandError = async (output, context) => {
|
|
922
|
-
const parsedOutput = {
|
|
923
|
-
...output,
|
|
924
|
-
body: await parseErrorBody(output.body, context),
|
|
925
|
-
};
|
|
926
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
927
|
-
switch (errorCode) {
|
|
928
|
-
case "AccessDeniedException":
|
|
929
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
930
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
931
|
-
case "InternalServerException":
|
|
932
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
933
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
934
|
-
case "ResourceNotFoundException":
|
|
935
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
936
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
937
|
-
case "ValidationException":
|
|
938
|
-
case "com.amazonaws.amp#ValidationException":
|
|
939
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
940
|
-
default:
|
|
941
|
-
const parsedBody = parsedOutput.body;
|
|
942
|
-
return throwDefaultError({
|
|
943
|
-
output,
|
|
944
|
-
parsedBody,
|
|
945
|
-
errorCode,
|
|
946
|
-
});
|
|
947
|
-
}
|
|
948
|
-
};
|
|
949
|
-
const de_DescribeRuleGroupsNamespaceCommand = async (output, context) => {
|
|
950
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
951
|
-
return de_DescribeRuleGroupsNamespaceCommandError(output, context);
|
|
952
|
-
}
|
|
953
|
-
const contents = (0, smithy_client_1.map)({
|
|
954
|
-
$metadata: deserializeMetadata(output),
|
|
955
|
-
});
|
|
956
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
957
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
958
|
-
ruleGroupsNamespace: (_) => de_RuleGroupsNamespaceDescription(_, context),
|
|
959
|
-
});
|
|
960
|
-
Object.assign(contents, doc);
|
|
961
|
-
return contents;
|
|
962
|
-
};
|
|
963
|
-
exports.de_DescribeRuleGroupsNamespaceCommand = de_DescribeRuleGroupsNamespaceCommand;
|
|
964
|
-
const de_DescribeRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
965
|
-
const parsedOutput = {
|
|
966
|
-
...output,
|
|
967
|
-
body: await parseErrorBody(output.body, context),
|
|
968
|
-
};
|
|
969
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
970
|
-
switch (errorCode) {
|
|
971
|
-
case "AccessDeniedException":
|
|
972
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
973
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
974
|
-
case "InternalServerException":
|
|
975
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
976
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
977
|
-
case "ResourceNotFoundException":
|
|
978
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
979
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
980
|
-
case "ThrottlingException":
|
|
981
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
982
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
983
|
-
case "ValidationException":
|
|
984
|
-
case "com.amazonaws.amp#ValidationException":
|
|
985
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
986
|
-
default:
|
|
987
|
-
const parsedBody = parsedOutput.body;
|
|
988
|
-
return throwDefaultError({
|
|
989
|
-
output,
|
|
990
|
-
parsedBody,
|
|
991
|
-
errorCode,
|
|
992
|
-
});
|
|
993
|
-
}
|
|
994
|
-
};
|
|
995
|
-
const de_DescribeScraperCommand = async (output, context) => {
|
|
996
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
997
|
-
return de_DescribeScraperCommandError(output, context);
|
|
998
|
-
}
|
|
999
|
-
const contents = (0, smithy_client_1.map)({
|
|
1000
|
-
$metadata: deserializeMetadata(output),
|
|
1001
|
-
});
|
|
1002
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1003
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1004
|
-
scraper: (_) => de_ScraperDescription(_, context),
|
|
1005
|
-
});
|
|
1006
|
-
Object.assign(contents, doc);
|
|
1007
|
-
return contents;
|
|
1008
|
-
};
|
|
1009
|
-
exports.de_DescribeScraperCommand = de_DescribeScraperCommand;
|
|
1010
|
-
const de_DescribeScraperCommandError = async (output, context) => {
|
|
1011
|
-
const parsedOutput = {
|
|
1012
|
-
...output,
|
|
1013
|
-
body: await parseErrorBody(output.body, context),
|
|
1014
|
-
};
|
|
1015
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1016
|
-
switch (errorCode) {
|
|
1017
|
-
case "AccessDeniedException":
|
|
1018
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1019
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1020
|
-
case "InternalServerException":
|
|
1021
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1022
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1023
|
-
case "ResourceNotFoundException":
|
|
1024
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1025
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1026
|
-
case "ThrottlingException":
|
|
1027
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1028
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1029
|
-
case "ValidationException":
|
|
1030
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1031
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1032
|
-
default:
|
|
1033
|
-
const parsedBody = parsedOutput.body;
|
|
1034
|
-
return throwDefaultError({
|
|
1035
|
-
output,
|
|
1036
|
-
parsedBody,
|
|
1037
|
-
errorCode,
|
|
1038
|
-
});
|
|
1039
|
-
}
|
|
1040
|
-
};
|
|
1041
|
-
const de_DescribeWorkspaceCommand = async (output, context) => {
|
|
1042
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1043
|
-
return de_DescribeWorkspaceCommandError(output, context);
|
|
1044
|
-
}
|
|
1045
|
-
const contents = (0, smithy_client_1.map)({
|
|
1046
|
-
$metadata: deserializeMetadata(output),
|
|
1047
|
-
});
|
|
1048
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1049
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1050
|
-
workspace: (_) => de_WorkspaceDescription(_, context),
|
|
1051
|
-
});
|
|
1052
|
-
Object.assign(contents, doc);
|
|
1053
|
-
return contents;
|
|
1054
|
-
};
|
|
1055
|
-
exports.de_DescribeWorkspaceCommand = de_DescribeWorkspaceCommand;
|
|
1056
|
-
const de_DescribeWorkspaceCommandError = async (output, context) => {
|
|
1057
|
-
const parsedOutput = {
|
|
1058
|
-
...output,
|
|
1059
|
-
body: await parseErrorBody(output.body, context),
|
|
1060
|
-
};
|
|
1061
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1062
|
-
switch (errorCode) {
|
|
1063
|
-
case "AccessDeniedException":
|
|
1064
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1065
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1066
|
-
case "InternalServerException":
|
|
1067
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1068
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1069
|
-
case "ResourceNotFoundException":
|
|
1070
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1071
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1072
|
-
case "ThrottlingException":
|
|
1073
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1074
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1075
|
-
case "ValidationException":
|
|
1076
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1077
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1078
|
-
default:
|
|
1079
|
-
const parsedBody = parsedOutput.body;
|
|
1080
|
-
return throwDefaultError({
|
|
1081
|
-
output,
|
|
1082
|
-
parsedBody,
|
|
1083
|
-
errorCode,
|
|
1084
|
-
});
|
|
1085
|
-
}
|
|
1086
|
-
};
|
|
1087
|
-
const de_GetDefaultScraperConfigurationCommand = async (output, context) => {
|
|
1088
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1089
|
-
return de_GetDefaultScraperConfigurationCommandError(output, context);
|
|
1090
|
-
}
|
|
1091
|
-
const contents = (0, smithy_client_1.map)({
|
|
1092
|
-
$metadata: deserializeMetadata(output),
|
|
1093
|
-
});
|
|
1094
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1095
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1096
|
-
configuration: context.base64Decoder,
|
|
1097
|
-
});
|
|
1098
|
-
Object.assign(contents, doc);
|
|
1099
|
-
return contents;
|
|
1100
|
-
};
|
|
1101
|
-
exports.de_GetDefaultScraperConfigurationCommand = de_GetDefaultScraperConfigurationCommand;
|
|
1102
|
-
const de_GetDefaultScraperConfigurationCommandError = async (output, context) => {
|
|
1103
|
-
const parsedOutput = {
|
|
1104
|
-
...output,
|
|
1105
|
-
body: await parseErrorBody(output.body, context),
|
|
1106
|
-
};
|
|
1107
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1108
|
-
switch (errorCode) {
|
|
1109
|
-
case "AccessDeniedException":
|
|
1110
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1111
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1112
|
-
case "InternalServerException":
|
|
1113
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1114
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1115
|
-
case "ThrottlingException":
|
|
1116
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1117
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1118
|
-
default:
|
|
1119
|
-
const parsedBody = parsedOutput.body;
|
|
1120
|
-
return throwDefaultError({
|
|
1121
|
-
output,
|
|
1122
|
-
parsedBody,
|
|
1123
|
-
errorCode,
|
|
1124
|
-
});
|
|
1125
|
-
}
|
|
1126
|
-
};
|
|
1127
|
-
const de_ListRuleGroupsNamespacesCommand = async (output, context) => {
|
|
1128
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1129
|
-
return de_ListRuleGroupsNamespacesCommandError(output, context);
|
|
1130
|
-
}
|
|
1131
|
-
const contents = (0, smithy_client_1.map)({
|
|
1132
|
-
$metadata: deserializeMetadata(output),
|
|
1133
|
-
});
|
|
1134
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1135
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1136
|
-
nextToken: smithy_client_1.expectString,
|
|
1137
|
-
ruleGroupsNamespaces: (_) => de_RuleGroupsNamespaceSummaryList(_, context),
|
|
1138
|
-
});
|
|
1139
|
-
Object.assign(contents, doc);
|
|
1140
|
-
return contents;
|
|
1141
|
-
};
|
|
1142
|
-
exports.de_ListRuleGroupsNamespacesCommand = de_ListRuleGroupsNamespacesCommand;
|
|
1143
|
-
const de_ListRuleGroupsNamespacesCommandError = async (output, context) => {
|
|
1144
|
-
const parsedOutput = {
|
|
1145
|
-
...output,
|
|
1146
|
-
body: await parseErrorBody(output.body, context),
|
|
1147
|
-
};
|
|
1148
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1149
|
-
switch (errorCode) {
|
|
1150
|
-
case "AccessDeniedException":
|
|
1151
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1152
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1153
|
-
case "InternalServerException":
|
|
1154
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1155
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1156
|
-
case "ResourceNotFoundException":
|
|
1157
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1158
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1159
|
-
case "ThrottlingException":
|
|
1160
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1161
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1162
|
-
case "ValidationException":
|
|
1163
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1164
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1165
|
-
default:
|
|
1166
|
-
const parsedBody = parsedOutput.body;
|
|
1167
|
-
return throwDefaultError({
|
|
1168
|
-
output,
|
|
1169
|
-
parsedBody,
|
|
1170
|
-
errorCode,
|
|
1171
|
-
});
|
|
1172
|
-
}
|
|
1173
|
-
};
|
|
1174
|
-
const de_ListScrapersCommand = async (output, context) => {
|
|
1175
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1176
|
-
return de_ListScrapersCommandError(output, context);
|
|
1177
|
-
}
|
|
1178
|
-
const contents = (0, smithy_client_1.map)({
|
|
1179
|
-
$metadata: deserializeMetadata(output),
|
|
1180
|
-
});
|
|
1181
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1182
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1183
|
-
nextToken: smithy_client_1.expectString,
|
|
1184
|
-
scrapers: (_) => de_ScraperSummaryList(_, context),
|
|
1185
|
-
});
|
|
1186
|
-
Object.assign(contents, doc);
|
|
1187
|
-
return contents;
|
|
1188
|
-
};
|
|
1189
|
-
exports.de_ListScrapersCommand = de_ListScrapersCommand;
|
|
1190
|
-
const de_ListScrapersCommandError = async (output, context) => {
|
|
1191
|
-
const parsedOutput = {
|
|
1192
|
-
...output,
|
|
1193
|
-
body: await parseErrorBody(output.body, context),
|
|
1194
|
-
};
|
|
1195
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1196
|
-
switch (errorCode) {
|
|
1197
|
-
case "AccessDeniedException":
|
|
1198
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1199
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1200
|
-
case "InternalServerException":
|
|
1201
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1202
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1203
|
-
case "ThrottlingException":
|
|
1204
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1205
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1206
|
-
case "ValidationException":
|
|
1207
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1208
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1209
|
-
default:
|
|
1210
|
-
const parsedBody = parsedOutput.body;
|
|
1211
|
-
return throwDefaultError({
|
|
1212
|
-
output,
|
|
1213
|
-
parsedBody,
|
|
1214
|
-
errorCode,
|
|
1215
|
-
});
|
|
1216
|
-
}
|
|
1217
|
-
};
|
|
1218
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1219
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1220
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
1221
|
-
}
|
|
1222
|
-
const contents = (0, smithy_client_1.map)({
|
|
1223
|
-
$metadata: deserializeMetadata(output),
|
|
1224
|
-
});
|
|
1225
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1226
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1227
|
-
tags: smithy_client_1._json,
|
|
1228
|
-
});
|
|
1229
|
-
Object.assign(contents, doc);
|
|
1230
|
-
return contents;
|
|
1231
|
-
};
|
|
1232
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
1233
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1234
|
-
const parsedOutput = {
|
|
1235
|
-
...output,
|
|
1236
|
-
body: await parseErrorBody(output.body, context),
|
|
1237
|
-
};
|
|
1238
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1239
|
-
switch (errorCode) {
|
|
1240
|
-
case "AccessDeniedException":
|
|
1241
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1242
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1243
|
-
case "InternalServerException":
|
|
1244
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1245
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1246
|
-
case "ResourceNotFoundException":
|
|
1247
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1248
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1249
|
-
case "ThrottlingException":
|
|
1250
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1251
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1252
|
-
case "ValidationException":
|
|
1253
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1254
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1255
|
-
default:
|
|
1256
|
-
const parsedBody = parsedOutput.body;
|
|
1257
|
-
return throwDefaultError({
|
|
1258
|
-
output,
|
|
1259
|
-
parsedBody,
|
|
1260
|
-
errorCode,
|
|
1261
|
-
});
|
|
1262
|
-
}
|
|
1263
|
-
};
|
|
1264
|
-
const de_ListWorkspacesCommand = async (output, context) => {
|
|
1265
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1266
|
-
return de_ListWorkspacesCommandError(output, context);
|
|
1267
|
-
}
|
|
1268
|
-
const contents = (0, smithy_client_1.map)({
|
|
1269
|
-
$metadata: deserializeMetadata(output),
|
|
1270
|
-
});
|
|
1271
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1272
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1273
|
-
nextToken: smithy_client_1.expectString,
|
|
1274
|
-
workspaces: (_) => de_WorkspaceSummaryList(_, context),
|
|
1275
|
-
});
|
|
1276
|
-
Object.assign(contents, doc);
|
|
1277
|
-
return contents;
|
|
1278
|
-
};
|
|
1279
|
-
exports.de_ListWorkspacesCommand = de_ListWorkspacesCommand;
|
|
1280
|
-
const de_ListWorkspacesCommandError = async (output, context) => {
|
|
1281
|
-
const parsedOutput = {
|
|
1282
|
-
...output,
|
|
1283
|
-
body: await parseErrorBody(output.body, context),
|
|
1284
|
-
};
|
|
1285
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1286
|
-
switch (errorCode) {
|
|
1287
|
-
case "AccessDeniedException":
|
|
1288
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1289
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1290
|
-
case "InternalServerException":
|
|
1291
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1292
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1293
|
-
case "ThrottlingException":
|
|
1294
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1295
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1296
|
-
case "ValidationException":
|
|
1297
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1298
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1299
|
-
default:
|
|
1300
|
-
const parsedBody = parsedOutput.body;
|
|
1301
|
-
return throwDefaultError({
|
|
1302
|
-
output,
|
|
1303
|
-
parsedBody,
|
|
1304
|
-
errorCode,
|
|
1305
|
-
});
|
|
1306
|
-
}
|
|
1307
|
-
};
|
|
1308
|
-
const de_PutAlertManagerDefinitionCommand = async (output, context) => {
|
|
1309
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1310
|
-
return de_PutAlertManagerDefinitionCommandError(output, context);
|
|
1311
|
-
}
|
|
1312
|
-
const contents = (0, smithy_client_1.map)({
|
|
1313
|
-
$metadata: deserializeMetadata(output),
|
|
1314
|
-
});
|
|
1315
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1316
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1317
|
-
status: smithy_client_1._json,
|
|
1318
|
-
});
|
|
1319
|
-
Object.assign(contents, doc);
|
|
1320
|
-
return contents;
|
|
1321
|
-
};
|
|
1322
|
-
exports.de_PutAlertManagerDefinitionCommand = de_PutAlertManagerDefinitionCommand;
|
|
1323
|
-
const de_PutAlertManagerDefinitionCommandError = async (output, context) => {
|
|
1324
|
-
const parsedOutput = {
|
|
1325
|
-
...output,
|
|
1326
|
-
body: await parseErrorBody(output.body, context),
|
|
1327
|
-
};
|
|
1328
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1329
|
-
switch (errorCode) {
|
|
1330
|
-
case "AccessDeniedException":
|
|
1331
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1332
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1333
|
-
case "ConflictException":
|
|
1334
|
-
case "com.amazonaws.amp#ConflictException":
|
|
1335
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1336
|
-
case "InternalServerException":
|
|
1337
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1338
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1339
|
-
case "ResourceNotFoundException":
|
|
1340
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1341
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1342
|
-
case "ServiceQuotaExceededException":
|
|
1343
|
-
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
1344
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1345
|
-
case "ThrottlingException":
|
|
1346
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1347
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1348
|
-
case "ValidationException":
|
|
1349
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1350
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1351
|
-
default:
|
|
1352
|
-
const parsedBody = parsedOutput.body;
|
|
1353
|
-
return throwDefaultError({
|
|
1354
|
-
output,
|
|
1355
|
-
parsedBody,
|
|
1356
|
-
errorCode,
|
|
1357
|
-
});
|
|
1358
|
-
}
|
|
1359
|
-
};
|
|
1360
|
-
const de_PutRuleGroupsNamespaceCommand = async (output, context) => {
|
|
1361
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1362
|
-
return de_PutRuleGroupsNamespaceCommandError(output, context);
|
|
1363
|
-
}
|
|
1364
|
-
const contents = (0, smithy_client_1.map)({
|
|
1365
|
-
$metadata: deserializeMetadata(output),
|
|
1366
|
-
});
|
|
1367
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1368
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1369
|
-
arn: smithy_client_1.expectString,
|
|
1370
|
-
name: smithy_client_1.expectString,
|
|
1371
|
-
status: smithy_client_1._json,
|
|
1372
|
-
tags: smithy_client_1._json,
|
|
1373
|
-
});
|
|
1374
|
-
Object.assign(contents, doc);
|
|
1375
|
-
return contents;
|
|
1376
|
-
};
|
|
1377
|
-
exports.de_PutRuleGroupsNamespaceCommand = de_PutRuleGroupsNamespaceCommand;
|
|
1378
|
-
const de_PutRuleGroupsNamespaceCommandError = async (output, context) => {
|
|
1379
|
-
const parsedOutput = {
|
|
1380
|
-
...output,
|
|
1381
|
-
body: await parseErrorBody(output.body, context),
|
|
1382
|
-
};
|
|
1383
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1384
|
-
switch (errorCode) {
|
|
1385
|
-
case "AccessDeniedException":
|
|
1386
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1387
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1388
|
-
case "ConflictException":
|
|
1389
|
-
case "com.amazonaws.amp#ConflictException":
|
|
1390
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1391
|
-
case "InternalServerException":
|
|
1392
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1393
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1394
|
-
case "ResourceNotFoundException":
|
|
1395
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1396
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1397
|
-
case "ServiceQuotaExceededException":
|
|
1398
|
-
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
1399
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1400
|
-
case "ThrottlingException":
|
|
1401
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1402
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1403
|
-
case "ValidationException":
|
|
1404
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1405
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1406
|
-
default:
|
|
1407
|
-
const parsedBody = parsedOutput.body;
|
|
1408
|
-
return throwDefaultError({
|
|
1409
|
-
output,
|
|
1410
|
-
parsedBody,
|
|
1411
|
-
errorCode,
|
|
1412
|
-
});
|
|
1413
|
-
}
|
|
1414
|
-
};
|
|
1415
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
1416
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1417
|
-
return de_TagResourceCommandError(output, context);
|
|
1418
|
-
}
|
|
1419
|
-
const contents = (0, smithy_client_1.map)({
|
|
1420
|
-
$metadata: deserializeMetadata(output),
|
|
1421
|
-
});
|
|
1422
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1423
|
-
return contents;
|
|
1424
|
-
};
|
|
1425
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1426
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1427
|
-
const parsedOutput = {
|
|
1428
|
-
...output,
|
|
1429
|
-
body: await parseErrorBody(output.body, context),
|
|
1430
|
-
};
|
|
1431
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1432
|
-
switch (errorCode) {
|
|
1433
|
-
case "AccessDeniedException":
|
|
1434
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1435
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1436
|
-
case "InternalServerException":
|
|
1437
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1438
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1439
|
-
case "ResourceNotFoundException":
|
|
1440
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1441
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1442
|
-
case "ThrottlingException":
|
|
1443
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1444
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1445
|
-
case "ValidationException":
|
|
1446
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1447
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1448
|
-
default:
|
|
1449
|
-
const parsedBody = parsedOutput.body;
|
|
1450
|
-
return throwDefaultError({
|
|
1451
|
-
output,
|
|
1452
|
-
parsedBody,
|
|
1453
|
-
errorCode,
|
|
1454
|
-
});
|
|
1455
|
-
}
|
|
1456
|
-
};
|
|
1457
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
1458
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1459
|
-
return de_UntagResourceCommandError(output, context);
|
|
1460
|
-
}
|
|
1461
|
-
const contents = (0, smithy_client_1.map)({
|
|
1462
|
-
$metadata: deserializeMetadata(output),
|
|
1463
|
-
});
|
|
1464
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1465
|
-
return contents;
|
|
1466
|
-
};
|
|
1467
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1468
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1469
|
-
const parsedOutput = {
|
|
1470
|
-
...output,
|
|
1471
|
-
body: await parseErrorBody(output.body, context),
|
|
1472
|
-
};
|
|
1473
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1474
|
-
switch (errorCode) {
|
|
1475
|
-
case "AccessDeniedException":
|
|
1476
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1477
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1478
|
-
case "InternalServerException":
|
|
1479
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1480
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1481
|
-
case "ResourceNotFoundException":
|
|
1482
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1483
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1484
|
-
case "ThrottlingException":
|
|
1485
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1486
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1487
|
-
case "ValidationException":
|
|
1488
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1489
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1490
|
-
default:
|
|
1491
|
-
const parsedBody = parsedOutput.body;
|
|
1492
|
-
return throwDefaultError({
|
|
1493
|
-
output,
|
|
1494
|
-
parsedBody,
|
|
1495
|
-
errorCode,
|
|
1496
|
-
});
|
|
1497
|
-
}
|
|
1498
|
-
};
|
|
1499
|
-
const de_UpdateLoggingConfigurationCommand = async (output, context) => {
|
|
1500
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1501
|
-
return de_UpdateLoggingConfigurationCommandError(output, context);
|
|
1502
|
-
}
|
|
1503
|
-
const contents = (0, smithy_client_1.map)({
|
|
1504
|
-
$metadata: deserializeMetadata(output),
|
|
1505
|
-
});
|
|
1506
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1507
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1508
|
-
status: smithy_client_1._json,
|
|
1509
|
-
});
|
|
1510
|
-
Object.assign(contents, doc);
|
|
1511
|
-
return contents;
|
|
1512
|
-
};
|
|
1513
|
-
exports.de_UpdateLoggingConfigurationCommand = de_UpdateLoggingConfigurationCommand;
|
|
1514
|
-
const de_UpdateLoggingConfigurationCommandError = async (output, context) => {
|
|
1515
|
-
const parsedOutput = {
|
|
1516
|
-
...output,
|
|
1517
|
-
body: await parseErrorBody(output.body, context),
|
|
1518
|
-
};
|
|
1519
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1520
|
-
switch (errorCode) {
|
|
1521
|
-
case "AccessDeniedException":
|
|
1522
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1523
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1524
|
-
case "ConflictException":
|
|
1525
|
-
case "com.amazonaws.amp#ConflictException":
|
|
1526
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1527
|
-
case "InternalServerException":
|
|
1528
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1529
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1530
|
-
case "ResourceNotFoundException":
|
|
1531
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1532
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1533
|
-
case "ValidationException":
|
|
1534
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1535
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1536
|
-
default:
|
|
1537
|
-
const parsedBody = parsedOutput.body;
|
|
1538
|
-
return throwDefaultError({
|
|
1539
|
-
output,
|
|
1540
|
-
parsedBody,
|
|
1541
|
-
errorCode,
|
|
1542
|
-
});
|
|
1543
|
-
}
|
|
1544
|
-
};
|
|
1545
|
-
const de_UpdateWorkspaceAliasCommand = async (output, context) => {
|
|
1546
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1547
|
-
return de_UpdateWorkspaceAliasCommandError(output, context);
|
|
1548
|
-
}
|
|
1549
|
-
const contents = (0, smithy_client_1.map)({
|
|
1550
|
-
$metadata: deserializeMetadata(output),
|
|
1551
|
-
});
|
|
1552
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1553
|
-
return contents;
|
|
1554
|
-
};
|
|
1555
|
-
exports.de_UpdateWorkspaceAliasCommand = de_UpdateWorkspaceAliasCommand;
|
|
1556
|
-
const de_UpdateWorkspaceAliasCommandError = async (output, context) => {
|
|
1557
|
-
const parsedOutput = {
|
|
1558
|
-
...output,
|
|
1559
|
-
body: await parseErrorBody(output.body, context),
|
|
1560
|
-
};
|
|
1561
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1562
|
-
switch (errorCode) {
|
|
1563
|
-
case "AccessDeniedException":
|
|
1564
|
-
case "com.amazonaws.amp#AccessDeniedException":
|
|
1565
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1566
|
-
case "ConflictException":
|
|
1567
|
-
case "com.amazonaws.amp#ConflictException":
|
|
1568
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1569
|
-
case "InternalServerException":
|
|
1570
|
-
case "com.amazonaws.amp#InternalServerException":
|
|
1571
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1572
|
-
case "ResourceNotFoundException":
|
|
1573
|
-
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1574
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1575
|
-
case "ServiceQuotaExceededException":
|
|
1576
|
-
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
1577
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1578
|
-
case "ThrottlingException":
|
|
1579
|
-
case "com.amazonaws.amp#ThrottlingException":
|
|
1580
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1581
|
-
case "ValidationException":
|
|
1582
|
-
case "com.amazonaws.amp#ValidationException":
|
|
1583
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1584
|
-
default:
|
|
1585
|
-
const parsedBody = parsedOutput.body;
|
|
1586
|
-
return throwDefaultError({
|
|
1587
|
-
output,
|
|
1588
|
-
parsedBody,
|
|
1589
|
-
errorCode,
|
|
1590
|
-
});
|
|
1591
|
-
}
|
|
1592
|
-
};
|
|
1593
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(AmpServiceException_1.AmpServiceException);
|
|
1594
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1595
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1596
|
-
const data = parsedOutput.body;
|
|
1597
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1598
|
-
message: smithy_client_1.expectString,
|
|
1599
|
-
});
|
|
1600
|
-
Object.assign(contents, doc);
|
|
1601
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1602
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1603
|
-
...contents,
|
|
1604
|
-
});
|
|
1605
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1606
|
-
};
|
|
1607
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1608
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1609
|
-
const data = parsedOutput.body;
|
|
1610
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1611
|
-
message: smithy_client_1.expectString,
|
|
1612
|
-
resourceId: smithy_client_1.expectString,
|
|
1613
|
-
resourceType: smithy_client_1.expectString,
|
|
1614
|
-
});
|
|
1615
|
-
Object.assign(contents, doc);
|
|
1616
|
-
const exception = new models_0_1.ConflictException({
|
|
1617
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1618
|
-
...contents,
|
|
1619
|
-
});
|
|
1620
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1621
|
-
};
|
|
1622
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1623
|
-
const contents = (0, smithy_client_1.map)({
|
|
1624
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
|
|
1625
|
-
});
|
|
1626
|
-
const data = parsedOutput.body;
|
|
1627
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1628
|
-
message: smithy_client_1.expectString,
|
|
1629
|
-
});
|
|
1630
|
-
Object.assign(contents, doc);
|
|
1631
|
-
const exception = new models_0_1.InternalServerException({
|
|
1632
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1633
|
-
...contents,
|
|
1634
|
-
});
|
|
1635
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1636
|
-
};
|
|
1637
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1638
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1639
|
-
const data = parsedOutput.body;
|
|
1640
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1641
|
-
message: smithy_client_1.expectString,
|
|
1642
|
-
resourceId: smithy_client_1.expectString,
|
|
1643
|
-
resourceType: smithy_client_1.expectString,
|
|
1644
|
-
});
|
|
1645
|
-
Object.assign(contents, doc);
|
|
1646
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1647
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1648
|
-
...contents,
|
|
1649
|
-
});
|
|
1650
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1651
|
-
};
|
|
1652
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1653
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1654
|
-
const data = parsedOutput.body;
|
|
1655
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1656
|
-
message: smithy_client_1.expectString,
|
|
1657
|
-
quotaCode: smithy_client_1.expectString,
|
|
1658
|
-
resourceId: smithy_client_1.expectString,
|
|
1659
|
-
resourceType: smithy_client_1.expectString,
|
|
1660
|
-
serviceCode: smithy_client_1.expectString,
|
|
1661
|
-
});
|
|
1662
|
-
Object.assign(contents, doc);
|
|
1663
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1664
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1665
|
-
...contents,
|
|
1666
|
-
});
|
|
1667
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1668
|
-
};
|
|
1669
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1670
|
-
const contents = (0, smithy_client_1.map)({
|
|
1671
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
|
|
1672
|
-
});
|
|
1673
|
-
const data = parsedOutput.body;
|
|
1674
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1675
|
-
message: smithy_client_1.expectString,
|
|
1676
|
-
quotaCode: smithy_client_1.expectString,
|
|
1677
|
-
serviceCode: smithy_client_1.expectString,
|
|
1678
|
-
});
|
|
1679
|
-
Object.assign(contents, doc);
|
|
1680
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1681
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1682
|
-
...contents,
|
|
1683
|
-
});
|
|
1684
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1685
|
-
};
|
|
1686
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1687
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1688
|
-
const data = parsedOutput.body;
|
|
1689
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1690
|
-
fieldList: smithy_client_1._json,
|
|
1691
|
-
message: smithy_client_1.expectString,
|
|
1692
|
-
reason: smithy_client_1.expectString,
|
|
1693
|
-
});
|
|
1694
|
-
Object.assign(contents, doc);
|
|
1695
|
-
const exception = new models_0_1.ValidationException({
|
|
1696
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1697
|
-
...contents,
|
|
1698
|
-
});
|
|
1699
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1700
|
-
};
|
|
1701
|
-
const se_ScrapeConfiguration = (input, context) => {
|
|
1702
|
-
return models_0_1.ScrapeConfiguration.visit(input, {
|
|
1703
|
-
configurationBlob: (value) => ({ configurationBlob: context.base64Encoder(value) }),
|
|
1704
|
-
_: (name, value) => ({ name: value }),
|
|
1705
|
-
});
|
|
1706
|
-
};
|
|
1707
|
-
const de_AlertManagerDefinitionDescription = (output, context) => {
|
|
1708
|
-
return (0, smithy_client_1.take)(output, {
|
|
1709
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1710
|
-
data: context.base64Decoder,
|
|
1711
|
-
modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1712
|
-
status: smithy_client_1._json,
|
|
1713
|
-
});
|
|
1714
|
-
};
|
|
1715
|
-
const de_LoggingConfigurationMetadata = (output, context) => {
|
|
1716
|
-
return (0, smithy_client_1.take)(output, {
|
|
1717
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1718
|
-
logGroupArn: smithy_client_1.expectString,
|
|
1719
|
-
modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1720
|
-
status: smithy_client_1._json,
|
|
1721
|
-
workspace: smithy_client_1.expectString,
|
|
1722
|
-
});
|
|
1723
|
-
};
|
|
1724
|
-
const de_RuleGroupsNamespaceDescription = (output, context) => {
|
|
1725
|
-
return (0, smithy_client_1.take)(output, {
|
|
1726
|
-
arn: smithy_client_1.expectString,
|
|
1727
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1728
|
-
data: context.base64Decoder,
|
|
1729
|
-
modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1730
|
-
name: smithy_client_1.expectString,
|
|
1731
|
-
status: smithy_client_1._json,
|
|
1732
|
-
tags: smithy_client_1._json,
|
|
1733
|
-
});
|
|
1734
|
-
};
|
|
1735
|
-
const de_RuleGroupsNamespaceSummary = (output, context) => {
|
|
1736
|
-
return (0, smithy_client_1.take)(output, {
|
|
1737
|
-
arn: smithy_client_1.expectString,
|
|
1738
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1739
|
-
modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1740
|
-
name: smithy_client_1.expectString,
|
|
1741
|
-
status: smithy_client_1._json,
|
|
1742
|
-
tags: smithy_client_1._json,
|
|
1743
|
-
});
|
|
1744
|
-
};
|
|
1745
|
-
const de_RuleGroupsNamespaceSummaryList = (output, context) => {
|
|
1746
|
-
const retVal = (output || [])
|
|
1747
|
-
.filter((e) => e != null)
|
|
1748
|
-
.map((entry) => {
|
|
1749
|
-
return de_RuleGroupsNamespaceSummary(entry, context);
|
|
1750
|
-
});
|
|
1751
|
-
return retVal;
|
|
1752
|
-
};
|
|
1753
|
-
const de_ScrapeConfiguration = (output, context) => {
|
|
1754
|
-
if (output.configurationBlob != null) {
|
|
1755
|
-
return {
|
|
1756
|
-
configurationBlob: context.base64Decoder(output.configurationBlob),
|
|
1757
|
-
};
|
|
1758
|
-
}
|
|
1759
|
-
return { $unknown: Object.entries(output)[0] };
|
|
1760
|
-
};
|
|
1761
|
-
const de_ScraperDescription = (output, context) => {
|
|
1762
|
-
return (0, smithy_client_1.take)(output, {
|
|
1763
|
-
alias: smithy_client_1.expectString,
|
|
1764
|
-
arn: smithy_client_1.expectString,
|
|
1765
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1766
|
-
destination: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
1767
|
-
lastModifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1768
|
-
roleArn: smithy_client_1.expectString,
|
|
1769
|
-
scrapeConfiguration: (_) => de_ScrapeConfiguration((0, core_1.awsExpectUnion)(_), context),
|
|
1770
|
-
scraperId: smithy_client_1.expectString,
|
|
1771
|
-
source: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
1772
|
-
status: smithy_client_1._json,
|
|
1773
|
-
statusReason: smithy_client_1.expectString,
|
|
1774
|
-
tags: smithy_client_1._json,
|
|
1775
|
-
});
|
|
1776
|
-
};
|
|
1777
|
-
const de_ScraperSummary = (output, context) => {
|
|
1778
|
-
return (0, smithy_client_1.take)(output, {
|
|
1779
|
-
alias: smithy_client_1.expectString,
|
|
1780
|
-
arn: smithy_client_1.expectString,
|
|
1781
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1782
|
-
destination: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
1783
|
-
lastModifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1784
|
-
roleArn: smithy_client_1.expectString,
|
|
1785
|
-
scraperId: smithy_client_1.expectString,
|
|
1786
|
-
source: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
1787
|
-
status: smithy_client_1._json,
|
|
1788
|
-
statusReason: smithy_client_1.expectString,
|
|
1789
|
-
tags: smithy_client_1._json,
|
|
1790
|
-
});
|
|
1791
|
-
};
|
|
1792
|
-
const de_ScraperSummaryList = (output, context) => {
|
|
1793
|
-
const retVal = (output || [])
|
|
1794
|
-
.filter((e) => e != null)
|
|
1795
|
-
.map((entry) => {
|
|
1796
|
-
return de_ScraperSummary(entry, context);
|
|
1797
|
-
});
|
|
1798
|
-
return retVal;
|
|
1799
|
-
};
|
|
1800
|
-
const de_WorkspaceDescription = (output, context) => {
|
|
1801
|
-
return (0, smithy_client_1.take)(output, {
|
|
1802
|
-
alias: smithy_client_1.expectString,
|
|
1803
|
-
arn: smithy_client_1.expectString,
|
|
1804
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1805
|
-
kmsKeyArn: smithy_client_1.expectString,
|
|
1806
|
-
prometheusEndpoint: smithy_client_1.expectString,
|
|
1807
|
-
status: smithy_client_1._json,
|
|
1808
|
-
tags: smithy_client_1._json,
|
|
1809
|
-
workspaceId: smithy_client_1.expectString,
|
|
1810
|
-
});
|
|
1811
|
-
};
|
|
1812
|
-
const de_WorkspaceSummary = (output, context) => {
|
|
1813
|
-
return (0, smithy_client_1.take)(output, {
|
|
1814
|
-
alias: smithy_client_1.expectString,
|
|
1815
|
-
arn: smithy_client_1.expectString,
|
|
1816
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1817
|
-
kmsKeyArn: smithy_client_1.expectString,
|
|
1818
|
-
status: smithy_client_1._json,
|
|
1819
|
-
tags: smithy_client_1._json,
|
|
1820
|
-
workspaceId: smithy_client_1.expectString,
|
|
1821
|
-
});
|
|
1822
|
-
};
|
|
1823
|
-
const de_WorkspaceSummaryList = (output, context) => {
|
|
1824
|
-
const retVal = (output || [])
|
|
1825
|
-
.filter((e) => e != null)
|
|
1826
|
-
.map((entry) => {
|
|
1827
|
-
return de_WorkspaceSummary(entry, context);
|
|
1828
|
-
});
|
|
1829
|
-
return retVal;
|
|
1830
|
-
};
|
|
1831
|
-
const deserializeMetadata = (output) => ({
|
|
1832
|
-
httpStatusCode: output.statusCode,
|
|
1833
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1834
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1835
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1836
|
-
});
|
|
1837
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1838
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1839
|
-
value !== null &&
|
|
1840
|
-
value !== "" &&
|
|
1841
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1842
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1843
|
-
const _a = "alias";
|
|
1844
|
-
const _cT = "clientToken";
|
|
1845
|
-
const _mR = "maxResults";
|
|
1846
|
-
const _n = "name";
|
|
1847
|
-
const _nT = "nextToken";
|
|
1848
|
-
const _rAS = "retryAfterSeconds";
|
|
1849
|
-
const _ra = "retry-after";
|
|
1850
|
-
const _tK = "tagKeys";
|
|
1851
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1852
|
-
if (encoded.length) {
|
|
1853
|
-
return JSON.parse(encoded);
|
|
1854
|
-
}
|
|
1855
|
-
return {};
|
|
1856
|
-
});
|
|
1857
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1858
|
-
const value = await parseBody(errorBody, context);
|
|
1859
|
-
value.message = value.message ?? value.Message;
|
|
1860
|
-
return value;
|
|
1861
|
-
};
|
|
1862
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1863
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1864
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1865
|
-
let cleanValue = rawValue;
|
|
1866
|
-
if (typeof cleanValue === "number") {
|
|
1867
|
-
cleanValue = cleanValue.toString();
|
|
1868
|
-
}
|
|
1869
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1870
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1871
|
-
}
|
|
1872
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1873
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1874
|
-
}
|
|
1875
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1876
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1877
|
-
}
|
|
1878
|
-
return cleanValue;
|
|
1879
|
-
};
|
|
1880
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1881
|
-
if (headerKey !== undefined) {
|
|
1882
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1883
|
-
}
|
|
1884
|
-
if (data.code !== undefined) {
|
|
1885
|
-
return sanitizeErrorCode(data.code);
|
|
1886
|
-
}
|
|
1887
|
-
if (data["__type"] !== undefined) {
|
|
1888
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1889
|
-
}
|
|
1890
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|