@aws-sdk/client-simpledbv2 3.1007.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 +231 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +252 -0
- package/dist-cjs/models/SimpleDBv2ServiceException.js +12 -0
- package/dist-cjs/models/errors.js +95 -0
- package/dist-cjs/runtimeConfig.browser.js +38 -0
- package/dist-cjs/runtimeConfig.js +53 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +43 -0
- package/dist-cjs/schemas/schemas_0.js +146 -0
- package/dist-es/SimpleDBv2.js +21 -0
- package/dist-es/SimpleDBv2Client.js +50 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commands/GetExportCommand.js +16 -0
- package/dist-es/commands/ListExportsCommand.js +16 -0
- package/dist-es/commands/StartDomainExportCommand.js +16 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/endpoint/EndpointParameters.js +13 -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 +10 -0
- package/dist-es/models/SimpleDBv2ServiceException.js +8 -0
- package/dist-es/models/enums.js +10 -0
- package/dist-es/models/errors.js +85 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListExportsPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/runtimeConfig.browser.js +33 -0
- package/dist-es/runtimeConfig.js +48 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +39 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +143 -0
- package/dist-es/waiters/index.js +1 -0
- package/dist-es/waiters/waitForExportSucceeded.js +40 -0
- package/dist-types/SimpleDBv2.d.ts +55 -0
- package/dist-types/SimpleDBv2Client.d.ts +199 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/GetExportCommand.d.ts +115 -0
- package/dist-types/commands/ListExportsCommand.d.ts +113 -0
- package/dist-types/commands/StartDomainExportCommand.d.ts +115 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +50 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +27 -0
- package/dist-types/models/SimpleDBv2ServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +26 -0
- package/dist-types/models/errors.d.ts +86 -0
- package/dist-types/models/models_0.d.ts +227 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListExportsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -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 +27 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +26 -0
- package/dist-types/ts3.4/SimpleDBv2.d.ts +81 -0
- package/dist-types/ts3.4/SimpleDBv2Client.d.ts +137 -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/GetExportCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/ListExportsCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/StartDomainExportCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -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 +13 -0
- package/dist-types/ts3.4/models/SimpleDBv2ServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/enums.d.ts +13 -0
- package/dist-types/ts3.4/models/errors.d.ts +52 -0
- package/dist-types/ts3.4/models/models_0.d.ts +50 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListExportsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +104 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +25 -0
- package/dist-types/ts3.4/waiters/index.d.ts +1 -0
- package/dist-types/ts3.4/waiters/waitForExportSucceeded.d.ts +11 -0
- package/dist-types/waiters/index.d.ts +1 -0
- package/dist-types/waiters/waitForExportSucceeded.d.ts +14 -0
- package/package.json +101 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
2
|
+
import { GetExportCommand } from "./commands/GetExportCommand";
|
|
3
|
+
import { ListExportsCommand } from "./commands/ListExportsCommand";
|
|
4
|
+
import { StartDomainExportCommand, } from "./commands/StartDomainExportCommand";
|
|
5
|
+
import { paginateListExports } from "./pagination/ListExportsPaginator";
|
|
6
|
+
import { SimpleDBv2Client } from "./SimpleDBv2Client";
|
|
7
|
+
import { waitUntilExportSucceeded } from "./waiters/waitForExportSucceeded";
|
|
8
|
+
const commands = {
|
|
9
|
+
GetExportCommand,
|
|
10
|
+
ListExportsCommand,
|
|
11
|
+
StartDomainExportCommand,
|
|
12
|
+
};
|
|
13
|
+
const paginators = {
|
|
14
|
+
paginateListExports,
|
|
15
|
+
};
|
|
16
|
+
const waiters = {
|
|
17
|
+
waitUntilExportSucceeded,
|
|
18
|
+
};
|
|
19
|
+
export class SimpleDBv2 extends SimpleDBv2Client {
|
|
20
|
+
}
|
|
21
|
+
createAggregatedClient(commands, SimpleDBv2, { paginators, waiters });
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
2
|
+
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
|
3
|
+
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
|
|
4
|
+
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
5
|
+
import { resolveRegionConfig } from "@smithy/config-resolver";
|
|
6
|
+
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
7
|
+
import { getSchemaSerdePlugin } from "@smithy/core/schema";
|
|
8
|
+
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
9
|
+
import { resolveEndpointConfig, } from "@smithy/middleware-endpoint";
|
|
10
|
+
import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
|
|
11
|
+
import { Client as __Client, } from "@smithy/smithy-client";
|
|
12
|
+
import { defaultSimpleDBv2HttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
|
|
13
|
+
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
|
14
|
+
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
15
|
+
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
|
16
|
+
export { __Client };
|
|
17
|
+
export class SimpleDBv2Client extends __Client {
|
|
18
|
+
config;
|
|
19
|
+
constructor(...[configuration]) {
|
|
20
|
+
const _config_0 = __getRuntimeConfig(configuration || {});
|
|
21
|
+
super(_config_0);
|
|
22
|
+
this.initConfig = _config_0;
|
|
23
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
24
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
25
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
26
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
|
27
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
28
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
|
29
|
+
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
30
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
31
|
+
this.config = _config_8;
|
|
32
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
33
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
34
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
35
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
36
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
37
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
38
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
39
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
40
|
+
httpAuthSchemeParametersProvider: defaultSimpleDBv2HttpAuthSchemeParametersProvider,
|
|
41
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
42
|
+
"aws.auth#sigv4": config.credentials,
|
|
43
|
+
}),
|
|
44
|
+
}));
|
|
45
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
46
|
+
}
|
|
47
|
+
destroy() {
|
|
48
|
+
super.destroy();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -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";
|
|
2
|
+
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
|
|
3
|
+
export const defaultSimpleDBv2HttpAuthSchemeParametersProvider = 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: "sdb",
|
|
16
|
+
region: authParameters.region,
|
|
17
|
+
},
|
|
18
|
+
propertiesExtractor: (config, context) => ({
|
|
19
|
+
signingProperties: {
|
|
20
|
+
config,
|
|
21
|
+
context,
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export const defaultSimpleDBv2HttpAuthSchemeProvider = (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 { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { GetExport$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class GetExportCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SimpleDBv2", "GetExport", {})
|
|
13
|
+
.n("SimpleDBv2Client", "GetExportCommand")
|
|
14
|
+
.sc(GetExport$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { ListExports$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class ListExportsCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SimpleDBv2", "ListExports", {})
|
|
13
|
+
.n("SimpleDBv2Client", "ListExportsCommand")
|
|
14
|
+
.sc(ListExports$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { StartDomainExport$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class StartDomainExportCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("SimpleDBv2", "StartDomainExport", {})
|
|
13
|
+
.n("SimpleDBv2Client", "StartDomainExportCommand")
|
|
14
|
+
.sc(StartDomainExport$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const resolveClientEndpointParameters = (options) => {
|
|
2
|
+
return Object.assign(options, {
|
|
3
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
4
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
5
|
+
defaultSigningName: "sdb",
|
|
6
|
+
});
|
|
7
|
+
};
|
|
8
|
+
export const commonParams = {
|
|
9
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
10
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
11
|
+
Region: { type: "builtInParams", name: "region" },
|
|
12
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
|
|
2
|
+
import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
|
|
3
|
+
import { ruleSet } from "./ruleset";
|
|
4
|
+
const cache = new EndpointCache({
|
|
5
|
+
size: 50,
|
|
6
|
+
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
7
|
+
});
|
|
8
|
+
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
+
return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
|
|
10
|
+
endpointParams: endpointParams,
|
|
11
|
+
logger: context.logger,
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const t = "required", u = "fn", v = "argv", w = "ref";
|
|
2
|
+
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [t]: true, "default": false, "type": "boolean" }, i = { [t]: false, "type": "string" }, j = { [w]: "Endpoint" }, k = { [u]: c, [v]: [{ [w]: "UseFIPS" }, true] }, l = { [u]: c, [v]: [{ [w]: "UseDualStack" }, true] }, m = {}, n = { [w]: "Region" }, o = { [u]: c, [v]: [{ [w]: "UseFIPS" }, false] }, p = { [u]: c, [v]: [{ [w]: "UseDualStack" }, false] }, q = { [u]: "getAttr", [v]: [{ [w]: g }, "supportsFIPS"] }, r = { [u]: c, [v]: [true, { [u]: "getAttr", [v]: [{ [w]: g }, "supportsDualStack"] }] }, s = [n];
|
|
3
|
+
const _data = { version: "1.0", parameters: { UseDualStack: h, UseFIPS: h, Endpoint: i, Region: i }, rules: [{ conditions: [{ [u]: b, [v]: [j] }], rules: [{ conditions: [k], error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: [l], error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [u]: b, [v]: s }], rules: [{ conditions: [{ [u]: "aws.partition", [v]: s, assign: g }], rules: [{ conditions: [{ [u]: "stringEquals", [v]: [n, "us-east-1"] }, o, p], endpoint: { url: "https://sdb.amazonaws.com", properties: m, headers: m }, type: e }, { conditions: [k, l], rules: [{ conditions: [{ [u]: c, [v]: [a, q] }, r], rules: [{ endpoint: { url: "https://sdb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: [k, p], rules: [{ conditions: [{ [u]: c, [v]: [q, a] }], rules: [{ endpoint: { url: "https://sdb-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: [o, l], rules: [{ conditions: [r], rules: [{ endpoint: { url: "https://sdb.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://sdb.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
|
|
4
|
+
export const ruleSet = _data;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./SimpleDBv2Client";
|
|
2
|
+
export * from "./SimpleDBv2";
|
|
3
|
+
export * from "./commands";
|
|
4
|
+
export * from "./schemas/schemas_0";
|
|
5
|
+
export * from "./pagination";
|
|
6
|
+
export * from "./waiters";
|
|
7
|
+
export * from "./models/enums";
|
|
8
|
+
export * from "./models/errors";
|
|
9
|
+
export * from "./models/models_0";
|
|
10
|
+
export { SimpleDBv2ServiceException } from "./models/SimpleDBv2ServiceException";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class SimpleDBv2ServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, SimpleDBv2ServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { SimpleDBv2ServiceException as __BaseException } from "./SimpleDBv2ServiceException";
|
|
2
|
+
export class ConflictException extends __BaseException {
|
|
3
|
+
name = "ConflictException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "ConflictException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class InvalidParameterValueException extends __BaseException {
|
|
15
|
+
name = "InvalidParameterValueException";
|
|
16
|
+
$fault = "client";
|
|
17
|
+
constructor(opts) {
|
|
18
|
+
super({
|
|
19
|
+
name: "InvalidParameterValueException",
|
|
20
|
+
$fault: "client",
|
|
21
|
+
...opts,
|
|
22
|
+
});
|
|
23
|
+
Object.setPrototypeOf(this, InvalidParameterValueException.prototype);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export class NoSuchExportException extends __BaseException {
|
|
27
|
+
name = "NoSuchExportException";
|
|
28
|
+
$fault = "client";
|
|
29
|
+
constructor(opts) {
|
|
30
|
+
super({
|
|
31
|
+
name: "NoSuchExportException",
|
|
32
|
+
$fault: "client",
|
|
33
|
+
...opts,
|
|
34
|
+
});
|
|
35
|
+
Object.setPrototypeOf(this, NoSuchExportException.prototype);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export class InvalidNextTokenException extends __BaseException {
|
|
39
|
+
name = "InvalidNextTokenException";
|
|
40
|
+
$fault = "client";
|
|
41
|
+
constructor(opts) {
|
|
42
|
+
super({
|
|
43
|
+
name: "InvalidNextTokenException",
|
|
44
|
+
$fault: "client",
|
|
45
|
+
...opts,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export class InvalidParameterCombinationException extends __BaseException {
|
|
51
|
+
name = "InvalidParameterCombinationException";
|
|
52
|
+
$fault = "client";
|
|
53
|
+
constructor(opts) {
|
|
54
|
+
super({
|
|
55
|
+
name: "InvalidParameterCombinationException",
|
|
56
|
+
$fault: "client",
|
|
57
|
+
...opts,
|
|
58
|
+
});
|
|
59
|
+
Object.setPrototypeOf(this, InvalidParameterCombinationException.prototype);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export class NoSuchDomainException extends __BaseException {
|
|
63
|
+
name = "NoSuchDomainException";
|
|
64
|
+
$fault = "client";
|
|
65
|
+
constructor(opts) {
|
|
66
|
+
super({
|
|
67
|
+
name: "NoSuchDomainException",
|
|
68
|
+
$fault: "client",
|
|
69
|
+
...opts,
|
|
70
|
+
});
|
|
71
|
+
Object.setPrototypeOf(this, NoSuchDomainException.prototype);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export class NumberExportsLimitExceeded extends __BaseException {
|
|
75
|
+
name = "NumberExportsLimitExceeded";
|
|
76
|
+
$fault = "client";
|
|
77
|
+
constructor(opts) {
|
|
78
|
+
super({
|
|
79
|
+
name: "NumberExportsLimitExceeded",
|
|
80
|
+
$fault: "client",
|
|
81
|
+
...opts,
|
|
82
|
+
});
|
|
83
|
+
Object.setPrototypeOf(this, NumberExportsLimitExceeded.prototype);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListExportsCommand } from "../commands/ListExportsCommand";
|
|
3
|
+
import { SimpleDBv2Client } from "../SimpleDBv2Client";
|
|
4
|
+
export const paginateListExports = createPaginator(SimpleDBv2Client, ListExportsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
8
|
+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
9
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
10
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
11
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
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 ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
24
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
25
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
26
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
28
|
+
sha256: config?.sha256 ?? Sha256,
|
|
29
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
30
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
31
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core";
|
|
3
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
4
|
+
import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } 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 { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
11
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
12
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
13
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
14
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
15
|
+
export const getRuntimeConfig = (config) => {
|
|
16
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
17
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
18
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
19
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
+
awsCheckVersion(process.version);
|
|
21
|
+
const loaderConfig = {
|
|
22
|
+
profile: config?.profile,
|
|
23
|
+
logger: clientSharedValues.logger,
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
...clientSharedValues,
|
|
27
|
+
...config,
|
|
28
|
+
runtime: "node",
|
|
29
|
+
defaultsMode,
|
|
30
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
31
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
32
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
33
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
34
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
35
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
36
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
37
|
+
retryMode: config?.retryMode ??
|
|
38
|
+
loadNodeConfig({
|
|
39
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
40
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
41
|
+
}, config),
|
|
42
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
43
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
44
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
45
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
46
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -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,39 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
3
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
4
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
5
|
+
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
6
|
+
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
7
|
+
import { defaultSimpleDBv2HttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
8
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
9
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
10
|
+
export const getRuntimeConfig = (config) => {
|
|
11
|
+
return {
|
|
12
|
+
apiVersion: "2025-09-26",
|
|
13
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
14
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
15
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
16
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
17
|
+
extensions: config?.extensions ?? [],
|
|
18
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSimpleDBv2HttpAuthSchemeProvider,
|
|
19
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
20
|
+
{
|
|
21
|
+
schemeId: "aws.auth#sigv4",
|
|
22
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
23
|
+
signer: new AwsSdkSigV4Signer(),
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
27
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
28
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
29
|
+
defaultNamespace: "com.amazonaws.simpledbv2",
|
|
30
|
+
errorTypeRegistries,
|
|
31
|
+
version: "2025-09-26",
|
|
32
|
+
serviceTarget: "SimpleDBv2",
|
|
33
|
+
},
|
|
34
|
+
serviceId: config?.serviceId ?? "SimpleDBv2",
|
|
35
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
36
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
37
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -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
|
+
};
|