Skip to content

Commit

Permalink
feat(client-docdb-elastic): Launched Elastic Clusters Readable Second…
Browse files Browse the repository at this point in the history
…aries, Start/Stop, Configurable Shard Instance count, Automatic Backups and Snapshot Copying
  • Loading branch information
awstools committed Feb 29, 2024
1 parent eddad24 commit c995dd7
Show file tree
Hide file tree
Showing 24 changed files with 1,879 additions and 376 deletions.
41 changes: 40 additions & 1 deletion clients/client-docdb-elastic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,22 @@

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

<p>The new Amazon Elastic DocumentDB service endpoint.</p>
<fullname>Amazon DocumentDB elastic clusters</fullname>

<p>Amazon DocumentDB elastic-clusters support workloads with millions of reads/writes per second and petabytes of storage capacity.
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>
<p>Amazon DocumentDB elastic-clusters were created to:</p>
<ul>
<li>
<p>provide a solution for customers looking for a database that provides virtually limitless scale with rich query capabilities and MongoDB API compatibility.</p>
</li>
<li>
<p>give customers higher connection limits, and to reduce downtime from patching.</p>
</li>
<li>
<p>continue investing in a cloud-native, elastic, and class leading architecture for JSON workloads.</p>
</li>
</ul>

## Installing

Expand Down Expand Up @@ -203,6 +218,14 @@ see LICENSE for more information.

## Client Commands (Operations List)

<details>
<summary>
CopyClusterSnapshot
</summary>

[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/)

</details>
<details>
<summary>
CreateCluster
Expand Down Expand Up @@ -282,6 +305,22 @@ RestoreClusterFromSnapshot

[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/)

</details>
<details>
<summary>
StartCluster
</summary>

[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/)

</details>
<details>
<summary>
StopCluster
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
69 changes: 68 additions & 1 deletion clients/client-docdb-elastic/src/DocDBElastic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
import { createAggregatedClient } from "@smithy/smithy-client";
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";

import {
CopyClusterSnapshotCommand,
CopyClusterSnapshotCommandInput,
CopyClusterSnapshotCommandOutput,
} from "./commands/CopyClusterSnapshotCommand";
import {
CreateClusterCommand,
CreateClusterCommandInput,
Expand Down Expand Up @@ -48,6 +53,12 @@ import {
RestoreClusterFromSnapshotCommandInput,
RestoreClusterFromSnapshotCommandOutput,
} from "./commands/RestoreClusterFromSnapshotCommand";
import {
StartClusterCommand,
StartClusterCommandInput,
StartClusterCommandOutput,
} from "./commands/StartClusterCommand";
import { StopClusterCommand, StopClusterCommandInput, StopClusterCommandOutput } from "./commands/StopClusterCommand";
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import {
UntagResourceCommand,
Expand All @@ -62,6 +73,7 @@ import {
import { DocDBElasticClient, DocDBElasticClientConfig } from "./DocDBElasticClient";

const commands = {
CopyClusterSnapshotCommand,
CreateClusterCommand,
CreateClusterSnapshotCommand,
DeleteClusterCommand,
Expand All @@ -72,12 +84,31 @@ const commands = {
ListClusterSnapshotsCommand,
ListTagsForResourceCommand,
RestoreClusterFromSnapshotCommand,
StartClusterCommand,
StopClusterCommand,
TagResourceCommand,
UntagResourceCommand,
UpdateClusterCommand,
};

export interface DocDBElastic {
/**
* @see {@link CopyClusterSnapshotCommand}
*/
copyClusterSnapshot(
args: CopyClusterSnapshotCommandInput,
options?: __HttpHandlerOptions
): Promise<CopyClusterSnapshotCommandOutput>;
copyClusterSnapshot(
args: CopyClusterSnapshotCommandInput,
cb: (err: any, data?: CopyClusterSnapshotCommandOutput) => void
): void;
copyClusterSnapshot(
args: CopyClusterSnapshotCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CopyClusterSnapshotCommandOutput) => void
): void;

/**
* @see {@link CreateClusterCommand}
*/
Expand Down Expand Up @@ -224,6 +255,28 @@ export interface DocDBElastic {
cb: (err: any, data?: RestoreClusterFromSnapshotCommandOutput) => void
): void;

/**
* @see {@link StartClusterCommand}
*/
startCluster(args: StartClusterCommandInput, options?: __HttpHandlerOptions): Promise<StartClusterCommandOutput>;
startCluster(args: StartClusterCommandInput, cb: (err: any, data?: StartClusterCommandOutput) => void): void;
startCluster(
args: StartClusterCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StartClusterCommandOutput) => void
): void;

/**
* @see {@link StopClusterCommand}
*/
stopCluster(args: StopClusterCommandInput, options?: __HttpHandlerOptions): Promise<StopClusterCommandOutput>;
stopCluster(args: StopClusterCommandInput, cb: (err: any, data?: StopClusterCommandOutput) => void): void;
stopCluster(
args: StopClusterCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StopClusterCommandOutput) => void
): void;

/**
* @see {@link TagResourceCommand}
*/
Expand Down Expand Up @@ -260,7 +313,21 @@ export interface DocDBElastic {

/**
* @public
* <p>The new Amazon Elastic DocumentDB service endpoint.</p>
* <fullname>Amazon DocumentDB elastic clusters</fullname>
* <p>Amazon DocumentDB elastic-clusters support workloads with millions of reads/writes per second and petabytes of storage capacity.
* 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>
* <p>Amazon DocumentDB elastic-clusters were created to:</p>
* <ul>
* <li>
* <p>provide a solution for customers looking for a database that provides virtually limitless scale with rich query capabilities and MongoDB API compatibility.</p>
* </li>
* <li>
* <p>give customers higher connection limits, and to reduce downtime from patching.</p>
* </li>
* <li>
* <p>continue investing in a cloud-native, elastic, and class leading architecture for JSON workloads.</p>
* </li>
* </ul>
*/
export class DocDBElastic extends DocDBElasticClient implements DocDBElastic {}
createAggregatedClient(commands, DocDBElastic);
28 changes: 27 additions & 1 deletion clients/client-docdb-elastic/src/DocDBElasticClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ import {
HttpAuthSchemeResolvedConfig,
resolveHttpAuthSchemeConfig,
} from "./auth/httpAuthSchemeProvider";
import {
CopyClusterSnapshotCommandInput,
CopyClusterSnapshotCommandOutput,
} from "./commands/CopyClusterSnapshotCommand";
import { CreateClusterCommandInput, CreateClusterCommandOutput } from "./commands/CreateClusterCommand";
import {
CreateClusterSnapshotCommandInput,
Expand All @@ -78,6 +82,8 @@ import {
RestoreClusterFromSnapshotCommandInput,
RestoreClusterFromSnapshotCommandOutput,
} from "./commands/RestoreClusterFromSnapshotCommand";
import { StartClusterCommandInput, StartClusterCommandOutput } from "./commands/StartClusterCommand";
import { StopClusterCommandInput, StopClusterCommandOutput } from "./commands/StopClusterCommand";
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
import { UpdateClusterCommandInput, UpdateClusterCommandOutput } from "./commands/UpdateClusterCommand";
Expand All @@ -96,6 +102,7 @@ export { __Client };
* @public
*/
export type ServiceInputTypes =
| CopyClusterSnapshotCommandInput
| CreateClusterCommandInput
| CreateClusterSnapshotCommandInput
| DeleteClusterCommandInput
Expand All @@ -106,6 +113,8 @@ export type ServiceInputTypes =
| ListClustersCommandInput
| ListTagsForResourceCommandInput
| RestoreClusterFromSnapshotCommandInput
| StartClusterCommandInput
| StopClusterCommandInput
| TagResourceCommandInput
| UntagResourceCommandInput
| UpdateClusterCommandInput;
Expand All @@ -114,6 +123,7 @@ export type ServiceInputTypes =
* @public
*/
export type ServiceOutputTypes =
| CopyClusterSnapshotCommandOutput
| CreateClusterCommandOutput
| CreateClusterSnapshotCommandOutput
| DeleteClusterCommandOutput
Expand All @@ -124,6 +134,8 @@ export type ServiceOutputTypes =
| ListClustersCommandOutput
| ListTagsForResourceCommandOutput
| RestoreClusterFromSnapshotCommandOutput
| StartClusterCommandOutput
| StopClusterCommandOutput
| TagResourceCommandOutput
| UntagResourceCommandOutput
| UpdateClusterCommandOutput;
Expand Down Expand Up @@ -301,7 +313,21 @@ export interface DocDBElasticClientResolvedConfig extends DocDBElasticClientReso

/**
* @public
* <p>The new Amazon Elastic DocumentDB service endpoint.</p>
* <fullname>Amazon DocumentDB elastic clusters</fullname>
* <p>Amazon DocumentDB elastic-clusters support workloads with millions of reads/writes per second and petabytes of storage capacity.
* 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>
* <p>Amazon DocumentDB elastic-clusters were created to:</p>
* <ul>
* <li>
* <p>provide a solution for customers looking for a database that provides virtually limitless scale with rich query capabilities and MongoDB API compatibility.</p>
* </li>
* <li>
* <p>give customers higher connection limits, and to reduce downtime from patching.</p>
* </li>
* <li>
* <p>continue investing in a cloud-native, elastic, and class leading architecture for JSON workloads.</p>
* </li>
* </ul>
*/
export class DocDBElasticClient extends __Client<
__HttpHandlerOptions,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { DocDBElasticClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DocDBElasticClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { CopyClusterSnapshotInput, CopyClusterSnapshotOutput } from "../models/models_0";
import { de_CopyClusterSnapshotCommand, se_CopyClusterSnapshotCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link CopyClusterSnapshotCommand}.
*/
export interface CopyClusterSnapshotCommandInput extends CopyClusterSnapshotInput {}
/**
* @public
*
* The output of {@link CopyClusterSnapshotCommand}.
*/
export interface CopyClusterSnapshotCommandOutput extends CopyClusterSnapshotOutput, __MetadataBearer {}

/**
* @public
* <p>Copies a snapshot of an elastic cluster.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { DocDBElasticClient, CopyClusterSnapshotCommand } from "@aws-sdk/client-docdb-elastic"; // ES Modules import
* // const { DocDBElasticClient, CopyClusterSnapshotCommand } = require("@aws-sdk/client-docdb-elastic"); // CommonJS import
* const client = new DocDBElasticClient(config);
* const input = { // CopyClusterSnapshotInput
* snapshotArn: "STRING_VALUE", // required
* targetSnapshotName: "STRING_VALUE", // required
* kmsKeyId: "STRING_VALUE",
* copyTags: true || false,
* tags: { // TagMap
* "<keys>": "STRING_VALUE",
* },
* };
* const command = new CopyClusterSnapshotCommand(input);
* const response = await client.send(command);
* // { // CopyClusterSnapshotOutput
* // snapshot: { // ClusterSnapshot
* // subnetIds: [ // StringList // required
* // "STRING_VALUE",
* // ],
* // snapshotName: "STRING_VALUE", // required
* // snapshotArn: "STRING_VALUE", // required
* // snapshotCreationTime: "STRING_VALUE", // required
* // clusterArn: "STRING_VALUE", // required
* // clusterCreationTime: "STRING_VALUE", // required
* // status: "STRING_VALUE", // required
* // vpcSecurityGroupIds: [ // required
* // "STRING_VALUE",
* // ],
* // adminUserName: "STRING_VALUE", // required
* // kmsKeyId: "STRING_VALUE", // required
* // snapshotType: "STRING_VALUE",
* // },
* // };
*
* ```
*
* @param CopyClusterSnapshotCommandInput - {@link CopyClusterSnapshotCommandInput}
* @returns {@link CopyClusterSnapshotCommandOutput}
* @see {@link CopyClusterSnapshotCommandInput} for command's `input` shape.
* @see {@link CopyClusterSnapshotCommandOutput} for command's `response` shape.
* @see {@link DocDBElasticClientResolvedConfig | config} for DocDBElasticClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>An exception that occurs when there are not sufficient permissions to perform an action.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>There was an access conflict.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>There was an internal server error.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource could not be located.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* <p>The service quota for the action was exceeded.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>ThrottlingException will be thrown when request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>A structure defining a validation exception.</p>
*
* @throws {@link DocDBElasticServiceException}
* <p>Base exception class for all service exceptions from DocDBElastic service.</p>
*
*/
export class CopyClusterSnapshotCommand extends $Command
.classBuilder<
CopyClusterSnapshotCommandInput,
CopyClusterSnapshotCommandOutput,
DocDBElasticClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: DocDBElasticClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("ChimeraDbLionfishServiceLambda", "CopyClusterSnapshot", {})
.n("DocDBElasticClient", "CopyClusterSnapshotCommand")
.f(void 0, void 0)
.ser(se_CopyClusterSnapshotCommand)
.de(de_CopyClusterSnapshotCommand)
.build() {}
Loading

0 comments on commit c995dd7

Please sign in to comment.