Skip to content

Commit a4a4a3e

Browse files
author
awstools
committed
feat(client-finspace): Add new operation delete-kx-cluster-node and add status parameter to list-kx-cluster-node operation.
1 parent 715a001 commit a4a4a3e

File tree

9 files changed

+343
-4
lines changed

9 files changed

+343
-4
lines changed

clients/client-finspace/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,14 @@ DeleteKxCluster
290290

291291
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/finspace/command/DeleteKxClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-finspace/Interface/DeleteKxClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-finspace/Interface/DeleteKxClusterCommandOutput/)
292292

293+
</details>
294+
<details>
295+
<summary>
296+
DeleteKxClusterNode
297+
</summary>
298+
299+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/finspace/command/DeleteKxClusterNodeCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-finspace/Interface/DeleteKxClusterNodeCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-finspace/Interface/DeleteKxClusterNodeCommandOutput/)
300+
293301
</details>
294302
<details>
295303
<summary>

clients/client-finspace/src/Finspace.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ import {
5757
DeleteKxClusterCommandInput,
5858
DeleteKxClusterCommandOutput,
5959
} from "./commands/DeleteKxClusterCommand";
60+
import {
61+
DeleteKxClusterNodeCommand,
62+
DeleteKxClusterNodeCommandInput,
63+
DeleteKxClusterNodeCommandOutput,
64+
} from "./commands/DeleteKxClusterNodeCommand";
6065
import {
6166
DeleteKxDatabaseCommand,
6267
DeleteKxDatabaseCommandInput,
@@ -245,6 +250,7 @@ const commands = {
245250
CreateKxVolumeCommand,
246251
DeleteEnvironmentCommand,
247252
DeleteKxClusterCommand,
253+
DeleteKxClusterNodeCommand,
248254
DeleteKxDatabaseCommand,
249255
DeleteKxDataviewCommand,
250256
DeleteKxEnvironmentCommand,
@@ -458,6 +464,23 @@ export interface Finspace {
458464
cb: (err: any, data?: DeleteKxClusterCommandOutput) => void
459465
): void;
460466

467+
/**
468+
* @see {@link DeleteKxClusterNodeCommand}
469+
*/
470+
deleteKxClusterNode(
471+
args: DeleteKxClusterNodeCommandInput,
472+
options?: __HttpHandlerOptions
473+
): Promise<DeleteKxClusterNodeCommandOutput>;
474+
deleteKxClusterNode(
475+
args: DeleteKxClusterNodeCommandInput,
476+
cb: (err: any, data?: DeleteKxClusterNodeCommandOutput) => void
477+
): void;
478+
deleteKxClusterNode(
479+
args: DeleteKxClusterNodeCommandInput,
480+
options: __HttpHandlerOptions,
481+
cb: (err: any, data?: DeleteKxClusterNodeCommandOutput) => void
482+
): void;
483+
461484
/**
462485
* @see {@link DeleteKxDatabaseCommand}
463486
*/

clients/client-finspace/src/FinspaceClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ import { CreateKxUserCommandInput, CreateKxUserCommandOutput } from "./commands/
7070
import { CreateKxVolumeCommandInput, CreateKxVolumeCommandOutput } from "./commands/CreateKxVolumeCommand";
7171
import { DeleteEnvironmentCommandInput, DeleteEnvironmentCommandOutput } from "./commands/DeleteEnvironmentCommand";
7272
import { DeleteKxClusterCommandInput, DeleteKxClusterCommandOutput } from "./commands/DeleteKxClusterCommand";
73+
import {
74+
DeleteKxClusterNodeCommandInput,
75+
DeleteKxClusterNodeCommandOutput,
76+
} from "./commands/DeleteKxClusterNodeCommand";
7377
import { DeleteKxDatabaseCommandInput, DeleteKxDatabaseCommandOutput } from "./commands/DeleteKxDatabaseCommand";
7478
import { DeleteKxDataviewCommandInput, DeleteKxDataviewCommandOutput } from "./commands/DeleteKxDataviewCommand";
7579
import {
@@ -161,6 +165,7 @@ export type ServiceInputTypes =
161165
| CreateKxVolumeCommandInput
162166
| DeleteEnvironmentCommandInput
163167
| DeleteKxClusterCommandInput
168+
| DeleteKxClusterNodeCommandInput
164169
| DeleteKxDatabaseCommandInput
165170
| DeleteKxDataviewCommandInput
166171
| DeleteKxEnvironmentCommandInput
@@ -215,6 +220,7 @@ export type ServiceOutputTypes =
215220
| CreateKxVolumeCommandOutput
216221
| DeleteEnvironmentCommandOutput
217222
| DeleteKxClusterCommandOutput
223+
| DeleteKxClusterNodeCommandOutput
218224
| DeleteKxDatabaseCommandOutput
219225
| DeleteKxDataviewCommandOutput
220226
| DeleteKxEnvironmentCommandOutput
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
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 { commonParams } from "../endpoint/EndpointParameters";
8+
import { FinspaceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FinspaceClient";
9+
import { DeleteKxClusterNodeRequest, DeleteKxClusterNodeResponse } from "../models/models_0";
10+
import { de_DeleteKxClusterNodeCommand, se_DeleteKxClusterNodeCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export { __MetadataBearer, $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link DeleteKxClusterNodeCommand}.
20+
*/
21+
export interface DeleteKxClusterNodeCommandInput extends DeleteKxClusterNodeRequest {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link DeleteKxClusterNodeCommand}.
26+
*/
27+
export interface DeleteKxClusterNodeCommandOutput extends DeleteKxClusterNodeResponse, __MetadataBearer {}
28+
29+
/**
30+
* <p>Deletes the specified nodes from a cluster.
31+
* </p>
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { FinspaceClient, DeleteKxClusterNodeCommand } from "@aws-sdk/client-finspace"; // ES Modules import
36+
* // const { FinspaceClient, DeleteKxClusterNodeCommand } = require("@aws-sdk/client-finspace"); // CommonJS import
37+
* const client = new FinspaceClient(config);
38+
* const input = { // DeleteKxClusterNodeRequest
39+
* environmentId: "STRING_VALUE", // required
40+
* clusterName: "STRING_VALUE", // required
41+
* nodeId: "STRING_VALUE", // required
42+
* };
43+
* const command = new DeleteKxClusterNodeCommand(input);
44+
* const response = await client.send(command);
45+
* // {};
46+
*
47+
* ```
48+
*
49+
* @param DeleteKxClusterNodeCommandInput - {@link DeleteKxClusterNodeCommandInput}
50+
* @returns {@link DeleteKxClusterNodeCommandOutput}
51+
* @see {@link DeleteKxClusterNodeCommandInput} for command's `input` shape.
52+
* @see {@link DeleteKxClusterNodeCommandOutput} for command's `response` shape.
53+
* @see {@link FinspaceClientResolvedConfig | config} for FinspaceClient's `config` shape.
54+
*
55+
* @throws {@link AccessDeniedException} (client fault)
56+
* <p>You do not have sufficient access to perform this action.</p>
57+
*
58+
* @throws {@link InternalServerException} (server fault)
59+
* <p>The request processing has failed because of an unknown error, exception or
60+
* failure.</p>
61+
*
62+
* @throws {@link ResourceNotFoundException} (client fault)
63+
* <p>One or more resources can't be found.</p>
64+
*
65+
* @throws {@link ThrottlingException} (client fault)
66+
* <p>The request was denied due to request throttling.</p>
67+
*
68+
* @throws {@link ValidationException} (client fault)
69+
* <p>The input fails to satisfy the constraints specified by an AWS service.</p>
70+
*
71+
* @throws {@link FinspaceServiceException}
72+
* <p>Base exception class for all service exceptions from Finspace service.</p>
73+
*
74+
* @public
75+
*/
76+
export class DeleteKxClusterNodeCommand extends $Command
77+
.classBuilder<
78+
DeleteKxClusterNodeCommandInput,
79+
DeleteKxClusterNodeCommandOutput,
80+
FinspaceClientResolvedConfig,
81+
ServiceInputTypes,
82+
ServiceOutputTypes
83+
>()
84+
.ep({
85+
...commonParams,
86+
})
87+
.m(function (this: any, Command: any, cs: any, config: FinspaceClientResolvedConfig, o: any) {
88+
return [
89+
getSerdePlugin(config, this.serialize, this.deserialize),
90+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
91+
];
92+
})
93+
.s("AWSHabaneroManagementService", "DeleteKxClusterNode", {})
94+
.n("FinspaceClient", "DeleteKxClusterNodeCommand")
95+
.f(void 0, void 0)
96+
.ser(se_DeleteKxClusterNodeCommand)
97+
.de(de_DeleteKxClusterNodeCommand)
98+
.build() {}

clients/client-finspace/src/commands/ListKxClusterNodesCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export interface ListKxClusterNodesCommandOutput extends ListKxClusterNodesRespo
4848
* // nodeId: "STRING_VALUE",
4949
* // availabilityZoneId: "STRING_VALUE",
5050
* // launchTime: new Date("TIMESTAMP"),
51+
* // status: "RUNNING" || "PROVISIONING",
5152
* // },
5253
* // ],
5354
* // nextToken: "STRING_VALUE",

clients/client-finspace/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export * from "./CreateKxUserCommand";
1010
export * from "./CreateKxVolumeCommand";
1111
export * from "./DeleteEnvironmentCommand";
1212
export * from "./DeleteKxClusterCommand";
13+
export * from "./DeleteKxClusterNodeCommand";
1314
export * from "./DeleteKxDatabaseCommand";
1415
export * from "./DeleteKxDataviewCommand";
1516
export * from "./DeleteKxEnvironmentCommand";

clients/client-finspace/src/models/models_0.ts

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ export interface CreateKxChangesetRequest {
451451

452452
/**
453453
* <p>A list of change request objects that are run in order. A change request object consists of <code>changeType</code> , <code>s3Path</code>, and <code>dbPath</code>.
454-
* A changeType can has the following values: </p>
454+
* A changeType can have the following values: </p>
455455
* <ul>
456456
* <li>
457457
* <p>PUT – Adds or updates files in a database.</p>
@@ -2234,7 +2234,11 @@ export interface KxNAS1Configuration {
22342234

22352235
/**
22362236
* <p>
2237-
* The size of the network attached storage.</p>
2237+
* The size of the network attached storage. For storage type
2238+
* <code>SSD_1000</code> and <code>SSD_250</code> you can select the
2239+
* minimum size as 1200 GB or increments of 2400 GB. For storage type
2240+
* <code>HDD_12</code> you can select the minimum size as 6000 GB or increments
2241+
* of 6000 GB.</p>
22382242
* @public
22392243
*/
22402244
size?: number;
@@ -2491,6 +2495,34 @@ export interface DeleteKxClusterRequest {
24912495
*/
24922496
export interface DeleteKxClusterResponse {}
24932497

2498+
/**
2499+
* @public
2500+
*/
2501+
export interface DeleteKxClusterNodeRequest {
2502+
/**
2503+
* <p>A unique identifier for the kdb environment.</p>
2504+
* @public
2505+
*/
2506+
environmentId: string | undefined;
2507+
2508+
/**
2509+
* <p>The name of the cluster, for which you want to delete the nodes.</p>
2510+
* @public
2511+
*/
2512+
clusterName: string | undefined;
2513+
2514+
/**
2515+
* <p>A unique identifier for the node that you want to delete.</p>
2516+
* @public
2517+
*/
2518+
nodeId: string | undefined;
2519+
}
2520+
2521+
/**
2522+
* @public
2523+
*/
2524+
export interface DeleteKxClusterNodeResponse {}
2525+
24942526
/**
24952527
* @public
24962528
*/
@@ -4253,6 +4285,20 @@ export interface ListKxClusterNodesRequest {
42534285
maxResults?: number;
42544286
}
42554287

4288+
/**
4289+
* @public
4290+
* @enum
4291+
*/
4292+
export const KxNodeStatus = {
4293+
PROVISIONING: "PROVISIONING",
4294+
RUNNING: "RUNNING",
4295+
} as const;
4296+
4297+
/**
4298+
* @public
4299+
*/
4300+
export type KxNodeStatus = (typeof KxNodeStatus)[keyof typeof KxNodeStatus];
4301+
42564302
/**
42574303
* <p>A structure that stores metadata for a kdb node.</p>
42584304
* @public
@@ -4275,6 +4321,23 @@ export interface KxNode {
42754321
* @public
42764322
*/
42774323
launchTime?: Date;
4324+
4325+
/**
4326+
* <p>
4327+
* Specifies the status of the cluster nodes. </p>
4328+
* <ul>
4329+
* <li>
4330+
* <p>
4331+
* <code>RUNNING</code> – The node is actively serving.</p>
4332+
* </li>
4333+
* <li>
4334+
* <p>
4335+
* <code>PROVISIONING</code> – The node is being prepared.</p>
4336+
* </li>
4337+
* </ul>
4338+
* @public
4339+
*/
4340+
status?: KxNodeStatus;
42784341
}
42794342

42804343
/**

clients/client-finspace/src/protocols/Aws_restJson1.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ import { CreateKxUserCommandInput, CreateKxUserCommandOutput } from "../commands
4646
import { CreateKxVolumeCommandInput, CreateKxVolumeCommandOutput } from "../commands/CreateKxVolumeCommand";
4747
import { DeleteEnvironmentCommandInput, DeleteEnvironmentCommandOutput } from "../commands/DeleteEnvironmentCommand";
4848
import { DeleteKxClusterCommandInput, DeleteKxClusterCommandOutput } from "../commands/DeleteKxClusterCommand";
49+
import {
50+
DeleteKxClusterNodeCommandInput,
51+
DeleteKxClusterNodeCommandOutput,
52+
} from "../commands/DeleteKxClusterNodeCommand";
4953
import { DeleteKxDatabaseCommandInput, DeleteKxDatabaseCommandOutput } from "../commands/DeleteKxDatabaseCommand";
5054
import { DeleteKxDataviewCommandInput, DeleteKxDataviewCommandOutput } from "../commands/DeleteKxDataviewCommand";
5155
import {
@@ -459,6 +463,24 @@ export const se_DeleteKxClusterCommand = async (
459463
return b.build();
460464
};
461465

466+
/**
467+
* serializeAws_restJson1DeleteKxClusterNodeCommand
468+
*/
469+
export const se_DeleteKxClusterNodeCommand = async (
470+
input: DeleteKxClusterNodeCommandInput,
471+
context: __SerdeContext
472+
): Promise<__HttpRequest> => {
473+
const b = rb(input, context);
474+
const headers: any = {};
475+
b.bp("/kx/environments/{environmentId}/clusters/{clusterName}/nodes/{nodeId}");
476+
b.p("environmentId", () => input.environmentId!, "{environmentId}", false);
477+
b.p("clusterName", () => input.clusterName!, "{clusterName}", false);
478+
b.p("nodeId", () => input.nodeId!, "{nodeId}", false);
479+
let body: any;
480+
b.m("DELETE").h(headers).b(body);
481+
return b.build();
482+
};
483+
462484
/**
463485
* serializeAws_restJson1DeleteKxDatabaseCommand
464486
*/
@@ -1547,6 +1569,23 @@ export const de_DeleteKxClusterCommand = async (
15471569
return contents;
15481570
};
15491571

1572+
/**
1573+
* deserializeAws_restJson1DeleteKxClusterNodeCommand
1574+
*/
1575+
export const de_DeleteKxClusterNodeCommand = async (
1576+
output: __HttpResponse,
1577+
context: __SerdeContext
1578+
): Promise<DeleteKxClusterNodeCommandOutput> => {
1579+
if (output.statusCode !== 200 && output.statusCode >= 300) {
1580+
return de_CommandError(output, context);
1581+
}
1582+
const contents: any = map({
1583+
$metadata: deserializeMetadata(output),
1584+
});
1585+
await collectBody(output.body, context);
1586+
return contents;
1587+
};
1588+
15501589
/**
15511590
* deserializeAws_restJson1DeleteKxDatabaseCommand
15521591
*/
@@ -3076,6 +3115,7 @@ const de_KxNode = (output: any, context: __SerdeContext): KxNode => {
30763115
availabilityZoneId: __expectString,
30773116
launchTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
30783117
nodeId: __expectString,
3118+
status: __expectString,
30793119
}) as any;
30803120
};
30813121

0 commit comments

Comments
 (0)