@aws-sdk/client-mpa 3.831.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 +373 -0
- package/dist-cjs/MPA.js +53 -0
- package/dist-cjs/MPAClient.js +52 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/commands/CancelSessionCommand.js +26 -0
- package/dist-cjs/commands/CreateApprovalTeamCommand.js +27 -0
- package/dist-cjs/commands/CreateIdentitySourceCommand.js +27 -0
- package/dist-cjs/commands/DeleteIdentitySourceCommand.js +26 -0
- package/dist-cjs/commands/DeleteInactiveApprovalTeamVersionCommand.js +26 -0
- package/dist-cjs/commands/GetApprovalTeamCommand.js +27 -0
- package/dist-cjs/commands/GetIdentitySourceCommand.js +26 -0
- package/dist-cjs/commands/GetPolicyVersionCommand.js +27 -0
- package/dist-cjs/commands/GetResourcePolicyCommand.js +27 -0
- package/dist-cjs/commands/GetSessionCommand.js +27 -0
- package/dist-cjs/commands/ListApprovalTeamsCommand.js +27 -0
- package/dist-cjs/commands/ListIdentitySourcesCommand.js +26 -0
- package/dist-cjs/commands/ListPoliciesCommand.js +26 -0
- package/dist-cjs/commands/ListPolicyVersionsCommand.js +26 -0
- package/dist-cjs/commands/ListResourcePoliciesCommand.js +26 -0
- package/dist-cjs/commands/ListSessionsCommand.js +27 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +27 -0
- package/dist-cjs/commands/StartActiveApprovalTeamDeletionCommand.js +26 -0
- package/dist-cjs/commands/TagResourceCommand.js +27 -0
- package/dist-cjs/commands/UntagResourceCommand.js +27 -0
- package/dist-cjs/commands/UpdateApprovalTeamCommand.js +27 -0
- package/dist-cjs/commands/index.js +24 -0
- package/dist-cjs/endpoint/EndpointParameters.js +15 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/MPAServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +354 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListApprovalTeamsPaginator.js +7 -0
- package/dist-cjs/pagination/ListIdentitySourcesPaginator.js +7 -0
- package/dist-cjs/pagination/ListPoliciesPaginator.js +7 -0
- package/dist-cjs/pagination/ListPolicyVersionsPaginator.js +7 -0
- package/dist-cjs/pagination/ListResourcePoliciesPaginator.js +7 -0
- package/dist-cjs/pagination/ListSessionsPaginator.js +7 -0
- package/dist-cjs/pagination/index.js +10 -0
- package/dist-cjs/protocols/Aws_restJson1.js +976 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +56 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +34 -0
- package/dist-cjs/runtimeExtensions.js +13 -0
- package/dist-es/MPA.js +49 -0
- package/dist-es/MPAClient.js +48 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/CancelSessionCommand.js +22 -0
- package/dist-es/commands/CreateApprovalTeamCommand.js +23 -0
- package/dist-es/commands/CreateIdentitySourceCommand.js +23 -0
- package/dist-es/commands/DeleteIdentitySourceCommand.js +22 -0
- package/dist-es/commands/DeleteInactiveApprovalTeamVersionCommand.js +22 -0
- package/dist-es/commands/GetApprovalTeamCommand.js +23 -0
- package/dist-es/commands/GetIdentitySourceCommand.js +22 -0
- package/dist-es/commands/GetPolicyVersionCommand.js +23 -0
- package/dist-es/commands/GetResourcePolicyCommand.js +23 -0
- package/dist-es/commands/GetSessionCommand.js +23 -0
- package/dist-es/commands/ListApprovalTeamsCommand.js +23 -0
- package/dist-es/commands/ListIdentitySourcesCommand.js +22 -0
- package/dist-es/commands/ListPoliciesCommand.js +22 -0
- package/dist-es/commands/ListPolicyVersionsCommand.js +22 -0
- package/dist-es/commands/ListResourcePoliciesCommand.js +22 -0
- package/dist-es/commands/ListSessionsCommand.js +23 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +23 -0
- package/dist-es/commands/StartActiveApprovalTeamDeletionCommand.js +22 -0
- package/dist-es/commands/TagResourceCommand.js +23 -0
- package/dist-es/commands/UntagResourceCommand.js +23 -0
- package/dist-es/commands/UpdateApprovalTeamCommand.js +23 -0
- package/dist-es/commands/index.js +21 -0
- package/dist-es/endpoint/EndpointParameters.js +11 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/MPAServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +327 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListApprovalTeamsPaginator.js +4 -0
- package/dist-es/pagination/ListIdentitySourcesPaginator.js +4 -0
- package/dist-es/pagination/ListPoliciesPaginator.js +4 -0
- package/dist-es/pagination/ListPolicyVersionsPaginator.js +4 -0
- package/dist-es/pagination/ListResourcePoliciesPaginator.js +4 -0
- package/dist-es/pagination/ListSessionsPaginator.js +4 -0
- package/dist-es/pagination/index.js +7 -0
- package/dist-es/protocols/Aws_restJson1.js +931 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +51 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +30 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-types/MPA.d.ts +160 -0
- package/dist-types/MPAClient.d.ts +208 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/CancelSessionCommand.d.ts +88 -0
- package/dist-types/commands/CreateApprovalTeamCommand.d.ts +114 -0
- package/dist-types/commands/CreateIdentitySourceCommand.d.ts +98 -0
- package/dist-types/commands/DeleteIdentitySourceCommand.d.ts +85 -0
- package/dist-types/commands/DeleteInactiveApprovalTeamVersionCommand.d.ts +89 -0
- package/dist-types/commands/GetApprovalTeamCommand.d.ts +139 -0
- package/dist-types/commands/GetIdentitySourceCommand.d.ts +99 -0
- package/dist-types/commands/GetPolicyVersionCommand.d.ts +98 -0
- package/dist-types/commands/GetResourcePolicyCommand.d.ts +93 -0
- package/dist-types/commands/GetSessionCommand.d.ts +123 -0
- package/dist-types/commands/ListApprovalTeamsCommand.d.ts +102 -0
- package/dist-types/commands/ListIdentitySourcesCommand.d.ts +102 -0
- package/dist-types/commands/ListPoliciesCommand.d.ts +93 -0
- package/dist-types/commands/ListPolicyVersionsCommand.d.ts +102 -0
- package/dist-types/commands/ListResourcePoliciesCommand.d.ts +96 -0
- package/dist-types/commands/ListSessionsCommand.d.ts +117 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +89 -0
- package/dist-types/commands/StartActiveApprovalTeamDeletionCommand.d.ts +92 -0
- package/dist-types/commands/TagResourceCommand.d.ts +91 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +88 -0
- package/dist-types/commands/UpdateApprovalTeamCommand.d.ts +105 -0
- package/dist-types/commands/index.d.ts +21 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +32 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +14 -0
- package/dist-types/models/MPAServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1947 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListApprovalTeamsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListIdentitySourcesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListPoliciesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListPolicyVersionsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListResourcePoliciesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListSessionsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +7 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +191 -0
- package/dist-types/runtimeConfig.browser.d.ts +50 -0
- package/dist-types/runtimeConfig.d.ts +50 -0
- package/dist-types/runtimeConfig.native.d.ts +49 -0
- package/dist-types/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/MPA.d.ts +371 -0
- package/dist-types/ts3.4/MPAClient.d.ts +242 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +46 -0
- package/dist-types/ts3.4/commands/CancelSessionCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/CreateApprovalTeamCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/CreateIdentitySourceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DeleteIdentitySourceCommand.d.ts +46 -0
- package/dist-types/ts3.4/commands/DeleteInactiveApprovalTeamVersionCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetApprovalTeamCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/GetIdentitySourceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetPolicyVersionCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetSessionCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/ListApprovalTeamsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListIdentitySourcesCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListPoliciesCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/ListPolicyVersionsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListResourcePoliciesCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListSessionsCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/StartActiveApprovalTeamDeletionCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/UpdateApprovalTeamCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +21 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +42 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +9 -0
- package/dist-types/ts3.4/models/MPAServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +645 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
- package/dist-types/ts3.4/pagination/ListApprovalTeamsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListIdentitySourcesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListPoliciesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListPolicyVersionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListResourcePoliciesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListSessionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +7 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +257 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +91 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +89 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/package.json +101 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
|
|
5
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
6
|
+
import { invalidProvider } from "@smithy/invalid-dependency";
|
|
7
|
+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
8
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
9
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
10
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
11
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
12
|
+
export const getRuntimeConfig = (config) => {
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
return {
|
|
17
|
+
...clientSharedValues,
|
|
18
|
+
...config,
|
|
19
|
+
runtime: "browser",
|
|
20
|
+
defaultsMode,
|
|
21
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
22
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
23
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
24
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
25
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
26
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
27
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
28
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
29
|
+
sha256: config?.sha256 ?? Sha256,
|
|
30
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
31
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
32
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
|
3
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
4
|
+
import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node";
|
|
5
|
+
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
|
|
6
|
+
import { Hash } from "@smithy/hash-node";
|
|
7
|
+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
|
|
8
|
+
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
10
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
11
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
12
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
14
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
15
|
+
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
|
|
16
|
+
export const getRuntimeConfig = (config) => {
|
|
17
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
18
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
19
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
20
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
21
|
+
awsCheckVersion(process.version);
|
|
22
|
+
const loaderConfig = {
|
|
23
|
+
profile: config?.profile,
|
|
24
|
+
logger: clientSharedValues.logger,
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
...clientSharedValues,
|
|
28
|
+
...config,
|
|
29
|
+
runtime: "node",
|
|
30
|
+
defaultsMode,
|
|
31
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
32
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
33
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
34
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
35
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
36
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
37
|
+
region: config?.region ??
|
|
38
|
+
loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
39
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
40
|
+
retryMode: config?.retryMode ??
|
|
41
|
+
loadNodeConfig({
|
|
42
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
43
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
44
|
+
}, config),
|
|
45
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
46
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
47
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
48
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
49
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
3
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
4
|
+
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
5
|
+
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
6
|
+
import { defaultMPAHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
7
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
8
|
+
export const getRuntimeConfig = (config) => {
|
|
9
|
+
return {
|
|
10
|
+
apiVersion: "2022-07-26",
|
|
11
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
12
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
13
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
14
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
15
|
+
extensions: config?.extensions ?? [],
|
|
16
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultMPAHttpAuthSchemeProvider,
|
|
17
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
18
|
+
{
|
|
19
|
+
schemeId: "aws.auth#sigv4",
|
|
20
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
21
|
+
signer: new AwsSdkSigV4Signer(),
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
25
|
+
serviceId: config?.serviceId ?? "MPA",
|
|
26
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
27
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
28
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
|
2
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
3
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
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,160 @@
|
|
|
1
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { CancelSessionCommandInput, CancelSessionCommandOutput } from "./commands/CancelSessionCommand";
|
|
3
|
+
import { CreateApprovalTeamCommandInput, CreateApprovalTeamCommandOutput } from "./commands/CreateApprovalTeamCommand";
|
|
4
|
+
import { CreateIdentitySourceCommandInput, CreateIdentitySourceCommandOutput } from "./commands/CreateIdentitySourceCommand";
|
|
5
|
+
import { DeleteIdentitySourceCommandInput, DeleteIdentitySourceCommandOutput } from "./commands/DeleteIdentitySourceCommand";
|
|
6
|
+
import { DeleteInactiveApprovalTeamVersionCommandInput, DeleteInactiveApprovalTeamVersionCommandOutput } from "./commands/DeleteInactiveApprovalTeamVersionCommand";
|
|
7
|
+
import { GetApprovalTeamCommandInput, GetApprovalTeamCommandOutput } from "./commands/GetApprovalTeamCommand";
|
|
8
|
+
import { GetIdentitySourceCommandInput, GetIdentitySourceCommandOutput } from "./commands/GetIdentitySourceCommand";
|
|
9
|
+
import { GetPolicyVersionCommandInput, GetPolicyVersionCommandOutput } from "./commands/GetPolicyVersionCommand";
|
|
10
|
+
import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "./commands/GetResourcePolicyCommand";
|
|
11
|
+
import { GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand";
|
|
12
|
+
import { ListApprovalTeamsCommandInput, ListApprovalTeamsCommandOutput } from "./commands/ListApprovalTeamsCommand";
|
|
13
|
+
import { ListIdentitySourcesCommandInput, ListIdentitySourcesCommandOutput } from "./commands/ListIdentitySourcesCommand";
|
|
14
|
+
import { ListPoliciesCommandInput, ListPoliciesCommandOutput } from "./commands/ListPoliciesCommand";
|
|
15
|
+
import { ListPolicyVersionsCommandInput, ListPolicyVersionsCommandOutput } from "./commands/ListPolicyVersionsCommand";
|
|
16
|
+
import { ListResourcePoliciesCommandInput, ListResourcePoliciesCommandOutput } from "./commands/ListResourcePoliciesCommand";
|
|
17
|
+
import { ListSessionsCommandInput, ListSessionsCommandOutput } from "./commands/ListSessionsCommand";
|
|
18
|
+
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
19
|
+
import { StartActiveApprovalTeamDeletionCommandInput, StartActiveApprovalTeamDeletionCommandOutput } from "./commands/StartActiveApprovalTeamDeletionCommand";
|
|
20
|
+
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
21
|
+
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
22
|
+
import { UpdateApprovalTeamCommandInput, UpdateApprovalTeamCommandOutput } from "./commands/UpdateApprovalTeamCommand";
|
|
23
|
+
import { MPAClient } from "./MPAClient";
|
|
24
|
+
export interface MPA {
|
|
25
|
+
/**
|
|
26
|
+
* @see {@link CancelSessionCommand}
|
|
27
|
+
*/
|
|
28
|
+
cancelSession(args: CancelSessionCommandInput, options?: __HttpHandlerOptions): Promise<CancelSessionCommandOutput>;
|
|
29
|
+
cancelSession(args: CancelSessionCommandInput, cb: (err: any, data?: CancelSessionCommandOutput) => void): void;
|
|
30
|
+
cancelSession(args: CancelSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelSessionCommandOutput) => void): void;
|
|
31
|
+
/**
|
|
32
|
+
* @see {@link CreateApprovalTeamCommand}
|
|
33
|
+
*/
|
|
34
|
+
createApprovalTeam(args: CreateApprovalTeamCommandInput, options?: __HttpHandlerOptions): Promise<CreateApprovalTeamCommandOutput>;
|
|
35
|
+
createApprovalTeam(args: CreateApprovalTeamCommandInput, cb: (err: any, data?: CreateApprovalTeamCommandOutput) => void): void;
|
|
36
|
+
createApprovalTeam(args: CreateApprovalTeamCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateApprovalTeamCommandOutput) => void): void;
|
|
37
|
+
/**
|
|
38
|
+
* @see {@link CreateIdentitySourceCommand}
|
|
39
|
+
*/
|
|
40
|
+
createIdentitySource(args: CreateIdentitySourceCommandInput, options?: __HttpHandlerOptions): Promise<CreateIdentitySourceCommandOutput>;
|
|
41
|
+
createIdentitySource(args: CreateIdentitySourceCommandInput, cb: (err: any, data?: CreateIdentitySourceCommandOutput) => void): void;
|
|
42
|
+
createIdentitySource(args: CreateIdentitySourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateIdentitySourceCommandOutput) => void): void;
|
|
43
|
+
/**
|
|
44
|
+
* @see {@link DeleteIdentitySourceCommand}
|
|
45
|
+
*/
|
|
46
|
+
deleteIdentitySource(args: DeleteIdentitySourceCommandInput, options?: __HttpHandlerOptions): Promise<DeleteIdentitySourceCommandOutput>;
|
|
47
|
+
deleteIdentitySource(args: DeleteIdentitySourceCommandInput, cb: (err: any, data?: DeleteIdentitySourceCommandOutput) => void): void;
|
|
48
|
+
deleteIdentitySource(args: DeleteIdentitySourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteIdentitySourceCommandOutput) => void): void;
|
|
49
|
+
/**
|
|
50
|
+
* @see {@link DeleteInactiveApprovalTeamVersionCommand}
|
|
51
|
+
*/
|
|
52
|
+
deleteInactiveApprovalTeamVersion(args: DeleteInactiveApprovalTeamVersionCommandInput, options?: __HttpHandlerOptions): Promise<DeleteInactiveApprovalTeamVersionCommandOutput>;
|
|
53
|
+
deleteInactiveApprovalTeamVersion(args: DeleteInactiveApprovalTeamVersionCommandInput, cb: (err: any, data?: DeleteInactiveApprovalTeamVersionCommandOutput) => void): void;
|
|
54
|
+
deleteInactiveApprovalTeamVersion(args: DeleteInactiveApprovalTeamVersionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteInactiveApprovalTeamVersionCommandOutput) => void): void;
|
|
55
|
+
/**
|
|
56
|
+
* @see {@link GetApprovalTeamCommand}
|
|
57
|
+
*/
|
|
58
|
+
getApprovalTeam(args: GetApprovalTeamCommandInput, options?: __HttpHandlerOptions): Promise<GetApprovalTeamCommandOutput>;
|
|
59
|
+
getApprovalTeam(args: GetApprovalTeamCommandInput, cb: (err: any, data?: GetApprovalTeamCommandOutput) => void): void;
|
|
60
|
+
getApprovalTeam(args: GetApprovalTeamCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetApprovalTeamCommandOutput) => void): void;
|
|
61
|
+
/**
|
|
62
|
+
* @see {@link GetIdentitySourceCommand}
|
|
63
|
+
*/
|
|
64
|
+
getIdentitySource(args: GetIdentitySourceCommandInput, options?: __HttpHandlerOptions): Promise<GetIdentitySourceCommandOutput>;
|
|
65
|
+
getIdentitySource(args: GetIdentitySourceCommandInput, cb: (err: any, data?: GetIdentitySourceCommandOutput) => void): void;
|
|
66
|
+
getIdentitySource(args: GetIdentitySourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetIdentitySourceCommandOutput) => void): void;
|
|
67
|
+
/**
|
|
68
|
+
* @see {@link GetPolicyVersionCommand}
|
|
69
|
+
*/
|
|
70
|
+
getPolicyVersion(args: GetPolicyVersionCommandInput, options?: __HttpHandlerOptions): Promise<GetPolicyVersionCommandOutput>;
|
|
71
|
+
getPolicyVersion(args: GetPolicyVersionCommandInput, cb: (err: any, data?: GetPolicyVersionCommandOutput) => void): void;
|
|
72
|
+
getPolicyVersion(args: GetPolicyVersionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPolicyVersionCommandOutput) => void): void;
|
|
73
|
+
/**
|
|
74
|
+
* @see {@link GetResourcePolicyCommand}
|
|
75
|
+
*/
|
|
76
|
+
getResourcePolicy(args: GetResourcePolicyCommandInput, options?: __HttpHandlerOptions): Promise<GetResourcePolicyCommandOutput>;
|
|
77
|
+
getResourcePolicy(args: GetResourcePolicyCommandInput, cb: (err: any, data?: GetResourcePolicyCommandOutput) => void): void;
|
|
78
|
+
getResourcePolicy(args: GetResourcePolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetResourcePolicyCommandOutput) => void): void;
|
|
79
|
+
/**
|
|
80
|
+
* @see {@link GetSessionCommand}
|
|
81
|
+
*/
|
|
82
|
+
getSession(args: GetSessionCommandInput, options?: __HttpHandlerOptions): Promise<GetSessionCommandOutput>;
|
|
83
|
+
getSession(args: GetSessionCommandInput, cb: (err: any, data?: GetSessionCommandOutput) => void): void;
|
|
84
|
+
getSession(args: GetSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSessionCommandOutput) => void): void;
|
|
85
|
+
/**
|
|
86
|
+
* @see {@link ListApprovalTeamsCommand}
|
|
87
|
+
*/
|
|
88
|
+
listApprovalTeams(): Promise<ListApprovalTeamsCommandOutput>;
|
|
89
|
+
listApprovalTeams(args: ListApprovalTeamsCommandInput, options?: __HttpHandlerOptions): Promise<ListApprovalTeamsCommandOutput>;
|
|
90
|
+
listApprovalTeams(args: ListApprovalTeamsCommandInput, cb: (err: any, data?: ListApprovalTeamsCommandOutput) => void): void;
|
|
91
|
+
listApprovalTeams(args: ListApprovalTeamsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListApprovalTeamsCommandOutput) => void): void;
|
|
92
|
+
/**
|
|
93
|
+
* @see {@link ListIdentitySourcesCommand}
|
|
94
|
+
*/
|
|
95
|
+
listIdentitySources(): Promise<ListIdentitySourcesCommandOutput>;
|
|
96
|
+
listIdentitySources(args: ListIdentitySourcesCommandInput, options?: __HttpHandlerOptions): Promise<ListIdentitySourcesCommandOutput>;
|
|
97
|
+
listIdentitySources(args: ListIdentitySourcesCommandInput, cb: (err: any, data?: ListIdentitySourcesCommandOutput) => void): void;
|
|
98
|
+
listIdentitySources(args: ListIdentitySourcesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListIdentitySourcesCommandOutput) => void): void;
|
|
99
|
+
/**
|
|
100
|
+
* @see {@link ListPoliciesCommand}
|
|
101
|
+
*/
|
|
102
|
+
listPolicies(): Promise<ListPoliciesCommandOutput>;
|
|
103
|
+
listPolicies(args: ListPoliciesCommandInput, options?: __HttpHandlerOptions): Promise<ListPoliciesCommandOutput>;
|
|
104
|
+
listPolicies(args: ListPoliciesCommandInput, cb: (err: any, data?: ListPoliciesCommandOutput) => void): void;
|
|
105
|
+
listPolicies(args: ListPoliciesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPoliciesCommandOutput) => void): void;
|
|
106
|
+
/**
|
|
107
|
+
* @see {@link ListPolicyVersionsCommand}
|
|
108
|
+
*/
|
|
109
|
+
listPolicyVersions(args: ListPolicyVersionsCommandInput, options?: __HttpHandlerOptions): Promise<ListPolicyVersionsCommandOutput>;
|
|
110
|
+
listPolicyVersions(args: ListPolicyVersionsCommandInput, cb: (err: any, data?: ListPolicyVersionsCommandOutput) => void): void;
|
|
111
|
+
listPolicyVersions(args: ListPolicyVersionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPolicyVersionsCommandOutput) => void): void;
|
|
112
|
+
/**
|
|
113
|
+
* @see {@link ListResourcePoliciesCommand}
|
|
114
|
+
*/
|
|
115
|
+
listResourcePolicies(args: ListResourcePoliciesCommandInput, options?: __HttpHandlerOptions): Promise<ListResourcePoliciesCommandOutput>;
|
|
116
|
+
listResourcePolicies(args: ListResourcePoliciesCommandInput, cb: (err: any, data?: ListResourcePoliciesCommandOutput) => void): void;
|
|
117
|
+
listResourcePolicies(args: ListResourcePoliciesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListResourcePoliciesCommandOutput) => void): void;
|
|
118
|
+
/**
|
|
119
|
+
* @see {@link ListSessionsCommand}
|
|
120
|
+
*/
|
|
121
|
+
listSessions(args: ListSessionsCommandInput, options?: __HttpHandlerOptions): Promise<ListSessionsCommandOutput>;
|
|
122
|
+
listSessions(args: ListSessionsCommandInput, cb: (err: any, data?: ListSessionsCommandOutput) => void): void;
|
|
123
|
+
listSessions(args: ListSessionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListSessionsCommandOutput) => void): void;
|
|
124
|
+
/**
|
|
125
|
+
* @see {@link ListTagsForResourceCommand}
|
|
126
|
+
*/
|
|
127
|
+
listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
|
|
128
|
+
listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
|
|
129
|
+
listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
|
|
130
|
+
/**
|
|
131
|
+
* @see {@link StartActiveApprovalTeamDeletionCommand}
|
|
132
|
+
*/
|
|
133
|
+
startActiveApprovalTeamDeletion(args: StartActiveApprovalTeamDeletionCommandInput, options?: __HttpHandlerOptions): Promise<StartActiveApprovalTeamDeletionCommandOutput>;
|
|
134
|
+
startActiveApprovalTeamDeletion(args: StartActiveApprovalTeamDeletionCommandInput, cb: (err: any, data?: StartActiveApprovalTeamDeletionCommandOutput) => void): void;
|
|
135
|
+
startActiveApprovalTeamDeletion(args: StartActiveApprovalTeamDeletionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartActiveApprovalTeamDeletionCommandOutput) => void): void;
|
|
136
|
+
/**
|
|
137
|
+
* @see {@link TagResourceCommand}
|
|
138
|
+
*/
|
|
139
|
+
tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
|
|
140
|
+
tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
|
|
141
|
+
tagResource(args: TagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
|
|
142
|
+
/**
|
|
143
|
+
* @see {@link UntagResourceCommand}
|
|
144
|
+
*/
|
|
145
|
+
untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
|
|
146
|
+
untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
|
|
147
|
+
untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
|
|
148
|
+
/**
|
|
149
|
+
* @see {@link UpdateApprovalTeamCommand}
|
|
150
|
+
*/
|
|
151
|
+
updateApprovalTeam(args: UpdateApprovalTeamCommandInput, options?: __HttpHandlerOptions): Promise<UpdateApprovalTeamCommandOutput>;
|
|
152
|
+
updateApprovalTeam(args: UpdateApprovalTeamCommandInput, cb: (err: any, data?: UpdateApprovalTeamCommandOutput) => void): void;
|
|
153
|
+
updateApprovalTeam(args: UpdateApprovalTeamCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateApprovalTeamCommandOutput) => void): void;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* <p>Multi-party approval is a capability of <a href="http://aws.amazon.com/organizations">Organizations</a> that allows you to protect a predefined list of operations through a distributed approval process. Use Multi-party approval to establish approval workflows and transform security processes into team-based decisions.</p> <p> <b>When to use Multi-party approval</b>:</p> <ul> <li> <p>You need to align with the Zero Trust principle of "never trust, always verify"</p> </li> <li> <p>You need to make sure that the right humans have access to the right things in the right way</p> </li> <li> <p>You need distributed decision-making for sensitive or critical operations</p> </li> <li> <p>You need to protect against unintended operations on sensitive or critical resources</p> </li> <li> <p>You need formal reviews and approvals for auditing or compliance reasons</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/mpa/latest/userguide/what-is.html">What is Multi-party approval</a> in the <i>Multi-party approval User Guide</i>.</p>
|
|
157
|
+
* @public
|
|
158
|
+
*/
|
|
159
|
+
export declare class MPA extends MPAClient implements MPA {
|
|
160
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
2
|
+
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
3
|
+
import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
|
|
4
|
+
import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
|
|
5
|
+
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
6
|
+
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
7
|
+
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
8
|
+
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
9
|
+
import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
10
|
+
import { CancelSessionCommandInput, CancelSessionCommandOutput } from "./commands/CancelSessionCommand";
|
|
11
|
+
import { CreateApprovalTeamCommandInput, CreateApprovalTeamCommandOutput } from "./commands/CreateApprovalTeamCommand";
|
|
12
|
+
import { CreateIdentitySourceCommandInput, CreateIdentitySourceCommandOutput } from "./commands/CreateIdentitySourceCommand";
|
|
13
|
+
import { DeleteIdentitySourceCommandInput, DeleteIdentitySourceCommandOutput } from "./commands/DeleteIdentitySourceCommand";
|
|
14
|
+
import { DeleteInactiveApprovalTeamVersionCommandInput, DeleteInactiveApprovalTeamVersionCommandOutput } from "./commands/DeleteInactiveApprovalTeamVersionCommand";
|
|
15
|
+
import { GetApprovalTeamCommandInput, GetApprovalTeamCommandOutput } from "./commands/GetApprovalTeamCommand";
|
|
16
|
+
import { GetIdentitySourceCommandInput, GetIdentitySourceCommandOutput } from "./commands/GetIdentitySourceCommand";
|
|
17
|
+
import { GetPolicyVersionCommandInput, GetPolicyVersionCommandOutput } from "./commands/GetPolicyVersionCommand";
|
|
18
|
+
import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "./commands/GetResourcePolicyCommand";
|
|
19
|
+
import { GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand";
|
|
20
|
+
import { ListApprovalTeamsCommandInput, ListApprovalTeamsCommandOutput } from "./commands/ListApprovalTeamsCommand";
|
|
21
|
+
import { ListIdentitySourcesCommandInput, ListIdentitySourcesCommandOutput } from "./commands/ListIdentitySourcesCommand";
|
|
22
|
+
import { ListPoliciesCommandInput, ListPoliciesCommandOutput } from "./commands/ListPoliciesCommand";
|
|
23
|
+
import { ListPolicyVersionsCommandInput, ListPolicyVersionsCommandOutput } from "./commands/ListPolicyVersionsCommand";
|
|
24
|
+
import { ListResourcePoliciesCommandInput, ListResourcePoliciesCommandOutput } from "./commands/ListResourcePoliciesCommand";
|
|
25
|
+
import { ListSessionsCommandInput, ListSessionsCommandOutput } from "./commands/ListSessionsCommand";
|
|
26
|
+
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
27
|
+
import { StartActiveApprovalTeamDeletionCommandInput, StartActiveApprovalTeamDeletionCommandOutput } from "./commands/StartActiveApprovalTeamDeletionCommand";
|
|
28
|
+
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
29
|
+
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
30
|
+
import { UpdateApprovalTeamCommandInput, UpdateApprovalTeamCommandOutput } from "./commands/UpdateApprovalTeamCommand";
|
|
31
|
+
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
32
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
33
|
+
export { __Client };
|
|
34
|
+
/**
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export type ServiceInputTypes = CancelSessionCommandInput | CreateApprovalTeamCommandInput | CreateIdentitySourceCommandInput | DeleteIdentitySourceCommandInput | DeleteInactiveApprovalTeamVersionCommandInput | GetApprovalTeamCommandInput | GetIdentitySourceCommandInput | GetPolicyVersionCommandInput | GetResourcePolicyCommandInput | GetSessionCommandInput | ListApprovalTeamsCommandInput | ListIdentitySourcesCommandInput | ListPoliciesCommandInput | ListPolicyVersionsCommandInput | ListResourcePoliciesCommandInput | ListSessionsCommandInput | ListTagsForResourceCommandInput | StartActiveApprovalTeamDeletionCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateApprovalTeamCommandInput;
|
|
38
|
+
/**
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export type ServiceOutputTypes = CancelSessionCommandOutput | CreateApprovalTeamCommandOutput | CreateIdentitySourceCommandOutput | DeleteIdentitySourceCommandOutput | DeleteInactiveApprovalTeamVersionCommandOutput | GetApprovalTeamCommandOutput | GetIdentitySourceCommandOutput | GetPolicyVersionCommandOutput | GetResourcePolicyCommandOutput | GetSessionCommandOutput | ListApprovalTeamsCommandOutput | ListIdentitySourcesCommandOutput | ListPoliciesCommandOutput | ListPolicyVersionsCommandOutput | ListResourcePoliciesCommandOutput | ListSessionsCommandOutput | ListTagsForResourceCommandOutput | StartActiveApprovalTeamDeletionCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateApprovalTeamCommandOutput;
|
|
42
|
+
/**
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
|
|
46
|
+
/**
|
|
47
|
+
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
|
|
48
|
+
*/
|
|
49
|
+
requestHandler?: __HttpHandlerUserInput;
|
|
50
|
+
/**
|
|
51
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
52
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
56
|
+
/**
|
|
57
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
urlParser?: __UrlParser;
|
|
61
|
+
/**
|
|
62
|
+
* A function that can calculate the length of a request body.
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
66
|
+
/**
|
|
67
|
+
* A function that converts a stream into an array of bytes.
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
streamCollector?: __StreamCollector;
|
|
71
|
+
/**
|
|
72
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
base64Decoder?: __Decoder;
|
|
76
|
+
/**
|
|
77
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
base64Encoder?: __Encoder;
|
|
81
|
+
/**
|
|
82
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
utf8Decoder?: __Decoder;
|
|
86
|
+
/**
|
|
87
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
utf8Encoder?: __Encoder;
|
|
91
|
+
/**
|
|
92
|
+
* The runtime environment.
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
runtime?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
98
|
+
* trait of an operation.
|
|
99
|
+
*/
|
|
100
|
+
disableHostPrefix?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Unique service identifier.
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
serviceId?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
108
|
+
*/
|
|
109
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
110
|
+
/**
|
|
111
|
+
* Enables FIPS compatible endpoints.
|
|
112
|
+
*/
|
|
113
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
114
|
+
/**
|
|
115
|
+
* The AWS region to which this client will send requests
|
|
116
|
+
*/
|
|
117
|
+
region?: string | __Provider<string>;
|
|
118
|
+
/**
|
|
119
|
+
* Setting a client profile is similar to setting a value for the
|
|
120
|
+
* AWS_PROFILE environment variable. Setting a profile on a client
|
|
121
|
+
* in code only affects the single client instance, unlike AWS_PROFILE.
|
|
122
|
+
*
|
|
123
|
+
* When set, and only for environments where an AWS configuration
|
|
124
|
+
* file exists, fields configurable by this file will be retrieved
|
|
125
|
+
* from the specified profile within that file.
|
|
126
|
+
* Conflicting code configuration and environment variables will
|
|
127
|
+
* still have higher priority.
|
|
128
|
+
*
|
|
129
|
+
* For client credential resolution that involves checking the AWS
|
|
130
|
+
* configuration file, the client's profile (this value) will be
|
|
131
|
+
* used unless a different profile is set in the credential
|
|
132
|
+
* provider options.
|
|
133
|
+
*
|
|
134
|
+
*/
|
|
135
|
+
profile?: string;
|
|
136
|
+
/**
|
|
137
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
141
|
+
/**
|
|
142
|
+
* Default credentials provider; Not available in browser runtime.
|
|
143
|
+
* @deprecated
|
|
144
|
+
* @internal
|
|
145
|
+
*/
|
|
146
|
+
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
|
|
147
|
+
/**
|
|
148
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
149
|
+
*/
|
|
150
|
+
maxAttempts?: number | __Provider<number>;
|
|
151
|
+
/**
|
|
152
|
+
* Specifies which retry algorithm to use.
|
|
153
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
154
|
+
*
|
|
155
|
+
*/
|
|
156
|
+
retryMode?: string | __Provider<string>;
|
|
157
|
+
/**
|
|
158
|
+
* Optional logger for logging debug/info/warn/error.
|
|
159
|
+
*/
|
|
160
|
+
logger?: __Logger;
|
|
161
|
+
/**
|
|
162
|
+
* Optional extensions
|
|
163
|
+
*/
|
|
164
|
+
extensions?: RuntimeExtension[];
|
|
165
|
+
/**
|
|
166
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
167
|
+
*/
|
|
168
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* @public
|
|
172
|
+
*/
|
|
173
|
+
export type MPAClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
|
|
174
|
+
/**
|
|
175
|
+
* @public
|
|
176
|
+
*
|
|
177
|
+
* The configuration interface of MPAClient class constructor that set the region, credentials and other options.
|
|
178
|
+
*/
|
|
179
|
+
export interface MPAClientConfig extends MPAClientConfigType {
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* @public
|
|
183
|
+
*/
|
|
184
|
+
export type MPAClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
|
185
|
+
/**
|
|
186
|
+
* @public
|
|
187
|
+
*
|
|
188
|
+
* The resolved configuration interface of MPAClient class. This is resolved and normalized from the {@link MPAClientConfig | constructor configuration interface}.
|
|
189
|
+
*/
|
|
190
|
+
export interface MPAClientResolvedConfig extends MPAClientResolvedConfigType {
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* <p>Multi-party approval is a capability of <a href="http://aws.amazon.com/organizations">Organizations</a> that allows you to protect a predefined list of operations through a distributed approval process. Use Multi-party approval to establish approval workflows and transform security processes into team-based decisions.</p> <p> <b>When to use Multi-party approval</b>:</p> <ul> <li> <p>You need to align with the Zero Trust principle of "never trust, always verify"</p> </li> <li> <p>You need to make sure that the right humans have access to the right things in the right way</p> </li> <li> <p>You need distributed decision-making for sensitive or critical operations</p> </li> <li> <p>You need to protect against unintended operations on sensitive or critical resources</p> </li> <li> <p>You need formal reviews and approvals for auditing or compliance reasons</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/mpa/latest/userguide/what-is.html">What is Multi-party approval</a> in the <i>Multi-party approval User Guide</i>.</p>
|
|
194
|
+
* @public
|
|
195
|
+
*/
|
|
196
|
+
export declare class MPAClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, MPAClientResolvedConfig> {
|
|
197
|
+
/**
|
|
198
|
+
* The resolved configuration of MPAClient class. This is resolved and normalized from the {@link MPAClientConfig | constructor configuration interface}.
|
|
199
|
+
*/
|
|
200
|
+
readonly config: MPAClientResolvedConfig;
|
|
201
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<MPAClientConfig>);
|
|
202
|
+
/**
|
|
203
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
204
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
205
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
206
|
+
*/
|
|
207
|
+
destroy(): void;
|
|
208
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
|
|
2
|
+
import { MPAHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface HttpAuthExtensionConfiguration {
|
|
7
|
+
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
|
|
8
|
+
httpAuthSchemes(): HttpAuthScheme[];
|
|
9
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider: MPAHttpAuthSchemeProvider): void;
|
|
10
|
+
httpAuthSchemeProvider(): MPAHttpAuthSchemeProvider;
|
|
11
|
+
setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
|
|
12
|
+
credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export type HttpAuthRuntimeConfig = Partial<{
|
|
18
|
+
httpAuthSchemes: HttpAuthScheme[];
|
|
19
|
+
httpAuthSchemeProvider: MPAHttpAuthSchemeProvider;
|
|
20
|
+
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core";
|
|
2
|
+
import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, Provider } from "@smithy/types";
|
|
3
|
+
import { MPAClientResolvedConfig } from "../MPAClient";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface MPAHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
|
|
8
|
+
region?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface MPAHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<MPAClientResolvedConfig, HandlerExecutionContext, MPAHttpAuthSchemeParameters, object> {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const defaultMPAHttpAuthSchemeParametersProvider: (config: MPAClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise<MPAHttpAuthSchemeParameters>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export interface MPAHttpAuthSchemeProvider extends HttpAuthSchemeProvider<MPAHttpAuthSchemeParameters> {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare const defaultMPAHttpAuthSchemeProvider: MPAHttpAuthSchemeProvider;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
|
|
32
|
+
/**
|
|
33
|
+
* A comma-separated list of case-sensitive auth scheme names.
|
|
34
|
+
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
|
|
35
|
+
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
authSchemePreference?: string[] | Provider<string[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
httpAuthSchemes?: HttpAuthScheme[];
|
|
44
|
+
/**
|
|
45
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
httpAuthSchemeProvider?: MPAHttpAuthSchemeProvider;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
|
|
54
|
+
/**
|
|
55
|
+
* A comma-separated list of case-sensitive auth scheme names.
|
|
56
|
+
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
|
|
57
|
+
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
readonly authSchemePreference: Provider<string[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
readonly httpAuthSchemes: HttpAuthScheme[];
|
|
66
|
+
/**
|
|
67
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
readonly httpAuthSchemeProvider: MPAHttpAuthSchemeProvider;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig;
|