@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,13 @@
|
|
|
1
|
+
export const resolveClientEndpointParameters = (options) => {
|
|
2
|
+
return Object.assign(options, {
|
|
3
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
4
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
5
|
+
defaultSigningName: "iam",
|
|
6
|
+
});
|
|
7
|
+
};
|
|
8
|
+
export const commonParams = {
|
|
9
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
10
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
11
|
+
Region: { type: "builtInParams", name: "region" },
|
|
12
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
13
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BinaryDecisionDiagram } from "@smithy/core/endpoints";
|
|
2
|
+
const k = "ref";
|
|
3
|
+
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = {}, j = [{ [k]: "Region" }];
|
|
4
|
+
const _data = {
|
|
5
|
+
conditions: [
|
|
6
|
+
[c, [g]],
|
|
7
|
+
[c, j],
|
|
8
|
+
["aws.partition", j, d],
|
|
9
|
+
[e, [{ [k]: "UseFIPS" }, b]],
|
|
10
|
+
[e, [{ [k]: "UseDualStack" }, b]],
|
|
11
|
+
[e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
|
|
12
|
+
[e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]]
|
|
13
|
+
],
|
|
14
|
+
results: [
|
|
15
|
+
[a],
|
|
16
|
+
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
17
|
+
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
18
|
+
[g, i],
|
|
19
|
+
["https://iam-toolbox-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
20
|
+
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
21
|
+
["https://iam-toolbox-fips.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
22
|
+
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
23
|
+
["https://iam-toolbox.{Region}.{PartitionResult#dualStackDnsSuffix}", i],
|
|
24
|
+
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
25
|
+
["https://iam-toolbox.{Region}.{PartitionResult#dnsSuffix}", i],
|
|
26
|
+
[a, "Invalid Configuration: Missing Region"]
|
|
27
|
+
]
|
|
28
|
+
};
|
|
29
|
+
const root = 2;
|
|
30
|
+
const r = 100_000_000;
|
|
31
|
+
const nodes = new Int32Array([
|
|
32
|
+
-1, 1, -1,
|
|
33
|
+
0, 12, 3,
|
|
34
|
+
1, 4, r + 11,
|
|
35
|
+
2, 5, r + 11,
|
|
36
|
+
3, 8, 6,
|
|
37
|
+
4, 7, r + 10,
|
|
38
|
+
5, r + 8, r + 9,
|
|
39
|
+
4, 10, 9,
|
|
40
|
+
6, r + 6, r + 7,
|
|
41
|
+
5, 11, r + 5,
|
|
42
|
+
6, r + 4, r + 5,
|
|
43
|
+
3, r + 1, 13,
|
|
44
|
+
4, r + 2, r + 3,
|
|
45
|
+
]);
|
|
46
|
+
export const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { awsEndpointFunctions } from "@aws-sdk/core/client";
|
|
2
|
+
import { customEndpointFunctions, decideEndpoint, EndpointCache } from "@smithy/core/endpoints";
|
|
3
|
+
import { bdd } from "./bdd";
|
|
4
|
+
const cache = new EndpointCache({
|
|
5
|
+
size: 50,
|
|
6
|
+
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
7
|
+
});
|
|
8
|
+
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
10
|
+
endpointParams: endpointParams,
|
|
11
|
+
logger: context.logger,
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./IAMToolboxClient";
|
|
2
|
+
export * from "./IAMToolbox";
|
|
3
|
+
export * from "./commands";
|
|
4
|
+
export { Command as $Command } from "@smithy/core/client";
|
|
5
|
+
export * from "./pagination";
|
|
6
|
+
export * from "./schemas/schemas_0";
|
|
7
|
+
export * from "./models/enums";
|
|
8
|
+
export * from "./models/errors";
|
|
9
|
+
export * from "./models/models_0";
|
|
10
|
+
export { IAMToolboxServiceException } from "./models/IAMToolboxServiceException";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/core/client";
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class IAMToolboxServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, IAMToolboxServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const EvaluatedEffect = {
|
|
2
|
+
ALLOW: "ALLOW",
|
|
3
|
+
EXPLICIT_DENY: "EXPLICIT_DENY",
|
|
4
|
+
IMPLICIT_DENY: "IMPLICIT_DENY",
|
|
5
|
+
};
|
|
6
|
+
export const StatementEffect = {
|
|
7
|
+
ALLOW: "ALLOW",
|
|
8
|
+
DENY: "DENY",
|
|
9
|
+
};
|
|
10
|
+
export const PolicyType = {
|
|
11
|
+
IDENTITY_BASED_POLICY: "IDENTITY_BASED_POLICY",
|
|
12
|
+
PERMISSIONS_BOUNDARY: "PERMISSIONS_BOUNDARY",
|
|
13
|
+
RESOURCE_BASED_POLICY: "RESOURCE_BASED_POLICY",
|
|
14
|
+
RESOURCE_CONTROL_POLICY: "RESOURCE_CONTROL_POLICY",
|
|
15
|
+
SERVICE_CONTROL_POLICY: "SERVICE_CONTROL_POLICY",
|
|
16
|
+
SESSION_POLICY: "SESSION_POLICY",
|
|
17
|
+
VPC_ENDPOINT_POLICY: "VPC_ENDPOINT_POLICY",
|
|
18
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { IAMToolboxServiceException as __BaseException } from "./IAMToolboxServiceException";
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
name = "AccessDeniedException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "AccessDeniedException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class InternalServerException extends __BaseException {
|
|
15
|
+
name = "InternalServerException";
|
|
16
|
+
$fault = "server";
|
|
17
|
+
constructor(opts) {
|
|
18
|
+
super({
|
|
19
|
+
name: "InternalServerException",
|
|
20
|
+
$fault: "server",
|
|
21
|
+
...opts,
|
|
22
|
+
});
|
|
23
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
27
|
+
name = "ResourceNotFoundException";
|
|
28
|
+
$fault = "client";
|
|
29
|
+
constructor(opts) {
|
|
30
|
+
super({
|
|
31
|
+
name: "ResourceNotFoundException",
|
|
32
|
+
$fault: "client",
|
|
33
|
+
...opts,
|
|
34
|
+
});
|
|
35
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export class ValidationException extends __BaseException {
|
|
39
|
+
name = "ValidationException";
|
|
40
|
+
$fault = "client";
|
|
41
|
+
constructor(opts) {
|
|
42
|
+
super({
|
|
43
|
+
name: "ValidationException",
|
|
44
|
+
$fault: "client",
|
|
45
|
+
...opts,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { GetRequestAuthorizationDetailsCommand, } from "../commands/GetRequestAuthorizationDetailsCommand";
|
|
3
|
+
import { IAMToolboxClient } from "../IAMToolboxClient";
|
|
4
|
+
export const paginateGetRequestAuthorizationDetails = createPaginator(IAMToolboxClient, GetRequestAuthorizationDetailsCommand, "nextToken", "nextToken", "");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
|
|
3
|
+
import { invalidProvider, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig, } from "@smithy/core/config";
|
|
5
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/core/retry";
|
|
6
|
+
import { calculateBodyLength } from "@smithy/core/serde";
|
|
7
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
8
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
9
|
+
export const getRuntimeConfig = (config) => {
|
|
10
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
11
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
12
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
13
|
+
return {
|
|
14
|
+
...clientSharedValues,
|
|
15
|
+
...config,
|
|
16
|
+
runtime: "browser",
|
|
17
|
+
defaultsMode,
|
|
18
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
19
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
20
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
21
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
22
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
23
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
24
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
25
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
26
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
27
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS, } from "@aws-sdk/core/client";
|
|
3
|
+
import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core/httpAuthSchemes";
|
|
4
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
5
|
+
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
6
|
+
import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
|
|
7
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
|
|
8
|
+
import { calculateBodyLength } from "@smithy/core/serde";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
10
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
11
|
+
export const getRuntimeConfig = (config) => {
|
|
12
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
awsCheckVersion(process.version);
|
|
17
|
+
const loaderConfig = {
|
|
18
|
+
profile: config?.profile,
|
|
19
|
+
logger: clientSharedValues.logger,
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
...clientSharedValues,
|
|
23
|
+
...config,
|
|
24
|
+
runtime: "node",
|
|
25
|
+
defaultsMode,
|
|
26
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
27
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
28
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
29
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
30
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
31
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
32
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
33
|
+
retryMode: config?.retryMode ??
|
|
34
|
+
loadNodeConfig({
|
|
35
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
36
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
37
|
+
}, config),
|
|
38
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
39
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
40
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
41
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
2
|
+
export const getRuntimeConfig = (config) => {
|
|
3
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
4
|
+
return {
|
|
5
|
+
...browserDefaults,
|
|
6
|
+
...config,
|
|
7
|
+
runtime: "react-native",
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
|
|
2
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
3
|
+
import { Sha256 } from "@smithy/core/checksum";
|
|
4
|
+
import { NoOpLogger } from "@smithy/core/client";
|
|
5
|
+
import { parseUrl } from "@smithy/core/protocols";
|
|
6
|
+
import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
|
|
7
|
+
import { defaultIAMToolboxHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
8
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
9
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
10
|
+
export const getRuntimeConfig = (config) => {
|
|
11
|
+
return {
|
|
12
|
+
apiVersion: "2018-05-10",
|
|
13
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
14
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
15
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
16
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
17
|
+
extensions: config?.extensions ?? [],
|
|
18
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultIAMToolboxHttpAuthSchemeProvider,
|
|
19
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
20
|
+
{
|
|
21
|
+
schemeId: "aws.auth#sigv4",
|
|
22
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
23
|
+
signer: new AwsSdkSigV4Signer(),
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
27
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
28
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
29
|
+
defaultNamespace: "com.amazonaws.iamtoolbox",
|
|
30
|
+
errorTypeRegistries,
|
|
31
|
+
version: "2018-05-10",
|
|
32
|
+
serviceTarget: "AuthRequestService",
|
|
33
|
+
},
|
|
34
|
+
serviceId: config?.serviceId ?? "IAM Toolbox",
|
|
35
|
+
sha256: config?.sha256 ?? Sha256,
|
|
36
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
37
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
38
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration } from "@aws-sdk/core/client";
|
|
2
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/core/client";
|
|
3
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/core/protocols";
|
|
4
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
7
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
8
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
9
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
const _ADE = "AccessDeniedException";
|
|
2
|
+
const _AT = "AttachedTo";
|
|
3
|
+
const _ATL = "AttachedToList";
|
|
4
|
+
const _E = "Evaluation";
|
|
5
|
+
const _Ev = "Evaluations";
|
|
6
|
+
const _GRAD = "GetRequestAuthorizationDetails";
|
|
7
|
+
const _GRADI = "GetRequestAuthorizationDetailsInput";
|
|
8
|
+
const _GRADO = "GetRequestAuthorizationDetailsOutput";
|
|
9
|
+
const _ISE = "InternalServerException";
|
|
10
|
+
const _MP = "MatchedPolicy";
|
|
11
|
+
const _MPL = "MatchedPolicyList";
|
|
12
|
+
const _MS = "MatchedStatement";
|
|
13
|
+
const _MSL = "MatchedStatementList";
|
|
14
|
+
const _PI = "PolicyInfo";
|
|
15
|
+
const _PIL = "PolicyInfoList";
|
|
16
|
+
const _RNFE = "ResourceNotFoundException";
|
|
17
|
+
const _VE = "ValidationException";
|
|
18
|
+
const _a = "arn";
|
|
19
|
+
const _aI = "authorizationId";
|
|
20
|
+
const _aT = "attachedTo";
|
|
21
|
+
const _ac = "action";
|
|
22
|
+
const _c = "client";
|
|
23
|
+
const _co = "context";
|
|
24
|
+
const _e = "error";
|
|
25
|
+
const _eE = "evaluatedEffect";
|
|
26
|
+
const _ev = "evaluations";
|
|
27
|
+
const _h = "http";
|
|
28
|
+
const _hE = "httpError";
|
|
29
|
+
const _hQ = "httpQuery";
|
|
30
|
+
const _i = "inline";
|
|
31
|
+
const _m = "message";
|
|
32
|
+
const _mP = "matchedPolicies";
|
|
33
|
+
const _mS = "matchedStatements";
|
|
34
|
+
const _nT = "nextToken";
|
|
35
|
+
const _p = "policies";
|
|
36
|
+
const _r = "resource";
|
|
37
|
+
const _rC = "requestContext";
|
|
38
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.iamtoolbox";
|
|
39
|
+
const _se = "server";
|
|
40
|
+
const _si = "sid";
|
|
41
|
+
const _t = "type";
|
|
42
|
+
const _u = "uri";
|
|
43
|
+
const n0 = "com.amazonaws.iamtoolbox";
|
|
44
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
45
|
+
import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/errors";
|
|
46
|
+
import { IAMToolboxServiceException } from "../models/IAMToolboxServiceException";
|
|
47
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
48
|
+
export var IAMToolboxServiceException$ = [-3, _s, "IAMToolboxServiceException", 0, [], []];
|
|
49
|
+
_s_registry.registerError(IAMToolboxServiceException$, IAMToolboxServiceException);
|
|
50
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
51
|
+
export var AccessDeniedException$ = [-3, n0, _ADE,
|
|
52
|
+
{ [_e]: _c, [_hE]: 403 },
|
|
53
|
+
[_m],
|
|
54
|
+
[0], 1
|
|
55
|
+
];
|
|
56
|
+
n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
|
|
57
|
+
export var InternalServerException$ = [-3, n0, _ISE,
|
|
58
|
+
{ [_e]: _se, [_hE]: 500 },
|
|
59
|
+
[_m],
|
|
60
|
+
[0], 1
|
|
61
|
+
];
|
|
62
|
+
n0_registry.registerError(InternalServerException$, InternalServerException);
|
|
63
|
+
export var ResourceNotFoundException$ = [-3, n0, _RNFE,
|
|
64
|
+
{ [_e]: _c, [_hE]: 404 },
|
|
65
|
+
[_m],
|
|
66
|
+
[0], 1
|
|
67
|
+
];
|
|
68
|
+
n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
|
|
69
|
+
export var ValidationException$ = [-3, n0, _VE,
|
|
70
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
71
|
+
[_m],
|
|
72
|
+
[0], 1
|
|
73
|
+
];
|
|
74
|
+
n0_registry.registerError(ValidationException$, ValidationException);
|
|
75
|
+
export const errorTypeRegistries = [
|
|
76
|
+
_s_registry,
|
|
77
|
+
n0_registry,
|
|
78
|
+
];
|
|
79
|
+
export var AttachedTo$ = [3, n0, _AT,
|
|
80
|
+
0,
|
|
81
|
+
[_a],
|
|
82
|
+
[0]
|
|
83
|
+
];
|
|
84
|
+
export var Evaluation$ = [3, n0, _E,
|
|
85
|
+
0,
|
|
86
|
+
[_ac, _r, _co, _eE, _mP],
|
|
87
|
+
[0, 0, 128 | 15, 0, () => MatchedPolicyList], 2
|
|
88
|
+
];
|
|
89
|
+
export var GetRequestAuthorizationDetailsInput$ = [3, n0, _GRADI,
|
|
90
|
+
0,
|
|
91
|
+
[_aI, _nT],
|
|
92
|
+
[[0, 1], [0, { [_hQ]: _nT }]], 1
|
|
93
|
+
];
|
|
94
|
+
export var GetRequestAuthorizationDetailsOutput$ = [3, n0, _GRADO,
|
|
95
|
+
0,
|
|
96
|
+
[_rC, _ev, _p, _nT],
|
|
97
|
+
[128 | 15, () => Evaluations, () => PolicyInfoList, 0], 3
|
|
98
|
+
];
|
|
99
|
+
export var MatchedPolicy$ = [3, n0, _MP,
|
|
100
|
+
0,
|
|
101
|
+
[_u, _mS],
|
|
102
|
+
[0, () => MatchedStatementList], 1
|
|
103
|
+
];
|
|
104
|
+
export var MatchedStatement$ = [3, n0, _MS,
|
|
105
|
+
0,
|
|
106
|
+
[_si, _eE],
|
|
107
|
+
[0, 0]
|
|
108
|
+
];
|
|
109
|
+
export var PolicyInfo$ = [3, n0, _PI,
|
|
110
|
+
0,
|
|
111
|
+
[_t, _i, _u, _aT],
|
|
112
|
+
[0, 2, 0, () => AttachedToList]
|
|
113
|
+
];
|
|
114
|
+
var AttachedToList = [1, n0, _ATL,
|
|
115
|
+
0, () => AttachedTo$
|
|
116
|
+
];
|
|
117
|
+
var Evaluations = [1, n0, _Ev,
|
|
118
|
+
0, () => Evaluation$
|
|
119
|
+
];
|
|
120
|
+
var MatchedPolicyList = [1, n0, _MPL,
|
|
121
|
+
0, () => MatchedPolicy$
|
|
122
|
+
];
|
|
123
|
+
var MatchedStatementList = [1, n0, _MSL,
|
|
124
|
+
0, () => MatchedStatement$
|
|
125
|
+
];
|
|
126
|
+
var PolicyInfoList = [1, n0, _PIL,
|
|
127
|
+
0, () => PolicyInfo$
|
|
128
|
+
];
|
|
129
|
+
var AuthorizationContext = 128 | 15;
|
|
130
|
+
export var GetRequestAuthorizationDetails$ = [9, n0, _GRAD,
|
|
131
|
+
{ [_h]: ["GET", "/authorization-details/{authorizationId}", 200] }, () => GetRequestAuthorizationDetailsInput$, () => GetRequestAuthorizationDetailsOutput$
|
|
132
|
+
];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { HttpHandlerOptions as __HttpHandlerOptions, PaginationConfiguration, Paginator } from "@smithy/types";
|
|
2
|
+
import { type GetRequestAuthorizationDetailsCommandInput, type GetRequestAuthorizationDetailsCommandOutput } from "./commands/GetRequestAuthorizationDetailsCommand";
|
|
3
|
+
import { IAMToolboxClient } from "./IAMToolboxClient";
|
|
4
|
+
export interface IAMToolbox {
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link GetRequestAuthorizationDetailsCommand}
|
|
7
|
+
*/
|
|
8
|
+
getRequestAuthorizationDetails(args: GetRequestAuthorizationDetailsCommandInput, options?: __HttpHandlerOptions): Promise<GetRequestAuthorizationDetailsCommandOutput>;
|
|
9
|
+
getRequestAuthorizationDetails(args: GetRequestAuthorizationDetailsCommandInput, cb: (err: any, data?: GetRequestAuthorizationDetailsCommandOutput) => void): void;
|
|
10
|
+
getRequestAuthorizationDetails(args: GetRequestAuthorizationDetailsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRequestAuthorizationDetailsCommandOutput) => void): void;
|
|
11
|
+
/**
|
|
12
|
+
* @see {@link GetRequestAuthorizationDetailsCommand}
|
|
13
|
+
* @param args - command input.
|
|
14
|
+
* @param paginationConfig - optional pagination config.
|
|
15
|
+
* @returns AsyncIterable of {@link GetRequestAuthorizationDetailsCommandOutput}.
|
|
16
|
+
*/
|
|
17
|
+
paginateGetRequestAuthorizationDetails(args: GetRequestAuthorizationDetailsCommandInput, paginationConfig?: Omit<PaginationConfiguration, "client">): Paginator<GetRequestAuthorizationDetailsCommandOutput>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* <p>Contains APIs to work with AWS Identity and Access Management (IAM).</p>
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export declare class IAMToolbox extends IAMToolboxClient implements IAMToolbox {
|
|
24
|
+
}
|