@aws-sdk/client-docdb-elastic 3.221.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 (131) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +205 -0
  3. package/dist-cjs/DocDBElastic.js +202 -0
  4. package/dist-cjs/DocDBElasticClient.js +40 -0
  5. package/dist-cjs/commands/CreateClusterCommand.js +46 -0
  6. package/dist-cjs/commands/CreateClusterSnapshotCommand.js +46 -0
  7. package/dist-cjs/commands/DeleteClusterCommand.js +46 -0
  8. package/dist-cjs/commands/DeleteClusterSnapshotCommand.js +46 -0
  9. package/dist-cjs/commands/GetClusterCommand.js +46 -0
  10. package/dist-cjs/commands/GetClusterSnapshotCommand.js +46 -0
  11. package/dist-cjs/commands/ListClusterSnapshotsCommand.js +46 -0
  12. package/dist-cjs/commands/ListClustersCommand.js +46 -0
  13. package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
  14. package/dist-cjs/commands/RestoreClusterFromSnapshotCommand.js +46 -0
  15. package/dist-cjs/commands/TagResourceCommand.js +46 -0
  16. package/dist-cjs/commands/UntagResourceCommand.js +46 -0
  17. package/dist-cjs/commands/UpdateClusterCommand.js +46 -0
  18. package/dist-cjs/commands/index.js +16 -0
  19. package/dist-cjs/endpoint/EndpointParameters.js +12 -0
  20. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  21. package/dist-cjs/endpoint/ruleset.js +312 -0
  22. package/dist-cjs/index.js +11 -0
  23. package/dist-cjs/models/DocDBElasticServiceException.js +11 -0
  24. package/dist-cjs/models/index.js +4 -0
  25. package/dist-cjs/models/models_0.js +255 -0
  26. package/dist-cjs/pagination/Interfaces.js +2 -0
  27. package/dist-cjs/pagination/ListClusterSnapshotsPaginator.js +36 -0
  28. package/dist-cjs/pagination/ListClustersPaginator.js +36 -0
  29. package/dist-cjs/pagination/index.js +6 -0
  30. package/dist-cjs/protocols/Aws_restJson1.js +1197 -0
  31. package/dist-cjs/runtimeConfig.browser.js +42 -0
  32. package/dist-cjs/runtimeConfig.js +50 -0
  33. package/dist-cjs/runtimeConfig.native.js +15 -0
  34. package/dist-cjs/runtimeConfig.shared.js +18 -0
  35. package/dist-es/DocDBElastic.js +198 -0
  36. package/dist-es/DocDBElasticClient.js +36 -0
  37. package/dist-es/commands/CreateClusterCommand.js +42 -0
  38. package/dist-es/commands/CreateClusterSnapshotCommand.js +42 -0
  39. package/dist-es/commands/DeleteClusterCommand.js +42 -0
  40. package/dist-es/commands/DeleteClusterSnapshotCommand.js +42 -0
  41. package/dist-es/commands/GetClusterCommand.js +42 -0
  42. package/dist-es/commands/GetClusterSnapshotCommand.js +42 -0
  43. package/dist-es/commands/ListClusterSnapshotsCommand.js +42 -0
  44. package/dist-es/commands/ListClustersCommand.js +42 -0
  45. package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
  46. package/dist-es/commands/RestoreClusterFromSnapshotCommand.js +42 -0
  47. package/dist-es/commands/TagResourceCommand.js +42 -0
  48. package/dist-es/commands/UntagResourceCommand.js +42 -0
  49. package/dist-es/commands/UpdateClusterCommand.js +42 -0
  50. package/dist-es/commands/index.js +13 -0
  51. package/dist-es/endpoint/EndpointParameters.js +8 -0
  52. package/dist-es/endpoint/endpointResolver.js +8 -0
  53. package/dist-es/endpoint/ruleset.js +309 -0
  54. package/dist-es/index.js +6 -0
  55. package/dist-es/models/DocDBElasticServiceException.js +7 -0
  56. package/dist-es/models/index.js +1 -0
  57. package/dist-es/models/models_0.js +214 -0
  58. package/dist-es/pagination/Interfaces.js +1 -0
  59. package/dist-es/pagination/ListClusterSnapshotsPaginator.js +32 -0
  60. package/dist-es/pagination/ListClustersPaginator.js +32 -0
  61. package/dist-es/pagination/index.js +3 -0
  62. package/dist-es/protocols/Aws_restJson1.js +1168 -0
  63. package/dist-es/runtimeConfig.browser.js +37 -0
  64. package/dist-es/runtimeConfig.js +45 -0
  65. package/dist-es/runtimeConfig.native.js +11 -0
  66. package/dist-es/runtimeConfig.shared.js +14 -0
  67. package/dist-types/DocDBElastic.d.ts +99 -0
  68. package/dist-types/DocDBElasticClient.d.ts +154 -0
  69. package/dist-types/commands/CreateClusterCommand.d.ts +37 -0
  70. package/dist-types/commands/CreateClusterSnapshotCommand.d.ts +37 -0
  71. package/dist-types/commands/DeleteClusterCommand.d.ts +37 -0
  72. package/dist-types/commands/DeleteClusterSnapshotCommand.d.ts +37 -0
  73. package/dist-types/commands/GetClusterCommand.d.ts +37 -0
  74. package/dist-types/commands/GetClusterSnapshotCommand.d.ts +37 -0
  75. package/dist-types/commands/ListClusterSnapshotsCommand.d.ts +37 -0
  76. package/dist-types/commands/ListClustersCommand.d.ts +37 -0
  77. package/dist-types/commands/ListTagsForResourceCommand.d.ts +37 -0
  78. package/dist-types/commands/RestoreClusterFromSnapshotCommand.d.ts +37 -0
  79. package/dist-types/commands/TagResourceCommand.d.ts +37 -0
  80. package/dist-types/commands/UntagResourceCommand.d.ts +37 -0
  81. package/dist-types/commands/UpdateClusterCommand.d.ts +38 -0
  82. package/dist-types/commands/index.d.ts +13 -0
  83. package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
  84. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  85. package/dist-types/endpoint/ruleset.d.ts +2 -0
  86. package/dist-types/index.d.ts +6 -0
  87. package/dist-types/models/DocDBElasticServiceException.d.ts +10 -0
  88. package/dist-types/models/index.d.ts +1 -0
  89. package/dist-types/models/models_0.d.ts +782 -0
  90. package/dist-types/pagination/Interfaces.d.ts +6 -0
  91. package/dist-types/pagination/ListClusterSnapshotsPaginator.d.ts +4 -0
  92. package/dist-types/pagination/ListClustersPaginator.d.ts +4 -0
  93. package/dist-types/pagination/index.d.ts +3 -0
  94. package/dist-types/protocols/Aws_restJson1.d.ts +41 -0
  95. package/dist-types/runtimeConfig.browser.d.ts +42 -0
  96. package/dist-types/runtimeConfig.d.ts +42 -0
  97. package/dist-types/runtimeConfig.native.d.ts +41 -0
  98. package/dist-types/runtimeConfig.shared.d.ts +16 -0
  99. package/dist-types/ts3.4/DocDBElastic.d.ts +225 -0
  100. package/dist-types/ts3.4/DocDBElasticClient.d.ts +190 -0
  101. package/dist-types/ts3.4/commands/CreateClusterCommand.d.ts +34 -0
  102. package/dist-types/ts3.4/commands/CreateClusterSnapshotCommand.d.ts +41 -0
  103. package/dist-types/ts3.4/commands/DeleteClusterCommand.d.ts +34 -0
  104. package/dist-types/ts3.4/commands/DeleteClusterSnapshotCommand.d.ts +41 -0
  105. package/dist-types/ts3.4/commands/GetClusterCommand.d.ts +34 -0
  106. package/dist-types/ts3.4/commands/GetClusterSnapshotCommand.d.ts +38 -0
  107. package/dist-types/ts3.4/commands/ListClusterSnapshotsCommand.d.ts +41 -0
  108. package/dist-types/ts3.4/commands/ListClustersCommand.d.ts +34 -0
  109. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
  110. package/dist-types/ts3.4/commands/RestoreClusterFromSnapshotCommand.d.ts +41 -0
  111. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +34 -0
  112. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +37 -0
  113. package/dist-types/ts3.4/commands/UpdateClusterCommand.d.ts +34 -0
  114. package/dist-types/ts3.4/commands/index.d.ts +13 -0
  115. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +34 -0
  116. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  117. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  118. package/dist-types/ts3.4/index.d.ts +6 -0
  119. package/dist-types/ts3.4/models/DocDBElasticServiceException.d.ts +7 -0
  120. package/dist-types/ts3.4/models/index.d.ts +1 -0
  121. package/dist-types/ts3.4/models/models_0.d.ts +320 -0
  122. package/dist-types/ts3.4/pagination/Interfaces.d.ts +7 -0
  123. package/dist-types/ts3.4/pagination/ListClusterSnapshotsPaginator.d.ts +11 -0
  124. package/dist-types/ts3.4/pagination/ListClustersPaginator.d.ts +11 -0
  125. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  126. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +161 -0
  127. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +88 -0
  128. package/dist-types/ts3.4/runtimeConfig.d.ts +88 -0
  129. package/dist-types/ts3.4/runtimeConfig.native.d.ts +77 -0
  130. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +16 -0
  131. package/package.json +103 -0
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const config_resolver_1 = require("@aws-sdk/config-resolver");
8
+ const fetch_http_handler_1 = require("@aws-sdk/fetch-http-handler");
9
+ const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
10
+ const middleware_retry_1 = require("@aws-sdk/middleware-retry");
11
+ const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
12
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
13
+ const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
14
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
15
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
16
+ const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
17
+ const getRuntimeConfig = (config) => {
18
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
19
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
20
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
21
+ return {
22
+ ...clientSharedValues,
23
+ ...config,
24
+ runtime: "browser",
25
+ defaultsMode,
26
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
27
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
28
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
29
+ (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
30
+ maxAttempts: config?.maxAttempts ?? middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
31
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
32
+ requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
33
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
34
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
35
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
36
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
37
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
38
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_browser_1.fromUtf8,
39
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_browser_1.toUtf8,
40
+ };
41
+ };
42
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const client_sts_1 = require("@aws-sdk/client-sts");
7
+ const config_resolver_1 = require("@aws-sdk/config-resolver");
8
+ const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
9
+ const hash_node_1 = require("@aws-sdk/hash-node");
10
+ const middleware_retry_1 = require("@aws-sdk/middleware-retry");
11
+ const node_config_provider_1 = require("@aws-sdk/node-config-provider");
12
+ const node_http_handler_1 = require("@aws-sdk/node-http-handler");
13
+ const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
14
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
15
+ const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
16
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
17
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
18
+ const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
19
+ const smithy_client_2 = require("@aws-sdk/smithy-client");
20
+ const getRuntimeConfig = (config) => {
21
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
22
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
23
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
24
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
25
+ return {
26
+ ...clientSharedValues,
27
+ ...config,
28
+ runtime: "node",
29
+ defaultsMode,
30
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
31
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
32
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
33
+ (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
34
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
35
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
36
+ requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
37
+ retryMode: config?.retryMode ??
38
+ (0, node_config_provider_1.loadConfig)({
39
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
40
+ default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
41
+ }),
42
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
43
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
44
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
45
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
46
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_node_1.fromUtf8,
47
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_node_1.toUtf8,
48
+ };
49
+ };
50
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
8
+ return {
9
+ ...browserDefaults,
10
+ ...config,
11
+ runtime: "react-native",
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
13
+ };
14
+ };
15
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
5
+ const url_parser_1 = require("@aws-sdk/url-parser");
6
+ const util_base64_1 = require("@aws-sdk/util-base64");
7
+ const endpointResolver_1 = require("./endpoint/endpointResolver");
8
+ const getRuntimeConfig = (config) => ({
9
+ apiVersion: "2022-11-28",
10
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
11
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
12
+ disableHostPrefix: config?.disableHostPrefix ?? false,
13
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
14
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
15
+ serviceId: config?.serviceId ?? "DocDB Elastic",
16
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
17
+ });
18
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,198 @@
1
+ import { CreateClusterCommand, } from "./commands/CreateClusterCommand";
2
+ import { CreateClusterSnapshotCommand, } from "./commands/CreateClusterSnapshotCommand";
3
+ import { DeleteClusterCommand, } from "./commands/DeleteClusterCommand";
4
+ import { DeleteClusterSnapshotCommand, } from "./commands/DeleteClusterSnapshotCommand";
5
+ import { GetClusterCommand } from "./commands/GetClusterCommand";
6
+ import { GetClusterSnapshotCommand, } from "./commands/GetClusterSnapshotCommand";
7
+ import { ListClustersCommand, } from "./commands/ListClustersCommand";
8
+ import { ListClusterSnapshotsCommand, } from "./commands/ListClusterSnapshotsCommand";
9
+ import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
10
+ import { RestoreClusterFromSnapshotCommand, } from "./commands/RestoreClusterFromSnapshotCommand";
11
+ import { TagResourceCommand } from "./commands/TagResourceCommand";
12
+ import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
13
+ import { UpdateClusterCommand, } from "./commands/UpdateClusterCommand";
14
+ import { DocDBElasticClient } from "./DocDBElasticClient";
15
+ export class DocDBElastic extends DocDBElasticClient {
16
+ createCluster(args, optionsOrCb, cb) {
17
+ const command = new CreateClusterCommand(args);
18
+ if (typeof optionsOrCb === "function") {
19
+ this.send(command, optionsOrCb);
20
+ }
21
+ else if (typeof cb === "function") {
22
+ if (typeof optionsOrCb !== "object")
23
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
24
+ this.send(command, optionsOrCb || {}, cb);
25
+ }
26
+ else {
27
+ return this.send(command, optionsOrCb);
28
+ }
29
+ }
30
+ createClusterSnapshot(args, optionsOrCb, cb) {
31
+ const command = new CreateClusterSnapshotCommand(args);
32
+ if (typeof optionsOrCb === "function") {
33
+ this.send(command, optionsOrCb);
34
+ }
35
+ else if (typeof cb === "function") {
36
+ if (typeof optionsOrCb !== "object")
37
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
38
+ this.send(command, optionsOrCb || {}, cb);
39
+ }
40
+ else {
41
+ return this.send(command, optionsOrCb);
42
+ }
43
+ }
44
+ deleteCluster(args, optionsOrCb, cb) {
45
+ const command = new DeleteClusterCommand(args);
46
+ if (typeof optionsOrCb === "function") {
47
+ this.send(command, optionsOrCb);
48
+ }
49
+ else if (typeof cb === "function") {
50
+ if (typeof optionsOrCb !== "object")
51
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
52
+ this.send(command, optionsOrCb || {}, cb);
53
+ }
54
+ else {
55
+ return this.send(command, optionsOrCb);
56
+ }
57
+ }
58
+ deleteClusterSnapshot(args, optionsOrCb, cb) {
59
+ const command = new DeleteClusterSnapshotCommand(args);
60
+ if (typeof optionsOrCb === "function") {
61
+ this.send(command, optionsOrCb);
62
+ }
63
+ else if (typeof cb === "function") {
64
+ if (typeof optionsOrCb !== "object")
65
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
66
+ this.send(command, optionsOrCb || {}, cb);
67
+ }
68
+ else {
69
+ return this.send(command, optionsOrCb);
70
+ }
71
+ }
72
+ getCluster(args, optionsOrCb, cb) {
73
+ const command = new GetClusterCommand(args);
74
+ if (typeof optionsOrCb === "function") {
75
+ this.send(command, optionsOrCb);
76
+ }
77
+ else if (typeof cb === "function") {
78
+ if (typeof optionsOrCb !== "object")
79
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
80
+ this.send(command, optionsOrCb || {}, cb);
81
+ }
82
+ else {
83
+ return this.send(command, optionsOrCb);
84
+ }
85
+ }
86
+ getClusterSnapshot(args, optionsOrCb, cb) {
87
+ const command = new GetClusterSnapshotCommand(args);
88
+ if (typeof optionsOrCb === "function") {
89
+ this.send(command, optionsOrCb);
90
+ }
91
+ else if (typeof cb === "function") {
92
+ if (typeof optionsOrCb !== "object")
93
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
94
+ this.send(command, optionsOrCb || {}, cb);
95
+ }
96
+ else {
97
+ return this.send(command, optionsOrCb);
98
+ }
99
+ }
100
+ listClusters(args, optionsOrCb, cb) {
101
+ const command = new ListClustersCommand(args);
102
+ if (typeof optionsOrCb === "function") {
103
+ this.send(command, optionsOrCb);
104
+ }
105
+ else if (typeof cb === "function") {
106
+ if (typeof optionsOrCb !== "object")
107
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
108
+ this.send(command, optionsOrCb || {}, cb);
109
+ }
110
+ else {
111
+ return this.send(command, optionsOrCb);
112
+ }
113
+ }
114
+ listClusterSnapshots(args, optionsOrCb, cb) {
115
+ const command = new ListClusterSnapshotsCommand(args);
116
+ if (typeof optionsOrCb === "function") {
117
+ this.send(command, optionsOrCb);
118
+ }
119
+ else if (typeof cb === "function") {
120
+ if (typeof optionsOrCb !== "object")
121
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
122
+ this.send(command, optionsOrCb || {}, cb);
123
+ }
124
+ else {
125
+ return this.send(command, optionsOrCb);
126
+ }
127
+ }
128
+ listTagsForResource(args, optionsOrCb, cb) {
129
+ const command = new ListTagsForResourceCommand(args);
130
+ if (typeof optionsOrCb === "function") {
131
+ this.send(command, optionsOrCb);
132
+ }
133
+ else if (typeof cb === "function") {
134
+ if (typeof optionsOrCb !== "object")
135
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
136
+ this.send(command, optionsOrCb || {}, cb);
137
+ }
138
+ else {
139
+ return this.send(command, optionsOrCb);
140
+ }
141
+ }
142
+ restoreClusterFromSnapshot(args, optionsOrCb, cb) {
143
+ const command = new RestoreClusterFromSnapshotCommand(args);
144
+ if (typeof optionsOrCb === "function") {
145
+ this.send(command, optionsOrCb);
146
+ }
147
+ else if (typeof cb === "function") {
148
+ if (typeof optionsOrCb !== "object")
149
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
150
+ this.send(command, optionsOrCb || {}, cb);
151
+ }
152
+ else {
153
+ return this.send(command, optionsOrCb);
154
+ }
155
+ }
156
+ tagResource(args, optionsOrCb, cb) {
157
+ const command = new TagResourceCommand(args);
158
+ if (typeof optionsOrCb === "function") {
159
+ this.send(command, optionsOrCb);
160
+ }
161
+ else if (typeof cb === "function") {
162
+ if (typeof optionsOrCb !== "object")
163
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
164
+ this.send(command, optionsOrCb || {}, cb);
165
+ }
166
+ else {
167
+ return this.send(command, optionsOrCb);
168
+ }
169
+ }
170
+ untagResource(args, optionsOrCb, cb) {
171
+ const command = new UntagResourceCommand(args);
172
+ if (typeof optionsOrCb === "function") {
173
+ this.send(command, optionsOrCb);
174
+ }
175
+ else if (typeof cb === "function") {
176
+ if (typeof optionsOrCb !== "object")
177
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
178
+ this.send(command, optionsOrCb || {}, cb);
179
+ }
180
+ else {
181
+ return this.send(command, optionsOrCb);
182
+ }
183
+ }
184
+ updateCluster(args, optionsOrCb, cb) {
185
+ const command = new UpdateClusterCommand(args);
186
+ if (typeof optionsOrCb === "function") {
187
+ this.send(command, optionsOrCb);
188
+ }
189
+ else if (typeof cb === "function") {
190
+ if (typeof optionsOrCb !== "object")
191
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
192
+ this.send(command, optionsOrCb || {}, cb);
193
+ }
194
+ else {
195
+ return this.send(command, optionsOrCb);
196
+ }
197
+ }
198
+ }
@@ -0,0 +1,36 @@
1
+ import { resolveRegionConfig } from "@aws-sdk/config-resolver";
2
+ import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
3
+ import { resolveEndpointConfig } from "@aws-sdk/middleware-endpoint";
4
+ import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
5
+ import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
6
+ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
7
+ import { getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
8
+ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
9
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
10
+ import { Client as __Client, } from "@aws-sdk/smithy-client";
11
+ import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
12
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
13
+ export class DocDBElasticClient extends __Client {
14
+ constructor(configuration) {
15
+ const _config_0 = __getRuntimeConfig(configuration);
16
+ const _config_1 = resolveClientEndpointParameters(_config_0);
17
+ const _config_2 = resolveRegionConfig(_config_1);
18
+ const _config_3 = resolveEndpointConfig(_config_2);
19
+ const _config_4 = resolveRetryConfig(_config_3);
20
+ const _config_5 = resolveHostHeaderConfig(_config_4);
21
+ const _config_6 = resolveAwsAuthConfig(_config_5);
22
+ const _config_7 = resolveUserAgentConfig(_config_6);
23
+ super(_config_7);
24
+ this.config = _config_7;
25
+ this.middlewareStack.use(getRetryPlugin(this.config));
26
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
27
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
28
+ this.middlewareStack.use(getLoggerPlugin(this.config));
29
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
30
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
31
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
32
+ }
33
+ destroy() {
34
+ super.destroy();
35
+ }
36
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { CreateClusterInputFilterSensitiveLog, CreateClusterOutputFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1CreateClusterCommand, serializeAws_restJson1CreateClusterCommand, } from "../protocols/Aws_restJson1";
6
+ export class CreateClusterCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, CreateClusterCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DocDBElasticClient";
25
+ const commandName = "CreateClusterCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: CreateClusterInputFilterSensitiveLog,
31
+ outputFilterSensitiveLog: CreateClusterOutputFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1CreateClusterCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1CreateClusterCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { CreateClusterSnapshotInputFilterSensitiveLog, CreateClusterSnapshotOutputFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1CreateClusterSnapshotCommand, serializeAws_restJson1CreateClusterSnapshotCommand, } from "../protocols/Aws_restJson1";
6
+ export class CreateClusterSnapshotCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, CreateClusterSnapshotCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DocDBElasticClient";
25
+ const commandName = "CreateClusterSnapshotCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: CreateClusterSnapshotInputFilterSensitiveLog,
31
+ outputFilterSensitiveLog: CreateClusterSnapshotOutputFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1CreateClusterSnapshotCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1CreateClusterSnapshotCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { DeleteClusterInputFilterSensitiveLog, DeleteClusterOutputFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1DeleteClusterCommand, serializeAws_restJson1DeleteClusterCommand, } from "../protocols/Aws_restJson1";
6
+ export class DeleteClusterCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, DeleteClusterCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DocDBElasticClient";
25
+ const commandName = "DeleteClusterCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: DeleteClusterInputFilterSensitiveLog,
31
+ outputFilterSensitiveLog: DeleteClusterOutputFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1DeleteClusterCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1DeleteClusterCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { DeleteClusterSnapshotInputFilterSensitiveLog, DeleteClusterSnapshotOutputFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1DeleteClusterSnapshotCommand, serializeAws_restJson1DeleteClusterSnapshotCommand, } from "../protocols/Aws_restJson1";
6
+ export class DeleteClusterSnapshotCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, DeleteClusterSnapshotCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DocDBElasticClient";
25
+ const commandName = "DeleteClusterSnapshotCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: DeleteClusterSnapshotInputFilterSensitiveLog,
31
+ outputFilterSensitiveLog: DeleteClusterSnapshotOutputFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1DeleteClusterSnapshotCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1DeleteClusterSnapshotCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { GetClusterInputFilterSensitiveLog, GetClusterOutputFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1GetClusterCommand, serializeAws_restJson1GetClusterCommand, } from "../protocols/Aws_restJson1";
6
+ export class GetClusterCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, GetClusterCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DocDBElasticClient";
25
+ const commandName = "GetClusterCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: GetClusterInputFilterSensitiveLog,
31
+ outputFilterSensitiveLog: GetClusterOutputFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1GetClusterCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1GetClusterCommand(output, context);
41
+ }
42
+ }
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { GetClusterSnapshotInputFilterSensitiveLog, GetClusterSnapshotOutputFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1GetClusterSnapshotCommand, serializeAws_restJson1GetClusterSnapshotCommand, } from "../protocols/Aws_restJson1";
6
+ export class GetClusterSnapshotCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, GetClusterSnapshotCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "DocDBElasticClient";
25
+ const commandName = "GetClusterSnapshotCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: GetClusterSnapshotInputFilterSensitiveLog,
31
+ outputFilterSensitiveLog: GetClusterSnapshotOutputFilterSensitiveLog,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return serializeAws_restJson1GetClusterSnapshotCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return deserializeAws_restJson1GetClusterSnapshotCommand(output, context);
41
+ }
42
+ }