@cdklabs/cdk-ecs-codedeploy 0.0.129 → 0.0.131

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.
Files changed (38) hide show
  1. package/.jsii +3 -3
  2. package/API.md +156 -0
  3. package/lib/api-canary/index.js +1 -1
  4. package/lib/ecs-appspec/index.js +1 -1
  5. package/lib/ecs-deployment/index.js +1 -1
  6. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
  7. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/protocols/Aws_json1_1.js +561 -2630
  8. package/node_modules/@aws-sdk/client-codedeploy/dist-es/protocols/Aws_json1_1.js +562 -2631
  9. package/node_modules/@aws-sdk/client-codedeploy/package.json +6 -6
  10. package/node_modules/@aws-sdk/client-sso/dist-cjs/protocols/Aws_restJson1.js +50 -94
  11. package/node_modules/@aws-sdk/client-sso/dist-es/protocols/Aws_restJson1.js +36 -80
  12. package/node_modules/@aws-sdk/client-sso/package.json +4 -4
  13. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/protocols/Aws_restJson1.js +125 -172
  14. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js +111 -158
  15. package/node_modules/@aws-sdk/client-sso-oidc/package.json +4 -4
  16. package/node_modules/@aws-sdk/client-sts/dist-cjs/protocols/Aws_query.js +17 -24
  17. package/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js +18 -25
  18. package/node_modules/@aws-sdk/client-sts/package.json +5 -5
  19. package/node_modules/@aws-sdk/credential-provider-ini/package.json +2 -2
  20. package/node_modules/@aws-sdk/credential-provider-node/package.json +3 -3
  21. package/node_modules/@aws-sdk/credential-provider-sso/package.json +3 -3
  22. package/node_modules/@aws-sdk/smithy-client/dist-cjs/default-error-handler.js +7 -1
  23. package/node_modules/@aws-sdk/smithy-client/dist-cjs/index.js +1 -0
  24. package/node_modules/@aws-sdk/smithy-client/dist-cjs/serde-json.js +23 -0
  25. package/node_modules/@aws-sdk/smithy-client/dist-es/default-error-handler.js +5 -0
  26. package/node_modules/@aws-sdk/smithy-client/dist-es/index.js +1 -0
  27. package/node_modules/@aws-sdk/smithy-client/dist-es/serde-json.js +19 -0
  28. package/node_modules/@aws-sdk/smithy-client/dist-types/default-error-handler.d.ts +6 -0
  29. package/node_modules/@aws-sdk/smithy-client/dist-types/index.d.ts +1 -0
  30. package/node_modules/@aws-sdk/smithy-client/dist-types/serde-json.d.ts +10 -0
  31. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/default-error-handler.d.ts +3 -0
  32. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/index.d.ts +1 -0
  33. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/serde-json.d.ts +1 -0
  34. package/node_modules/@aws-sdk/smithy-client/package.json +1 -1
  35. package/node_modules/@aws-sdk/token-providers/package.json +2 -2
  36. package/node_modules/@aws-sdk/util-defaults-mode-browser/package.json +2 -2
  37. package/node_modules/@aws-sdk/util-defaults-mode-node/package.json +2 -2
  38. package/package.json +6 -6
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-codedeploy",
3
3
  "description": "AWS SDK for JavaScript Codedeploy Client for Node.js, Browser and React Native",
4
- "version": "3.312.0",
4
+ "version": "3.315.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.312.0",
24
+ "@aws-sdk/client-sts": "3.315.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.310.0",
26
+ "@aws-sdk/credential-provider-node": "3.315.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -40,14 +40,14 @@
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.310.0",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
43
- "@aws-sdk/smithy-client": "3.310.0",
43
+ "@aws-sdk/smithy-client": "3.315.0",
44
44
  "@aws-sdk/types": "3.310.0",
45
45
  "@aws-sdk/url-parser": "3.310.0",
46
46
  "@aws-sdk/util-base64": "3.310.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.310.0",
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.310.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.310.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.315.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.315.0",
51
51
  "@aws-sdk/util-endpoints": "3.310.0",
52
52
  "@aws-sdk/util-retry": "3.310.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",
@@ -7,11 +7,11 @@ const models_0_1 = require("../models/models_0");
7
7
  const SSOServiceException_1 = require("../models/SSOServiceException");
8
8
  const se_GetRoleCredentialsCommand = async (input, context) => {
9
9
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
- const headers = map({}, isSerializableHeaderValue, {
10
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
11
11
  "x-amz-sso_bearer_token": input.accessToken,
12
12
  });
13
13
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/federation/credentials";
14
- const query = map({
14
+ const query = (0, smithy_client_1.map)({
15
15
  role_name: [, (0, smithy_client_1.expectNonNull)(input.roleName, `roleName`)],
16
16
  account_id: [, (0, smithy_client_1.expectNonNull)(input.accountId, `accountId`)],
17
17
  });
@@ -30,11 +30,11 @@ const se_GetRoleCredentialsCommand = async (input, context) => {
30
30
  exports.se_GetRoleCredentialsCommand = se_GetRoleCredentialsCommand;
31
31
  const se_ListAccountRolesCommand = async (input, context) => {
32
32
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
33
- const headers = map({}, isSerializableHeaderValue, {
33
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
34
34
  "x-amz-sso_bearer_token": input.accessToken,
35
35
  });
36
36
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/roles";
37
- const query = map({
37
+ const query = (0, smithy_client_1.map)({
38
38
  next_token: [, input.nextToken],
39
39
  max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
40
40
  account_id: [, (0, smithy_client_1.expectNonNull)(input.accountId, `accountId`)],
@@ -54,11 +54,11 @@ const se_ListAccountRolesCommand = async (input, context) => {
54
54
  exports.se_ListAccountRolesCommand = se_ListAccountRolesCommand;
55
55
  const se_ListAccountsCommand = async (input, context) => {
56
56
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
57
- const headers = map({}, isSerializableHeaderValue, {
57
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
58
58
  "x-amz-sso_bearer_token": input.accessToken,
59
59
  });
60
60
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/accounts";
61
- const query = map({
61
+ const query = (0, smithy_client_1.map)({
62
62
  next_token: [, input.nextToken],
63
63
  max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
64
64
  });
@@ -77,7 +77,7 @@ const se_ListAccountsCommand = async (input, context) => {
77
77
  exports.se_ListAccountsCommand = se_ListAccountsCommand;
78
78
  const se_LogoutCommand = async (input, context) => {
79
79
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
80
- const headers = map({}, isSerializableHeaderValue, {
80
+ const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
81
81
  "x-amz-sso_bearer_token": input.accessToken,
82
82
  });
83
83
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logout";
@@ -97,13 +97,14 @@ const de_GetRoleCredentialsCommand = async (output, context) => {
97
97
  if (output.statusCode !== 200 && output.statusCode >= 300) {
98
98
  return de_GetRoleCredentialsCommandError(output, context);
99
99
  }
100
- const contents = map({
100
+ const contents = (0, smithy_client_1.map)({
101
101
  $metadata: deserializeMetadata(output),
102
102
  });
103
103
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
104
- if (data.roleCredentials != null) {
105
- contents.roleCredentials = de_RoleCredentials(data.roleCredentials, context);
106
- }
104
+ const doc = (0, smithy_client_1.take)(data, {
105
+ roleCredentials: smithy_client_1._json,
106
+ });
107
+ Object.assign(contents, doc);
107
108
  return contents;
108
109
  };
109
110
  exports.de_GetRoleCredentialsCommand = de_GetRoleCredentialsCommand;
@@ -128,10 +129,9 @@ const de_GetRoleCredentialsCommandError = async (output, context) => {
128
129
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
129
130
  default:
130
131
  const parsedBody = parsedOutput.body;
131
- (0, smithy_client_1.throwDefaultError)({
132
+ return throwDefaultError({
132
133
  output,
133
134
  parsedBody,
134
- exceptionCtor: SSOServiceException_1.SSOServiceException,
135
135
  errorCode,
136
136
  });
137
137
  }
@@ -140,16 +140,15 @@ const de_ListAccountRolesCommand = async (output, context) => {
140
140
  if (output.statusCode !== 200 && output.statusCode >= 300) {
141
141
  return de_ListAccountRolesCommandError(output, context);
142
142
  }
143
- const contents = map({
143
+ const contents = (0, smithy_client_1.map)({
144
144
  $metadata: deserializeMetadata(output),
145
145
  });
146
146
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
147
- if (data.nextToken != null) {
148
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
149
- }
150
- if (data.roleList != null) {
151
- contents.roleList = de_RoleListType(data.roleList, context);
152
- }
147
+ const doc = (0, smithy_client_1.take)(data, {
148
+ nextToken: smithy_client_1.expectString,
149
+ roleList: smithy_client_1._json,
150
+ });
151
+ Object.assign(contents, doc);
153
152
  return contents;
154
153
  };
155
154
  exports.de_ListAccountRolesCommand = de_ListAccountRolesCommand;
@@ -174,10 +173,9 @@ const de_ListAccountRolesCommandError = async (output, context) => {
174
173
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
175
174
  default:
176
175
  const parsedBody = parsedOutput.body;
177
- (0, smithy_client_1.throwDefaultError)({
176
+ return throwDefaultError({
178
177
  output,
179
178
  parsedBody,
180
- exceptionCtor: SSOServiceException_1.SSOServiceException,
181
179
  errorCode,
182
180
  });
183
181
  }
@@ -186,16 +184,15 @@ const de_ListAccountsCommand = async (output, context) => {
186
184
  if (output.statusCode !== 200 && output.statusCode >= 300) {
187
185
  return de_ListAccountsCommandError(output, context);
188
186
  }
189
- const contents = map({
187
+ const contents = (0, smithy_client_1.map)({
190
188
  $metadata: deserializeMetadata(output),
191
189
  });
192
190
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
193
- if (data.accountList != null) {
194
- contents.accountList = de_AccountListType(data.accountList, context);
195
- }
196
- if (data.nextToken != null) {
197
- contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
198
- }
191
+ const doc = (0, smithy_client_1.take)(data, {
192
+ accountList: smithy_client_1._json,
193
+ nextToken: smithy_client_1.expectString,
194
+ });
195
+ Object.assign(contents, doc);
199
196
  return contents;
200
197
  };
201
198
  exports.de_ListAccountsCommand = de_ListAccountsCommand;
@@ -220,10 +217,9 @@ const de_ListAccountsCommandError = async (output, context) => {
220
217
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
221
218
  default:
222
219
  const parsedBody = parsedOutput.body;
223
- (0, smithy_client_1.throwDefaultError)({
220
+ return throwDefaultError({
224
221
  output,
225
222
  parsedBody,
226
- exceptionCtor: SSOServiceException_1.SSOServiceException,
227
223
  errorCode,
228
224
  });
229
225
  }
@@ -232,7 +228,7 @@ const de_LogoutCommand = async (output, context) => {
232
228
  if (output.statusCode !== 200 && output.statusCode >= 300) {
233
229
  return de_LogoutCommandError(output, context);
234
230
  }
235
- const contents = map({
231
+ const contents = (0, smithy_client_1.map)({
236
232
  $metadata: deserializeMetadata(output),
237
233
  });
238
234
  await collectBody(output.body, context);
@@ -257,21 +253,21 @@ const de_LogoutCommandError = async (output, context) => {
257
253
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
258
254
  default:
259
255
  const parsedBody = parsedOutput.body;
260
- (0, smithy_client_1.throwDefaultError)({
256
+ return throwDefaultError({
261
257
  output,
262
258
  parsedBody,
263
- exceptionCtor: SSOServiceException_1.SSOServiceException,
264
259
  errorCode,
265
260
  });
266
261
  }
267
262
  };
268
- const map = smithy_client_1.map;
263
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(SSOServiceException_1.SSOServiceException);
269
264
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
270
- const contents = map({});
265
+ const contents = (0, smithy_client_1.map)({});
271
266
  const data = parsedOutput.body;
272
- if (data.message != null) {
273
- contents.message = (0, smithy_client_1.expectString)(data.message);
274
- }
267
+ const doc = (0, smithy_client_1.take)(data, {
268
+ message: smithy_client_1.expectString,
269
+ });
270
+ Object.assign(contents, doc);
275
271
  const exception = new models_0_1.InvalidRequestException({
276
272
  $metadata: deserializeMetadata(parsedOutput),
277
273
  ...contents,
@@ -279,11 +275,12 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
279
275
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
280
276
  };
281
277
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
282
- const contents = map({});
278
+ const contents = (0, smithy_client_1.map)({});
283
279
  const data = parsedOutput.body;
284
- if (data.message != null) {
285
- contents.message = (0, smithy_client_1.expectString)(data.message);
286
- }
280
+ const doc = (0, smithy_client_1.take)(data, {
281
+ message: smithy_client_1.expectString,
282
+ });
283
+ Object.assign(contents, doc);
287
284
  const exception = new models_0_1.ResourceNotFoundException({
288
285
  $metadata: deserializeMetadata(parsedOutput),
289
286
  ...contents,
@@ -291,11 +288,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
291
288
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
292
289
  };
293
290
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
294
- const contents = map({});
291
+ const contents = (0, smithy_client_1.map)({});
295
292
  const data = parsedOutput.body;
296
- if (data.message != null) {
297
- contents.message = (0, smithy_client_1.expectString)(data.message);
298
- }
293
+ const doc = (0, smithy_client_1.take)(data, {
294
+ message: smithy_client_1.expectString,
295
+ });
296
+ Object.assign(contents, doc);
299
297
  const exception = new models_0_1.TooManyRequestsException({
300
298
  $metadata: deserializeMetadata(parsedOutput),
301
299
  ...contents,
@@ -303,60 +301,18 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
303
301
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
304
302
  };
305
303
  const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
306
- const contents = map({});
304
+ const contents = (0, smithy_client_1.map)({});
307
305
  const data = parsedOutput.body;
308
- if (data.message != null) {
309
- contents.message = (0, smithy_client_1.expectString)(data.message);
310
- }
306
+ const doc = (0, smithy_client_1.take)(data, {
307
+ message: smithy_client_1.expectString,
308
+ });
309
+ Object.assign(contents, doc);
311
310
  const exception = new models_0_1.UnauthorizedException({
312
311
  $metadata: deserializeMetadata(parsedOutput),
313
312
  ...contents,
314
313
  });
315
314
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
316
315
  };
317
- const de_AccountInfo = (output, context) => {
318
- return {
319
- accountId: (0, smithy_client_1.expectString)(output.accountId),
320
- accountName: (0, smithy_client_1.expectString)(output.accountName),
321
- emailAddress: (0, smithy_client_1.expectString)(output.emailAddress),
322
- };
323
- };
324
- const de_AccountListType = (output, context) => {
325
- const retVal = (output || [])
326
- .filter((e) => e != null)
327
- .map((entry) => {
328
- if (entry === null) {
329
- return null;
330
- }
331
- return de_AccountInfo(entry, context);
332
- });
333
- return retVal;
334
- };
335
- const de_RoleCredentials = (output, context) => {
336
- return {
337
- accessKeyId: (0, smithy_client_1.expectString)(output.accessKeyId),
338
- expiration: (0, smithy_client_1.expectLong)(output.expiration),
339
- secretAccessKey: (0, smithy_client_1.expectString)(output.secretAccessKey),
340
- sessionToken: (0, smithy_client_1.expectString)(output.sessionToken),
341
- };
342
- };
343
- const de_RoleInfo = (output, context) => {
344
- return {
345
- accountId: (0, smithy_client_1.expectString)(output.accountId),
346
- roleName: (0, smithy_client_1.expectString)(output.roleName),
347
- };
348
- };
349
- const de_RoleListType = (output, context) => {
350
- const retVal = (output || [])
351
- .filter((e) => e != null)
352
- .map((entry) => {
353
- if (entry === null) {
354
- return null;
355
- }
356
- return de_RoleInfo(entry, context);
357
- });
358
- return retVal;
359
- };
360
316
  const deserializeMetadata = (output) => ({
361
317
  httpStatusCode: output.statusCode,
362
318
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { InvalidRequestException, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException, } from "../models/models_0";
4
4
  import { SSOServiceException as __BaseException } from "../models/SSOServiceException";
5
5
  export const se_GetRoleCredentialsCommand = async (input, context) => {
@@ -94,9 +94,10 @@ export const de_GetRoleCredentialsCommand = async (output, context) => {
94
94
  $metadata: deserializeMetadata(output),
95
95
  });
96
96
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
97
- if (data.roleCredentials != null) {
98
- contents.roleCredentials = de_RoleCredentials(data.roleCredentials, context);
99
- }
97
+ const doc = take(data, {
98
+ roleCredentials: _json,
99
+ });
100
+ Object.assign(contents, doc);
100
101
  return contents;
101
102
  };
102
103
  const de_GetRoleCredentialsCommandError = async (output, context) => {
@@ -120,10 +121,9 @@ const de_GetRoleCredentialsCommandError = async (output, context) => {
120
121
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
121
122
  default:
122
123
  const parsedBody = parsedOutput.body;
123
- throwDefaultError({
124
+ return throwDefaultError({
124
125
  output,
125
126
  parsedBody,
126
- exceptionCtor: __BaseException,
127
127
  errorCode,
128
128
  });
129
129
  }
@@ -136,12 +136,11 @@ export const de_ListAccountRolesCommand = async (output, context) => {
136
136
  $metadata: deserializeMetadata(output),
137
137
  });
138
138
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
139
- if (data.nextToken != null) {
140
- contents.nextToken = __expectString(data.nextToken);
141
- }
142
- if (data.roleList != null) {
143
- contents.roleList = de_RoleListType(data.roleList, context);
144
- }
139
+ const doc = take(data, {
140
+ nextToken: __expectString,
141
+ roleList: _json,
142
+ });
143
+ Object.assign(contents, doc);
145
144
  return contents;
146
145
  };
147
146
  const de_ListAccountRolesCommandError = async (output, context) => {
@@ -165,10 +164,9 @@ const de_ListAccountRolesCommandError = async (output, context) => {
165
164
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
166
165
  default:
167
166
  const parsedBody = parsedOutput.body;
168
- throwDefaultError({
167
+ return throwDefaultError({
169
168
  output,
170
169
  parsedBody,
171
- exceptionCtor: __BaseException,
172
170
  errorCode,
173
171
  });
174
172
  }
@@ -181,12 +179,11 @@ export const de_ListAccountsCommand = async (output, context) => {
181
179
  $metadata: deserializeMetadata(output),
182
180
  });
183
181
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
184
- if (data.accountList != null) {
185
- contents.accountList = de_AccountListType(data.accountList, context);
186
- }
187
- if (data.nextToken != null) {
188
- contents.nextToken = __expectString(data.nextToken);
189
- }
182
+ const doc = take(data, {
183
+ accountList: _json,
184
+ nextToken: __expectString,
185
+ });
186
+ Object.assign(contents, doc);
190
187
  return contents;
191
188
  };
192
189
  const de_ListAccountsCommandError = async (output, context) => {
@@ -210,10 +207,9 @@ const de_ListAccountsCommandError = async (output, context) => {
210
207
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
211
208
  default:
212
209
  const parsedBody = parsedOutput.body;
213
- throwDefaultError({
210
+ return throwDefaultError({
214
211
  output,
215
212
  parsedBody,
216
- exceptionCtor: __BaseException,
217
213
  errorCode,
218
214
  });
219
215
  }
@@ -246,21 +242,21 @@ const de_LogoutCommandError = async (output, context) => {
246
242
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
247
243
  default:
248
244
  const parsedBody = parsedOutput.body;
249
- throwDefaultError({
245
+ return throwDefaultError({
250
246
  output,
251
247
  parsedBody,
252
- exceptionCtor: __BaseException,
253
248
  errorCode,
254
249
  });
255
250
  }
256
251
  };
257
- const map = __map;
252
+ const throwDefaultError = withBaseException(__BaseException);
258
253
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
259
254
  const contents = map({});
260
255
  const data = parsedOutput.body;
261
- if (data.message != null) {
262
- contents.message = __expectString(data.message);
263
- }
256
+ const doc = take(data, {
257
+ message: __expectString,
258
+ });
259
+ Object.assign(contents, doc);
264
260
  const exception = new InvalidRequestException({
265
261
  $metadata: deserializeMetadata(parsedOutput),
266
262
  ...contents,
@@ -270,9 +266,10 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
270
266
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
271
267
  const contents = map({});
272
268
  const data = parsedOutput.body;
273
- if (data.message != null) {
274
- contents.message = __expectString(data.message);
275
- }
269
+ const doc = take(data, {
270
+ message: __expectString,
271
+ });
272
+ Object.assign(contents, doc);
276
273
  const exception = new ResourceNotFoundException({
277
274
  $metadata: deserializeMetadata(parsedOutput),
278
275
  ...contents,
@@ -282,9 +279,10 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
282
279
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
283
280
  const contents = map({});
284
281
  const data = parsedOutput.body;
285
- if (data.message != null) {
286
- contents.message = __expectString(data.message);
287
- }
282
+ const doc = take(data, {
283
+ message: __expectString,
284
+ });
285
+ Object.assign(contents, doc);
288
286
  const exception = new TooManyRequestsException({
289
287
  $metadata: deserializeMetadata(parsedOutput),
290
288
  ...contents,
@@ -294,58 +292,16 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
294
292
  const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
295
293
  const contents = map({});
296
294
  const data = parsedOutput.body;
297
- if (data.message != null) {
298
- contents.message = __expectString(data.message);
299
- }
295
+ const doc = take(data, {
296
+ message: __expectString,
297
+ });
298
+ Object.assign(contents, doc);
300
299
  const exception = new UnauthorizedException({
301
300
  $metadata: deserializeMetadata(parsedOutput),
302
301
  ...contents,
303
302
  });
304
303
  return __decorateServiceException(exception, parsedOutput.body);
305
304
  };
306
- const de_AccountInfo = (output, context) => {
307
- return {
308
- accountId: __expectString(output.accountId),
309
- accountName: __expectString(output.accountName),
310
- emailAddress: __expectString(output.emailAddress),
311
- };
312
- };
313
- const de_AccountListType = (output, context) => {
314
- const retVal = (output || [])
315
- .filter((e) => e != null)
316
- .map((entry) => {
317
- if (entry === null) {
318
- return null;
319
- }
320
- return de_AccountInfo(entry, context);
321
- });
322
- return retVal;
323
- };
324
- const de_RoleCredentials = (output, context) => {
325
- return {
326
- accessKeyId: __expectString(output.accessKeyId),
327
- expiration: __expectLong(output.expiration),
328
- secretAccessKey: __expectString(output.secretAccessKey),
329
- sessionToken: __expectString(output.sessionToken),
330
- };
331
- };
332
- const de_RoleInfo = (output, context) => {
333
- return {
334
- accountId: __expectString(output.accountId),
335
- roleName: __expectString(output.roleName),
336
- };
337
- };
338
- const de_RoleListType = (output, context) => {
339
- const retVal = (output || [])
340
- .filter((e) => e != null)
341
- .map((entry) => {
342
- if (entry === null) {
343
- return null;
344
- }
345
- return de_RoleInfo(entry, context);
346
- });
347
- return retVal;
348
- };
349
305
  const deserializeMetadata = (output) => ({
350
306
  httpStatusCode: output.statusCode,
351
307
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sso",
3
3
  "description": "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
4
- "version": "3.310.0",
4
+ "version": "3.315.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -37,14 +37,14 @@
37
37
  "@aws-sdk/node-config-provider": "3.310.0",
38
38
  "@aws-sdk/node-http-handler": "3.310.0",
39
39
  "@aws-sdk/protocol-http": "3.310.0",
40
- "@aws-sdk/smithy-client": "3.310.0",
40
+ "@aws-sdk/smithy-client": "3.315.0",
41
41
  "@aws-sdk/types": "3.310.0",
42
42
  "@aws-sdk/url-parser": "3.310.0",
43
43
  "@aws-sdk/util-base64": "3.310.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.310.0",
45
45
  "@aws-sdk/util-body-length-node": "3.310.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.310.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.310.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.315.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.315.0",
48
48
  "@aws-sdk/util-endpoints": "3.310.0",
49
49
  "@aws-sdk/util-retry": "3.310.0",
50
50
  "@aws-sdk/util-user-agent-browser": "3.310.0",