@aws-sdk/client-sts 3.927.0 → 3.928.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/README.md CHANGED
@@ -262,6 +262,14 @@ GetCallerIdentity
262
262
 
263
263
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetCallerIdentityCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetCallerIdentityCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetCallerIdentityCommandOutput/)
264
264
 
265
+ </details>
266
+ <details>
267
+ <summary>
268
+ GetDelegatedAccessToken
269
+ </summary>
270
+
271
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts/command/GetDelegatedAccessTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetDelegatedAccessTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sts/Interface/GetDelegatedAccessTokenCommandOutput/)
272
+
265
273
  </details>
266
274
  <details>
267
275
  <summary>
package/dist-cjs/index.js CHANGED
@@ -113,6 +113,18 @@ class InvalidAuthorizationMessageException extends STSServiceException {
113
113
  Object.setPrototypeOf(this, InvalidAuthorizationMessageException.prototype);
114
114
  }
115
115
  }
116
+ class ExpiredTradeInTokenException extends STSServiceException {
117
+ name = "ExpiredTradeInTokenException";
118
+ $fault = "client";
119
+ constructor(opts) {
120
+ super({
121
+ name: "ExpiredTradeInTokenException",
122
+ $fault: "client",
123
+ ...opts,
124
+ });
125
+ Object.setPrototypeOf(this, ExpiredTradeInTokenException.prototype);
126
+ }
127
+ }
116
128
  const CredentialsFilterSensitiveLog = (obj) => ({
117
129
  ...obj,
118
130
  ...(obj.SecretAccessKey && { SecretAccessKey: smithyClient.SENSITIVE_STRING }),
@@ -141,6 +153,14 @@ const AssumeRootResponseFilterSensitiveLog = (obj) => ({
141
153
  ...obj,
142
154
  ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
143
155
  });
156
+ const GetDelegatedAccessTokenRequestFilterSensitiveLog = (obj) => ({
157
+ ...obj,
158
+ ...(obj.TradeInToken && { TradeInToken: smithyClient.SENSITIVE_STRING }),
159
+ });
160
+ const GetDelegatedAccessTokenResponseFilterSensitiveLog = (obj) => ({
161
+ ...obj,
162
+ ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
163
+ });
144
164
  const GetFederationTokenResponseFilterSensitiveLog = (obj) => ({
145
165
  ...obj,
146
166
  ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
@@ -220,6 +240,16 @@ const se_GetCallerIdentityCommand = async (input, context) => {
220
240
  });
221
241
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
222
242
  };
243
+ const se_GetDelegatedAccessTokenCommand = async (input, context) => {
244
+ const headers = SHARED_HEADERS;
245
+ let body;
246
+ body = buildFormUrlencodedString({
247
+ ...se_GetDelegatedAccessTokenRequest(input),
248
+ [_A]: _GDAT,
249
+ [_V]: _,
250
+ });
251
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
252
+ };
223
253
  const se_GetFederationTokenCommand = async (input, context) => {
224
254
  const headers = SHARED_HEADERS;
225
255
  let body;
@@ -331,6 +361,19 @@ const de_GetCallerIdentityCommand = async (output, context) => {
331
361
  };
332
362
  return response;
333
363
  };
364
+ const de_GetDelegatedAccessTokenCommand = async (output, context) => {
365
+ if (output.statusCode >= 300) {
366
+ return de_CommandError(output, context);
367
+ }
368
+ const data = await core.parseXmlBody(output.body, context);
369
+ let contents = {};
370
+ contents = de_GetDelegatedAccessTokenResponse(data.GetDelegatedAccessTokenResult);
371
+ const response = {
372
+ $metadata: deserializeMetadata(output),
373
+ ...contents,
374
+ };
375
+ return response;
376
+ };
334
377
  const de_GetFederationTokenCommand = async (output, context) => {
335
378
  if (output.statusCode >= 300) {
336
379
  return de_CommandError(output, context);
@@ -388,6 +431,9 @@ const de_CommandError = async (output, context) => {
388
431
  case "InvalidAuthorizationMessageException":
389
432
  case "com.amazonaws.sts#InvalidAuthorizationMessageException":
390
433
  throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput);
434
+ case "ExpiredTradeInTokenException":
435
+ case "com.amazonaws.sts#ExpiredTradeInTokenException":
436
+ throw await de_ExpiredTradeInTokenExceptionRes(parsedOutput);
391
437
  default:
392
438
  const parsedBody = parsedOutput.body;
393
439
  return throwDefaultError({
@@ -406,6 +452,15 @@ const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
406
452
  });
407
453
  return smithyClient.decorateServiceException(exception, body);
408
454
  };
455
+ const de_ExpiredTradeInTokenExceptionRes = async (parsedOutput, context) => {
456
+ const body = parsedOutput.body;
457
+ const deserialized = de_ExpiredTradeInTokenException(body.Error);
458
+ const exception = new ExpiredTradeInTokenException({
459
+ $metadata: deserializeMetadata(parsedOutput),
460
+ ...deserialized,
461
+ });
462
+ return smithyClient.decorateServiceException(exception, body);
463
+ };
409
464
  const de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => {
410
465
  const body = parsedOutput.body;
411
466
  const deserialized = de_IDPCommunicationErrorException(body.Error);
@@ -633,6 +688,13 @@ const se_GetCallerIdentityRequest = (input, context) => {
633
688
  const entries = {};
634
689
  return entries;
635
690
  };
691
+ const se_GetDelegatedAccessTokenRequest = (input, context) => {
692
+ const entries = {};
693
+ if (input[_TIT] != null) {
694
+ entries[_TIT] = input[_TIT];
695
+ }
696
+ return entries;
697
+ };
636
698
  const se_GetFederationTokenRequest = (input, context) => {
637
699
  const entries = {};
638
700
  if (input[_N] != null) {
@@ -885,6 +947,13 @@ const de_ExpiredTokenException = (output, context) => {
885
947
  }
886
948
  return contents;
887
949
  };
950
+ const de_ExpiredTradeInTokenException = (output, context) => {
951
+ const contents = {};
952
+ if (output[_m] != null) {
953
+ contents[_m] = smithyClient.expectString(output[_m]);
954
+ }
955
+ return contents;
956
+ };
888
957
  const de_FederatedUser = (output, context) => {
889
958
  const contents = {};
890
959
  if (output[_FUI] != null) {
@@ -915,6 +984,19 @@ const de_GetCallerIdentityResponse = (output, context) => {
915
984
  }
916
985
  return contents;
917
986
  };
987
+ const de_GetDelegatedAccessTokenResponse = (output, context) => {
988
+ const contents = {};
989
+ if (output[_C] != null) {
990
+ contents[_C] = de_Credentials(output[_C]);
991
+ }
992
+ if (output[_PPS] != null) {
993
+ contents[_PPS] = smithyClient.strictParseInt32(output[_PPS]);
994
+ }
995
+ if (output[_AP] != null) {
996
+ contents[_AP] = smithyClient.expectString(output[_AP]);
997
+ }
998
+ return contents;
999
+ };
918
1000
  const de_GetFederationTokenResponse = (output, context) => {
919
1001
  const contents = {};
920
1002
  if (output[_C] != null) {
@@ -1012,6 +1094,7 @@ const SHARED_HEADERS = {
1012
1094
  const _ = "2011-06-15";
1013
1095
  const _A = "Action";
1014
1096
  const _AKI = "AccessKeyId";
1097
+ const _AP = "AssumedPrincipal";
1015
1098
  const _AR = "AssumeRole";
1016
1099
  const _ARI = "AssumedRoleId";
1017
1100
  const _ARU = "AssumedRoleUser";
@@ -1033,6 +1116,7 @@ const _FU = "FederatedUser";
1033
1116
  const _FUI = "FederatedUserId";
1034
1117
  const _GAKI = "GetAccessKeyInfo";
1035
1118
  const _GCI = "GetCallerIdentity";
1119
+ const _GDAT = "GetDelegatedAccessToken";
1036
1120
  const _GFT = "GetFederationToken";
1037
1121
  const _GST = "GetSessionToken";
1038
1122
  const _I = "Issuer";
@@ -1059,6 +1143,7 @@ const _ST = "SubjectType";
1059
1143
  const _STe = "SessionToken";
1060
1144
  const _T = "Tags";
1061
1145
  const _TC = "TokenCode";
1146
+ const _TIT = "TradeInToken";
1062
1147
  const _TP = "TargetPrincipal";
1063
1148
  const _TPA = "TaskPolicyArn";
1064
1149
  const _TTK = "TransitiveTagKeys";
@@ -1199,6 +1284,23 @@ class GetCallerIdentityCommand extends smithyClient.Command
1199
1284
  .build() {
1200
1285
  }
1201
1286
 
1287
+ class GetDelegatedAccessTokenCommand extends smithyClient.Command
1288
+ .classBuilder()
1289
+ .ep(EndpointParameters.commonParams)
1290
+ .m(function (Command, cs, config, o) {
1291
+ return [
1292
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1293
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1294
+ ];
1295
+ })
1296
+ .s("AWSSecurityTokenServiceV20110615", "GetDelegatedAccessToken", {})
1297
+ .n("STSClient", "GetDelegatedAccessTokenCommand")
1298
+ .f(GetDelegatedAccessTokenRequestFilterSensitiveLog, GetDelegatedAccessTokenResponseFilterSensitiveLog)
1299
+ .ser(se_GetDelegatedAccessTokenCommand)
1300
+ .de(de_GetDelegatedAccessTokenCommand)
1301
+ .build() {
1302
+ }
1303
+
1202
1304
  class GetFederationTokenCommand extends smithyClient.Command
1203
1305
  .classBuilder()
1204
1306
  .ep(EndpointParameters.commonParams)
@@ -1241,6 +1343,7 @@ const commands = {
1241
1343
  DecodeAuthorizationMessageCommand,
1242
1344
  GetAccessKeyInfoCommand,
1243
1345
  GetCallerIdentityCommand,
1346
+ GetDelegatedAccessTokenCommand,
1244
1347
  GetFederationTokenCommand,
1245
1348
  GetSessionTokenCommand,
1246
1349
  };
@@ -1384,8 +1487,12 @@ exports.AssumeRootResponseFilterSensitiveLog = AssumeRootResponseFilterSensitive
1384
1487
  exports.CredentialsFilterSensitiveLog = CredentialsFilterSensitiveLog;
1385
1488
  exports.DecodeAuthorizationMessageCommand = DecodeAuthorizationMessageCommand;
1386
1489
  exports.ExpiredTokenException = ExpiredTokenException;
1490
+ exports.ExpiredTradeInTokenException = ExpiredTradeInTokenException;
1387
1491
  exports.GetAccessKeyInfoCommand = GetAccessKeyInfoCommand;
1388
1492
  exports.GetCallerIdentityCommand = GetCallerIdentityCommand;
1493
+ exports.GetDelegatedAccessTokenCommand = GetDelegatedAccessTokenCommand;
1494
+ exports.GetDelegatedAccessTokenRequestFilterSensitiveLog = GetDelegatedAccessTokenRequestFilterSensitiveLog;
1495
+ exports.GetDelegatedAccessTokenResponseFilterSensitiveLog = GetDelegatedAccessTokenResponseFilterSensitiveLog;
1389
1496
  exports.GetFederationTokenCommand = GetFederationTokenCommand;
1390
1497
  exports.GetFederationTokenResponseFilterSensitiveLog = GetFederationTokenResponseFilterSensitiveLog;
1391
1498
  exports.GetSessionTokenCommand = GetSessionTokenCommand;
package/dist-es/STS.js CHANGED
@@ -6,6 +6,7 @@ import { AssumeRootCommand } from "./commands/AssumeRootCommand";
6
6
  import { DecodeAuthorizationMessageCommand, } from "./commands/DecodeAuthorizationMessageCommand";
7
7
  import { GetAccessKeyInfoCommand, } from "./commands/GetAccessKeyInfoCommand";
8
8
  import { GetCallerIdentityCommand, } from "./commands/GetCallerIdentityCommand";
9
+ import { GetDelegatedAccessTokenCommand, } from "./commands/GetDelegatedAccessTokenCommand";
9
10
  import { GetFederationTokenCommand, } from "./commands/GetFederationTokenCommand";
10
11
  import { GetSessionTokenCommand, } from "./commands/GetSessionTokenCommand";
11
12
  import { STSClient } from "./STSClient";
@@ -17,6 +18,7 @@ const commands = {
17
18
  DecodeAuthorizationMessageCommand,
18
19
  GetAccessKeyInfoCommand,
19
20
  GetCallerIdentityCommand,
21
+ GetDelegatedAccessTokenCommand,
20
22
  GetFederationTokenCommand,
21
23
  GetSessionTokenCommand,
22
24
  };
@@ -0,0 +1,23 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { GetDelegatedAccessTokenRequestFilterSensitiveLog, GetDelegatedAccessTokenResponseFilterSensitiveLog, } from "../models/models_0";
6
+ import { de_GetDelegatedAccessTokenCommand, se_GetDelegatedAccessTokenCommand } from "../protocols/Aws_query";
7
+ export { $Command };
8
+ export class GetDelegatedAccessTokenCommand extends $Command
9
+ .classBuilder()
10
+ .ep(commonParams)
11
+ .m(function (Command, cs, config, o) {
12
+ return [
13
+ getSerdePlugin(config, this.serialize, this.deserialize),
14
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
15
+ ];
16
+ })
17
+ .s("AWSSecurityTokenServiceV20110615", "GetDelegatedAccessToken", {})
18
+ .n("STSClient", "GetDelegatedAccessTokenCommand")
19
+ .f(GetDelegatedAccessTokenRequestFilterSensitiveLog, GetDelegatedAccessTokenResponseFilterSensitiveLog)
20
+ .ser(se_GetDelegatedAccessTokenCommand)
21
+ .de(de_GetDelegatedAccessTokenCommand)
22
+ .build() {
23
+ }
@@ -5,5 +5,6 @@ export * from "./AssumeRootCommand";
5
5
  export * from "./DecodeAuthorizationMessageCommand";
6
6
  export * from "./GetAccessKeyInfoCommand";
7
7
  export * from "./GetCallerIdentityCommand";
8
+ export * from "./GetDelegatedAccessTokenCommand";
8
9
  export * from "./GetFederationTokenCommand";
9
10
  export * from "./GetSessionTokenCommand";
@@ -96,6 +96,18 @@ export class InvalidAuthorizationMessageException extends __BaseException {
96
96
  Object.setPrototypeOf(this, InvalidAuthorizationMessageException.prototype);
97
97
  }
98
98
  }
99
+ export class ExpiredTradeInTokenException extends __BaseException {
100
+ name = "ExpiredTradeInTokenException";
101
+ $fault = "client";
102
+ constructor(opts) {
103
+ super({
104
+ name: "ExpiredTradeInTokenException",
105
+ $fault: "client",
106
+ ...opts,
107
+ });
108
+ Object.setPrototypeOf(this, ExpiredTradeInTokenException.prototype);
109
+ }
110
+ }
99
111
  export const CredentialsFilterSensitiveLog = (obj) => ({
100
112
  ...obj,
101
113
  ...(obj.SecretAccessKey && { SecretAccessKey: SENSITIVE_STRING }),
@@ -124,6 +136,14 @@ export const AssumeRootResponseFilterSensitiveLog = (obj) => ({
124
136
  ...obj,
125
137
  ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
126
138
  });
139
+ export const GetDelegatedAccessTokenRequestFilterSensitiveLog = (obj) => ({
140
+ ...obj,
141
+ ...(obj.TradeInToken && { TradeInToken: SENSITIVE_STRING }),
142
+ });
143
+ export const GetDelegatedAccessTokenResponseFilterSensitiveLog = (obj) => ({
144
+ ...obj,
145
+ ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
146
+ });
127
147
  export const GetFederationTokenResponseFilterSensitiveLog = (obj) => ({
128
148
  ...obj,
129
149
  ...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
@@ -1,7 +1,7 @@
1
1
  import { parseXmlBody as parseBody, parseXmlErrorBody as parseErrorBody } from "@aws-sdk/core";
2
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
3
  import { collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, withBaseException, } from "@smithy/smithy-client";
4
- import { ExpiredTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidAuthorizationMessageException, InvalidIdentityTokenException, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, } from "../models/models_0";
4
+ import { ExpiredTokenException, ExpiredTradeInTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidAuthorizationMessageException, InvalidIdentityTokenException, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, } from "../models/models_0";
5
5
  import { STSServiceException as __BaseException } from "../models/STSServiceException";
6
6
  export const se_AssumeRoleCommand = async (input, context) => {
7
7
  const headers = SHARED_HEADERS;
@@ -73,6 +73,16 @@ export const se_GetCallerIdentityCommand = async (input, context) => {
73
73
  });
74
74
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
75
75
  };
76
+ export const se_GetDelegatedAccessTokenCommand = async (input, context) => {
77
+ const headers = SHARED_HEADERS;
78
+ let body;
79
+ body = buildFormUrlencodedString({
80
+ ...se_GetDelegatedAccessTokenRequest(input, context),
81
+ [_A]: _GDAT,
82
+ [_V]: _,
83
+ });
84
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
+ };
76
86
  export const se_GetFederationTokenCommand = async (input, context) => {
77
87
  const headers = SHARED_HEADERS;
78
88
  let body;
@@ -184,6 +194,19 @@ export const de_GetCallerIdentityCommand = async (output, context) => {
184
194
  };
185
195
  return response;
186
196
  };
197
+ export const de_GetDelegatedAccessTokenCommand = async (output, context) => {
198
+ if (output.statusCode >= 300) {
199
+ return de_CommandError(output, context);
200
+ }
201
+ const data = await parseBody(output.body, context);
202
+ let contents = {};
203
+ contents = de_GetDelegatedAccessTokenResponse(data.GetDelegatedAccessTokenResult, context);
204
+ const response = {
205
+ $metadata: deserializeMetadata(output),
206
+ ...contents,
207
+ };
208
+ return response;
209
+ };
187
210
  export const de_GetFederationTokenCommand = async (output, context) => {
188
211
  if (output.statusCode >= 300) {
189
212
  return de_CommandError(output, context);
@@ -241,6 +264,9 @@ const de_CommandError = async (output, context) => {
241
264
  case "InvalidAuthorizationMessageException":
242
265
  case "com.amazonaws.sts#InvalidAuthorizationMessageException":
243
266
  throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context);
267
+ case "ExpiredTradeInTokenException":
268
+ case "com.amazonaws.sts#ExpiredTradeInTokenException":
269
+ throw await de_ExpiredTradeInTokenExceptionRes(parsedOutput, context);
244
270
  default:
245
271
  const parsedBody = parsedOutput.body;
246
272
  return throwDefaultError({
@@ -259,6 +285,15 @@ const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
259
285
  });
260
286
  return __decorateServiceException(exception, body);
261
287
  };
288
+ const de_ExpiredTradeInTokenExceptionRes = async (parsedOutput, context) => {
289
+ const body = parsedOutput.body;
290
+ const deserialized = de_ExpiredTradeInTokenException(body.Error, context);
291
+ const exception = new ExpiredTradeInTokenException({
292
+ $metadata: deserializeMetadata(parsedOutput),
293
+ ...deserialized,
294
+ });
295
+ return __decorateServiceException(exception, body);
296
+ };
262
297
  const de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => {
263
298
  const body = parsedOutput.body;
264
299
  const deserialized = de_IDPCommunicationErrorException(body.Error, context);
@@ -486,6 +521,13 @@ const se_GetCallerIdentityRequest = (input, context) => {
486
521
  const entries = {};
487
522
  return entries;
488
523
  };
524
+ const se_GetDelegatedAccessTokenRequest = (input, context) => {
525
+ const entries = {};
526
+ if (input[_TIT] != null) {
527
+ entries[_TIT] = input[_TIT];
528
+ }
529
+ return entries;
530
+ };
489
531
  const se_GetFederationTokenRequest = (input, context) => {
490
532
  const entries = {};
491
533
  if (input[_N] != null) {
@@ -738,6 +780,13 @@ const de_ExpiredTokenException = (output, context) => {
738
780
  }
739
781
  return contents;
740
782
  };
783
+ const de_ExpiredTradeInTokenException = (output, context) => {
784
+ const contents = {};
785
+ if (output[_m] != null) {
786
+ contents[_m] = __expectString(output[_m]);
787
+ }
788
+ return contents;
789
+ };
741
790
  const de_FederatedUser = (output, context) => {
742
791
  const contents = {};
743
792
  if (output[_FUI] != null) {
@@ -768,6 +817,19 @@ const de_GetCallerIdentityResponse = (output, context) => {
768
817
  }
769
818
  return contents;
770
819
  };
820
+ const de_GetDelegatedAccessTokenResponse = (output, context) => {
821
+ const contents = {};
822
+ if (output[_C] != null) {
823
+ contents[_C] = de_Credentials(output[_C], context);
824
+ }
825
+ if (output[_PPS] != null) {
826
+ contents[_PPS] = __strictParseInt32(output[_PPS]);
827
+ }
828
+ if (output[_AP] != null) {
829
+ contents[_AP] = __expectString(output[_AP]);
830
+ }
831
+ return contents;
832
+ };
771
833
  const de_GetFederationTokenResponse = (output, context) => {
772
834
  const contents = {};
773
835
  if (output[_C] != null) {
@@ -869,6 +931,7 @@ const SHARED_HEADERS = {
869
931
  const _ = "2011-06-15";
870
932
  const _A = "Action";
871
933
  const _AKI = "AccessKeyId";
934
+ const _AP = "AssumedPrincipal";
872
935
  const _AR = "AssumeRole";
873
936
  const _ARI = "AssumedRoleId";
874
937
  const _ARU = "AssumedRoleUser";
@@ -890,6 +953,7 @@ const _FU = "FederatedUser";
890
953
  const _FUI = "FederatedUserId";
891
954
  const _GAKI = "GetAccessKeyInfo";
892
955
  const _GCI = "GetCallerIdentity";
956
+ const _GDAT = "GetDelegatedAccessToken";
893
957
  const _GFT = "GetFederationToken";
894
958
  const _GST = "GetSessionToken";
895
959
  const _I = "Issuer";
@@ -916,6 +980,7 @@ const _ST = "SubjectType";
916
980
  const _STe = "SessionToken";
917
981
  const _T = "Tags";
918
982
  const _TC = "TokenCode";
983
+ const _TIT = "TradeInToken";
919
984
  const _TP = "TargetPrincipal";
920
985
  const _TPA = "TaskPolicyArn";
921
986
  const _TTK = "TransitiveTagKeys";
@@ -6,6 +6,7 @@ import { AssumeRootCommandInput, AssumeRootCommandOutput } from "./commands/Assu
6
6
  import { DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput } from "./commands/DecodeAuthorizationMessageCommand";
7
7
  import { GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput } from "./commands/GetAccessKeyInfoCommand";
8
8
  import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from "./commands/GetCallerIdentityCommand";
9
+ import { GetDelegatedAccessTokenCommandInput, GetDelegatedAccessTokenCommandOutput } from "./commands/GetDelegatedAccessTokenCommand";
9
10
  import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "./commands/GetFederationTokenCommand";
10
11
  import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "./commands/GetSessionTokenCommand";
11
12
  import { STSClient } from "./STSClient";
@@ -53,6 +54,12 @@ export interface STS {
53
54
  getCallerIdentity(args: GetCallerIdentityCommandInput, options?: __HttpHandlerOptions): Promise<GetCallerIdentityCommandOutput>;
54
55
  getCallerIdentity(args: GetCallerIdentityCommandInput, cb: (err: any, data?: GetCallerIdentityCommandOutput) => void): void;
55
56
  getCallerIdentity(args: GetCallerIdentityCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetCallerIdentityCommandOutput) => void): void;
57
+ /**
58
+ * @see {@link GetDelegatedAccessTokenCommand}
59
+ */
60
+ getDelegatedAccessToken(args: GetDelegatedAccessTokenCommandInput, options?: __HttpHandlerOptions): Promise<GetDelegatedAccessTokenCommandOutput>;
61
+ getDelegatedAccessToken(args: GetDelegatedAccessTokenCommandInput, cb: (err: any, data?: GetDelegatedAccessTokenCommandOutput) => void): void;
62
+ getDelegatedAccessToken(args: GetDelegatedAccessTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDelegatedAccessTokenCommandOutput) => void): void;
56
63
  /**
57
64
  * @see {@link GetFederationTokenCommand}
58
65
  */
@@ -14,6 +14,7 @@ import { AssumeRootCommandInput, AssumeRootCommandOutput } from "./commands/Assu
14
14
  import { DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput } from "./commands/DecodeAuthorizationMessageCommand";
15
15
  import { GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput } from "./commands/GetAccessKeyInfoCommand";
16
16
  import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from "./commands/GetCallerIdentityCommand";
17
+ import { GetDelegatedAccessTokenCommandInput, GetDelegatedAccessTokenCommandOutput } from "./commands/GetDelegatedAccessTokenCommand";
17
18
  import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "./commands/GetFederationTokenCommand";
18
19
  import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "./commands/GetSessionTokenCommand";
19
20
  import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
@@ -22,11 +23,11 @@ export { __Client };
22
23
  /**
23
24
  * @public
24
25
  */
25
- export type ServiceInputTypes = AssumeRoleCommandInput | AssumeRoleWithSAMLCommandInput | AssumeRoleWithWebIdentityCommandInput | AssumeRootCommandInput | DecodeAuthorizationMessageCommandInput | GetAccessKeyInfoCommandInput | GetCallerIdentityCommandInput | GetFederationTokenCommandInput | GetSessionTokenCommandInput;
26
+ export type ServiceInputTypes = AssumeRoleCommandInput | AssumeRoleWithSAMLCommandInput | AssumeRoleWithWebIdentityCommandInput | AssumeRootCommandInput | DecodeAuthorizationMessageCommandInput | GetAccessKeyInfoCommandInput | GetCallerIdentityCommandInput | GetDelegatedAccessTokenCommandInput | GetFederationTokenCommandInput | GetSessionTokenCommandInput;
26
27
  /**
27
28
  * @public
28
29
  */
29
- export type ServiceOutputTypes = AssumeRoleCommandOutput | AssumeRoleWithSAMLCommandOutput | AssumeRoleWithWebIdentityCommandOutput | AssumeRootCommandOutput | DecodeAuthorizationMessageCommandOutput | GetAccessKeyInfoCommandOutput | GetCallerIdentityCommandOutput | GetFederationTokenCommandOutput | GetSessionTokenCommandOutput;
30
+ export type ServiceOutputTypes = AssumeRoleCommandOutput | AssumeRoleWithSAMLCommandOutput | AssumeRoleWithWebIdentityCommandOutput | AssumeRootCommandOutput | DecodeAuthorizationMessageCommandOutput | GetAccessKeyInfoCommandOutput | GetCallerIdentityCommandOutput | GetDelegatedAccessTokenCommandOutput | GetFederationTokenCommandOutput | GetSessionTokenCommandOutput;
30
31
  /**
31
32
  * @public
32
33
  */
@@ -200,7 +200,7 @@ declare const AssumeRoleCommand_base: {
200
200
  * @throws {@link RegionDisabledException} (client fault)
201
201
  * <p>STS is not activated in the requested region for the account that is being asked to
202
202
  * generate credentials. The account administrator must use the IAM console to activate
203
- * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating and
203
+ * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate">Activating and
204
204
  * Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM User
205
205
  * Guide</i>.</p>
206
206
  *
@@ -213,7 +213,7 @@ declare const AssumeRoleCommand_base: {
213
213
  * //
214
214
  * const input = {
215
215
  * ExternalId: "123ABC",
216
- * Policy: `{"Version":"2012-10-17","Statement":[{"Sid":"Stmt1","Effect":"Allow","Action":"s3:ListAllMyBuckets","Resource":"*"}]}`,
216
+ * Policy: "escaped-JSON-IAM-POLICY",
217
217
  * RoleArn: "arn:aws:iam::123456789012:role/demo",
218
218
  * RoleSessionName: "testAssumeRoleSession",
219
219
  * Tags: [
@@ -37,6 +37,10 @@ declare const AssumeRoleWithSAMLCommand_base: {
37
37
  * <p>The temporary security credentials returned by this operation consist of an access key
38
38
  * ID, a secret access key, and a security token. Applications can use these temporary
39
39
  * security credentials to sign calls to Amazon Web Services services.</p>
40
+ * <note>
41
+ * <p>AssumeRoleWithSAML will not work on IAM Identity Center managed roles. These roles' names start
42
+ * with <code>AWSReservedSSO_</code>.</p>
43
+ * </note>
40
44
  * <p>
41
45
  * <b>Session Duration</b>
42
46
  * </p>
@@ -238,7 +242,7 @@ declare const AssumeRoleWithSAMLCommand_base: {
238
242
  * @throws {@link RegionDisabledException} (client fault)
239
243
  * <p>STS is not activated in the requested region for the account that is being asked to
240
244
  * generate credentials. The account administrator must use the IAM console to activate
241
- * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating and
245
+ * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate">Activating and
242
246
  * Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM User
243
247
  * Guide</i>.</p>
244
248
  *
@@ -90,7 +90,8 @@ declare const AssumeRoleWithWebIdentityCommand_base: {
90
90
  * </p>
91
91
  * <p>(Optional) You can configure your IdP to pass attributes into your web identity token as
92
92
  * session tags. Each session tag consists of a key name and an associated value. For more
93
- * information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in the
93
+ * information about session tags, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_adding-assume-role-idp">Passing
94
+ * session tags using AssumeRoleWithWebIdentity</a> in the
94
95
  * <i>IAM User Guide</i>.</p>
95
96
  * <p>You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128
96
97
  * characters and the values can’t exceed 256 characters. For these and additional limits, see
@@ -232,7 +233,7 @@ declare const AssumeRoleWithWebIdentityCommand_base: {
232
233
  * @throws {@link RegionDisabledException} (client fault)
233
234
  * <p>STS is not activated in the requested region for the account that is being asked to
234
235
  * generate credentials. The account administrator must use the IAM console to activate
235
- * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating and
236
+ * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate">Activating and
236
237
  * Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM User
237
238
  * Guide</i>.</p>
238
239
  *
@@ -245,7 +246,7 @@ declare const AssumeRoleWithWebIdentityCommand_base: {
245
246
  * //
246
247
  * const input = {
247
248
  * DurationSeconds: 3600,
248
- * Policy: `{"Version":"2012-10-17","Statement":[{"Sid":"Stmt1","Effect":"Allow","Action":"s3:ListAllMyBuckets","Resource":"*"}]}`,
249
+ * Policy: "escaped-JSON-IAM-POLICY",
249
250
  * ProviderId: "www.amazon.com",
250
251
  * RoleArn: "arn:aws:iam::123456789012:role/FederatedWebIdentityRole",
251
252
  * RoleSessionName: "app1",
@@ -28,7 +28,9 @@ declare const AssumeRootCommand_base: {
28
28
  };
29
29
  /**
30
30
  * <p>Returns a set of short term credentials you can use to perform privileged tasks on a
31
- * member account in your organization.</p>
31
+ * member account in your organization. You must use credentials from an Organizations management
32
+ * account or a delegated administrator account for IAM to call <code>AssumeRoot</code>. You
33
+ * cannot use root user credentials to make this call.</p>
32
34
  * <p>Before you can launch a privileged session, you must have centralized root access in
33
35
  * your organization. For steps to enable this feature, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html">Centralize root access for
34
36
  * member accounts</a> in the <i>IAM User Guide</i>.</p>
@@ -39,6 +41,11 @@ declare const AssumeRootCommand_base: {
39
41
  * <p>You can track AssumeRoot in CloudTrail logs to determine what actions were performed in a
40
42
  * session. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html">Track privileged tasks
41
43
  * in CloudTrail</a> in the <i>IAM User Guide</i>.</p>
44
+ * <p>When granting access to privileged tasks you should only grant the necessary permissions
45
+ * required to perform that task. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html">Security best practices in
46
+ * IAM</a>. In addition, you can use <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html">service control
47
+ * policies</a> (SCPs) to manage and limit permissions in your organization. See <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples_general.html">General examples</a> in the <i>Organizations User
48
+ * Guide</i> for more information on SCPs.</p>
42
49
  * @example
43
50
  * Use a bare-bones client and the command you need to make an API call.
44
51
  * ```javascript
@@ -81,7 +88,7 @@ declare const AssumeRootCommand_base: {
81
88
  * @throws {@link RegionDisabledException} (client fault)
82
89
  * <p>STS is not activated in the requested region for the account that is being asked to
83
90
  * generate credentials. The account administrator must use the IAM console to activate
84
- * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating and
91
+ * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate">Activating and
85
92
  * Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM User
86
93
  * Guide</i>.</p>
87
94
  *
@@ -0,0 +1,91 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { GetDelegatedAccessTokenRequest, GetDelegatedAccessTokenResponse } from "../models/models_0";
4
+ import { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link GetDelegatedAccessTokenCommand}.
14
+ */
15
+ export interface GetDelegatedAccessTokenCommandInput extends GetDelegatedAccessTokenRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetDelegatedAccessTokenCommand}.
21
+ */
22
+ export interface GetDelegatedAccessTokenCommandOutput extends GetDelegatedAccessTokenResponse, __MetadataBearer {
23
+ }
24
+ declare const GetDelegatedAccessTokenCommand_base: {
25
+ new (input: GetDelegatedAccessTokenCommandInput): import("@smithy/smithy-client").CommandImpl<GetDelegatedAccessTokenCommandInput, GetDelegatedAccessTokenCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: GetDelegatedAccessTokenCommandInput): import("@smithy/smithy-client").CommandImpl<GetDelegatedAccessTokenCommandInput, GetDelegatedAccessTokenCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>This API is currently unavailable for general use.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { STSClient, GetDelegatedAccessTokenCommand } from "@aws-sdk/client-sts"; // ES Modules import
35
+ * // const { STSClient, GetDelegatedAccessTokenCommand } = require("@aws-sdk/client-sts"); // CommonJS import
36
+ * // import type { STSClientConfig } from "@aws-sdk/client-sts";
37
+ * const config = {}; // type is STSClientConfig
38
+ * const client = new STSClient(config);
39
+ * const input = { // GetDelegatedAccessTokenRequest
40
+ * TradeInToken: "STRING_VALUE", // required
41
+ * };
42
+ * const command = new GetDelegatedAccessTokenCommand(input);
43
+ * const response = await client.send(command);
44
+ * // { // GetDelegatedAccessTokenResponse
45
+ * // Credentials: { // Credentials
46
+ * // AccessKeyId: "STRING_VALUE", // required
47
+ * // SecretAccessKey: "STRING_VALUE", // required
48
+ * // SessionToken: "STRING_VALUE", // required
49
+ * // Expiration: new Date("TIMESTAMP"), // required
50
+ * // },
51
+ * // PackedPolicySize: Number("int"),
52
+ * // AssumedPrincipal: "STRING_VALUE",
53
+ * // };
54
+ *
55
+ * ```
56
+ *
57
+ * @param GetDelegatedAccessTokenCommandInput - {@link GetDelegatedAccessTokenCommandInput}
58
+ * @returns {@link GetDelegatedAccessTokenCommandOutput}
59
+ * @see {@link GetDelegatedAccessTokenCommandInput} for command's `input` shape.
60
+ * @see {@link GetDelegatedAccessTokenCommandOutput} for command's `response` shape.
61
+ * @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
62
+ *
63
+ * @throws {@link ExpiredTradeInTokenException} (client fault)
64
+ * <p></p>
65
+ *
66
+ * @throws {@link RegionDisabledException} (client fault)
67
+ * <p>STS is not activated in the requested region for the account that is being asked to
68
+ * generate credentials. The account administrator must use the IAM console to activate
69
+ * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate">Activating and
70
+ * Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM User
71
+ * Guide</i>.</p>
72
+ *
73
+ * @throws {@link STSServiceException}
74
+ * <p>Base exception class for all service exceptions from STS service.</p>
75
+ *
76
+ *
77
+ * @public
78
+ */
79
+ export declare class GetDelegatedAccessTokenCommand extends GetDelegatedAccessTokenCommand_base {
80
+ /** @internal type navigation helper, not in runtime. */
81
+ protected static __types: {
82
+ api: {
83
+ input: GetDelegatedAccessTokenRequest;
84
+ output: GetDelegatedAccessTokenResponse;
85
+ };
86
+ sdk: {
87
+ input: GetDelegatedAccessTokenCommandInput;
88
+ output: GetDelegatedAccessTokenCommandOutput;
89
+ };
90
+ };
91
+ }
@@ -182,7 +182,7 @@ declare const GetFederationTokenCommand_base: {
182
182
  * @throws {@link RegionDisabledException} (client fault)
183
183
  * <p>STS is not activated in the requested region for the account that is being asked to
184
184
  * generate credentials. The account administrator must use the IAM console to activate
185
- * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating and
185
+ * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate">Activating and
186
186
  * Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM User
187
187
  * Guide</i>.</p>
188
188
  *
@@ -196,7 +196,7 @@ declare const GetFederationTokenCommand_base: {
196
196
  * const input = {
197
197
  * DurationSeconds: 3600,
198
198
  * Name: "testFedUserSession",
199
- * Policy: `{"Version":"2012-10-17","Statement":[{"Sid":"Stmt1","Effect":"Allow","Action":"s3:ListAllMyBuckets","Resource":"*"}]}`,
199
+ * Policy: "escaped-JSON-IAM-POLICY",
200
200
  * Tags: [
201
201
  * {
202
202
  * Key: "Project",
@@ -121,7 +121,7 @@ declare const GetSessionTokenCommand_base: {
121
121
  * @throws {@link RegionDisabledException} (client fault)
122
122
  * <p>STS is not activated in the requested region for the account that is being asked to
123
123
  * generate credentials. The account administrator must use the IAM console to activate
124
- * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating and
124
+ * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate">Activating and
125
125
  * Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM User
126
126
  * Guide</i>.</p>
127
127
  *
@@ -5,5 +5,6 @@ export * from "./AssumeRootCommand";
5
5
  export * from "./DecodeAuthorizationMessageCommand";
6
6
  export * from "./GetAccessKeyInfoCommand";
7
7
  export * from "./GetCallerIdentityCommand";
8
+ export * from "./GetDelegatedAccessTokenCommand";
8
9
  export * from "./GetFederationTokenCommand";
9
10
  export * from "./GetSessionTokenCommand";
@@ -100,9 +100,9 @@ export interface AssumeRoleRequest {
100
100
  * assume the role. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname">
101
101
  * <code>sts:RoleSessionName</code>
102
102
  * </a>.</p>
103
- * <p>The regex used to validate this parameter is a string of characters
104
- * consisting of upper- and lower-case alphanumeric characters with no spaces. You can
105
- * also include underscores or any of the following characters: =,.@-</p>
103
+ * <p>The regex used to validate this parameter is a string of
104
+ * characters consisting of upper- and lower-case alphanumeric characters with no spaces.
105
+ * You can also include underscores or any of the following characters: +=,.@-</p>
106
106
  * @public
107
107
  */
108
108
  RoleSessionName: string | undefined;
@@ -241,7 +241,7 @@ export interface AssumeRoleRequest {
241
241
  * <i>IAM User Guide</i>.</p>
242
242
  * <p>The regex used to validate this parameter is a string of
243
243
  * characters consisting of upper- and lower-case alphanumeric characters with no spaces.
244
- * You can also include underscores or any of the following characters: =,.@:/-</p>
244
+ * You can also include underscores or any of the following characters: +=,.@:\/-</p>
245
245
  * @public
246
246
  */
247
247
  ExternalId?: string | undefined;
@@ -252,9 +252,9 @@ export interface AssumeRoleRequest {
252
252
  * the serial number for a hardware device (such as <code>GAHT12345678</code>) or an Amazon
253
253
  * Resource Name (ARN) for a virtual device (such as
254
254
  * <code>arn:aws:iam::123456789012:mfa/user</code>).</p>
255
- * <p>The regex used to validate this parameter is a string of characters
256
- * consisting of upper- and lower-case alphanumeric characters with no spaces. You can
257
- * also include underscores or any of the following characters: =,.@-</p>
255
+ * <p>The regex used to validate this parameter is a string of
256
+ * characters consisting of upper- and lower-case alphanumeric characters with no spaces.
257
+ * You can also include underscores or any of the following characters: +=/:,.@-</p>
258
258
  * @public
259
259
  */
260
260
  SerialNumber?: string | undefined;
@@ -427,7 +427,7 @@ export declare class PackedPolicyTooLargeException extends __BaseException {
427
427
  /**
428
428
  * <p>STS is not activated in the requested region for the account that is being asked to
429
429
  * generate credentials. The account administrator must use the IAM console to activate
430
- * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html">Activating and
430
+ * STS in that region. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html#sts-regions-activate-deactivate">Activating and
431
431
  * Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM User
432
432
  * Guide</i>.</p>
433
433
  * @public
@@ -907,8 +907,10 @@ export interface AssumeRootRequest {
907
907
  TargetPrincipal: string | undefined;
908
908
  /**
909
909
  * <p>The identity based policy that scopes the session to the privileged tasks that can be
910
- * performed. You can use one of following Amazon Web Services managed policies to scope root session
911
- * actions.</p>
910
+ * performed. You must
911
+ *
912
+ * use one of following Amazon Web Services managed policies to scope root session
913
+ * actions:</p>
912
914
  * <ul>
913
915
  * <li>
914
916
  * <p>
@@ -1065,6 +1067,48 @@ export interface GetCallerIdentityResponse {
1065
1067
  */
1066
1068
  Arn?: string | undefined;
1067
1069
  }
1070
+ /**
1071
+ * <p></p>
1072
+ * @public
1073
+ */
1074
+ export declare class ExpiredTradeInTokenException extends __BaseException {
1075
+ readonly name: "ExpiredTradeInTokenException";
1076
+ readonly $fault: "client";
1077
+ /**
1078
+ * @internal
1079
+ */
1080
+ constructor(opts: __ExceptionOptionType<ExpiredTradeInTokenException, __BaseException>);
1081
+ }
1082
+ /**
1083
+ * @public
1084
+ */
1085
+ export interface GetDelegatedAccessTokenRequest {
1086
+ /**
1087
+ * <p></p>
1088
+ * @public
1089
+ */
1090
+ TradeInToken: string | undefined;
1091
+ }
1092
+ /**
1093
+ * @public
1094
+ */
1095
+ export interface GetDelegatedAccessTokenResponse {
1096
+ /**
1097
+ * <p>Amazon Web Services credentials for API authentication.</p>
1098
+ * @public
1099
+ */
1100
+ Credentials?: Credentials | undefined;
1101
+ /**
1102
+ * <p></p>
1103
+ * @public
1104
+ */
1105
+ PackedPolicySize?: number | undefined;
1106
+ /**
1107
+ * <p></p>
1108
+ * @public
1109
+ */
1110
+ AssumedPrincipal?: string | undefined;
1111
+ }
1068
1112
  /**
1069
1113
  * @public
1070
1114
  */
@@ -1316,6 +1360,14 @@ export declare const AssumeRoleWithWebIdentityResponseFilterSensitiveLog: (obj:
1316
1360
  * @internal
1317
1361
  */
1318
1362
  export declare const AssumeRootResponseFilterSensitiveLog: (obj: AssumeRootResponse) => any;
1363
+ /**
1364
+ * @internal
1365
+ */
1366
+ export declare const GetDelegatedAccessTokenRequestFilterSensitiveLog: (obj: GetDelegatedAccessTokenRequest) => any;
1367
+ /**
1368
+ * @internal
1369
+ */
1370
+ export declare const GetDelegatedAccessTokenResponseFilterSensitiveLog: (obj: GetDelegatedAccessTokenResponse) => any;
1319
1371
  /**
1320
1372
  * @internal
1321
1373
  */
@@ -7,6 +7,7 @@ import { AssumeRootCommandInput, AssumeRootCommandOutput } from "../commands/Ass
7
7
  import { DecodeAuthorizationMessageCommandInput, DecodeAuthorizationMessageCommandOutput } from "../commands/DecodeAuthorizationMessageCommand";
8
8
  import { GetAccessKeyInfoCommandInput, GetAccessKeyInfoCommandOutput } from "../commands/GetAccessKeyInfoCommand";
9
9
  import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from "../commands/GetCallerIdentityCommand";
10
+ import { GetDelegatedAccessTokenCommandInput, GetDelegatedAccessTokenCommandOutput } from "../commands/GetDelegatedAccessTokenCommand";
10
11
  import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "../commands/GetFederationTokenCommand";
11
12
  import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "../commands/GetSessionTokenCommand";
12
13
  /**
@@ -37,6 +38,10 @@ export declare const se_GetAccessKeyInfoCommand: (input: GetAccessKeyInfoCommand
37
38
  * serializeAws_queryGetCallerIdentityCommand
38
39
  */
39
40
  export declare const se_GetCallerIdentityCommand: (input: GetCallerIdentityCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
41
+ /**
42
+ * serializeAws_queryGetDelegatedAccessTokenCommand
43
+ */
44
+ export declare const se_GetDelegatedAccessTokenCommand: (input: GetDelegatedAccessTokenCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
40
45
  /**
41
46
  * serializeAws_queryGetFederationTokenCommand
42
47
  */
@@ -73,6 +78,10 @@ export declare const de_GetAccessKeyInfoCommand: (output: __HttpResponse, contex
73
78
  * deserializeAws_queryGetCallerIdentityCommand
74
79
  */
75
80
  export declare const de_GetCallerIdentityCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetCallerIdentityCommandOutput>;
81
+ /**
82
+ * deserializeAws_queryGetDelegatedAccessTokenCommand
83
+ */
84
+ export declare const de_GetDelegatedAccessTokenCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetDelegatedAccessTokenCommandOutput>;
76
85
  /**
77
86
  * deserializeAws_queryGetFederationTokenCommand
78
87
  */
@@ -27,6 +27,10 @@ import {
27
27
  GetCallerIdentityCommandInput,
28
28
  GetCallerIdentityCommandOutput,
29
29
  } from "./commands/GetCallerIdentityCommand";
30
+ import {
31
+ GetDelegatedAccessTokenCommandInput,
32
+ GetDelegatedAccessTokenCommandOutput,
33
+ } from "./commands/GetDelegatedAccessTokenCommand";
30
34
  import {
31
35
  GetFederationTokenCommandInput,
32
36
  GetFederationTokenCommandOutput,
@@ -129,6 +133,19 @@ export interface STS {
129
133
  options: __HttpHandlerOptions,
130
134
  cb: (err: any, data?: GetCallerIdentityCommandOutput) => void
131
135
  ): void;
136
+ getDelegatedAccessToken(
137
+ args: GetDelegatedAccessTokenCommandInput,
138
+ options?: __HttpHandlerOptions
139
+ ): Promise<GetDelegatedAccessTokenCommandOutput>;
140
+ getDelegatedAccessToken(
141
+ args: GetDelegatedAccessTokenCommandInput,
142
+ cb: (err: any, data?: GetDelegatedAccessTokenCommandOutput) => void
143
+ ): void;
144
+ getDelegatedAccessToken(
145
+ args: GetDelegatedAccessTokenCommandInput,
146
+ options: __HttpHandlerOptions,
147
+ cb: (err: any, data?: GetDelegatedAccessTokenCommandOutput) => void
148
+ ): void;
132
149
  getFederationToken(
133
150
  args: GetFederationTokenCommandInput,
134
151
  options?: __HttpHandlerOptions
@@ -73,6 +73,10 @@ import {
73
73
  GetCallerIdentityCommandInput,
74
74
  GetCallerIdentityCommandOutput,
75
75
  } from "./commands/GetCallerIdentityCommand";
76
+ import {
77
+ GetDelegatedAccessTokenCommandInput,
78
+ GetDelegatedAccessTokenCommandOutput,
79
+ } from "./commands/GetDelegatedAccessTokenCommand";
76
80
  import {
77
81
  GetFederationTokenCommandInput,
78
82
  GetFederationTokenCommandOutput,
@@ -96,6 +100,7 @@ export type ServiceInputTypes =
96
100
  | DecodeAuthorizationMessageCommandInput
97
101
  | GetAccessKeyInfoCommandInput
98
102
  | GetCallerIdentityCommandInput
103
+ | GetDelegatedAccessTokenCommandInput
99
104
  | GetFederationTokenCommandInput
100
105
  | GetSessionTokenCommandInput;
101
106
  export type ServiceOutputTypes =
@@ -106,6 +111,7 @@ export type ServiceOutputTypes =
106
111
  | DecodeAuthorizationMessageCommandOutput
107
112
  | GetAccessKeyInfoCommandOutput
108
113
  | GetCallerIdentityCommandOutput
114
+ | GetDelegatedAccessTokenCommandOutput
109
115
  | GetFederationTokenCommandOutput
110
116
  | GetSessionTokenCommandOutput;
111
117
  export interface ClientDefaults
@@ -0,0 +1,51 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import {
4
+ GetDelegatedAccessTokenRequest,
5
+ GetDelegatedAccessTokenResponse,
6
+ } from "../models/models_0";
7
+ import {
8
+ ServiceInputTypes,
9
+ ServiceOutputTypes,
10
+ STSClientResolvedConfig,
11
+ } from "../STSClient";
12
+ export { __MetadataBearer };
13
+ export { $Command };
14
+ export interface GetDelegatedAccessTokenCommandInput
15
+ extends GetDelegatedAccessTokenRequest {}
16
+ export interface GetDelegatedAccessTokenCommandOutput
17
+ extends GetDelegatedAccessTokenResponse,
18
+ __MetadataBearer {}
19
+ declare const GetDelegatedAccessTokenCommand_base: {
20
+ new (
21
+ input: GetDelegatedAccessTokenCommandInput
22
+ ): import("@smithy/smithy-client").CommandImpl<
23
+ GetDelegatedAccessTokenCommandInput,
24
+ GetDelegatedAccessTokenCommandOutput,
25
+ STSClientResolvedConfig,
26
+ ServiceInputTypes,
27
+ ServiceOutputTypes
28
+ >;
29
+ new (
30
+ input: GetDelegatedAccessTokenCommandInput
31
+ ): import("@smithy/smithy-client").CommandImpl<
32
+ GetDelegatedAccessTokenCommandInput,
33
+ GetDelegatedAccessTokenCommandOutput,
34
+ STSClientResolvedConfig,
35
+ ServiceInputTypes,
36
+ ServiceOutputTypes
37
+ >;
38
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
39
+ };
40
+ export declare class GetDelegatedAccessTokenCommand extends GetDelegatedAccessTokenCommand_base {
41
+ protected static __types: {
42
+ api: {
43
+ input: GetDelegatedAccessTokenRequest;
44
+ output: GetDelegatedAccessTokenResponse;
45
+ };
46
+ sdk: {
47
+ input: GetDelegatedAccessTokenCommandInput;
48
+ output: GetDelegatedAccessTokenCommandOutput;
49
+ };
50
+ };
51
+ }
@@ -5,5 +5,6 @@ export * from "./AssumeRootCommand";
5
5
  export * from "./DecodeAuthorizationMessageCommand";
6
6
  export * from "./GetAccessKeyInfoCommand";
7
7
  export * from "./GetCallerIdentityCommand";
8
+ export * from "./GetDelegatedAccessTokenCommand";
8
9
  export * from "./GetFederationTokenCommand";
9
10
  export * from "./GetSessionTokenCommand";
@@ -167,6 +167,21 @@ export interface GetCallerIdentityResponse {
167
167
  Account?: string | undefined;
168
168
  Arn?: string | undefined;
169
169
  }
170
+ export declare class ExpiredTradeInTokenException extends __BaseException {
171
+ readonly name: "ExpiredTradeInTokenException";
172
+ readonly $fault: "client";
173
+ constructor(
174
+ opts: __ExceptionOptionType<ExpiredTradeInTokenException, __BaseException>
175
+ );
176
+ }
177
+ export interface GetDelegatedAccessTokenRequest {
178
+ TradeInToken: string | undefined;
179
+ }
180
+ export interface GetDelegatedAccessTokenResponse {
181
+ Credentials?: Credentials | undefined;
182
+ PackedPolicySize?: number | undefined;
183
+ AssumedPrincipal?: string | undefined;
184
+ }
170
185
  export interface GetFederationTokenRequest {
171
186
  Name: string | undefined;
172
187
  Policy?: string | undefined;
@@ -210,6 +225,12 @@ export declare const AssumeRoleWithWebIdentityResponseFilterSensitiveLog: (
210
225
  export declare const AssumeRootResponseFilterSensitiveLog: (
211
226
  obj: AssumeRootResponse
212
227
  ) => any;
228
+ export declare const GetDelegatedAccessTokenRequestFilterSensitiveLog: (
229
+ obj: GetDelegatedAccessTokenRequest
230
+ ) => any;
231
+ export declare const GetDelegatedAccessTokenResponseFilterSensitiveLog: (
232
+ obj: GetDelegatedAccessTokenResponse
233
+ ) => any;
213
234
  export declare const GetFederationTokenResponseFilterSensitiveLog: (
214
235
  obj: GetFederationTokenResponse
215
236
  ) => any;
@@ -31,6 +31,10 @@ import {
31
31
  GetCallerIdentityCommandInput,
32
32
  GetCallerIdentityCommandOutput,
33
33
  } from "../commands/GetCallerIdentityCommand";
34
+ import {
35
+ GetDelegatedAccessTokenCommandInput,
36
+ GetDelegatedAccessTokenCommandOutput,
37
+ } from "../commands/GetDelegatedAccessTokenCommand";
34
38
  import {
35
39
  GetFederationTokenCommandInput,
36
40
  GetFederationTokenCommandOutput,
@@ -67,6 +71,10 @@ export declare const se_GetCallerIdentityCommand: (
67
71
  input: GetCallerIdentityCommandInput,
68
72
  context: __SerdeContext
69
73
  ) => Promise<__HttpRequest>;
74
+ export declare const se_GetDelegatedAccessTokenCommand: (
75
+ input: GetDelegatedAccessTokenCommandInput,
76
+ context: __SerdeContext
77
+ ) => Promise<__HttpRequest>;
70
78
  export declare const se_GetFederationTokenCommand: (
71
79
  input: GetFederationTokenCommandInput,
72
80
  context: __SerdeContext
@@ -103,6 +111,10 @@ export declare const de_GetCallerIdentityCommand: (
103
111
  output: __HttpResponse,
104
112
  context: __SerdeContext
105
113
  ) => Promise<GetCallerIdentityCommandOutput>;
114
+ export declare const de_GetDelegatedAccessTokenCommand: (
115
+ output: __HttpResponse,
116
+ context: __SerdeContext
117
+ ) => Promise<GetDelegatedAccessTokenCommandOutput>;
106
118
  export declare const de_GetFederationTokenCommand: (
107
119
  output: __HttpResponse,
108
120
  context: __SerdeContext
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sts",
3
3
  "description": "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
4
- "version": "3.927.0",
4
+ "version": "3.928.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-sts",
@@ -22,17 +22,17 @@
22
22
  "dependencies": {
23
23
  "@aws-crypto/sha256-browser": "5.2.0",
24
24
  "@aws-crypto/sha256-js": "5.2.0",
25
- "@aws-sdk/core": "3.927.0",
26
- "@aws-sdk/credential-provider-node": "3.927.0",
25
+ "@aws-sdk/core": "3.928.0",
26
+ "@aws-sdk/credential-provider-node": "3.928.0",
27
27
  "@aws-sdk/middleware-host-header": "3.922.0",
28
28
  "@aws-sdk/middleware-logger": "3.922.0",
29
29
  "@aws-sdk/middleware-recursion-detection": "3.922.0",
30
- "@aws-sdk/middleware-user-agent": "3.927.0",
30
+ "@aws-sdk/middleware-user-agent": "3.928.0",
31
31
  "@aws-sdk/region-config-resolver": "3.925.0",
32
32
  "@aws-sdk/types": "3.922.0",
33
33
  "@aws-sdk/util-endpoints": "3.922.0",
34
34
  "@aws-sdk/util-user-agent-browser": "3.922.0",
35
- "@aws-sdk/util-user-agent-node": "3.927.0",
35
+ "@aws-sdk/util-user-agent-node": "3.928.0",
36
36
  "@smithy/config-resolver": "^4.4.2",
37
37
  "@smithy/core": "^3.17.2",
38
38
  "@smithy/fetch-http-handler": "^5.3.5",