@aws-sdk/client-sts 3.180.0 → 3.183.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist-cjs/protocols/Aws_query.js +29 -21
- package/dist-es/STS.js +34 -41
- package/dist-es/STSClient.js +21 -27
- package/dist-es/commands/AssumeRoleCommand.js +21 -28
- package/dist-es/commands/AssumeRoleWithSAMLCommand.js +21 -28
- package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +21 -28
- package/dist-es/commands/DecodeAuthorizationMessageCommand.js +21 -28
- package/dist-es/commands/GetAccessKeyInfoCommand.js +21 -28
- package/dist-es/commands/GetCallerIdentityCommand.js +21 -28
- package/dist-es/commands/GetFederationTokenCommand.js +21 -28
- package/dist-es/commands/GetSessionTokenCommand.js +21 -28
- package/dist-es/defaultRoleAssumers.js +14 -35
- package/dist-es/defaultStsRoleAssumers.js +61 -78
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/STSServiceException.js +5 -10
- package/dist-es/models/models_0.js +151 -110
- package/dist-es/protocols/Aws_query.js +614 -806
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-sts
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
|
|
20
|
+
* **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
|
|
21
|
+
* **clients:** update message in Error key in case of XML protocol ([#4000](https://github.com/aws/aws-sdk-js-v3/issues/4000)) ([057f686](https://github.com/aws/aws-sdk-js-v3/commit/057f686f217caa4e277bbe6e2905decf97b0fad1))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* **clients:** support awsQueryError trait ([#3998](https://github.com/aws/aws-sdk-js-v3/issues/3998)) ([384cbd7](https://github.com/aws/aws-sdk-js-v3/commit/384cbd7cbdbc0635d2dbff53b54d769ca80dabbb))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
6
32
|
# [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
|
|
7
33
|
|
|
8
34
|
**Note:** Version bump only for package @aws-sdk/client-sts
|
|
@@ -128,17 +128,17 @@ exports.deserializeAws_queryAssumeRoleCommand = deserializeAws_queryAssumeRoleCo
|
|
|
128
128
|
const deserializeAws_queryAssumeRoleCommandError = async (output, context) => {
|
|
129
129
|
const parsedOutput = {
|
|
130
130
|
...output,
|
|
131
|
-
body: await
|
|
131
|
+
body: await parseErrorBody(output.body, context),
|
|
132
132
|
};
|
|
133
133
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
134
134
|
switch (errorCode) {
|
|
135
135
|
case "ExpiredTokenException":
|
|
136
136
|
case "com.amazonaws.sts#ExpiredTokenException":
|
|
137
137
|
throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context);
|
|
138
|
-
case "
|
|
138
|
+
case "MalformedPolicyDocument":
|
|
139
139
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
140
140
|
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
141
|
-
case "
|
|
141
|
+
case "PackedPolicyTooLarge":
|
|
142
142
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
143
143
|
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
144
144
|
case "RegionDisabledException":
|
|
@@ -171,23 +171,23 @@ exports.deserializeAws_queryAssumeRoleWithSAMLCommand = deserializeAws_queryAssu
|
|
|
171
171
|
const deserializeAws_queryAssumeRoleWithSAMLCommandError = async (output, context) => {
|
|
172
172
|
const parsedOutput = {
|
|
173
173
|
...output,
|
|
174
|
-
body: await
|
|
174
|
+
body: await parseErrorBody(output.body, context),
|
|
175
175
|
};
|
|
176
176
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
177
177
|
switch (errorCode) {
|
|
178
178
|
case "ExpiredTokenException":
|
|
179
179
|
case "com.amazonaws.sts#ExpiredTokenException":
|
|
180
180
|
throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context);
|
|
181
|
-
case "
|
|
181
|
+
case "IDPRejectedClaim":
|
|
182
182
|
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
183
183
|
throw await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context);
|
|
184
|
-
case "
|
|
184
|
+
case "InvalidIdentityToken":
|
|
185
185
|
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
186
186
|
throw await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context);
|
|
187
|
-
case "
|
|
187
|
+
case "MalformedPolicyDocument":
|
|
188
188
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
189
189
|
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
190
|
-
case "
|
|
190
|
+
case "PackedPolicyTooLarge":
|
|
191
191
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
192
192
|
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
193
193
|
case "RegionDisabledException":
|
|
@@ -220,26 +220,26 @@ exports.deserializeAws_queryAssumeRoleWithWebIdentityCommand = deserializeAws_qu
|
|
|
220
220
|
const deserializeAws_queryAssumeRoleWithWebIdentityCommandError = async (output, context) => {
|
|
221
221
|
const parsedOutput = {
|
|
222
222
|
...output,
|
|
223
|
-
body: await
|
|
223
|
+
body: await parseErrorBody(output.body, context),
|
|
224
224
|
};
|
|
225
225
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
226
226
|
switch (errorCode) {
|
|
227
227
|
case "ExpiredTokenException":
|
|
228
228
|
case "com.amazonaws.sts#ExpiredTokenException":
|
|
229
229
|
throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context);
|
|
230
|
-
case "
|
|
230
|
+
case "IDPCommunicationError":
|
|
231
231
|
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
|
232
232
|
throw await deserializeAws_queryIDPCommunicationErrorExceptionResponse(parsedOutput, context);
|
|
233
|
-
case "
|
|
233
|
+
case "IDPRejectedClaim":
|
|
234
234
|
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
235
235
|
throw await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context);
|
|
236
|
-
case "
|
|
236
|
+
case "InvalidIdentityToken":
|
|
237
237
|
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
238
238
|
throw await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context);
|
|
239
|
-
case "
|
|
239
|
+
case "MalformedPolicyDocument":
|
|
240
240
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
241
241
|
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
242
|
-
case "
|
|
242
|
+
case "PackedPolicyTooLarge":
|
|
243
243
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
244
244
|
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
245
245
|
case "RegionDisabledException":
|
|
@@ -272,7 +272,7 @@ exports.deserializeAws_queryDecodeAuthorizationMessageCommand = deserializeAws_q
|
|
|
272
272
|
const deserializeAws_queryDecodeAuthorizationMessageCommandError = async (output, context) => {
|
|
273
273
|
const parsedOutput = {
|
|
274
274
|
...output,
|
|
275
|
-
body: await
|
|
275
|
+
body: await parseErrorBody(output.body, context),
|
|
276
276
|
};
|
|
277
277
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
278
278
|
switch (errorCode) {
|
|
@@ -306,7 +306,7 @@ exports.deserializeAws_queryGetAccessKeyInfoCommand = deserializeAws_queryGetAcc
|
|
|
306
306
|
const deserializeAws_queryGetAccessKeyInfoCommandError = async (output, context) => {
|
|
307
307
|
const parsedOutput = {
|
|
308
308
|
...output,
|
|
309
|
-
body: await
|
|
309
|
+
body: await parseErrorBody(output.body, context),
|
|
310
310
|
};
|
|
311
311
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
312
312
|
const parsedBody = parsedOutput.body;
|
|
@@ -334,7 +334,7 @@ exports.deserializeAws_queryGetCallerIdentityCommand = deserializeAws_queryGetCa
|
|
|
334
334
|
const deserializeAws_queryGetCallerIdentityCommandError = async (output, context) => {
|
|
335
335
|
const parsedOutput = {
|
|
336
336
|
...output,
|
|
337
|
-
body: await
|
|
337
|
+
body: await parseErrorBody(output.body, context),
|
|
338
338
|
};
|
|
339
339
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
340
340
|
const parsedBody = parsedOutput.body;
|
|
@@ -362,14 +362,14 @@ exports.deserializeAws_queryGetFederationTokenCommand = deserializeAws_queryGetF
|
|
|
362
362
|
const deserializeAws_queryGetFederationTokenCommandError = async (output, context) => {
|
|
363
363
|
const parsedOutput = {
|
|
364
364
|
...output,
|
|
365
|
-
body: await
|
|
365
|
+
body: await parseErrorBody(output.body, context),
|
|
366
366
|
};
|
|
367
367
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
368
368
|
switch (errorCode) {
|
|
369
|
-
case "
|
|
369
|
+
case "MalformedPolicyDocument":
|
|
370
370
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
371
371
|
throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context);
|
|
372
|
-
case "
|
|
372
|
+
case "PackedPolicyTooLarge":
|
|
373
373
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
374
374
|
throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context);
|
|
375
375
|
case "RegionDisabledException":
|
|
@@ -402,7 +402,7 @@ exports.deserializeAws_queryGetSessionTokenCommand = deserializeAws_queryGetSess
|
|
|
402
402
|
const deserializeAws_queryGetSessionTokenCommandError = async (output, context) => {
|
|
403
403
|
const parsedOutput = {
|
|
404
404
|
...output,
|
|
405
|
-
body: await
|
|
405
|
+
body: await parseErrorBody(output.body, context),
|
|
406
406
|
};
|
|
407
407
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
408
408
|
switch (errorCode) {
|
|
@@ -1041,6 +1041,14 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
1041
1041
|
}
|
|
1042
1042
|
return {};
|
|
1043
1043
|
});
|
|
1044
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1045
|
+
var _a;
|
|
1046
|
+
const value = await parseBody(errorBody, context);
|
|
1047
|
+
if (value.Error) {
|
|
1048
|
+
value.Error.message = (_a = value.Error.message) !== null && _a !== void 0 ? _a : value.Error.Message;
|
|
1049
|
+
}
|
|
1050
|
+
return value;
|
|
1051
|
+
};
|
|
1044
1052
|
const buildFormUrlencodedString = (formEntries) => Object.entries(formEntries)
|
|
1045
1053
|
.map(([key, value]) => (0, smithy_client_1.extendedEncodeURIComponent)(key) + "=" + (0, smithy_client_1.extendedEncodeURIComponent)(value))
|
|
1046
1054
|
.join("&");
|
package/dist-es/STS.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { AssumeRoleCommand } from "./commands/AssumeRoleCommand";
|
|
3
2
|
import { AssumeRoleWithSAMLCommand, } from "./commands/AssumeRoleWithSAMLCommand";
|
|
4
3
|
import { AssumeRoleWithWebIdentityCommand, } from "./commands/AssumeRoleWithWebIdentityCommand";
|
|
@@ -8,123 +7,117 @@ import { GetCallerIdentityCommand, } from "./commands/GetCallerIdentityCommand";
|
|
|
8
7
|
import { GetFederationTokenCommand, } from "./commands/GetFederationTokenCommand";
|
|
9
8
|
import { GetSessionTokenCommand, } from "./commands/GetSessionTokenCommand";
|
|
10
9
|
import { STSClient } from "./STSClient";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
15
|
-
}
|
|
16
|
-
STS.prototype.assumeRole = function (args, optionsOrCb, cb) {
|
|
17
|
-
var command = new AssumeRoleCommand(args);
|
|
10
|
+
export class STS extends STSClient {
|
|
11
|
+
assumeRole(args, optionsOrCb, cb) {
|
|
12
|
+
const command = new AssumeRoleCommand(args);
|
|
18
13
|
if (typeof optionsOrCb === "function") {
|
|
19
14
|
this.send(command, optionsOrCb);
|
|
20
15
|
}
|
|
21
16
|
else if (typeof cb === "function") {
|
|
22
17
|
if (typeof optionsOrCb !== "object")
|
|
23
|
-
throw new Error(
|
|
18
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
24
19
|
this.send(command, optionsOrCb || {}, cb);
|
|
25
20
|
}
|
|
26
21
|
else {
|
|
27
22
|
return this.send(command, optionsOrCb);
|
|
28
23
|
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
}
|
|
25
|
+
assumeRoleWithSAML(args, optionsOrCb, cb) {
|
|
26
|
+
const command = new AssumeRoleWithSAMLCommand(args);
|
|
32
27
|
if (typeof optionsOrCb === "function") {
|
|
33
28
|
this.send(command, optionsOrCb);
|
|
34
29
|
}
|
|
35
30
|
else if (typeof cb === "function") {
|
|
36
31
|
if (typeof optionsOrCb !== "object")
|
|
37
|
-
throw new Error(
|
|
32
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
38
33
|
this.send(command, optionsOrCb || {}, cb);
|
|
39
34
|
}
|
|
40
35
|
else {
|
|
41
36
|
return this.send(command, optionsOrCb);
|
|
42
37
|
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
}
|
|
39
|
+
assumeRoleWithWebIdentity(args, optionsOrCb, cb) {
|
|
40
|
+
const command = new AssumeRoleWithWebIdentityCommand(args);
|
|
46
41
|
if (typeof optionsOrCb === "function") {
|
|
47
42
|
this.send(command, optionsOrCb);
|
|
48
43
|
}
|
|
49
44
|
else if (typeof cb === "function") {
|
|
50
45
|
if (typeof optionsOrCb !== "object")
|
|
51
|
-
throw new Error(
|
|
46
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
52
47
|
this.send(command, optionsOrCb || {}, cb);
|
|
53
48
|
}
|
|
54
49
|
else {
|
|
55
50
|
return this.send(command, optionsOrCb);
|
|
56
51
|
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
}
|
|
53
|
+
decodeAuthorizationMessage(args, optionsOrCb, cb) {
|
|
54
|
+
const command = new DecodeAuthorizationMessageCommand(args);
|
|
60
55
|
if (typeof optionsOrCb === "function") {
|
|
61
56
|
this.send(command, optionsOrCb);
|
|
62
57
|
}
|
|
63
58
|
else if (typeof cb === "function") {
|
|
64
59
|
if (typeof optionsOrCb !== "object")
|
|
65
|
-
throw new Error(
|
|
60
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
66
61
|
this.send(command, optionsOrCb || {}, cb);
|
|
67
62
|
}
|
|
68
63
|
else {
|
|
69
64
|
return this.send(command, optionsOrCb);
|
|
70
65
|
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
}
|
|
67
|
+
getAccessKeyInfo(args, optionsOrCb, cb) {
|
|
68
|
+
const command = new GetAccessKeyInfoCommand(args);
|
|
74
69
|
if (typeof optionsOrCb === "function") {
|
|
75
70
|
this.send(command, optionsOrCb);
|
|
76
71
|
}
|
|
77
72
|
else if (typeof cb === "function") {
|
|
78
73
|
if (typeof optionsOrCb !== "object")
|
|
79
|
-
throw new Error(
|
|
74
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
80
75
|
this.send(command, optionsOrCb || {}, cb);
|
|
81
76
|
}
|
|
82
77
|
else {
|
|
83
78
|
return this.send(command, optionsOrCb);
|
|
84
79
|
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
}
|
|
81
|
+
getCallerIdentity(args, optionsOrCb, cb) {
|
|
82
|
+
const command = new GetCallerIdentityCommand(args);
|
|
88
83
|
if (typeof optionsOrCb === "function") {
|
|
89
84
|
this.send(command, optionsOrCb);
|
|
90
85
|
}
|
|
91
86
|
else if (typeof cb === "function") {
|
|
92
87
|
if (typeof optionsOrCb !== "object")
|
|
93
|
-
throw new Error(
|
|
88
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
94
89
|
this.send(command, optionsOrCb || {}, cb);
|
|
95
90
|
}
|
|
96
91
|
else {
|
|
97
92
|
return this.send(command, optionsOrCb);
|
|
98
93
|
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
}
|
|
95
|
+
getFederationToken(args, optionsOrCb, cb) {
|
|
96
|
+
const command = new GetFederationTokenCommand(args);
|
|
102
97
|
if (typeof optionsOrCb === "function") {
|
|
103
98
|
this.send(command, optionsOrCb);
|
|
104
99
|
}
|
|
105
100
|
else if (typeof cb === "function") {
|
|
106
101
|
if (typeof optionsOrCb !== "object")
|
|
107
|
-
throw new Error(
|
|
102
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
108
103
|
this.send(command, optionsOrCb || {}, cb);
|
|
109
104
|
}
|
|
110
105
|
else {
|
|
111
106
|
return this.send(command, optionsOrCb);
|
|
112
107
|
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
}
|
|
109
|
+
getSessionToken(args, optionsOrCb, cb) {
|
|
110
|
+
const command = new GetSessionTokenCommand(args);
|
|
116
111
|
if (typeof optionsOrCb === "function") {
|
|
117
112
|
this.send(command, optionsOrCb);
|
|
118
113
|
}
|
|
119
114
|
else if (typeof cb === "function") {
|
|
120
115
|
if (typeof optionsOrCb !== "object")
|
|
121
|
-
throw new Error(
|
|
116
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
122
117
|
this.send(command, optionsOrCb || {}, cb);
|
|
123
118
|
}
|
|
124
119
|
else {
|
|
125
120
|
return this.send(command, optionsOrCb);
|
|
126
121
|
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
}(STSClient));
|
|
130
|
-
export { STS };
|
|
122
|
+
}
|
|
123
|
+
}
|
package/dist-es/STSClient.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
|
|
3
2
|
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
4
3
|
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
@@ -9,30 +8,25 @@ import { resolveStsAuthConfig } from "@aws-sdk/middleware-sdk-sts";
|
|
|
9
8
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
10
9
|
import { Client as __Client, } from "@aws-sdk/smithy-client";
|
|
11
10
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
|
|
30
|
-
_this.middlewareStack.use(getUserAgentPlugin(_this.config));
|
|
31
|
-
return _this;
|
|
11
|
+
export class STSClient extends __Client {
|
|
12
|
+
constructor(configuration) {
|
|
13
|
+
const _config_0 = __getRuntimeConfig(configuration);
|
|
14
|
+
const _config_1 = resolveRegionConfig(_config_0);
|
|
15
|
+
const _config_2 = resolveEndpointsConfig(_config_1);
|
|
16
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
17
|
+
const _config_4 = resolveHostHeaderConfig(_config_3);
|
|
18
|
+
const _config_5 = resolveStsAuthConfig(_config_4, { stsClientCtor: STSClient });
|
|
19
|
+
const _config_6 = resolveUserAgentConfig(_config_5);
|
|
20
|
+
super(_config_6);
|
|
21
|
+
this.config = _config_6;
|
|
22
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
23
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
24
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
25
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
26
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
27
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
32
28
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
}(__Client));
|
|
38
|
-
export { STSClient };
|
|
29
|
+
destroy() {
|
|
30
|
+
super.destroy();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,41 +1,34 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
2
|
import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing";
|
|
4
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
5
4
|
import { AssumeRoleRequestFilterSensitiveLog, AssumeRoleResponseFilterSensitiveLog, } from "../models/models_0";
|
|
6
5
|
import { deserializeAws_queryAssumeRoleCommand, serializeAws_queryAssumeRoleCommand } from "../protocols/Aws_query";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
_this.input = input;
|
|
12
|
-
return _this;
|
|
6
|
+
export class AssumeRoleCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
13
10
|
}
|
|
14
|
-
|
|
11
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
12
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
13
|
this.middlewareStack.use(getAwsAuthPlugin(configuration));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
logger
|
|
23
|
-
clientName
|
|
24
|
-
commandName
|
|
14
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
15
|
+
const { logger } = configuration;
|
|
16
|
+
const clientName = "STSClient";
|
|
17
|
+
const commandName = "AssumeRoleCommand";
|
|
18
|
+
const handlerExecutionContext = {
|
|
19
|
+
logger,
|
|
20
|
+
clientName,
|
|
21
|
+
commandName,
|
|
25
22
|
inputFilterSensitiveLog: AssumeRoleRequestFilterSensitiveLog,
|
|
26
23
|
outputFilterSensitiveLog: AssumeRoleResponseFilterSensitiveLog,
|
|
27
24
|
};
|
|
28
|
-
|
|
29
|
-
return stack.resolve(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
AssumeRoleCommand.prototype.serialize = function (input, context) {
|
|
25
|
+
const { requestHandler } = configuration;
|
|
26
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
27
|
+
}
|
|
28
|
+
serialize(input, context) {
|
|
34
29
|
return serializeAws_queryAssumeRoleCommand(input, context);
|
|
35
|
-
}
|
|
36
|
-
|
|
30
|
+
}
|
|
31
|
+
deserialize(output, context) {
|
|
37
32
|
return deserializeAws_queryAssumeRoleCommand(output, context);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}($Command));
|
|
41
|
-
export { AssumeRoleCommand };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,39 +1,32 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
4
|
import { deserializeAws_queryAssumeRoleWithSAMLCommand, serializeAws_queryAssumeRoleWithSAMLCommand, } from "../protocols/Aws_query";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
_this.input = input;
|
|
11
|
-
return _this;
|
|
5
|
+
export class AssumeRoleWithSAMLCommand extends $Command {
|
|
6
|
+
constructor(input) {
|
|
7
|
+
super();
|
|
8
|
+
this.input = input;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
11
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
logger
|
|
21
|
-
clientName
|
|
22
|
-
commandName
|
|
12
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
13
|
+
const { logger } = configuration;
|
|
14
|
+
const clientName = "STSClient";
|
|
15
|
+
const commandName = "AssumeRoleWithSAMLCommand";
|
|
16
|
+
const handlerExecutionContext = {
|
|
17
|
+
logger,
|
|
18
|
+
clientName,
|
|
19
|
+
commandName,
|
|
23
20
|
inputFilterSensitiveLog: AssumeRoleWithSAMLRequestFilterSensitiveLog,
|
|
24
21
|
outputFilterSensitiveLog: AssumeRoleWithSAMLResponseFilterSensitiveLog,
|
|
25
22
|
};
|
|
26
|
-
|
|
27
|
-
return stack.resolve(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
AssumeRoleWithSAMLCommand.prototype.serialize = function (input, context) {
|
|
23
|
+
const { requestHandler } = configuration;
|
|
24
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
25
|
+
}
|
|
26
|
+
serialize(input, context) {
|
|
32
27
|
return serializeAws_queryAssumeRoleWithSAMLCommand(input, context);
|
|
33
|
-
}
|
|
34
|
-
|
|
28
|
+
}
|
|
29
|
+
deserialize(output, context) {
|
|
35
30
|
return deserializeAws_queryAssumeRoleWithSAMLCommand(output, context);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}($Command));
|
|
39
|
-
export { AssumeRoleWithSAMLCommand };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,39 +1,32 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
4
|
import { deserializeAws_queryAssumeRoleWithWebIdentityCommand, serializeAws_queryAssumeRoleWithWebIdentityCommand, } from "../protocols/Aws_query";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
_this.input = input;
|
|
11
|
-
return _this;
|
|
5
|
+
export class AssumeRoleWithWebIdentityCommand extends $Command {
|
|
6
|
+
constructor(input) {
|
|
7
|
+
super();
|
|
8
|
+
this.input = input;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
11
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
logger
|
|
21
|
-
clientName
|
|
22
|
-
commandName
|
|
12
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
13
|
+
const { logger } = configuration;
|
|
14
|
+
const clientName = "STSClient";
|
|
15
|
+
const commandName = "AssumeRoleWithWebIdentityCommand";
|
|
16
|
+
const handlerExecutionContext = {
|
|
17
|
+
logger,
|
|
18
|
+
clientName,
|
|
19
|
+
commandName,
|
|
23
20
|
inputFilterSensitiveLog: AssumeRoleWithWebIdentityRequestFilterSensitiveLog,
|
|
24
21
|
outputFilterSensitiveLog: AssumeRoleWithWebIdentityResponseFilterSensitiveLog,
|
|
25
22
|
};
|
|
26
|
-
|
|
27
|
-
return stack.resolve(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
AssumeRoleWithWebIdentityCommand.prototype.serialize = function (input, context) {
|
|
23
|
+
const { requestHandler } = configuration;
|
|
24
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
25
|
+
}
|
|
26
|
+
serialize(input, context) {
|
|
32
27
|
return serializeAws_queryAssumeRoleWithWebIdentityCommand(input, context);
|
|
33
|
-
}
|
|
34
|
-
|
|
28
|
+
}
|
|
29
|
+
deserialize(output, context) {
|
|
35
30
|
return deserializeAws_queryAssumeRoleWithWebIdentityCommand(output, context);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}($Command));
|
|
39
|
-
export { AssumeRoleWithWebIdentityCommand };
|
|
31
|
+
}
|
|
32
|
+
}
|