@aws-sdk/client-grafana 3.181.0 → 3.183.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/CHANGELOG.md +8 -0
- package/dist-es/Grafana.js +66 -73
- package/dist-es/GrafanaClient.js +22 -28
- package/dist-es/commands/AssociateLicenseCommand.js +21 -28
- package/dist-es/commands/CreateWorkspaceApiKeyCommand.js +21 -28
- package/dist-es/commands/CreateWorkspaceCommand.js +21 -28
- package/dist-es/commands/DeleteWorkspaceApiKeyCommand.js +21 -28
- package/dist-es/commands/DeleteWorkspaceCommand.js +21 -28
- package/dist-es/commands/DescribeWorkspaceAuthenticationCommand.js +21 -28
- package/dist-es/commands/DescribeWorkspaceCommand.js +21 -28
- package/dist-es/commands/DisassociateLicenseCommand.js +21 -28
- package/dist-es/commands/ListPermissionsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ListWorkspacesCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdatePermissionsCommand.js +21 -28
- package/dist-es/commands/UpdateWorkspaceAuthenticationCommand.js +21 -28
- package/dist-es/commands/UpdateWorkspaceCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/GrafanaServiceException.js +5 -10
- package/dist-es/models/models_0.js +265 -144
- package/dist-es/pagination/ListPermissionsPaginator.js +25 -68
- package/dist-es/pagination/ListWorkspacesPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1351 -1839
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,1825 +1,1354 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
4
|
import { GrafanaServiceException as __BaseException } from "../models/GrafanaServiceException";
|
|
6
5
|
import { AccessDeniedException, ConflictException, IdpMetadata, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
method: "POST",
|
|
24
|
-
headers: headers,
|
|
25
|
-
path: resolvedPath,
|
|
26
|
-
body: body,
|
|
27
|
-
})];
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}); };
|
|
31
|
-
export var serializeAws_restJson1CreateWorkspaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
32
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
33
|
-
var _c;
|
|
34
|
-
return __generator(this, function (_d) {
|
|
35
|
-
switch (_d.label) {
|
|
36
|
-
case 0: return [4, context.endpoint()];
|
|
37
|
-
case 1:
|
|
38
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
39
|
-
headers = {
|
|
40
|
-
"content-type": "application/json",
|
|
41
|
-
};
|
|
42
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces";
|
|
43
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.accountAccessType != null && { accountAccessType: input.accountAccessType })), (input.authenticationProviders != null && {
|
|
44
|
-
authenticationProviders: serializeAws_restJson1AuthenticationProviders(input.authenticationProviders, context),
|
|
45
|
-
})), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.organizationRoleName != null && { organizationRoleName: input.organizationRoleName })), (input.permissionType != null && { permissionType: input.permissionType })), (input.stackSetName != null && { stackSetName: input.stackSetName })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })), (input.workspaceDataSources != null && {
|
|
46
|
-
workspaceDataSources: serializeAws_restJson1DataSourceTypesList(input.workspaceDataSources, context),
|
|
47
|
-
})), (input.workspaceDescription != null && { workspaceDescription: input.workspaceDescription })), (input.workspaceName != null && { workspaceName: input.workspaceName })), (input.workspaceNotificationDestinations != null && {
|
|
48
|
-
workspaceNotificationDestinations: serializeAws_restJson1NotificationDestinationsList(input.workspaceNotificationDestinations, context),
|
|
49
|
-
})), (input.workspaceOrganizationalUnits != null && {
|
|
50
|
-
workspaceOrganizationalUnits: serializeAws_restJson1OrganizationalUnitList(input.workspaceOrganizationalUnits, context),
|
|
51
|
-
})), (input.workspaceRoleArn != null && { workspaceRoleArn: input.workspaceRoleArn })));
|
|
52
|
-
return [2, new __HttpRequest({
|
|
53
|
-
protocol: protocol,
|
|
54
|
-
hostname: hostname,
|
|
55
|
-
port: port,
|
|
56
|
-
method: "POST",
|
|
57
|
-
headers: headers,
|
|
58
|
-
path: resolvedPath,
|
|
59
|
-
body: body,
|
|
60
|
-
})];
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}); };
|
|
64
|
-
export var serializeAws_restJson1CreateWorkspaceApiKeyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
66
|
-
return __generator(this, function (_c) {
|
|
67
|
-
switch (_c.label) {
|
|
68
|
-
case 0: return [4, context.endpoint()];
|
|
69
|
-
case 1:
|
|
70
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
71
|
-
headers = {
|
|
72
|
-
"content-type": "application/json",
|
|
73
|
-
};
|
|
74
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces/{workspaceId}/apikeys";
|
|
75
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
76
|
-
body = JSON.stringify(__assign(__assign(__assign({}, (input.keyName != null && { keyName: input.keyName })), (input.keyRole != null && { keyRole: input.keyRole })), (input.secondsToLive != null && { secondsToLive: input.secondsToLive })));
|
|
77
|
-
return [2, new __HttpRequest({
|
|
78
|
-
protocol: protocol,
|
|
79
|
-
hostname: hostname,
|
|
80
|
-
port: port,
|
|
81
|
-
method: "POST",
|
|
82
|
-
headers: headers,
|
|
83
|
-
path: resolvedPath,
|
|
84
|
-
body: body,
|
|
85
|
-
})];
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}); };
|
|
89
|
-
export var serializeAws_restJson1DeleteWorkspaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
90
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
91
|
-
return __generator(this, function (_c) {
|
|
92
|
-
switch (_c.label) {
|
|
93
|
-
case 0: return [4, context.endpoint()];
|
|
94
|
-
case 1:
|
|
95
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
96
|
-
headers = {};
|
|
97
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces/{workspaceId}";
|
|
98
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
99
|
-
return [2, new __HttpRequest({
|
|
100
|
-
protocol: protocol,
|
|
101
|
-
hostname: hostname,
|
|
102
|
-
port: port,
|
|
103
|
-
method: "DELETE",
|
|
104
|
-
headers: headers,
|
|
105
|
-
path: resolvedPath,
|
|
106
|
-
body: body,
|
|
107
|
-
})];
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}); };
|
|
111
|
-
export var serializeAws_restJson1DeleteWorkspaceApiKeyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
112
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
113
|
-
return __generator(this, function (_c) {
|
|
114
|
-
switch (_c.label) {
|
|
115
|
-
case 0: return [4, context.endpoint()];
|
|
116
|
-
case 1:
|
|
117
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
118
|
-
headers = {};
|
|
119
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
120
|
-
"/workspaces/{workspaceId}/apikeys/{keyName}";
|
|
121
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "keyName", function () { return input.keyName; }, "{keyName}", false);
|
|
122
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
123
|
-
return [2, new __HttpRequest({
|
|
124
|
-
protocol: protocol,
|
|
125
|
-
hostname: hostname,
|
|
126
|
-
port: port,
|
|
127
|
-
method: "DELETE",
|
|
128
|
-
headers: headers,
|
|
129
|
-
path: resolvedPath,
|
|
130
|
-
body: body,
|
|
131
|
-
})];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}); };
|
|
135
|
-
export var serializeAws_restJson1DescribeWorkspaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
136
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
137
|
-
return __generator(this, function (_c) {
|
|
138
|
-
switch (_c.label) {
|
|
139
|
-
case 0: return [4, context.endpoint()];
|
|
140
|
-
case 1:
|
|
141
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
142
|
-
headers = {};
|
|
143
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces/{workspaceId}";
|
|
144
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
145
|
-
return [2, new __HttpRequest({
|
|
146
|
-
protocol: protocol,
|
|
147
|
-
hostname: hostname,
|
|
148
|
-
port: port,
|
|
149
|
-
method: "GET",
|
|
150
|
-
headers: headers,
|
|
151
|
-
path: resolvedPath,
|
|
152
|
-
body: body,
|
|
153
|
-
})];
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
}); };
|
|
157
|
-
export var serializeAws_restJson1DescribeWorkspaceAuthenticationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
158
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
159
|
-
return __generator(this, function (_c) {
|
|
160
|
-
switch (_c.label) {
|
|
161
|
-
case 0: return [4, context.endpoint()];
|
|
162
|
-
case 1:
|
|
163
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
164
|
-
headers = {};
|
|
165
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces/{workspaceId}/authentication";
|
|
166
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
167
|
-
return [2, new __HttpRequest({
|
|
168
|
-
protocol: protocol,
|
|
169
|
-
hostname: hostname,
|
|
170
|
-
port: port,
|
|
171
|
-
method: "GET",
|
|
172
|
-
headers: headers,
|
|
173
|
-
path: resolvedPath,
|
|
174
|
-
body: body,
|
|
175
|
-
})];
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}); };
|
|
179
|
-
export var serializeAws_restJson1DisassociateLicenseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
180
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
181
|
-
return __generator(this, function (_c) {
|
|
182
|
-
switch (_c.label) {
|
|
183
|
-
case 0: return [4, context.endpoint()];
|
|
184
|
-
case 1:
|
|
185
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
186
|
-
headers = {};
|
|
187
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
188
|
-
"/workspaces/{workspaceId}/licenses/{licenseType}";
|
|
189
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", function () { return input.workspaceId; }, "{workspaceId}", false);
|
|
190
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "licenseType", function () { return input.licenseType; }, "{licenseType}", false);
|
|
191
|
-
return [2, new __HttpRequest({
|
|
192
|
-
protocol: protocol,
|
|
193
|
-
hostname: hostname,
|
|
194
|
-
port: port,
|
|
195
|
-
method: "DELETE",
|
|
196
|
-
headers: headers,
|
|
197
|
-
path: resolvedPath,
|
|
198
|
-
body: body,
|
|
199
|
-
})];
|
|
200
|
-
}
|
|
6
|
+
export const serializeAws_restJson1AssociateLicenseCommand = async (input, context) => {
|
|
7
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
|
+
const headers = {};
|
|
9
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
10
|
+
"/workspaces/{workspaceId}/licenses/{licenseType}";
|
|
11
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
12
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "licenseType", () => input.licenseType, "{licenseType}", false);
|
|
13
|
+
let body;
|
|
14
|
+
return new __HttpRequest({
|
|
15
|
+
protocol,
|
|
16
|
+
hostname,
|
|
17
|
+
port,
|
|
18
|
+
method: "POST",
|
|
19
|
+
headers,
|
|
20
|
+
path: resolvedPath,
|
|
21
|
+
body,
|
|
201
22
|
});
|
|
202
|
-
}
|
|
203
|
-
export
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
242
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
243
|
-
return [2, new __HttpRequest({
|
|
244
|
-
protocol: protocol,
|
|
245
|
-
hostname: hostname,
|
|
246
|
-
port: port,
|
|
247
|
-
method: "GET",
|
|
248
|
-
headers: headers,
|
|
249
|
-
path: resolvedPath,
|
|
250
|
-
body: body,
|
|
251
|
-
})];
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
}); };
|
|
255
|
-
export var serializeAws_restJson1ListWorkspacesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
256
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
257
|
-
return __generator(this, function (_c) {
|
|
258
|
-
switch (_c.label) {
|
|
259
|
-
case 0: return [4, context.endpoint()];
|
|
260
|
-
case 1:
|
|
261
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
262
|
-
headers = {};
|
|
263
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/workspaces";
|
|
264
|
-
query = map({
|
|
265
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
266
|
-
nextToken: [, input.nextToken],
|
|
267
|
-
});
|
|
268
|
-
return [2, new __HttpRequest({
|
|
269
|
-
protocol: protocol,
|
|
270
|
-
hostname: hostname,
|
|
271
|
-
port: port,
|
|
272
|
-
method: "GET",
|
|
273
|
-
headers: headers,
|
|
274
|
-
path: resolvedPath,
|
|
275
|
-
query: query,
|
|
276
|
-
body: body,
|
|
277
|
-
})];
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
}); };
|
|
281
|
-
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
282
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
283
|
-
return __generator(this, function (_c) {
|
|
284
|
-
switch (_c.label) {
|
|
285
|
-
case 0: return [4, context.endpoint()];
|
|
286
|
-
case 1:
|
|
287
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
288
|
-
headers = {
|
|
289
|
-
"content-type": "application/json",
|
|
290
|
-
};
|
|
291
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
292
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
293
|
-
body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
294
|
-
return [2, new __HttpRequest({
|
|
295
|
-
protocol: protocol,
|
|
296
|
-
hostname: hostname,
|
|
297
|
-
port: port,
|
|
298
|
-
method: "POST",
|
|
299
|
-
headers: headers,
|
|
300
|
-
path: resolvedPath,
|
|
301
|
-
body: body,
|
|
302
|
-
})];
|
|
303
|
-
}
|
|
23
|
+
};
|
|
24
|
+
export const serializeAws_restJson1CreateWorkspaceCommand = async (input, context) => {
|
|
25
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
26
|
+
const headers = {
|
|
27
|
+
"content-type": "application/json",
|
|
28
|
+
};
|
|
29
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
|
|
30
|
+
let body;
|
|
31
|
+
body = JSON.stringify({
|
|
32
|
+
...(input.accountAccessType != null && { accountAccessType: input.accountAccessType }),
|
|
33
|
+
...(input.authenticationProviders != null && {
|
|
34
|
+
authenticationProviders: serializeAws_restJson1AuthenticationProviders(input.authenticationProviders, context),
|
|
35
|
+
}),
|
|
36
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
37
|
+
...(input.organizationRoleName != null && { organizationRoleName: input.organizationRoleName }),
|
|
38
|
+
...(input.permissionType != null && { permissionType: input.permissionType }),
|
|
39
|
+
...(input.stackSetName != null && { stackSetName: input.stackSetName }),
|
|
40
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
41
|
+
...(input.workspaceDataSources != null && {
|
|
42
|
+
workspaceDataSources: serializeAws_restJson1DataSourceTypesList(input.workspaceDataSources, context),
|
|
43
|
+
}),
|
|
44
|
+
...(input.workspaceDescription != null && { workspaceDescription: input.workspaceDescription }),
|
|
45
|
+
...(input.workspaceName != null && { workspaceName: input.workspaceName }),
|
|
46
|
+
...(input.workspaceNotificationDestinations != null && {
|
|
47
|
+
workspaceNotificationDestinations: serializeAws_restJson1NotificationDestinationsList(input.workspaceNotificationDestinations, context),
|
|
48
|
+
}),
|
|
49
|
+
...(input.workspaceOrganizationalUnits != null && {
|
|
50
|
+
workspaceOrganizationalUnits: serializeAws_restJson1OrganizationalUnitList(input.workspaceOrganizationalUnits, context),
|
|
51
|
+
}),
|
|
52
|
+
...(input.workspaceRoleArn != null && { workspaceRoleArn: input.workspaceRoleArn }),
|
|
53
|
+
});
|
|
54
|
+
return new __HttpRequest({
|
|
55
|
+
protocol,
|
|
56
|
+
hostname,
|
|
57
|
+
port,
|
|
58
|
+
method: "POST",
|
|
59
|
+
headers,
|
|
60
|
+
path: resolvedPath,
|
|
61
|
+
body,
|
|
304
62
|
});
|
|
305
|
-
}
|
|
306
|
-
export
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
body: body,
|
|
328
|
-
})];
|
|
329
|
-
}
|
|
63
|
+
};
|
|
64
|
+
export const serializeAws_restJson1CreateWorkspaceApiKeyCommand = async (input, context) => {
|
|
65
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
66
|
+
const headers = {
|
|
67
|
+
"content-type": "application/json",
|
|
68
|
+
};
|
|
69
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/apikeys";
|
|
70
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
71
|
+
let body;
|
|
72
|
+
body = JSON.stringify({
|
|
73
|
+
...(input.keyName != null && { keyName: input.keyName }),
|
|
74
|
+
...(input.keyRole != null && { keyRole: input.keyRole }),
|
|
75
|
+
...(input.secondsToLive != null && { secondsToLive: input.secondsToLive }),
|
|
76
|
+
});
|
|
77
|
+
return new __HttpRequest({
|
|
78
|
+
protocol,
|
|
79
|
+
hostname,
|
|
80
|
+
port,
|
|
81
|
+
method: "POST",
|
|
82
|
+
headers,
|
|
83
|
+
path: resolvedPath,
|
|
84
|
+
body,
|
|
330
85
|
});
|
|
331
|
-
}
|
|
332
|
-
export
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
})));
|
|
347
|
-
return [2, new __HttpRequest({
|
|
348
|
-
protocol: protocol,
|
|
349
|
-
hostname: hostname,
|
|
350
|
-
port: port,
|
|
351
|
-
method: "PATCH",
|
|
352
|
-
headers: headers,
|
|
353
|
-
path: resolvedPath,
|
|
354
|
-
body: body,
|
|
355
|
-
})];
|
|
356
|
-
}
|
|
86
|
+
};
|
|
87
|
+
export const serializeAws_restJson1DeleteWorkspaceCommand = async (input, context) => {
|
|
88
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
89
|
+
const headers = {};
|
|
90
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
|
|
91
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
92
|
+
let body;
|
|
93
|
+
return new __HttpRequest({
|
|
94
|
+
protocol,
|
|
95
|
+
hostname,
|
|
96
|
+
port,
|
|
97
|
+
method: "DELETE",
|
|
98
|
+
headers,
|
|
99
|
+
path: resolvedPath,
|
|
100
|
+
body,
|
|
357
101
|
});
|
|
358
|
-
}
|
|
359
|
-
export
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
})), (input.workspaceOrganizationalUnits != null && {
|
|
376
|
-
workspaceOrganizationalUnits: serializeAws_restJson1OrganizationalUnitList(input.workspaceOrganizationalUnits, context),
|
|
377
|
-
})), (input.workspaceRoleArn != null && { workspaceRoleArn: input.workspaceRoleArn })));
|
|
378
|
-
return [2, new __HttpRequest({
|
|
379
|
-
protocol: protocol,
|
|
380
|
-
hostname: hostname,
|
|
381
|
-
port: port,
|
|
382
|
-
method: "PUT",
|
|
383
|
-
headers: headers,
|
|
384
|
-
path: resolvedPath,
|
|
385
|
-
body: body,
|
|
386
|
-
})];
|
|
387
|
-
}
|
|
102
|
+
};
|
|
103
|
+
export const serializeAws_restJson1DeleteWorkspaceApiKeyCommand = async (input, context) => {
|
|
104
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
105
|
+
const headers = {};
|
|
106
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
107
|
+
"/workspaces/{workspaceId}/apikeys/{keyName}";
|
|
108
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "keyName", () => input.keyName, "{keyName}", false);
|
|
109
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
110
|
+
let body;
|
|
111
|
+
return new __HttpRequest({
|
|
112
|
+
protocol,
|
|
113
|
+
hostname,
|
|
114
|
+
port,
|
|
115
|
+
method: "DELETE",
|
|
116
|
+
headers,
|
|
117
|
+
path: resolvedPath,
|
|
118
|
+
body,
|
|
388
119
|
});
|
|
389
|
-
}
|
|
390
|
-
export
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
})), (input.samlConfiguration != null && {
|
|
405
|
-
samlConfiguration: serializeAws_restJson1SamlConfiguration(input.samlConfiguration, context),
|
|
406
|
-
})));
|
|
407
|
-
return [2, new __HttpRequest({
|
|
408
|
-
protocol: protocol,
|
|
409
|
-
hostname: hostname,
|
|
410
|
-
port: port,
|
|
411
|
-
method: "POST",
|
|
412
|
-
headers: headers,
|
|
413
|
-
path: resolvedPath,
|
|
414
|
-
body: body,
|
|
415
|
-
})];
|
|
416
|
-
}
|
|
120
|
+
};
|
|
121
|
+
export const serializeAws_restJson1DescribeWorkspaceCommand = async (input, context) => {
|
|
122
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
123
|
+
const headers = {};
|
|
124
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
|
|
125
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
126
|
+
let body;
|
|
127
|
+
return new __HttpRequest({
|
|
128
|
+
protocol,
|
|
129
|
+
hostname,
|
|
130
|
+
port,
|
|
131
|
+
method: "GET",
|
|
132
|
+
headers,
|
|
133
|
+
path: resolvedPath,
|
|
134
|
+
body,
|
|
417
135
|
});
|
|
418
|
-
}
|
|
419
|
-
export
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
case 1:
|
|
434
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
435
|
-
if (data.workspace != null) {
|
|
436
|
-
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
|
|
437
|
-
}
|
|
438
|
-
return [2, contents];
|
|
439
|
-
}
|
|
136
|
+
};
|
|
137
|
+
export const serializeAws_restJson1DescribeWorkspaceAuthenticationCommand = async (input, context) => {
|
|
138
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
139
|
+
const headers = {};
|
|
140
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/authentication";
|
|
141
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
142
|
+
let body;
|
|
143
|
+
return new __HttpRequest({
|
|
144
|
+
protocol,
|
|
145
|
+
hostname,
|
|
146
|
+
port,
|
|
147
|
+
method: "GET",
|
|
148
|
+
headers,
|
|
149
|
+
path: resolvedPath,
|
|
150
|
+
body,
|
|
440
151
|
});
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
case "InternalServerException": return [3, 4];
|
|
459
|
-
case "com.amazonaws.grafana#InternalServerException": return [3, 4];
|
|
460
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
461
|
-
case "com.amazonaws.grafana#ResourceNotFoundException": return [3, 6];
|
|
462
|
-
case "ThrottlingException": return [3, 8];
|
|
463
|
-
case "com.amazonaws.grafana#ThrottlingException": return [3, 8];
|
|
464
|
-
case "ValidationException": return [3, 10];
|
|
465
|
-
case "com.amazonaws.grafana#ValidationException": return [3, 10];
|
|
466
|
-
}
|
|
467
|
-
return [3, 12];
|
|
468
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
469
|
-
case 3: throw _d.sent();
|
|
470
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
471
|
-
case 5: throw _d.sent();
|
|
472
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
473
|
-
case 7: throw _d.sent();
|
|
474
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
475
|
-
case 9: throw _d.sent();
|
|
476
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
477
|
-
case 11: throw _d.sent();
|
|
478
|
-
case 12:
|
|
479
|
-
parsedBody = parsedOutput.body;
|
|
480
|
-
throwDefaultError({
|
|
481
|
-
output: output,
|
|
482
|
-
parsedBody: parsedBody,
|
|
483
|
-
exceptionCtor: __BaseException,
|
|
484
|
-
errorCode: errorCode,
|
|
485
|
-
});
|
|
486
|
-
_d.label = 13;
|
|
487
|
-
case 13: return [2];
|
|
488
|
-
}
|
|
152
|
+
};
|
|
153
|
+
export const serializeAws_restJson1DisassociateLicenseCommand = async (input, context) => {
|
|
154
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
155
|
+
const headers = {};
|
|
156
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
157
|
+
"/workspaces/{workspaceId}/licenses/{licenseType}";
|
|
158
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
159
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "licenseType", () => input.licenseType, "{licenseType}", false);
|
|
160
|
+
let body;
|
|
161
|
+
return new __HttpRequest({
|
|
162
|
+
protocol,
|
|
163
|
+
hostname,
|
|
164
|
+
port,
|
|
165
|
+
method: "DELETE",
|
|
166
|
+
headers,
|
|
167
|
+
path: resolvedPath,
|
|
168
|
+
body,
|
|
489
169
|
});
|
|
490
|
-
}
|
|
491
|
-
export
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
170
|
+
};
|
|
171
|
+
export const serializeAws_restJson1ListPermissionsCommand = async (input, context) => {
|
|
172
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
173
|
+
const headers = {};
|
|
174
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/permissions";
|
|
175
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
176
|
+
const query = map({
|
|
177
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
178
|
+
nextToken: [, input.nextToken],
|
|
179
|
+
userType: [, input.userType],
|
|
180
|
+
userId: [, input.userId],
|
|
181
|
+
groupId: [, input.groupId],
|
|
182
|
+
});
|
|
183
|
+
let body;
|
|
184
|
+
return new __HttpRequest({
|
|
185
|
+
protocol,
|
|
186
|
+
hostname,
|
|
187
|
+
port,
|
|
188
|
+
method: "GET",
|
|
189
|
+
headers,
|
|
190
|
+
path: resolvedPath,
|
|
191
|
+
query,
|
|
192
|
+
body,
|
|
512
193
|
});
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
case "AccessDeniedException": return [3, 2];
|
|
529
|
-
case "com.amazonaws.grafana#AccessDeniedException": return [3, 2];
|
|
530
|
-
case "ConflictException": return [3, 4];
|
|
531
|
-
case "com.amazonaws.grafana#ConflictException": return [3, 4];
|
|
532
|
-
case "InternalServerException": return [3, 6];
|
|
533
|
-
case "com.amazonaws.grafana#InternalServerException": return [3, 6];
|
|
534
|
-
case "ServiceQuotaExceededException": return [3, 8];
|
|
535
|
-
case "com.amazonaws.grafana#ServiceQuotaExceededException": return [3, 8];
|
|
536
|
-
case "ThrottlingException": return [3, 10];
|
|
537
|
-
case "com.amazonaws.grafana#ThrottlingException": return [3, 10];
|
|
538
|
-
case "ValidationException": return [3, 12];
|
|
539
|
-
case "com.amazonaws.grafana#ValidationException": return [3, 12];
|
|
540
|
-
}
|
|
541
|
-
return [3, 14];
|
|
542
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
543
|
-
case 3: throw _d.sent();
|
|
544
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
545
|
-
case 5: throw _d.sent();
|
|
546
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
547
|
-
case 7: throw _d.sent();
|
|
548
|
-
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
549
|
-
case 9: throw _d.sent();
|
|
550
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
551
|
-
case 11: throw _d.sent();
|
|
552
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
553
|
-
case 13: throw _d.sent();
|
|
554
|
-
case 14:
|
|
555
|
-
parsedBody = parsedOutput.body;
|
|
556
|
-
throwDefaultError({
|
|
557
|
-
output: output,
|
|
558
|
-
parsedBody: parsedBody,
|
|
559
|
-
exceptionCtor: __BaseException,
|
|
560
|
-
errorCode: errorCode,
|
|
561
|
-
});
|
|
562
|
-
_d.label = 15;
|
|
563
|
-
case 15: return [2];
|
|
564
|
-
}
|
|
194
|
+
};
|
|
195
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
196
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
197
|
+
const headers = {};
|
|
198
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
199
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
200
|
+
let body;
|
|
201
|
+
return new __HttpRequest({
|
|
202
|
+
protocol,
|
|
203
|
+
hostname,
|
|
204
|
+
port,
|
|
205
|
+
method: "GET",
|
|
206
|
+
headers,
|
|
207
|
+
path: resolvedPath,
|
|
208
|
+
body,
|
|
565
209
|
});
|
|
566
|
-
}
|
|
567
|
-
export
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
}
|
|
586
|
-
if (data.keyName != null) {
|
|
587
|
-
contents.keyName = __expectString(data.keyName);
|
|
588
|
-
}
|
|
589
|
-
if (data.workspaceId != null) {
|
|
590
|
-
contents.workspaceId = __expectString(data.workspaceId);
|
|
591
|
-
}
|
|
592
|
-
return [2, contents];
|
|
593
|
-
}
|
|
210
|
+
};
|
|
211
|
+
export const serializeAws_restJson1ListWorkspacesCommand = async (input, context) => {
|
|
212
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
213
|
+
const headers = {};
|
|
214
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
|
|
215
|
+
const query = map({
|
|
216
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
217
|
+
nextToken: [, input.nextToken],
|
|
218
|
+
});
|
|
219
|
+
let body;
|
|
220
|
+
return new __HttpRequest({
|
|
221
|
+
protocol,
|
|
222
|
+
hostname,
|
|
223
|
+
port,
|
|
224
|
+
method: "GET",
|
|
225
|
+
headers,
|
|
226
|
+
path: resolvedPath,
|
|
227
|
+
query,
|
|
228
|
+
body,
|
|
594
229
|
});
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
case "com.amazonaws.grafana#InternalServerException": return [3, 6];
|
|
616
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
617
|
-
case "com.amazonaws.grafana#ResourceNotFoundException": return [3, 8];
|
|
618
|
-
case "ServiceQuotaExceededException": return [3, 10];
|
|
619
|
-
case "com.amazonaws.grafana#ServiceQuotaExceededException": return [3, 10];
|
|
620
|
-
case "ThrottlingException": return [3, 12];
|
|
621
|
-
case "com.amazonaws.grafana#ThrottlingException": return [3, 12];
|
|
622
|
-
case "ValidationException": return [3, 14];
|
|
623
|
-
case "com.amazonaws.grafana#ValidationException": return [3, 14];
|
|
624
|
-
}
|
|
625
|
-
return [3, 16];
|
|
626
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
627
|
-
case 3: throw _d.sent();
|
|
628
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
629
|
-
case 5: throw _d.sent();
|
|
630
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
631
|
-
case 7: throw _d.sent();
|
|
632
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
633
|
-
case 9: throw _d.sent();
|
|
634
|
-
case 10: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
635
|
-
case 11: throw _d.sent();
|
|
636
|
-
case 12: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
637
|
-
case 13: throw _d.sent();
|
|
638
|
-
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
639
|
-
case 15: throw _d.sent();
|
|
640
|
-
case 16:
|
|
641
|
-
parsedBody = parsedOutput.body;
|
|
642
|
-
throwDefaultError({
|
|
643
|
-
output: output,
|
|
644
|
-
parsedBody: parsedBody,
|
|
645
|
-
exceptionCtor: __BaseException,
|
|
646
|
-
errorCode: errorCode,
|
|
647
|
-
});
|
|
648
|
-
_d.label = 17;
|
|
649
|
-
case 17: return [2];
|
|
650
|
-
}
|
|
230
|
+
};
|
|
231
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
232
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
233
|
+
const headers = {
|
|
234
|
+
"content-type": "application/json",
|
|
235
|
+
};
|
|
236
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
237
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
238
|
+
let body;
|
|
239
|
+
body = JSON.stringify({
|
|
240
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
241
|
+
});
|
|
242
|
+
return new __HttpRequest({
|
|
243
|
+
protocol,
|
|
244
|
+
hostname,
|
|
245
|
+
port,
|
|
246
|
+
method: "POST",
|
|
247
|
+
headers,
|
|
248
|
+
path: resolvedPath,
|
|
249
|
+
body,
|
|
651
250
|
});
|
|
652
|
-
}
|
|
653
|
-
export
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
}
|
|
672
|
-
return [2, contents];
|
|
673
|
-
}
|
|
251
|
+
};
|
|
252
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
253
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
254
|
+
const headers = {};
|
|
255
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
256
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
257
|
+
const query = map({
|
|
258
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
259
|
+
});
|
|
260
|
+
let body;
|
|
261
|
+
return new __HttpRequest({
|
|
262
|
+
protocol,
|
|
263
|
+
hostname,
|
|
264
|
+
port,
|
|
265
|
+
method: "DELETE",
|
|
266
|
+
headers,
|
|
267
|
+
path: resolvedPath,
|
|
268
|
+
query,
|
|
269
|
+
body,
|
|
674
270
|
});
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
case "com.amazonaws.grafana#ResourceNotFoundException": return [3, 8];
|
|
698
|
-
case "ThrottlingException": return [3, 10];
|
|
699
|
-
case "com.amazonaws.grafana#ThrottlingException": return [3, 10];
|
|
700
|
-
case "ValidationException": return [3, 12];
|
|
701
|
-
case "com.amazonaws.grafana#ValidationException": return [3, 12];
|
|
702
|
-
}
|
|
703
|
-
return [3, 14];
|
|
704
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
705
|
-
case 3: throw _d.sent();
|
|
706
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
707
|
-
case 5: throw _d.sent();
|
|
708
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
709
|
-
case 7: throw _d.sent();
|
|
710
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
711
|
-
case 9: throw _d.sent();
|
|
712
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
713
|
-
case 11: throw _d.sent();
|
|
714
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
715
|
-
case 13: throw _d.sent();
|
|
716
|
-
case 14:
|
|
717
|
-
parsedBody = parsedOutput.body;
|
|
718
|
-
throwDefaultError({
|
|
719
|
-
output: output,
|
|
720
|
-
parsedBody: parsedBody,
|
|
721
|
-
exceptionCtor: __BaseException,
|
|
722
|
-
errorCode: errorCode,
|
|
723
|
-
});
|
|
724
|
-
_d.label = 15;
|
|
725
|
-
case 15: return [2];
|
|
726
|
-
}
|
|
271
|
+
};
|
|
272
|
+
export const serializeAws_restJson1UpdatePermissionsCommand = async (input, context) => {
|
|
273
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
274
|
+
const headers = {
|
|
275
|
+
"content-type": "application/json",
|
|
276
|
+
};
|
|
277
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/permissions";
|
|
278
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
279
|
+
let body;
|
|
280
|
+
body = JSON.stringify({
|
|
281
|
+
...(input.updateInstructionBatch != null && {
|
|
282
|
+
updateInstructionBatch: serializeAws_restJson1UpdateInstructionBatch(input.updateInstructionBatch, context),
|
|
283
|
+
}),
|
|
284
|
+
});
|
|
285
|
+
return new __HttpRequest({
|
|
286
|
+
protocol,
|
|
287
|
+
hostname,
|
|
288
|
+
port,
|
|
289
|
+
method: "PATCH",
|
|
290
|
+
headers,
|
|
291
|
+
path: resolvedPath,
|
|
292
|
+
body,
|
|
727
293
|
});
|
|
728
|
-
}
|
|
729
|
-
export
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
}
|
|
294
|
+
};
|
|
295
|
+
export const serializeAws_restJson1UpdateWorkspaceCommand = async (input, context) => {
|
|
296
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
297
|
+
const headers = {
|
|
298
|
+
"content-type": "application/json",
|
|
299
|
+
};
|
|
300
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
|
|
301
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
302
|
+
let body;
|
|
303
|
+
body = JSON.stringify({
|
|
304
|
+
...(input.accountAccessType != null && { accountAccessType: input.accountAccessType }),
|
|
305
|
+
...(input.organizationRoleName != null && { organizationRoleName: input.organizationRoleName }),
|
|
306
|
+
...(input.permissionType != null && { permissionType: input.permissionType }),
|
|
307
|
+
...(input.stackSetName != null && { stackSetName: input.stackSetName }),
|
|
308
|
+
...(input.workspaceDataSources != null && {
|
|
309
|
+
workspaceDataSources: serializeAws_restJson1DataSourceTypesList(input.workspaceDataSources, context),
|
|
310
|
+
}),
|
|
311
|
+
...(input.workspaceDescription != null && { workspaceDescription: input.workspaceDescription }),
|
|
312
|
+
...(input.workspaceName != null && { workspaceName: input.workspaceName }),
|
|
313
|
+
...(input.workspaceNotificationDestinations != null && {
|
|
314
|
+
workspaceNotificationDestinations: serializeAws_restJson1NotificationDestinationsList(input.workspaceNotificationDestinations, context),
|
|
315
|
+
}),
|
|
316
|
+
...(input.workspaceOrganizationalUnits != null && {
|
|
317
|
+
workspaceOrganizationalUnits: serializeAws_restJson1OrganizationalUnitList(input.workspaceOrganizationalUnits, context),
|
|
318
|
+
}),
|
|
319
|
+
...(input.workspaceRoleArn != null && { workspaceRoleArn: input.workspaceRoleArn }),
|
|
320
|
+
});
|
|
321
|
+
return new __HttpRequest({
|
|
322
|
+
protocol,
|
|
323
|
+
hostname,
|
|
324
|
+
port,
|
|
325
|
+
method: "PUT",
|
|
326
|
+
headers,
|
|
327
|
+
path: resolvedPath,
|
|
328
|
+
body,
|
|
753
329
|
});
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
case "ValidationException": return [3, 12];
|
|
780
|
-
case "com.amazonaws.grafana#ValidationException": return [3, 12];
|
|
781
|
-
}
|
|
782
|
-
return [3, 14];
|
|
783
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
784
|
-
case 3: throw _d.sent();
|
|
785
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
786
|
-
case 5: throw _d.sent();
|
|
787
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
788
|
-
case 7: throw _d.sent();
|
|
789
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
790
|
-
case 9: throw _d.sent();
|
|
791
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
792
|
-
case 11: throw _d.sent();
|
|
793
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
794
|
-
case 13: throw _d.sent();
|
|
795
|
-
case 14:
|
|
796
|
-
parsedBody = parsedOutput.body;
|
|
797
|
-
throwDefaultError({
|
|
798
|
-
output: output,
|
|
799
|
-
parsedBody: parsedBody,
|
|
800
|
-
exceptionCtor: __BaseException,
|
|
801
|
-
errorCode: errorCode,
|
|
802
|
-
});
|
|
803
|
-
_d.label = 15;
|
|
804
|
-
case 15: return [2];
|
|
805
|
-
}
|
|
330
|
+
};
|
|
331
|
+
export const serializeAws_restJson1UpdateWorkspaceAuthenticationCommand = async (input, context) => {
|
|
332
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
333
|
+
const headers = {
|
|
334
|
+
"content-type": "application/json",
|
|
335
|
+
};
|
|
336
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/authentication";
|
|
337
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
|
|
338
|
+
let body;
|
|
339
|
+
body = JSON.stringify({
|
|
340
|
+
...(input.authenticationProviders != null && {
|
|
341
|
+
authenticationProviders: serializeAws_restJson1AuthenticationProviders(input.authenticationProviders, context),
|
|
342
|
+
}),
|
|
343
|
+
...(input.samlConfiguration != null && {
|
|
344
|
+
samlConfiguration: serializeAws_restJson1SamlConfiguration(input.samlConfiguration, context),
|
|
345
|
+
}),
|
|
346
|
+
});
|
|
347
|
+
return new __HttpRequest({
|
|
348
|
+
protocol,
|
|
349
|
+
hostname,
|
|
350
|
+
port,
|
|
351
|
+
method: "POST",
|
|
352
|
+
headers,
|
|
353
|
+
path: resolvedPath,
|
|
354
|
+
body,
|
|
806
355
|
});
|
|
807
|
-
}
|
|
808
|
-
export
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
return [2, deserializeAws_restJson1DescribeWorkspaceCommandError(output, context)];
|
|
815
|
-
}
|
|
816
|
-
contents = map({
|
|
817
|
-
$metadata: deserializeMetadata(output),
|
|
818
|
-
});
|
|
819
|
-
_a = __expectNonNull;
|
|
820
|
-
_b = __expectObject;
|
|
821
|
-
return [4, parseBody(output.body, context)];
|
|
822
|
-
case 1:
|
|
823
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
824
|
-
if (data.workspace != null) {
|
|
825
|
-
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
|
|
826
|
-
}
|
|
827
|
-
return [2, contents];
|
|
828
|
-
}
|
|
356
|
+
};
|
|
357
|
+
export const deserializeAws_restJson1AssociateLicenseCommand = async (output, context) => {
|
|
358
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
359
|
+
return deserializeAws_restJson1AssociateLicenseCommandError(output, context);
|
|
360
|
+
}
|
|
361
|
+
const contents = map({
|
|
362
|
+
$metadata: deserializeMetadata(output),
|
|
829
363
|
});
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
return
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
});
|
|
875
|
-
_d.label = 13;
|
|
876
|
-
case 13: return [2];
|
|
877
|
-
}
|
|
364
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
365
|
+
if (data.workspace != null) {
|
|
366
|
+
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
|
|
367
|
+
}
|
|
368
|
+
return contents;
|
|
369
|
+
};
|
|
370
|
+
const deserializeAws_restJson1AssociateLicenseCommandError = async (output, context) => {
|
|
371
|
+
const parsedOutput = {
|
|
372
|
+
...output,
|
|
373
|
+
body: await parseErrorBody(output.body, context),
|
|
374
|
+
};
|
|
375
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
376
|
+
switch (errorCode) {
|
|
377
|
+
case "AccessDeniedException":
|
|
378
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
379
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
380
|
+
case "InternalServerException":
|
|
381
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
382
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
383
|
+
case "ResourceNotFoundException":
|
|
384
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
385
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
386
|
+
case "ThrottlingException":
|
|
387
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
388
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
389
|
+
case "ValidationException":
|
|
390
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
391
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
392
|
+
default:
|
|
393
|
+
const parsedBody = parsedOutput.body;
|
|
394
|
+
throwDefaultError({
|
|
395
|
+
output,
|
|
396
|
+
parsedBody,
|
|
397
|
+
exceptionCtor: __BaseException,
|
|
398
|
+
errorCode,
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
export const deserializeAws_restJson1CreateWorkspaceCommand = async (output, context) => {
|
|
403
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
404
|
+
return deserializeAws_restJson1CreateWorkspaceCommandError(output, context);
|
|
405
|
+
}
|
|
406
|
+
const contents = map({
|
|
407
|
+
$metadata: deserializeMetadata(output),
|
|
878
408
|
});
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
409
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
410
|
+
if (data.workspace != null) {
|
|
411
|
+
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
|
|
412
|
+
}
|
|
413
|
+
return contents;
|
|
414
|
+
};
|
|
415
|
+
const deserializeAws_restJson1CreateWorkspaceCommandError = async (output, context) => {
|
|
416
|
+
const parsedOutput = {
|
|
417
|
+
...output,
|
|
418
|
+
body: await parseErrorBody(output.body, context),
|
|
419
|
+
};
|
|
420
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
421
|
+
switch (errorCode) {
|
|
422
|
+
case "AccessDeniedException":
|
|
423
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
424
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
425
|
+
case "ConflictException":
|
|
426
|
+
case "com.amazonaws.grafana#ConflictException":
|
|
427
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
428
|
+
case "InternalServerException":
|
|
429
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
430
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
431
|
+
case "ServiceQuotaExceededException":
|
|
432
|
+
case "com.amazonaws.grafana#ServiceQuotaExceededException":
|
|
433
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
434
|
+
case "ThrottlingException":
|
|
435
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
436
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
437
|
+
case "ValidationException":
|
|
438
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
439
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
440
|
+
default:
|
|
441
|
+
const parsedBody = parsedOutput.body;
|
|
442
|
+
throwDefaultError({
|
|
443
|
+
output,
|
|
444
|
+
parsedBody,
|
|
445
|
+
exceptionCtor: __BaseException,
|
|
446
|
+
errorCode,
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
export const deserializeAws_restJson1CreateWorkspaceApiKeyCommand = async (output, context) => {
|
|
451
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
452
|
+
return deserializeAws_restJson1CreateWorkspaceApiKeyCommandError(output, context);
|
|
453
|
+
}
|
|
454
|
+
const contents = map({
|
|
455
|
+
$metadata: deserializeMetadata(output),
|
|
901
456
|
});
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
457
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
458
|
+
if (data.key != null) {
|
|
459
|
+
contents.key = __expectString(data.key);
|
|
460
|
+
}
|
|
461
|
+
if (data.keyName != null) {
|
|
462
|
+
contents.keyName = __expectString(data.keyName);
|
|
463
|
+
}
|
|
464
|
+
if (data.workspaceId != null) {
|
|
465
|
+
contents.workspaceId = __expectString(data.workspaceId);
|
|
466
|
+
}
|
|
467
|
+
return contents;
|
|
468
|
+
};
|
|
469
|
+
const deserializeAws_restJson1CreateWorkspaceApiKeyCommandError = async (output, context) => {
|
|
470
|
+
const parsedOutput = {
|
|
471
|
+
...output,
|
|
472
|
+
body: await parseErrorBody(output.body, context),
|
|
473
|
+
};
|
|
474
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
475
|
+
switch (errorCode) {
|
|
476
|
+
case "AccessDeniedException":
|
|
477
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
478
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
479
|
+
case "ConflictException":
|
|
480
|
+
case "com.amazonaws.grafana#ConflictException":
|
|
481
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
482
|
+
case "InternalServerException":
|
|
483
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
484
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
485
|
+
case "ResourceNotFoundException":
|
|
486
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
487
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
488
|
+
case "ServiceQuotaExceededException":
|
|
489
|
+
case "com.amazonaws.grafana#ServiceQuotaExceededException":
|
|
490
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
491
|
+
case "ThrottlingException":
|
|
492
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
493
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
494
|
+
case "ValidationException":
|
|
495
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
496
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
497
|
+
default:
|
|
498
|
+
const parsedBody = parsedOutput.body;
|
|
499
|
+
throwDefaultError({
|
|
500
|
+
output,
|
|
501
|
+
parsedBody,
|
|
502
|
+
exceptionCtor: __BaseException,
|
|
503
|
+
errorCode,
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
export const deserializeAws_restJson1DeleteWorkspaceCommand = async (output, context) => {
|
|
508
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
509
|
+
return deserializeAws_restJson1DeleteWorkspaceCommandError(output, context);
|
|
510
|
+
}
|
|
511
|
+
const contents = map({
|
|
512
|
+
$metadata: deserializeMetadata(output),
|
|
950
513
|
});
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
514
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
515
|
+
if (data.workspace != null) {
|
|
516
|
+
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
|
|
517
|
+
}
|
|
518
|
+
return contents;
|
|
519
|
+
};
|
|
520
|
+
const deserializeAws_restJson1DeleteWorkspaceCommandError = async (output, context) => {
|
|
521
|
+
const parsedOutput = {
|
|
522
|
+
...output,
|
|
523
|
+
body: await parseErrorBody(output.body, context),
|
|
524
|
+
};
|
|
525
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
526
|
+
switch (errorCode) {
|
|
527
|
+
case "AccessDeniedException":
|
|
528
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
529
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
530
|
+
case "ConflictException":
|
|
531
|
+
case "com.amazonaws.grafana#ConflictException":
|
|
532
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
533
|
+
case "InternalServerException":
|
|
534
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
535
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
536
|
+
case "ResourceNotFoundException":
|
|
537
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
538
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
539
|
+
case "ThrottlingException":
|
|
540
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
541
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
542
|
+
case "ValidationException":
|
|
543
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
544
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
545
|
+
default:
|
|
546
|
+
const parsedBody = parsedOutput.body;
|
|
547
|
+
throwDefaultError({
|
|
548
|
+
output,
|
|
549
|
+
parsedBody,
|
|
550
|
+
exceptionCtor: __BaseException,
|
|
551
|
+
errorCode,
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
export const deserializeAws_restJson1DeleteWorkspaceApiKeyCommand = async (output, context) => {
|
|
556
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
557
|
+
return deserializeAws_restJson1DeleteWorkspaceApiKeyCommandError(output, context);
|
|
558
|
+
}
|
|
559
|
+
const contents = map({
|
|
560
|
+
$metadata: deserializeMetadata(output),
|
|
973
561
|
});
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
parsedBody
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
562
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
563
|
+
if (data.keyName != null) {
|
|
564
|
+
contents.keyName = __expectString(data.keyName);
|
|
565
|
+
}
|
|
566
|
+
if (data.workspaceId != null) {
|
|
567
|
+
contents.workspaceId = __expectString(data.workspaceId);
|
|
568
|
+
}
|
|
569
|
+
return contents;
|
|
570
|
+
};
|
|
571
|
+
const deserializeAws_restJson1DeleteWorkspaceApiKeyCommandError = async (output, context) => {
|
|
572
|
+
const parsedOutput = {
|
|
573
|
+
...output,
|
|
574
|
+
body: await parseErrorBody(output.body, context),
|
|
575
|
+
};
|
|
576
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
577
|
+
switch (errorCode) {
|
|
578
|
+
case "AccessDeniedException":
|
|
579
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
580
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
581
|
+
case "ConflictException":
|
|
582
|
+
case "com.amazonaws.grafana#ConflictException":
|
|
583
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
584
|
+
case "InternalServerException":
|
|
585
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
586
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
587
|
+
case "ResourceNotFoundException":
|
|
588
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
589
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
590
|
+
case "ThrottlingException":
|
|
591
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
592
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
593
|
+
case "ValidationException":
|
|
594
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
595
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
596
|
+
default:
|
|
597
|
+
const parsedBody = parsedOutput.body;
|
|
598
|
+
throwDefaultError({
|
|
599
|
+
output,
|
|
600
|
+
parsedBody,
|
|
601
|
+
exceptionCtor: __BaseException,
|
|
602
|
+
errorCode,
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
export const deserializeAws_restJson1DescribeWorkspaceCommand = async (output, context) => {
|
|
607
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
608
|
+
return deserializeAws_restJson1DescribeWorkspaceCommandError(output, context);
|
|
609
|
+
}
|
|
610
|
+
const contents = map({
|
|
611
|
+
$metadata: deserializeMetadata(output),
|
|
1022
612
|
});
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
613
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
614
|
+
if (data.workspace != null) {
|
|
615
|
+
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
|
|
616
|
+
}
|
|
617
|
+
return contents;
|
|
618
|
+
};
|
|
619
|
+
const deserializeAws_restJson1DescribeWorkspaceCommandError = async (output, context) => {
|
|
620
|
+
const parsedOutput = {
|
|
621
|
+
...output,
|
|
622
|
+
body: await parseErrorBody(output.body, context),
|
|
623
|
+
};
|
|
624
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
625
|
+
switch (errorCode) {
|
|
626
|
+
case "AccessDeniedException":
|
|
627
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
628
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
629
|
+
case "InternalServerException":
|
|
630
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
631
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
632
|
+
case "ResourceNotFoundException":
|
|
633
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
634
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
635
|
+
case "ThrottlingException":
|
|
636
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
637
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
638
|
+
case "ValidationException":
|
|
639
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
640
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
641
|
+
default:
|
|
642
|
+
const parsedBody = parsedOutput.body;
|
|
643
|
+
throwDefaultError({
|
|
644
|
+
output,
|
|
645
|
+
parsedBody,
|
|
646
|
+
exceptionCtor: __BaseException,
|
|
647
|
+
errorCode,
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
export const deserializeAws_restJson1DescribeWorkspaceAuthenticationCommand = async (output, context) => {
|
|
652
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
653
|
+
return deserializeAws_restJson1DescribeWorkspaceAuthenticationCommandError(output, context);
|
|
654
|
+
}
|
|
655
|
+
const contents = map({
|
|
656
|
+
$metadata: deserializeMetadata(output),
|
|
1048
657
|
});
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
return
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
});
|
|
1094
|
-
_d.label = 13;
|
|
1095
|
-
case 13: return [2];
|
|
1096
|
-
}
|
|
658
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
659
|
+
if (data.authentication != null) {
|
|
660
|
+
contents.authentication = deserializeAws_restJson1AuthenticationDescription(data.authentication, context);
|
|
661
|
+
}
|
|
662
|
+
return contents;
|
|
663
|
+
};
|
|
664
|
+
const deserializeAws_restJson1DescribeWorkspaceAuthenticationCommandError = async (output, context) => {
|
|
665
|
+
const parsedOutput = {
|
|
666
|
+
...output,
|
|
667
|
+
body: await parseErrorBody(output.body, context),
|
|
668
|
+
};
|
|
669
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
670
|
+
switch (errorCode) {
|
|
671
|
+
case "AccessDeniedException":
|
|
672
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
673
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
674
|
+
case "InternalServerException":
|
|
675
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
676
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
677
|
+
case "ResourceNotFoundException":
|
|
678
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
679
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
680
|
+
case "ThrottlingException":
|
|
681
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
682
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
683
|
+
case "ValidationException":
|
|
684
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
685
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
686
|
+
default:
|
|
687
|
+
const parsedBody = parsedOutput.body;
|
|
688
|
+
throwDefaultError({
|
|
689
|
+
output,
|
|
690
|
+
parsedBody,
|
|
691
|
+
exceptionCtor: __BaseException,
|
|
692
|
+
errorCode,
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
export const deserializeAws_restJson1DisassociateLicenseCommand = async (output, context) => {
|
|
697
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
698
|
+
return deserializeAws_restJson1DisassociateLicenseCommandError(output, context);
|
|
699
|
+
}
|
|
700
|
+
const contents = map({
|
|
701
|
+
$metadata: deserializeMetadata(output),
|
|
1097
702
|
});
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
703
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
704
|
+
if (data.workspace != null) {
|
|
705
|
+
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
|
|
706
|
+
}
|
|
707
|
+
return contents;
|
|
708
|
+
};
|
|
709
|
+
const deserializeAws_restJson1DisassociateLicenseCommandError = async (output, context) => {
|
|
710
|
+
const parsedOutput = {
|
|
711
|
+
...output,
|
|
712
|
+
body: await parseErrorBody(output.body, context),
|
|
713
|
+
};
|
|
714
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
715
|
+
switch (errorCode) {
|
|
716
|
+
case "AccessDeniedException":
|
|
717
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
718
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
719
|
+
case "InternalServerException":
|
|
720
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
721
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
722
|
+
case "ResourceNotFoundException":
|
|
723
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
724
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
725
|
+
case "ThrottlingException":
|
|
726
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
727
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
728
|
+
case "ValidationException":
|
|
729
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
730
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
731
|
+
default:
|
|
732
|
+
const parsedBody = parsedOutput.body;
|
|
733
|
+
throwDefaultError({
|
|
734
|
+
output,
|
|
735
|
+
parsedBody,
|
|
736
|
+
exceptionCtor: __BaseException,
|
|
737
|
+
errorCode,
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
export const deserializeAws_restJson1ListPermissionsCommand = async (output, context) => {
|
|
742
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
743
|
+
return deserializeAws_restJson1ListPermissionsCommandError(output, context);
|
|
744
|
+
}
|
|
745
|
+
const contents = map({
|
|
746
|
+
$metadata: deserializeMetadata(output),
|
|
1120
747
|
});
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
}
|
|
748
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
749
|
+
if (data.nextToken != null) {
|
|
750
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
751
|
+
}
|
|
752
|
+
if (data.permissions != null) {
|
|
753
|
+
contents.permissions = deserializeAws_restJson1PermissionEntryList(data.permissions, context);
|
|
754
|
+
}
|
|
755
|
+
return contents;
|
|
756
|
+
};
|
|
757
|
+
const deserializeAws_restJson1ListPermissionsCommandError = async (output, context) => {
|
|
758
|
+
const parsedOutput = {
|
|
759
|
+
...output,
|
|
760
|
+
body: await parseErrorBody(output.body, context),
|
|
761
|
+
};
|
|
762
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
763
|
+
switch (errorCode) {
|
|
764
|
+
case "AccessDeniedException":
|
|
765
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
766
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
767
|
+
case "InternalServerException":
|
|
768
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
769
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
770
|
+
case "ResourceNotFoundException":
|
|
771
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
772
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
773
|
+
case "ThrottlingException":
|
|
774
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
775
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
776
|
+
case "ValidationException":
|
|
777
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
778
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
779
|
+
default:
|
|
780
|
+
const parsedBody = parsedOutput.body;
|
|
781
|
+
throwDefaultError({
|
|
782
|
+
output,
|
|
783
|
+
parsedBody,
|
|
784
|
+
exceptionCtor: __BaseException,
|
|
785
|
+
errorCode,
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
};
|
|
789
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
790
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
791
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
792
|
+
}
|
|
793
|
+
const contents = map({
|
|
794
|
+
$metadata: deserializeMetadata(output),
|
|
1169
795
|
});
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
796
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
797
|
+
if (data.tags != null) {
|
|
798
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
799
|
+
}
|
|
800
|
+
return contents;
|
|
801
|
+
};
|
|
802
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
803
|
+
const parsedOutput = {
|
|
804
|
+
...output,
|
|
805
|
+
body: await parseErrorBody(output.body, context),
|
|
806
|
+
};
|
|
807
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
808
|
+
switch (errorCode) {
|
|
809
|
+
case "AccessDeniedException":
|
|
810
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
811
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
812
|
+
case "InternalServerException":
|
|
813
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
814
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
815
|
+
case "ResourceNotFoundException":
|
|
816
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
817
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
818
|
+
case "ThrottlingException":
|
|
819
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
820
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
821
|
+
case "ValidationException":
|
|
822
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
823
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
824
|
+
default:
|
|
825
|
+
const parsedBody = parsedOutput.body;
|
|
826
|
+
throwDefaultError({
|
|
827
|
+
output,
|
|
828
|
+
parsedBody,
|
|
829
|
+
exceptionCtor: __BaseException,
|
|
830
|
+
errorCode,
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
};
|
|
834
|
+
export const deserializeAws_restJson1ListWorkspacesCommand = async (output, context) => {
|
|
835
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
836
|
+
return deserializeAws_restJson1ListWorkspacesCommandError(output, context);
|
|
837
|
+
}
|
|
838
|
+
const contents = map({
|
|
839
|
+
$metadata: deserializeMetadata(output),
|
|
1195
840
|
});
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
841
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
842
|
+
if (data.nextToken != null) {
|
|
843
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
844
|
+
}
|
|
845
|
+
if (data.workspaces != null) {
|
|
846
|
+
contents.workspaces = deserializeAws_restJson1WorkspaceList(data.workspaces, context);
|
|
847
|
+
}
|
|
848
|
+
return contents;
|
|
849
|
+
};
|
|
850
|
+
const deserializeAws_restJson1ListWorkspacesCommandError = async (output, context) => {
|
|
851
|
+
const parsedOutput = {
|
|
852
|
+
...output,
|
|
853
|
+
body: await parseErrorBody(output.body, context),
|
|
854
|
+
};
|
|
855
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
856
|
+
switch (errorCode) {
|
|
857
|
+
case "AccessDeniedException":
|
|
858
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
859
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
860
|
+
case "InternalServerException":
|
|
861
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
862
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
863
|
+
case "ThrottlingException":
|
|
864
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
865
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
866
|
+
default:
|
|
867
|
+
const parsedBody = parsedOutput.body;
|
|
868
|
+
throwDefaultError({
|
|
869
|
+
output,
|
|
870
|
+
parsedBody,
|
|
871
|
+
exceptionCtor: __BaseException,
|
|
872
|
+
errorCode,
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
};
|
|
876
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
877
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
878
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
879
|
+
}
|
|
880
|
+
const contents = map({
|
|
881
|
+
$metadata: deserializeMetadata(output),
|
|
1236
882
|
});
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
883
|
+
await collectBody(output.body, context);
|
|
884
|
+
return contents;
|
|
885
|
+
};
|
|
886
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
887
|
+
const parsedOutput = {
|
|
888
|
+
...output,
|
|
889
|
+
body: await parseErrorBody(output.body, context),
|
|
890
|
+
};
|
|
891
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
892
|
+
switch (errorCode) {
|
|
893
|
+
case "AccessDeniedException":
|
|
894
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
895
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
896
|
+
case "InternalServerException":
|
|
897
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
898
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
899
|
+
case "ResourceNotFoundException":
|
|
900
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
901
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
902
|
+
case "ThrottlingException":
|
|
903
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
904
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
905
|
+
case "ValidationException":
|
|
906
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
907
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
908
|
+
default:
|
|
909
|
+
const parsedBody = parsedOutput.body;
|
|
910
|
+
throwDefaultError({
|
|
911
|
+
output,
|
|
912
|
+
parsedBody,
|
|
913
|
+
exceptionCtor: __BaseException,
|
|
914
|
+
errorCode,
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
919
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
920
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
921
|
+
}
|
|
922
|
+
const contents = map({
|
|
923
|
+
$metadata: deserializeMetadata(output),
|
|
1254
924
|
});
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
parsedBody: parsedBody,
|
|
1297
|
-
exceptionCtor: __BaseException,
|
|
1298
|
-
errorCode: errorCode,
|
|
1299
|
-
});
|
|
1300
|
-
_d.label = 13;
|
|
1301
|
-
case 13: return [2];
|
|
1302
|
-
}
|
|
925
|
+
await collectBody(output.body, context);
|
|
926
|
+
return contents;
|
|
927
|
+
};
|
|
928
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
929
|
+
const parsedOutput = {
|
|
930
|
+
...output,
|
|
931
|
+
body: await parseErrorBody(output.body, context),
|
|
932
|
+
};
|
|
933
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
934
|
+
switch (errorCode) {
|
|
935
|
+
case "AccessDeniedException":
|
|
936
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
937
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
938
|
+
case "InternalServerException":
|
|
939
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
940
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
941
|
+
case "ResourceNotFoundException":
|
|
942
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
943
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
944
|
+
case "ThrottlingException":
|
|
945
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
946
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
947
|
+
case "ValidationException":
|
|
948
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
949
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
950
|
+
default:
|
|
951
|
+
const parsedBody = parsedOutput.body;
|
|
952
|
+
throwDefaultError({
|
|
953
|
+
output,
|
|
954
|
+
parsedBody,
|
|
955
|
+
exceptionCtor: __BaseException,
|
|
956
|
+
errorCode,
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
};
|
|
960
|
+
export const deserializeAws_restJson1UpdatePermissionsCommand = async (output, context) => {
|
|
961
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
962
|
+
return deserializeAws_restJson1UpdatePermissionsCommandError(output, context);
|
|
963
|
+
}
|
|
964
|
+
const contents = map({
|
|
965
|
+
$metadata: deserializeMetadata(output),
|
|
1303
966
|
});
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
967
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
968
|
+
if (data.errors != null) {
|
|
969
|
+
contents.errors = deserializeAws_restJson1UpdateErrorList(data.errors, context);
|
|
970
|
+
}
|
|
971
|
+
return contents;
|
|
972
|
+
};
|
|
973
|
+
const deserializeAws_restJson1UpdatePermissionsCommandError = async (output, context) => {
|
|
974
|
+
const parsedOutput = {
|
|
975
|
+
...output,
|
|
976
|
+
body: await parseErrorBody(output.body, context),
|
|
977
|
+
};
|
|
978
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
979
|
+
switch (errorCode) {
|
|
980
|
+
case "AccessDeniedException":
|
|
981
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
982
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
983
|
+
case "InternalServerException":
|
|
984
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
985
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
986
|
+
case "ResourceNotFoundException":
|
|
987
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
988
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
989
|
+
case "ThrottlingException":
|
|
990
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
991
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
992
|
+
case "ValidationException":
|
|
993
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
994
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
995
|
+
default:
|
|
996
|
+
const parsedBody = parsedOutput.body;
|
|
997
|
+
throwDefaultError({
|
|
998
|
+
output,
|
|
999
|
+
parsedBody,
|
|
1000
|
+
exceptionCtor: __BaseException,
|
|
1001
|
+
errorCode,
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
};
|
|
1005
|
+
export const deserializeAws_restJson1UpdateWorkspaceCommand = async (output, context) => {
|
|
1006
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1007
|
+
return deserializeAws_restJson1UpdateWorkspaceCommandError(output, context);
|
|
1008
|
+
}
|
|
1009
|
+
const contents = map({
|
|
1010
|
+
$metadata: deserializeMetadata(output),
|
|
1321
1011
|
});
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
return
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
}
|
|
1012
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1013
|
+
if (data.workspace != null) {
|
|
1014
|
+
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
|
|
1015
|
+
}
|
|
1016
|
+
return contents;
|
|
1017
|
+
};
|
|
1018
|
+
const deserializeAws_restJson1UpdateWorkspaceCommandError = async (output, context) => {
|
|
1019
|
+
const parsedOutput = {
|
|
1020
|
+
...output,
|
|
1021
|
+
body: await parseErrorBody(output.body, context),
|
|
1022
|
+
};
|
|
1023
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1024
|
+
switch (errorCode) {
|
|
1025
|
+
case "AccessDeniedException":
|
|
1026
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
1027
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1028
|
+
case "ConflictException":
|
|
1029
|
+
case "com.amazonaws.grafana#ConflictException":
|
|
1030
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1031
|
+
case "InternalServerException":
|
|
1032
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
1033
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1034
|
+
case "ResourceNotFoundException":
|
|
1035
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
1036
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1037
|
+
case "ThrottlingException":
|
|
1038
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
1039
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1040
|
+
case "ValidationException":
|
|
1041
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
1042
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1043
|
+
default:
|
|
1044
|
+
const parsedBody = parsedOutput.body;
|
|
1045
|
+
throwDefaultError({
|
|
1046
|
+
output,
|
|
1047
|
+
parsedBody,
|
|
1048
|
+
exceptionCtor: __BaseException,
|
|
1049
|
+
errorCode,
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
};
|
|
1053
|
+
export const deserializeAws_restJson1UpdateWorkspaceAuthenticationCommand = async (output, context) => {
|
|
1054
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1055
|
+
return deserializeAws_restJson1UpdateWorkspaceAuthenticationCommandError(output, context);
|
|
1056
|
+
}
|
|
1057
|
+
const contents = map({
|
|
1058
|
+
$metadata: deserializeMetadata(output),
|
|
1370
1059
|
});
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1060
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1061
|
+
if (data.authentication != null) {
|
|
1062
|
+
contents.authentication = deserializeAws_restJson1AuthenticationDescription(data.authentication, context);
|
|
1063
|
+
}
|
|
1064
|
+
return contents;
|
|
1065
|
+
};
|
|
1066
|
+
const deserializeAws_restJson1UpdateWorkspaceAuthenticationCommandError = async (output, context) => {
|
|
1067
|
+
const parsedOutput = {
|
|
1068
|
+
...output,
|
|
1069
|
+
body: await parseErrorBody(output.body, context),
|
|
1070
|
+
};
|
|
1071
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1072
|
+
switch (errorCode) {
|
|
1073
|
+
case "AccessDeniedException":
|
|
1074
|
+
case "com.amazonaws.grafana#AccessDeniedException":
|
|
1075
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1076
|
+
case "ConflictException":
|
|
1077
|
+
case "com.amazonaws.grafana#ConflictException":
|
|
1078
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1079
|
+
case "InternalServerException":
|
|
1080
|
+
case "com.amazonaws.grafana#InternalServerException":
|
|
1081
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1082
|
+
case "ResourceNotFoundException":
|
|
1083
|
+
case "com.amazonaws.grafana#ResourceNotFoundException":
|
|
1084
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1085
|
+
case "ThrottlingException":
|
|
1086
|
+
case "com.amazonaws.grafana#ThrottlingException":
|
|
1087
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1088
|
+
case "ValidationException":
|
|
1089
|
+
case "com.amazonaws.grafana#ValidationException":
|
|
1090
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1091
|
+
default:
|
|
1092
|
+
const parsedBody = parsedOutput.body;
|
|
1093
|
+
throwDefaultError({
|
|
1094
|
+
output,
|
|
1095
|
+
parsedBody,
|
|
1096
|
+
exceptionCtor: __BaseException,
|
|
1097
|
+
errorCode,
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
const map = __map;
|
|
1102
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
1103
|
+
const contents = map({});
|
|
1104
|
+
const data = parsedOutput.body;
|
|
1105
|
+
if (data.message != null) {
|
|
1106
|
+
contents.message = __expectString(data.message);
|
|
1107
|
+
}
|
|
1108
|
+
const exception = new AccessDeniedException({
|
|
1109
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1110
|
+
...contents,
|
|
1393
1111
|
});
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
case "InternalServerException": return [3, 4];
|
|
1412
|
-
case "com.amazonaws.grafana#InternalServerException": return [3, 4];
|
|
1413
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
1414
|
-
case "com.amazonaws.grafana#ResourceNotFoundException": return [3, 6];
|
|
1415
|
-
case "ThrottlingException": return [3, 8];
|
|
1416
|
-
case "com.amazonaws.grafana#ThrottlingException": return [3, 8];
|
|
1417
|
-
case "ValidationException": return [3, 10];
|
|
1418
|
-
case "com.amazonaws.grafana#ValidationException": return [3, 10];
|
|
1419
|
-
}
|
|
1420
|
-
return [3, 12];
|
|
1421
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1422
|
-
case 3: throw _d.sent();
|
|
1423
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1424
|
-
case 5: throw _d.sent();
|
|
1425
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1426
|
-
case 7: throw _d.sent();
|
|
1427
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1428
|
-
case 9: throw _d.sent();
|
|
1429
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1430
|
-
case 11: throw _d.sent();
|
|
1431
|
-
case 12:
|
|
1432
|
-
parsedBody = parsedOutput.body;
|
|
1433
|
-
throwDefaultError({
|
|
1434
|
-
output: output,
|
|
1435
|
-
parsedBody: parsedBody,
|
|
1436
|
-
exceptionCtor: __BaseException,
|
|
1437
|
-
errorCode: errorCode,
|
|
1438
|
-
});
|
|
1439
|
-
_d.label = 13;
|
|
1440
|
-
case 13: return [2];
|
|
1441
|
-
}
|
|
1112
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1113
|
+
};
|
|
1114
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1115
|
+
const contents = map({});
|
|
1116
|
+
const data = parsedOutput.body;
|
|
1117
|
+
if (data.message != null) {
|
|
1118
|
+
contents.message = __expectString(data.message);
|
|
1119
|
+
}
|
|
1120
|
+
if (data.resourceId != null) {
|
|
1121
|
+
contents.resourceId = __expectString(data.resourceId);
|
|
1122
|
+
}
|
|
1123
|
+
if (data.resourceType != null) {
|
|
1124
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
1125
|
+
}
|
|
1126
|
+
const exception = new ConflictException({
|
|
1127
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1128
|
+
...contents,
|
|
1442
1129
|
});
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1460
|
-
if (data.workspace != null) {
|
|
1461
|
-
contents.workspace = deserializeAws_restJson1WorkspaceDescription(data.workspace, context);
|
|
1462
|
-
}
|
|
1463
|
-
return [2, contents];
|
|
1464
|
-
}
|
|
1130
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1131
|
+
};
|
|
1132
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
1133
|
+
const contents = map({
|
|
1134
|
+
retryAfterSeconds: [
|
|
1135
|
+
() => void 0 !== parsedOutput.headers["retry-after"],
|
|
1136
|
+
() => __strictParseInt32(parsedOutput.headers["retry-after"]),
|
|
1137
|
+
],
|
|
1138
|
+
});
|
|
1139
|
+
const data = parsedOutput.body;
|
|
1140
|
+
if (data.message != null) {
|
|
1141
|
+
contents.message = __expectString(data.message);
|
|
1142
|
+
}
|
|
1143
|
+
const exception = new InternalServerException({
|
|
1144
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1145
|
+
...contents,
|
|
1465
1146
|
});
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
case "ConflictException": return [3, 4];
|
|
1484
|
-
case "com.amazonaws.grafana#ConflictException": return [3, 4];
|
|
1485
|
-
case "InternalServerException": return [3, 6];
|
|
1486
|
-
case "com.amazonaws.grafana#InternalServerException": return [3, 6];
|
|
1487
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
1488
|
-
case "com.amazonaws.grafana#ResourceNotFoundException": return [3, 8];
|
|
1489
|
-
case "ThrottlingException": return [3, 10];
|
|
1490
|
-
case "com.amazonaws.grafana#ThrottlingException": return [3, 10];
|
|
1491
|
-
case "ValidationException": return [3, 12];
|
|
1492
|
-
case "com.amazonaws.grafana#ValidationException": return [3, 12];
|
|
1493
|
-
}
|
|
1494
|
-
return [3, 14];
|
|
1495
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1496
|
-
case 3: throw _d.sent();
|
|
1497
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1498
|
-
case 5: throw _d.sent();
|
|
1499
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1500
|
-
case 7: throw _d.sent();
|
|
1501
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1502
|
-
case 9: throw _d.sent();
|
|
1503
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1504
|
-
case 11: throw _d.sent();
|
|
1505
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1506
|
-
case 13: throw _d.sent();
|
|
1507
|
-
case 14:
|
|
1508
|
-
parsedBody = parsedOutput.body;
|
|
1509
|
-
throwDefaultError({
|
|
1510
|
-
output: output,
|
|
1511
|
-
parsedBody: parsedBody,
|
|
1512
|
-
exceptionCtor: __BaseException,
|
|
1513
|
-
errorCode: errorCode,
|
|
1514
|
-
});
|
|
1515
|
-
_d.label = 15;
|
|
1516
|
-
case 15: return [2];
|
|
1517
|
-
}
|
|
1147
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1148
|
+
};
|
|
1149
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1150
|
+
const contents = map({});
|
|
1151
|
+
const data = parsedOutput.body;
|
|
1152
|
+
if (data.message != null) {
|
|
1153
|
+
contents.message = __expectString(data.message);
|
|
1154
|
+
}
|
|
1155
|
+
if (data.resourceId != null) {
|
|
1156
|
+
contents.resourceId = __expectString(data.resourceId);
|
|
1157
|
+
}
|
|
1158
|
+
if (data.resourceType != null) {
|
|
1159
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
1160
|
+
}
|
|
1161
|
+
const exception = new ResourceNotFoundException({
|
|
1162
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1163
|
+
...contents,
|
|
1518
1164
|
});
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1165
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1166
|
+
};
|
|
1167
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1168
|
+
const contents = map({});
|
|
1169
|
+
const data = parsedOutput.body;
|
|
1170
|
+
if (data.message != null) {
|
|
1171
|
+
contents.message = __expectString(data.message);
|
|
1172
|
+
}
|
|
1173
|
+
if (data.quotaCode != null) {
|
|
1174
|
+
contents.quotaCode = __expectString(data.quotaCode);
|
|
1175
|
+
}
|
|
1176
|
+
if (data.resourceId != null) {
|
|
1177
|
+
contents.resourceId = __expectString(data.resourceId);
|
|
1178
|
+
}
|
|
1179
|
+
if (data.resourceType != null) {
|
|
1180
|
+
contents.resourceType = __expectString(data.resourceType);
|
|
1181
|
+
}
|
|
1182
|
+
if (data.serviceCode != null) {
|
|
1183
|
+
contents.serviceCode = __expectString(data.serviceCode);
|
|
1184
|
+
}
|
|
1185
|
+
const exception = new ServiceQuotaExceededException({
|
|
1186
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1187
|
+
...contents,
|
|
1541
1188
|
});
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
case "com.amazonaws.grafana#ResourceNotFoundException": return [3, 8];
|
|
1565
|
-
case "ThrottlingException": return [3, 10];
|
|
1566
|
-
case "com.amazonaws.grafana#ThrottlingException": return [3, 10];
|
|
1567
|
-
case "ValidationException": return [3, 12];
|
|
1568
|
-
case "com.amazonaws.grafana#ValidationException": return [3, 12];
|
|
1569
|
-
}
|
|
1570
|
-
return [3, 14];
|
|
1571
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1572
|
-
case 3: throw _d.sent();
|
|
1573
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
1574
|
-
case 5: throw _d.sent();
|
|
1575
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
1576
|
-
case 7: throw _d.sent();
|
|
1577
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1578
|
-
case 9: throw _d.sent();
|
|
1579
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1580
|
-
case 11: throw _d.sent();
|
|
1581
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1582
|
-
case 13: throw _d.sent();
|
|
1583
|
-
case 14:
|
|
1584
|
-
parsedBody = parsedOutput.body;
|
|
1585
|
-
throwDefaultError({
|
|
1586
|
-
output: output,
|
|
1587
|
-
parsedBody: parsedBody,
|
|
1588
|
-
exceptionCtor: __BaseException,
|
|
1589
|
-
errorCode: errorCode,
|
|
1590
|
-
});
|
|
1591
|
-
_d.label = 15;
|
|
1592
|
-
case 15: return [2];
|
|
1593
|
-
}
|
|
1189
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1190
|
+
};
|
|
1191
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
1192
|
+
const contents = map({
|
|
1193
|
+
retryAfterSeconds: [
|
|
1194
|
+
() => void 0 !== parsedOutput.headers["retry-after"],
|
|
1195
|
+
() => __strictParseInt32(parsedOutput.headers["retry-after"]),
|
|
1196
|
+
],
|
|
1197
|
+
});
|
|
1198
|
+
const data = parsedOutput.body;
|
|
1199
|
+
if (data.message != null) {
|
|
1200
|
+
contents.message = __expectString(data.message);
|
|
1201
|
+
}
|
|
1202
|
+
if (data.quotaCode != null) {
|
|
1203
|
+
contents.quotaCode = __expectString(data.quotaCode);
|
|
1204
|
+
}
|
|
1205
|
+
if (data.serviceCode != null) {
|
|
1206
|
+
contents.serviceCode = __expectString(data.serviceCode);
|
|
1207
|
+
}
|
|
1208
|
+
const exception = new ThrottlingException({
|
|
1209
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1210
|
+
...contents,
|
|
1594
1211
|
});
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
contents = map({});
|
|
1613
|
-
data = parsedOutput.body;
|
|
1614
|
-
if (data.message != null) {
|
|
1615
|
-
contents.message = __expectString(data.message);
|
|
1616
|
-
}
|
|
1617
|
-
if (data.resourceId != null) {
|
|
1618
|
-
contents.resourceId = __expectString(data.resourceId);
|
|
1619
|
-
}
|
|
1620
|
-
if (data.resourceType != null) {
|
|
1621
|
-
contents.resourceType = __expectString(data.resourceType);
|
|
1622
|
-
}
|
|
1623
|
-
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1624
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1625
|
-
});
|
|
1626
|
-
}); };
|
|
1627
|
-
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1628
|
-
var contents, data, exception;
|
|
1629
|
-
return __generator(this, function (_a) {
|
|
1630
|
-
contents = map({
|
|
1631
|
-
retryAfterSeconds: [
|
|
1632
|
-
function () { return void 0 !== parsedOutput.headers["retry-after"]; },
|
|
1633
|
-
function () { return __strictParseInt32(parsedOutput.headers["retry-after"]); },
|
|
1634
|
-
],
|
|
1635
|
-
});
|
|
1636
|
-
data = parsedOutput.body;
|
|
1637
|
-
if (data.message != null) {
|
|
1638
|
-
contents.message = __expectString(data.message);
|
|
1639
|
-
}
|
|
1640
|
-
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1641
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1642
|
-
});
|
|
1643
|
-
}); };
|
|
1644
|
-
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1645
|
-
var contents, data, exception;
|
|
1646
|
-
return __generator(this, function (_a) {
|
|
1647
|
-
contents = map({});
|
|
1648
|
-
data = parsedOutput.body;
|
|
1649
|
-
if (data.message != null) {
|
|
1650
|
-
contents.message = __expectString(data.message);
|
|
1651
|
-
}
|
|
1652
|
-
if (data.resourceId != null) {
|
|
1653
|
-
contents.resourceId = __expectString(data.resourceId);
|
|
1654
|
-
}
|
|
1655
|
-
if (data.resourceType != null) {
|
|
1656
|
-
contents.resourceType = __expectString(data.resourceType);
|
|
1657
|
-
}
|
|
1658
|
-
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1659
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1660
|
-
});
|
|
1661
|
-
}); };
|
|
1662
|
-
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1663
|
-
var contents, data, exception;
|
|
1664
|
-
return __generator(this, function (_a) {
|
|
1665
|
-
contents = map({});
|
|
1666
|
-
data = parsedOutput.body;
|
|
1667
|
-
if (data.message != null) {
|
|
1668
|
-
contents.message = __expectString(data.message);
|
|
1669
|
-
}
|
|
1670
|
-
if (data.quotaCode != null) {
|
|
1671
|
-
contents.quotaCode = __expectString(data.quotaCode);
|
|
1672
|
-
}
|
|
1673
|
-
if (data.resourceId != null) {
|
|
1674
|
-
contents.resourceId = __expectString(data.resourceId);
|
|
1675
|
-
}
|
|
1676
|
-
if (data.resourceType != null) {
|
|
1677
|
-
contents.resourceType = __expectString(data.resourceType);
|
|
1678
|
-
}
|
|
1679
|
-
if (data.serviceCode != null) {
|
|
1680
|
-
contents.serviceCode = __expectString(data.serviceCode);
|
|
1681
|
-
}
|
|
1682
|
-
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1683
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1684
|
-
});
|
|
1685
|
-
}); };
|
|
1686
|
-
var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1687
|
-
var contents, data, exception;
|
|
1688
|
-
return __generator(this, function (_a) {
|
|
1689
|
-
contents = map({
|
|
1690
|
-
retryAfterSeconds: [
|
|
1691
|
-
function () { return void 0 !== parsedOutput.headers["retry-after"]; },
|
|
1692
|
-
function () { return __strictParseInt32(parsedOutput.headers["retry-after"]); },
|
|
1693
|
-
],
|
|
1694
|
-
});
|
|
1695
|
-
data = parsedOutput.body;
|
|
1696
|
-
if (data.message != null) {
|
|
1697
|
-
contents.message = __expectString(data.message);
|
|
1698
|
-
}
|
|
1699
|
-
if (data.quotaCode != null) {
|
|
1700
|
-
contents.quotaCode = __expectString(data.quotaCode);
|
|
1701
|
-
}
|
|
1702
|
-
if (data.serviceCode != null) {
|
|
1703
|
-
contents.serviceCode = __expectString(data.serviceCode);
|
|
1704
|
-
}
|
|
1705
|
-
exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1706
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1707
|
-
});
|
|
1708
|
-
}); };
|
|
1709
|
-
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1710
|
-
var contents, data, exception;
|
|
1711
|
-
return __generator(this, function (_a) {
|
|
1712
|
-
contents = map({});
|
|
1713
|
-
data = parsedOutput.body;
|
|
1714
|
-
if (data.fieldList != null) {
|
|
1715
|
-
contents.fieldList = deserializeAws_restJson1ValidationExceptionFieldList(data.fieldList, context);
|
|
1716
|
-
}
|
|
1717
|
-
if (data.message != null) {
|
|
1718
|
-
contents.message = __expectString(data.message);
|
|
1719
|
-
}
|
|
1720
|
-
if (data.reason != null) {
|
|
1721
|
-
contents.reason = __expectString(data.reason);
|
|
1722
|
-
}
|
|
1723
|
-
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1724
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1212
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1213
|
+
};
|
|
1214
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
1215
|
+
const contents = map({});
|
|
1216
|
+
const data = parsedOutput.body;
|
|
1217
|
+
if (data.fieldList != null) {
|
|
1218
|
+
contents.fieldList = deserializeAws_restJson1ValidationExceptionFieldList(data.fieldList, context);
|
|
1219
|
+
}
|
|
1220
|
+
if (data.message != null) {
|
|
1221
|
+
contents.message = __expectString(data.message);
|
|
1222
|
+
}
|
|
1223
|
+
if (data.reason != null) {
|
|
1224
|
+
contents.reason = __expectString(data.reason);
|
|
1225
|
+
}
|
|
1226
|
+
const exception = new ValidationException({
|
|
1227
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1228
|
+
...contents,
|
|
1725
1229
|
});
|
|
1726
|
-
|
|
1727
|
-
|
|
1230
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1231
|
+
};
|
|
1232
|
+
const serializeAws_restJson1AllowedOrganizations = (input, context) => {
|
|
1728
1233
|
return input
|
|
1729
|
-
.filter(
|
|
1730
|
-
.map(
|
|
1234
|
+
.filter((e) => e != null)
|
|
1235
|
+
.map((entry) => {
|
|
1731
1236
|
return entry;
|
|
1732
1237
|
});
|
|
1733
1238
|
};
|
|
1734
|
-
|
|
1735
|
-
return
|
|
1239
|
+
const serializeAws_restJson1AssertionAttributes = (input, context) => {
|
|
1240
|
+
return {
|
|
1241
|
+
...(input.email != null && { email: input.email }),
|
|
1242
|
+
...(input.groups != null && { groups: input.groups }),
|
|
1243
|
+
...(input.login != null && { login: input.login }),
|
|
1244
|
+
...(input.name != null && { name: input.name }),
|
|
1245
|
+
...(input.org != null && { org: input.org }),
|
|
1246
|
+
...(input.role != null && { role: input.role }),
|
|
1247
|
+
};
|
|
1736
1248
|
};
|
|
1737
|
-
|
|
1249
|
+
const serializeAws_restJson1AuthenticationProviders = (input, context) => {
|
|
1738
1250
|
return input
|
|
1739
|
-
.filter(
|
|
1740
|
-
.map(
|
|
1251
|
+
.filter((e) => e != null)
|
|
1252
|
+
.map((entry) => {
|
|
1741
1253
|
return entry;
|
|
1742
1254
|
});
|
|
1743
1255
|
};
|
|
1744
|
-
|
|
1256
|
+
const serializeAws_restJson1DataSourceTypesList = (input, context) => {
|
|
1745
1257
|
return input
|
|
1746
|
-
.filter(
|
|
1747
|
-
.map(
|
|
1258
|
+
.filter((e) => e != null)
|
|
1259
|
+
.map((entry) => {
|
|
1748
1260
|
return entry;
|
|
1749
1261
|
});
|
|
1750
1262
|
};
|
|
1751
|
-
|
|
1263
|
+
const serializeAws_restJson1IdpMetadata = (input, context) => {
|
|
1752
1264
|
return IdpMetadata.visit(input, {
|
|
1753
|
-
url:
|
|
1754
|
-
xml:
|
|
1755
|
-
_:
|
|
1265
|
+
url: (value) => ({ url: value }),
|
|
1266
|
+
xml: (value) => ({ xml: value }),
|
|
1267
|
+
_: (name, value) => ({ name: value }),
|
|
1756
1268
|
});
|
|
1757
1269
|
};
|
|
1758
|
-
|
|
1270
|
+
const serializeAws_restJson1NotificationDestinationsList = (input, context) => {
|
|
1759
1271
|
return input
|
|
1760
|
-
.filter(
|
|
1761
|
-
.map(
|
|
1272
|
+
.filter((e) => e != null)
|
|
1273
|
+
.map((entry) => {
|
|
1762
1274
|
return entry;
|
|
1763
1275
|
});
|
|
1764
1276
|
};
|
|
1765
|
-
|
|
1277
|
+
const serializeAws_restJson1OrganizationalUnitList = (input, context) => {
|
|
1766
1278
|
return input
|
|
1767
|
-
.filter(
|
|
1768
|
-
.map(
|
|
1279
|
+
.filter((e) => e != null)
|
|
1280
|
+
.map((entry) => {
|
|
1769
1281
|
return entry;
|
|
1770
1282
|
});
|
|
1771
1283
|
};
|
|
1772
|
-
|
|
1284
|
+
const serializeAws_restJson1RoleValueList = (input, context) => {
|
|
1773
1285
|
return input
|
|
1774
|
-
.filter(
|
|
1775
|
-
.map(
|
|
1286
|
+
.filter((e) => e != null)
|
|
1287
|
+
.map((entry) => {
|
|
1776
1288
|
return entry;
|
|
1777
1289
|
});
|
|
1778
1290
|
};
|
|
1779
|
-
|
|
1780
|
-
return
|
|
1291
|
+
const serializeAws_restJson1RoleValues = (input, context) => {
|
|
1292
|
+
return {
|
|
1293
|
+
...(input.admin != null && { admin: serializeAws_restJson1RoleValueList(input.admin, context) }),
|
|
1294
|
+
...(input.editor != null && { editor: serializeAws_restJson1RoleValueList(input.editor, context) }),
|
|
1295
|
+
};
|
|
1781
1296
|
};
|
|
1782
|
-
|
|
1783
|
-
return
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1297
|
+
const serializeAws_restJson1SamlConfiguration = (input, context) => {
|
|
1298
|
+
return {
|
|
1299
|
+
...(input.allowedOrganizations != null && {
|
|
1300
|
+
allowedOrganizations: serializeAws_restJson1AllowedOrganizations(input.allowedOrganizations, context),
|
|
1301
|
+
}),
|
|
1302
|
+
...(input.assertionAttributes != null && {
|
|
1303
|
+
assertionAttributes: serializeAws_restJson1AssertionAttributes(input.assertionAttributes, context),
|
|
1304
|
+
}),
|
|
1305
|
+
...(input.idpMetadata != null && { idpMetadata: serializeAws_restJson1IdpMetadata(input.idpMetadata, context) }),
|
|
1306
|
+
...(input.loginValidityDuration != null && { loginValidityDuration: input.loginValidityDuration }),
|
|
1307
|
+
...(input.roleValues != null && { roleValues: serializeAws_restJson1RoleValues(input.roleValues, context) }),
|
|
1308
|
+
};
|
|
1788
1309
|
};
|
|
1789
|
-
|
|
1790
|
-
return Object.entries(input).reduce(
|
|
1791
|
-
var _b;
|
|
1792
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1310
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
1311
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1793
1312
|
if (value === null) {
|
|
1794
1313
|
return acc;
|
|
1795
1314
|
}
|
|
1796
|
-
return
|
|
1315
|
+
return {
|
|
1316
|
+
...acc,
|
|
1317
|
+
[key]: value,
|
|
1318
|
+
};
|
|
1797
1319
|
}, {});
|
|
1798
1320
|
};
|
|
1799
|
-
|
|
1800
|
-
return
|
|
1321
|
+
const serializeAws_restJson1UpdateInstruction = (input, context) => {
|
|
1322
|
+
return {
|
|
1323
|
+
...(input.action != null && { action: input.action }),
|
|
1324
|
+
...(input.role != null && { role: input.role }),
|
|
1325
|
+
...(input.users != null && { users: serializeAws_restJson1UserList(input.users, context) }),
|
|
1326
|
+
};
|
|
1801
1327
|
};
|
|
1802
|
-
|
|
1328
|
+
const serializeAws_restJson1UpdateInstructionBatch = (input, context) => {
|
|
1803
1329
|
return input
|
|
1804
|
-
.filter(
|
|
1805
|
-
.map(
|
|
1330
|
+
.filter((e) => e != null)
|
|
1331
|
+
.map((entry) => {
|
|
1806
1332
|
return serializeAws_restJson1UpdateInstruction(entry, context);
|
|
1807
1333
|
});
|
|
1808
1334
|
};
|
|
1809
|
-
|
|
1810
|
-
return
|
|
1335
|
+
const serializeAws_restJson1User = (input, context) => {
|
|
1336
|
+
return {
|
|
1337
|
+
...(input.id != null && { id: input.id }),
|
|
1338
|
+
...(input.type != null && { type: input.type }),
|
|
1339
|
+
};
|
|
1811
1340
|
};
|
|
1812
|
-
|
|
1341
|
+
const serializeAws_restJson1UserList = (input, context) => {
|
|
1813
1342
|
return input
|
|
1814
|
-
.filter(
|
|
1815
|
-
.map(
|
|
1343
|
+
.filter((e) => e != null)
|
|
1344
|
+
.map((entry) => {
|
|
1816
1345
|
return serializeAws_restJson1User(entry, context);
|
|
1817
1346
|
});
|
|
1818
1347
|
};
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
.filter(
|
|
1822
|
-
.map(
|
|
1348
|
+
const deserializeAws_restJson1AllowedOrganizations = (output, context) => {
|
|
1349
|
+
const retVal = (output || [])
|
|
1350
|
+
.filter((e) => e != null)
|
|
1351
|
+
.map((entry) => {
|
|
1823
1352
|
if (entry === null) {
|
|
1824
1353
|
return null;
|
|
1825
1354
|
}
|
|
@@ -1827,7 +1356,7 @@ var deserializeAws_restJson1AllowedOrganizations = function (output, context) {
|
|
|
1827
1356
|
});
|
|
1828
1357
|
return retVal;
|
|
1829
1358
|
};
|
|
1830
|
-
|
|
1359
|
+
const deserializeAws_restJson1AssertionAttributes = (output, context) => {
|
|
1831
1360
|
return {
|
|
1832
1361
|
email: __expectString(output.email),
|
|
1833
1362
|
groups: __expectString(output.groups),
|
|
@@ -1837,17 +1366,17 @@ var deserializeAws_restJson1AssertionAttributes = function (output, context) {
|
|
|
1837
1366
|
role: __expectString(output.role),
|
|
1838
1367
|
};
|
|
1839
1368
|
};
|
|
1840
|
-
|
|
1369
|
+
const deserializeAws_restJson1AuthenticationDescription = (output, context) => {
|
|
1841
1370
|
return {
|
|
1842
1371
|
awsSso: output.awsSso != null ? deserializeAws_restJson1AwsSsoAuthentication(output.awsSso, context) : undefined,
|
|
1843
1372
|
providers: output.providers != null ? deserializeAws_restJson1AuthenticationProviders(output.providers, context) : undefined,
|
|
1844
1373
|
saml: output.saml != null ? deserializeAws_restJson1SamlAuthentication(output.saml, context) : undefined,
|
|
1845
1374
|
};
|
|
1846
1375
|
};
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
.filter(
|
|
1850
|
-
.map(
|
|
1376
|
+
const deserializeAws_restJson1AuthenticationProviders = (output, context) => {
|
|
1377
|
+
const retVal = (output || [])
|
|
1378
|
+
.filter((e) => e != null)
|
|
1379
|
+
.map((entry) => {
|
|
1851
1380
|
if (entry === null) {
|
|
1852
1381
|
return null;
|
|
1853
1382
|
}
|
|
@@ -1855,21 +1384,21 @@ var deserializeAws_restJson1AuthenticationProviders = function (output, context)
|
|
|
1855
1384
|
});
|
|
1856
1385
|
return retVal;
|
|
1857
1386
|
};
|
|
1858
|
-
|
|
1387
|
+
const deserializeAws_restJson1AuthenticationSummary = (output, context) => {
|
|
1859
1388
|
return {
|
|
1860
1389
|
providers: output.providers != null ? deserializeAws_restJson1AuthenticationProviders(output.providers, context) : undefined,
|
|
1861
1390
|
samlConfigurationStatus: __expectString(output.samlConfigurationStatus),
|
|
1862
1391
|
};
|
|
1863
1392
|
};
|
|
1864
|
-
|
|
1393
|
+
const deserializeAws_restJson1AwsSsoAuthentication = (output, context) => {
|
|
1865
1394
|
return {
|
|
1866
1395
|
ssoClientId: __expectString(output.ssoClientId),
|
|
1867
1396
|
};
|
|
1868
1397
|
};
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
.filter(
|
|
1872
|
-
.map(
|
|
1398
|
+
const deserializeAws_restJson1DataSourceTypesList = (output, context) => {
|
|
1399
|
+
const retVal = (output || [])
|
|
1400
|
+
.filter((e) => e != null)
|
|
1401
|
+
.map((entry) => {
|
|
1873
1402
|
if (entry === null) {
|
|
1874
1403
|
return null;
|
|
1875
1404
|
}
|
|
@@ -1877,7 +1406,7 @@ var deserializeAws_restJson1DataSourceTypesList = function (output, context) {
|
|
|
1877
1406
|
});
|
|
1878
1407
|
return retVal;
|
|
1879
1408
|
};
|
|
1880
|
-
|
|
1409
|
+
const deserializeAws_restJson1IdpMetadata = (output, context) => {
|
|
1881
1410
|
if (__expectString(output.url) !== undefined) {
|
|
1882
1411
|
return { url: __expectString(output.url) };
|
|
1883
1412
|
}
|
|
@@ -1886,10 +1415,10 @@ var deserializeAws_restJson1IdpMetadata = function (output, context) {
|
|
|
1886
1415
|
}
|
|
1887
1416
|
return { $unknown: Object.entries(output)[0] };
|
|
1888
1417
|
};
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
.filter(
|
|
1892
|
-
.map(
|
|
1418
|
+
const deserializeAws_restJson1NotificationDestinationsList = (output, context) => {
|
|
1419
|
+
const retVal = (output || [])
|
|
1420
|
+
.filter((e) => e != null)
|
|
1421
|
+
.map((entry) => {
|
|
1893
1422
|
if (entry === null) {
|
|
1894
1423
|
return null;
|
|
1895
1424
|
}
|
|
@@ -1897,10 +1426,10 @@ var deserializeAws_restJson1NotificationDestinationsList = function (output, con
|
|
|
1897
1426
|
});
|
|
1898
1427
|
return retVal;
|
|
1899
1428
|
};
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
.filter(
|
|
1903
|
-
.map(
|
|
1429
|
+
const deserializeAws_restJson1OrganizationalUnitList = (output, context) => {
|
|
1430
|
+
const retVal = (output || [])
|
|
1431
|
+
.filter((e) => e != null)
|
|
1432
|
+
.map((entry) => {
|
|
1904
1433
|
if (entry === null) {
|
|
1905
1434
|
return null;
|
|
1906
1435
|
}
|
|
@@ -1908,16 +1437,16 @@ var deserializeAws_restJson1OrganizationalUnitList = function (output, context)
|
|
|
1908
1437
|
});
|
|
1909
1438
|
return retVal;
|
|
1910
1439
|
};
|
|
1911
|
-
|
|
1440
|
+
const deserializeAws_restJson1PermissionEntry = (output, context) => {
|
|
1912
1441
|
return {
|
|
1913
1442
|
role: __expectString(output.role),
|
|
1914
1443
|
user: output.user != null ? deserializeAws_restJson1User(output.user, context) : undefined,
|
|
1915
1444
|
};
|
|
1916
1445
|
};
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
.filter(
|
|
1920
|
-
.map(
|
|
1446
|
+
const deserializeAws_restJson1PermissionEntryList = (output, context) => {
|
|
1447
|
+
const retVal = (output || [])
|
|
1448
|
+
.filter((e) => e != null)
|
|
1449
|
+
.map((entry) => {
|
|
1921
1450
|
if (entry === null) {
|
|
1922
1451
|
return null;
|
|
1923
1452
|
}
|
|
@@ -1925,10 +1454,10 @@ var deserializeAws_restJson1PermissionEntryList = function (output, context) {
|
|
|
1925
1454
|
});
|
|
1926
1455
|
return retVal;
|
|
1927
1456
|
};
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
.filter(
|
|
1931
|
-
.map(
|
|
1457
|
+
const deserializeAws_restJson1RoleValueList = (output, context) => {
|
|
1458
|
+
const retVal = (output || [])
|
|
1459
|
+
.filter((e) => e != null)
|
|
1460
|
+
.map((entry) => {
|
|
1932
1461
|
if (entry === null) {
|
|
1933
1462
|
return null;
|
|
1934
1463
|
}
|
|
@@ -1936,13 +1465,13 @@ var deserializeAws_restJson1RoleValueList = function (output, context) {
|
|
|
1936
1465
|
});
|
|
1937
1466
|
return retVal;
|
|
1938
1467
|
};
|
|
1939
|
-
|
|
1468
|
+
const deserializeAws_restJson1RoleValues = (output, context) => {
|
|
1940
1469
|
return {
|
|
1941
1470
|
admin: output.admin != null ? deserializeAws_restJson1RoleValueList(output.admin, context) : undefined,
|
|
1942
1471
|
editor: output.editor != null ? deserializeAws_restJson1RoleValueList(output.editor, context) : undefined,
|
|
1943
1472
|
};
|
|
1944
1473
|
};
|
|
1945
|
-
|
|
1474
|
+
const deserializeAws_restJson1SamlAuthentication = (output, context) => {
|
|
1946
1475
|
return {
|
|
1947
1476
|
configuration: output.configuration != null
|
|
1948
1477
|
? deserializeAws_restJson1SamlConfiguration(output.configuration, context)
|
|
@@ -1950,7 +1479,7 @@ var deserializeAws_restJson1SamlAuthentication = function (output, context) {
|
|
|
1950
1479
|
status: __expectString(output.status),
|
|
1951
1480
|
};
|
|
1952
1481
|
};
|
|
1953
|
-
|
|
1482
|
+
const deserializeAws_restJson1SamlConfiguration = (output, context) => {
|
|
1954
1483
|
return {
|
|
1955
1484
|
allowedOrganizations: output.allowedOrganizations != null
|
|
1956
1485
|
? deserializeAws_restJson1AllowedOrganizations(output.allowedOrganizations, context)
|
|
@@ -1965,27 +1494,28 @@ var deserializeAws_restJson1SamlConfiguration = function (output, context) {
|
|
|
1965
1494
|
roleValues: output.roleValues != null ? deserializeAws_restJson1RoleValues(output.roleValues, context) : undefined,
|
|
1966
1495
|
};
|
|
1967
1496
|
};
|
|
1968
|
-
|
|
1969
|
-
return Object.entries(output).reduce(
|
|
1970
|
-
var _b;
|
|
1971
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1497
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1498
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1972
1499
|
if (value === null) {
|
|
1973
1500
|
return acc;
|
|
1974
1501
|
}
|
|
1975
|
-
return
|
|
1502
|
+
return {
|
|
1503
|
+
...acc,
|
|
1504
|
+
[key]: __expectString(value),
|
|
1505
|
+
};
|
|
1976
1506
|
}, {});
|
|
1977
1507
|
};
|
|
1978
|
-
|
|
1508
|
+
const deserializeAws_restJson1UpdateError = (output, context) => {
|
|
1979
1509
|
return {
|
|
1980
1510
|
causedBy: output.causedBy != null ? deserializeAws_restJson1UpdateInstruction(output.causedBy, context) : undefined,
|
|
1981
1511
|
code: __expectInt32(output.code),
|
|
1982
1512
|
message: __expectString(output.message),
|
|
1983
1513
|
};
|
|
1984
1514
|
};
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
.filter(
|
|
1988
|
-
.map(
|
|
1515
|
+
const deserializeAws_restJson1UpdateErrorList = (output, context) => {
|
|
1516
|
+
const retVal = (output || [])
|
|
1517
|
+
.filter((e) => e != null)
|
|
1518
|
+
.map((entry) => {
|
|
1989
1519
|
if (entry === null) {
|
|
1990
1520
|
return null;
|
|
1991
1521
|
}
|
|
@@ -1993,23 +1523,23 @@ var deserializeAws_restJson1UpdateErrorList = function (output, context) {
|
|
|
1993
1523
|
});
|
|
1994
1524
|
return retVal;
|
|
1995
1525
|
};
|
|
1996
|
-
|
|
1526
|
+
const deserializeAws_restJson1UpdateInstruction = (output, context) => {
|
|
1997
1527
|
return {
|
|
1998
1528
|
action: __expectString(output.action),
|
|
1999
1529
|
role: __expectString(output.role),
|
|
2000
1530
|
users: output.users != null ? deserializeAws_restJson1UserList(output.users, context) : undefined,
|
|
2001
1531
|
};
|
|
2002
1532
|
};
|
|
2003
|
-
|
|
1533
|
+
const deserializeAws_restJson1User = (output, context) => {
|
|
2004
1534
|
return {
|
|
2005
1535
|
id: __expectString(output.id),
|
|
2006
1536
|
type: __expectString(output.type),
|
|
2007
1537
|
};
|
|
2008
1538
|
};
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
.filter(
|
|
2012
|
-
.map(
|
|
1539
|
+
const deserializeAws_restJson1UserList = (output, context) => {
|
|
1540
|
+
const retVal = (output || [])
|
|
1541
|
+
.filter((e) => e != null)
|
|
1542
|
+
.map((entry) => {
|
|
2013
1543
|
if (entry === null) {
|
|
2014
1544
|
return null;
|
|
2015
1545
|
}
|
|
@@ -2017,16 +1547,16 @@ var deserializeAws_restJson1UserList = function (output, context) {
|
|
|
2017
1547
|
});
|
|
2018
1548
|
return retVal;
|
|
2019
1549
|
};
|
|
2020
|
-
|
|
1550
|
+
const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
|
|
2021
1551
|
return {
|
|
2022
1552
|
message: __expectString(output.message),
|
|
2023
1553
|
name: __expectString(output.name),
|
|
2024
1554
|
};
|
|
2025
1555
|
};
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
.filter(
|
|
2029
|
-
.map(
|
|
1556
|
+
const deserializeAws_restJson1ValidationExceptionFieldList = (output, context) => {
|
|
1557
|
+
const retVal = (output || [])
|
|
1558
|
+
.filter((e) => e != null)
|
|
1559
|
+
.map((entry) => {
|
|
2030
1560
|
if (entry === null) {
|
|
2031
1561
|
return null;
|
|
2032
1562
|
}
|
|
@@ -2034,7 +1564,7 @@ var deserializeAws_restJson1ValidationExceptionFieldList = function (output, con
|
|
|
2034
1564
|
});
|
|
2035
1565
|
return retVal;
|
|
2036
1566
|
};
|
|
2037
|
-
|
|
1567
|
+
const deserializeAws_restJson1WorkspaceDescription = (output, context) => {
|
|
2038
1568
|
return {
|
|
2039
1569
|
accountAccessType: __expectString(output.accountAccessType),
|
|
2040
1570
|
authentication: output.authentication != null
|
|
@@ -2070,10 +1600,10 @@ var deserializeAws_restJson1WorkspaceDescription = function (output, context) {
|
|
|
2070
1600
|
workspaceRoleArn: __expectString(output.workspaceRoleArn),
|
|
2071
1601
|
};
|
|
2072
1602
|
};
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
.filter(
|
|
2076
|
-
.map(
|
|
1603
|
+
const deserializeAws_restJson1WorkspaceList = (output, context) => {
|
|
1604
|
+
const retVal = (output || [])
|
|
1605
|
+
.filter((e) => e != null)
|
|
1606
|
+
.map((entry) => {
|
|
2077
1607
|
if (entry === null) {
|
|
2078
1608
|
return null;
|
|
2079
1609
|
}
|
|
@@ -2081,7 +1611,7 @@ var deserializeAws_restJson1WorkspaceList = function (output, context) {
|
|
|
2081
1611
|
});
|
|
2082
1612
|
return retVal;
|
|
2083
1613
|
};
|
|
2084
|
-
|
|
1614
|
+
const deserializeAws_restJson1WorkspaceSummary = (output, context) => {
|
|
2085
1615
|
return {
|
|
2086
1616
|
authentication: output.authentication != null
|
|
2087
1617
|
? deserializeAws_restJson1AuthenticationSummary(output.authentication, context)
|
|
@@ -2100,57 +1630,39 @@ var deserializeAws_restJson1WorkspaceSummary = function (output, context) {
|
|
|
2100
1630
|
tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
|
|
2101
1631
|
};
|
|
2102
1632
|
};
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
});
|
|
2111
|
-
};
|
|
2112
|
-
var collectBody = function (streamBody, context) {
|
|
2113
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1633
|
+
const deserializeMetadata = (output) => ({
|
|
1634
|
+
httpStatusCode: output.statusCode,
|
|
1635
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1636
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1637
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1638
|
+
});
|
|
1639
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
2114
1640
|
if (streamBody instanceof Uint8Array) {
|
|
2115
1641
|
return Promise.resolve(streamBody);
|
|
2116
1642
|
}
|
|
2117
1643
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2118
1644
|
};
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
1645
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1646
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1647
|
+
value !== null &&
|
|
1648
|
+
value !== "" &&
|
|
1649
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1650
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1651
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1652
|
+
if (encoded.length) {
|
|
1653
|
+
return JSON.parse(encoded);
|
|
1654
|
+
}
|
|
1655
|
+
return {};
|
|
1656
|
+
});
|
|
1657
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1658
|
+
const value = await parseBody(errorBody, context);
|
|
1659
|
+
value.message = value.message ?? value.Message;
|
|
1660
|
+
return value;
|
|
2128
1661
|
};
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
}
|
|
2134
|
-
return {};
|
|
2135
|
-
});
|
|
2136
|
-
};
|
|
2137
|
-
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2138
|
-
var value;
|
|
2139
|
-
var _a;
|
|
2140
|
-
return __generator(this, function (_b) {
|
|
2141
|
-
switch (_b.label) {
|
|
2142
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
2143
|
-
case 1:
|
|
2144
|
-
value = _b.sent();
|
|
2145
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2146
|
-
return [2, value];
|
|
2147
|
-
}
|
|
2148
|
-
});
|
|
2149
|
-
}); };
|
|
2150
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
2151
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
2152
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
2153
|
-
var cleanValue = rawValue;
|
|
1662
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1663
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1664
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1665
|
+
let cleanValue = rawValue;
|
|
2154
1666
|
if (typeof cleanValue === "number") {
|
|
2155
1667
|
cleanValue = cleanValue.toString();
|
|
2156
1668
|
}
|
|
@@ -2165,7 +1677,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
2165
1677
|
}
|
|
2166
1678
|
return cleanValue;
|
|
2167
1679
|
};
|
|
2168
|
-
|
|
1680
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2169
1681
|
if (headerKey !== undefined) {
|
|
2170
1682
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2171
1683
|
}
|