Skip to content

Commit 281769a

Browse files
author
awstools
committed
feat(client-kafkaconnect): Support updating connector configuration via UpdateConnector API. Release Operations API to monitor the status of the connector operation.
1 parent 6b059f4 commit 281769a

File tree

14 files changed

+1380
-45
lines changed

14 files changed

+1380
-45
lines changed

clients/client-kafkaconnect/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,14 @@ DescribeConnector
258258

259259
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kafkaconnect/command/DescribeConnectorCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kafkaconnect/Interface/DescribeConnectorCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kafkaconnect/Interface/DescribeConnectorCommandOutput/)
260260

261+
</details>
262+
<details>
263+
<summary>
264+
DescribeConnectorOperation
265+
</summary>
266+
267+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kafkaconnect/command/DescribeConnectorOperationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kafkaconnect/Interface/DescribeConnectorOperationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kafkaconnect/Interface/DescribeConnectorOperationCommandOutput/)
268+
261269
</details>
262270
<details>
263271
<summary>
@@ -274,6 +282,14 @@ DescribeWorkerConfiguration
274282

275283
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kafkaconnect/command/DescribeWorkerConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kafkaconnect/Interface/DescribeWorkerConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kafkaconnect/Interface/DescribeWorkerConfigurationCommandOutput/)
276284

285+
</details>
286+
<details>
287+
<summary>
288+
ListConnectorOperations
289+
</summary>
290+
291+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kafkaconnect/command/ListConnectorOperationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kafkaconnect/Interface/ListConnectorOperationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-kafkaconnect/Interface/ListConnectorOperationsCommandOutput/)
292+
277293
</details>
278294
<details>
279295
<summary>

clients/client-kafkaconnect/src/KafkaConnect.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ import {
3737
DescribeConnectorCommandInput,
3838
DescribeConnectorCommandOutput,
3939
} from "./commands/DescribeConnectorCommand";
40+
import {
41+
DescribeConnectorOperationCommand,
42+
DescribeConnectorOperationCommandInput,
43+
DescribeConnectorOperationCommandOutput,
44+
} from "./commands/DescribeConnectorOperationCommand";
4045
import {
4146
DescribeCustomPluginCommand,
4247
DescribeCustomPluginCommandInput,
@@ -47,6 +52,11 @@ import {
4752
DescribeWorkerConfigurationCommandInput,
4853
DescribeWorkerConfigurationCommandOutput,
4954
} from "./commands/DescribeWorkerConfigurationCommand";
55+
import {
56+
ListConnectorOperationsCommand,
57+
ListConnectorOperationsCommandInput,
58+
ListConnectorOperationsCommandOutput,
59+
} from "./commands/ListConnectorOperationsCommand";
5060
import {
5161
ListConnectorsCommand,
5262
ListConnectorsCommandInput,
@@ -88,8 +98,10 @@ const commands = {
8898
DeleteCustomPluginCommand,
8999
DeleteWorkerConfigurationCommand,
90100
DescribeConnectorCommand,
101+
DescribeConnectorOperationCommand,
91102
DescribeCustomPluginCommand,
92103
DescribeWorkerConfigurationCommand,
104+
ListConnectorOperationsCommand,
93105
ListConnectorsCommand,
94106
ListCustomPluginsCommand,
95107
ListTagsForResourceCommand,
@@ -213,6 +225,23 @@ export interface KafkaConnect {
213225
cb: (err: any, data?: DescribeConnectorCommandOutput) => void
214226
): void;
215227

228+
/**
229+
* @see {@link DescribeConnectorOperationCommand}
230+
*/
231+
describeConnectorOperation(
232+
args: DescribeConnectorOperationCommandInput,
233+
options?: __HttpHandlerOptions
234+
): Promise<DescribeConnectorOperationCommandOutput>;
235+
describeConnectorOperation(
236+
args: DescribeConnectorOperationCommandInput,
237+
cb: (err: any, data?: DescribeConnectorOperationCommandOutput) => void
238+
): void;
239+
describeConnectorOperation(
240+
args: DescribeConnectorOperationCommandInput,
241+
options: __HttpHandlerOptions,
242+
cb: (err: any, data?: DescribeConnectorOperationCommandOutput) => void
243+
): void;
244+
216245
/**
217246
* @see {@link DescribeCustomPluginCommand}
218247
*/
@@ -247,6 +276,23 @@ export interface KafkaConnect {
247276
cb: (err: any, data?: DescribeWorkerConfigurationCommandOutput) => void
248277
): void;
249278

279+
/**
280+
* @see {@link ListConnectorOperationsCommand}
281+
*/
282+
listConnectorOperations(
283+
args: ListConnectorOperationsCommandInput,
284+
options?: __HttpHandlerOptions
285+
): Promise<ListConnectorOperationsCommandOutput>;
286+
listConnectorOperations(
287+
args: ListConnectorOperationsCommandInput,
288+
cb: (err: any, data?: ListConnectorOperationsCommandOutput) => void
289+
): void;
290+
listConnectorOperations(
291+
args: ListConnectorOperationsCommandInput,
292+
options: __HttpHandlerOptions,
293+
cb: (err: any, data?: ListConnectorOperationsCommandOutput) => void
294+
): void;
295+
250296
/**
251297
* @see {@link ListConnectorsCommand}
252298
*/

clients/client-kafkaconnect/src/KafkaConnectClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ import {
6666
DeleteWorkerConfigurationCommandOutput,
6767
} from "./commands/DeleteWorkerConfigurationCommand";
6868
import { DescribeConnectorCommandInput, DescribeConnectorCommandOutput } from "./commands/DescribeConnectorCommand";
69+
import {
70+
DescribeConnectorOperationCommandInput,
71+
DescribeConnectorOperationCommandOutput,
72+
} from "./commands/DescribeConnectorOperationCommand";
6973
import {
7074
DescribeCustomPluginCommandInput,
7175
DescribeCustomPluginCommandOutput,
@@ -74,6 +78,10 @@ import {
7478
DescribeWorkerConfigurationCommandInput,
7579
DescribeWorkerConfigurationCommandOutput,
7680
} from "./commands/DescribeWorkerConfigurationCommand";
81+
import {
82+
ListConnectorOperationsCommandInput,
83+
ListConnectorOperationsCommandOutput,
84+
} from "./commands/ListConnectorOperationsCommand";
7785
import { ListConnectorsCommandInput, ListConnectorsCommandOutput } from "./commands/ListConnectorsCommand";
7886
import { ListCustomPluginsCommandInput, ListCustomPluginsCommandOutput } from "./commands/ListCustomPluginsCommand";
7987
import {
@@ -109,8 +117,10 @@ export type ServiceInputTypes =
109117
| DeleteCustomPluginCommandInput
110118
| DeleteWorkerConfigurationCommandInput
111119
| DescribeConnectorCommandInput
120+
| DescribeConnectorOperationCommandInput
112121
| DescribeCustomPluginCommandInput
113122
| DescribeWorkerConfigurationCommandInput
123+
| ListConnectorOperationsCommandInput
114124
| ListConnectorsCommandInput
115125
| ListCustomPluginsCommandInput
116126
| ListTagsForResourceCommandInput
@@ -130,8 +140,10 @@ export type ServiceOutputTypes =
130140
| DeleteCustomPluginCommandOutput
131141
| DeleteWorkerConfigurationCommandOutput
132142
| DescribeConnectorCommandOutput
143+
| DescribeConnectorOperationCommandOutput
133144
| DescribeCustomPluginCommandOutput
134145
| DescribeWorkerConfigurationCommandOutput
146+
| ListConnectorOperationsCommandOutput
135147
| ListConnectorsCommandOutput
136148
| ListCustomPluginsCommandOutput
137149
| ListTagsForResourceCommandOutput

clients/client-kafkaconnect/src/commands/CreateConnectorCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export interface CreateConnectorCommandOutput extends CreateConnectorResponse, _
5757
* workerCount: Number("int"), // required
5858
* },
5959
* },
60-
* connectorConfiguration: { // __sensitive__mapOf__string // required
60+
* connectorConfiguration: { // ConnectorConfiguration // required
6161
* "<keys>": "STRING_VALUE",
6262
* },
6363
* connectorDescription: "STRING_VALUE",

clients/client-kafkaconnect/src/commands/DescribeConnectorCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export interface DescribeConnectorCommandOutput extends DescribeConnectorRespons
6363
* // },
6464
* // },
6565
* // connectorArn: "STRING_VALUE",
66-
* // connectorConfiguration: { // __sensitive__mapOf__string
66+
* // connectorConfiguration: { // ConnectorConfiguration
6767
* // "<keys>": "STRING_VALUE",
6868
* // },
6969
* // connectorDescription: "STRING_VALUE",
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
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 { KafkaConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KafkaConnectClient";
9+
import {
10+
DescribeConnectorOperationRequest,
11+
DescribeConnectorOperationResponse,
12+
DescribeConnectorOperationResponseFilterSensitiveLog,
13+
} from "../models/models_0";
14+
import { de_DescribeConnectorOperationCommand, se_DescribeConnectorOperationCommand } from "../protocols/Aws_restJson1";
15+
16+
/**
17+
* @public
18+
*/
19+
export type { __MetadataBearer };
20+
export { $Command };
21+
/**
22+
* @public
23+
*
24+
* The input for {@link DescribeConnectorOperationCommand}.
25+
*/
26+
export interface DescribeConnectorOperationCommandInput extends DescribeConnectorOperationRequest {}
27+
/**
28+
* @public
29+
*
30+
* The output of {@link DescribeConnectorOperationCommand}.
31+
*/
32+
export interface DescribeConnectorOperationCommandOutput extends DescribeConnectorOperationResponse, __MetadataBearer {}
33+
34+
/**
35+
* <p>Returns information about the specified connector's operations.</p>
36+
* @example
37+
* Use a bare-bones client and the command you need to make an API call.
38+
* ```javascript
39+
* import { KafkaConnectClient, DescribeConnectorOperationCommand } from "@aws-sdk/client-kafkaconnect"; // ES Modules import
40+
* // const { KafkaConnectClient, DescribeConnectorOperationCommand } = require("@aws-sdk/client-kafkaconnect"); // CommonJS import
41+
* const client = new KafkaConnectClient(config);
42+
* const input = { // DescribeConnectorOperationRequest
43+
* connectorOperationArn: "STRING_VALUE", // required
44+
* };
45+
* const command = new DescribeConnectorOperationCommand(input);
46+
* const response = await client.send(command);
47+
* // { // DescribeConnectorOperationResponse
48+
* // connectorArn: "STRING_VALUE",
49+
* // connectorOperationArn: "STRING_VALUE",
50+
* // connectorOperationState: "STRING_VALUE",
51+
* // connectorOperationType: "STRING_VALUE",
52+
* // operationSteps: [ // __listOfConnectorOperationStep
53+
* // { // ConnectorOperationStep
54+
* // stepType: "STRING_VALUE",
55+
* // stepState: "STRING_VALUE",
56+
* // },
57+
* // ],
58+
* // originWorkerSetting: { // WorkerSetting
59+
* // capacity: { // CapacityDescription
60+
* // autoScaling: { // AutoScalingDescription
61+
* // maxWorkerCount: Number("int"),
62+
* // mcuCount: Number("int"),
63+
* // minWorkerCount: Number("int"),
64+
* // scaleInPolicy: { // ScaleInPolicyDescription
65+
* // cpuUtilizationPercentage: Number("int"),
66+
* // },
67+
* // scaleOutPolicy: { // ScaleOutPolicyDescription
68+
* // cpuUtilizationPercentage: Number("int"),
69+
* // },
70+
* // },
71+
* // provisionedCapacity: { // ProvisionedCapacityDescription
72+
* // mcuCount: Number("int"),
73+
* // workerCount: Number("int"),
74+
* // },
75+
* // },
76+
* // },
77+
* // originConnectorConfiguration: { // ConnectorConfiguration
78+
* // "<keys>": "STRING_VALUE",
79+
* // },
80+
* // targetWorkerSetting: {
81+
* // capacity: {
82+
* // autoScaling: {
83+
* // maxWorkerCount: Number("int"),
84+
* // mcuCount: Number("int"),
85+
* // minWorkerCount: Number("int"),
86+
* // scaleInPolicy: {
87+
* // cpuUtilizationPercentage: Number("int"),
88+
* // },
89+
* // scaleOutPolicy: {
90+
* // cpuUtilizationPercentage: Number("int"),
91+
* // },
92+
* // },
93+
* // provisionedCapacity: {
94+
* // mcuCount: Number("int"),
95+
* // workerCount: Number("int"),
96+
* // },
97+
* // },
98+
* // },
99+
* // targetConnectorConfiguration: {
100+
* // "<keys>": "STRING_VALUE",
101+
* // },
102+
* // errorInfo: { // StateDescription
103+
* // code: "STRING_VALUE",
104+
* // message: "STRING_VALUE",
105+
* // },
106+
* // creationTime: new Date("TIMESTAMP"),
107+
* // endTime: new Date("TIMESTAMP"),
108+
* // };
109+
*
110+
* ```
111+
*
112+
* @param DescribeConnectorOperationCommandInput - {@link DescribeConnectorOperationCommandInput}
113+
* @returns {@link DescribeConnectorOperationCommandOutput}
114+
* @see {@link DescribeConnectorOperationCommandInput} for command's `input` shape.
115+
* @see {@link DescribeConnectorOperationCommandOutput} for command's `response` shape.
116+
* @see {@link KafkaConnectClientResolvedConfig | config} for KafkaConnectClient's `config` shape.
117+
*
118+
* @throws {@link BadRequestException} (client fault)
119+
* <p>HTTP Status Code 400: Bad request due to incorrect input. Correct your request and then
120+
* retry it.</p>
121+
*
122+
* @throws {@link ForbiddenException} (client fault)
123+
* <p>HTTP Status Code 403: Access forbidden. Correct your credentials and then retry your
124+
* request.</p>
125+
*
126+
* @throws {@link InternalServerErrorException} (server fault)
127+
* <p>HTTP Status Code 500: Unexpected internal server error. Retrying your request might
128+
* resolve the issue.</p>
129+
*
130+
* @throws {@link NotFoundException} (client fault)
131+
* <p>HTTP Status Code 404: Resource not found due to incorrect input. Correct your request
132+
* and then retry it.</p>
133+
*
134+
* @throws {@link ServiceUnavailableException} (server fault)
135+
* <p>HTTP Status Code 503: Service Unavailable. Retrying your request in some time might
136+
* resolve the issue.</p>
137+
*
138+
* @throws {@link TooManyRequestsException} (client fault)
139+
* <p>HTTP Status Code 429: Limit exceeded. Resource limit reached.</p>
140+
*
141+
* @throws {@link UnauthorizedException} (client fault)
142+
* <p>HTTP Status Code 401: Unauthorized request. The provided credentials couldn't be
143+
* validated.</p>
144+
*
145+
* @throws {@link KafkaConnectServiceException}
146+
* <p>Base exception class for all service exceptions from KafkaConnect service.</p>
147+
*
148+
* @public
149+
*/
150+
export class DescribeConnectorOperationCommand extends $Command
151+
.classBuilder<
152+
DescribeConnectorOperationCommandInput,
153+
DescribeConnectorOperationCommandOutput,
154+
KafkaConnectClientResolvedConfig,
155+
ServiceInputTypes,
156+
ServiceOutputTypes
157+
>()
158+
.ep(commonParams)
159+
.m(function (this: any, Command: any, cs: any, config: KafkaConnectClientResolvedConfig, o: any) {
160+
return [
161+
getSerdePlugin(config, this.serialize, this.deserialize),
162+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
163+
];
164+
})
165+
.s("KafkaConnect", "DescribeConnectorOperation", {})
166+
.n("KafkaConnectClient", "DescribeConnectorOperationCommand")
167+
.f(void 0, DescribeConnectorOperationResponseFilterSensitiveLog)
168+
.ser(se_DescribeConnectorOperationCommand)
169+
.de(de_DescribeConnectorOperationCommand)
170+
.build() {
171+
/** @internal type navigation helper, not in runtime. */
172+
protected declare static __types: {
173+
api: {
174+
input: DescribeConnectorOperationRequest;
175+
output: DescribeConnectorOperationResponse;
176+
};
177+
sdk: {
178+
input: DescribeConnectorOperationCommandInput;
179+
output: DescribeConnectorOperationCommandOutput;
180+
};
181+
};
182+
}

0 commit comments

Comments
 (0)