@cdk8s/awscdk-resolver 0.0.56 → 0.0.58
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/.jsii +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +191 -1696
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/protocols/Aws_query.js +180 -1685
- package/node_modules/@aws-sdk/client-cloudformation/package.json +14 -14
- package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +9 -90
- package/node_modules/@aws-sdk/client-sso/dist-es/protocols/Aws_restJson1.js +8 -89
- package/node_modules/@aws-sdk/client-sso/package.json +11 -11
- package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js +30 -135
- package/node_modules/@aws-sdk/client-sso-oidc/dist-es/protocols/Aws_restJson1.js +29 -134
- package/node_modules/@aws-sdk/client-sso-oidc/package.json +14 -14
- package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +74 -196
- package/node_modules/@aws-sdk/client-sts/dist-es/defaultStsRoleAssumers.js +17 -15
- package/node_modules/@aws-sdk/client-sts/dist-es/protocols/Aws_query.js +30 -178
- package/node_modules/@aws-sdk/client-sts/dist-types/defaultRoleAssumers.d.ts +4 -4
- package/node_modules/@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers.d.ts +11 -3
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultRoleAssumers.d.ts +4 -7
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +11 -3
- package/node_modules/@aws-sdk/client-sts/package.json +12 -12
- package/node_modules/@aws-sdk/core/CHANGELOG.md +11 -0
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +13 -7
- package/node_modules/@aws-sdk/core/dist-es/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +6 -2
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/core/src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts +10 -2
- package/node_modules/@aws-sdk/core/tsconfig.cjs.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/core/tsconfig.es.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/core/tsconfig.types.tsbuildinfo +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +10 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js +5 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-node/package.json +10 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +28 -1
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js +5 -1
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-signing/dist-cjs/index.js +10 -2
- package/node_modules/@aws-sdk/middleware-signing/dist-es/awsAuthConfiguration.js +6 -2
- package/node_modules/@aws-sdk/middleware-signing/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +3 -3
- package/node_modules/@aws-sdk/region-config-resolver/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/types/dist-types/credentials.d.ts +16 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts +3 -0
- package/node_modules/@aws-sdk/types/package.json +1 -1
- package/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/index.js +26 -15
- package/node_modules/@smithy/core/dist-es/pagination/createPaginator.js +12 -1
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +13 -3
- package/node_modules/@smithy/util-defaults-mode-node/dist-es/resolveDefaultsModeConfig.js +1 -1
- package/node_modules/@smithy/util-defaults-mode-node/package.json +1 -1
- package/package.json +5 -5
@@ -79,7 +79,7 @@ export const se_StartDeviceAuthorizationCommand = async (input, context) => {
|
|
79
79
|
};
|
80
80
|
export const de_CreateTokenCommand = async (output, context) => {
|
81
81
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
82
|
-
return
|
82
|
+
return de_CommandError(output, context);
|
83
83
|
}
|
84
84
|
const contents = map({
|
85
85
|
$metadata: deserializeMetadata(output),
|
@@ -95,58 +95,9 @@ export const de_CreateTokenCommand = async (output, context) => {
|
|
95
95
|
Object.assign(contents, doc);
|
96
96
|
return contents;
|
97
97
|
};
|
98
|
-
const de_CreateTokenCommandError = async (output, context) => {
|
99
|
-
const parsedOutput = {
|
100
|
-
...output,
|
101
|
-
body: await parseErrorBody(output.body, context),
|
102
|
-
};
|
103
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
104
|
-
switch (errorCode) {
|
105
|
-
case "AccessDeniedException":
|
106
|
-
case "com.amazonaws.ssooidc#AccessDeniedException":
|
107
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
108
|
-
case "AuthorizationPendingException":
|
109
|
-
case "com.amazonaws.ssooidc#AuthorizationPendingException":
|
110
|
-
throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
|
111
|
-
case "ExpiredTokenException":
|
112
|
-
case "com.amazonaws.ssooidc#ExpiredTokenException":
|
113
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
114
|
-
case "InternalServerException":
|
115
|
-
case "com.amazonaws.ssooidc#InternalServerException":
|
116
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
117
|
-
case "InvalidClientException":
|
118
|
-
case "com.amazonaws.ssooidc#InvalidClientException":
|
119
|
-
throw await de_InvalidClientExceptionRes(parsedOutput, context);
|
120
|
-
case "InvalidGrantException":
|
121
|
-
case "com.amazonaws.ssooidc#InvalidGrantException":
|
122
|
-
throw await de_InvalidGrantExceptionRes(parsedOutput, context);
|
123
|
-
case "InvalidRequestException":
|
124
|
-
case "com.amazonaws.ssooidc#InvalidRequestException":
|
125
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
126
|
-
case "InvalidScopeException":
|
127
|
-
case "com.amazonaws.ssooidc#InvalidScopeException":
|
128
|
-
throw await de_InvalidScopeExceptionRes(parsedOutput, context);
|
129
|
-
case "SlowDownException":
|
130
|
-
case "com.amazonaws.ssooidc#SlowDownException":
|
131
|
-
throw await de_SlowDownExceptionRes(parsedOutput, context);
|
132
|
-
case "UnauthorizedClientException":
|
133
|
-
case "com.amazonaws.ssooidc#UnauthorizedClientException":
|
134
|
-
throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
|
135
|
-
case "UnsupportedGrantTypeException":
|
136
|
-
case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
|
137
|
-
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
|
138
|
-
default:
|
139
|
-
const parsedBody = parsedOutput.body;
|
140
|
-
return throwDefaultError({
|
141
|
-
output,
|
142
|
-
parsedBody,
|
143
|
-
errorCode,
|
144
|
-
});
|
145
|
-
}
|
146
|
-
};
|
147
98
|
export const de_CreateTokenWithIAMCommand = async (output, context) => {
|
148
99
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
149
|
-
return
|
100
|
+
return de_CommandError(output, context);
|
150
101
|
}
|
151
102
|
const contents = map({
|
152
103
|
$metadata: deserializeMetadata(output),
|
@@ -164,61 +115,9 @@ export const de_CreateTokenWithIAMCommand = async (output, context) => {
|
|
164
115
|
Object.assign(contents, doc);
|
165
116
|
return contents;
|
166
117
|
};
|
167
|
-
const de_CreateTokenWithIAMCommandError = async (output, context) => {
|
168
|
-
const parsedOutput = {
|
169
|
-
...output,
|
170
|
-
body: await parseErrorBody(output.body, context),
|
171
|
-
};
|
172
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
173
|
-
switch (errorCode) {
|
174
|
-
case "AccessDeniedException":
|
175
|
-
case "com.amazonaws.ssooidc#AccessDeniedException":
|
176
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
177
|
-
case "AuthorizationPendingException":
|
178
|
-
case "com.amazonaws.ssooidc#AuthorizationPendingException":
|
179
|
-
throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
|
180
|
-
case "ExpiredTokenException":
|
181
|
-
case "com.amazonaws.ssooidc#ExpiredTokenException":
|
182
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
183
|
-
case "InternalServerException":
|
184
|
-
case "com.amazonaws.ssooidc#InternalServerException":
|
185
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
186
|
-
case "InvalidClientException":
|
187
|
-
case "com.amazonaws.ssooidc#InvalidClientException":
|
188
|
-
throw await de_InvalidClientExceptionRes(parsedOutput, context);
|
189
|
-
case "InvalidGrantException":
|
190
|
-
case "com.amazonaws.ssooidc#InvalidGrantException":
|
191
|
-
throw await de_InvalidGrantExceptionRes(parsedOutput, context);
|
192
|
-
case "InvalidRequestException":
|
193
|
-
case "com.amazonaws.ssooidc#InvalidRequestException":
|
194
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
195
|
-
case "InvalidRequestRegionException":
|
196
|
-
case "com.amazonaws.ssooidc#InvalidRequestRegionException":
|
197
|
-
throw await de_InvalidRequestRegionExceptionRes(parsedOutput, context);
|
198
|
-
case "InvalidScopeException":
|
199
|
-
case "com.amazonaws.ssooidc#InvalidScopeException":
|
200
|
-
throw await de_InvalidScopeExceptionRes(parsedOutput, context);
|
201
|
-
case "SlowDownException":
|
202
|
-
case "com.amazonaws.ssooidc#SlowDownException":
|
203
|
-
throw await de_SlowDownExceptionRes(parsedOutput, context);
|
204
|
-
case "UnauthorizedClientException":
|
205
|
-
case "com.amazonaws.ssooidc#UnauthorizedClientException":
|
206
|
-
throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
|
207
|
-
case "UnsupportedGrantTypeException":
|
208
|
-
case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
|
209
|
-
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
|
210
|
-
default:
|
211
|
-
const parsedBody = parsedOutput.body;
|
212
|
-
return throwDefaultError({
|
213
|
-
output,
|
214
|
-
parsedBody,
|
215
|
-
errorCode,
|
216
|
-
});
|
217
|
-
}
|
218
|
-
};
|
219
118
|
export const de_RegisterClientCommand = async (output, context) => {
|
220
119
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
221
|
-
return
|
120
|
+
return de_CommandError(output, context);
|
222
121
|
}
|
223
122
|
const contents = map({
|
224
123
|
$metadata: deserializeMetadata(output),
|
@@ -235,37 +134,9 @@ export const de_RegisterClientCommand = async (output, context) => {
|
|
235
134
|
Object.assign(contents, doc);
|
236
135
|
return contents;
|
237
136
|
};
|
238
|
-
const de_RegisterClientCommandError = async (output, context) => {
|
239
|
-
const parsedOutput = {
|
240
|
-
...output,
|
241
|
-
body: await parseErrorBody(output.body, context),
|
242
|
-
};
|
243
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
244
|
-
switch (errorCode) {
|
245
|
-
case "InternalServerException":
|
246
|
-
case "com.amazonaws.ssooidc#InternalServerException":
|
247
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
248
|
-
case "InvalidClientMetadataException":
|
249
|
-
case "com.amazonaws.ssooidc#InvalidClientMetadataException":
|
250
|
-
throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context);
|
251
|
-
case "InvalidRequestException":
|
252
|
-
case "com.amazonaws.ssooidc#InvalidRequestException":
|
253
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
254
|
-
case "InvalidScopeException":
|
255
|
-
case "com.amazonaws.ssooidc#InvalidScopeException":
|
256
|
-
throw await de_InvalidScopeExceptionRes(parsedOutput, context);
|
257
|
-
default:
|
258
|
-
const parsedBody = parsedOutput.body;
|
259
|
-
return throwDefaultError({
|
260
|
-
output,
|
261
|
-
parsedBody,
|
262
|
-
errorCode,
|
263
|
-
});
|
264
|
-
}
|
265
|
-
};
|
266
137
|
export const de_StartDeviceAuthorizationCommand = async (output, context) => {
|
267
138
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
268
|
-
return
|
139
|
+
return de_CommandError(output, context);
|
269
140
|
}
|
270
141
|
const contents = map({
|
271
142
|
$metadata: deserializeMetadata(output),
|
@@ -282,28 +153,52 @@ export const de_StartDeviceAuthorizationCommand = async (output, context) => {
|
|
282
153
|
Object.assign(contents, doc);
|
283
154
|
return contents;
|
284
155
|
};
|
285
|
-
const
|
156
|
+
const de_CommandError = async (output, context) => {
|
286
157
|
const parsedOutput = {
|
287
158
|
...output,
|
288
159
|
body: await parseErrorBody(output.body, context),
|
289
160
|
};
|
290
161
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
291
162
|
switch (errorCode) {
|
163
|
+
case "AccessDeniedException":
|
164
|
+
case "com.amazonaws.ssooidc#AccessDeniedException":
|
165
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
166
|
+
case "AuthorizationPendingException":
|
167
|
+
case "com.amazonaws.ssooidc#AuthorizationPendingException":
|
168
|
+
throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
|
169
|
+
case "ExpiredTokenException":
|
170
|
+
case "com.amazonaws.ssooidc#ExpiredTokenException":
|
171
|
+
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
292
172
|
case "InternalServerException":
|
293
173
|
case "com.amazonaws.ssooidc#InternalServerException":
|
294
174
|
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
295
175
|
case "InvalidClientException":
|
296
176
|
case "com.amazonaws.ssooidc#InvalidClientException":
|
297
177
|
throw await de_InvalidClientExceptionRes(parsedOutput, context);
|
178
|
+
case "InvalidGrantException":
|
179
|
+
case "com.amazonaws.ssooidc#InvalidGrantException":
|
180
|
+
throw await de_InvalidGrantExceptionRes(parsedOutput, context);
|
298
181
|
case "InvalidRequestException":
|
299
182
|
case "com.amazonaws.ssooidc#InvalidRequestException":
|
300
183
|
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
184
|
+
case "InvalidScopeException":
|
185
|
+
case "com.amazonaws.ssooidc#InvalidScopeException":
|
186
|
+
throw await de_InvalidScopeExceptionRes(parsedOutput, context);
|
301
187
|
case "SlowDownException":
|
302
188
|
case "com.amazonaws.ssooidc#SlowDownException":
|
303
189
|
throw await de_SlowDownExceptionRes(parsedOutput, context);
|
304
190
|
case "UnauthorizedClientException":
|
305
191
|
case "com.amazonaws.ssooidc#UnauthorizedClientException":
|
306
192
|
throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
|
193
|
+
case "UnsupportedGrantTypeException":
|
194
|
+
case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
|
195
|
+
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
|
196
|
+
case "InvalidRequestRegionException":
|
197
|
+
case "com.amazonaws.ssooidc#InvalidRequestRegionException":
|
198
|
+
throw await de_InvalidRequestRegionExceptionRes(parsedOutput, context);
|
199
|
+
case "InvalidClientMetadataException":
|
200
|
+
case "com.amazonaws.ssooidc#InvalidClientMetadataException":
|
201
|
+
throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context);
|
307
202
|
default:
|
308
203
|
const parsedBody = parsedOutput.body;
|
309
204
|
return throwDefaultError({
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aws-sdk/client-sso-oidc",
|
3
3
|
"description": "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
|
4
|
-
"version": "3.
|
4
|
+
"version": "3.511.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-sso-oidc",
|
@@ -20,18 +20,18 @@
|
|
20
20
|
"dependencies": {
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
23
|
-
"@aws-sdk/client-sts": "3.
|
24
|
-
"@aws-sdk/core": "3.
|
25
|
-
"@aws-sdk/middleware-host-header": "3.
|
26
|
-
"@aws-sdk/middleware-logger": "3.
|
27
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
28
|
-
"@aws-sdk/middleware-signing": "3.
|
29
|
-
"@aws-sdk/middleware-user-agent": "3.
|
30
|
-
"@aws-sdk/region-config-resolver": "3.
|
31
|
-
"@aws-sdk/types": "3.
|
32
|
-
"@aws-sdk/util-endpoints": "3.
|
33
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
34
|
-
"@aws-sdk/util-user-agent-node": "3.
|
23
|
+
"@aws-sdk/client-sts": "3.511.0",
|
24
|
+
"@aws-sdk/core": "3.511.0",
|
25
|
+
"@aws-sdk/middleware-host-header": "3.511.0",
|
26
|
+
"@aws-sdk/middleware-logger": "3.511.0",
|
27
|
+
"@aws-sdk/middleware-recursion-detection": "3.511.0",
|
28
|
+
"@aws-sdk/middleware-signing": "3.511.0",
|
29
|
+
"@aws-sdk/middleware-user-agent": "3.511.0",
|
30
|
+
"@aws-sdk/region-config-resolver": "3.511.0",
|
31
|
+
"@aws-sdk/types": "3.511.0",
|
32
|
+
"@aws-sdk/util-endpoints": "3.511.0",
|
33
|
+
"@aws-sdk/util-user-agent-browser": "3.511.0",
|
34
|
+
"@aws-sdk/util-user-agent-node": "3.511.0",
|
35
35
|
"@smithy/config-resolver": "^2.1.1",
|
36
36
|
"@smithy/core": "^1.3.1",
|
37
37
|
"@smithy/fetch-http-handler": "^2.4.1",
|
@@ -86,7 +86,7 @@
|
|
86
86
|
},
|
87
87
|
"license": "Apache-2.0",
|
88
88
|
"peerDependencies": {
|
89
|
-
"@aws-sdk/credential-provider-node": "^3.
|
89
|
+
"@aws-sdk/credential-provider-node": "^3.511.0"
|
90
90
|
},
|
91
91
|
"browser": {
|
92
92
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
@@ -340,7 +340,7 @@ var se_GetSessionTokenCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
340
340
|
}, "se_GetSessionTokenCommand");
|
341
341
|
var de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => {
|
342
342
|
if (output.statusCode >= 300) {
|
343
|
-
return
|
343
|
+
return de_CommandError(output, context);
|
344
344
|
}
|
345
345
|
const data = await parseBody(output.body, context);
|
346
346
|
let contents = {};
|
@@ -351,37 +351,9 @@ var de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
351
351
|
};
|
352
352
|
return response;
|
353
353
|
}, "de_AssumeRoleCommand");
|
354
|
-
var de_AssumeRoleCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
355
|
-
const parsedOutput = {
|
356
|
-
...output,
|
357
|
-
body: await parseErrorBody(output.body, context)
|
358
|
-
};
|
359
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
360
|
-
switch (errorCode) {
|
361
|
-
case "ExpiredTokenException":
|
362
|
-
case "com.amazonaws.sts#ExpiredTokenException":
|
363
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
364
|
-
case "MalformedPolicyDocument":
|
365
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
366
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
367
|
-
case "PackedPolicyTooLarge":
|
368
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
369
|
-
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
|
370
|
-
case "RegionDisabledException":
|
371
|
-
case "com.amazonaws.sts#RegionDisabledException":
|
372
|
-
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
373
|
-
default:
|
374
|
-
const parsedBody = parsedOutput.body;
|
375
|
-
return throwDefaultError({
|
376
|
-
output,
|
377
|
-
parsedBody: parsedBody.Error,
|
378
|
-
errorCode
|
379
|
-
});
|
380
|
-
}
|
381
|
-
}, "de_AssumeRoleCommandError");
|
382
354
|
var de_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (output, context) => {
|
383
355
|
if (output.statusCode >= 300) {
|
384
|
-
return
|
356
|
+
return de_CommandError(output, context);
|
385
357
|
}
|
386
358
|
const data = await parseBody(output.body, context);
|
387
359
|
let contents = {};
|
@@ -392,43 +364,9 @@ var de_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (output, context
|
|
392
364
|
};
|
393
365
|
return response;
|
394
366
|
}, "de_AssumeRoleWithSAMLCommand");
|
395
|
-
var de_AssumeRoleWithSAMLCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
396
|
-
const parsedOutput = {
|
397
|
-
...output,
|
398
|
-
body: await parseErrorBody(output.body, context)
|
399
|
-
};
|
400
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
401
|
-
switch (errorCode) {
|
402
|
-
case "ExpiredTokenException":
|
403
|
-
case "com.amazonaws.sts#ExpiredTokenException":
|
404
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
405
|
-
case "IDPRejectedClaim":
|
406
|
-
case "com.amazonaws.sts#IDPRejectedClaimException":
|
407
|
-
throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
|
408
|
-
case "InvalidIdentityToken":
|
409
|
-
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
410
|
-
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
|
411
|
-
case "MalformedPolicyDocument":
|
412
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
413
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
414
|
-
case "PackedPolicyTooLarge":
|
415
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
416
|
-
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
|
417
|
-
case "RegionDisabledException":
|
418
|
-
case "com.amazonaws.sts#RegionDisabledException":
|
419
|
-
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
420
|
-
default:
|
421
|
-
const parsedBody = parsedOutput.body;
|
422
|
-
return throwDefaultError({
|
423
|
-
output,
|
424
|
-
parsedBody: parsedBody.Error,
|
425
|
-
errorCode
|
426
|
-
});
|
427
|
-
}
|
428
|
-
}, "de_AssumeRoleWithSAMLCommandError");
|
429
367
|
var de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {
|
430
368
|
if (output.statusCode >= 300) {
|
431
|
-
return
|
369
|
+
return de_CommandError(output, context);
|
432
370
|
}
|
433
371
|
const data = await parseBody(output.body, context);
|
434
372
|
let contents = {};
|
@@ -439,46 +377,9 @@ var de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output,
|
|
439
377
|
};
|
440
378
|
return response;
|
441
379
|
}, "de_AssumeRoleWithWebIdentityCommand");
|
442
|
-
var de_AssumeRoleWithWebIdentityCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
443
|
-
const parsedOutput = {
|
444
|
-
...output,
|
445
|
-
body: await parseErrorBody(output.body, context)
|
446
|
-
};
|
447
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
448
|
-
switch (errorCode) {
|
449
|
-
case "ExpiredTokenException":
|
450
|
-
case "com.amazonaws.sts#ExpiredTokenException":
|
451
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
452
|
-
case "IDPCommunicationError":
|
453
|
-
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
454
|
-
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);
|
455
|
-
case "IDPRejectedClaim":
|
456
|
-
case "com.amazonaws.sts#IDPRejectedClaimException":
|
457
|
-
throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
|
458
|
-
case "InvalidIdentityToken":
|
459
|
-
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
460
|
-
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
|
461
|
-
case "MalformedPolicyDocument":
|
462
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
463
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
464
|
-
case "PackedPolicyTooLarge":
|
465
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
466
|
-
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
|
467
|
-
case "RegionDisabledException":
|
468
|
-
case "com.amazonaws.sts#RegionDisabledException":
|
469
|
-
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
470
|
-
default:
|
471
|
-
const parsedBody = parsedOutput.body;
|
472
|
-
return throwDefaultError({
|
473
|
-
output,
|
474
|
-
parsedBody: parsedBody.Error,
|
475
|
-
errorCode
|
476
|
-
});
|
477
|
-
}
|
478
|
-
}, "de_AssumeRoleWithWebIdentityCommandError");
|
479
380
|
var de_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (output, context) => {
|
480
381
|
if (output.statusCode >= 300) {
|
481
|
-
return
|
382
|
+
return de_CommandError(output, context);
|
482
383
|
}
|
483
384
|
const data = await parseBody(output.body, context);
|
484
385
|
let contents = {};
|
@@ -489,28 +390,9 @@ var de_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (output,
|
|
489
390
|
};
|
490
391
|
return response;
|
491
392
|
}, "de_DecodeAuthorizationMessageCommand");
|
492
|
-
var de_DecodeAuthorizationMessageCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
493
|
-
const parsedOutput = {
|
494
|
-
...output,
|
495
|
-
body: await parseErrorBody(output.body, context)
|
496
|
-
};
|
497
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
498
|
-
switch (errorCode) {
|
499
|
-
case "InvalidAuthorizationMessageException":
|
500
|
-
case "com.amazonaws.sts#InvalidAuthorizationMessageException":
|
501
|
-
throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context);
|
502
|
-
default:
|
503
|
-
const parsedBody = parsedOutput.body;
|
504
|
-
return throwDefaultError({
|
505
|
-
output,
|
506
|
-
parsedBody: parsedBody.Error,
|
507
|
-
errorCode
|
508
|
-
});
|
509
|
-
}
|
510
|
-
}, "de_DecodeAuthorizationMessageCommandError");
|
511
393
|
var de_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (output, context) => {
|
512
394
|
if (output.statusCode >= 300) {
|
513
|
-
return
|
395
|
+
return de_CommandError(output, context);
|
514
396
|
}
|
515
397
|
const data = await parseBody(output.body, context);
|
516
398
|
let contents = {};
|
@@ -521,22 +403,9 @@ var de_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (output, context)
|
|
521
403
|
};
|
522
404
|
return response;
|
523
405
|
}, "de_GetAccessKeyInfoCommand");
|
524
|
-
var de_GetAccessKeyInfoCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
525
|
-
const parsedOutput = {
|
526
|
-
...output,
|
527
|
-
body: await parseErrorBody(output.body, context)
|
528
|
-
};
|
529
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
530
|
-
const parsedBody = parsedOutput.body;
|
531
|
-
return throwDefaultError({
|
532
|
-
output,
|
533
|
-
parsedBody: parsedBody.Error,
|
534
|
-
errorCode
|
535
|
-
});
|
536
|
-
}, "de_GetAccessKeyInfoCommandError");
|
537
406
|
var de_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {
|
538
407
|
if (output.statusCode >= 300) {
|
539
|
-
return
|
408
|
+
return de_CommandError(output, context);
|
540
409
|
}
|
541
410
|
const data = await parseBody(output.body, context);
|
542
411
|
let contents = {};
|
@@ -547,22 +416,9 @@ var de_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (output, context)
|
|
547
416
|
};
|
548
417
|
return response;
|
549
418
|
}, "de_GetCallerIdentityCommand");
|
550
|
-
var de_GetCallerIdentityCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
551
|
-
const parsedOutput = {
|
552
|
-
...output,
|
553
|
-
body: await parseErrorBody(output.body, context)
|
554
|
-
};
|
555
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
556
|
-
const parsedBody = parsedOutput.body;
|
557
|
-
return throwDefaultError({
|
558
|
-
output,
|
559
|
-
parsedBody: parsedBody.Error,
|
560
|
-
errorCode
|
561
|
-
});
|
562
|
-
}, "de_GetCallerIdentityCommandError");
|
563
419
|
var de_GetFederationTokenCommand = /* @__PURE__ */ __name(async (output, context) => {
|
564
420
|
if (output.statusCode >= 300) {
|
565
|
-
return
|
421
|
+
return de_CommandError(output, context);
|
566
422
|
}
|
567
423
|
const data = await parseBody(output.body, context);
|
568
424
|
let contents = {};
|
@@ -573,34 +429,9 @@ var de_GetFederationTokenCommand = /* @__PURE__ */ __name(async (output, context
|
|
573
429
|
};
|
574
430
|
return response;
|
575
431
|
}, "de_GetFederationTokenCommand");
|
576
|
-
var de_GetFederationTokenCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
577
|
-
const parsedOutput = {
|
578
|
-
...output,
|
579
|
-
body: await parseErrorBody(output.body, context)
|
580
|
-
};
|
581
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
582
|
-
switch (errorCode) {
|
583
|
-
case "MalformedPolicyDocument":
|
584
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
585
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
586
|
-
case "PackedPolicyTooLarge":
|
587
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
588
|
-
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
|
589
|
-
case "RegionDisabledException":
|
590
|
-
case "com.amazonaws.sts#RegionDisabledException":
|
591
|
-
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
592
|
-
default:
|
593
|
-
const parsedBody = parsedOutput.body;
|
594
|
-
return throwDefaultError({
|
595
|
-
output,
|
596
|
-
parsedBody: parsedBody.Error,
|
597
|
-
errorCode
|
598
|
-
});
|
599
|
-
}
|
600
|
-
}, "de_GetFederationTokenCommandError");
|
601
432
|
var de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) => {
|
602
433
|
if (output.statusCode >= 300) {
|
603
|
-
return
|
434
|
+
return de_CommandError(output, context);
|
604
435
|
}
|
605
436
|
const data = await parseBody(output.body, context);
|
606
437
|
let contents = {};
|
@@ -611,16 +442,37 @@ var de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
611
442
|
};
|
612
443
|
return response;
|
613
444
|
}, "de_GetSessionTokenCommand");
|
614
|
-
var
|
445
|
+
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
615
446
|
const parsedOutput = {
|
616
447
|
...output,
|
617
448
|
body: await parseErrorBody(output.body, context)
|
618
449
|
};
|
619
450
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
620
451
|
switch (errorCode) {
|
452
|
+
case "ExpiredTokenException":
|
453
|
+
case "com.amazonaws.sts#ExpiredTokenException":
|
454
|
+
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
455
|
+
case "MalformedPolicyDocument":
|
456
|
+
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
457
|
+
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
458
|
+
case "PackedPolicyTooLarge":
|
459
|
+
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
460
|
+
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
|
621
461
|
case "RegionDisabledException":
|
622
462
|
case "com.amazonaws.sts#RegionDisabledException":
|
623
463
|
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
464
|
+
case "IDPRejectedClaim":
|
465
|
+
case "com.amazonaws.sts#IDPRejectedClaimException":
|
466
|
+
throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
|
467
|
+
case "InvalidIdentityToken":
|
468
|
+
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
469
|
+
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
|
470
|
+
case "IDPCommunicationError":
|
471
|
+
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
472
|
+
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);
|
473
|
+
case "InvalidAuthorizationMessageException":
|
474
|
+
case "com.amazonaws.sts#InvalidAuthorizationMessageException":
|
475
|
+
throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context);
|
624
476
|
default:
|
625
477
|
const parsedBody = parsedOutput.body;
|
626
478
|
return throwDefaultError({
|
@@ -629,7 +481,7 @@ var de_GetSessionTokenCommandError = /* @__PURE__ */ __name(async (output, conte
|
|
629
481
|
errorCode
|
630
482
|
});
|
631
483
|
}
|
632
|
-
}, "
|
484
|
+
}, "de_CommandError");
|
633
485
|
var de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
634
486
|
const body = parsedOutput.body;
|
635
487
|
const deserialized = de_ExpiredTokenException(body.Error, context);
|
@@ -1482,34 +1334,54 @@ var STS = _STS;
|
|
1482
1334
|
// src/index.ts
|
1483
1335
|
var import_EndpointParameters9 = require("./endpoint/EndpointParameters");
|
1484
1336
|
var import_runtimeExtensions = require("././runtimeExtensions");
|
1485
|
-
|
1337
|
+
|
1486
1338
|
|
1487
1339
|
// src/defaultStsRoleAssumers.ts
|
1340
|
+
var import_util_endpoints = require("@aws-sdk/util-endpoints");
|
1488
1341
|
var ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
|
1489
|
-
var
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1342
|
+
var resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => {
|
1343
|
+
var _a2, _b;
|
1344
|
+
const region = typeof _region === "function" ? await _region() : _region;
|
1345
|
+
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
1346
|
+
if (!parentRegion || (0, import_util_endpoints.partition)(parentRegion).name === "aws") {
|
1347
|
+
(_a2 = credentialProviderLogger == null ? void 0 : credentialProviderLogger.debug) == null ? void 0 : _a2.call(
|
1348
|
+
credentialProviderLogger,
|
1349
|
+
"@aws-sdk/client-sts::resolveRegion",
|
1350
|
+
"accepting first of:",
|
1351
|
+
`${region} (provider)`,
|
1352
|
+
`${ASSUME_ROLE_DEFAULT_REGION} (STS default)`
|
1353
|
+
);
|
1354
|
+
return region ?? ASSUME_ROLE_DEFAULT_REGION;
|
1355
|
+
} else {
|
1356
|
+
(_b = credentialProviderLogger == null ? void 0 : credentialProviderLogger.debug) == null ? void 0 : _b.call(
|
1357
|
+
credentialProviderLogger,
|
1358
|
+
"@aws-sdk/client-sts::resolveRegion",
|
1359
|
+
"accepting first of:",
|
1360
|
+
`${region} (provider)`,
|
1361
|
+
`${parentRegion} (parent client)`,
|
1362
|
+
`${ASSUME_ROLE_DEFAULT_REGION} (STS default)`
|
1363
|
+
);
|
1364
|
+
return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;
|
1365
|
+
}
|
1366
|
+
}, "resolveRegion");
|
1501
1367
|
var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => {
|
1502
1368
|
let stsClient;
|
1503
1369
|
let closureSourceCreds;
|
1504
1370
|
return async (sourceCreds, params) => {
|
1371
|
+
var _a2;
|
1505
1372
|
closureSourceCreds = sourceCreds;
|
1506
1373
|
if (!stsClient) {
|
1507
|
-
const { logger, region, requestHandler } = stsOptions;
|
1374
|
+
const { logger, region, requestHandler, credentialProviderLogger } = stsOptions;
|
1375
|
+
const resolvedRegion = await resolveRegion(
|
1376
|
+
region,
|
1377
|
+
(_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.region,
|
1378
|
+
credentialProviderLogger
|
1379
|
+
);
|
1508
1380
|
stsClient = new stsClientCtor({
|
1509
1381
|
logger,
|
1510
1382
|
// A hack to make sts client uses the credential in current closure.
|
1511
1383
|
credentialDefaultProvider: () => async () => closureSourceCreds,
|
1512
|
-
region:
|
1384
|
+
region: resolvedRegion,
|
1513
1385
|
...requestHandler ? { requestHandler } : {}
|
1514
1386
|
});
|
1515
1387
|
}
|
@@ -1530,11 +1402,17 @@ var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) =
|
|
1530
1402
|
var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => {
|
1531
1403
|
let stsClient;
|
1532
1404
|
return async (params) => {
|
1405
|
+
var _a2;
|
1533
1406
|
if (!stsClient) {
|
1534
|
-
const { logger, region, requestHandler } = stsOptions;
|
1407
|
+
const { logger, region, requestHandler, credentialProviderLogger } = stsOptions;
|
1408
|
+
const resolvedRegion = await resolveRegion(
|
1409
|
+
region,
|
1410
|
+
(_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.region,
|
1411
|
+
credentialProviderLogger
|
1412
|
+
);
|
1535
1413
|
stsClient = new stsClientCtor({
|
1536
1414
|
logger,
|
1537
|
-
region:
|
1415
|
+
region: resolvedRegion,
|
1538
1416
|
...requestHandler ? { requestHandler } : {}
|
1539
1417
|
});
|
1540
1418
|
}
|