Skip to content

Commit

Permalink
feat(client-docdb-elastic): Amazon DocumentDB Elastic Clusters adds s…
Browse files Browse the repository at this point in the history
…upport for pending maintenance actions feature with APIs GetPendingMaintenanceAction, ListPendingMaintenanceActions and ApplyPendingMaintenanceAction
  • Loading branch information
awstools committed Nov 1, 2024
1 parent f334800 commit 3bbb1c5
Show file tree
Hide file tree
Showing 12 changed files with 1,406 additions and 161 deletions.
26 changes: 25 additions & 1 deletion clients/client-docdb-elastic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Amazon DocumentDB elastic clusters also simplify how developers interact with Am

## Installing

To install the this package, simply type add or install @aws-sdk/client-docdb-elastic
To install this package, simply type add or install @aws-sdk/client-docdb-elastic
using your favorite package manager:

- `npm install @aws-sdk/client-docdb-elastic`
Expand Down Expand Up @@ -218,6 +218,14 @@ see LICENSE for more information.

## Client Commands (Operations List)

<details>
<summary>
ApplyPendingMaintenanceAction
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/docdb-elastic/command/ApplyPendingMaintenanceActionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/ApplyPendingMaintenanceActionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/ApplyPendingMaintenanceActionCommandOutput/)

</details>
<details>
<summary>
CopyClusterSnapshot
Expand Down Expand Up @@ -273,6 +281,14 @@ GetClusterSnapshot

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/docdb-elastic/command/GetClusterSnapshotCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/GetClusterSnapshotCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/GetClusterSnapshotCommandOutput/)

</details>
<details>
<summary>
GetPendingMaintenanceAction
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/docdb-elastic/command/GetPendingMaintenanceActionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/GetPendingMaintenanceActionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/GetPendingMaintenanceActionCommandOutput/)

</details>
<details>
<summary>
Expand All @@ -289,6 +305,14 @@ ListClusterSnapshots

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/docdb-elastic/command/ListClusterSnapshotsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/ListClusterSnapshotsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/ListClusterSnapshotsCommandOutput/)

</details>
<details>
<summary>
ListPendingMaintenanceActions
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/docdb-elastic/command/ListPendingMaintenanceActionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/ListPendingMaintenanceActionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-docdb-elastic/Interface/ListPendingMaintenanceActionsCommandOutput/)

</details>
<details>
<summary>
Expand Down
70 changes: 70 additions & 0 deletions 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 {
ApplyPendingMaintenanceActionCommand,
ApplyPendingMaintenanceActionCommandInput,
ApplyPendingMaintenanceActionCommandOutput,
} from "./commands/ApplyPendingMaintenanceActionCommand";
import {
CopyClusterSnapshotCommand,
CopyClusterSnapshotCommandInput,
Expand Down Expand Up @@ -33,6 +38,11 @@ import {
GetClusterSnapshotCommandInput,
GetClusterSnapshotCommandOutput,
} from "./commands/GetClusterSnapshotCommand";
import {
GetPendingMaintenanceActionCommand,
GetPendingMaintenanceActionCommandInput,
GetPendingMaintenanceActionCommandOutput,
} from "./commands/GetPendingMaintenanceActionCommand";
import {
ListClustersCommand,
ListClustersCommandInput,
Expand All @@ -43,6 +53,11 @@ import {
ListClusterSnapshotsCommandInput,
ListClusterSnapshotsCommandOutput,
} from "./commands/ListClusterSnapshotsCommand";
import {
ListPendingMaintenanceActionsCommand,
ListPendingMaintenanceActionsCommandInput,
ListPendingMaintenanceActionsCommandOutput,
} from "./commands/ListPendingMaintenanceActionsCommand";
import {
ListTagsForResourceCommand,
ListTagsForResourceCommandInput,
Expand Down Expand Up @@ -73,15 +88,18 @@ import {
import { DocDBElasticClient, DocDBElasticClientConfig } from "./DocDBElasticClient";

const commands = {
ApplyPendingMaintenanceActionCommand,
CopyClusterSnapshotCommand,
CreateClusterCommand,
CreateClusterSnapshotCommand,
DeleteClusterCommand,
DeleteClusterSnapshotCommand,
GetClusterCommand,
GetClusterSnapshotCommand,
GetPendingMaintenanceActionCommand,
ListClustersCommand,
ListClusterSnapshotsCommand,
ListPendingMaintenanceActionsCommand,
ListTagsForResourceCommand,
RestoreClusterFromSnapshotCommand,
StartClusterCommand,
Expand All @@ -92,6 +110,23 @@ const commands = {
};

export interface DocDBElastic {
/**
* @see {@link ApplyPendingMaintenanceActionCommand}
*/
applyPendingMaintenanceAction(
args: ApplyPendingMaintenanceActionCommandInput,
options?: __HttpHandlerOptions
): Promise<ApplyPendingMaintenanceActionCommandOutput>;
applyPendingMaintenanceAction(
args: ApplyPendingMaintenanceActionCommandInput,
cb: (err: any, data?: ApplyPendingMaintenanceActionCommandOutput) => void
): void;
applyPendingMaintenanceAction(
args: ApplyPendingMaintenanceActionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ApplyPendingMaintenanceActionCommandOutput) => void
): void;

/**
* @see {@link CopyClusterSnapshotCommand}
*/
Expand Down Expand Up @@ -193,6 +228,23 @@ export interface DocDBElastic {
cb: (err: any, data?: GetClusterSnapshotCommandOutput) => void
): void;

/**
* @see {@link GetPendingMaintenanceActionCommand}
*/
getPendingMaintenanceAction(
args: GetPendingMaintenanceActionCommandInput,
options?: __HttpHandlerOptions
): Promise<GetPendingMaintenanceActionCommandOutput>;
getPendingMaintenanceAction(
args: GetPendingMaintenanceActionCommandInput,
cb: (err: any, data?: GetPendingMaintenanceActionCommandOutput) => void
): void;
getPendingMaintenanceAction(
args: GetPendingMaintenanceActionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetPendingMaintenanceActionCommandOutput) => void
): void;

/**
* @see {@link ListClustersCommand}
*/
Expand Down Expand Up @@ -223,6 +275,24 @@ export interface DocDBElastic {
cb: (err: any, data?: ListClusterSnapshotsCommandOutput) => void
): void;

/**
* @see {@link ListPendingMaintenanceActionsCommand}
*/
listPendingMaintenanceActions(): Promise<ListPendingMaintenanceActionsCommandOutput>;
listPendingMaintenanceActions(
args: ListPendingMaintenanceActionsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListPendingMaintenanceActionsCommandOutput>;
listPendingMaintenanceActions(
args: ListPendingMaintenanceActionsCommandInput,
cb: (err: any, data?: ListPendingMaintenanceActionsCommandOutput) => void
): void;
listPendingMaintenanceActions(
args: ListPendingMaintenanceActionsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListPendingMaintenanceActionsCommandOutput) => void
): void;

/**
* @see {@link ListTagsForResourceCommand}
*/
Expand Down
18 changes: 18 additions & 0 deletions 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 {
ApplyPendingMaintenanceActionCommandInput,
ApplyPendingMaintenanceActionCommandOutput,
} from "./commands/ApplyPendingMaintenanceActionCommand";
import {
CopyClusterSnapshotCommandInput,
CopyClusterSnapshotCommandOutput,
Expand All @@ -69,11 +73,19 @@ import {
} from "./commands/DeleteClusterSnapshotCommand";
import { GetClusterCommandInput, GetClusterCommandOutput } from "./commands/GetClusterCommand";
import { GetClusterSnapshotCommandInput, GetClusterSnapshotCommandOutput } from "./commands/GetClusterSnapshotCommand";
import {
GetPendingMaintenanceActionCommandInput,
GetPendingMaintenanceActionCommandOutput,
} from "./commands/GetPendingMaintenanceActionCommand";
import { ListClustersCommandInput, ListClustersCommandOutput } from "./commands/ListClustersCommand";
import {
ListClusterSnapshotsCommandInput,
ListClusterSnapshotsCommandOutput,
} from "./commands/ListClusterSnapshotsCommand";
import {
ListPendingMaintenanceActionsCommandInput,
ListPendingMaintenanceActionsCommandOutput,
} from "./commands/ListPendingMaintenanceActionsCommand";
import {
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
Expand Down Expand Up @@ -102,15 +114,18 @@ export { __Client };
* @public
*/
export type ServiceInputTypes =
| ApplyPendingMaintenanceActionCommandInput
| CopyClusterSnapshotCommandInput
| CreateClusterCommandInput
| CreateClusterSnapshotCommandInput
| DeleteClusterCommandInput
| DeleteClusterSnapshotCommandInput
| GetClusterCommandInput
| GetClusterSnapshotCommandInput
| GetPendingMaintenanceActionCommandInput
| ListClusterSnapshotsCommandInput
| ListClustersCommandInput
| ListPendingMaintenanceActionsCommandInput
| ListTagsForResourceCommandInput
| RestoreClusterFromSnapshotCommandInput
| StartClusterCommandInput
Expand All @@ -123,15 +138,18 @@ export type ServiceInputTypes =
* @public
*/
export type ServiceOutputTypes =
| ApplyPendingMaintenanceActionCommandOutput
| CopyClusterSnapshotCommandOutput
| CreateClusterCommandOutput
| CreateClusterSnapshotCommandOutput
| DeleteClusterCommandOutput
| DeleteClusterSnapshotCommandOutput
| GetClusterCommandOutput
| GetClusterSnapshotCommandOutput
| GetPendingMaintenanceActionCommandOutput
| ListClusterSnapshotsCommandOutput
| ListClustersCommandOutput
| ListPendingMaintenanceActionsCommandOutput
| ListTagsForResourceCommandOutput
| RestoreClusterFromSnapshotCommandOutput
| StartClusterCommandOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
// 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 { ApplyPendingMaintenanceActionInput, ApplyPendingMaintenanceActionOutput } from "../models/models_0";
import {
de_ApplyPendingMaintenanceActionCommand,
se_ApplyPendingMaintenanceActionCommand,
} from "../protocols/Aws_restJson1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link ApplyPendingMaintenanceActionCommand}.
*/
export interface ApplyPendingMaintenanceActionCommandInput extends ApplyPendingMaintenanceActionInput {}
/**
* @public
*
* The output of {@link ApplyPendingMaintenanceActionCommand}.
*/
export interface ApplyPendingMaintenanceActionCommandOutput
extends ApplyPendingMaintenanceActionOutput,
__MetadataBearer {}

/**
* <p>The type of pending maintenance action to be applied to the resource.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { DocDBElasticClient, ApplyPendingMaintenanceActionCommand } from "@aws-sdk/client-docdb-elastic"; // ES Modules import
* // const { DocDBElasticClient, ApplyPendingMaintenanceActionCommand } = require("@aws-sdk/client-docdb-elastic"); // CommonJS import
* const client = new DocDBElasticClient(config);
* const input = { // ApplyPendingMaintenanceActionInput
* resourceArn: "STRING_VALUE", // required
* applyAction: "STRING_VALUE", // required
* optInType: "STRING_VALUE", // required
* applyOn: "STRING_VALUE",
* };
* const command = new ApplyPendingMaintenanceActionCommand(input);
* const response = await client.send(command);
* // { // ApplyPendingMaintenanceActionOutput
* // resourcePendingMaintenanceAction: { // ResourcePendingMaintenanceAction
* // resourceArn: "STRING_VALUE",
* // pendingMaintenanceActionDetails: [ // PendingMaintenanceActionDetailsList
* // { // PendingMaintenanceActionDetails
* // action: "STRING_VALUE", // required
* // autoAppliedAfterDate: "STRING_VALUE",
* // forcedApplyDate: "STRING_VALUE",
* // optInStatus: "STRING_VALUE",
* // currentApplyDate: "STRING_VALUE",
* // description: "STRING_VALUE",
* // },
* // ],
* // },
* // };
*
* ```
*
* @param ApplyPendingMaintenanceActionCommandInput - {@link ApplyPendingMaintenanceActionCommandInput}
* @returns {@link ApplyPendingMaintenanceActionCommandOutput}
* @see {@link ApplyPendingMaintenanceActionCommandInput} for command's `input` shape.
* @see {@link ApplyPendingMaintenanceActionCommandOutput} 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 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>
*
* @public
*/
export class ApplyPendingMaintenanceActionCommand extends $Command
.classBuilder<
ApplyPendingMaintenanceActionCommandInput,
ApplyPendingMaintenanceActionCommandOutput,
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", "ApplyPendingMaintenanceAction", {})
.n("DocDBElasticClient", "ApplyPendingMaintenanceActionCommand")
.f(void 0, void 0)
.ser(se_ApplyPendingMaintenanceActionCommand)
.de(de_ApplyPendingMaintenanceActionCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: ApplyPendingMaintenanceActionInput;
output: ApplyPendingMaintenanceActionOutput;
};
sdk: {
input: ApplyPendingMaintenanceActionCommandInput;
output: ApplyPendingMaintenanceActionCommandOutput;
};
};
}
Loading

0 comments on commit 3bbb1c5

Please # to comment.