Skip to content

Commit 3bbb1c5

Browse files
author
awstools
committed
feat(client-docdb-elastic): Amazon DocumentDB Elastic Clusters adds support for pending maintenance actions feature with APIs GetPendingMaintenanceAction, ListPendingMaintenanceActions and ApplyPendingMaintenanceAction
1 parent f334800 commit 3bbb1c5

12 files changed

+1406
-161
lines changed

clients/client-docdb-elastic/README.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Amazon DocumentDB elastic clusters also simplify how developers interact with Am
2525

2626
## Installing
2727

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

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

219219
## Client Commands (Operations List)
220220

221+
<details>
222+
<summary>
223+
ApplyPendingMaintenanceAction
224+
</summary>
225+
226+
[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/)
227+
228+
</details>
221229
<details>
222230
<summary>
223231
CopyClusterSnapshot
@@ -273,6 +281,14 @@ GetClusterSnapshot
273281

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

284+
</details>
285+
<details>
286+
<summary>
287+
GetPendingMaintenanceAction
288+
</summary>
289+
290+
[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/)
291+
276292
</details>
277293
<details>
278294
<summary>
@@ -289,6 +305,14 @@ ListClusterSnapshots
289305

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

308+
</details>
309+
<details>
310+
<summary>
311+
ListPendingMaintenanceActions
312+
</summary>
313+
314+
[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/)
315+
292316
</details>
293317
<details>
294318
<summary>

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

+70
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+
ApplyPendingMaintenanceActionCommand,
7+
ApplyPendingMaintenanceActionCommandInput,
8+
ApplyPendingMaintenanceActionCommandOutput,
9+
} from "./commands/ApplyPendingMaintenanceActionCommand";
510
import {
611
CopyClusterSnapshotCommand,
712
CopyClusterSnapshotCommandInput,
@@ -33,6 +38,11 @@ import {
3338
GetClusterSnapshotCommandInput,
3439
GetClusterSnapshotCommandOutput,
3540
} from "./commands/GetClusterSnapshotCommand";
41+
import {
42+
GetPendingMaintenanceActionCommand,
43+
GetPendingMaintenanceActionCommandInput,
44+
GetPendingMaintenanceActionCommandOutput,
45+
} from "./commands/GetPendingMaintenanceActionCommand";
3646
import {
3747
ListClustersCommand,
3848
ListClustersCommandInput,
@@ -43,6 +53,11 @@ import {
4353
ListClusterSnapshotsCommandInput,
4454
ListClusterSnapshotsCommandOutput,
4555
} from "./commands/ListClusterSnapshotsCommand";
56+
import {
57+
ListPendingMaintenanceActionsCommand,
58+
ListPendingMaintenanceActionsCommandInput,
59+
ListPendingMaintenanceActionsCommandOutput,
60+
} from "./commands/ListPendingMaintenanceActionsCommand";
4661
import {
4762
ListTagsForResourceCommand,
4863
ListTagsForResourceCommandInput,
@@ -73,15 +88,18 @@ import {
7388
import { DocDBElasticClient, DocDBElasticClientConfig } from "./DocDBElasticClient";
7489

7590
const commands = {
91+
ApplyPendingMaintenanceActionCommand,
7692
CopyClusterSnapshotCommand,
7793
CreateClusterCommand,
7894
CreateClusterSnapshotCommand,
7995
DeleteClusterCommand,
8096
DeleteClusterSnapshotCommand,
8197
GetClusterCommand,
8298
GetClusterSnapshotCommand,
99+
GetPendingMaintenanceActionCommand,
83100
ListClustersCommand,
84101
ListClusterSnapshotsCommand,
102+
ListPendingMaintenanceActionsCommand,
85103
ListTagsForResourceCommand,
86104
RestoreClusterFromSnapshotCommand,
87105
StartClusterCommand,
@@ -92,6 +110,23 @@ const commands = {
92110
};
93111

94112
export interface DocDBElastic {
113+
/**
114+
* @see {@link ApplyPendingMaintenanceActionCommand}
115+
*/
116+
applyPendingMaintenanceAction(
117+
args: ApplyPendingMaintenanceActionCommandInput,
118+
options?: __HttpHandlerOptions
119+
): Promise<ApplyPendingMaintenanceActionCommandOutput>;
120+
applyPendingMaintenanceAction(
121+
args: ApplyPendingMaintenanceActionCommandInput,
122+
cb: (err: any, data?: ApplyPendingMaintenanceActionCommandOutput) => void
123+
): void;
124+
applyPendingMaintenanceAction(
125+
args: ApplyPendingMaintenanceActionCommandInput,
126+
options: __HttpHandlerOptions,
127+
cb: (err: any, data?: ApplyPendingMaintenanceActionCommandOutput) => void
128+
): void;
129+
95130
/**
96131
* @see {@link CopyClusterSnapshotCommand}
97132
*/
@@ -193,6 +228,23 @@ export interface DocDBElastic {
193228
cb: (err: any, data?: GetClusterSnapshotCommandOutput) => void
194229
): void;
195230

231+
/**
232+
* @see {@link GetPendingMaintenanceActionCommand}
233+
*/
234+
getPendingMaintenanceAction(
235+
args: GetPendingMaintenanceActionCommandInput,
236+
options?: __HttpHandlerOptions
237+
): Promise<GetPendingMaintenanceActionCommandOutput>;
238+
getPendingMaintenanceAction(
239+
args: GetPendingMaintenanceActionCommandInput,
240+
cb: (err: any, data?: GetPendingMaintenanceActionCommandOutput) => void
241+
): void;
242+
getPendingMaintenanceAction(
243+
args: GetPendingMaintenanceActionCommandInput,
244+
options: __HttpHandlerOptions,
245+
cb: (err: any, data?: GetPendingMaintenanceActionCommandOutput) => void
246+
): void;
247+
196248
/**
197249
* @see {@link ListClustersCommand}
198250
*/
@@ -223,6 +275,24 @@ export interface DocDBElastic {
223275
cb: (err: any, data?: ListClusterSnapshotsCommandOutput) => void
224276
): void;
225277

278+
/**
279+
* @see {@link ListPendingMaintenanceActionsCommand}
280+
*/
281+
listPendingMaintenanceActions(): Promise<ListPendingMaintenanceActionsCommandOutput>;
282+
listPendingMaintenanceActions(
283+
args: ListPendingMaintenanceActionsCommandInput,
284+
options?: __HttpHandlerOptions
285+
): Promise<ListPendingMaintenanceActionsCommandOutput>;
286+
listPendingMaintenanceActions(
287+
args: ListPendingMaintenanceActionsCommandInput,
288+
cb: (err: any, data?: ListPendingMaintenanceActionsCommandOutput) => void
289+
): void;
290+
listPendingMaintenanceActions(
291+
args: ListPendingMaintenanceActionsCommandInput,
292+
options: __HttpHandlerOptions,
293+
cb: (err: any, data?: ListPendingMaintenanceActionsCommandOutput) => void
294+
): void;
295+
226296
/**
227297
* @see {@link ListTagsForResourceCommand}
228298
*/

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

+18
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ import {
5353
HttpAuthSchemeResolvedConfig,
5454
resolveHttpAuthSchemeConfig,
5555
} from "./auth/httpAuthSchemeProvider";
56+
import {
57+
ApplyPendingMaintenanceActionCommandInput,
58+
ApplyPendingMaintenanceActionCommandOutput,
59+
} from "./commands/ApplyPendingMaintenanceActionCommand";
5660
import {
5761
CopyClusterSnapshotCommandInput,
5862
CopyClusterSnapshotCommandOutput,
@@ -69,11 +73,19 @@ import {
6973
} from "./commands/DeleteClusterSnapshotCommand";
7074
import { GetClusterCommandInput, GetClusterCommandOutput } from "./commands/GetClusterCommand";
7175
import { GetClusterSnapshotCommandInput, GetClusterSnapshotCommandOutput } from "./commands/GetClusterSnapshotCommand";
76+
import {
77+
GetPendingMaintenanceActionCommandInput,
78+
GetPendingMaintenanceActionCommandOutput,
79+
} from "./commands/GetPendingMaintenanceActionCommand";
7280
import { ListClustersCommandInput, ListClustersCommandOutput } from "./commands/ListClustersCommand";
7381
import {
7482
ListClusterSnapshotsCommandInput,
7583
ListClusterSnapshotsCommandOutput,
7684
} from "./commands/ListClusterSnapshotsCommand";
85+
import {
86+
ListPendingMaintenanceActionsCommandInput,
87+
ListPendingMaintenanceActionsCommandOutput,
88+
} from "./commands/ListPendingMaintenanceActionsCommand";
7789
import {
7890
ListTagsForResourceCommandInput,
7991
ListTagsForResourceCommandOutput,
@@ -102,15 +114,18 @@ export { __Client };
102114
* @public
103115
*/
104116
export type ServiceInputTypes =
117+
| ApplyPendingMaintenanceActionCommandInput
105118
| CopyClusterSnapshotCommandInput
106119
| CreateClusterCommandInput
107120
| CreateClusterSnapshotCommandInput
108121
| DeleteClusterCommandInput
109122
| DeleteClusterSnapshotCommandInput
110123
| GetClusterCommandInput
111124
| GetClusterSnapshotCommandInput
125+
| GetPendingMaintenanceActionCommandInput
112126
| ListClusterSnapshotsCommandInput
113127
| ListClustersCommandInput
128+
| ListPendingMaintenanceActionsCommandInput
114129
| ListTagsForResourceCommandInput
115130
| RestoreClusterFromSnapshotCommandInput
116131
| StartClusterCommandInput
@@ -123,15 +138,18 @@ export type ServiceInputTypes =
123138
* @public
124139
*/
125140
export type ServiceOutputTypes =
141+
| ApplyPendingMaintenanceActionCommandOutput
126142
| CopyClusterSnapshotCommandOutput
127143
| CreateClusterCommandOutput
128144
| CreateClusterSnapshotCommandOutput
129145
| DeleteClusterCommandOutput
130146
| DeleteClusterSnapshotCommandOutput
131147
| GetClusterCommandOutput
132148
| GetClusterSnapshotCommandOutput
149+
| GetPendingMaintenanceActionCommandOutput
133150
| ListClusterSnapshotsCommandOutput
134151
| ListClustersCommandOutput
152+
| ListPendingMaintenanceActionsCommandOutput
135153
| ListTagsForResourceCommandOutput
136154
| RestoreClusterFromSnapshotCommandOutput
137155
| StartClusterCommandOutput
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
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 { ApplyPendingMaintenanceActionInput, ApplyPendingMaintenanceActionOutput } from "../models/models_0";
10+
import {
11+
de_ApplyPendingMaintenanceActionCommand,
12+
se_ApplyPendingMaintenanceActionCommand,
13+
} from "../protocols/Aws_restJson1";
14+
15+
/**
16+
* @public
17+
*/
18+
export type { __MetadataBearer };
19+
export { $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link ApplyPendingMaintenanceActionCommand}.
24+
*/
25+
export interface ApplyPendingMaintenanceActionCommandInput extends ApplyPendingMaintenanceActionInput {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link ApplyPendingMaintenanceActionCommand}.
30+
*/
31+
export interface ApplyPendingMaintenanceActionCommandOutput
32+
extends ApplyPendingMaintenanceActionOutput,
33+
__MetadataBearer {}
34+
35+
/**
36+
* <p>The type of pending maintenance action to be applied to the resource.</p>
37+
* @example
38+
* Use a bare-bones client and the command you need to make an API call.
39+
* ```javascript
40+
* import { DocDBElasticClient, ApplyPendingMaintenanceActionCommand } from "@aws-sdk/client-docdb-elastic"; // ES Modules import
41+
* // const { DocDBElasticClient, ApplyPendingMaintenanceActionCommand } = require("@aws-sdk/client-docdb-elastic"); // CommonJS import
42+
* const client = new DocDBElasticClient(config);
43+
* const input = { // ApplyPendingMaintenanceActionInput
44+
* resourceArn: "STRING_VALUE", // required
45+
* applyAction: "STRING_VALUE", // required
46+
* optInType: "STRING_VALUE", // required
47+
* applyOn: "STRING_VALUE",
48+
* };
49+
* const command = new ApplyPendingMaintenanceActionCommand(input);
50+
* const response = await client.send(command);
51+
* // { // ApplyPendingMaintenanceActionOutput
52+
* // resourcePendingMaintenanceAction: { // ResourcePendingMaintenanceAction
53+
* // resourceArn: "STRING_VALUE",
54+
* // pendingMaintenanceActionDetails: [ // PendingMaintenanceActionDetailsList
55+
* // { // PendingMaintenanceActionDetails
56+
* // action: "STRING_VALUE", // required
57+
* // autoAppliedAfterDate: "STRING_VALUE",
58+
* // forcedApplyDate: "STRING_VALUE",
59+
* // optInStatus: "STRING_VALUE",
60+
* // currentApplyDate: "STRING_VALUE",
61+
* // description: "STRING_VALUE",
62+
* // },
63+
* // ],
64+
* // },
65+
* // };
66+
*
67+
* ```
68+
*
69+
* @param ApplyPendingMaintenanceActionCommandInput - {@link ApplyPendingMaintenanceActionCommandInput}
70+
* @returns {@link ApplyPendingMaintenanceActionCommandOutput}
71+
* @see {@link ApplyPendingMaintenanceActionCommandInput} for command's `input` shape.
72+
* @see {@link ApplyPendingMaintenanceActionCommandOutput} for command's `response` shape.
73+
* @see {@link DocDBElasticClientResolvedConfig | config} for DocDBElasticClient's `config` shape.
74+
*
75+
* @throws {@link AccessDeniedException} (client fault)
76+
* <p>An exception that occurs when there are not sufficient permissions to perform an action.</p>
77+
*
78+
* @throws {@link ConflictException} (client fault)
79+
* <p>There was an access conflict.</p>
80+
*
81+
* @throws {@link InternalServerException} (server fault)
82+
* <p>There was an internal server error.</p>
83+
*
84+
* @throws {@link ResourceNotFoundException} (client fault)
85+
* <p>The specified resource could not be located.</p>
86+
*
87+
* @throws {@link ThrottlingException} (client fault)
88+
* <p>ThrottlingException will be thrown when request was denied due to request throttling.</p>
89+
*
90+
* @throws {@link ValidationException} (client fault)
91+
* <p>A structure defining a validation exception.</p>
92+
*
93+
* @throws {@link DocDBElasticServiceException}
94+
* <p>Base exception class for all service exceptions from DocDBElastic service.</p>
95+
*
96+
* @public
97+
*/
98+
export class ApplyPendingMaintenanceActionCommand extends $Command
99+
.classBuilder<
100+
ApplyPendingMaintenanceActionCommandInput,
101+
ApplyPendingMaintenanceActionCommandOutput,
102+
DocDBElasticClientResolvedConfig,
103+
ServiceInputTypes,
104+
ServiceOutputTypes
105+
>()
106+
.ep(commonParams)
107+
.m(function (this: any, Command: any, cs: any, config: DocDBElasticClientResolvedConfig, o: any) {
108+
return [
109+
getSerdePlugin(config, this.serialize, this.deserialize),
110+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
111+
];
112+
})
113+
.s("ChimeraDbLionfishServiceLambda", "ApplyPendingMaintenanceAction", {})
114+
.n("DocDBElasticClient", "ApplyPendingMaintenanceActionCommand")
115+
.f(void 0, void 0)
116+
.ser(se_ApplyPendingMaintenanceActionCommand)
117+
.de(de_ApplyPendingMaintenanceActionCommand)
118+
.build() {
119+
/** @internal type navigation helper, not in runtime. */
120+
protected declare static __types: {
121+
api: {
122+
input: ApplyPendingMaintenanceActionInput;
123+
output: ApplyPendingMaintenanceActionOutput;
124+
};
125+
sdk: {
126+
input: ApplyPendingMaintenanceActionCommandInput;
127+
output: ApplyPendingMaintenanceActionCommandOutput;
128+
};
129+
};
130+
}

0 commit comments

Comments
 (0)