@aws-sdk/client-sts 3.934.0 → 3.935.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 +8 -0
- package/dist-cjs/index.js +125 -0
- package/dist-es/STS.js +2 -0
- package/dist-es/commands/GetWebIdentityTokenCommand.js +16 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/index.js +1 -1
- package/dist-es/models/errors.js +145 -0
- package/dist-es/models/models_0.js +1 -109
- package/dist-es/schemas/schemas_0.js +74 -1
- package/dist-types/STS.d.ts +7 -0
- package/dist-types/STSClient.d.ts +3 -2
- package/dist-types/commands/AssumeRoleCommand.d.ts +2 -3
- package/dist-types/commands/AssumeRoleWithSAMLCommand.d.ts +2 -3
- package/dist-types/commands/AssumeRoleWithWebIdentityCommand.d.ts +2 -3
- package/dist-types/commands/AssumeRootCommand.d.ts +2 -3
- package/dist-types/commands/GetDelegatedAccessTokenCommand.d.ts +19 -5
- package/dist-types/commands/GetFederationTokenCommand.d.ts +2 -3
- package/dist-types/commands/GetSessionTokenCommand.d.ts +2 -3
- package/dist-types/commands/GetWebIdentityTokenCommand.d.ts +98 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/index.d.ts +2 -1
- package/dist-types/models/errors.d.ts +172 -0
- package/dist-types/models/models_0.d.ts +61 -137
- package/dist-types/schemas/schemas_0.d.ts +8 -0
- package/dist-types/ts3.4/STS.d.ts +17 -0
- package/dist-types/ts3.4/STSClient.d.ts +8 -2
- package/dist-types/ts3.4/commands/GetWebIdentityTokenCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/index.d.ts +2 -1
- package/dist-types/ts3.4/models/errors.d.ts +101 -0
- package/dist-types/ts3.4/models/models_0.d.ts +10 -71
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +8 -0
- package/package.json +12 -12
- package/dist-es/models/index.js +0 -1
- package/dist-types/models/index.d.ts +0 -1
- package/dist-types/ts3.4/models/index.d.ts +0 -1
|
@@ -46,15 +46,20 @@ const _GFTRe = "GetFederationTokenResponse";
|
|
|
46
46
|
const _GST = "GetSessionToken";
|
|
47
47
|
const _GSTR = "GetSessionTokenRequest";
|
|
48
48
|
const _GSTRe = "GetSessionTokenResponse";
|
|
49
|
+
const _GWIT = "GetWebIdentityToken";
|
|
50
|
+
const _GWITR = "GetWebIdentityTokenRequest";
|
|
51
|
+
const _GWITRe = "GetWebIdentityTokenResponse";
|
|
49
52
|
const _I = "Issuer";
|
|
50
53
|
const _IAME = "InvalidAuthorizationMessageException";
|
|
51
54
|
const _IDPCEE = "IDPCommunicationErrorException";
|
|
52
55
|
const _IDPRCE = "IDPRejectedClaimException";
|
|
53
56
|
const _IITE = "InvalidIdentityTokenException";
|
|
57
|
+
const _JWTPSEE = "JWTPayloadSizeExceededException";
|
|
54
58
|
const _K = "Key";
|
|
55
59
|
const _MPDE = "MalformedPolicyDocumentException";
|
|
56
60
|
const _N = "Name";
|
|
57
61
|
const _NQ = "NameQualifier";
|
|
62
|
+
const _OWIFDE = "OutboundWebIdentityFederationDisabledException";
|
|
58
63
|
const _P = "Policy";
|
|
59
64
|
const _PA = "PolicyArns";
|
|
60
65
|
const _PAr = "PrincipalArn";
|
|
@@ -71,9 +76,11 @@ const _RA = "RoleArn";
|
|
|
71
76
|
const _RDE = "RegionDisabledException";
|
|
72
77
|
const _RSN = "RoleSessionName";
|
|
73
78
|
const _S = "Subject";
|
|
79
|
+
const _SA = "SigningAlgorithm";
|
|
74
80
|
const _SAK = "SecretAccessKey";
|
|
75
81
|
const _SAMLA = "SAMLAssertion";
|
|
76
82
|
const _SAMLAT = "SAMLAssertionType";
|
|
83
|
+
const _SDEE = "SessionDurationEscalationException";
|
|
77
84
|
const _SFWIT = "SubjectFromWebIdentityToken";
|
|
78
85
|
const _SI = "SourceIdentity";
|
|
79
86
|
const _SN = "SerialNumber";
|
|
@@ -101,14 +108,16 @@ const _pDLT = "policyDescriptorListType";
|
|
|
101
108
|
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
|
|
102
109
|
const _tITT = "tradeInTokenType";
|
|
103
110
|
const _tLT = "tagListType";
|
|
111
|
+
const _wITT = "webIdentityTokenType";
|
|
104
112
|
const n0 = "com.amazonaws.sts";
|
|
105
113
|
import { TypeRegistry } from "@smithy/core/schema";
|
|
106
|
-
import { ExpiredTokenException as __ExpiredTokenException, ExpiredTradeInTokenException as __ExpiredTradeInTokenException, IDPCommunicationErrorException as __IDPCommunicationErrorException, IDPRejectedClaimException as __IDPRejectedClaimException, InvalidAuthorizationMessageException as __InvalidAuthorizationMessageException, InvalidIdentityTokenException as __InvalidIdentityTokenException, MalformedPolicyDocumentException as __MalformedPolicyDocumentException, PackedPolicyTooLargeException as __PackedPolicyTooLargeException, RegionDisabledException as __RegionDisabledException, } from "../models/
|
|
114
|
+
import { ExpiredTokenException as __ExpiredTokenException, ExpiredTradeInTokenException as __ExpiredTradeInTokenException, IDPCommunicationErrorException as __IDPCommunicationErrorException, IDPRejectedClaimException as __IDPRejectedClaimException, InvalidAuthorizationMessageException as __InvalidAuthorizationMessageException, InvalidIdentityTokenException as __InvalidIdentityTokenException, JWTPayloadSizeExceededException as __JWTPayloadSizeExceededException, MalformedPolicyDocumentException as __MalformedPolicyDocumentException, OutboundWebIdentityFederationDisabledException as __OutboundWebIdentityFederationDisabledException, PackedPolicyTooLargeException as __PackedPolicyTooLargeException, RegionDisabledException as __RegionDisabledException, SessionDurationEscalationException as __SessionDurationEscalationException, } from "../models/errors";
|
|
107
115
|
import { STSServiceException as __STSServiceException } from "../models/STSServiceException";
|
|
108
116
|
export var accessKeySecretType = [0, n0, _aKST, 8, 0];
|
|
109
117
|
export var clientTokenType = [0, n0, _cTT, 8, 0];
|
|
110
118
|
export var SAMLAssertionType = [0, n0, _SAMLAT, 8, 0];
|
|
111
119
|
export var tradeInTokenType = [0, n0, _tITT, 8, 0];
|
|
120
|
+
export var webIdentityTokenType = [0, n0, _wITT, 8, 0];
|
|
112
121
|
export var AssumedRoleUser = [3, n0, _ARU, 0, [_ARI, _A], [0, 0]];
|
|
113
122
|
export var AssumeRoleRequest = [
|
|
114
123
|
3,
|
|
@@ -242,6 +251,22 @@ export var GetFederationTokenResponse = [
|
|
|
242
251
|
];
|
|
243
252
|
export var GetSessionTokenRequest = [3, n0, _GSTR, 0, [_DS, _SN, _TC], [1, 0, 0]];
|
|
244
253
|
export var GetSessionTokenResponse = [3, n0, _GSTRe, 0, [_C], [[() => Credentials, 0]]];
|
|
254
|
+
export var GetWebIdentityTokenRequest = [
|
|
255
|
+
3,
|
|
256
|
+
n0,
|
|
257
|
+
_GWITR,
|
|
258
|
+
0,
|
|
259
|
+
[_Au, _DS, _SA, _T],
|
|
260
|
+
[64 | 0, 1, 0, () => tagListType],
|
|
261
|
+
];
|
|
262
|
+
export var GetWebIdentityTokenResponse = [
|
|
263
|
+
3,
|
|
264
|
+
n0,
|
|
265
|
+
_GWITRe,
|
|
266
|
+
0,
|
|
267
|
+
[_WIT, _E],
|
|
268
|
+
[[() => webIdentityTokenType, 0], 4],
|
|
269
|
+
];
|
|
245
270
|
export var IDPCommunicationErrorException = [
|
|
246
271
|
-3,
|
|
247
272
|
n0,
|
|
@@ -294,6 +319,19 @@ export var InvalidIdentityTokenException = [
|
|
|
294
319
|
[0],
|
|
295
320
|
];
|
|
296
321
|
TypeRegistry.for(n0).registerError(InvalidIdentityTokenException, __InvalidIdentityTokenException);
|
|
322
|
+
export var JWTPayloadSizeExceededException = [
|
|
323
|
+
-3,
|
|
324
|
+
n0,
|
|
325
|
+
_JWTPSEE,
|
|
326
|
+
{
|
|
327
|
+
[_e]: _c,
|
|
328
|
+
[_hE]: 400,
|
|
329
|
+
[_aQE]: [`JWTPayloadSizeExceededException`, 400],
|
|
330
|
+
},
|
|
331
|
+
[_m],
|
|
332
|
+
[0],
|
|
333
|
+
];
|
|
334
|
+
TypeRegistry.for(n0).registerError(JWTPayloadSizeExceededException, __JWTPayloadSizeExceededException);
|
|
297
335
|
export var MalformedPolicyDocumentException = [
|
|
298
336
|
-3,
|
|
299
337
|
n0,
|
|
@@ -307,6 +345,19 @@ export var MalformedPolicyDocumentException = [
|
|
|
307
345
|
[0],
|
|
308
346
|
];
|
|
309
347
|
TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException, __MalformedPolicyDocumentException);
|
|
348
|
+
export var OutboundWebIdentityFederationDisabledException = [
|
|
349
|
+
-3,
|
|
350
|
+
n0,
|
|
351
|
+
_OWIFDE,
|
|
352
|
+
{
|
|
353
|
+
[_e]: _c,
|
|
354
|
+
[_hE]: 403,
|
|
355
|
+
[_aQE]: [`OutboundWebIdentityFederationDisabledException`, 403],
|
|
356
|
+
},
|
|
357
|
+
[_m],
|
|
358
|
+
[0],
|
|
359
|
+
];
|
|
360
|
+
TypeRegistry.for(n0).registerError(OutboundWebIdentityFederationDisabledException, __OutboundWebIdentityFederationDisabledException);
|
|
310
361
|
export var PackedPolicyTooLargeException = [
|
|
311
362
|
-3,
|
|
312
363
|
n0,
|
|
@@ -335,6 +386,19 @@ export var RegionDisabledException = [
|
|
|
335
386
|
[0],
|
|
336
387
|
];
|
|
337
388
|
TypeRegistry.for(n0).registerError(RegionDisabledException, __RegionDisabledException);
|
|
389
|
+
export var SessionDurationEscalationException = [
|
|
390
|
+
-3,
|
|
391
|
+
n0,
|
|
392
|
+
_SDEE,
|
|
393
|
+
{
|
|
394
|
+
[_e]: _c,
|
|
395
|
+
[_hE]: 403,
|
|
396
|
+
[_aQE]: [`SessionDurationEscalationException`, 403],
|
|
397
|
+
},
|
|
398
|
+
[_m],
|
|
399
|
+
[0],
|
|
400
|
+
];
|
|
401
|
+
TypeRegistry.for(n0).registerError(SessionDurationEscalationException, __SessionDurationEscalationException);
|
|
338
402
|
export var Tag = [3, n0, _Ta, 0, [_K, _V], [0, 0]];
|
|
339
403
|
export var STSServiceException = [-3, _s, "STSServiceException", 0, [], []];
|
|
340
404
|
TypeRegistry.for(_s).registerError(STSServiceException, __STSServiceException);
|
|
@@ -342,6 +406,7 @@ export var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorTy
|
|
|
342
406
|
export var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext];
|
|
343
407
|
export var tagKeyListType = 64 | 0;
|
|
344
408
|
export var tagListType = [1, n0, _tLT, 0, () => Tag];
|
|
409
|
+
export var webIdentityTokenAudienceListType = 64 | 0;
|
|
345
410
|
export var AssumeRole = [9, n0, _AR, 0, () => AssumeRoleRequest, () => AssumeRoleResponse];
|
|
346
411
|
export var AssumeRoleWithSAML = [
|
|
347
412
|
9,
|
|
@@ -408,3 +473,11 @@ export var GetSessionToken = [
|
|
|
408
473
|
() => GetSessionTokenRequest,
|
|
409
474
|
() => GetSessionTokenResponse,
|
|
410
475
|
];
|
|
476
|
+
export var GetWebIdentityToken = [
|
|
477
|
+
9,
|
|
478
|
+
n0,
|
|
479
|
+
_GWIT,
|
|
480
|
+
0,
|
|
481
|
+
() => GetWebIdentityTokenRequest,
|
|
482
|
+
() => GetWebIdentityTokenResponse,
|
|
483
|
+
];
|
package/dist-types/STS.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from ".
|
|
|
9
9
|
import { GetDelegatedAccessTokenCommandInput, GetDelegatedAccessTokenCommandOutput } from "./commands/GetDelegatedAccessTokenCommand";
|
|
10
10
|
import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "./commands/GetFederationTokenCommand";
|
|
11
11
|
import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "./commands/GetSessionTokenCommand";
|
|
12
|
+
import { GetWebIdentityTokenCommandInput, GetWebIdentityTokenCommandOutput } from "./commands/GetWebIdentityTokenCommand";
|
|
12
13
|
import { STSClient } from "./STSClient";
|
|
13
14
|
export interface STS {
|
|
14
15
|
/**
|
|
@@ -73,6 +74,12 @@ export interface STS {
|
|
|
73
74
|
getSessionToken(args: GetSessionTokenCommandInput, options?: __HttpHandlerOptions): Promise<GetSessionTokenCommandOutput>;
|
|
74
75
|
getSessionToken(args: GetSessionTokenCommandInput, cb: (err: any, data?: GetSessionTokenCommandOutput) => void): void;
|
|
75
76
|
getSessionToken(args: GetSessionTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSessionTokenCommandOutput) => void): void;
|
|
77
|
+
/**
|
|
78
|
+
* @see {@link GetWebIdentityTokenCommand}
|
|
79
|
+
*/
|
|
80
|
+
getWebIdentityToken(args: GetWebIdentityTokenCommandInput, options?: __HttpHandlerOptions): Promise<GetWebIdentityTokenCommandOutput>;
|
|
81
|
+
getWebIdentityToken(args: GetWebIdentityTokenCommandInput, cb: (err: any, data?: GetWebIdentityTokenCommandOutput) => void): void;
|
|
82
|
+
getWebIdentityToken(args: GetWebIdentityTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetWebIdentityTokenCommandOutput) => void): void;
|
|
76
83
|
}
|
|
77
84
|
/**
|
|
78
85
|
* <fullname>Security Token Service</fullname>
|
|
@@ -17,17 +17,18 @@ import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from ".
|
|
|
17
17
|
import { GetDelegatedAccessTokenCommandInput, GetDelegatedAccessTokenCommandOutput } from "./commands/GetDelegatedAccessTokenCommand";
|
|
18
18
|
import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "./commands/GetFederationTokenCommand";
|
|
19
19
|
import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "./commands/GetSessionTokenCommand";
|
|
20
|
+
import { GetWebIdentityTokenCommandInput, GetWebIdentityTokenCommandOutput } from "./commands/GetWebIdentityTokenCommand";
|
|
20
21
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
21
22
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
22
23
|
export { __Client };
|
|
23
24
|
/**
|
|
24
25
|
* @public
|
|
25
26
|
*/
|
|
26
|
-
export type ServiceInputTypes = AssumeRoleCommandInput | AssumeRoleWithSAMLCommandInput | AssumeRoleWithWebIdentityCommandInput | AssumeRootCommandInput | DecodeAuthorizationMessageCommandInput | GetAccessKeyInfoCommandInput | GetCallerIdentityCommandInput | GetDelegatedAccessTokenCommandInput | GetFederationTokenCommandInput | GetSessionTokenCommandInput;
|
|
27
|
+
export type ServiceInputTypes = AssumeRoleCommandInput | AssumeRoleWithSAMLCommandInput | AssumeRoleWithWebIdentityCommandInput | AssumeRootCommandInput | DecodeAuthorizationMessageCommandInput | GetAccessKeyInfoCommandInput | GetCallerIdentityCommandInput | GetDelegatedAccessTokenCommandInput | GetFederationTokenCommandInput | GetSessionTokenCommandInput | GetWebIdentityTokenCommandInput;
|
|
27
28
|
/**
|
|
28
29
|
* @public
|
|
29
30
|
*/
|
|
30
|
-
export type ServiceOutputTypes = AssumeRoleCommandOutput | AssumeRoleWithSAMLCommandOutput | AssumeRoleWithWebIdentityCommandOutput | AssumeRootCommandOutput | DecodeAuthorizationMessageCommandOutput | GetAccessKeyInfoCommandOutput | GetCallerIdentityCommandOutput | GetDelegatedAccessTokenCommandOutput | GetFederationTokenCommandOutput | GetSessionTokenCommandOutput;
|
|
31
|
+
export type ServiceOutputTypes = AssumeRoleCommandOutput | AssumeRoleWithSAMLCommandOutput | AssumeRoleWithWebIdentityCommandOutput | AssumeRootCommandOutput | DecodeAuthorizationMessageCommandOutput | GetAccessKeyInfoCommandOutput | GetCallerIdentityCommandOutput | GetDelegatedAccessTokenCommandOutput | GetFederationTokenCommandOutput | GetSessionTokenCommandOutput | GetWebIdentityTokenCommandOutput;
|
|
31
32
|
/**
|
|
32
33
|
* @public
|
|
33
34
|
*/
|
|
@@ -200,9 +200,8 @@ 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#sts-regions-activate-deactivate">Activating and
|
|
204
|
-
*
|
|
205
|
-
* Guide</i>.</p>
|
|
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 Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM
|
|
204
|
+
* User Guide</i>.</p>
|
|
206
205
|
*
|
|
207
206
|
* @throws {@link STSServiceException}
|
|
208
207
|
* <p>Base exception class for all service exceptions from STS service.</p>
|
|
@@ -242,9 +242,8 @@ declare const AssumeRoleWithSAMLCommand_base: {
|
|
|
242
242
|
* @throws {@link RegionDisabledException} (client fault)
|
|
243
243
|
* <p>STS is not activated in the requested region for the account that is being asked to
|
|
244
244
|
* generate credentials. The account administrator must use the IAM console to activate
|
|
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
|
|
246
|
-
*
|
|
247
|
-
* Guide</i>.</p>
|
|
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 Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM
|
|
246
|
+
* User Guide</i>.</p>
|
|
248
247
|
*
|
|
249
248
|
* @throws {@link STSServiceException}
|
|
250
249
|
* <p>Base exception class for all service exceptions from STS service.</p>
|
|
@@ -233,9 +233,8 @@ declare const AssumeRoleWithWebIdentityCommand_base: {
|
|
|
233
233
|
* @throws {@link RegionDisabledException} (client fault)
|
|
234
234
|
* <p>STS is not activated in the requested region for the account that is being asked to
|
|
235
235
|
* generate credentials. The account administrator must use the IAM console to activate
|
|
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
|
|
237
|
-
*
|
|
238
|
-
* Guide</i>.</p>
|
|
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 Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM
|
|
237
|
+
* User Guide</i>.</p>
|
|
239
238
|
*
|
|
240
239
|
* @throws {@link STSServiceException}
|
|
241
240
|
* <p>Base exception class for all service exceptions from STS service.</p>
|
|
@@ -88,9 +88,8 @@ declare const AssumeRootCommand_base: {
|
|
|
88
88
|
* @throws {@link RegionDisabledException} (client fault)
|
|
89
89
|
* <p>STS is not activated in the requested region for the account that is being asked to
|
|
90
90
|
* generate credentials. The account administrator must use the IAM console to activate
|
|
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
|
|
92
|
-
*
|
|
93
|
-
* Guide</i>.</p>
|
|
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 Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM
|
|
92
|
+
* User Guide</i>.</p>
|
|
94
93
|
*
|
|
95
94
|
* @throws {@link STSServiceException}
|
|
96
95
|
* <p>Base exception class for all service exceptions from STS service.</p>
|
|
@@ -27,7 +27,10 @@ declare const GetDelegatedAccessTokenCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>
|
|
30
|
+
* <p>Exchanges a trade-in token for temporary Amazon Web Services credentials with the permissions
|
|
31
|
+
* associated with the assumed principal. This operation allows you to obtain credentials for
|
|
32
|
+
* a specific principal based on a trade-in token, enabling delegation of access to Amazon Web Services
|
|
33
|
+
* resources.</p>
|
|
31
34
|
* @example
|
|
32
35
|
* Use a bare-bones client and the command you need to make an API call.
|
|
33
36
|
* ```javascript
|
|
@@ -61,14 +64,25 @@ declare const GetDelegatedAccessTokenCommand_base: {
|
|
|
61
64
|
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
62
65
|
*
|
|
63
66
|
* @throws {@link ExpiredTradeInTokenException} (client fault)
|
|
64
|
-
* <p
|
|
67
|
+
* <p>The trade-in token provided in the request has expired and can no longer be exchanged
|
|
68
|
+
* for credentials. Request a new token and retry the operation.</p>
|
|
69
|
+
*
|
|
70
|
+
* @throws {@link PackedPolicyTooLargeException} (client fault)
|
|
71
|
+
* <p>The request was rejected because the total packed size of the session policies and
|
|
72
|
+
* session tags combined was too large. An Amazon Web Services conversion compresses the session policy
|
|
73
|
+
* document, session policy ARNs, and session tags into a packed binary format that has a
|
|
74
|
+
* separate limit. The error message indicates by percentage how close the policies and
|
|
75
|
+
* tags are to the upper size limit. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in
|
|
76
|
+
* the <i>IAM User Guide</i>.</p>
|
|
77
|
+
* <p>You could receive this error even though you meet other defined session policy and
|
|
78
|
+
* session tag limits. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length">IAM and STS Entity Character Limits</a> in the <i>IAM User
|
|
79
|
+
* Guide</i>.</p>
|
|
65
80
|
*
|
|
66
81
|
* @throws {@link RegionDisabledException} (client fault)
|
|
67
82
|
* <p>STS is not activated in the requested region for the account that is being asked to
|
|
68
83
|
* 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
|
-
*
|
|
71
|
-
* Guide</i>.</p>
|
|
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#sts-regions-activate-deactivate">Activating and Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM
|
|
85
|
+
* User Guide</i>.</p>
|
|
72
86
|
*
|
|
73
87
|
* @throws {@link STSServiceException}
|
|
74
88
|
* <p>Base exception class for all service exceptions from STS service.</p>
|
|
@@ -182,9 +182,8 @@ 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#sts-regions-activate-deactivate">Activating and
|
|
186
|
-
*
|
|
187
|
-
* Guide</i>.</p>
|
|
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 Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM
|
|
186
|
+
* User Guide</i>.</p>
|
|
188
187
|
*
|
|
189
188
|
* @throws {@link STSServiceException}
|
|
190
189
|
* <p>Base exception class for all service exceptions from STS service.</p>
|
|
@@ -121,9 +121,8 @@ 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#sts-regions-activate-deactivate">Activating and
|
|
125
|
-
*
|
|
126
|
-
* Guide</i>.</p>
|
|
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 Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM
|
|
125
|
+
* User Guide</i>.</p>
|
|
127
126
|
*
|
|
128
127
|
* @throws {@link STSServiceException}
|
|
129
128
|
* <p>Base exception class for all service exceptions from STS service.</p>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { GetWebIdentityTokenRequest, GetWebIdentityTokenResponse } 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 GetWebIdentityTokenCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetWebIdentityTokenCommandInput extends GetWebIdentityTokenRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetWebIdentityTokenCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetWebIdentityTokenCommandOutput extends GetWebIdentityTokenResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const GetWebIdentityTokenCommand_base: {
|
|
25
|
+
new (input: GetWebIdentityTokenCommandInput): import("@smithy/smithy-client").CommandImpl<GetWebIdentityTokenCommandInput, GetWebIdentityTokenCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: GetWebIdentityTokenCommandInput): import("@smithy/smithy-client").CommandImpl<GetWebIdentityTokenCommandInput, GetWebIdentityTokenCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Returns a signed JSON Web Token (JWT) that represents the calling Amazon Web Services identity.
|
|
31
|
+
* The returned JWT can be used to authenticate with external services that support OIDC discovery.
|
|
32
|
+
* The token is signed by Amazon Web Services STS and can be publicly verified using the verification keys published at the issuer's JWKS endpoint.</p>
|
|
33
|
+
* @example
|
|
34
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
35
|
+
* ```javascript
|
|
36
|
+
* import { STSClient, GetWebIdentityTokenCommand } from "@aws-sdk/client-sts"; // ES Modules import
|
|
37
|
+
* // const { STSClient, GetWebIdentityTokenCommand } = require("@aws-sdk/client-sts"); // CommonJS import
|
|
38
|
+
* // import type { STSClientConfig } from "@aws-sdk/client-sts";
|
|
39
|
+
* const config = {}; // type is STSClientConfig
|
|
40
|
+
* const client = new STSClient(config);
|
|
41
|
+
* const input = { // GetWebIdentityTokenRequest
|
|
42
|
+
* Audience: [ // webIdentityTokenAudienceListType // required
|
|
43
|
+
* "STRING_VALUE",
|
|
44
|
+
* ],
|
|
45
|
+
* DurationSeconds: Number("int"),
|
|
46
|
+
* SigningAlgorithm: "STRING_VALUE", // required
|
|
47
|
+
* Tags: [ // tagListType
|
|
48
|
+
* { // Tag
|
|
49
|
+
* Key: "STRING_VALUE", // required
|
|
50
|
+
* Value: "STRING_VALUE", // required
|
|
51
|
+
* },
|
|
52
|
+
* ],
|
|
53
|
+
* };
|
|
54
|
+
* const command = new GetWebIdentityTokenCommand(input);
|
|
55
|
+
* const response = await client.send(command);
|
|
56
|
+
* // { // GetWebIdentityTokenResponse
|
|
57
|
+
* // WebIdentityToken: "STRING_VALUE",
|
|
58
|
+
* // Expiration: new Date("TIMESTAMP"),
|
|
59
|
+
* // };
|
|
60
|
+
*
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param GetWebIdentityTokenCommandInput - {@link GetWebIdentityTokenCommandInput}
|
|
64
|
+
* @returns {@link GetWebIdentityTokenCommandOutput}
|
|
65
|
+
* @see {@link GetWebIdentityTokenCommandInput} for command's `input` shape.
|
|
66
|
+
* @see {@link GetWebIdentityTokenCommandOutput} for command's `response` shape.
|
|
67
|
+
* @see {@link STSClientResolvedConfig | config} for STSClient's `config` shape.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link JWTPayloadSizeExceededException} (client fault)
|
|
70
|
+
* <p>The requested token payload size exceeds the maximum allowed size. Reduce the number of request tags included in the <code>GetWebIdentityToken</code> API call to reduce the token payload size.</p>
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link OutboundWebIdentityFederationDisabledException} (client fault)
|
|
73
|
+
* <p>The outbound web identity federation feature is not enabled for this account. To use
|
|
74
|
+
* this feature, you must first enable it through the Amazon Web Services Management Console or API.</p>
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link SessionDurationEscalationException} (client fault)
|
|
77
|
+
* <p>The requested token duration would extend the session beyond its original expiration time.
|
|
78
|
+
* You cannot use this operation to extend the lifetime of a session beyond what was granted when the session was originally created.</p>
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link STSServiceException}
|
|
81
|
+
* <p>Base exception class for all service exceptions from STS service.</p>
|
|
82
|
+
*
|
|
83
|
+
*
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
export declare class GetWebIdentityTokenCommand extends GetWebIdentityTokenCommand_base {
|
|
87
|
+
/** @internal type navigation helper, not in runtime. */
|
|
88
|
+
protected static __types: {
|
|
89
|
+
api: {
|
|
90
|
+
input: GetWebIdentityTokenRequest;
|
|
91
|
+
output: GetWebIdentityTokenResponse;
|
|
92
|
+
};
|
|
93
|
+
sdk: {
|
|
94
|
+
input: GetWebIdentityTokenCommandInput;
|
|
95
|
+
output: GetWebIdentityTokenCommandOutput;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
}
|
package/dist-types/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters";
|
|
|
12
12
|
export type { RuntimeExtension } from "./runtimeExtensions";
|
|
13
13
|
export type { STSExtensionConfiguration } from "./extensionConfiguration";
|
|
14
14
|
export * from "./commands";
|
|
15
|
-
export * from "./models";
|
|
15
|
+
export * from "./models/errors";
|
|
16
|
+
export type * from "./models/models_0";
|
|
16
17
|
export * from "./defaultRoleAssumers";
|
|
17
18
|
export { STSServiceException } from "./models/STSServiceException";
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
|
|
2
|
+
import { STSServiceException as __BaseException } from "./STSServiceException";
|
|
3
|
+
/**
|
|
4
|
+
* <p>The web identity token that was passed is expired or is not valid. Get a new identity
|
|
5
|
+
* token from the identity provider and then retry the request.</p>
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class ExpiredTokenException extends __BaseException {
|
|
9
|
+
readonly name: "ExpiredTokenException";
|
|
10
|
+
readonly $fault: "client";
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
constructor(opts: __ExceptionOptionType<ExpiredTokenException, __BaseException>);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* <p>The request was rejected because the policy document was malformed. The error message
|
|
18
|
+
* describes the specific error.</p>
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare class MalformedPolicyDocumentException extends __BaseException {
|
|
22
|
+
readonly name: "MalformedPolicyDocumentException";
|
|
23
|
+
readonly $fault: "client";
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
constructor(opts: __ExceptionOptionType<MalformedPolicyDocumentException, __BaseException>);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* <p>The request was rejected because the total packed size of the session policies and
|
|
31
|
+
* session tags combined was too large. An Amazon Web Services conversion compresses the session policy
|
|
32
|
+
* document, session policy ARNs, and session tags into a packed binary format that has a
|
|
33
|
+
* separate limit. The error message indicates by percentage how close the policies and
|
|
34
|
+
* tags are to the upper size limit. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html">Passing Session Tags in STS</a> in
|
|
35
|
+
* the <i>IAM User Guide</i>.</p>
|
|
36
|
+
* <p>You could receive this error even though you meet other defined session policy and
|
|
37
|
+
* session tag limits. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length">IAM and STS Entity Character Limits</a> in the <i>IAM User
|
|
38
|
+
* Guide</i>.</p>
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export declare class PackedPolicyTooLargeException extends __BaseException {
|
|
42
|
+
readonly name: "PackedPolicyTooLargeException";
|
|
43
|
+
readonly $fault: "client";
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
constructor(opts: __ExceptionOptionType<PackedPolicyTooLargeException, __BaseException>);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* <p>STS is not activated in the requested region for the account that is being asked to
|
|
51
|
+
* generate credentials. The account administrator must use the IAM console to activate
|
|
52
|
+
* 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 Deactivating STS in an Amazon Web Services Region</a> in the <i>IAM
|
|
53
|
+
* User Guide</i>.</p>
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export declare class RegionDisabledException extends __BaseException {
|
|
57
|
+
readonly name: "RegionDisabledException";
|
|
58
|
+
readonly $fault: "client";
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
constructor(opts: __ExceptionOptionType<RegionDisabledException, __BaseException>);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* <p>The identity provider (IdP) reported that authentication failed. This might be because
|
|
66
|
+
* the claim is invalid.</p>
|
|
67
|
+
* <p>If this error is returned for the <code>AssumeRoleWithWebIdentity</code> operation, it
|
|
68
|
+
* can also mean that the claim has expired or has been explicitly revoked. </p>
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export declare class IDPRejectedClaimException extends __BaseException {
|
|
72
|
+
readonly name: "IDPRejectedClaimException";
|
|
73
|
+
readonly $fault: "client";
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
constructor(opts: __ExceptionOptionType<IDPRejectedClaimException, __BaseException>);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* <p>The web identity token that was passed could not be validated by Amazon Web Services. Get a new
|
|
81
|
+
* identity token from the identity provider and then retry the request.</p>
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
export declare class InvalidIdentityTokenException extends __BaseException {
|
|
85
|
+
readonly name: "InvalidIdentityTokenException";
|
|
86
|
+
readonly $fault: "client";
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
constructor(opts: __ExceptionOptionType<InvalidIdentityTokenException, __BaseException>);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* <p>The request could not be fulfilled because the identity provider (IDP) that was asked
|
|
94
|
+
* to verify the incoming identity token could not be reached. This is often a transient
|
|
95
|
+
* error caused by network conditions. Retry the request a limited number of times so that
|
|
96
|
+
* you don't exceed the request rate. If the error persists, the identity provider might be
|
|
97
|
+
* down or not responding.</p>
|
|
98
|
+
* @public
|
|
99
|
+
*/
|
|
100
|
+
export declare class IDPCommunicationErrorException extends __BaseException {
|
|
101
|
+
readonly name: "IDPCommunicationErrorException";
|
|
102
|
+
readonly $fault: "client";
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
constructor(opts: __ExceptionOptionType<IDPCommunicationErrorException, __BaseException>);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* <p>The error returned if the message passed to <code>DecodeAuthorizationMessage</code>
|
|
110
|
+
* was invalid. This can happen if the token contains invalid characters, such as line
|
|
111
|
+
* breaks, or if the message has expired.</p>
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
export declare class InvalidAuthorizationMessageException extends __BaseException {
|
|
115
|
+
readonly name: "InvalidAuthorizationMessageException";
|
|
116
|
+
readonly $fault: "client";
|
|
117
|
+
/**
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
constructor(opts: __ExceptionOptionType<InvalidAuthorizationMessageException, __BaseException>);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* <p>The trade-in token provided in the request has expired and can no longer be exchanged
|
|
124
|
+
* for credentials. Request a new token and retry the operation.</p>
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
export declare class ExpiredTradeInTokenException extends __BaseException {
|
|
128
|
+
readonly name: "ExpiredTradeInTokenException";
|
|
129
|
+
readonly $fault: "client";
|
|
130
|
+
/**
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
constructor(opts: __ExceptionOptionType<ExpiredTradeInTokenException, __BaseException>);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* <p>The requested token payload size exceeds the maximum allowed size. Reduce the number of request tags included in the <code>GetWebIdentityToken</code> API call to reduce the token payload size.</p>
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
export declare class JWTPayloadSizeExceededException extends __BaseException {
|
|
140
|
+
readonly name: "JWTPayloadSizeExceededException";
|
|
141
|
+
readonly $fault: "client";
|
|
142
|
+
/**
|
|
143
|
+
* @internal
|
|
144
|
+
*/
|
|
145
|
+
constructor(opts: __ExceptionOptionType<JWTPayloadSizeExceededException, __BaseException>);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* <p>The outbound web identity federation feature is not enabled for this account. To use
|
|
149
|
+
* this feature, you must first enable it through the Amazon Web Services Management Console or API.</p>
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
export declare class OutboundWebIdentityFederationDisabledException extends __BaseException {
|
|
153
|
+
readonly name: "OutboundWebIdentityFederationDisabledException";
|
|
154
|
+
readonly $fault: "client";
|
|
155
|
+
/**
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
158
|
+
constructor(opts: __ExceptionOptionType<OutboundWebIdentityFederationDisabledException, __BaseException>);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* <p>The requested token duration would extend the session beyond its original expiration time.
|
|
162
|
+
* You cannot use this operation to extend the lifetime of a session beyond what was granted when the session was originally created.</p>
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
165
|
+
export declare class SessionDurationEscalationException extends __BaseException {
|
|
166
|
+
readonly name: "SessionDurationEscalationException";
|
|
167
|
+
readonly $fault: "client";
|
|
168
|
+
/**
|
|
169
|
+
* @internal
|
|
170
|
+
*/
|
|
171
|
+
constructor(opts: __ExceptionOptionType<SessionDurationEscalationException, __BaseException>);
|
|
172
|
+
}
|