Skip to content

Commit

Permalink
feat(client-finspace): Introducing new API UpdateKxClusterCodeConfigu…
Browse files Browse the repository at this point in the history
…ration, introducing new cache types for clusters and introducing new deployment modes for updating clusters.
  • Loading branch information
awstools committed Oct 30, 2023
1 parent 7ffd9bc commit 313e52f
Show file tree
Hide file tree
Showing 8 changed files with 600 additions and 8 deletions.
8 changes: 8 additions & 0 deletions clients/client-finspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,14 @@ UpdateEnvironment

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-finspace/classes/updateenvironmentcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-finspace/interfaces/updateenvironmentcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-finspace/interfaces/updateenvironmentcommandoutput.html)

</details>
<details>
<summary>
UpdateKxClusterCodeConfiguration
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-finspace/classes/updatekxclustercodeconfigurationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-finspace/interfaces/updatekxclustercodeconfigurationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-finspace/interfaces/updatekxclustercodeconfigurationcommandoutput.html)

</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 @@ -135,6 +135,11 @@ import {
UpdateEnvironmentCommandInput,
UpdateEnvironmentCommandOutput,
} from "./commands/UpdateEnvironmentCommand";
import {
UpdateKxClusterCodeConfigurationCommand,
UpdateKxClusterCodeConfigurationCommandInput,
UpdateKxClusterCodeConfigurationCommandOutput,
} from "./commands/UpdateKxClusterCodeConfigurationCommand";
import {
UpdateKxClusterDatabasesCommand,
UpdateKxClusterDatabasesCommandInput,
Expand Down Expand Up @@ -192,6 +197,7 @@ const commands = {
TagResourceCommand,
UntagResourceCommand,
UpdateEnvironmentCommand,
UpdateKxClusterCodeConfigurationCommand,
UpdateKxClusterDatabasesCommand,
UpdateKxDatabaseCommand,
UpdateKxEnvironmentCommand,
Expand Down Expand Up @@ -627,6 +633,23 @@ export interface Finspace {
cb: (err: any, data?: UpdateEnvironmentCommandOutput) => void
): void;

/**
* @see {@link UpdateKxClusterCodeConfigurationCommand}
*/
updateKxClusterCodeConfiguration(
args: UpdateKxClusterCodeConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateKxClusterCodeConfigurationCommandOutput>;
updateKxClusterCodeConfiguration(
args: UpdateKxClusterCodeConfigurationCommandInput,
cb: (err: any, data?: UpdateKxClusterCodeConfigurationCommandOutput) => void
): void;
updateKxClusterCodeConfiguration(
args: UpdateKxClusterCodeConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateKxClusterCodeConfigurationCommandOutput) => void
): void;

/**
* @see {@link UpdateKxClusterDatabasesCommand}
*/
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 @@ -91,6 +91,10 @@ import {
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
import { UpdateEnvironmentCommandInput, UpdateEnvironmentCommandOutput } from "./commands/UpdateEnvironmentCommand";
import {
UpdateKxClusterCodeConfigurationCommandInput,
UpdateKxClusterCodeConfigurationCommandOutput,
} from "./commands/UpdateKxClusterCodeConfigurationCommand";
import {
UpdateKxClusterDatabasesCommandInput,
UpdateKxClusterDatabasesCommandOutput,
Expand Down Expand Up @@ -149,6 +153,7 @@ export type ServiceInputTypes =
| TagResourceCommandInput
| UntagResourceCommandInput
| UpdateEnvironmentCommandInput
| UpdateKxClusterCodeConfigurationCommandInput
| UpdateKxClusterDatabasesCommandInput
| UpdateKxDatabaseCommandInput
| UpdateKxEnvironmentCommandInput
Expand Down Expand Up @@ -188,6 +193,7 @@ export type ServiceOutputTypes =
| TagResourceCommandOutput
| UntagResourceCommandOutput
| UpdateEnvironmentCommandOutput
| UpdateKxClusterCodeConfigurationCommandOutput
| UpdateKxClusterDatabasesCommandOutput
| UpdateKxDatabaseCommandOutput
| UpdateKxEnvironmentCommandOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
SMITHY_CONTEXT_KEY,
} from "@smithy/types";

import { FinspaceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FinspaceClient";
import { UpdateKxClusterCodeConfigurationRequest, UpdateKxClusterCodeConfigurationResponse } from "../models/models_0";
import {
de_UpdateKxClusterCodeConfigurationCommand,
se_UpdateKxClusterCodeConfigurationCommand,
} from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link UpdateKxClusterCodeConfigurationCommand}.
*/
export interface UpdateKxClusterCodeConfigurationCommandInput extends UpdateKxClusterCodeConfigurationRequest {}
/**
* @public
*
* The output of {@link UpdateKxClusterCodeConfigurationCommand}.
*/
export interface UpdateKxClusterCodeConfigurationCommandOutput
extends UpdateKxClusterCodeConfigurationResponse,
__MetadataBearer {}

/**
* @public
* <p>
* Allows you to update code configuration on a running cluster. By using this API you can update the code, the initialization script path, and the command line arguments for a specific cluster.
* The configuration that you want to update will override any existing configurations on the cluster.
* </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { FinspaceClient, UpdateKxClusterCodeConfigurationCommand } from "@aws-sdk/client-finspace"; // ES Modules import
* // const { FinspaceClient, UpdateKxClusterCodeConfigurationCommand } = require("@aws-sdk/client-finspace"); // CommonJS import
* const client = new FinspaceClient(config);
* const input = { // UpdateKxClusterCodeConfigurationRequest
* environmentId: "STRING_VALUE", // required
* clusterName: "STRING_VALUE", // required
* clientToken: "STRING_VALUE",
* code: { // CodeConfiguration
* s3Bucket: "STRING_VALUE",
* s3Key: "STRING_VALUE",
* s3ObjectVersion: "STRING_VALUE",
* },
* initializationScript: "STRING_VALUE",
* commandLineArguments: [ // KxCommandLineArguments
* { // KxCommandLineArgument
* key: "STRING_VALUE",
* value: "STRING_VALUE",
* },
* ],
* deploymentConfiguration: { // KxClusterCodeDeploymentConfiguration
* deploymentStrategy: "ROLLING" || "FORCE", // required
* },
* };
* const command = new UpdateKxClusterCodeConfigurationCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param UpdateKxClusterCodeConfigurationCommandInput - {@link UpdateKxClusterCodeConfigurationCommandInput}
* @returns {@link UpdateKxClusterCodeConfigurationCommandOutput}
* @see {@link UpdateKxClusterCodeConfigurationCommandInput} for command's `input` shape.
* @see {@link UpdateKxClusterCodeConfigurationCommandOutput} 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 ConflictException} (client fault)
* <p>There was a conflict with this action, and it could not be completed.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>The request processing has failed because of an unknown error, exception or
* failure.</p>
*
* @throws {@link LimitExceededException} (client fault)
* <p>A service limit or quota is exceeded.</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>
*
*/
export class UpdateKxClusterCodeConfigurationCommand extends $Command<
UpdateKxClusterCodeConfigurationCommandInput,
UpdateKxClusterCodeConfigurationCommandOutput,
FinspaceClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

/**
* @public
*/
constructor(readonly input: UpdateKxClusterCodeConfigurationCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: FinspaceClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<UpdateKxClusterCodeConfigurationCommandInput, UpdateKxClusterCodeConfigurationCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, UpdateKxClusterCodeConfigurationCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "FinspaceClient";
const commandName = "UpdateKxClusterCodeConfigurationCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
[SMITHY_CONTEXT_KEY]: {
service: "AWSHabaneroManagementService",
operation: "UpdateKxClusterCodeConfiguration",
},
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

/**
* @internal
*/
private serialize(
input: UpdateKxClusterCodeConfigurationCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> {
return se_UpdateKxClusterCodeConfigurationCommand(input, context);
}

/**
* @internal
*/
private deserialize(
output: __HttpResponse,
context: __SerdeContext
): Promise<UpdateKxClusterCodeConfigurationCommandOutput> {
return de_UpdateKxClusterCodeConfigurationCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
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 @@ -28,6 +28,7 @@ export * from "./ListTagsForResourceCommand";
export * from "./TagResourceCommand";
export * from "./UntagResourceCommand";
export * from "./UpdateEnvironmentCommand";
export * from "./UpdateKxClusterCodeConfigurationCommand";
export * from "./UpdateKxClusterDatabasesCommand";
export * from "./UpdateKxDatabaseCommand";
export * from "./UpdateKxEnvironmentCommand";
Expand Down
Loading

0 comments on commit 313e52f

Please sign in to comment.