@aws-sdk/client-dsql 3.705.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.
Files changed (143) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +294 -0
  3. package/dist-cjs/DSQL.js +31 -0
  4. package/dist-cjs/DSQLClient.js +50 -0
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  7. package/dist-cjs/commands/CreateClusterCommand.js +26 -0
  8. package/dist-cjs/commands/CreateMultiRegionClustersCommand.js +26 -0
  9. package/dist-cjs/commands/DeleteClusterCommand.js +26 -0
  10. package/dist-cjs/commands/DeleteMultiRegionClustersCommand.js +26 -0
  11. package/dist-cjs/commands/GetClusterCommand.js +26 -0
  12. package/dist-cjs/commands/ListClustersCommand.js +26 -0
  13. package/dist-cjs/commands/ListTagsForResourceCommand.js +26 -0
  14. package/dist-cjs/commands/TagResourceCommand.js +26 -0
  15. package/dist-cjs/commands/UntagResourceCommand.js +26 -0
  16. package/dist-cjs/commands/UpdateClusterCommand.js +26 -0
  17. package/dist-cjs/commands/index.js +13 -0
  18. package/dist-cjs/endpoint/EndpointParameters.js +16 -0
  19. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  20. package/dist-cjs/endpoint/ruleset.js +7 -0
  21. package/dist-cjs/extensionConfiguration.js +2 -0
  22. package/dist-cjs/index.js +12 -0
  23. package/dist-cjs/models/DSQLServiceException.js +12 -0
  24. package/dist-cjs/models/index.js +4 -0
  25. package/dist-cjs/models/models_0.js +128 -0
  26. package/dist-cjs/pagination/Interfaces.js +2 -0
  27. package/dist-cjs/pagination/ListClustersPaginator.js +7 -0
  28. package/dist-cjs/pagination/index.js +5 -0
  29. package/dist-cjs/protocols/Aws_restJson1.js +467 -0
  30. package/dist-cjs/runtimeConfig.browser.js +39 -0
  31. package/dist-cjs/runtimeConfig.js +50 -0
  32. package/dist-cjs/runtimeConfig.native.js +15 -0
  33. package/dist-cjs/runtimeConfig.shared.js +34 -0
  34. package/dist-cjs/runtimeExtensions.js +25 -0
  35. package/dist-cjs/waiters/index.js +5 -0
  36. package/dist-cjs/waiters/waitForClusterActive.js +36 -0
  37. package/dist-cjs/waiters/waitForClusterNotExists.js +30 -0
  38. package/dist-es/DSQL.js +27 -0
  39. package/dist-es/DSQLClient.js +46 -0
  40. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  41. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  42. package/dist-es/commands/CreateClusterCommand.js +22 -0
  43. package/dist-es/commands/CreateMultiRegionClustersCommand.js +22 -0
  44. package/dist-es/commands/DeleteClusterCommand.js +22 -0
  45. package/dist-es/commands/DeleteMultiRegionClustersCommand.js +22 -0
  46. package/dist-es/commands/GetClusterCommand.js +22 -0
  47. package/dist-es/commands/ListClustersCommand.js +22 -0
  48. package/dist-es/commands/ListTagsForResourceCommand.js +22 -0
  49. package/dist-es/commands/TagResourceCommand.js +22 -0
  50. package/dist-es/commands/UntagResourceCommand.js +22 -0
  51. package/dist-es/commands/UpdateClusterCommand.js +22 -0
  52. package/dist-es/commands/index.js +10 -0
  53. package/dist-es/endpoint/EndpointParameters.js +12 -0
  54. package/dist-es/endpoint/endpointResolver.js +14 -0
  55. package/dist-es/endpoint/ruleset.js +4 -0
  56. package/dist-es/extensionConfiguration.js +1 -0
  57. package/dist-es/index.js +7 -0
  58. package/dist-es/models/DSQLServiceException.js +8 -0
  59. package/dist-es/models/index.js +1 -0
  60. package/dist-es/models/models_0.js +118 -0
  61. package/dist-es/pagination/Interfaces.js +1 -0
  62. package/dist-es/pagination/ListClustersPaginator.js +4 -0
  63. package/dist-es/pagination/index.js +2 -0
  64. package/dist-es/protocols/Aws_restJson1.js +444 -0
  65. package/dist-es/runtimeConfig.browser.js +34 -0
  66. package/dist-es/runtimeConfig.js +45 -0
  67. package/dist-es/runtimeConfig.native.js +11 -0
  68. package/dist-es/runtimeConfig.shared.js +30 -0
  69. package/dist-es/runtimeExtensions.js +21 -0
  70. package/dist-es/waiters/index.js +2 -0
  71. package/dist-es/waiters/waitForClusterActive.js +31 -0
  72. package/dist-es/waiters/waitForClusterNotExists.js +25 -0
  73. package/dist-types/DSQL.d.ts +91 -0
  74. package/dist-types/DSQLClient.d.ts +188 -0
  75. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  76. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  77. package/dist-types/commands/CreateClusterCommand.d.ts +98 -0
  78. package/dist-types/commands/CreateMultiRegionClustersCommand.d.ts +107 -0
  79. package/dist-types/commands/DeleteClusterCommand.d.ts +95 -0
  80. package/dist-types/commands/DeleteMultiRegionClustersCommand.d.ts +91 -0
  81. package/dist-types/commands/GetClusterCommand.d.ts +95 -0
  82. package/dist-types/commands/ListClustersCommand.d.ts +94 -0
  83. package/dist-types/commands/ListTagsForResourceCommand.d.ts +89 -0
  84. package/dist-types/commands/TagResourceCommand.d.ts +91 -0
  85. package/dist-types/commands/UntagResourceCommand.d.ts +88 -0
  86. package/dist-types/commands/UpdateClusterCommand.d.ts +100 -0
  87. package/dist-types/commands/index.d.ts +10 -0
  88. package/dist-types/endpoint/EndpointParameters.d.ts +34 -0
  89. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  90. package/dist-types/endpoint/ruleset.d.ts +2 -0
  91. package/dist-types/extensionConfiguration.d.ts +9 -0
  92. package/dist-types/index.d.ts +24 -0
  93. package/dist-types/models/DSQLServiceException.d.ts +14 -0
  94. package/dist-types/models/index.d.ts +1 -0
  95. package/dist-types/models/models_0.d.ts +624 -0
  96. package/dist-types/pagination/Interfaces.d.ts +8 -0
  97. package/dist-types/pagination/ListClustersPaginator.d.ts +7 -0
  98. package/dist-types/pagination/index.d.ts +2 -0
  99. package/dist-types/protocols/Aws_restJson1.d.ts +92 -0
  100. package/dist-types/runtimeConfig.browser.d.ts +48 -0
  101. package/dist-types/runtimeConfig.d.ts +48 -0
  102. package/dist-types/runtimeConfig.native.d.ts +47 -0
  103. package/dist-types/runtimeConfig.shared.d.ts +21 -0
  104. package/dist-types/runtimeExtensions.d.ts +17 -0
  105. package/dist-types/ts3.4/DSQL.d.ts +177 -0
  106. package/dist-types/ts3.4/DSQLClient.d.ts +178 -0
  107. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  108. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +43 -0
  109. package/dist-types/ts3.4/commands/CreateClusterCommand.d.ts +47 -0
  110. package/dist-types/ts3.4/commands/CreateMultiRegionClustersCommand.d.ts +51 -0
  111. package/dist-types/ts3.4/commands/DeleteClusterCommand.d.ts +47 -0
  112. package/dist-types/ts3.4/commands/DeleteMultiRegionClustersCommand.d.ts +47 -0
  113. package/dist-types/ts3.4/commands/GetClusterCommand.d.ts +47 -0
  114. package/dist-types/ts3.4/commands/ListClustersCommand.d.ts +47 -0
  115. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
  116. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +45 -0
  117. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +45 -0
  118. package/dist-types/ts3.4/commands/UpdateClusterCommand.d.ts +47 -0
  119. package/dist-types/ts3.4/commands/index.d.ts +10 -0
  120. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
  121. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  122. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  123. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  124. package/dist-types/ts3.4/index.d.ts +10 -0
  125. package/dist-types/ts3.4/models/DSQLServiceException.d.ts +9 -0
  126. package/dist-types/ts3.4/models/index.d.ts +1 -0
  127. package/dist-types/ts3.4/models/models_0.d.ts +181 -0
  128. package/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
  129. package/dist-types/ts3.4/pagination/ListClustersPaginator.d.ts +11 -0
  130. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  131. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +125 -0
  132. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
  133. package/dist-types/ts3.4/runtimeConfig.d.ts +94 -0
  134. package/dist-types/ts3.4/runtimeConfig.native.d.ts +87 -0
  135. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
  136. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  137. package/dist-types/ts3.4/waiters/index.d.ts +2 -0
  138. package/dist-types/ts3.4/waiters/waitForClusterActive.d.ts +11 -0
  139. package/dist-types/ts3.4/waiters/waitForClusterNotExists.d.ts +11 -0
  140. package/dist-types/waiters/index.d.ts +2 -0
  141. package/dist-types/waiters/waitForClusterActive.d.ts +14 -0
  142. package/dist-types/waiters/waitForClusterNotExists.d.ts +14 -0
  143. package/package.json +104 -0
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.waitUntilClusterActive = exports.waitForClusterActive = void 0;
4
+ const util_waiter_1 = require("@smithy/util-waiter");
5
+ const GetClusterCommand_1 = require("../commands/GetClusterCommand");
6
+ const checkState = async (client, input) => {
7
+ let reason;
8
+ try {
9
+ const result = await client.send(new GetClusterCommand_1.GetClusterCommand(input));
10
+ reason = result;
11
+ try {
12
+ const returnComparator = () => {
13
+ return result.status;
14
+ };
15
+ if (returnComparator() === "ACTIVE") {
16
+ return { state: util_waiter_1.WaiterState.SUCCESS, reason };
17
+ }
18
+ }
19
+ catch (e) { }
20
+ }
21
+ catch (exception) {
22
+ reason = exception;
23
+ }
24
+ return { state: util_waiter_1.WaiterState.RETRY, reason };
25
+ };
26
+ const waitForClusterActive = async (params, input) => {
27
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
28
+ return (0, util_waiter_1.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
29
+ };
30
+ exports.waitForClusterActive = waitForClusterActive;
31
+ const waitUntilClusterActive = async (params, input) => {
32
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
33
+ const result = await (0, util_waiter_1.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
34
+ return (0, util_waiter_1.checkExceptions)(result);
35
+ };
36
+ exports.waitUntilClusterActive = waitUntilClusterActive;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.waitUntilClusterNotExists = exports.waitForClusterNotExists = void 0;
4
+ const util_waiter_1 = require("@smithy/util-waiter");
5
+ const GetClusterCommand_1 = require("../commands/GetClusterCommand");
6
+ const checkState = async (client, input) => {
7
+ let reason;
8
+ try {
9
+ const result = await client.send(new GetClusterCommand_1.GetClusterCommand(input));
10
+ reason = result;
11
+ }
12
+ catch (exception) {
13
+ reason = exception;
14
+ if (exception.name && exception.name == "ResourceNotFoundException") {
15
+ return { state: util_waiter_1.WaiterState.SUCCESS, reason };
16
+ }
17
+ }
18
+ return { state: util_waiter_1.WaiterState.RETRY, reason };
19
+ };
20
+ const waitForClusterNotExists = async (params, input) => {
21
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
22
+ return (0, util_waiter_1.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
23
+ };
24
+ exports.waitForClusterNotExists = waitForClusterNotExists;
25
+ const waitUntilClusterNotExists = async (params, input) => {
26
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
27
+ const result = await (0, util_waiter_1.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
28
+ return (0, util_waiter_1.checkExceptions)(result);
29
+ };
30
+ exports.waitUntilClusterNotExists = waitUntilClusterNotExists;
@@ -0,0 +1,27 @@
1
+ import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { CreateClusterCommand, } from "./commands/CreateClusterCommand";
3
+ import { CreateMultiRegionClustersCommand, } from "./commands/CreateMultiRegionClustersCommand";
4
+ import { DeleteClusterCommand, } from "./commands/DeleteClusterCommand";
5
+ import { DeleteMultiRegionClustersCommand, } from "./commands/DeleteMultiRegionClustersCommand";
6
+ import { GetClusterCommand } from "./commands/GetClusterCommand";
7
+ import { ListClustersCommand, } from "./commands/ListClustersCommand";
8
+ import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
9
+ import { TagResourceCommand } from "./commands/TagResourceCommand";
10
+ import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
11
+ import { UpdateClusterCommand, } from "./commands/UpdateClusterCommand";
12
+ import { DSQLClient } from "./DSQLClient";
13
+ const commands = {
14
+ CreateClusterCommand,
15
+ CreateMultiRegionClustersCommand,
16
+ DeleteClusterCommand,
17
+ DeleteMultiRegionClustersCommand,
18
+ GetClusterCommand,
19
+ ListClustersCommand,
20
+ ListTagsForResourceCommand,
21
+ TagResourceCommand,
22
+ UntagResourceCommand,
23
+ UpdateClusterCommand,
24
+ };
25
+ export class DSQL extends DSQLClient {
26
+ }
27
+ createAggregatedClient(commands, DSQL);
@@ -0,0 +1,46 @@
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 { getContentLengthPlugin } from "@smithy/middleware-content-length";
8
+ import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
9
+ import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
10
+ import { Client as __Client, } from "@smithy/smithy-client";
11
+ import { defaultDSQLHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
12
+ import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
13
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
14
+ import { resolveRuntimeExtensions } from "./runtimeExtensions";
15
+ export { __Client };
16
+ export class DSQLClient extends __Client {
17
+ constructor(...[configuration]) {
18
+ const _config_0 = __getRuntimeConfig(configuration || {});
19
+ const _config_1 = resolveClientEndpointParameters(_config_0);
20
+ const _config_2 = resolveUserAgentConfig(_config_1);
21
+ const _config_3 = resolveRetryConfig(_config_2);
22
+ const _config_4 = resolveRegionConfig(_config_3);
23
+ const _config_5 = resolveHostHeaderConfig(_config_4);
24
+ const _config_6 = resolveEndpointConfig(_config_5);
25
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
26
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
27
+ super(_config_8);
28
+ this.config = _config_8;
29
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
30
+ this.middlewareStack.use(getRetryPlugin(this.config));
31
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
32
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
33
+ this.middlewareStack.use(getLoggerPlugin(this.config));
34
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
35
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
36
+ httpAuthSchemeParametersProvider: defaultDSQLHttpAuthSchemeParametersProvider,
37
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
38
+ "aws.auth#sigv4": config.credentials,
39
+ }),
40
+ }));
41
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
42
+ }
43
+ destroy() {
44
+ super.destroy();
45
+ }
46
+ }
@@ -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,41 @@
1
+ import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
2
+ import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
3
+ export const defaultDSQLHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
+ return {
5
+ operation: getSmithyContext(context).operation,
6
+ region: (await normalizeProvider(config.region)()) ||
7
+ (() => {
8
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
9
+ })(),
10
+ };
11
+ };
12
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
13
+ return {
14
+ schemeId: "aws.auth#sigv4",
15
+ signingProperties: {
16
+ name: "dsql",
17
+ region: authParameters.region,
18
+ },
19
+ propertiesExtractor: (config, context) => ({
20
+ signingProperties: {
21
+ config,
22
+ context,
23
+ },
24
+ }),
25
+ };
26
+ }
27
+ export const defaultDSQLHttpAuthSchemeProvider = (authParameters) => {
28
+ const options = [];
29
+ switch (authParameters.operation) {
30
+ default: {
31
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
32
+ }
33
+ }
34
+ return options;
35
+ };
36
+ export const resolveHttpAuthSchemeConfig = (config) => {
37
+ const config_0 = resolveAwsSdkSigV4Config(config);
38
+ return {
39
+ ...config_0,
40
+ };
41
+ };
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_CreateClusterCommand, se_CreateClusterCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class CreateClusterCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "CreateCluster", {})
17
+ .n("DSQLClient", "CreateClusterCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_CreateClusterCommand)
20
+ .de(de_CreateClusterCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_CreateMultiRegionClustersCommand, se_CreateMultiRegionClustersCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class CreateMultiRegionClustersCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "CreateMultiRegionClusters", {})
17
+ .n("DSQLClient", "CreateMultiRegionClustersCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_CreateMultiRegionClustersCommand)
20
+ .de(de_CreateMultiRegionClustersCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_DeleteClusterCommand, se_DeleteClusterCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class DeleteClusterCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "DeleteCluster", {})
17
+ .n("DSQLClient", "DeleteClusterCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_DeleteClusterCommand)
20
+ .de(de_DeleteClusterCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_DeleteMultiRegionClustersCommand, se_DeleteMultiRegionClustersCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class DeleteMultiRegionClustersCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "DeleteMultiRegionClusters", {})
17
+ .n("DSQLClient", "DeleteMultiRegionClustersCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_DeleteMultiRegionClustersCommand)
20
+ .de(de_DeleteMultiRegionClustersCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_GetClusterCommand, se_GetClusterCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class GetClusterCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "GetCluster", {})
17
+ .n("DSQLClient", "GetClusterCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_GetClusterCommand)
20
+ .de(de_GetClusterCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_ListClustersCommand, se_ListClustersCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class ListClustersCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "ListClusters", {})
17
+ .n("DSQLClient", "ListClustersCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_ListClustersCommand)
20
+ .de(de_ListClustersCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class ListTagsForResourceCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "ListTagsForResource", {})
17
+ .n("DSQLClient", "ListTagsForResourceCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_ListTagsForResourceCommand)
20
+ .de(de_ListTagsForResourceCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class TagResourceCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "TagResource", {})
17
+ .n("DSQLClient", "TagResourceCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_TagResourceCommand)
20
+ .de(de_TagResourceCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class UntagResourceCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "UntagResource", {})
17
+ .n("DSQLClient", "UntagResourceCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_UntagResourceCommand)
20
+ .de(de_UntagResourceCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_UpdateClusterCommand, se_UpdateClusterCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class UpdateClusterCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "UpdateCluster", {})
17
+ .n("DSQLClient", "UpdateClusterCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_UpdateClusterCommand)
20
+ .de(de_UpdateClusterCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,10 @@
1
+ export * from "./CreateClusterCommand";
2
+ export * from "./CreateMultiRegionClustersCommand";
3
+ export * from "./DeleteClusterCommand";
4
+ export * from "./DeleteMultiRegionClustersCommand";
5
+ export * from "./GetClusterCommand";
6
+ export * from "./ListClustersCommand";
7
+ export * from "./ListTagsForResourceCommand";
8
+ export * from "./TagResourceCommand";
9
+ export * from "./UntagResourceCommand";
10
+ export * from "./UpdateClusterCommand";
@@ -0,0 +1,12 @@
1
+ export const resolveClientEndpointParameters = (options) => {
2
+ return {
3
+ ...options,
4
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
5
+ defaultSigningName: "dsql",
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
+ };
@@ -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", "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 l = "ref";
2
+ const a = true, b = false, c = "isSet", d = "error", e = "endpoint", f = "tree", g = { "required": false, "type": "String" }, h = { [l]: "Endpoint" }, i = {}, j = [{ "fn": "booleanEquals", "argv": [{ [l]: "UseFIPS" }, true] }], k = [{ [l]: "Region" }];
3
+ const _data = { version: "1.0", parameters: { UseFIPS: { required: a, default: b, type: "Boolean" }, Endpoint: g, Region: g }, rules: [{ conditions: [{ fn: c, argv: [h] }], rules: [{ conditions: j, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { endpoint: { url: h, properties: i, headers: i }, type: e }], type: f }, { rules: [{ conditions: [{ fn: c, argv: k }], rules: [{ conditions: [{ fn: "aws.partition", argv: k, assign: "PartitionResult" }], rules: [{ conditions: j, endpoint: { url: "https://dsql-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: i, headers: i }, type: e }, { endpoint: { url: "https://dsql.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: i, headers: i }, 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 {};
@@ -0,0 +1,7 @@
1
+ export * from "./DSQLClient";
2
+ export * from "./DSQL";
3
+ export * from "./commands";
4
+ export * from "./pagination";
5
+ export * from "./waiters";
6
+ export * from "./models";
7
+ export { DSQLServiceException } from "./models/DSQLServiceException";
@@ -0,0 +1,8 @@
1
+ import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
2
+ export { __ServiceException };
3
+ export class DSQLServiceException extends __ServiceException {
4
+ constructor(options) {
5
+ super(options);
6
+ Object.setPrototypeOf(this, DSQLServiceException.prototype);
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export * from "./models_0";
@@ -0,0 +1,118 @@
1
+ import { DSQLServiceException as __BaseException } from "./DSQLServiceException";
2
+ export class AccessDeniedException extends __BaseException {
3
+ constructor(opts) {
4
+ super({
5
+ name: "AccessDeniedException",
6
+ $fault: "client",
7
+ ...opts,
8
+ });
9
+ this.name = "AccessDeniedException";
10
+ this.$fault = "client";
11
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
12
+ }
13
+ }
14
+ export const ClusterStatus = {
15
+ ACTIVE: "ACTIVE",
16
+ CREATING: "CREATING",
17
+ DELETED: "DELETED",
18
+ DELETING: "DELETING",
19
+ FAILED: "FAILED",
20
+ UPDATING: "UPDATING",
21
+ };
22
+ export class ConflictException extends __BaseException {
23
+ constructor(opts) {
24
+ super({
25
+ name: "ConflictException",
26
+ $fault: "client",
27
+ ...opts,
28
+ });
29
+ this.name = "ConflictException";
30
+ this.$fault = "client";
31
+ Object.setPrototypeOf(this, ConflictException.prototype);
32
+ this.resourceId = opts.resourceId;
33
+ this.resourceType = opts.resourceType;
34
+ }
35
+ }
36
+ export class InternalServerException extends __BaseException {
37
+ constructor(opts) {
38
+ super({
39
+ name: "InternalServerException",
40
+ $fault: "server",
41
+ ...opts,
42
+ });
43
+ this.name = "InternalServerException";
44
+ this.$fault = "server";
45
+ this.$retryable = {};
46
+ Object.setPrototypeOf(this, InternalServerException.prototype);
47
+ this.retryAfterSeconds = opts.retryAfterSeconds;
48
+ }
49
+ }
50
+ export class ServiceQuotaExceededException extends __BaseException {
51
+ constructor(opts) {
52
+ super({
53
+ name: "ServiceQuotaExceededException",
54
+ $fault: "client",
55
+ ...opts,
56
+ });
57
+ this.name = "ServiceQuotaExceededException";
58
+ this.$fault = "client";
59
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
60
+ this.resourceId = opts.resourceId;
61
+ this.resourceType = opts.resourceType;
62
+ this.serviceCode = opts.serviceCode;
63
+ this.quotaCode = opts.quotaCode;
64
+ }
65
+ }
66
+ export class ThrottlingException extends __BaseException {
67
+ constructor(opts) {
68
+ super({
69
+ name: "ThrottlingException",
70
+ $fault: "client",
71
+ ...opts,
72
+ });
73
+ this.name = "ThrottlingException";
74
+ this.$fault = "client";
75
+ this.$retryable = {
76
+ throttling: true,
77
+ };
78
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
79
+ this.serviceCode = opts.serviceCode;
80
+ this.quotaCode = opts.quotaCode;
81
+ this.retryAfterSeconds = opts.retryAfterSeconds;
82
+ }
83
+ }
84
+ export const ValidationExceptionReason = {
85
+ CANNOT_PARSE: "cannotParse",
86
+ DELETION_PROTECTION_ENABLED: "deletionProtectionEnabled",
87
+ FIELD_VALIDATION_FAILED: "fieldValidationFailed",
88
+ OTHER: "other",
89
+ UNKNOWN_OPERATION: "unknownOperation",
90
+ };
91
+ export class ValidationException extends __BaseException {
92
+ constructor(opts) {
93
+ super({
94
+ name: "ValidationException",
95
+ $fault: "client",
96
+ ...opts,
97
+ });
98
+ this.name = "ValidationException";
99
+ this.$fault = "client";
100
+ Object.setPrototypeOf(this, ValidationException.prototype);
101
+ this.reason = opts.reason;
102
+ this.fieldList = opts.fieldList;
103
+ }
104
+ }
105
+ export class ResourceNotFoundException extends __BaseException {
106
+ constructor(opts) {
107
+ super({
108
+ name: "ResourceNotFoundException",
109
+ $fault: "client",
110
+ ...opts,
111
+ });
112
+ this.name = "ResourceNotFoundException";
113
+ this.$fault = "client";
114
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
115
+ this.resourceId = opts.resourceId;
116
+ this.resourceType = opts.resourceType;
117
+ }
118
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { ListClustersCommand, } from "../commands/ListClustersCommand";
3
+ import { DSQLClient } from "../DSQLClient";
4
+ export const paginateListClusters = createPaginator(DSQLClient, ListClustersCommand, "nextToken", "nextToken", "maxResults");