@aws-sdk/client-supportauthz 3.1077.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 +258 -0
- package/dist-cjs/index.js +984 -0
- package/dist-es/SupportAuthZ.js +37 -0
- package/dist-es/SupportAuthZClient.js +47 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commands/CreateSupportPermitCommand.js +16 -0
- package/dist-es/commands/DeleteSupportPermitCommand.js +16 -0
- package/dist-es/commands/GetActionCommand.js +16 -0
- package/dist-es/commands/GetSupportPermitCommand.js +16 -0
- package/dist-es/commands/ListActionsCommand.js +16 -0
- package/dist-es/commands/ListSupportPermitRequestsCommand.js +16 -0
- package/dist-es/commands/ListSupportPermitsCommand.js +16 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +16 -0
- package/dist-es/commands/RejectSupportPermitRequestCommand.js +16 -0
- package/dist-es/commands/TagResourceCommand.js +16 -0
- package/dist-es/commands/UntagResourceCommand.js +16 -0
- package/dist-es/commands/index.js +11 -0
- package/dist-es/endpoint/EndpointParameters.js +11 -0
- package/dist-es/endpoint/bdd.js +29 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +9 -0
- package/dist-es/models/SupportAuthZServiceException.js +8 -0
- package/dist-es/models/enums.js +11 -0
- package/dist-es/models/errors.js +111 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListActionsPaginator.js +4 -0
- package/dist-es/pagination/ListSupportPermitRequestsPaginator.js +4 -0
- package/dist-es/pagination/ListSupportPermitsPaginator.js +4 -0
- package/dist-es/pagination/index.js +4 -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 +365 -0
- package/dist-types/SupportAuthZ.d.ts +110 -0
- package/dist-types/SupportAuthZClient.d.ts +197 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/CreateSupportPermitCommand.d.ts +154 -0
- package/dist-types/commands/DeleteSupportPermitCommand.d.ts +119 -0
- package/dist-types/commands/GetActionCommand.d.ts +93 -0
- package/dist-types/commands/GetSupportPermitCommand.d.ts +122 -0
- package/dist-types/commands/ListActionsCommand.d.ts +97 -0
- package/dist-types/commands/ListSupportPermitRequestsCommand.d.ts +119 -0
- package/dist-types/commands/ListSupportPermitsCommand.d.ts +124 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +93 -0
- package/dist-types/commands/RejectSupportPermitRequestCommand.d.ts +94 -0
- package/dist-types/commands/TagResourceCommand.d.ts +92 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +92 -0
- package/dist-types/commands/index.d.ts +11 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +44 -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 +17 -0
- package/dist-types/models/SupportAuthZServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +48 -0
- package/dist-types/models/errors.d.ts +146 -0
- package/dist-types/models/models_0.d.ts +729 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListActionsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListSupportPermitRequestsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListSupportPermitsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/runtimeConfig.browser.d.ts +55 -0
- package/dist-types/runtimeConfig.d.ts +55 -0
- package/dist-types/runtimeConfig.native.d.ts +54 -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 +58 -0
- package/dist-types/ts3.4/SupportAuthZ.d.ts +221 -0
- package/dist-types/ts3.4/SupportAuthZClient.d.ts +177 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
- package/dist-types/ts3.4/commands/CreateSupportPermitCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/DeleteSupportPermitCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/GetActionCommand.d.ts +45 -0
- package/dist-types/ts3.4/commands/GetSupportPermitCommand.d.ts +52 -0
- package/dist-types/ts3.4/commands/ListActionsCommand.d.ts +49 -0
- package/dist-types/ts3.4/commands/ListSupportPermitRequestsCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/ListSupportPermitsCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/RejectSupportPermitRequestCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +49 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +49 -0
- package/dist-types/ts3.4/commands/index.d.ts +11 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -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 +9 -0
- package/dist-types/ts3.4/index.d.ts +12 -0
- package/dist-types/ts3.4/models/SupportAuthZServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/enums.d.ts +15 -0
- package/dist-types/ts3.4/models/errors.d.ts +65 -0
- package/dist-types/ts3.4/models/models_0.d.ts +232 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListActionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListSupportPermitRequestsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListSupportPermitsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +106 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +101 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +110 -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 +58 -0
- package/package.json +69 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createAggregatedClient } from "@smithy/core/client";
|
|
2
|
+
import { CreateSupportPermitCommand, } from "./commands/CreateSupportPermitCommand";
|
|
3
|
+
import { DeleteSupportPermitCommand, } from "./commands/DeleteSupportPermitCommand";
|
|
4
|
+
import { GetActionCommand } from "./commands/GetActionCommand";
|
|
5
|
+
import { GetSupportPermitCommand, } from "./commands/GetSupportPermitCommand";
|
|
6
|
+
import { ListActionsCommand, } from "./commands/ListActionsCommand";
|
|
7
|
+
import { ListSupportPermitRequestsCommand, } from "./commands/ListSupportPermitRequestsCommand";
|
|
8
|
+
import { ListSupportPermitsCommand, } from "./commands/ListSupportPermitsCommand";
|
|
9
|
+
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
10
|
+
import { RejectSupportPermitRequestCommand, } from "./commands/RejectSupportPermitRequestCommand";
|
|
11
|
+
import { TagResourceCommand, } from "./commands/TagResourceCommand";
|
|
12
|
+
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
13
|
+
import { paginateListActions } from "./pagination/ListActionsPaginator";
|
|
14
|
+
import { paginateListSupportPermitRequests } from "./pagination/ListSupportPermitRequestsPaginator";
|
|
15
|
+
import { paginateListSupportPermits } from "./pagination/ListSupportPermitsPaginator";
|
|
16
|
+
import { SupportAuthZClient } from "./SupportAuthZClient";
|
|
17
|
+
const commands = {
|
|
18
|
+
CreateSupportPermitCommand,
|
|
19
|
+
DeleteSupportPermitCommand,
|
|
20
|
+
GetActionCommand,
|
|
21
|
+
GetSupportPermitCommand,
|
|
22
|
+
ListActionsCommand,
|
|
23
|
+
ListSupportPermitRequestsCommand,
|
|
24
|
+
ListSupportPermitsCommand,
|
|
25
|
+
ListTagsForResourceCommand,
|
|
26
|
+
RejectSupportPermitRequestCommand,
|
|
27
|
+
TagResourceCommand,
|
|
28
|
+
UntagResourceCommand,
|
|
29
|
+
};
|
|
30
|
+
const paginators = {
|
|
31
|
+
paginateListActions,
|
|
32
|
+
paginateListSupportPermitRequests,
|
|
33
|
+
paginateListSupportPermits,
|
|
34
|
+
};
|
|
35
|
+
export class SupportAuthZ extends SupportAuthZClient {
|
|
36
|
+
}
|
|
37
|
+
createAggregatedClient(commands, SupportAuthZ, { 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 { defaultSupportAuthZHttpAuthSchemeParametersProvider, 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 SupportAuthZClient 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: defaultSupportAuthZHttpAuthSchemeParametersProvider,
|
|
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 defaultSupportAuthZHttpAuthSchemeParametersProvider = 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: "supportauthz",
|
|
16
|
+
region: authParameters.region,
|
|
17
|
+
},
|
|
18
|
+
propertiesExtractor: (config, context) => ({
|
|
19
|
+
signingProperties: {
|
|
20
|
+
config,
|
|
21
|
+
context,
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export const defaultSupportAuthZHttpAuthSchemeProvider = (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,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { CreateSupportPermit$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class CreateSupportPermitCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SupportAuthZ", "CreateSupportPermit", {})
|
|
13
|
+
.n("SupportAuthZClient", "CreateSupportPermitCommand")
|
|
14
|
+
.sc(CreateSupportPermit$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { DeleteSupportPermit$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class DeleteSupportPermitCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SupportAuthZ", "DeleteSupportPermit", {})
|
|
13
|
+
.n("SupportAuthZClient", "DeleteSupportPermitCommand")
|
|
14
|
+
.sc(DeleteSupportPermit$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { GetAction$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class GetActionCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SupportAuthZ", "GetAction", {})
|
|
13
|
+
.n("SupportAuthZClient", "GetActionCommand")
|
|
14
|
+
.sc(GetAction$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { GetSupportPermit$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class GetSupportPermitCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SupportAuthZ", "GetSupportPermit", {})
|
|
13
|
+
.n("SupportAuthZClient", "GetSupportPermitCommand")
|
|
14
|
+
.sc(GetSupportPermit$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { ListActions$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class ListActionsCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SupportAuthZ", "ListActions", {})
|
|
13
|
+
.n("SupportAuthZClient", "ListActionsCommand")
|
|
14
|
+
.sc(ListActions$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { ListSupportPermitRequests$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class ListSupportPermitRequestsCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SupportAuthZ", "ListSupportPermitRequests", {})
|
|
13
|
+
.n("SupportAuthZClient", "ListSupportPermitRequestsCommand")
|
|
14
|
+
.sc(ListSupportPermitRequests$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { ListSupportPermits$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class ListSupportPermitsCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SupportAuthZ", "ListSupportPermits", {})
|
|
13
|
+
.n("SupportAuthZClient", "ListSupportPermitsCommand")
|
|
14
|
+
.sc(ListSupportPermits$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { ListTagsForResource$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class ListTagsForResourceCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SupportAuthZ", "ListTagsForResource", {})
|
|
13
|
+
.n("SupportAuthZClient", "ListTagsForResourceCommand")
|
|
14
|
+
.sc(ListTagsForResource$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { RejectSupportPermitRequest$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class RejectSupportPermitRequestCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SupportAuthZ", "RejectSupportPermitRequest", {})
|
|
13
|
+
.n("SupportAuthZClient", "RejectSupportPermitRequestCommand")
|
|
14
|
+
.sc(RejectSupportPermitRequest$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { TagResource$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class TagResourceCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SupportAuthZ", "TagResource", {})
|
|
13
|
+
.n("SupportAuthZClient", "TagResourceCommand")
|
|
14
|
+
.sc(TagResource$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { UntagResource$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class UntagResourceCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SupportAuthZ", "UntagResource", {})
|
|
13
|
+
.n("SupportAuthZClient", "UntagResourceCommand")
|
|
14
|
+
.sc(UntagResource$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./CreateSupportPermitCommand";
|
|
2
|
+
export * from "./DeleteSupportPermitCommand";
|
|
3
|
+
export * from "./GetActionCommand";
|
|
4
|
+
export * from "./GetSupportPermitCommand";
|
|
5
|
+
export * from "./ListActionsCommand";
|
|
6
|
+
export * from "./ListSupportPermitRequestsCommand";
|
|
7
|
+
export * from "./ListSupportPermitsCommand";
|
|
8
|
+
export * from "./ListTagsForResourceCommand";
|
|
9
|
+
export * from "./RejectSupportPermitRequestCommand";
|
|
10
|
+
export * from "./TagResourceCommand";
|
|
11
|
+
export * from "./UntagResourceCommand";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const resolveClientEndpointParameters = (options) => {
|
|
2
|
+
return Object.assign(options, {
|
|
3
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
4
|
+
defaultSigningName: "supportauthz",
|
|
5
|
+
});
|
|
6
|
+
};
|
|
7
|
+
export const commonParams = {
|
|
8
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
9
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
10
|
+
Region: { type: "builtInParams", name: "region" },
|
|
11
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BinaryDecisionDiagram } from "@smithy/core/endpoints";
|
|
2
|
+
const a = "isSet", b = { "ref": "Endpoint" }, c = [{ "ref": "Region" }];
|
|
3
|
+
const _data = {
|
|
4
|
+
conditions: [
|
|
5
|
+
[a, [b]],
|
|
6
|
+
[a, c],
|
|
7
|
+
["aws.partition", c, "PartitionResult"],
|
|
8
|
+
["booleanEquals", [{ ref: "UseFIPS" }, true]]
|
|
9
|
+
],
|
|
10
|
+
results: [
|
|
11
|
+
[-1],
|
|
12
|
+
[-1, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
13
|
+
[b, {}],
|
|
14
|
+
["https://supportauthz-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", {}],
|
|
15
|
+
["https://supportauthz.{Region}.{PartitionResult#dualStackDnsSuffix}", {}],
|
|
16
|
+
[-1, "Invalid Configuration: Missing Region"]
|
|
17
|
+
]
|
|
18
|
+
};
|
|
19
|
+
const root = 2;
|
|
20
|
+
const r = 100_000_000;
|
|
21
|
+
const nodes = new Int32Array([
|
|
22
|
+
-1, 1, -1,
|
|
23
|
+
0, 6, 3,
|
|
24
|
+
1, 4, r + 5,
|
|
25
|
+
2, 5, r + 5,
|
|
26
|
+
3, r + 3, r + 4,
|
|
27
|
+
3, r + 1, r + 2,
|
|
28
|
+
]);
|
|
29
|
+
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", "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,9 @@
|
|
|
1
|
+
export * from "./SupportAuthZClient";
|
|
2
|
+
export * from "./SupportAuthZ";
|
|
3
|
+
export * from "./commands";
|
|
4
|
+
export * from "./schemas/schemas_0";
|
|
5
|
+
export * from "./pagination";
|
|
6
|
+
export * from "./models/enums";
|
|
7
|
+
export * from "./models/errors";
|
|
8
|
+
export * from "./models/models_0";
|
|
9
|
+
export { SupportAuthZServiceException } from "./models/SupportAuthZServiceException";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/core/client";
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class SupportAuthZServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, SupportAuthZServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { SupportAuthZServiceException as __BaseException } from "./SupportAuthZServiceException";
|
|
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 ConflictException extends __BaseException {
|
|
15
|
+
name = "ConflictException";
|
|
16
|
+
$fault = "client";
|
|
17
|
+
resourceId;
|
|
18
|
+
resourceType;
|
|
19
|
+
constructor(opts) {
|
|
20
|
+
super({
|
|
21
|
+
name: "ConflictException",
|
|
22
|
+
$fault: "client",
|
|
23
|
+
...opts,
|
|
24
|
+
});
|
|
25
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
26
|
+
this.resourceId = opts.resourceId;
|
|
27
|
+
this.resourceType = opts.resourceType;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export class InternalServerException extends __BaseException {
|
|
31
|
+
name = "InternalServerException";
|
|
32
|
+
$fault = "server";
|
|
33
|
+
$retryable = {};
|
|
34
|
+
retryAfterSeconds;
|
|
35
|
+
constructor(opts) {
|
|
36
|
+
super({
|
|
37
|
+
name: "InternalServerException",
|
|
38
|
+
$fault: "server",
|
|
39
|
+
...opts,
|
|
40
|
+
});
|
|
41
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
42
|
+
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
46
|
+
name = "ServiceQuotaExceededException";
|
|
47
|
+
$fault = "client";
|
|
48
|
+
resourceId;
|
|
49
|
+
resourceType;
|
|
50
|
+
serviceCode;
|
|
51
|
+
quotaCode;
|
|
52
|
+
constructor(opts) {
|
|
53
|
+
super({
|
|
54
|
+
name: "ServiceQuotaExceededException",
|
|
55
|
+
$fault: "client",
|
|
56
|
+
...opts,
|
|
57
|
+
});
|
|
58
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
59
|
+
this.resourceId = opts.resourceId;
|
|
60
|
+
this.resourceType = opts.resourceType;
|
|
61
|
+
this.serviceCode = opts.serviceCode;
|
|
62
|
+
this.quotaCode = opts.quotaCode;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export class ThrottlingException extends __BaseException {
|
|
66
|
+
name = "ThrottlingException";
|
|
67
|
+
$fault = "client";
|
|
68
|
+
$retryable = {
|
|
69
|
+
throttling: true,
|
|
70
|
+
};
|
|
71
|
+
retryAfterSeconds;
|
|
72
|
+
constructor(opts) {
|
|
73
|
+
super({
|
|
74
|
+
name: "ThrottlingException",
|
|
75
|
+
$fault: "client",
|
|
76
|
+
...opts,
|
|
77
|
+
});
|
|
78
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
79
|
+
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export class ValidationException extends __BaseException {
|
|
83
|
+
name = "ValidationException";
|
|
84
|
+
$fault = "client";
|
|
85
|
+
fieldList;
|
|
86
|
+
constructor(opts) {
|
|
87
|
+
super({
|
|
88
|
+
name: "ValidationException",
|
|
89
|
+
$fault: "client",
|
|
90
|
+
...opts,
|
|
91
|
+
});
|
|
92
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
93
|
+
this.fieldList = opts.fieldList;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
97
|
+
name = "ResourceNotFoundException";
|
|
98
|
+
$fault = "client";
|
|
99
|
+
resourceId;
|
|
100
|
+
resourceType;
|
|
101
|
+
constructor(opts) {
|
|
102
|
+
super({
|
|
103
|
+
name: "ResourceNotFoundException",
|
|
104
|
+
$fault: "client",
|
|
105
|
+
...opts,
|
|
106
|
+
});
|
|
107
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
108
|
+
this.resourceId = opts.resourceId;
|
|
109
|
+
this.resourceType = opts.resourceType;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListActionsCommand } from "../commands/ListActionsCommand";
|
|
3
|
+
import { SupportAuthZClient } from "../SupportAuthZClient";
|
|
4
|
+
export const paginateListActions = createPaginator(SupportAuthZClient, ListActionsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListSupportPermitRequestsCommand, } from "../commands/ListSupportPermitRequestsCommand";
|
|
3
|
+
import { SupportAuthZClient } from "../SupportAuthZClient";
|
|
4
|
+
export const paginateListSupportPermitRequests = createPaginator(SupportAuthZClient, ListSupportPermitRequestsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListSupportPermitsCommand, } from "../commands/ListSupportPermitsCommand";
|
|
3
|
+
import { SupportAuthZClient } from "../SupportAuthZClient";
|
|
4
|
+
export const paginateListSupportPermits = createPaginator(SupportAuthZClient, ListSupportPermitsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -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
|
+
};
|