@aws-sdk/client-iam-toolbox 3.1118.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +188 -0
- package/dist-cjs/index.js +528 -0
- package/dist-es/IAMToolbox.js +13 -0
- package/dist-es/IAMToolboxClient.js +47 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commandBuilder.js +6 -0
- package/dist-es/commands/GetRequestAuthorizationDetailsCommand.js +4 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/endpoint/EndpointParameters.js +13 -0
- package/dist-es/endpoint/bdd.js +46 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +10 -0
- package/dist-es/models/IAMToolboxServiceException.js +8 -0
- package/dist-es/models/enums.js +18 -0
- package/dist-es/models/errors.js +49 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/pagination/GetRequestAuthorizationDetailsPaginator.js +4 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/runtimeConfig.browser.js +29 -0
- package/dist-es/runtimeConfig.js +43 -0
- package/dist-es/runtimeConfig.native.js +9 -0
- package/dist-es/runtimeConfig.shared.js +40 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +132 -0
- package/dist-types/IAMToolbox.d.ts +24 -0
- package/dist-types/IAMToolboxClient.d.ts +187 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commandBuilder.d.ts +18 -0
- package/dist-types/commands/GetRequestAuthorizationDetailsCommand.d.ts +120 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +50 -0
- package/dist-types/endpoint/bdd.d.ts +2 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +18 -0
- package/dist-types/models/IAMToolboxServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +42 -0
- package/dist-types/models/errors.d.ts +50 -0
- package/dist-types/models/models_0.d.ts +142 -0
- package/dist-types/pagination/GetRequestAuthorizationDetailsPaginator.d.ts +7 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/runtimeConfig.browser.d.ts +57 -0
- package/dist-types/runtimeConfig.d.ts +57 -0
- package/dist-types/runtimeConfig.native.d.ts +56 -0
- package/dist-types/runtimeConfig.shared.d.ts +28 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +21 -0
- package/dist-types/ts3.4/IAMToolbox.d.ts +33 -0
- package/dist-types/ts3.4/IAMToolboxClient.d.ts +105 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +25 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +43 -0
- package/dist-types/ts3.4/commandBuilder.d.ts +39 -0
- package/dist-types/ts3.4/commands/GetRequestAuthorizationDetailsCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/endpoint/bdd.d.ts +2 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +10 -0
- package/dist-types/ts3.4/index.d.ts +13 -0
- package/dist-types/ts3.4/models/IAMToolboxServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/enums.d.ts +21 -0
- package/dist-types/ts3.4/models/errors.d.ts +22 -0
- package/dist-types/ts3.4/models/models_0.d.ts +36 -0
- package/dist-types/ts3.4/pagination/GetRequestAuthorizationDetailsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +31 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +16 -0
- package/package.json +69 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
|
|
2
|
+
const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require("@smithy/core");
|
|
3
|
+
const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require("@smithy/core/client");
|
|
4
|
+
const { Command: $Command } = require("@smithy/core/client");
|
|
5
|
+
exports.$Command = $Command;
|
|
6
|
+
exports.__Client = Client;
|
|
7
|
+
const { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require("@smithy/core/config");
|
|
8
|
+
const { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
|
|
9
|
+
const { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
|
|
10
|
+
const { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
|
|
11
|
+
const { TypeRegistry, getSchemaSerdePlugin } = require("@smithy/core/schema");
|
|
12
|
+
const { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
|
|
13
|
+
const { defaultProvider } = require("@aws-sdk/credential-provider-node");
|
|
14
|
+
const { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require("@smithy/core/serde");
|
|
15
|
+
const { streamCollector, NodeHttpHandler } = require("@smithy/node-http-handler");
|
|
16
|
+
const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
|
|
17
|
+
const { Sha256 } = require("@smithy/core/checksum");
|
|
18
|
+
|
|
19
|
+
const defaultIAMToolboxHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
20
|
+
return {
|
|
21
|
+
operation: getSmithyContext(context).operation,
|
|
22
|
+
region: await normalizeProvider(config.region)() || (() => {
|
|
23
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
24
|
+
})(),
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
28
|
+
return {
|
|
29
|
+
schemeId: "aws.auth#sigv4",
|
|
30
|
+
signingProperties: {
|
|
31
|
+
name: "iam",
|
|
32
|
+
region: authParameters.region,
|
|
33
|
+
},
|
|
34
|
+
propertiesExtractor: (config, context) => ({
|
|
35
|
+
signingProperties: {
|
|
36
|
+
config,
|
|
37
|
+
context,
|
|
38
|
+
},
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
const defaultIAMToolboxHttpAuthSchemeProvider = (authParameters) => {
|
|
43
|
+
const options = [];
|
|
44
|
+
switch (authParameters.operation) {
|
|
45
|
+
default: {
|
|
46
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return options;
|
|
50
|
+
};
|
|
51
|
+
const resolveHttpAuthSchemeConfig = (config) => {
|
|
52
|
+
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
53
|
+
return Object.assign(config_0, {
|
|
54
|
+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const resolveClientEndpointParameters = (options) => {
|
|
59
|
+
return Object.assign(options, {
|
|
60
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
61
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
62
|
+
defaultSigningName: "iam",
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
const commonParams = {
|
|
66
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
67
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
68
|
+
Region: { type: "builtInParams", name: "region" },
|
|
69
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var version = "3.0.0";
|
|
73
|
+
var packageInfo = {
|
|
74
|
+
version: version};
|
|
75
|
+
|
|
76
|
+
const k = "ref";
|
|
77
|
+
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
|
|
78
|
+
const _data = {
|
|
79
|
+
conditions: [
|
|
80
|
+
[c, [g]],
|
|
81
|
+
[c, j],
|
|
82
|
+
["aws.partition", j, d],
|
|
83
|
+
[e, [{ [k]: "UseFIPS" }, b]],
|
|
84
|
+
[e, [{ [k]: "UseDualStack" }, b]],
|
|
85
|
+
[e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
|
|
86
|
+
[e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]]
|
|
87
|
+
],
|
|
88
|
+
results: [
|
|
89
|
+
[a],
|
|
90
|
+
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
91
|
+
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
92
|
+
[g, i],
|
|
93
|
+
["https://iam-toolbox-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
94
|
+
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
95
|
+
["https://iam-toolbox-fips.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
96
|
+
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
97
|
+
["https://iam-toolbox.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
98
|
+
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
99
|
+
["https://iam-toolbox.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
100
|
+
[a, "Invalid Configuration: Missing Region"]
|
|
101
|
+
]
|
|
102
|
+
};
|
|
103
|
+
const root = 2;
|
|
104
|
+
const r = 100_000_000;
|
|
105
|
+
const nodes = new Int32Array([
|
|
106
|
+
-1, 1, -1,
|
|
107
|
+
0, 12, 3,
|
|
108
|
+
1, 4, r + 11,
|
|
109
|
+
2, 5, r + 11,
|
|
110
|
+
3, 8, 6,
|
|
111
|
+
4, 7, r + 10,
|
|
112
|
+
5, r + 8, r + 9,
|
|
113
|
+
4, 10, 9,
|
|
114
|
+
6, r + 6, r + 7,
|
|
115
|
+
5, 11, r + 5,
|
|
116
|
+
6, r + 4, r + 5,
|
|
117
|
+
3, r + 1, 13,
|
|
118
|
+
4, r + 2, r + 3,
|
|
119
|
+
]);
|
|
120
|
+
const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
121
|
+
|
|
122
|
+
const cache = new EndpointCache({
|
|
123
|
+
size: 50,
|
|
124
|
+
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
125
|
+
});
|
|
126
|
+
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
127
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
128
|
+
endpointParams: endpointParams,
|
|
129
|
+
logger: context.logger,
|
|
130
|
+
}));
|
|
131
|
+
};
|
|
132
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
133
|
+
|
|
134
|
+
class IAMToolboxServiceException extends ServiceException {
|
|
135
|
+
constructor(options) {
|
|
136
|
+
super(options);
|
|
137
|
+
Object.setPrototypeOf(this, IAMToolboxServiceException.prototype);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
class AccessDeniedException extends IAMToolboxServiceException {
|
|
142
|
+
name = "AccessDeniedException";
|
|
143
|
+
$fault = "client";
|
|
144
|
+
constructor(opts) {
|
|
145
|
+
super({
|
|
146
|
+
name: "AccessDeniedException",
|
|
147
|
+
$fault: "client",
|
|
148
|
+
...opts,
|
|
149
|
+
});
|
|
150
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
class InternalServerException extends IAMToolboxServiceException {
|
|
154
|
+
name = "InternalServerException";
|
|
155
|
+
$fault = "server";
|
|
156
|
+
constructor(opts) {
|
|
157
|
+
super({
|
|
158
|
+
name: "InternalServerException",
|
|
159
|
+
$fault: "server",
|
|
160
|
+
...opts,
|
|
161
|
+
});
|
|
162
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
class ResourceNotFoundException extends IAMToolboxServiceException {
|
|
166
|
+
name = "ResourceNotFoundException";
|
|
167
|
+
$fault = "client";
|
|
168
|
+
constructor(opts) {
|
|
169
|
+
super({
|
|
170
|
+
name: "ResourceNotFoundException",
|
|
171
|
+
$fault: "client",
|
|
172
|
+
...opts,
|
|
173
|
+
});
|
|
174
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
class ValidationException extends IAMToolboxServiceException {
|
|
178
|
+
name = "ValidationException";
|
|
179
|
+
$fault = "client";
|
|
180
|
+
constructor(opts) {
|
|
181
|
+
super({
|
|
182
|
+
name: "ValidationException",
|
|
183
|
+
$fault: "client",
|
|
184
|
+
...opts,
|
|
185
|
+
});
|
|
186
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const _ADE = "AccessDeniedException";
|
|
191
|
+
const _AT = "AttachedTo";
|
|
192
|
+
const _ATL = "AttachedToList";
|
|
193
|
+
const _E = "Evaluation";
|
|
194
|
+
const _Ev = "Evaluations";
|
|
195
|
+
const _GRAD = "GetRequestAuthorizationDetails";
|
|
196
|
+
const _GRADI = "GetRequestAuthorizationDetailsInput";
|
|
197
|
+
const _GRADO = "GetRequestAuthorizationDetailsOutput";
|
|
198
|
+
const _ISE = "InternalServerException";
|
|
199
|
+
const _MP = "MatchedPolicy";
|
|
200
|
+
const _MPL = "MatchedPolicyList";
|
|
201
|
+
const _MS = "MatchedStatement";
|
|
202
|
+
const _MSL = "MatchedStatementList";
|
|
203
|
+
const _PI = "PolicyInfo";
|
|
204
|
+
const _PIL = "PolicyInfoList";
|
|
205
|
+
const _RNFE = "ResourceNotFoundException";
|
|
206
|
+
const _VE = "ValidationException";
|
|
207
|
+
const _a = "arn";
|
|
208
|
+
const _aI = "authorizationId";
|
|
209
|
+
const _aT = "attachedTo";
|
|
210
|
+
const _ac = "action";
|
|
211
|
+
const _c = "client";
|
|
212
|
+
const _co = "context";
|
|
213
|
+
const _e = "error";
|
|
214
|
+
const _eE = "evaluatedEffect";
|
|
215
|
+
const _ev = "evaluations";
|
|
216
|
+
const _h = "http";
|
|
217
|
+
const _hE = "httpError";
|
|
218
|
+
const _hQ = "httpQuery";
|
|
219
|
+
const _i = "inline";
|
|
220
|
+
const _m = "message";
|
|
221
|
+
const _mP = "matchedPolicies";
|
|
222
|
+
const _mS = "matchedStatements";
|
|
223
|
+
const _nT = "nextToken";
|
|
224
|
+
const _p = "policies";
|
|
225
|
+
const _r = "resource";
|
|
226
|
+
const _rC = "requestContext";
|
|
227
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.iamtoolbox";
|
|
228
|
+
const _se = "server";
|
|
229
|
+
const _si = "sid";
|
|
230
|
+
const _t = "type";
|
|
231
|
+
const _u = "uri";
|
|
232
|
+
const n0 = "com.amazonaws.iamtoolbox";
|
|
233
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
234
|
+
var IAMToolboxServiceException$ = [-3, _s, "IAMToolboxServiceException", 0, [], []];
|
|
235
|
+
_s_registry.registerError(IAMToolboxServiceException$, IAMToolboxServiceException);
|
|
236
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
237
|
+
var AccessDeniedException$ = [-3, n0, _ADE,
|
|
238
|
+
{ [_e]: _c, [_hE]: 403 },
|
|
239
|
+
[_m],
|
|
240
|
+
[0], 1
|
|
241
|
+
];
|
|
242
|
+
n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
|
|
243
|
+
var InternalServerException$ = [-3, n0, _ISE,
|
|
244
|
+
{ [_e]: _se, [_hE]: 500 },
|
|
245
|
+
[_m],
|
|
246
|
+
[0], 1
|
|
247
|
+
];
|
|
248
|
+
n0_registry.registerError(InternalServerException$, InternalServerException);
|
|
249
|
+
var ResourceNotFoundException$ = [-3, n0, _RNFE,
|
|
250
|
+
{ [_e]: _c, [_hE]: 404 },
|
|
251
|
+
[_m],
|
|
252
|
+
[0], 1
|
|
253
|
+
];
|
|
254
|
+
n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
|
|
255
|
+
var ValidationException$ = [-3, n0, _VE,
|
|
256
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
257
|
+
[_m],
|
|
258
|
+
[0], 1
|
|
259
|
+
];
|
|
260
|
+
n0_registry.registerError(ValidationException$, ValidationException);
|
|
261
|
+
const errorTypeRegistries = [
|
|
262
|
+
_s_registry,
|
|
263
|
+
n0_registry,
|
|
264
|
+
];
|
|
265
|
+
var AttachedTo$ = [3, n0, _AT,
|
|
266
|
+
0,
|
|
267
|
+
[_a],
|
|
268
|
+
[0]
|
|
269
|
+
];
|
|
270
|
+
var Evaluation$ = [3, n0, _E,
|
|
271
|
+
0,
|
|
272
|
+
[_ac, _r, _co, _eE, _mP],
|
|
273
|
+
[0, 0, 128 | 15, 0, () => MatchedPolicyList], 2
|
|
274
|
+
];
|
|
275
|
+
var GetRequestAuthorizationDetailsInput$ = [3, n0, _GRADI,
|
|
276
|
+
0,
|
|
277
|
+
[_aI, _nT],
|
|
278
|
+
[[0, 1], [0, { [_hQ]: _nT }]], 1
|
|
279
|
+
];
|
|
280
|
+
var GetRequestAuthorizationDetailsOutput$ = [3, n0, _GRADO,
|
|
281
|
+
0,
|
|
282
|
+
[_rC, _ev, _p, _nT],
|
|
283
|
+
[128 | 15, () => Evaluations, () => PolicyInfoList, 0], 3
|
|
284
|
+
];
|
|
285
|
+
var MatchedPolicy$ = [3, n0, _MP,
|
|
286
|
+
0,
|
|
287
|
+
[_u, _mS],
|
|
288
|
+
[0, () => MatchedStatementList], 1
|
|
289
|
+
];
|
|
290
|
+
var MatchedStatement$ = [3, n0, _MS,
|
|
291
|
+
0,
|
|
292
|
+
[_si, _eE],
|
|
293
|
+
[0, 0]
|
|
294
|
+
];
|
|
295
|
+
var PolicyInfo$ = [3, n0, _PI,
|
|
296
|
+
0,
|
|
297
|
+
[_t, _i, _u, _aT],
|
|
298
|
+
[0, 2, 0, () => AttachedToList]
|
|
299
|
+
];
|
|
300
|
+
var AttachedToList = [1, n0, _ATL,
|
|
301
|
+
0, () => AttachedTo$
|
|
302
|
+
];
|
|
303
|
+
var Evaluations = [1, n0, _Ev,
|
|
304
|
+
0, () => Evaluation$
|
|
305
|
+
];
|
|
306
|
+
var MatchedPolicyList = [1, n0, _MPL,
|
|
307
|
+
0, () => MatchedPolicy$
|
|
308
|
+
];
|
|
309
|
+
var MatchedStatementList = [1, n0, _MSL,
|
|
310
|
+
0, () => MatchedStatement$
|
|
311
|
+
];
|
|
312
|
+
var PolicyInfoList = [1, n0, _PIL,
|
|
313
|
+
0, () => PolicyInfo$
|
|
314
|
+
];
|
|
315
|
+
var GetRequestAuthorizationDetails$ = [9, n0, _GRAD,
|
|
316
|
+
{ [_h]: ["GET", "/authorization-details/{authorizationId}", 200] }, () => GetRequestAuthorizationDetailsInput$, () => GetRequestAuthorizationDetailsOutput$
|
|
317
|
+
];
|
|
318
|
+
|
|
319
|
+
const getRuntimeConfig$1 = (config) => {
|
|
320
|
+
return {
|
|
321
|
+
apiVersion: "2018-05-10",
|
|
322
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
323
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
324
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
325
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
326
|
+
extensions: config?.extensions ?? [],
|
|
327
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultIAMToolboxHttpAuthSchemeProvider,
|
|
328
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
329
|
+
{
|
|
330
|
+
schemeId: "aws.auth#sigv4",
|
|
331
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
332
|
+
signer: new AwsSdkSigV4Signer(),
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
336
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
337
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
338
|
+
defaultNamespace: "com.amazonaws.iamtoolbox",
|
|
339
|
+
errorTypeRegistries,
|
|
340
|
+
version: "2018-05-10",
|
|
341
|
+
serviceTarget: "AuthRequestService",
|
|
342
|
+
},
|
|
343
|
+
serviceId: config?.serviceId ?? "IAM Toolbox",
|
|
344
|
+
sha256: config?.sha256 ?? Sha256,
|
|
345
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
346
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
347
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
const getRuntimeConfig = (config) => {
|
|
352
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
353
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
354
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
355
|
+
const clientSharedValues = getRuntimeConfig$1(config);
|
|
356
|
+
emitWarningIfUnsupportedVersion$1(process.version);
|
|
357
|
+
const loaderConfig = {
|
|
358
|
+
profile: config?.profile,
|
|
359
|
+
logger: clientSharedValues.logger,
|
|
360
|
+
};
|
|
361
|
+
return {
|
|
362
|
+
...clientSharedValues,
|
|
363
|
+
...config,
|
|
364
|
+
runtime: "node",
|
|
365
|
+
defaultsMode,
|
|
366
|
+
authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
367
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
368
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider,
|
|
369
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
370
|
+
maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
371
|
+
region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
372
|
+
requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
373
|
+
retryMode: config?.retryMode ??
|
|
374
|
+
loadConfig({
|
|
375
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
376
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
377
|
+
}, config),
|
|
378
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
379
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
380
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
381
|
+
userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
386
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
387
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
388
|
+
let _credentials = runtimeConfig.credentials;
|
|
389
|
+
return {
|
|
390
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
391
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
392
|
+
if (index === -1) {
|
|
393
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
httpAuthSchemes() {
|
|
400
|
+
return _httpAuthSchemes;
|
|
401
|
+
},
|
|
402
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
403
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
404
|
+
},
|
|
405
|
+
httpAuthSchemeProvider() {
|
|
406
|
+
return _httpAuthSchemeProvider;
|
|
407
|
+
},
|
|
408
|
+
setCredentials(credentials) {
|
|
409
|
+
_credentials = credentials;
|
|
410
|
+
},
|
|
411
|
+
credentials() {
|
|
412
|
+
return _credentials;
|
|
413
|
+
},
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
417
|
+
return {
|
|
418
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
419
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
420
|
+
credentials: config.credentials(),
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
425
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
426
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
427
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
class IAMToolboxClient extends Client {
|
|
431
|
+
config;
|
|
432
|
+
constructor(...[configuration]) {
|
|
433
|
+
const _config_0 = getRuntimeConfig(configuration || {});
|
|
434
|
+
super(_config_0);
|
|
435
|
+
this.initConfig = _config_0;
|
|
436
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
437
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
438
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
439
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
|
440
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
441
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
|
442
|
+
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
443
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
444
|
+
this.config = _config_8;
|
|
445
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
446
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
447
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
448
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
449
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
450
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
451
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
452
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
453
|
+
httpAuthSchemeParametersProvider: defaultIAMToolboxHttpAuthSchemeParametersProvider,
|
|
454
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
455
|
+
"aws.auth#sigv4": config.credentials,
|
|
456
|
+
}),
|
|
457
|
+
}));
|
|
458
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
459
|
+
}
|
|
460
|
+
destroy() {
|
|
461
|
+
super.destroy();
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
const command = makeBuilder(commonParams, "AuthRequestService", "IAMToolboxClient", getEndpointPlugin);
|
|
466
|
+
const _ep0 = {};
|
|
467
|
+
const _mw0 = (Command, cs, config, o) => [];
|
|
468
|
+
|
|
469
|
+
class GetRequestAuthorizationDetailsCommand extends command(_ep0, _mw0, "GetRequestAuthorizationDetails", GetRequestAuthorizationDetails$) {
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
const paginateGetRequestAuthorizationDetails = createPaginator(IAMToolboxClient, GetRequestAuthorizationDetailsCommand, "nextToken", "nextToken", "");
|
|
473
|
+
|
|
474
|
+
const commands = {
|
|
475
|
+
GetRequestAuthorizationDetailsCommand,
|
|
476
|
+
};
|
|
477
|
+
const paginators = {
|
|
478
|
+
paginateGetRequestAuthorizationDetails,
|
|
479
|
+
};
|
|
480
|
+
class IAMToolbox extends IAMToolboxClient {
|
|
481
|
+
}
|
|
482
|
+
createAggregatedClient(commands, IAMToolbox, { paginators });
|
|
483
|
+
|
|
484
|
+
const EvaluatedEffect = {
|
|
485
|
+
ALLOW: "ALLOW",
|
|
486
|
+
EXPLICIT_DENY: "EXPLICIT_DENY",
|
|
487
|
+
IMPLICIT_DENY: "IMPLICIT_DENY",
|
|
488
|
+
};
|
|
489
|
+
const StatementEffect = {
|
|
490
|
+
ALLOW: "ALLOW",
|
|
491
|
+
DENY: "DENY",
|
|
492
|
+
};
|
|
493
|
+
const PolicyType = {
|
|
494
|
+
IDENTITY_BASED_POLICY: "IDENTITY_BASED_POLICY",
|
|
495
|
+
PERMISSIONS_BOUNDARY: "PERMISSIONS_BOUNDARY",
|
|
496
|
+
RESOURCE_BASED_POLICY: "RESOURCE_BASED_POLICY",
|
|
497
|
+
RESOURCE_CONTROL_POLICY: "RESOURCE_CONTROL_POLICY",
|
|
498
|
+
SERVICE_CONTROL_POLICY: "SERVICE_CONTROL_POLICY",
|
|
499
|
+
SESSION_POLICY: "SESSION_POLICY",
|
|
500
|
+
VPC_ENDPOINT_POLICY: "VPC_ENDPOINT_POLICY",
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
504
|
+
exports.AccessDeniedException$ = AccessDeniedException$;
|
|
505
|
+
exports.AttachedTo$ = AttachedTo$;
|
|
506
|
+
exports.EvaluatedEffect = EvaluatedEffect;
|
|
507
|
+
exports.Evaluation$ = Evaluation$;
|
|
508
|
+
exports.GetRequestAuthorizationDetails$ = GetRequestAuthorizationDetails$;
|
|
509
|
+
exports.GetRequestAuthorizationDetailsCommand = GetRequestAuthorizationDetailsCommand;
|
|
510
|
+
exports.GetRequestAuthorizationDetailsInput$ = GetRequestAuthorizationDetailsInput$;
|
|
511
|
+
exports.GetRequestAuthorizationDetailsOutput$ = GetRequestAuthorizationDetailsOutput$;
|
|
512
|
+
exports.IAMToolbox = IAMToolbox;
|
|
513
|
+
exports.IAMToolboxClient = IAMToolboxClient;
|
|
514
|
+
exports.IAMToolboxServiceException = IAMToolboxServiceException;
|
|
515
|
+
exports.IAMToolboxServiceException$ = IAMToolboxServiceException$;
|
|
516
|
+
exports.InternalServerException = InternalServerException;
|
|
517
|
+
exports.InternalServerException$ = InternalServerException$;
|
|
518
|
+
exports.MatchedPolicy$ = MatchedPolicy$;
|
|
519
|
+
exports.MatchedStatement$ = MatchedStatement$;
|
|
520
|
+
exports.PolicyInfo$ = PolicyInfo$;
|
|
521
|
+
exports.PolicyType = PolicyType;
|
|
522
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
523
|
+
exports.ResourceNotFoundException$ = ResourceNotFoundException$;
|
|
524
|
+
exports.StatementEffect = StatementEffect;
|
|
525
|
+
exports.ValidationException = ValidationException;
|
|
526
|
+
exports.ValidationException$ = ValidationException$;
|
|
527
|
+
exports.errorTypeRegistries = errorTypeRegistries;
|
|
528
|
+
exports.paginateGetRequestAuthorizationDetails = paginateGetRequestAuthorizationDetails;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createAggregatedClient } from "@smithy/core/client";
|
|
2
|
+
import { GetRequestAuthorizationDetailsCommand, } from "./commands/GetRequestAuthorizationDetailsCommand";
|
|
3
|
+
import { IAMToolboxClient } from "./IAMToolboxClient";
|
|
4
|
+
import { paginateGetRequestAuthorizationDetails } from "./pagination/GetRequestAuthorizationDetailsPaginator";
|
|
5
|
+
const commands = {
|
|
6
|
+
GetRequestAuthorizationDetailsCommand,
|
|
7
|
+
};
|
|
8
|
+
const paginators = {
|
|
9
|
+
paginateGetRequestAuthorizationDetails,
|
|
10
|
+
};
|
|
11
|
+
export class IAMToolbox extends IAMToolboxClient {
|
|
12
|
+
}
|
|
13
|
+
createAggregatedClient(commands, IAMToolbox, { paginators });
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getUserAgentPlugin, resolveHostHeaderConfig, resolveUserAgentConfig, } from "@aws-sdk/core/client";
|
|
2
|
+
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
3
|
+
import { Client as __Client, } from "@smithy/core/client";
|
|
4
|
+
import { resolveRegionConfig } from "@smithy/core/config";
|
|
5
|
+
import { resolveEndpointConfig } from "@smithy/core/endpoints";
|
|
6
|
+
import { getContentLengthPlugin } from "@smithy/core/protocols";
|
|
7
|
+
import { getRetryPlugin, resolveRetryConfig, } from "@smithy/core/retry";
|
|
8
|
+
import { getSchemaSerdePlugin } from "@smithy/core/schema";
|
|
9
|
+
import { defaultIAMToolboxHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
|
|
10
|
+
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
|
11
|
+
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
12
|
+
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
|
13
|
+
export { __Client };
|
|
14
|
+
export class IAMToolboxClient extends __Client {
|
|
15
|
+
config;
|
|
16
|
+
constructor(...[configuration]) {
|
|
17
|
+
const _config_0 = __getRuntimeConfig(configuration || {});
|
|
18
|
+
super(_config_0);
|
|
19
|
+
this.initConfig = _config_0;
|
|
20
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
21
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
22
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
23
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
|
24
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
25
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
|
26
|
+
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
27
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
28
|
+
this.config = _config_8;
|
|
29
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
30
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
31
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
32
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
33
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
34
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
35
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
36
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
37
|
+
httpAuthSchemeParametersProvider: defaultIAMToolboxHttpAuthSchemeParametersProvider,
|
|
38
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
39
|
+
"aws.auth#sigv4": config.credentials,
|
|
40
|
+
}),
|
|
41
|
+
}));
|
|
42
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
43
|
+
}
|
|
44
|
+
destroy() {
|
|
45
|
+
super.destroy();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
2
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
3
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
4
|
+
let _credentials = runtimeConfig.credentials;
|
|
5
|
+
return {
|
|
6
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
7
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
8
|
+
if (index === -1) {
|
|
9
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
httpAuthSchemes() {
|
|
16
|
+
return _httpAuthSchemes;
|
|
17
|
+
},
|
|
18
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
19
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
20
|
+
},
|
|
21
|
+
httpAuthSchemeProvider() {
|
|
22
|
+
return _httpAuthSchemeProvider;
|
|
23
|
+
},
|
|
24
|
+
setCredentials(credentials) {
|
|
25
|
+
_credentials = credentials;
|
|
26
|
+
},
|
|
27
|
+
credentials() {
|
|
28
|
+
return _credentials;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export const resolveHttpAuthRuntimeConfig = (config) => {
|
|
33
|
+
return {
|
|
34
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
35
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
36
|
+
credentials: config.credentials(),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core/httpAuthSchemes";
|
|
2
|
+
import { getSmithyContext, normalizeProvider } from "@smithy/core/client";
|
|
3
|
+
export const defaultIAMToolboxHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
4
|
+
return {
|
|
5
|
+
operation: getSmithyContext(context).operation,
|
|
6
|
+
region: await normalizeProvider(config.region)() || (() => {
|
|
7
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
8
|
+
})(),
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
12
|
+
return {
|
|
13
|
+
schemeId: "aws.auth#sigv4",
|
|
14
|
+
signingProperties: {
|
|
15
|
+
name: "iam",
|
|
16
|
+
region: authParameters.region,
|
|
17
|
+
},
|
|
18
|
+
propertiesExtractor: (config, context) => ({
|
|
19
|
+
signingProperties: {
|
|
20
|
+
config,
|
|
21
|
+
context,
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export const defaultIAMToolboxHttpAuthSchemeProvider = (authParameters) => {
|
|
27
|
+
const options = [];
|
|
28
|
+
switch (authParameters.operation) {
|
|
29
|
+
default: {
|
|
30
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return options;
|
|
34
|
+
};
|
|
35
|
+
export const resolveHttpAuthSchemeConfig = (config) => {
|
|
36
|
+
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
37
|
+
return Object.assign(config_0, {
|
|
38
|
+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
39
|
+
});
|
|
40
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { makeBuilder } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "./endpoint/EndpointParameters";
|
|
4
|
+
export const command = makeBuilder(commonParams, "AuthRequestService", "IAMToolboxClient", getEndpointPlugin);
|
|
5
|
+
export const _ep0 = {};
|
|
6
|
+
export const _mw0 = (Command, cs, config, o) => [];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { _ep0, _mw0, command } from "../commandBuilder";
|
|
2
|
+
import { GetRequestAuthorizationDetails$ } from "../schemas/schemas_0";
|
|
3
|
+
export class GetRequestAuthorizationDetailsCommand extends command(_ep0, _mw0, "GetRequestAuthorizationDetails", GetRequestAuthorizationDetails$) {
|
|
4
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GetRequestAuthorizationDetailsCommand";
|