Skip to content

Commit

Permalink
feat(client-finspace): Add new operation delete-kx-cluster-node and a…
Browse files Browse the repository at this point in the history
…dd status parameter to list-kx-cluster-node operation.
  • Loading branch information
awstools committed Mar 26, 2024
1 parent 715a001 commit a4a4a3e
Show file tree
Hide file tree
Showing 9 changed files with 343 additions and 4 deletions.
8 changes: 8 additions & 0 deletions clients/client-finspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,14 @@ DeleteKxCluster

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

</details>
<details>
<summary>
DeleteKxClusterNode
</summary>

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

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-finspace/src/Finspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ import {
DeleteKxClusterCommandInput,
DeleteKxClusterCommandOutput,
} from "./commands/DeleteKxClusterCommand";
import {
DeleteKxClusterNodeCommand,
DeleteKxClusterNodeCommandInput,
DeleteKxClusterNodeCommandOutput,
} from "./commands/DeleteKxClusterNodeCommand";
import {
DeleteKxDatabaseCommand,
DeleteKxDatabaseCommandInput,
Expand Down Expand Up @@ -245,6 +250,7 @@ const commands = {
CreateKxVolumeCommand,
DeleteEnvironmentCommand,
DeleteKxClusterCommand,
DeleteKxClusterNodeCommand,
DeleteKxDatabaseCommand,
DeleteKxDataviewCommand,
DeleteKxEnvironmentCommand,
Expand Down Expand Up @@ -458,6 +464,23 @@ export interface Finspace {
cb: (err: any, data?: DeleteKxClusterCommandOutput) => void
): void;

/**
* @see {@link DeleteKxClusterNodeCommand}
*/
deleteKxClusterNode(
args: DeleteKxClusterNodeCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteKxClusterNodeCommandOutput>;
deleteKxClusterNode(
args: DeleteKxClusterNodeCommandInput,
cb: (err: any, data?: DeleteKxClusterNodeCommandOutput) => void
): void;
deleteKxClusterNode(
args: DeleteKxClusterNodeCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteKxClusterNodeCommandOutput) => void
): void;

/**
* @see {@link DeleteKxDatabaseCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-finspace/src/FinspaceClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ import { CreateKxUserCommandInput, CreateKxUserCommandOutput } from "./commands/
import { CreateKxVolumeCommandInput, CreateKxVolumeCommandOutput } from "./commands/CreateKxVolumeCommand";
import { DeleteEnvironmentCommandInput, DeleteEnvironmentCommandOutput } from "./commands/DeleteEnvironmentCommand";
import { DeleteKxClusterCommandInput, DeleteKxClusterCommandOutput } from "./commands/DeleteKxClusterCommand";
import {
DeleteKxClusterNodeCommandInput,
DeleteKxClusterNodeCommandOutput,
} from "./commands/DeleteKxClusterNodeCommand";
import { DeleteKxDatabaseCommandInput, DeleteKxDatabaseCommandOutput } from "./commands/DeleteKxDatabaseCommand";
import { DeleteKxDataviewCommandInput, DeleteKxDataviewCommandOutput } from "./commands/DeleteKxDataviewCommand";
import {
Expand Down Expand Up @@ -161,6 +165,7 @@ export type ServiceInputTypes =
| CreateKxVolumeCommandInput
| DeleteEnvironmentCommandInput
| DeleteKxClusterCommandInput
| DeleteKxClusterNodeCommandInput
| DeleteKxDatabaseCommandInput
| DeleteKxDataviewCommandInput
| DeleteKxEnvironmentCommandInput
Expand Down Expand Up @@ -215,6 +220,7 @@ export type ServiceOutputTypes =
| CreateKxVolumeCommandOutput
| DeleteEnvironmentCommandOutput
| DeleteKxClusterCommandOutput
| DeleteKxClusterNodeCommandOutput
| DeleteKxDatabaseCommandOutput
| DeleteKxDataviewCommandOutput
| DeleteKxEnvironmentCommandOutput
Expand Down
98 changes: 98 additions & 0 deletions clients/client-finspace/src/commands/DeleteKxClusterNodeCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// 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 { commonParams } from "../endpoint/EndpointParameters";
import { FinspaceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FinspaceClient";
import { DeleteKxClusterNodeRequest, DeleteKxClusterNodeResponse } from "../models/models_0";
import { de_DeleteKxClusterNodeCommand, se_DeleteKxClusterNodeCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link DeleteKxClusterNodeCommand}.
*/
export interface DeleteKxClusterNodeCommandInput extends DeleteKxClusterNodeRequest {}
/**
* @public
*
* The output of {@link DeleteKxClusterNodeCommand}.
*/
export interface DeleteKxClusterNodeCommandOutput extends DeleteKxClusterNodeResponse, __MetadataBearer {}

/**
* <p>Deletes the specified nodes from a cluster.
* </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { FinspaceClient, DeleteKxClusterNodeCommand } from "@aws-sdk/client-finspace"; // ES Modules import
* // const { FinspaceClient, DeleteKxClusterNodeCommand } = require("@aws-sdk/client-finspace"); // CommonJS import
* const client = new FinspaceClient(config);
* const input = { // DeleteKxClusterNodeRequest
* environmentId: "STRING_VALUE", // required
* clusterName: "STRING_VALUE", // required
* nodeId: "STRING_VALUE", // required
* };
* const command = new DeleteKxClusterNodeCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param DeleteKxClusterNodeCommandInput - {@link DeleteKxClusterNodeCommandInput}
* @returns {@link DeleteKxClusterNodeCommandOutput}
* @see {@link DeleteKxClusterNodeCommandInput} for command's `input` shape.
* @see {@link DeleteKxClusterNodeCommandOutput} for command's `response` shape.
* @see {@link FinspaceClientResolvedConfig | config} for FinspaceClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>The request processing has failed because of an unknown error, exception or
* failure.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>One or more resources can't be found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by an AWS service.</p>
*
* @throws {@link FinspaceServiceException}
* <p>Base exception class for all service exceptions from Finspace service.</p>
*
* @public
*/
export class DeleteKxClusterNodeCommand extends $Command
.classBuilder<
DeleteKxClusterNodeCommandInput,
DeleteKxClusterNodeCommandOutput,
FinspaceClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: FinspaceClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AWSHabaneroManagementService", "DeleteKxClusterNode", {})
.n("FinspaceClient", "DeleteKxClusterNodeCommand")
.f(void 0, void 0)
.ser(se_DeleteKxClusterNodeCommand)
.de(de_DeleteKxClusterNodeCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface ListKxClusterNodesCommandOutput extends ListKxClusterNodesRespo
* // nodeId: "STRING_VALUE",
* // availabilityZoneId: "STRING_VALUE",
* // launchTime: new Date("TIMESTAMP"),
* // status: "RUNNING" || "PROVISIONING",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
1 change: 1 addition & 0 deletions clients/client-finspace/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export * from "./CreateKxUserCommand";
export * from "./CreateKxVolumeCommand";
export * from "./DeleteEnvironmentCommand";
export * from "./DeleteKxClusterCommand";
export * from "./DeleteKxClusterNodeCommand";
export * from "./DeleteKxDatabaseCommand";
export * from "./DeleteKxDataviewCommand";
export * from "./DeleteKxEnvironmentCommand";
Expand Down
67 changes: 65 additions & 2 deletions clients/client-finspace/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ export interface CreateKxChangesetRequest {

/**
* <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>.
* A changeType can has the following values: </p>
* A changeType can have the following values: </p>
* <ul>
* <li>
* <p>PUT – Adds or updates files in a database.</p>
Expand Down Expand Up @@ -2234,7 +2234,11 @@ export interface KxNAS1Configuration {

/**
* <p>
* The size of the network attached storage.</p>
* The size of the network attached storage. For storage type
* <code>SSD_1000</code> and <code>SSD_250</code> you can select the
* minimum size as 1200 GB or increments of 2400 GB. For storage type
* <code>HDD_12</code> you can select the minimum size as 6000 GB or increments
* of 6000 GB.</p>
* @public
*/
size?: number;
Expand Down Expand Up @@ -2491,6 +2495,34 @@ export interface DeleteKxClusterRequest {
*/
export interface DeleteKxClusterResponse {}

/**
* @public
*/
export interface DeleteKxClusterNodeRequest {
/**
* <p>A unique identifier for the kdb environment.</p>
* @public
*/
environmentId: string | undefined;

/**
* <p>The name of the cluster, for which you want to delete the nodes.</p>
* @public
*/
clusterName: string | undefined;

/**
* <p>A unique identifier for the node that you want to delete.</p>
* @public
*/
nodeId: string | undefined;
}

/**
* @public
*/
export interface DeleteKxClusterNodeResponse {}

/**
* @public
*/
Expand Down Expand Up @@ -4253,6 +4285,20 @@ export interface ListKxClusterNodesRequest {
maxResults?: number;
}

/**
* @public
* @enum
*/
export const KxNodeStatus = {
PROVISIONING: "PROVISIONING",
RUNNING: "RUNNING",
} as const;

/**
* @public
*/
export type KxNodeStatus = (typeof KxNodeStatus)[keyof typeof KxNodeStatus];

/**
* <p>A structure that stores metadata for a kdb node.</p>
* @public
Expand All @@ -4275,6 +4321,23 @@ export interface KxNode {
* @public
*/
launchTime?: Date;

/**
* <p>
* Specifies the status of the cluster nodes. </p>
* <ul>
* <li>
* <p>
* <code>RUNNING</code> – The node is actively serving.</p>
* </li>
* <li>
* <p>
* <code>PROVISIONING</code> – The node is being prepared.</p>
* </li>
* </ul>
* @public
*/
status?: KxNodeStatus;
}

/**
Expand Down
40 changes: 40 additions & 0 deletions clients/client-finspace/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ import { CreateKxUserCommandInput, CreateKxUserCommandOutput } from "../commands
import { CreateKxVolumeCommandInput, CreateKxVolumeCommandOutput } from "../commands/CreateKxVolumeCommand";
import { DeleteEnvironmentCommandInput, DeleteEnvironmentCommandOutput } from "../commands/DeleteEnvironmentCommand";
import { DeleteKxClusterCommandInput, DeleteKxClusterCommandOutput } from "../commands/DeleteKxClusterCommand";
import {
DeleteKxClusterNodeCommandInput,
DeleteKxClusterNodeCommandOutput,
} from "../commands/DeleteKxClusterNodeCommand";
import { DeleteKxDatabaseCommandInput, DeleteKxDatabaseCommandOutput } from "../commands/DeleteKxDatabaseCommand";
import { DeleteKxDataviewCommandInput, DeleteKxDataviewCommandOutput } from "../commands/DeleteKxDataviewCommand";
import {
Expand Down Expand Up @@ -459,6 +463,24 @@ export const se_DeleteKxClusterCommand = async (
return b.build();
};

/**
* serializeAws_restJson1DeleteKxClusterNodeCommand
*/
export const se_DeleteKxClusterNodeCommand = async (
input: DeleteKxClusterNodeCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {};
b.bp("/kx/environments/{environmentId}/clusters/{clusterName}/nodes/{nodeId}");
b.p("environmentId", () => input.environmentId!, "{environmentId}", false);
b.p("clusterName", () => input.clusterName!, "{clusterName}", false);
b.p("nodeId", () => input.nodeId!, "{nodeId}", false);
let body: any;
b.m("DELETE").h(headers).b(body);
return b.build();
};

/**
* serializeAws_restJson1DeleteKxDatabaseCommand
*/
Expand Down Expand Up @@ -1547,6 +1569,23 @@ export const de_DeleteKxClusterCommand = async (
return contents;
};

/**
* deserializeAws_restJson1DeleteKxClusterNodeCommand
*/
export const de_DeleteKxClusterNodeCommand = async (
output: __HttpResponse,
context: __SerdeContext
): Promise<DeleteKxClusterNodeCommandOutput> => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
return de_CommandError(output, context);
}
const contents: any = map({
$metadata: deserializeMetadata(output),
});
await collectBody(output.body, context);
return contents;
};

/**
* deserializeAws_restJson1DeleteKxDatabaseCommand
*/
Expand Down Expand Up @@ -3076,6 +3115,7 @@ const de_KxNode = (output: any, context: __SerdeContext): KxNode => {
availabilityZoneId: __expectString,
launchTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
nodeId: __expectString,
status: __expectString,
}) as any;
};

Expand Down
Loading

0 comments on commit a4a4a3e

Please sign in to comment.