@aws-sdk/client-migrationhub-config 3.186.0 → 3.188.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist-es/MigrationHubConfig.js +14 -21
- package/dist-es/MigrationHubConfigClient.js +22 -28
- package/dist-es/commands/CreateHomeRegionControlCommand.js +21 -28
- package/dist-es/commands/DescribeHomeRegionControlsCommand.js +21 -28
- package/dist-es/commands/GetHomeRegionCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/MigrationHubConfigServiceException.js +5 -10
- package/dist-es/models/models_0.js +97 -82
- package/dist-es/pagination/DescribeHomeRegionControlsPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +289 -373
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,325 +1,264 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { MigrationHubConfigServiceException as __BaseException } from "../models/MigrationHubConfigServiceException";
|
|
5
4
|
import { AccessDeniedException, DryRunOperation, InternalServerError, InvalidInputException, ServiceUnavailableException, ThrottlingException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
parsedBody
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
export var deserializeAws_json1_1GetHomeRegionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
178
|
-
var data, contents, response;
|
|
179
|
-
return __generator(this, function (_a) {
|
|
180
|
-
switch (_a.label) {
|
|
181
|
-
case 0:
|
|
182
|
-
if (output.statusCode >= 300) {
|
|
183
|
-
return [2, deserializeAws_json1_1GetHomeRegionCommandError(output, context)];
|
|
184
|
-
}
|
|
185
|
-
return [4, parseBody(output.body, context)];
|
|
186
|
-
case 1:
|
|
187
|
-
data = _a.sent();
|
|
188
|
-
contents = {};
|
|
189
|
-
contents = deserializeAws_json1_1GetHomeRegionResult(data, context);
|
|
190
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
191
|
-
return [2, Promise.resolve(response)];
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
}); };
|
|
195
|
-
var deserializeAws_json1_1GetHomeRegionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
196
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
197
|
-
var _c;
|
|
198
|
-
return __generator(this, function (_d) {
|
|
199
|
-
switch (_d.label) {
|
|
200
|
-
case 0:
|
|
201
|
-
_a = [__assign({}, output)];
|
|
202
|
-
_c = {};
|
|
203
|
-
return [4, parseErrorBody(output.body, context)];
|
|
204
|
-
case 1:
|
|
205
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
206
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
207
|
-
_b = errorCode;
|
|
208
|
-
switch (_b) {
|
|
209
|
-
case "AccessDeniedException": return [3, 2];
|
|
210
|
-
case "com.amazonaws.migrationhubconfig#AccessDeniedException": return [3, 2];
|
|
211
|
-
case "InternalServerError": return [3, 4];
|
|
212
|
-
case "com.amazonaws.migrationhubconfig#InternalServerError": return [3, 4];
|
|
213
|
-
case "InvalidInputException": return [3, 6];
|
|
214
|
-
case "com.amazonaws.migrationhubconfig#InvalidInputException": return [3, 6];
|
|
215
|
-
case "ServiceUnavailableException": return [3, 8];
|
|
216
|
-
case "com.amazonaws.migrationhubconfig#ServiceUnavailableException": return [3, 8];
|
|
217
|
-
case "ThrottlingException": return [3, 10];
|
|
218
|
-
case "com.amazonaws.migrationhubconfig#ThrottlingException": return [3, 10];
|
|
219
|
-
}
|
|
220
|
-
return [3, 12];
|
|
221
|
-
case 2: return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
222
|
-
case 3: throw _d.sent();
|
|
223
|
-
case 4: return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
224
|
-
case 5: throw _d.sent();
|
|
225
|
-
case 6: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
|
|
226
|
-
case 7: throw _d.sent();
|
|
227
|
-
case 8: return [4, deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
228
|
-
case 9: throw _d.sent();
|
|
229
|
-
case 10: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
230
|
-
case 11: throw _d.sent();
|
|
231
|
-
case 12:
|
|
232
|
-
parsedBody = parsedOutput.body;
|
|
233
|
-
throwDefaultError({
|
|
234
|
-
output: output,
|
|
235
|
-
parsedBody: parsedBody,
|
|
236
|
-
exceptionCtor: __BaseException,
|
|
237
|
-
errorCode: errorCode,
|
|
238
|
-
});
|
|
239
|
-
_d.label = 13;
|
|
240
|
-
case 13: return [2];
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
}); };
|
|
244
|
-
var deserializeAws_json1_1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
245
|
-
var body, deserialized, exception;
|
|
246
|
-
return __generator(this, function (_a) {
|
|
247
|
-
body = parsedOutput.body;
|
|
248
|
-
deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
|
|
249
|
-
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
250
|
-
return [2, __decorateServiceException(exception, body)];
|
|
5
|
+
export const serializeAws_json1_1CreateHomeRegionControlCommand = async (input, context) => {
|
|
6
|
+
const headers = {
|
|
7
|
+
"content-type": "application/x-amz-json-1.1",
|
|
8
|
+
"x-amz-target": "AWSMigrationHubMultiAccountService.CreateHomeRegionControl",
|
|
9
|
+
};
|
|
10
|
+
let body;
|
|
11
|
+
body = JSON.stringify(serializeAws_json1_1CreateHomeRegionControlRequest(input, context));
|
|
12
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
+
};
|
|
14
|
+
export const serializeAws_json1_1DescribeHomeRegionControlsCommand = async (input, context) => {
|
|
15
|
+
const headers = {
|
|
16
|
+
"content-type": "application/x-amz-json-1.1",
|
|
17
|
+
"x-amz-target": "AWSMigrationHubMultiAccountService.DescribeHomeRegionControls",
|
|
18
|
+
};
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify(serializeAws_json1_1DescribeHomeRegionControlsRequest(input, context));
|
|
21
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
+
};
|
|
23
|
+
export const serializeAws_json1_1GetHomeRegionCommand = async (input, context) => {
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/x-amz-json-1.1",
|
|
26
|
+
"x-amz-target": "AWSMigrationHubMultiAccountService.GetHomeRegion",
|
|
27
|
+
};
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(serializeAws_json1_1GetHomeRegionRequest(input, context));
|
|
30
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
+
};
|
|
32
|
+
export const deserializeAws_json1_1CreateHomeRegionControlCommand = async (output, context) => {
|
|
33
|
+
if (output.statusCode >= 300) {
|
|
34
|
+
return deserializeAws_json1_1CreateHomeRegionControlCommandError(output, context);
|
|
35
|
+
}
|
|
36
|
+
const data = await parseBody(output.body, context);
|
|
37
|
+
let contents = {};
|
|
38
|
+
contents = deserializeAws_json1_1CreateHomeRegionControlResult(data, context);
|
|
39
|
+
const response = {
|
|
40
|
+
$metadata: deserializeMetadata(output),
|
|
41
|
+
...contents,
|
|
42
|
+
};
|
|
43
|
+
return Promise.resolve(response);
|
|
44
|
+
};
|
|
45
|
+
const deserializeAws_json1_1CreateHomeRegionControlCommandError = async (output, context) => {
|
|
46
|
+
const parsedOutput = {
|
|
47
|
+
...output,
|
|
48
|
+
body: await parseErrorBody(output.body, context),
|
|
49
|
+
};
|
|
50
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
51
|
+
switch (errorCode) {
|
|
52
|
+
case "AccessDeniedException":
|
|
53
|
+
case "com.amazonaws.migrationhubconfig#AccessDeniedException":
|
|
54
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
55
|
+
case "DryRunOperation":
|
|
56
|
+
case "com.amazonaws.migrationhubconfig#DryRunOperation":
|
|
57
|
+
throw await deserializeAws_json1_1DryRunOperationResponse(parsedOutput, context);
|
|
58
|
+
case "InternalServerError":
|
|
59
|
+
case "com.amazonaws.migrationhubconfig#InternalServerError":
|
|
60
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
61
|
+
case "InvalidInputException":
|
|
62
|
+
case "com.amazonaws.migrationhubconfig#InvalidInputException":
|
|
63
|
+
throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
|
|
64
|
+
case "ServiceUnavailableException":
|
|
65
|
+
case "com.amazonaws.migrationhubconfig#ServiceUnavailableException":
|
|
66
|
+
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
67
|
+
case "ThrottlingException":
|
|
68
|
+
case "com.amazonaws.migrationhubconfig#ThrottlingException":
|
|
69
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
70
|
+
default:
|
|
71
|
+
const parsedBody = parsedOutput.body;
|
|
72
|
+
throwDefaultError({
|
|
73
|
+
output,
|
|
74
|
+
parsedBody,
|
|
75
|
+
exceptionCtor: __BaseException,
|
|
76
|
+
errorCode,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export const deserializeAws_json1_1DescribeHomeRegionControlsCommand = async (output, context) => {
|
|
81
|
+
if (output.statusCode >= 300) {
|
|
82
|
+
return deserializeAws_json1_1DescribeHomeRegionControlsCommandError(output, context);
|
|
83
|
+
}
|
|
84
|
+
const data = await parseBody(output.body, context);
|
|
85
|
+
let contents = {};
|
|
86
|
+
contents = deserializeAws_json1_1DescribeHomeRegionControlsResult(data, context);
|
|
87
|
+
const response = {
|
|
88
|
+
$metadata: deserializeMetadata(output),
|
|
89
|
+
...contents,
|
|
90
|
+
};
|
|
91
|
+
return Promise.resolve(response);
|
|
92
|
+
};
|
|
93
|
+
const deserializeAws_json1_1DescribeHomeRegionControlsCommandError = async (output, context) => {
|
|
94
|
+
const parsedOutput = {
|
|
95
|
+
...output,
|
|
96
|
+
body: await parseErrorBody(output.body, context),
|
|
97
|
+
};
|
|
98
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
99
|
+
switch (errorCode) {
|
|
100
|
+
case "AccessDeniedException":
|
|
101
|
+
case "com.amazonaws.migrationhubconfig#AccessDeniedException":
|
|
102
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
103
|
+
case "InternalServerError":
|
|
104
|
+
case "com.amazonaws.migrationhubconfig#InternalServerError":
|
|
105
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
106
|
+
case "InvalidInputException":
|
|
107
|
+
case "com.amazonaws.migrationhubconfig#InvalidInputException":
|
|
108
|
+
throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
|
|
109
|
+
case "ServiceUnavailableException":
|
|
110
|
+
case "com.amazonaws.migrationhubconfig#ServiceUnavailableException":
|
|
111
|
+
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
112
|
+
case "ThrottlingException":
|
|
113
|
+
case "com.amazonaws.migrationhubconfig#ThrottlingException":
|
|
114
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
115
|
+
default:
|
|
116
|
+
const parsedBody = parsedOutput.body;
|
|
117
|
+
throwDefaultError({
|
|
118
|
+
output,
|
|
119
|
+
parsedBody,
|
|
120
|
+
exceptionCtor: __BaseException,
|
|
121
|
+
errorCode,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
export const deserializeAws_json1_1GetHomeRegionCommand = async (output, context) => {
|
|
126
|
+
if (output.statusCode >= 300) {
|
|
127
|
+
return deserializeAws_json1_1GetHomeRegionCommandError(output, context);
|
|
128
|
+
}
|
|
129
|
+
const data = await parseBody(output.body, context);
|
|
130
|
+
let contents = {};
|
|
131
|
+
contents = deserializeAws_json1_1GetHomeRegionResult(data, context);
|
|
132
|
+
const response = {
|
|
133
|
+
$metadata: deserializeMetadata(output),
|
|
134
|
+
...contents,
|
|
135
|
+
};
|
|
136
|
+
return Promise.resolve(response);
|
|
137
|
+
};
|
|
138
|
+
const deserializeAws_json1_1GetHomeRegionCommandError = async (output, context) => {
|
|
139
|
+
const parsedOutput = {
|
|
140
|
+
...output,
|
|
141
|
+
body: await parseErrorBody(output.body, context),
|
|
142
|
+
};
|
|
143
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
144
|
+
switch (errorCode) {
|
|
145
|
+
case "AccessDeniedException":
|
|
146
|
+
case "com.amazonaws.migrationhubconfig#AccessDeniedException":
|
|
147
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
148
|
+
case "InternalServerError":
|
|
149
|
+
case "com.amazonaws.migrationhubconfig#InternalServerError":
|
|
150
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
151
|
+
case "InvalidInputException":
|
|
152
|
+
case "com.amazonaws.migrationhubconfig#InvalidInputException":
|
|
153
|
+
throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
|
|
154
|
+
case "ServiceUnavailableException":
|
|
155
|
+
case "com.amazonaws.migrationhubconfig#ServiceUnavailableException":
|
|
156
|
+
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
157
|
+
case "ThrottlingException":
|
|
158
|
+
case "com.amazonaws.migrationhubconfig#ThrottlingException":
|
|
159
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
160
|
+
default:
|
|
161
|
+
const parsedBody = parsedOutput.body;
|
|
162
|
+
throwDefaultError({
|
|
163
|
+
output,
|
|
164
|
+
parsedBody,
|
|
165
|
+
exceptionCtor: __BaseException,
|
|
166
|
+
errorCode,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
171
|
+
const body = parsedOutput.body;
|
|
172
|
+
const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
|
|
173
|
+
const exception = new AccessDeniedException({
|
|
174
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
175
|
+
...deserialized,
|
|
251
176
|
});
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
177
|
+
return __decorateServiceException(exception, body);
|
|
178
|
+
};
|
|
179
|
+
const deserializeAws_json1_1DryRunOperationResponse = async (parsedOutput, context) => {
|
|
180
|
+
const body = parsedOutput.body;
|
|
181
|
+
const deserialized = deserializeAws_json1_1DryRunOperation(body, context);
|
|
182
|
+
const exception = new DryRunOperation({
|
|
183
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
184
|
+
...deserialized,
|
|
260
185
|
});
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
186
|
+
return __decorateServiceException(exception, body);
|
|
187
|
+
};
|
|
188
|
+
const deserializeAws_json1_1InternalServerErrorResponse = async (parsedOutput, context) => {
|
|
189
|
+
const body = parsedOutput.body;
|
|
190
|
+
const deserialized = deserializeAws_json1_1InternalServerError(body, context);
|
|
191
|
+
const exception = new InternalServerError({
|
|
192
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
193
|
+
...deserialized,
|
|
269
194
|
});
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
195
|
+
return __decorateServiceException(exception, body);
|
|
196
|
+
};
|
|
197
|
+
const deserializeAws_json1_1InvalidInputExceptionResponse = async (parsedOutput, context) => {
|
|
198
|
+
const body = parsedOutput.body;
|
|
199
|
+
const deserialized = deserializeAws_json1_1InvalidInputException(body, context);
|
|
200
|
+
const exception = new InvalidInputException({
|
|
201
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
202
|
+
...deserialized,
|
|
278
203
|
});
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
204
|
+
return __decorateServiceException(exception, body);
|
|
205
|
+
};
|
|
206
|
+
const deserializeAws_json1_1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
|
|
207
|
+
const body = parsedOutput.body;
|
|
208
|
+
const deserialized = deserializeAws_json1_1ServiceUnavailableException(body, context);
|
|
209
|
+
const exception = new ServiceUnavailableException({
|
|
210
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
211
|
+
...deserialized,
|
|
287
212
|
});
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
213
|
+
return __decorateServiceException(exception, body);
|
|
214
|
+
};
|
|
215
|
+
const deserializeAws_json1_1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
216
|
+
const body = parsedOutput.body;
|
|
217
|
+
const deserialized = deserializeAws_json1_1ThrottlingException(body, context);
|
|
218
|
+
const exception = new ThrottlingException({
|
|
219
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
220
|
+
...deserialized,
|
|
296
221
|
});
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
222
|
+
return __decorateServiceException(exception, body);
|
|
223
|
+
};
|
|
224
|
+
const serializeAws_json1_1CreateHomeRegionControlRequest = (input, context) => {
|
|
225
|
+
return {
|
|
226
|
+
...(input.DryRun != null && { DryRun: input.DryRun }),
|
|
227
|
+
...(input.HomeRegion != null && { HomeRegion: input.HomeRegion }),
|
|
228
|
+
...(input.Target != null && { Target: serializeAws_json1_1Target(input.Target, context) }),
|
|
229
|
+
};
|
|
300
230
|
};
|
|
301
|
-
|
|
302
|
-
return
|
|
231
|
+
const serializeAws_json1_1DescribeHomeRegionControlsRequest = (input, context) => {
|
|
232
|
+
return {
|
|
233
|
+
...(input.ControlId != null && { ControlId: input.ControlId }),
|
|
234
|
+
...(input.HomeRegion != null && { HomeRegion: input.HomeRegion }),
|
|
235
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
236
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
237
|
+
...(input.Target != null && { Target: serializeAws_json1_1Target(input.Target, context) }),
|
|
238
|
+
};
|
|
303
239
|
};
|
|
304
|
-
|
|
240
|
+
const serializeAws_json1_1GetHomeRegionRequest = (input, context) => {
|
|
305
241
|
return {};
|
|
306
242
|
};
|
|
307
|
-
|
|
308
|
-
return
|
|
243
|
+
const serializeAws_json1_1Target = (input, context) => {
|
|
244
|
+
return {
|
|
245
|
+
...(input.Id != null && { Id: input.Id }),
|
|
246
|
+
...(input.Type != null && { Type: input.Type }),
|
|
247
|
+
};
|
|
309
248
|
};
|
|
310
|
-
|
|
249
|
+
const deserializeAws_json1_1AccessDeniedException = (output, context) => {
|
|
311
250
|
return {
|
|
312
251
|
Message: __expectString(output.Message),
|
|
313
252
|
};
|
|
314
253
|
};
|
|
315
|
-
|
|
254
|
+
const deserializeAws_json1_1CreateHomeRegionControlResult = (output, context) => {
|
|
316
255
|
return {
|
|
317
256
|
HomeRegionControl: output.HomeRegionControl != null
|
|
318
257
|
? deserializeAws_json1_1HomeRegionControl(output.HomeRegionControl, context)
|
|
319
258
|
: undefined,
|
|
320
259
|
};
|
|
321
260
|
};
|
|
322
|
-
|
|
261
|
+
const deserializeAws_json1_1DescribeHomeRegionControlsResult = (output, context) => {
|
|
323
262
|
return {
|
|
324
263
|
HomeRegionControls: output.HomeRegionControls != null
|
|
325
264
|
? deserializeAws_json1_1HomeRegionControls(output.HomeRegionControls, context)
|
|
@@ -327,17 +266,17 @@ var deserializeAws_json1_1DescribeHomeRegionControlsResult = function (output, c
|
|
|
327
266
|
NextToken: __expectString(output.NextToken),
|
|
328
267
|
};
|
|
329
268
|
};
|
|
330
|
-
|
|
269
|
+
const deserializeAws_json1_1DryRunOperation = (output, context) => {
|
|
331
270
|
return {
|
|
332
271
|
Message: __expectString(output.Message),
|
|
333
272
|
};
|
|
334
273
|
};
|
|
335
|
-
|
|
274
|
+
const deserializeAws_json1_1GetHomeRegionResult = (output, context) => {
|
|
336
275
|
return {
|
|
337
276
|
HomeRegion: __expectString(output.HomeRegion),
|
|
338
277
|
};
|
|
339
278
|
};
|
|
340
|
-
|
|
279
|
+
const deserializeAws_json1_1HomeRegionControl = (output, context) => {
|
|
341
280
|
return {
|
|
342
281
|
ControlId: __expectString(output.ControlId),
|
|
343
282
|
HomeRegion: __expectString(output.HomeRegion),
|
|
@@ -347,10 +286,10 @@ var deserializeAws_json1_1HomeRegionControl = function (output, context) {
|
|
|
347
286
|
Target: output.Target != null ? deserializeAws_json1_1Target(output.Target, context) : undefined,
|
|
348
287
|
};
|
|
349
288
|
};
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
.filter(
|
|
353
|
-
.map(
|
|
289
|
+
const deserializeAws_json1_1HomeRegionControls = (output, context) => {
|
|
290
|
+
const retVal = (output || [])
|
|
291
|
+
.filter((e) => e != null)
|
|
292
|
+
.map((entry) => {
|
|
354
293
|
if (entry === null) {
|
|
355
294
|
return null;
|
|
356
295
|
}
|
|
@@ -358,102 +297,79 @@ var deserializeAws_json1_1HomeRegionControls = function (output, context) {
|
|
|
358
297
|
});
|
|
359
298
|
return retVal;
|
|
360
299
|
};
|
|
361
|
-
|
|
300
|
+
const deserializeAws_json1_1InternalServerError = (output, context) => {
|
|
362
301
|
return {
|
|
363
302
|
Message: __expectString(output.Message),
|
|
364
303
|
};
|
|
365
304
|
};
|
|
366
|
-
|
|
305
|
+
const deserializeAws_json1_1InvalidInputException = (output, context) => {
|
|
367
306
|
return {
|
|
368
307
|
Message: __expectString(output.Message),
|
|
369
308
|
};
|
|
370
309
|
};
|
|
371
|
-
|
|
310
|
+
const deserializeAws_json1_1ServiceUnavailableException = (output, context) => {
|
|
372
311
|
return {
|
|
373
312
|
Message: __expectString(output.Message),
|
|
374
313
|
};
|
|
375
314
|
};
|
|
376
|
-
|
|
315
|
+
const deserializeAws_json1_1Target = (output, context) => {
|
|
377
316
|
return {
|
|
378
317
|
Id: __expectString(output.Id),
|
|
379
318
|
Type: __expectString(output.Type),
|
|
380
319
|
};
|
|
381
320
|
};
|
|
382
|
-
|
|
321
|
+
const deserializeAws_json1_1ThrottlingException = (output, context) => {
|
|
383
322
|
return {
|
|
384
323
|
Message: __expectString(output.Message),
|
|
385
324
|
RetryAfterSeconds: __expectInt32(output.RetryAfterSeconds),
|
|
386
325
|
};
|
|
387
326
|
};
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
});
|
|
396
|
-
};
|
|
397
|
-
var collectBody = function (streamBody, context) {
|
|
398
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
327
|
+
const deserializeMetadata = (output) => ({
|
|
328
|
+
httpStatusCode: output.statusCode,
|
|
329
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
330
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
331
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
332
|
+
});
|
|
333
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
399
334
|
if (streamBody instanceof Uint8Array) {
|
|
400
335
|
return Promise.resolve(streamBody);
|
|
401
336
|
}
|
|
402
337
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
403
338
|
};
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
};
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
if (resolvedHostname !== undefined) {
|
|
423
|
-
contents.hostname = resolvedHostname;
|
|
424
|
-
}
|
|
425
|
-
if (body !== undefined) {
|
|
426
|
-
contents.body = body;
|
|
427
|
-
}
|
|
428
|
-
return [2, new __HttpRequest(contents)];
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
}); };
|
|
432
|
-
var parseBody = function (streamBody, context) {
|
|
433
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
434
|
-
if (encoded.length) {
|
|
435
|
-
return JSON.parse(encoded);
|
|
436
|
-
}
|
|
437
|
-
return {};
|
|
438
|
-
});
|
|
339
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
340
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
341
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
342
|
+
const contents = {
|
|
343
|
+
protocol,
|
|
344
|
+
hostname,
|
|
345
|
+
port,
|
|
346
|
+
method: "POST",
|
|
347
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
348
|
+
headers,
|
|
349
|
+
};
|
|
350
|
+
if (resolvedHostname !== undefined) {
|
|
351
|
+
contents.hostname = resolvedHostname;
|
|
352
|
+
}
|
|
353
|
+
if (body !== undefined) {
|
|
354
|
+
contents.body = body;
|
|
355
|
+
}
|
|
356
|
+
return new __HttpRequest(contents);
|
|
439
357
|
};
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
456
|
-
var cleanValue = rawValue;
|
|
358
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
359
|
+
if (encoded.length) {
|
|
360
|
+
return JSON.parse(encoded);
|
|
361
|
+
}
|
|
362
|
+
return {};
|
|
363
|
+
});
|
|
364
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
365
|
+
const value = await parseBody(errorBody, context);
|
|
366
|
+
value.message = value.message ?? value.Message;
|
|
367
|
+
return value;
|
|
368
|
+
};
|
|
369
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
370
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
371
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
372
|
+
let cleanValue = rawValue;
|
|
457
373
|
if (typeof cleanValue === "number") {
|
|
458
374
|
cleanValue = cleanValue.toString();
|
|
459
375
|
}
|
|
@@ -468,7 +384,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
468
384
|
}
|
|
469
385
|
return cleanValue;
|
|
470
386
|
};
|
|
471
|
-
|
|
387
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
472
388
|
if (headerKey !== undefined) {
|
|
473
389
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
474
390
|
}
|