@granite-js/pulumi-aws 0.1.34 → 1.0.2
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 +6 -112
- package/dist/chunk-23MVQUOJ.js +1630 -0
- package/dist/chunk-24XYHOWM.js +171 -0
- package/dist/chunk-3AVBP57V.js +1598 -0
- package/dist/chunk-3JKQPIJ2.js +460 -0
- package/dist/{chunk-ITI6QA2Q.js → chunk-3OYGHA4S.js} +1 -1
- package/dist/{chunk-IEZY5C3G.js → chunk-46DIC54Q.js} +49 -37
- package/dist/chunk-57WYIP4I.js +808 -0
- package/dist/{chunk-WCHHWTND.js → chunk-63Q3RLAK.js} +93 -59
- package/dist/chunk-6KRYZP6R.js +28 -0
- package/dist/{chunk-QAE2S7MG.js → chunk-7NN7DVGK.js} +2050 -552
- package/dist/{chunk-5W7B34BN.js → chunk-ASGFIK4A.js} +2231 -464
- package/dist/chunk-BTBQTDRJ.js +174 -0
- package/dist/chunk-DDZTWBHZ.js +154 -0
- package/dist/chunk-G3FWLTNJ.js +10 -0
- package/dist/{chunk-TJ744C2T.js → chunk-GJFKL6XM.js} +43 -38
- package/dist/chunk-H4QJ5O4E.js +36 -0
- package/dist/{chunk-X6XO7USX.js → chunk-LCO5F3JB.js} +109 -56
- package/dist/chunk-NDDYFDCU.js +60 -0
- package/dist/chunk-OCHPLE5N.js +28 -0
- package/dist/chunk-OSJA4YYQ.js +846 -0
- package/dist/chunk-PIT3K3NC.js +464 -0
- package/dist/chunk-QCKAO4UT.js +476 -0
- package/dist/{chunk-64IS37V6.js → chunk-RYIGWCGK.js} +1 -6
- package/dist/chunk-S4LJWEXU.js +37 -0
- package/dist/chunk-SJ26Y3GW.js +472 -0
- package/dist/chunk-TDZTH7TL.js +60 -0
- package/dist/chunk-THUA35UY.js +35 -0
- package/dist/{chunk-IUKLHJNE.js → chunk-V7TRGEV6.js} +4 -7
- package/dist/{chunk-KGNTV362.js → chunk-WDFKVCPC.js} +66 -34
- package/dist/{chunk-B7OAPHPY.js → chunk-YWWEFWFD.js} +3 -3
- package/dist/chunk-Z4UYYQ4J.js +42 -0
- package/dist/chunk-ZBT5SDIQ.js +16528 -0
- package/dist/chunk-ZIHRRTTA.js +24 -0
- package/dist/{dist-es-CDFIYJVE.js → dist-es-3VZ2IGGJ.js} +18 -15
- package/dist/{dist-es-SUPEA6VE-3B5JSW5C.js → dist-es-BQW4ETQH-C7ZSD5EG.js} +8 -25
- package/dist/{dist-es-GHYMLBON.js → dist-es-HSWXMGNC.js} +21 -21
- package/dist/{dist-es-OCQVKISC-TNAJ62WG.js → dist-es-IDBNBAO5-H3TO63FG.js} +15 -18
- package/dist/{dist-es-S75EKWRJ.js → dist-es-KPJNIAPT.js} +9 -10
- package/dist/{dist-es-PRWCVZGQ-HTTVI42T.js → dist-es-LZDRG6RP-SP2FWWEO.js} +3 -4
- package/dist/{dist-es-OZGLUDWT.js → dist-es-PIWY5TOR.js} +49 -26
- package/dist/{dist-es-ADTONJUN-RVFWNZHO.js → dist-es-R4LD2OHZ-B5MB6BR2.js} +11 -13
- package/dist/dist-es-S2KJK4L2-5GDBXJIO.js +470 -0
- package/dist/{dist-es-XQME5F6W.js → dist-es-THYWPEKB.js} +12 -10
- package/dist/{dist-es-HJVOMDYC-PIAMWMAL.js → dist-es-TIYLKN6W-BAHZRZH5.js} +7 -13
- package/dist/{dist-es-IDBDK36G-Y6TQMRO5.js → dist-es-VORPMM2F-WOMP2FYQ.js} +37 -30
- package/dist/{dist-es-WQHDOVD7.js → dist-es-WESJCADT.js} +3 -4
- package/dist/dist-es-XMOG24OT.js +490 -0
- package/dist/event-streams-L7RH32OW-AFMBEYJJ.js +237 -0
- package/dist/event-streams-NGUY2RWE.js +237 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/lambda/auto-cache-removal.cjs +28894 -16488
- package/dist/lambda/auto-cache-removal.js +11574 -2713
- package/dist/lambda/origin-request.cjs +22351 -17619
- package/dist/lambda/origin-request.js +21 -17
- package/dist/lambda/origin-response.cjs +22219 -17387
- package/dist/lambda/origin-response.js +17 -13
- package/dist/{loadSso-CZSSLFH6-SA5HOQAX.js → loadSso-F4PTCHDN-YR3RRUYW.js} +330 -227
- package/dist/{loadSso-T7GJVVO2.js → loadSso-LG7MFP7N.js} +344 -223
- package/dist/signin-P7DNG43W.js +658 -0
- package/dist/signin-XWTOVLF3-4ENWNEF7.js +630 -0
- package/dist/{sso-oidc-PKO5GYK5-LC65L46O.js → sso-oidc-FQQGUOJL.js} +293 -332
- package/dist/{sso-oidc-55SJ27II.js → sso-oidc-RRDYLOJY-FK3AUTOI.js} +263 -337
- package/dist/{sts-OPF4H3GL.js → sts-7FBOVTCN.js} +674 -601
- package/dist/{sts-P7Q3MYTS-BKGWHQE4.js → sts-TBWJ374A-DHXXCVJJ.js} +651 -608
- package/package.json +5 -5
- package/dist/chunk-AEOST5WF.js +0 -63
- package/dist/chunk-FO7L563E.js +0 -13695
- package/dist/chunk-FRWSD3YQ.js +0 -1722
- package/dist/chunk-JBVMOFGH.js +0 -152
- package/dist/chunk-JSBRDJBE.js +0 -30
- package/dist/chunk-KRJS4RAS.js +0 -1732
- package/dist/chunk-M5GUUX64.js +0 -63
- package/dist/chunk-SX6SVQKS.js +0 -67
- package/dist/chunk-UNXXS5FM.js +0 -120
- package/dist/chunk-UT2RMOJS.js +0 -2447
- package/dist/chunk-VOTRVWIB.js +0 -1965
- package/dist/chunk-W3VXP3A3.js +0 -119
- package/dist/chunk-XLUI7RQ4.js +0 -115
- package/dist/dist-es-2M7RLZ5O.js +0 -200
- package/dist/dist-es-Y7VN37H5-WQ3GYROF.js +0 -196
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk-FRWSD3YQ.js";
|
|
2
|
+
XmlShapeDeserializer
|
|
3
|
+
} from "./chunk-3AVBP57V.js";
|
|
5
4
|
import {
|
|
6
5
|
package_default
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-46DIC54Q.js";
|
|
7
|
+
import {
|
|
8
|
+
createAggregatedClient
|
|
9
|
+
} from "./chunk-ZIHRRTTA.js";
|
|
8
10
|
import {
|
|
9
11
|
AwsSdkSigV4Signer,
|
|
12
|
+
Client,
|
|
13
|
+
Command,
|
|
10
14
|
DEFAULT_RETRY_MODE,
|
|
11
15
|
DefaultIdentityProviderConfig,
|
|
12
16
|
EndpointCache,
|
|
13
17
|
Hash,
|
|
18
|
+
HttpProtocol,
|
|
14
19
|
NODE_APP_ID_CONFIG_OPTIONS,
|
|
15
20
|
NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
|
|
16
21
|
NODE_MAX_ATTEMPT_CONFIG_OPTIONS,
|
|
@@ -20,80 +25,440 @@ import {
|
|
|
20
25
|
NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,
|
|
21
26
|
NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,
|
|
22
27
|
NoAuthSigner,
|
|
28
|
+
NoOpLogger,
|
|
29
|
+
NormalizedSchema,
|
|
30
|
+
NumericValue,
|
|
31
|
+
ProtocolLib,
|
|
32
|
+
SerdeContextConfig,
|
|
33
|
+
ServiceException,
|
|
34
|
+
TypeRegistry,
|
|
23
35
|
awsEndpointFunctions,
|
|
24
36
|
calculateBodyLength,
|
|
37
|
+
collectBody,
|
|
25
38
|
createDefaultUserAgentProvider,
|
|
26
39
|
customEndpointFunctions,
|
|
27
|
-
|
|
40
|
+
deref,
|
|
41
|
+
determineTimestampFormat,
|
|
42
|
+
emitWarningIfUnsupportedVersion,
|
|
43
|
+
emitWarningIfUnsupportedVersion2,
|
|
44
|
+
extendedEncodeURIComponent,
|
|
28
45
|
getAwsRegionExtensionConfiguration,
|
|
29
46
|
getContentLengthPlugin,
|
|
47
|
+
getDefaultExtensionConfiguration,
|
|
30
48
|
getEndpointPlugin,
|
|
31
49
|
getHostHeaderPlugin,
|
|
32
50
|
getHttpAuthSchemeEndpointRuleSetPlugin,
|
|
51
|
+
getHttpHandlerExtensionConfiguration,
|
|
33
52
|
getHttpSigningPlugin,
|
|
34
53
|
getLoggerPlugin,
|
|
35
54
|
getRecursionDetectionPlugin,
|
|
36
55
|
getRetryPlugin,
|
|
37
|
-
|
|
56
|
+
getSchemaSerdePlugin,
|
|
38
57
|
getSmithyContext,
|
|
39
58
|
getUserAgentPlugin,
|
|
59
|
+
loadConfigsForDefaultMode,
|
|
40
60
|
normalizeProvider,
|
|
41
61
|
resolveAwsRegionExtensionConfiguration,
|
|
42
62
|
resolveAwsSdkSigV4Config,
|
|
63
|
+
resolveDefaultRuntimeConfig,
|
|
43
64
|
resolveDefaultsModeConfig,
|
|
44
65
|
resolveEndpoint,
|
|
45
66
|
resolveEndpointConfig,
|
|
46
67
|
resolveHostHeaderConfig,
|
|
68
|
+
resolveHttpHandlerRuntimeConfig,
|
|
47
69
|
resolveRegionConfig,
|
|
48
70
|
resolveRetryConfig,
|
|
49
|
-
resolveUserAgentConfig
|
|
50
|
-
|
|
71
|
+
resolveUserAgentConfig,
|
|
72
|
+
serializingStructIterator,
|
|
73
|
+
v4
|
|
74
|
+
} from "./chunk-7NN7DVGK.js";
|
|
51
75
|
import {
|
|
52
76
|
loadConfig,
|
|
53
77
|
parseUrl
|
|
54
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-63Q3RLAK.js";
|
|
79
|
+
import "./chunk-OCHPLE5N.js";
|
|
80
|
+
import "./chunk-GJFKL6XM.js";
|
|
55
81
|
import {
|
|
56
|
-
Client,
|
|
57
|
-
Command,
|
|
58
|
-
HttpRequest,
|
|
59
|
-
NoOpLogger,
|
|
60
82
|
NodeHttpHandler,
|
|
61
|
-
|
|
62
|
-
ServiceException,
|
|
63
|
-
createAggregatedClient,
|
|
64
|
-
decorateServiceException,
|
|
65
|
-
emitWarningIfUnsupportedVersion,
|
|
66
|
-
expectNonNull,
|
|
67
|
-
expectString,
|
|
68
|
-
extendedEncodeURIComponent,
|
|
83
|
+
dateToUtcString,
|
|
69
84
|
fromBase64,
|
|
70
|
-
fromUtf8,
|
|
71
|
-
getDefaultExtensionConfiguration,
|
|
72
|
-
getHttpHandlerExtensionConfiguration,
|
|
73
|
-
loadConfigsForDefaultMode,
|
|
74
|
-
parseRfc3339DateTimeWithOffset,
|
|
75
|
-
resolveDefaultRuntimeConfig,
|
|
76
|
-
resolveHttpHandlerRuntimeConfig,
|
|
77
85
|
streamCollector,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
} from "./chunk-
|
|
83
|
-
import "./chunk-TJ744C2T.js";
|
|
86
|
+
toBase64
|
|
87
|
+
} from "./chunk-57WYIP4I.js";
|
|
88
|
+
import {
|
|
89
|
+
HttpRequest
|
|
90
|
+
} from "./chunk-TDZTH7TL.js";
|
|
84
91
|
import {
|
|
85
92
|
setCredentialFeature
|
|
86
|
-
} from "./chunk-
|
|
87
|
-
import "./chunk-XLUI7RQ4.js";
|
|
93
|
+
} from "./chunk-RYIGWCGK.js";
|
|
88
94
|
import {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
fromUtf8,
|
|
96
|
+
toUtf8
|
|
97
|
+
} from "./chunk-H4QJ5O4E.js";
|
|
98
|
+
import "./chunk-THUA35UY.js";
|
|
92
99
|
|
|
93
|
-
// ../deployment-manager/dist/sts-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
100
|
+
// ../deployment-manager/dist/sts-TBWJ374A.js
|
|
101
|
+
var RpcProtocol = class extends HttpProtocol {
|
|
102
|
+
async serializeRequest(operationSchema, input, context) {
|
|
103
|
+
const serializer = this.serializer;
|
|
104
|
+
const query = {};
|
|
105
|
+
const headers = {};
|
|
106
|
+
const endpoint = await context.endpoint();
|
|
107
|
+
const ns = NormalizedSchema.of(operationSchema?.input);
|
|
108
|
+
const schema = ns.getSchema();
|
|
109
|
+
let payload;
|
|
110
|
+
const request = new HttpRequest({
|
|
111
|
+
protocol: "",
|
|
112
|
+
hostname: "",
|
|
113
|
+
port: void 0,
|
|
114
|
+
path: "/",
|
|
115
|
+
fragment: void 0,
|
|
116
|
+
query,
|
|
117
|
+
headers,
|
|
118
|
+
body: void 0
|
|
119
|
+
});
|
|
120
|
+
if (endpoint) {
|
|
121
|
+
this.updateServiceEndpoint(request, endpoint);
|
|
122
|
+
this.setHostPrefix(request, operationSchema, input);
|
|
123
|
+
}
|
|
124
|
+
const _input = {
|
|
125
|
+
...input
|
|
126
|
+
};
|
|
127
|
+
if (input) {
|
|
128
|
+
const eventStreamMember = ns.getEventStreamMember();
|
|
129
|
+
if (eventStreamMember) {
|
|
130
|
+
if (_input[eventStreamMember]) {
|
|
131
|
+
const initialRequest = {};
|
|
132
|
+
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
133
|
+
if (memberName !== eventStreamMember && _input[memberName]) {
|
|
134
|
+
serializer.write(memberSchema, _input[memberName]);
|
|
135
|
+
initialRequest[memberName] = serializer.flush();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
payload = await this.serializeEventStream({
|
|
139
|
+
eventStream: _input[eventStreamMember],
|
|
140
|
+
requestSchema: ns,
|
|
141
|
+
initialRequest
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
} else {
|
|
145
|
+
serializer.write(schema, _input);
|
|
146
|
+
payload = serializer.flush();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
request.headers = headers;
|
|
150
|
+
request.query = query;
|
|
151
|
+
request.body = payload;
|
|
152
|
+
request.method = "POST";
|
|
153
|
+
return request;
|
|
154
|
+
}
|
|
155
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
156
|
+
const deserializer = this.deserializer;
|
|
157
|
+
const ns = NormalizedSchema.of(operationSchema.output);
|
|
158
|
+
const dataObject = {};
|
|
159
|
+
if (response.statusCode >= 300) {
|
|
160
|
+
const bytes = await collectBody(response.body, context);
|
|
161
|
+
if (bytes.byteLength > 0) {
|
|
162
|
+
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
163
|
+
}
|
|
164
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
165
|
+
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
166
|
+
}
|
|
167
|
+
for (const header in response.headers) {
|
|
168
|
+
const value = response.headers[header];
|
|
169
|
+
delete response.headers[header];
|
|
170
|
+
response.headers[header.toLowerCase()] = value;
|
|
171
|
+
}
|
|
172
|
+
const eventStreamMember = ns.getEventStreamMember();
|
|
173
|
+
if (eventStreamMember) {
|
|
174
|
+
dataObject[eventStreamMember] = await this.deserializeEventStream({
|
|
175
|
+
response,
|
|
176
|
+
responseSchema: ns,
|
|
177
|
+
initialResponseContainer: dataObject
|
|
178
|
+
});
|
|
179
|
+
} else {
|
|
180
|
+
const bytes = await collectBody(response.body, context);
|
|
181
|
+
if (bytes.byteLength > 0) {
|
|
182
|
+
Object.assign(dataObject, await deserializer.read(ns, bytes));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
dataObject.$metadata = this.deserializeMetadata(response);
|
|
186
|
+
return dataObject;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
var QueryShapeSerializer = class extends SerdeContextConfig {
|
|
190
|
+
settings;
|
|
191
|
+
buffer;
|
|
192
|
+
constructor(settings) {
|
|
193
|
+
super();
|
|
194
|
+
this.settings = settings;
|
|
195
|
+
}
|
|
196
|
+
write(schema, value, prefix = "") {
|
|
197
|
+
if (this.buffer === void 0) {
|
|
198
|
+
this.buffer = "";
|
|
199
|
+
}
|
|
200
|
+
const ns = NormalizedSchema.of(schema);
|
|
201
|
+
if (prefix && !prefix.endsWith(".")) {
|
|
202
|
+
prefix += ".";
|
|
203
|
+
}
|
|
204
|
+
if (ns.isBlobSchema()) {
|
|
205
|
+
if (typeof value === "string" || value instanceof Uint8Array) {
|
|
206
|
+
this.writeKey(prefix);
|
|
207
|
+
this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value));
|
|
208
|
+
}
|
|
209
|
+
} else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {
|
|
210
|
+
if (value != null) {
|
|
211
|
+
this.writeKey(prefix);
|
|
212
|
+
this.writeValue(String(value));
|
|
213
|
+
} else if (ns.isIdempotencyToken()) {
|
|
214
|
+
this.writeKey(prefix);
|
|
215
|
+
this.writeValue(v4());
|
|
216
|
+
}
|
|
217
|
+
} else if (ns.isBigIntegerSchema()) {
|
|
218
|
+
if (value != null) {
|
|
219
|
+
this.writeKey(prefix);
|
|
220
|
+
this.writeValue(String(value));
|
|
221
|
+
}
|
|
222
|
+
} else if (ns.isBigDecimalSchema()) {
|
|
223
|
+
if (value != null) {
|
|
224
|
+
this.writeKey(prefix);
|
|
225
|
+
this.writeValue(value instanceof NumericValue ? value.string : String(value));
|
|
226
|
+
}
|
|
227
|
+
} else if (ns.isTimestampSchema()) {
|
|
228
|
+
if (value instanceof Date) {
|
|
229
|
+
this.writeKey(prefix);
|
|
230
|
+
const format = determineTimestampFormat(ns, this.settings);
|
|
231
|
+
switch (format) {
|
|
232
|
+
case 5:
|
|
233
|
+
this.writeValue(value.toISOString().replace(".000Z", "Z"));
|
|
234
|
+
break;
|
|
235
|
+
case 6:
|
|
236
|
+
this.writeValue(dateToUtcString(value));
|
|
237
|
+
break;
|
|
238
|
+
case 7:
|
|
239
|
+
this.writeValue(String(value.getTime() / 1e3));
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
} else if (ns.isDocumentSchema()) {
|
|
244
|
+
throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`);
|
|
245
|
+
} else if (ns.isListSchema()) {
|
|
246
|
+
if (Array.isArray(value)) {
|
|
247
|
+
if (value.length === 0) {
|
|
248
|
+
if (this.settings.serializeEmptyLists) {
|
|
249
|
+
this.writeKey(prefix);
|
|
250
|
+
this.writeValue("");
|
|
251
|
+
}
|
|
252
|
+
} else {
|
|
253
|
+
const member = ns.getValueSchema();
|
|
254
|
+
const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;
|
|
255
|
+
let i2 = 1;
|
|
256
|
+
for (const item of value) {
|
|
257
|
+
if (item == null) {
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
const suffix = this.getKey("member", member.getMergedTraits().xmlName);
|
|
261
|
+
const key = flat ? `${prefix}${i2}` : `${prefix}${suffix}.${i2}`;
|
|
262
|
+
this.write(member, item, key);
|
|
263
|
+
++i2;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
} else if (ns.isMapSchema()) {
|
|
268
|
+
if (value && typeof value === "object") {
|
|
269
|
+
const keySchema = ns.getKeySchema();
|
|
270
|
+
const memberSchema = ns.getValueSchema();
|
|
271
|
+
const flat = ns.getMergedTraits().xmlFlattened;
|
|
272
|
+
let i2 = 1;
|
|
273
|
+
for (const [k2, v2] of Object.entries(value)) {
|
|
274
|
+
if (v2 == null) {
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
const keySuffix = this.getKey("key", keySchema.getMergedTraits().xmlName);
|
|
278
|
+
const key = flat ? `${prefix}${i2}.${keySuffix}` : `${prefix}entry.${i2}.${keySuffix}`;
|
|
279
|
+
const valueSuffix = this.getKey("value", memberSchema.getMergedTraits().xmlName);
|
|
280
|
+
const valueKey = flat ? `${prefix}${i2}.${valueSuffix}` : `${prefix}entry.${i2}.${valueSuffix}`;
|
|
281
|
+
this.write(keySchema, k2, key);
|
|
282
|
+
this.write(memberSchema, v2, valueKey);
|
|
283
|
+
++i2;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
} else if (ns.isStructSchema()) {
|
|
287
|
+
if (value && typeof value === "object") {
|
|
288
|
+
for (const [memberName, member] of serializingStructIterator(ns, value)) {
|
|
289
|
+
if (value[memberName] == null && !member.isIdempotencyToken()) {
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
const suffix = this.getKey(memberName, member.getMergedTraits().xmlName);
|
|
293
|
+
const key = `${prefix}${suffix}`;
|
|
294
|
+
this.write(member, value[memberName], key);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
} else if (ns.isUnitSchema()) {
|
|
298
|
+
} else {
|
|
299
|
+
throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
flush() {
|
|
303
|
+
if (this.buffer === void 0) {
|
|
304
|
+
throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");
|
|
305
|
+
}
|
|
306
|
+
const str = this.buffer;
|
|
307
|
+
delete this.buffer;
|
|
308
|
+
return str;
|
|
309
|
+
}
|
|
310
|
+
getKey(memberName, xmlName) {
|
|
311
|
+
const key = xmlName ?? memberName;
|
|
312
|
+
if (this.settings.capitalizeKeys) {
|
|
313
|
+
return key[0].toUpperCase() + key.slice(1);
|
|
314
|
+
}
|
|
315
|
+
return key;
|
|
316
|
+
}
|
|
317
|
+
writeKey(key) {
|
|
318
|
+
if (key.endsWith(".")) {
|
|
319
|
+
key = key.slice(0, key.length - 1);
|
|
320
|
+
}
|
|
321
|
+
this.buffer += `&${extendedEncodeURIComponent(key)}=`;
|
|
322
|
+
}
|
|
323
|
+
writeValue(value) {
|
|
324
|
+
this.buffer += extendedEncodeURIComponent(value);
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
var AwsQueryProtocol = class extends RpcProtocol {
|
|
328
|
+
options;
|
|
329
|
+
serializer;
|
|
330
|
+
deserializer;
|
|
331
|
+
mixin = new ProtocolLib();
|
|
332
|
+
constructor(options) {
|
|
333
|
+
super({
|
|
334
|
+
defaultNamespace: options.defaultNamespace
|
|
335
|
+
});
|
|
336
|
+
this.options = options;
|
|
337
|
+
const settings = {
|
|
338
|
+
timestampFormat: {
|
|
339
|
+
useTrait: true,
|
|
340
|
+
default: 5
|
|
341
|
+
},
|
|
342
|
+
httpBindings: false,
|
|
343
|
+
xmlNamespace: options.xmlNamespace,
|
|
344
|
+
serviceNamespace: options.defaultNamespace,
|
|
345
|
+
serializeEmptyLists: true
|
|
346
|
+
};
|
|
347
|
+
this.serializer = new QueryShapeSerializer(settings);
|
|
348
|
+
this.deserializer = new XmlShapeDeserializer(settings);
|
|
349
|
+
}
|
|
350
|
+
getShapeId() {
|
|
351
|
+
return "aws.protocols#awsQuery";
|
|
352
|
+
}
|
|
353
|
+
setSerdeContext(serdeContext) {
|
|
354
|
+
this.serializer.setSerdeContext(serdeContext);
|
|
355
|
+
this.deserializer.setSerdeContext(serdeContext);
|
|
356
|
+
}
|
|
357
|
+
getPayloadCodec() {
|
|
358
|
+
throw new Error("AWSQuery protocol has no payload codec.");
|
|
359
|
+
}
|
|
360
|
+
async serializeRequest(operationSchema, input, context) {
|
|
361
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
362
|
+
if (!request.path.endsWith("/")) {
|
|
363
|
+
request.path += "/";
|
|
364
|
+
}
|
|
365
|
+
Object.assign(request.headers, {
|
|
366
|
+
"content-type": `application/x-www-form-urlencoded`
|
|
367
|
+
});
|
|
368
|
+
if (deref(operationSchema.input) === "unit" || !request.body) {
|
|
369
|
+
request.body = "";
|
|
370
|
+
}
|
|
371
|
+
const action = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
372
|
+
request.body = `Action=${action}&Version=${this.options.version}` + request.body;
|
|
373
|
+
if (request.body.endsWith("&")) {
|
|
374
|
+
request.body = request.body.slice(-1);
|
|
375
|
+
}
|
|
376
|
+
return request;
|
|
377
|
+
}
|
|
378
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
379
|
+
const deserializer = this.deserializer;
|
|
380
|
+
const ns = NormalizedSchema.of(operationSchema.output);
|
|
381
|
+
const dataObject = {};
|
|
382
|
+
if (response.statusCode >= 300) {
|
|
383
|
+
const bytes2 = await collectBody(response.body, context);
|
|
384
|
+
if (bytes2.byteLength > 0) {
|
|
385
|
+
Object.assign(dataObject, await deserializer.read(15, bytes2));
|
|
386
|
+
}
|
|
387
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
388
|
+
}
|
|
389
|
+
for (const header in response.headers) {
|
|
390
|
+
const value = response.headers[header];
|
|
391
|
+
delete response.headers[header];
|
|
392
|
+
response.headers[header.toLowerCase()] = value;
|
|
393
|
+
}
|
|
394
|
+
const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
395
|
+
const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0;
|
|
396
|
+
const bytes = await collectBody(response.body, context);
|
|
397
|
+
if (bytes.byteLength > 0) {
|
|
398
|
+
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
|
399
|
+
}
|
|
400
|
+
const output = {
|
|
401
|
+
$metadata: this.deserializeMetadata(response),
|
|
402
|
+
...dataObject
|
|
403
|
+
};
|
|
404
|
+
return output;
|
|
405
|
+
}
|
|
406
|
+
useNestedResult() {
|
|
407
|
+
return true;
|
|
408
|
+
}
|
|
409
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
410
|
+
const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
|
|
411
|
+
const errorData = this.loadQueryError(dataObject);
|
|
412
|
+
const message = this.loadQueryErrorMessage(dataObject);
|
|
413
|
+
errorData.message = message;
|
|
414
|
+
errorData.Error = {
|
|
415
|
+
Type: errorData.Type,
|
|
416
|
+
Code: errorData.Code,
|
|
417
|
+
Message: message
|
|
418
|
+
};
|
|
419
|
+
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, (registry, errorName) => {
|
|
420
|
+
try {
|
|
421
|
+
return registry.getSchema(errorName);
|
|
422
|
+
} catch (e2) {
|
|
423
|
+
return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
const ns = NormalizedSchema.of(errorSchema);
|
|
427
|
+
const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;
|
|
428
|
+
const exception = new ErrorCtor(message);
|
|
429
|
+
const output = {
|
|
430
|
+
Error: errorData.Error
|
|
431
|
+
};
|
|
432
|
+
for (const [name, member] of ns.structIterator()) {
|
|
433
|
+
const target = member.getMergedTraits().xmlName ?? name;
|
|
434
|
+
const value = errorData[target] ?? dataObject[target];
|
|
435
|
+
output[name] = this.deserializer.readSchema(member, value);
|
|
436
|
+
}
|
|
437
|
+
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
|
438
|
+
$fault: ns.getMergedTraits().error,
|
|
439
|
+
message
|
|
440
|
+
}, output), dataObject);
|
|
441
|
+
}
|
|
442
|
+
loadQueryErrorCode(output, data) {
|
|
443
|
+
const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;
|
|
444
|
+
if (code !== void 0) {
|
|
445
|
+
return code;
|
|
446
|
+
}
|
|
447
|
+
if (output.statusCode == 404) {
|
|
448
|
+
return "NotFound";
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
loadQueryError(data) {
|
|
452
|
+
return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error;
|
|
453
|
+
}
|
|
454
|
+
loadQueryErrorMessage(data) {
|
|
455
|
+
const errorData = this.loadQueryError(data);
|
|
456
|
+
return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown";
|
|
457
|
+
}
|
|
458
|
+
getDefaultContentType() {
|
|
459
|
+
return "application/x-www-form-urlencoded";
|
|
460
|
+
}
|
|
461
|
+
};
|
|
97
462
|
var defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
98
463
|
return {
|
|
99
464
|
operation: getSmithyContext(context).operation,
|
|
@@ -145,7 +510,6 @@ var resolveHttpAuthSchemeConfig = (config) => {
|
|
|
145
510
|
authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
|
|
146
511
|
});
|
|
147
512
|
};
|
|
148
|
-
init_esm_shims();
|
|
149
513
|
var resolveClientEndpointParameters = (options) => {
|
|
150
514
|
return Object.assign(options, {
|
|
151
515
|
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
@@ -161,10 +525,6 @@ var commonParams = {
|
|
|
161
525
|
Region: { type: "builtInParams", name: "region" },
|
|
162
526
|
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
163
527
|
};
|
|
164
|
-
init_esm_shims();
|
|
165
|
-
init_esm_shims();
|
|
166
|
-
init_esm_shims();
|
|
167
|
-
init_esm_shims();
|
|
168
528
|
var F = "required";
|
|
169
529
|
var G = "type";
|
|
170
530
|
var H = "fn";
|
|
@@ -182,8 +542,8 @@ var i = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
|
|
|
182
542
|
var j = "tree";
|
|
183
543
|
var k = "error";
|
|
184
544
|
var l = "getAttr";
|
|
185
|
-
var m = { [F]: false, [G]: "
|
|
186
|
-
var n = { [F]: true, "default": false, [G]: "
|
|
545
|
+
var m = { [F]: false, [G]: "string" };
|
|
546
|
+
var n = { [F]: true, "default": false, [G]: "boolean" };
|
|
187
547
|
var o = { [J]: "Endpoint" };
|
|
188
548
|
var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
|
|
189
549
|
var q = { [J]: "Region" };
|
|
@@ -236,6 +596,11 @@ var getRuntimeConfig = (config) => {
|
|
|
236
596
|
}
|
|
237
597
|
],
|
|
238
598
|
logger: config?.logger ?? new NoOpLogger(),
|
|
599
|
+
protocol: config?.protocol ?? new AwsQueryProtocol({
|
|
600
|
+
defaultNamespace: "com.amazonaws.sts",
|
|
601
|
+
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
|
602
|
+
version: "2011-06-15"
|
|
603
|
+
}),
|
|
239
604
|
serviceId: config?.serviceId ?? "STS",
|
|
240
605
|
urlParser: config?.urlParser ?? parseUrl,
|
|
241
606
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
@@ -243,11 +608,11 @@ var getRuntimeConfig = (config) => {
|
|
|
243
608
|
};
|
|
244
609
|
};
|
|
245
610
|
var getRuntimeConfig2 = (config) => {
|
|
246
|
-
|
|
611
|
+
emitWarningIfUnsupportedVersion2(process.version);
|
|
247
612
|
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
248
613
|
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
249
614
|
const clientSharedValues = getRuntimeConfig(config);
|
|
250
|
-
|
|
615
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
251
616
|
const loaderConfig = {
|
|
252
617
|
profile: config?.profile,
|
|
253
618
|
logger: clientSharedValues.logger
|
|
@@ -286,8 +651,20 @@ var getRuntimeConfig2 = (config) => {
|
|
|
286
651
|
userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
|
|
287
652
|
};
|
|
288
653
|
};
|
|
289
|
-
|
|
290
|
-
|
|
654
|
+
function stsRegionDefaultResolver(loaderConfig = {}) {
|
|
655
|
+
return loadConfig({
|
|
656
|
+
...NODE_REGION_CONFIG_OPTIONS,
|
|
657
|
+
async default() {
|
|
658
|
+
if (!warning.silence) {
|
|
659
|
+
console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
|
|
660
|
+
}
|
|
661
|
+
return "us-east-1";
|
|
662
|
+
}
|
|
663
|
+
}, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig });
|
|
664
|
+
}
|
|
665
|
+
var warning = {
|
|
666
|
+
silence: false
|
|
667
|
+
};
|
|
291
668
|
var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
292
669
|
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
293
670
|
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
@@ -345,6 +722,7 @@ var STSClient = class extends Client {
|
|
|
345
722
|
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
346
723
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
347
724
|
this.config = _config_8;
|
|
725
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
348
726
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
349
727
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
350
728
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
@@ -363,24 +741,12 @@ var STSClient = class extends Client {
|
|
|
363
741
|
super.destroy();
|
|
364
742
|
}
|
|
365
743
|
};
|
|
366
|
-
init_esm_shims();
|
|
367
|
-
init_esm_shims();
|
|
368
|
-
init_esm_shims();
|
|
369
|
-
init_esm_shims();
|
|
370
744
|
var STSServiceException = class _STSServiceException extends ServiceException {
|
|
371
745
|
constructor(options) {
|
|
372
746
|
super(options);
|
|
373
747
|
Object.setPrototypeOf(this, _STSServiceException.prototype);
|
|
374
748
|
}
|
|
375
749
|
};
|
|
376
|
-
var CredentialsFilterSensitiveLog = (obj) => ({
|
|
377
|
-
...obj,
|
|
378
|
-
...obj.SecretAccessKey && { SecretAccessKey: SENSITIVE_STRING }
|
|
379
|
-
});
|
|
380
|
-
var AssumeRoleResponseFilterSensitiveLog = (obj) => ({
|
|
381
|
-
...obj,
|
|
382
|
-
...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }
|
|
383
|
-
});
|
|
384
750
|
var ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {
|
|
385
751
|
name = "ExpiredTokenException";
|
|
386
752
|
$fault = "client";
|
|
@@ -453,14 +819,6 @@ var InvalidIdentityTokenException = class _InvalidIdentityTokenException extends
|
|
|
453
819
|
Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);
|
|
454
820
|
}
|
|
455
821
|
};
|
|
456
|
-
var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({
|
|
457
|
-
...obj,
|
|
458
|
-
...obj.WebIdentityToken && { WebIdentityToken: SENSITIVE_STRING }
|
|
459
|
-
});
|
|
460
|
-
var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({
|
|
461
|
-
...obj,
|
|
462
|
-
...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }
|
|
463
|
-
});
|
|
464
822
|
var IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {
|
|
465
823
|
name = "IDPCommunicationErrorException";
|
|
466
824
|
$fault = "client";
|
|
@@ -473,504 +831,41 @@ var IDPCommunicationErrorException = class _IDPCommunicationErrorException exten
|
|
|
473
831
|
Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);
|
|
474
832
|
}
|
|
475
833
|
};
|
|
476
|
-
|
|
477
|
-
var se_AssumeRoleCommand = async (input, context) => {
|
|
478
|
-
const headers = SHARED_HEADERS;
|
|
479
|
-
let body;
|
|
480
|
-
body = buildFormUrlencodedString({
|
|
481
|
-
...se_AssumeRoleRequest(input, context),
|
|
482
|
-
[_A]: _AR,
|
|
483
|
-
[_V]: _
|
|
484
|
-
});
|
|
485
|
-
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
486
|
-
};
|
|
487
|
-
var se_AssumeRoleWithWebIdentityCommand = async (input, context) => {
|
|
488
|
-
const headers = SHARED_HEADERS;
|
|
489
|
-
let body;
|
|
490
|
-
body = buildFormUrlencodedString({
|
|
491
|
-
...se_AssumeRoleWithWebIdentityRequest(input, context),
|
|
492
|
-
[_A]: _ARWWI,
|
|
493
|
-
[_V]: _
|
|
494
|
-
});
|
|
495
|
-
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
496
|
-
};
|
|
497
|
-
var de_AssumeRoleCommand = async (output, context) => {
|
|
498
|
-
if (output.statusCode >= 300) {
|
|
499
|
-
return de_CommandError(output, context);
|
|
500
|
-
}
|
|
501
|
-
const data = await parseXmlBody(output.body, context);
|
|
502
|
-
let contents = {};
|
|
503
|
-
contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);
|
|
504
|
-
const response = {
|
|
505
|
-
$metadata: deserializeMetadata(output),
|
|
506
|
-
...contents
|
|
507
|
-
};
|
|
508
|
-
return response;
|
|
509
|
-
};
|
|
510
|
-
var de_AssumeRoleWithWebIdentityCommand = async (output, context) => {
|
|
511
|
-
if (output.statusCode >= 300) {
|
|
512
|
-
return de_CommandError(output, context);
|
|
513
|
-
}
|
|
514
|
-
const data = await parseXmlBody(output.body, context);
|
|
515
|
-
let contents = {};
|
|
516
|
-
contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);
|
|
517
|
-
const response = {
|
|
518
|
-
$metadata: deserializeMetadata(output),
|
|
519
|
-
...contents
|
|
520
|
-
};
|
|
521
|
-
return response;
|
|
522
|
-
};
|
|
523
|
-
var de_CommandError = async (output, context) => {
|
|
524
|
-
const parsedOutput = {
|
|
525
|
-
...output,
|
|
526
|
-
body: await parseXmlErrorBody(output.body, context)
|
|
527
|
-
};
|
|
528
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
529
|
-
switch (errorCode) {
|
|
530
|
-
case "ExpiredTokenException":
|
|
531
|
-
case "com.amazonaws.sts#ExpiredTokenException":
|
|
532
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
|
533
|
-
case "MalformedPolicyDocument":
|
|
534
|
-
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
535
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
536
|
-
case "PackedPolicyTooLarge":
|
|
537
|
-
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
538
|
-
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
|
|
539
|
-
case "RegionDisabledException":
|
|
540
|
-
case "com.amazonaws.sts#RegionDisabledException":
|
|
541
|
-
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
542
|
-
case "IDPCommunicationError":
|
|
543
|
-
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
|
544
|
-
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);
|
|
545
|
-
case "IDPRejectedClaim":
|
|
546
|
-
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
547
|
-
throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
|
|
548
|
-
case "InvalidIdentityToken":
|
|
549
|
-
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
550
|
-
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
|
|
551
|
-
default:
|
|
552
|
-
const parsedBody = parsedOutput.body;
|
|
553
|
-
return throwDefaultError({
|
|
554
|
-
output,
|
|
555
|
-
parsedBody: parsedBody.Error,
|
|
556
|
-
errorCode
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
};
|
|
560
|
-
var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
|
|
561
|
-
const body = parsedOutput.body;
|
|
562
|
-
const deserialized = de_ExpiredTokenException(body.Error, context);
|
|
563
|
-
const exception = new ExpiredTokenException({
|
|
564
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
565
|
-
...deserialized
|
|
566
|
-
});
|
|
567
|
-
return decorateServiceException(exception, body);
|
|
568
|
-
};
|
|
569
|
-
var de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => {
|
|
570
|
-
const body = parsedOutput.body;
|
|
571
|
-
const deserialized = de_IDPCommunicationErrorException(body.Error, context);
|
|
572
|
-
const exception = new IDPCommunicationErrorException({
|
|
573
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
574
|
-
...deserialized
|
|
575
|
-
});
|
|
576
|
-
return decorateServiceException(exception, body);
|
|
577
|
-
};
|
|
578
|
-
var de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => {
|
|
579
|
-
const body = parsedOutput.body;
|
|
580
|
-
const deserialized = de_IDPRejectedClaimException(body.Error, context);
|
|
581
|
-
const exception = new IDPRejectedClaimException({
|
|
582
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
583
|
-
...deserialized
|
|
584
|
-
});
|
|
585
|
-
return decorateServiceException(exception, body);
|
|
586
|
-
};
|
|
587
|
-
var de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => {
|
|
588
|
-
const body = parsedOutput.body;
|
|
589
|
-
const deserialized = de_InvalidIdentityTokenException(body.Error, context);
|
|
590
|
-
const exception = new InvalidIdentityTokenException({
|
|
591
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
592
|
-
...deserialized
|
|
593
|
-
});
|
|
594
|
-
return decorateServiceException(exception, body);
|
|
595
|
-
};
|
|
596
|
-
var de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
|
|
597
|
-
const body = parsedOutput.body;
|
|
598
|
-
const deserialized = de_MalformedPolicyDocumentException(body.Error, context);
|
|
599
|
-
const exception = new MalformedPolicyDocumentException({
|
|
600
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
601
|
-
...deserialized
|
|
602
|
-
});
|
|
603
|
-
return decorateServiceException(exception, body);
|
|
604
|
-
};
|
|
605
|
-
var de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
606
|
-
const body = parsedOutput.body;
|
|
607
|
-
const deserialized = de_PackedPolicyTooLargeException(body.Error, context);
|
|
608
|
-
const exception = new PackedPolicyTooLargeException({
|
|
609
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
610
|
-
...deserialized
|
|
611
|
-
});
|
|
612
|
-
return decorateServiceException(exception, body);
|
|
613
|
-
};
|
|
614
|
-
var de_RegionDisabledExceptionRes = async (parsedOutput, context) => {
|
|
615
|
-
const body = parsedOutput.body;
|
|
616
|
-
const deserialized = de_RegionDisabledException(body.Error, context);
|
|
617
|
-
const exception = new RegionDisabledException({
|
|
618
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
619
|
-
...deserialized
|
|
620
|
-
});
|
|
621
|
-
return decorateServiceException(exception, body);
|
|
622
|
-
};
|
|
623
|
-
var se_AssumeRoleRequest = (input, context) => {
|
|
624
|
-
const entries = {};
|
|
625
|
-
if (input[_RA] != null) {
|
|
626
|
-
entries[_RA] = input[_RA];
|
|
627
|
-
}
|
|
628
|
-
if (input[_RSN] != null) {
|
|
629
|
-
entries[_RSN] = input[_RSN];
|
|
630
|
-
}
|
|
631
|
-
if (input[_PA] != null) {
|
|
632
|
-
const memberEntries = se_policyDescriptorListType(input[_PA], context);
|
|
633
|
-
if (input[_PA]?.length === 0) {
|
|
634
|
-
entries.PolicyArns = [];
|
|
635
|
-
}
|
|
636
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
637
|
-
const loc = `PolicyArns.${key}`;
|
|
638
|
-
entries[loc] = value;
|
|
639
|
-
});
|
|
640
|
-
}
|
|
641
|
-
if (input[_P] != null) {
|
|
642
|
-
entries[_P] = input[_P];
|
|
643
|
-
}
|
|
644
|
-
if (input[_DS] != null) {
|
|
645
|
-
entries[_DS] = input[_DS];
|
|
646
|
-
}
|
|
647
|
-
if (input[_T] != null) {
|
|
648
|
-
const memberEntries = se_tagListType(input[_T], context);
|
|
649
|
-
if (input[_T]?.length === 0) {
|
|
650
|
-
entries.Tags = [];
|
|
651
|
-
}
|
|
652
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
653
|
-
const loc = `Tags.${key}`;
|
|
654
|
-
entries[loc] = value;
|
|
655
|
-
});
|
|
656
|
-
}
|
|
657
|
-
if (input[_TTK] != null) {
|
|
658
|
-
const memberEntries = se_tagKeyListType(input[_TTK], context);
|
|
659
|
-
if (input[_TTK]?.length === 0) {
|
|
660
|
-
entries.TransitiveTagKeys = [];
|
|
661
|
-
}
|
|
662
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
663
|
-
const loc = `TransitiveTagKeys.${key}`;
|
|
664
|
-
entries[loc] = value;
|
|
665
|
-
});
|
|
666
|
-
}
|
|
667
|
-
if (input[_EI] != null) {
|
|
668
|
-
entries[_EI] = input[_EI];
|
|
669
|
-
}
|
|
670
|
-
if (input[_SN] != null) {
|
|
671
|
-
entries[_SN] = input[_SN];
|
|
672
|
-
}
|
|
673
|
-
if (input[_TC] != null) {
|
|
674
|
-
entries[_TC] = input[_TC];
|
|
675
|
-
}
|
|
676
|
-
if (input[_SI] != null) {
|
|
677
|
-
entries[_SI] = input[_SI];
|
|
678
|
-
}
|
|
679
|
-
if (input[_PC] != null) {
|
|
680
|
-
const memberEntries = se_ProvidedContextsListType(input[_PC], context);
|
|
681
|
-
if (input[_PC]?.length === 0) {
|
|
682
|
-
entries.ProvidedContexts = [];
|
|
683
|
-
}
|
|
684
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
685
|
-
const loc = `ProvidedContexts.${key}`;
|
|
686
|
-
entries[loc] = value;
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
return entries;
|
|
690
|
-
};
|
|
691
|
-
var se_AssumeRoleWithWebIdentityRequest = (input, context) => {
|
|
692
|
-
const entries = {};
|
|
693
|
-
if (input[_RA] != null) {
|
|
694
|
-
entries[_RA] = input[_RA];
|
|
695
|
-
}
|
|
696
|
-
if (input[_RSN] != null) {
|
|
697
|
-
entries[_RSN] = input[_RSN];
|
|
698
|
-
}
|
|
699
|
-
if (input[_WIT] != null) {
|
|
700
|
-
entries[_WIT] = input[_WIT];
|
|
701
|
-
}
|
|
702
|
-
if (input[_PI] != null) {
|
|
703
|
-
entries[_PI] = input[_PI];
|
|
704
|
-
}
|
|
705
|
-
if (input[_PA] != null) {
|
|
706
|
-
const memberEntries = se_policyDescriptorListType(input[_PA], context);
|
|
707
|
-
if (input[_PA]?.length === 0) {
|
|
708
|
-
entries.PolicyArns = [];
|
|
709
|
-
}
|
|
710
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
711
|
-
const loc = `PolicyArns.${key}`;
|
|
712
|
-
entries[loc] = value;
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
if (input[_P] != null) {
|
|
716
|
-
entries[_P] = input[_P];
|
|
717
|
-
}
|
|
718
|
-
if (input[_DS] != null) {
|
|
719
|
-
entries[_DS] = input[_DS];
|
|
720
|
-
}
|
|
721
|
-
return entries;
|
|
722
|
-
};
|
|
723
|
-
var se_policyDescriptorListType = (input, context) => {
|
|
724
|
-
const entries = {};
|
|
725
|
-
let counter = 1;
|
|
726
|
-
for (const entry of input) {
|
|
727
|
-
if (entry === null) {
|
|
728
|
-
continue;
|
|
729
|
-
}
|
|
730
|
-
const memberEntries = se_PolicyDescriptorType(entry, context);
|
|
731
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
732
|
-
entries[`member.${counter}.${key}`] = value;
|
|
733
|
-
});
|
|
734
|
-
counter++;
|
|
735
|
-
}
|
|
736
|
-
return entries;
|
|
737
|
-
};
|
|
738
|
-
var se_PolicyDescriptorType = (input, context) => {
|
|
739
|
-
const entries = {};
|
|
740
|
-
if (input[_a] != null) {
|
|
741
|
-
entries[_a] = input[_a];
|
|
742
|
-
}
|
|
743
|
-
return entries;
|
|
744
|
-
};
|
|
745
|
-
var se_ProvidedContext = (input, context) => {
|
|
746
|
-
const entries = {};
|
|
747
|
-
if (input[_PAr] != null) {
|
|
748
|
-
entries[_PAr] = input[_PAr];
|
|
749
|
-
}
|
|
750
|
-
if (input[_CA] != null) {
|
|
751
|
-
entries[_CA] = input[_CA];
|
|
752
|
-
}
|
|
753
|
-
return entries;
|
|
754
|
-
};
|
|
755
|
-
var se_ProvidedContextsListType = (input, context) => {
|
|
756
|
-
const entries = {};
|
|
757
|
-
let counter = 1;
|
|
758
|
-
for (const entry of input) {
|
|
759
|
-
if (entry === null) {
|
|
760
|
-
continue;
|
|
761
|
-
}
|
|
762
|
-
const memberEntries = se_ProvidedContext(entry, context);
|
|
763
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
764
|
-
entries[`member.${counter}.${key}`] = value;
|
|
765
|
-
});
|
|
766
|
-
counter++;
|
|
767
|
-
}
|
|
768
|
-
return entries;
|
|
769
|
-
};
|
|
770
|
-
var se_Tag = (input, context) => {
|
|
771
|
-
const entries = {};
|
|
772
|
-
if (input[_K] != null) {
|
|
773
|
-
entries[_K] = input[_K];
|
|
774
|
-
}
|
|
775
|
-
if (input[_Va] != null) {
|
|
776
|
-
entries[_Va] = input[_Va];
|
|
777
|
-
}
|
|
778
|
-
return entries;
|
|
779
|
-
};
|
|
780
|
-
var se_tagKeyListType = (input, context) => {
|
|
781
|
-
const entries = {};
|
|
782
|
-
let counter = 1;
|
|
783
|
-
for (const entry of input) {
|
|
784
|
-
if (entry === null) {
|
|
785
|
-
continue;
|
|
786
|
-
}
|
|
787
|
-
entries[`member.${counter}`] = entry;
|
|
788
|
-
counter++;
|
|
789
|
-
}
|
|
790
|
-
return entries;
|
|
791
|
-
};
|
|
792
|
-
var se_tagListType = (input, context) => {
|
|
793
|
-
const entries = {};
|
|
794
|
-
let counter = 1;
|
|
795
|
-
for (const entry of input) {
|
|
796
|
-
if (entry === null) {
|
|
797
|
-
continue;
|
|
798
|
-
}
|
|
799
|
-
const memberEntries = se_Tag(entry, context);
|
|
800
|
-
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
801
|
-
entries[`member.${counter}.${key}`] = value;
|
|
802
|
-
});
|
|
803
|
-
counter++;
|
|
804
|
-
}
|
|
805
|
-
return entries;
|
|
806
|
-
};
|
|
807
|
-
var de_AssumedRoleUser = (output, context) => {
|
|
808
|
-
const contents = {};
|
|
809
|
-
if (output[_ARI] != null) {
|
|
810
|
-
contents[_ARI] = expectString(output[_ARI]);
|
|
811
|
-
}
|
|
812
|
-
if (output[_Ar] != null) {
|
|
813
|
-
contents[_Ar] = expectString(output[_Ar]);
|
|
814
|
-
}
|
|
815
|
-
return contents;
|
|
816
|
-
};
|
|
817
|
-
var de_AssumeRoleResponse = (output, context) => {
|
|
818
|
-
const contents = {};
|
|
819
|
-
if (output[_C] != null) {
|
|
820
|
-
contents[_C] = de_Credentials(output[_C], context);
|
|
821
|
-
}
|
|
822
|
-
if (output[_ARU] != null) {
|
|
823
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
|
|
824
|
-
}
|
|
825
|
-
if (output[_PPS] != null) {
|
|
826
|
-
contents[_PPS] = strictParseInt32(output[_PPS]);
|
|
827
|
-
}
|
|
828
|
-
if (output[_SI] != null) {
|
|
829
|
-
contents[_SI] = expectString(output[_SI]);
|
|
830
|
-
}
|
|
831
|
-
return contents;
|
|
832
|
-
};
|
|
833
|
-
var de_AssumeRoleWithWebIdentityResponse = (output, context) => {
|
|
834
|
-
const contents = {};
|
|
835
|
-
if (output[_C] != null) {
|
|
836
|
-
contents[_C] = de_Credentials(output[_C], context);
|
|
837
|
-
}
|
|
838
|
-
if (output[_SFWIT] != null) {
|
|
839
|
-
contents[_SFWIT] = expectString(output[_SFWIT]);
|
|
840
|
-
}
|
|
841
|
-
if (output[_ARU] != null) {
|
|
842
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
|
|
843
|
-
}
|
|
844
|
-
if (output[_PPS] != null) {
|
|
845
|
-
contents[_PPS] = strictParseInt32(output[_PPS]);
|
|
846
|
-
}
|
|
847
|
-
if (output[_Pr] != null) {
|
|
848
|
-
contents[_Pr] = expectString(output[_Pr]);
|
|
849
|
-
}
|
|
850
|
-
if (output[_Au] != null) {
|
|
851
|
-
contents[_Au] = expectString(output[_Au]);
|
|
852
|
-
}
|
|
853
|
-
if (output[_SI] != null) {
|
|
854
|
-
contents[_SI] = expectString(output[_SI]);
|
|
855
|
-
}
|
|
856
|
-
return contents;
|
|
857
|
-
};
|
|
858
|
-
var de_Credentials = (output, context) => {
|
|
859
|
-
const contents = {};
|
|
860
|
-
if (output[_AKI] != null) {
|
|
861
|
-
contents[_AKI] = expectString(output[_AKI]);
|
|
862
|
-
}
|
|
863
|
-
if (output[_SAK] != null) {
|
|
864
|
-
contents[_SAK] = expectString(output[_SAK]);
|
|
865
|
-
}
|
|
866
|
-
if (output[_ST] != null) {
|
|
867
|
-
contents[_ST] = expectString(output[_ST]);
|
|
868
|
-
}
|
|
869
|
-
if (output[_E] != null) {
|
|
870
|
-
contents[_E] = expectNonNull(parseRfc3339DateTimeWithOffset(output[_E]));
|
|
871
|
-
}
|
|
872
|
-
return contents;
|
|
873
|
-
};
|
|
874
|
-
var de_ExpiredTokenException = (output, context) => {
|
|
875
|
-
const contents = {};
|
|
876
|
-
if (output[_m] != null) {
|
|
877
|
-
contents[_m] = expectString(output[_m]);
|
|
878
|
-
}
|
|
879
|
-
return contents;
|
|
880
|
-
};
|
|
881
|
-
var de_IDPCommunicationErrorException = (output, context) => {
|
|
882
|
-
const contents = {};
|
|
883
|
-
if (output[_m] != null) {
|
|
884
|
-
contents[_m] = expectString(output[_m]);
|
|
885
|
-
}
|
|
886
|
-
return contents;
|
|
887
|
-
};
|
|
888
|
-
var de_IDPRejectedClaimException = (output, context) => {
|
|
889
|
-
const contents = {};
|
|
890
|
-
if (output[_m] != null) {
|
|
891
|
-
contents[_m] = expectString(output[_m]);
|
|
892
|
-
}
|
|
893
|
-
return contents;
|
|
894
|
-
};
|
|
895
|
-
var de_InvalidIdentityTokenException = (output, context) => {
|
|
896
|
-
const contents = {};
|
|
897
|
-
if (output[_m] != null) {
|
|
898
|
-
contents[_m] = expectString(output[_m]);
|
|
899
|
-
}
|
|
900
|
-
return contents;
|
|
901
|
-
};
|
|
902
|
-
var de_MalformedPolicyDocumentException = (output, context) => {
|
|
903
|
-
const contents = {};
|
|
904
|
-
if (output[_m] != null) {
|
|
905
|
-
contents[_m] = expectString(output[_m]);
|
|
906
|
-
}
|
|
907
|
-
return contents;
|
|
908
|
-
};
|
|
909
|
-
var de_PackedPolicyTooLargeException = (output, context) => {
|
|
910
|
-
const contents = {};
|
|
911
|
-
if (output[_m] != null) {
|
|
912
|
-
contents[_m] = expectString(output[_m]);
|
|
913
|
-
}
|
|
914
|
-
return contents;
|
|
915
|
-
};
|
|
916
|
-
var de_RegionDisabledException = (output, context) => {
|
|
917
|
-
const contents = {};
|
|
918
|
-
if (output[_m] != null) {
|
|
919
|
-
contents[_m] = expectString(output[_m]);
|
|
920
|
-
}
|
|
921
|
-
return contents;
|
|
922
|
-
};
|
|
923
|
-
var deserializeMetadata = (output) => ({
|
|
924
|
-
httpStatusCode: output.statusCode,
|
|
925
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
926
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
927
|
-
cfId: output.headers["x-amz-cf-id"]
|
|
928
|
-
});
|
|
929
|
-
var throwDefaultError = withBaseException(STSServiceException);
|
|
930
|
-
var buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
931
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
932
|
-
const contents = {
|
|
933
|
-
protocol,
|
|
934
|
-
hostname,
|
|
935
|
-
port,
|
|
936
|
-
method: "POST",
|
|
937
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
938
|
-
headers
|
|
939
|
-
};
|
|
940
|
-
if (resolvedHostname !== void 0) {
|
|
941
|
-
contents.hostname = resolvedHostname;
|
|
942
|
-
}
|
|
943
|
-
if (body !== void 0) {
|
|
944
|
-
contents.body = body;
|
|
945
|
-
}
|
|
946
|
-
return new HttpRequest(contents);
|
|
947
|
-
};
|
|
948
|
-
var SHARED_HEADERS = {
|
|
949
|
-
"content-type": "application/x-www-form-urlencoded"
|
|
950
|
-
};
|
|
951
|
-
var _ = "2011-06-15";
|
|
952
|
-
var _A = "Action";
|
|
834
|
+
var _A = "Arn";
|
|
953
835
|
var _AKI = "AccessKeyId";
|
|
954
836
|
var _AR = "AssumeRole";
|
|
955
837
|
var _ARI = "AssumedRoleId";
|
|
838
|
+
var _ARR = "AssumeRoleRequest";
|
|
839
|
+
var _ARRs = "AssumeRoleResponse";
|
|
956
840
|
var _ARU = "AssumedRoleUser";
|
|
957
841
|
var _ARWWI = "AssumeRoleWithWebIdentity";
|
|
958
|
-
var
|
|
842
|
+
var _ARWWIR = "AssumeRoleWithWebIdentityRequest";
|
|
843
|
+
var _ARWWIRs = "AssumeRoleWithWebIdentityResponse";
|
|
959
844
|
var _Au = "Audience";
|
|
960
845
|
var _C = "Credentials";
|
|
961
846
|
var _CA = "ContextAssertion";
|
|
962
847
|
var _DS = "DurationSeconds";
|
|
963
848
|
var _E = "Expiration";
|
|
964
849
|
var _EI = "ExternalId";
|
|
850
|
+
var _ETE = "ExpiredTokenException";
|
|
851
|
+
var _IDPCEE = "IDPCommunicationErrorException";
|
|
852
|
+
var _IDPRCE = "IDPRejectedClaimException";
|
|
853
|
+
var _IITE = "InvalidIdentityTokenException";
|
|
965
854
|
var _K = "Key";
|
|
855
|
+
var _MPDE = "MalformedPolicyDocumentException";
|
|
966
856
|
var _P = "Policy";
|
|
967
857
|
var _PA = "PolicyArns";
|
|
968
858
|
var _PAr = "ProviderArn";
|
|
969
859
|
var _PC = "ProvidedContexts";
|
|
860
|
+
var _PCLT = "ProvidedContextsListType";
|
|
861
|
+
var _PCr = "ProvidedContext";
|
|
862
|
+
var _PDT = "PolicyDescriptorType";
|
|
970
863
|
var _PI = "ProviderId";
|
|
971
864
|
var _PPS = "PackedPolicySize";
|
|
865
|
+
var _PPTLE = "PackedPolicyTooLargeException";
|
|
972
866
|
var _Pr = "Provider";
|
|
973
867
|
var _RA = "RoleArn";
|
|
868
|
+
var _RDE = "RegionDisabledException";
|
|
974
869
|
var _RSN = "RoleSessionName";
|
|
975
870
|
var _SAK = "SecretAccessKey";
|
|
976
871
|
var _SFWIT = "SubjectFromWebIdentityToken";
|
|
@@ -980,34 +875,180 @@ var _ST = "SessionToken";
|
|
|
980
875
|
var _T = "Tags";
|
|
981
876
|
var _TC = "TokenCode";
|
|
982
877
|
var _TTK = "TransitiveTagKeys";
|
|
983
|
-
var
|
|
984
|
-
var
|
|
878
|
+
var _Ta = "Tag";
|
|
879
|
+
var _V = "Value";
|
|
985
880
|
var _WIT = "WebIdentityToken";
|
|
986
881
|
var _a = "arn";
|
|
882
|
+
var _aKST = "accessKeySecretType";
|
|
883
|
+
var _aQE = "awsQueryError";
|
|
884
|
+
var _c = "client";
|
|
885
|
+
var _cTT = "clientTokenType";
|
|
886
|
+
var _e = "error";
|
|
887
|
+
var _hE = "httpError";
|
|
987
888
|
var _m = "message";
|
|
988
|
-
var
|
|
989
|
-
var
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
889
|
+
var _pDLT = "policyDescriptorListType";
|
|
890
|
+
var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
|
|
891
|
+
var _tLT = "tagListType";
|
|
892
|
+
var n0 = "com.amazonaws.sts";
|
|
893
|
+
var accessKeySecretType = [0, n0, _aKST, 8, 0];
|
|
894
|
+
var clientTokenType = [0, n0, _cTT, 8, 0];
|
|
895
|
+
var AssumedRoleUser = [3, n0, _ARU, 0, [_ARI, _A], [0, 0]];
|
|
896
|
+
var AssumeRoleRequest = [
|
|
897
|
+
3,
|
|
898
|
+
n0,
|
|
899
|
+
_ARR,
|
|
900
|
+
0,
|
|
901
|
+
[_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
|
|
902
|
+
[0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType]
|
|
903
|
+
];
|
|
904
|
+
var AssumeRoleResponse = [
|
|
905
|
+
3,
|
|
906
|
+
n0,
|
|
907
|
+
_ARRs,
|
|
908
|
+
0,
|
|
909
|
+
[_C, _ARU, _PPS, _SI],
|
|
910
|
+
[[() => Credentials, 0], () => AssumedRoleUser, 1, 0]
|
|
911
|
+
];
|
|
912
|
+
var AssumeRoleWithWebIdentityRequest = [
|
|
913
|
+
3,
|
|
914
|
+
n0,
|
|
915
|
+
_ARWWIR,
|
|
916
|
+
0,
|
|
917
|
+
[_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
|
|
918
|
+
[0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1]
|
|
919
|
+
];
|
|
920
|
+
var AssumeRoleWithWebIdentityResponse = [
|
|
921
|
+
3,
|
|
922
|
+
n0,
|
|
923
|
+
_ARWWIRs,
|
|
924
|
+
0,
|
|
925
|
+
[_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
|
|
926
|
+
[[() => Credentials, 0], 0, () => AssumedRoleUser, 1, 0, 0, 0]
|
|
927
|
+
];
|
|
928
|
+
var Credentials = [
|
|
929
|
+
3,
|
|
930
|
+
n0,
|
|
931
|
+
_C,
|
|
932
|
+
0,
|
|
933
|
+
[_AKI, _SAK, _ST, _E],
|
|
934
|
+
[0, [() => accessKeySecretType, 0], 0, 4]
|
|
935
|
+
];
|
|
936
|
+
var ExpiredTokenException2 = [
|
|
937
|
+
-3,
|
|
938
|
+
n0,
|
|
939
|
+
_ETE,
|
|
940
|
+
{
|
|
941
|
+
[_e]: _c,
|
|
942
|
+
[_hE]: 400,
|
|
943
|
+
[_aQE]: [`ExpiredTokenException`, 400]
|
|
944
|
+
},
|
|
945
|
+
[_m],
|
|
946
|
+
[0]
|
|
947
|
+
];
|
|
948
|
+
TypeRegistry.for(n0).registerError(ExpiredTokenException2, ExpiredTokenException);
|
|
949
|
+
var IDPCommunicationErrorException2 = [
|
|
950
|
+
-3,
|
|
951
|
+
n0,
|
|
952
|
+
_IDPCEE,
|
|
953
|
+
{
|
|
954
|
+
[_e]: _c,
|
|
955
|
+
[_hE]: 400,
|
|
956
|
+
[_aQE]: [`IDPCommunicationError`, 400]
|
|
957
|
+
},
|
|
958
|
+
[_m],
|
|
959
|
+
[0]
|
|
960
|
+
];
|
|
961
|
+
TypeRegistry.for(n0).registerError(IDPCommunicationErrorException2, IDPCommunicationErrorException);
|
|
962
|
+
var IDPRejectedClaimException2 = [
|
|
963
|
+
-3,
|
|
964
|
+
n0,
|
|
965
|
+
_IDPRCE,
|
|
966
|
+
{
|
|
967
|
+
[_e]: _c,
|
|
968
|
+
[_hE]: 403,
|
|
969
|
+
[_aQE]: [`IDPRejectedClaim`, 403]
|
|
970
|
+
},
|
|
971
|
+
[_m],
|
|
972
|
+
[0]
|
|
973
|
+
];
|
|
974
|
+
TypeRegistry.for(n0).registerError(IDPRejectedClaimException2, IDPRejectedClaimException);
|
|
975
|
+
var InvalidIdentityTokenException2 = [
|
|
976
|
+
-3,
|
|
977
|
+
n0,
|
|
978
|
+
_IITE,
|
|
979
|
+
{
|
|
980
|
+
[_e]: _c,
|
|
981
|
+
[_hE]: 400,
|
|
982
|
+
[_aQE]: [`InvalidIdentityToken`, 400]
|
|
983
|
+
},
|
|
984
|
+
[_m],
|
|
985
|
+
[0]
|
|
986
|
+
];
|
|
987
|
+
TypeRegistry.for(n0).registerError(InvalidIdentityTokenException2, InvalidIdentityTokenException);
|
|
988
|
+
var MalformedPolicyDocumentException2 = [
|
|
989
|
+
-3,
|
|
990
|
+
n0,
|
|
991
|
+
_MPDE,
|
|
992
|
+
{
|
|
993
|
+
[_e]: _c,
|
|
994
|
+
[_hE]: 400,
|
|
995
|
+
[_aQE]: [`MalformedPolicyDocument`, 400]
|
|
996
|
+
},
|
|
997
|
+
[_m],
|
|
998
|
+
[0]
|
|
999
|
+
];
|
|
1000
|
+
TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException2, MalformedPolicyDocumentException);
|
|
1001
|
+
var PackedPolicyTooLargeException2 = [
|
|
1002
|
+
-3,
|
|
1003
|
+
n0,
|
|
1004
|
+
_PPTLE,
|
|
1005
|
+
{
|
|
1006
|
+
[_e]: _c,
|
|
1007
|
+
[_hE]: 400,
|
|
1008
|
+
[_aQE]: [`PackedPolicyTooLarge`, 400]
|
|
1009
|
+
},
|
|
1010
|
+
[_m],
|
|
1011
|
+
[0]
|
|
1012
|
+
];
|
|
1013
|
+
TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException2, PackedPolicyTooLargeException);
|
|
1014
|
+
var PolicyDescriptorType = [3, n0, _PDT, 0, [_a], [0]];
|
|
1015
|
+
var ProvidedContext = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
|
|
1016
|
+
var RegionDisabledException2 = [
|
|
1017
|
+
-3,
|
|
1018
|
+
n0,
|
|
1019
|
+
_RDE,
|
|
1020
|
+
{
|
|
1021
|
+
[_e]: _c,
|
|
1022
|
+
[_hE]: 403,
|
|
1023
|
+
[_aQE]: [`RegionDisabledException`, 403]
|
|
1024
|
+
},
|
|
1025
|
+
[_m],
|
|
1026
|
+
[0]
|
|
1027
|
+
];
|
|
1028
|
+
TypeRegistry.for(n0).registerError(RegionDisabledException2, RegionDisabledException);
|
|
1029
|
+
var Tag = [3, n0, _Ta, 0, [_K, _V], [0, 0]];
|
|
1030
|
+
var STSServiceException2 = [-3, _s, "STSServiceException", 0, [], []];
|
|
1031
|
+
TypeRegistry.for(_s).registerError(STSServiceException2, STSServiceException);
|
|
1032
|
+
var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType];
|
|
1033
|
+
var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext];
|
|
1034
|
+
var tagKeyListType = 64 | 0;
|
|
1035
|
+
var tagListType = [1, n0, _tLT, 0, () => Tag];
|
|
1036
|
+
var AssumeRole = [9, n0, _AR, 0, () => AssumeRoleRequest, () => AssumeRoleResponse];
|
|
1037
|
+
var AssumeRoleWithWebIdentity = [
|
|
1038
|
+
9,
|
|
1039
|
+
n0,
|
|
1040
|
+
_ARWWI,
|
|
1041
|
+
0,
|
|
1042
|
+
() => AssumeRoleWithWebIdentityRequest,
|
|
1043
|
+
() => AssumeRoleWithWebIdentityResponse
|
|
1044
|
+
];
|
|
997
1045
|
var AssumeRoleCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
|
|
998
|
-
return [
|
|
999
|
-
|
|
1000
|
-
getEndpointPlugin(config, Command2.getEndpointParameterInstructions())
|
|
1001
|
-
];
|
|
1002
|
-
}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() {
|
|
1046
|
+
return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
|
|
1047
|
+
}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(AssumeRole).build() {
|
|
1003
1048
|
};
|
|
1004
|
-
init_esm_shims();
|
|
1005
1049
|
var AssumeRoleWithWebIdentityCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
|
|
1006
|
-
return [
|
|
1007
|
-
|
|
1008
|
-
getEndpointPlugin(config, Command2.getEndpointParameterInstructions())
|
|
1009
|
-
];
|
|
1010
|
-
}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() {
|
|
1050
|
+
return [getEndpointPlugin(config, Command2.getEndpointParameterInstructions())];
|
|
1051
|
+
}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(AssumeRoleWithWebIdentity).build() {
|
|
1011
1052
|
};
|
|
1012
1053
|
var commands = {
|
|
1013
1054
|
AssumeRoleCommand,
|
|
@@ -1016,11 +1057,6 @@ var commands = {
|
|
|
1016
1057
|
var STS = class extends STSClient {
|
|
1017
1058
|
};
|
|
1018
1059
|
createAggregatedClient(commands, STS);
|
|
1019
|
-
init_esm_shims();
|
|
1020
|
-
init_esm_shims();
|
|
1021
|
-
init_esm_shims();
|
|
1022
|
-
init_esm_shims();
|
|
1023
|
-
var ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
|
|
1024
1060
|
var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
|
1025
1061
|
if (typeof assumedRoleUser?.Arn === "string") {
|
|
1026
1062
|
const arnComponents = assumedRoleUser.Arn.split(":");
|
|
@@ -1030,11 +1066,12 @@ var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
|
|
1030
1066
|
}
|
|
1031
1067
|
return void 0;
|
|
1032
1068
|
};
|
|
1033
|
-
var resolveRegion = async (_region, _parentRegion, credentialProviderLogger) => {
|
|
1069
|
+
var resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
|
|
1034
1070
|
const region = typeof _region === "function" ? await _region() : _region;
|
|
1035
1071
|
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
|
1036
|
-
|
|
1037
|
-
|
|
1072
|
+
const stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)();
|
|
1073
|
+
credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
|
|
1074
|
+
return region ?? parentRegion ?? stsDefaultRegion;
|
|
1038
1075
|
};
|
|
1039
1076
|
var getDefaultRoleAssumer = (stsOptions, STSClient2) => {
|
|
1040
1077
|
let stsClient;
|
|
@@ -1042,28 +1079,33 @@ var getDefaultRoleAssumer = (stsOptions, STSClient2) => {
|
|
|
1042
1079
|
return async (sourceCreds, params) => {
|
|
1043
1080
|
closureSourceCreds = sourceCreds;
|
|
1044
1081
|
if (!stsClient) {
|
|
1045
|
-
const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger } = stsOptions;
|
|
1046
|
-
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger
|
|
1082
|
+
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
|
|
1083
|
+
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
|
|
1084
|
+
logger,
|
|
1085
|
+
profile
|
|
1086
|
+
});
|
|
1047
1087
|
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
1048
1088
|
stsClient = new STSClient2({
|
|
1049
|
-
|
|
1089
|
+
...stsOptions,
|
|
1090
|
+
userAgentAppId,
|
|
1091
|
+
profile,
|
|
1050
1092
|
credentialDefaultProvider: () => async () => closureSourceCreds,
|
|
1051
1093
|
region: resolvedRegion,
|
|
1052
1094
|
requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
|
|
1053
1095
|
logger
|
|
1054
1096
|
});
|
|
1055
1097
|
}
|
|
1056
|
-
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
|
|
1057
|
-
if (!
|
|
1098
|
+
const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params));
|
|
1099
|
+
if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {
|
|
1058
1100
|
throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
|
|
1059
1101
|
}
|
|
1060
|
-
const accountId = getAccountIdFromAssumedRoleUser(
|
|
1102
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);
|
|
1061
1103
|
const credentials = {
|
|
1062
|
-
accessKeyId:
|
|
1063
|
-
secretAccessKey:
|
|
1064
|
-
sessionToken:
|
|
1065
|
-
expiration:
|
|
1066
|
-
...
|
|
1104
|
+
accessKeyId: Credentials2.AccessKeyId,
|
|
1105
|
+
secretAccessKey: Credentials2.SecretAccessKey,
|
|
1106
|
+
sessionToken: Credentials2.SessionToken,
|
|
1107
|
+
expiration: Credentials2.Expiration,
|
|
1108
|
+
...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },
|
|
1067
1109
|
...accountId && { accountId }
|
|
1068
1110
|
};
|
|
1069
1111
|
setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
|
|
@@ -1074,27 +1116,32 @@ var getDefaultRoleAssumerWithWebIdentity = (stsOptions, STSClient2) => {
|
|
|
1074
1116
|
let stsClient;
|
|
1075
1117
|
return async (params) => {
|
|
1076
1118
|
if (!stsClient) {
|
|
1077
|
-
const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger } = stsOptions;
|
|
1078
|
-
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger
|
|
1119
|
+
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
|
|
1120
|
+
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
|
|
1121
|
+
logger,
|
|
1122
|
+
profile
|
|
1123
|
+
});
|
|
1079
1124
|
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
1080
1125
|
stsClient = new STSClient2({
|
|
1081
|
-
|
|
1126
|
+
...stsOptions,
|
|
1127
|
+
userAgentAppId,
|
|
1128
|
+
profile,
|
|
1082
1129
|
region: resolvedRegion,
|
|
1083
1130
|
requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
|
|
1084
1131
|
logger
|
|
1085
1132
|
});
|
|
1086
1133
|
}
|
|
1087
|
-
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
|
|
1088
|
-
if (!
|
|
1134
|
+
const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
|
|
1135
|
+
if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {
|
|
1089
1136
|
throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
|
|
1090
1137
|
}
|
|
1091
|
-
const accountId = getAccountIdFromAssumedRoleUser(
|
|
1138
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);
|
|
1092
1139
|
const credentials = {
|
|
1093
|
-
accessKeyId:
|
|
1094
|
-
secretAccessKey:
|
|
1095
|
-
sessionToken:
|
|
1096
|
-
expiration:
|
|
1097
|
-
...
|
|
1140
|
+
accessKeyId: Credentials2.AccessKeyId,
|
|
1141
|
+
secretAccessKey: Credentials2.SecretAccessKey,
|
|
1142
|
+
sessionToken: Credentials2.SessionToken,
|
|
1143
|
+
expiration: Credentials2.Expiration,
|
|
1144
|
+
...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },
|
|
1098
1145
|
...accountId && { accountId }
|
|
1099
1146
|
};
|
|
1100
1147
|
if (accountId) {
|
|
@@ -1130,11 +1177,7 @@ var decorateDefaultCredentialProvider = (provider) => (input) => provider({
|
|
|
1130
1177
|
export {
|
|
1131
1178
|
Command as $Command,
|
|
1132
1179
|
AssumeRoleCommand,
|
|
1133
|
-
AssumeRoleResponseFilterSensitiveLog,
|
|
1134
1180
|
AssumeRoleWithWebIdentityCommand,
|
|
1135
|
-
AssumeRoleWithWebIdentityRequestFilterSensitiveLog,
|
|
1136
|
-
AssumeRoleWithWebIdentityResponseFilterSensitiveLog,
|
|
1137
|
-
CredentialsFilterSensitiveLog,
|
|
1138
1181
|
ExpiredTokenException,
|
|
1139
1182
|
IDPCommunicationErrorException,
|
|
1140
1183
|
IDPRejectedClaimException,
|