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