Skip to content

Commit c995dd7

Browse files
author
awstools
committed
feat(client-docdb-elastic): Launched Elastic Clusters Readable Secondaries, Start/Stop, Configurable Shard Instance count, Automatic Backups and Snapshot Copying
1 parent eddad24 commit c995dd7

24 files changed

+1879
-376
lines changed

clients/client-docdb-elastic/README.md

+40-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,22 @@
66

77
AWS SDK for JavaScript DocDBElastic Client for Node.js, Browser and React Native.
88

9-
<p>The new Amazon Elastic DocumentDB service endpoint.</p>
9+
<fullname>Amazon DocumentDB elastic clusters</fullname>
10+
11+
<p>Amazon DocumentDB elastic-clusters support workloads with millions of reads/writes per second and petabytes of storage capacity.
12+
Amazon DocumentDB elastic clusters also simplify how developers interact with Amazon DocumentDB elastic-clusters by eliminating the need to choose, manage or upgrade instances.</p>
13+
<p>Amazon DocumentDB elastic-clusters were created to:</p>
14+
<ul>
15+
<li>
16+
<p>provide a solution for customers looking for a database that provides virtually limitless scale with rich query capabilities and MongoDB API compatibility.</p>
17+
</li>
18+
<li>
19+
<p>give customers higher connection limits, and to reduce downtime from patching.</p>
20+
</li>
21+
<li>
22+
<p>continue investing in a cloud-native, elastic, and class leading architecture for JSON workloads.</p>
23+
</li>
24+
</ul>
1025

1126
## Installing
1227

@@ -203,6 +218,14 @@ see LICENSE for more information.
203218

204219
## Client Commands (Operations List)
205220

221+
<details>
222+
<summary>
223+
CopyClusterSnapshot
224+
</summary>
225+
226+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/docdb-elastic/command/CopyClusterSnapshotCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/CopyClusterSnapshotCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/CopyClusterSnapshotCommandOutput/)
227+
228+
</details>
206229
<details>
207230
<summary>
208231
CreateCluster
@@ -282,6 +305,22 @@ RestoreClusterFromSnapshot
282305

283306
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/docdb-elastic/command/RestoreClusterFromSnapshotCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/RestoreClusterFromSnapshotCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/RestoreClusterFromSnapshotCommandOutput/)
284307

308+
</details>
309+
<details>
310+
<summary>
311+
StartCluster
312+
</summary>
313+
314+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/docdb-elastic/command/StartClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/StartClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/StartClusterCommandOutput/)
315+
316+
</details>
317+
<details>
318+
<summary>
319+
StopCluster
320+
</summary>
321+
322+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/docdb-elastic/command/StopClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/StopClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/StopClusterCommandOutput/)
323+
285324
</details>
286325
<details>
287326
<summary>

clients/client-docdb-elastic/src/DocDBElastic.ts

+68-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
import { createAggregatedClient } from "@smithy/smithy-client";
33
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
44

5+
import {
6+
CopyClusterSnapshotCommand,
7+
CopyClusterSnapshotCommandInput,
8+
CopyClusterSnapshotCommandOutput,
9+
} from "./commands/CopyClusterSnapshotCommand";
510
import {
611
CreateClusterCommand,
712
CreateClusterCommandInput,
@@ -48,6 +53,12 @@ import {
4853
RestoreClusterFromSnapshotCommandInput,
4954
RestoreClusterFromSnapshotCommandOutput,
5055
} from "./commands/RestoreClusterFromSnapshotCommand";
56+
import {
57+
StartClusterCommand,
58+
StartClusterCommandInput,
59+
StartClusterCommandOutput,
60+
} from "./commands/StartClusterCommand";
61+
import { StopClusterCommand, StopClusterCommandInput, StopClusterCommandOutput } from "./commands/StopClusterCommand";
5162
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
5263
import {
5364
UntagResourceCommand,
@@ -62,6 +73,7 @@ import {
6273
import { DocDBElasticClient, DocDBElasticClientConfig } from "./DocDBElasticClient";
6374

6475
const commands = {
76+
CopyClusterSnapshotCommand,
6577
CreateClusterCommand,
6678
CreateClusterSnapshotCommand,
6779
DeleteClusterCommand,
@@ -72,12 +84,31 @@ const commands = {
7284
ListClusterSnapshotsCommand,
7385
ListTagsForResourceCommand,
7486
RestoreClusterFromSnapshotCommand,
87+
StartClusterCommand,
88+
StopClusterCommand,
7589
TagResourceCommand,
7690
UntagResourceCommand,
7791
UpdateClusterCommand,
7892
};
7993

8094
export interface DocDBElastic {
95+
/**
96+
* @see {@link CopyClusterSnapshotCommand}
97+
*/
98+
copyClusterSnapshot(
99+
args: CopyClusterSnapshotCommandInput,
100+
options?: __HttpHandlerOptions
101+
): Promise<CopyClusterSnapshotCommandOutput>;
102+
copyClusterSnapshot(
103+
args: CopyClusterSnapshotCommandInput,
104+
cb: (err: any, data?: CopyClusterSnapshotCommandOutput) => void
105+
): void;
106+
copyClusterSnapshot(
107+
args: CopyClusterSnapshotCommandInput,
108+
options: __HttpHandlerOptions,
109+
cb: (err: any, data?: CopyClusterSnapshotCommandOutput) => void
110+
): void;
111+
81112
/**
82113
* @see {@link CreateClusterCommand}
83114
*/
@@ -224,6 +255,28 @@ export interface DocDBElastic {
224255
cb: (err: any, data?: RestoreClusterFromSnapshotCommandOutput) => void
225256
): void;
226257

258+
/**
259+
* @see {@link StartClusterCommand}
260+
*/
261+
startCluster(args: StartClusterCommandInput, options?: __HttpHandlerOptions): Promise<StartClusterCommandOutput>;
262+
startCluster(args: StartClusterCommandInput, cb: (err: any, data?: StartClusterCommandOutput) => void): void;
263+
startCluster(
264+
args: StartClusterCommandInput,
265+
options: __HttpHandlerOptions,
266+
cb: (err: any, data?: StartClusterCommandOutput) => void
267+
): void;
268+
269+
/**
270+
* @see {@link StopClusterCommand}
271+
*/
272+
stopCluster(args: StopClusterCommandInput, options?: __HttpHandlerOptions): Promise<StopClusterCommandOutput>;
273+
stopCluster(args: StopClusterCommandInput, cb: (err: any, data?: StopClusterCommandOutput) => void): void;
274+
stopCluster(
275+
args: StopClusterCommandInput,
276+
options: __HttpHandlerOptions,
277+
cb: (err: any, data?: StopClusterCommandOutput) => void
278+
): void;
279+
227280
/**
228281
* @see {@link TagResourceCommand}
229282
*/
@@ -260,7 +313,21 @@ export interface DocDBElastic {
260313

261314
/**
262315
* @public
263-
* <p>The new Amazon Elastic DocumentDB service endpoint.</p>
316+
* <fullname>Amazon DocumentDB elastic clusters</fullname>
317+
* <p>Amazon DocumentDB elastic-clusters support workloads with millions of reads/writes per second and petabytes of storage capacity.
318+
* Amazon DocumentDB elastic clusters also simplify how developers interact with Amazon DocumentDB elastic-clusters by eliminating the need to choose, manage or upgrade instances.</p>
319+
* <p>Amazon DocumentDB elastic-clusters were created to:</p>
320+
* <ul>
321+
* <li>
322+
* <p>provide a solution for customers looking for a database that provides virtually limitless scale with rich query capabilities and MongoDB API compatibility.</p>
323+
* </li>
324+
* <li>
325+
* <p>give customers higher connection limits, and to reduce downtime from patching.</p>
326+
* </li>
327+
* <li>
328+
* <p>continue investing in a cloud-native, elastic, and class leading architecture for JSON workloads.</p>
329+
* </li>
330+
* </ul>
264331
*/
265332
export class DocDBElastic extends DocDBElasticClient implements DocDBElastic {}
266333
createAggregatedClient(commands, DocDBElastic);

clients/client-docdb-elastic/src/DocDBElasticClient.ts

+27-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ import {
5353
HttpAuthSchemeResolvedConfig,
5454
resolveHttpAuthSchemeConfig,
5555
} from "./auth/httpAuthSchemeProvider";
56+
import {
57+
CopyClusterSnapshotCommandInput,
58+
CopyClusterSnapshotCommandOutput,
59+
} from "./commands/CopyClusterSnapshotCommand";
5660
import { CreateClusterCommandInput, CreateClusterCommandOutput } from "./commands/CreateClusterCommand";
5761
import {
5862
CreateClusterSnapshotCommandInput,
@@ -78,6 +82,8 @@ import {
7882
RestoreClusterFromSnapshotCommandInput,
7983
RestoreClusterFromSnapshotCommandOutput,
8084
} from "./commands/RestoreClusterFromSnapshotCommand";
85+
import { StartClusterCommandInput, StartClusterCommandOutput } from "./commands/StartClusterCommand";
86+
import { StopClusterCommandInput, StopClusterCommandOutput } from "./commands/StopClusterCommand";
8187
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
8288
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
8389
import { UpdateClusterCommandInput, UpdateClusterCommandOutput } from "./commands/UpdateClusterCommand";
@@ -96,6 +102,7 @@ export { __Client };
96102
* @public
97103
*/
98104
export type ServiceInputTypes =
105+
| CopyClusterSnapshotCommandInput
99106
| CreateClusterCommandInput
100107
| CreateClusterSnapshotCommandInput
101108
| DeleteClusterCommandInput
@@ -106,6 +113,8 @@ export type ServiceInputTypes =
106113
| ListClustersCommandInput
107114
| ListTagsForResourceCommandInput
108115
| RestoreClusterFromSnapshotCommandInput
116+
| StartClusterCommandInput
117+
| StopClusterCommandInput
109118
| TagResourceCommandInput
110119
| UntagResourceCommandInput
111120
| UpdateClusterCommandInput;
@@ -114,6 +123,7 @@ export type ServiceInputTypes =
114123
* @public
115124
*/
116125
export type ServiceOutputTypes =
126+
| CopyClusterSnapshotCommandOutput
117127
| CreateClusterCommandOutput
118128
| CreateClusterSnapshotCommandOutput
119129
| DeleteClusterCommandOutput
@@ -124,6 +134,8 @@ export type ServiceOutputTypes =
124134
| ListClustersCommandOutput
125135
| ListTagsForResourceCommandOutput
126136
| RestoreClusterFromSnapshotCommandOutput
137+
| StartClusterCommandOutput
138+
| StopClusterCommandOutput
127139
| TagResourceCommandOutput
128140
| UntagResourceCommandOutput
129141
| UpdateClusterCommandOutput;
@@ -301,7 +313,21 @@ export interface DocDBElasticClientResolvedConfig extends DocDBElasticClientReso
301313

302314
/**
303315
* @public
304-
* <p>The new Amazon Elastic DocumentDB service endpoint.</p>
316+
* <fullname>Amazon DocumentDB elastic clusters</fullname>
317+
* <p>Amazon DocumentDB elastic-clusters support workloads with millions of reads/writes per second and petabytes of storage capacity.
318+
* Amazon DocumentDB elastic clusters also simplify how developers interact with Amazon DocumentDB elastic-clusters by eliminating the need to choose, manage or upgrade instances.</p>
319+
* <p>Amazon DocumentDB elastic-clusters were created to:</p>
320+
* <ul>
321+
* <li>
322+
* <p>provide a solution for customers looking for a database that provides virtually limitless scale with rich query capabilities and MongoDB API compatibility.</p>
323+
* </li>
324+
* <li>
325+
* <p>give customers higher connection limits, and to reduce downtime from patching.</p>
326+
* </li>
327+
* <li>
328+
* <p>continue investing in a cloud-native, elastic, and class leading architecture for JSON workloads.</p>
329+
* </li>
330+
* </ul>
305331
*/
306332
export class DocDBElasticClient extends __Client<
307333
__HttpHandlerOptions,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { DocDBElasticClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DocDBElasticClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { CopyClusterSnapshotInput, CopyClusterSnapshotOutput } from "../models/models_0";
10+
import { de_CopyClusterSnapshotCommand, se_CopyClusterSnapshotCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export { __MetadataBearer, $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link CopyClusterSnapshotCommand}.
20+
*/
21+
export interface CopyClusterSnapshotCommandInput extends CopyClusterSnapshotInput {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link CopyClusterSnapshotCommand}.
26+
*/
27+
export interface CopyClusterSnapshotCommandOutput extends CopyClusterSnapshotOutput, __MetadataBearer {}
28+
29+
/**
30+
* @public
31+
* <p>Copies a snapshot of an elastic cluster.</p>
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { DocDBElasticClient, CopyClusterSnapshotCommand } from "@aws-sdk/client-docdb-elastic"; // ES Modules import
36+
* // const { DocDBElasticClient, CopyClusterSnapshotCommand } = require("@aws-sdk/client-docdb-elastic"); // CommonJS import
37+
* const client = new DocDBElasticClient(config);
38+
* const input = { // CopyClusterSnapshotInput
39+
* snapshotArn: "STRING_VALUE", // required
40+
* targetSnapshotName: "STRING_VALUE", // required
41+
* kmsKeyId: "STRING_VALUE",
42+
* copyTags: true || false,
43+
* tags: { // TagMap
44+
* "<keys>": "STRING_VALUE",
45+
* },
46+
* };
47+
* const command = new CopyClusterSnapshotCommand(input);
48+
* const response = await client.send(command);
49+
* // { // CopyClusterSnapshotOutput
50+
* // snapshot: { // ClusterSnapshot
51+
* // subnetIds: [ // StringList // required
52+
* // "STRING_VALUE",
53+
* // ],
54+
* // snapshotName: "STRING_VALUE", // required
55+
* // snapshotArn: "STRING_VALUE", // required
56+
* // snapshotCreationTime: "STRING_VALUE", // required
57+
* // clusterArn: "STRING_VALUE", // required
58+
* // clusterCreationTime: "STRING_VALUE", // required
59+
* // status: "STRING_VALUE", // required
60+
* // vpcSecurityGroupIds: [ // required
61+
* // "STRING_VALUE",
62+
* // ],
63+
* // adminUserName: "STRING_VALUE", // required
64+
* // kmsKeyId: "STRING_VALUE", // required
65+
* // snapshotType: "STRING_VALUE",
66+
* // },
67+
* // };
68+
*
69+
* ```
70+
*
71+
* @param CopyClusterSnapshotCommandInput - {@link CopyClusterSnapshotCommandInput}
72+
* @returns {@link CopyClusterSnapshotCommandOutput}
73+
* @see {@link CopyClusterSnapshotCommandInput} for command's `input` shape.
74+
* @see {@link CopyClusterSnapshotCommandOutput} for command's `response` shape.
75+
* @see {@link DocDBElasticClientResolvedConfig | config} for DocDBElasticClient's `config` shape.
76+
*
77+
* @throws {@link AccessDeniedException} (client fault)
78+
* <p>An exception that occurs when there are not sufficient permissions to perform an action.</p>
79+
*
80+
* @throws {@link ConflictException} (client fault)
81+
* <p>There was an access conflict.</p>
82+
*
83+
* @throws {@link InternalServerException} (server fault)
84+
* <p>There was an internal server error.</p>
85+
*
86+
* @throws {@link ResourceNotFoundException} (client fault)
87+
* <p>The specified resource could not be located.</p>
88+
*
89+
* @throws {@link ServiceQuotaExceededException} (client fault)
90+
* <p>The service quota for the action was exceeded.</p>
91+
*
92+
* @throws {@link ThrottlingException} (client fault)
93+
* <p>ThrottlingException will be thrown when request was denied due to request throttling.</p>
94+
*
95+
* @throws {@link ValidationException} (client fault)
96+
* <p>A structure defining a validation exception.</p>
97+
*
98+
* @throws {@link DocDBElasticServiceException}
99+
* <p>Base exception class for all service exceptions from DocDBElastic service.</p>
100+
*
101+
*/
102+
export class CopyClusterSnapshotCommand extends $Command
103+
.classBuilder<
104+
CopyClusterSnapshotCommandInput,
105+
CopyClusterSnapshotCommandOutput,
106+
DocDBElasticClientResolvedConfig,
107+
ServiceInputTypes,
108+
ServiceOutputTypes
109+
>()
110+
.ep({
111+
...commonParams,
112+
})
113+
.m(function (this: any, Command: any, cs: any, config: DocDBElasticClientResolvedConfig, o: any) {
114+
return [
115+
getSerdePlugin(config, this.serialize, this.deserialize),
116+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
117+
];
118+
})
119+
.s("ChimeraDbLionfishServiceLambda", "CopyClusterSnapshot", {})
120+
.n("DocDBElasticClient", "CopyClusterSnapshotCommand")
121+
.f(void 0, void 0)
122+
.ser(se_CopyClusterSnapshotCommand)
123+
.de(de_CopyClusterSnapshotCommand)
124+
.build() {}

0 commit comments

Comments
 (0)