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