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