Skip to content

Commit 313e52f

Browse files
author
awstools
committed
feat(client-finspace): Introducing new API UpdateKxClusterCodeConfiguration, introducing new cache types for clusters and introducing new deployment modes for updating clusters.
1 parent 7ffd9bc commit 313e52f

File tree

8 files changed

+600
-8
lines changed

8 files changed

+600
-8
lines changed

clients/client-finspace/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,14 @@ UpdateEnvironment
434434

435435
[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)
436436

437+
</details>
438+
<details>
439+
<summary>
440+
UpdateKxClusterCodeConfiguration
441+
</summary>
442+
443+
[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)
444+
437445
</details>
438446
<details>
439447
<summary>

clients/client-finspace/src/Finspace.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ import {
135135
UpdateEnvironmentCommandInput,
136136
UpdateEnvironmentCommandOutput,
137137
} from "./commands/UpdateEnvironmentCommand";
138+
import {
139+
UpdateKxClusterCodeConfigurationCommand,
140+
UpdateKxClusterCodeConfigurationCommandInput,
141+
UpdateKxClusterCodeConfigurationCommandOutput,
142+
} from "./commands/UpdateKxClusterCodeConfigurationCommand";
138143
import {
139144
UpdateKxClusterDatabasesCommand,
140145
UpdateKxClusterDatabasesCommandInput,
@@ -192,6 +197,7 @@ const commands = {
192197
TagResourceCommand,
193198
UntagResourceCommand,
194199
UpdateEnvironmentCommand,
200+
UpdateKxClusterCodeConfigurationCommand,
195201
UpdateKxClusterDatabasesCommand,
196202
UpdateKxDatabaseCommand,
197203
UpdateKxEnvironmentCommand,
@@ -627,6 +633,23 @@ export interface Finspace {
627633
cb: (err: any, data?: UpdateEnvironmentCommandOutput) => void
628634
): void;
629635

636+
/**
637+
* @see {@link UpdateKxClusterCodeConfigurationCommand}
638+
*/
639+
updateKxClusterCodeConfiguration(
640+
args: UpdateKxClusterCodeConfigurationCommandInput,
641+
options?: __HttpHandlerOptions
642+
): Promise<UpdateKxClusterCodeConfigurationCommandOutput>;
643+
updateKxClusterCodeConfiguration(
644+
args: UpdateKxClusterCodeConfigurationCommandInput,
645+
cb: (err: any, data?: UpdateKxClusterCodeConfigurationCommandOutput) => void
646+
): void;
647+
updateKxClusterCodeConfiguration(
648+
args: UpdateKxClusterCodeConfigurationCommandInput,
649+
options: __HttpHandlerOptions,
650+
cb: (err: any, data?: UpdateKxClusterCodeConfigurationCommandOutput) => void
651+
): void;
652+
630653
/**
631654
* @see {@link UpdateKxClusterDatabasesCommand}
632655
*/

clients/client-finspace/src/FinspaceClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ import {
9191
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
9292
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
9393
import { UpdateEnvironmentCommandInput, UpdateEnvironmentCommandOutput } from "./commands/UpdateEnvironmentCommand";
94+
import {
95+
UpdateKxClusterCodeConfigurationCommandInput,
96+
UpdateKxClusterCodeConfigurationCommandOutput,
97+
} from "./commands/UpdateKxClusterCodeConfigurationCommand";
9498
import {
9599
UpdateKxClusterDatabasesCommandInput,
96100
UpdateKxClusterDatabasesCommandOutput,
@@ -149,6 +153,7 @@ export type ServiceInputTypes =
149153
| TagResourceCommandInput
150154
| UntagResourceCommandInput
151155
| UpdateEnvironmentCommandInput
156+
| UpdateKxClusterCodeConfigurationCommandInput
152157
| UpdateKxClusterDatabasesCommandInput
153158
| UpdateKxDatabaseCommandInput
154159
| UpdateKxEnvironmentCommandInput
@@ -188,6 +193,7 @@ export type ServiceOutputTypes =
188193
| TagResourceCommandOutput
189194
| UntagResourceCommandOutput
190195
| UpdateEnvironmentCommandOutput
196+
| UpdateKxClusterCodeConfigurationCommandOutput
191197
| UpdateKxClusterDatabasesCommandOutput
192198
| UpdateKxDatabaseCommandOutput
193199
| UpdateKxEnvironmentCommandOutput
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
5+
import { Command as $Command } from "@smithy/smithy-client";
6+
import {
7+
FinalizeHandlerArguments,
8+
Handler,
9+
HandlerExecutionContext,
10+
HttpHandlerOptions as __HttpHandlerOptions,
11+
MetadataBearer as __MetadataBearer,
12+
MiddlewareStack,
13+
SerdeContext as __SerdeContext,
14+
SMITHY_CONTEXT_KEY,
15+
} from "@smithy/types";
16+
17+
import { FinspaceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FinspaceClient";
18+
import { UpdateKxClusterCodeConfigurationRequest, UpdateKxClusterCodeConfigurationResponse } from "../models/models_0";
19+
import {
20+
de_UpdateKxClusterCodeConfigurationCommand,
21+
se_UpdateKxClusterCodeConfigurationCommand,
22+
} from "../protocols/Aws_restJson1";
23+
24+
/**
25+
* @public
26+
*/
27+
export { __MetadataBearer, $Command };
28+
/**
29+
* @public
30+
*
31+
* The input for {@link UpdateKxClusterCodeConfigurationCommand}.
32+
*/
33+
export interface UpdateKxClusterCodeConfigurationCommandInput extends UpdateKxClusterCodeConfigurationRequest {}
34+
/**
35+
* @public
36+
*
37+
* The output of {@link UpdateKxClusterCodeConfigurationCommand}.
38+
*/
39+
export interface UpdateKxClusterCodeConfigurationCommandOutput
40+
extends UpdateKxClusterCodeConfigurationResponse,
41+
__MetadataBearer {}
42+
43+
/**
44+
* @public
45+
* <p>
46+
* 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.
47+
* The configuration that you want to update will override any existing configurations on the cluster.
48+
* </p>
49+
* @example
50+
* Use a bare-bones client and the command you need to make an API call.
51+
* ```javascript
52+
* import { FinspaceClient, UpdateKxClusterCodeConfigurationCommand } from "@aws-sdk/client-finspace"; // ES Modules import
53+
* // const { FinspaceClient, UpdateKxClusterCodeConfigurationCommand } = require("@aws-sdk/client-finspace"); // CommonJS import
54+
* const client = new FinspaceClient(config);
55+
* const input = { // UpdateKxClusterCodeConfigurationRequest
56+
* environmentId: "STRING_VALUE", // required
57+
* clusterName: "STRING_VALUE", // required
58+
* clientToken: "STRING_VALUE",
59+
* code: { // CodeConfiguration
60+
* s3Bucket: "STRING_VALUE",
61+
* s3Key: "STRING_VALUE",
62+
* s3ObjectVersion: "STRING_VALUE",
63+
* },
64+
* initializationScript: "STRING_VALUE",
65+
* commandLineArguments: [ // KxCommandLineArguments
66+
* { // KxCommandLineArgument
67+
* key: "STRING_VALUE",
68+
* value: "STRING_VALUE",
69+
* },
70+
* ],
71+
* deploymentConfiguration: { // KxClusterCodeDeploymentConfiguration
72+
* deploymentStrategy: "ROLLING" || "FORCE", // required
73+
* },
74+
* };
75+
* const command = new UpdateKxClusterCodeConfigurationCommand(input);
76+
* const response = await client.send(command);
77+
* // {};
78+
*
79+
* ```
80+
*
81+
* @param UpdateKxClusterCodeConfigurationCommandInput - {@link UpdateKxClusterCodeConfigurationCommandInput}
82+
* @returns {@link UpdateKxClusterCodeConfigurationCommandOutput}
83+
* @see {@link UpdateKxClusterCodeConfigurationCommandInput} for command's `input` shape.
84+
* @see {@link UpdateKxClusterCodeConfigurationCommandOutput} for command's `response` shape.
85+
* @see {@link FinspaceClientResolvedConfig | config} for FinspaceClient's `config` shape.
86+
*
87+
* @throws {@link AccessDeniedException} (client fault)
88+
* <p>You do not have sufficient access to perform this action.</p>
89+
*
90+
* @throws {@link ConflictException} (client fault)
91+
* <p>There was a conflict with this action, and it could not be completed.</p>
92+
*
93+
* @throws {@link InternalServerException} (server fault)
94+
* <p>The request processing has failed because of an unknown error, exception or
95+
* failure.</p>
96+
*
97+
* @throws {@link LimitExceededException} (client fault)
98+
* <p>A service limit or quota is exceeded.</p>
99+
*
100+
* @throws {@link ResourceNotFoundException} (client fault)
101+
* <p>One or more resources can't be found.</p>
102+
*
103+
* @throws {@link ThrottlingException} (client fault)
104+
* <p>The request was denied due to request throttling.</p>
105+
*
106+
* @throws {@link ValidationException} (client fault)
107+
* <p>The input fails to satisfy the constraints specified by an AWS service.</p>
108+
*
109+
* @throws {@link FinspaceServiceException}
110+
* <p>Base exception class for all service exceptions from Finspace service.</p>
111+
*
112+
*/
113+
export class UpdateKxClusterCodeConfigurationCommand extends $Command<
114+
UpdateKxClusterCodeConfigurationCommandInput,
115+
UpdateKxClusterCodeConfigurationCommandOutput,
116+
FinspaceClientResolvedConfig
117+
> {
118+
// Start section: command_properties
119+
// End section: command_properties
120+
121+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
122+
return {
123+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
124+
Endpoint: { type: "builtInParams", name: "endpoint" },
125+
Region: { type: "builtInParams", name: "region" },
126+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
127+
};
128+
}
129+
130+
/**
131+
* @public
132+
*/
133+
constructor(readonly input: UpdateKxClusterCodeConfigurationCommandInput) {
134+
// Start section: command_constructor
135+
super();
136+
// End section: command_constructor
137+
}
138+
139+
/**
140+
* @internal
141+
*/
142+
resolveMiddleware(
143+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
144+
configuration: FinspaceClientResolvedConfig,
145+
options?: __HttpHandlerOptions
146+
): Handler<UpdateKxClusterCodeConfigurationCommandInput, UpdateKxClusterCodeConfigurationCommandOutput> {
147+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
148+
this.middlewareStack.use(
149+
getEndpointPlugin(configuration, UpdateKxClusterCodeConfigurationCommand.getEndpointParameterInstructions())
150+
);
151+
152+
const stack = clientStack.concat(this.middlewareStack);
153+
154+
const { logger } = configuration;
155+
const clientName = "FinspaceClient";
156+
const commandName = "UpdateKxClusterCodeConfigurationCommand";
157+
const handlerExecutionContext: HandlerExecutionContext = {
158+
logger,
159+
clientName,
160+
commandName,
161+
inputFilterSensitiveLog: (_: any) => _,
162+
outputFilterSensitiveLog: (_: any) => _,
163+
[SMITHY_CONTEXT_KEY]: {
164+
service: "AWSHabaneroManagementService",
165+
operation: "UpdateKxClusterCodeConfiguration",
166+
},
167+
};
168+
const { requestHandler } = configuration;
169+
return stack.resolve(
170+
(request: FinalizeHandlerArguments<any>) =>
171+
requestHandler.handle(request.request as __HttpRequest, options || {}),
172+
handlerExecutionContext
173+
);
174+
}
175+
176+
/**
177+
* @internal
178+
*/
179+
private serialize(
180+
input: UpdateKxClusterCodeConfigurationCommandInput,
181+
context: __SerdeContext
182+
): Promise<__HttpRequest> {
183+
return se_UpdateKxClusterCodeConfigurationCommand(input, context);
184+
}
185+
186+
/**
187+
* @internal
188+
*/
189+
private deserialize(
190+
output: __HttpResponse,
191+
context: __SerdeContext
192+
): Promise<UpdateKxClusterCodeConfigurationCommandOutput> {
193+
return de_UpdateKxClusterCodeConfigurationCommand(output, context);
194+
}
195+
196+
// Start section: command_body_extra
197+
// End section: command_body_extra
198+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export * from "./ListTagsForResourceCommand";
2828
export * from "./TagResourceCommand";
2929
export * from "./UntagResourceCommand";
3030
export * from "./UpdateEnvironmentCommand";
31+
export * from "./UpdateKxClusterCodeConfigurationCommand";
3132
export * from "./UpdateKxClusterDatabasesCommand";
3233
export * from "./UpdateKxDatabaseCommand";
3334
export * from "./UpdateKxEnvironmentCommand";

0 commit comments

Comments
 (0)