Skip to content

Commit f11ecac

Browse files
author
awstools
committed
feat(client-kafka): AWS MSK support for Broker Removal.
1 parent d4c2ced commit f11ecac

File tree

6 files changed

+131
-0
lines changed

6 files changed

+131
-0
lines changed

clients/client-kafka/src/commands/DescribeClusterOperationCommand.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,14 @@ export interface DescribeClusterOperationCommandOutput extends DescribeClusterOp
155155
* // },
156156
* // },
157157
* // StorageMode: "LOCAL" || "TIERED",
158+
* // BrokerCountUpdateInfo: { // BrokerCountUpdateInfo
159+
* // CreatedBrokerIds: [ // __listOf__double
160+
* // Number("double"),
161+
* // ],
162+
* // DeletedBrokerIds: [
163+
* // Number("double"),
164+
* // ],
165+
* // },
158166
* // },
159167
* // TargetClusterInfo: {
160168
* // BrokerEBSVolumeInfo: [
@@ -251,6 +259,14 @@ export interface DescribeClusterOperationCommandOutput extends DescribeClusterOp
251259
* // },
252260
* // },
253261
* // StorageMode: "LOCAL" || "TIERED",
262+
* // BrokerCountUpdateInfo: {
263+
* // CreatedBrokerIds: [
264+
* // Number("double"),
265+
* // ],
266+
* // DeletedBrokerIds: [
267+
* // Number("double"),
268+
* // ],
269+
* // },
254270
* // },
255271
* // VpcConnectionInfo: { // VpcConnectionInfo
256272
* // VpcConnectionArn: "STRING_VALUE",

clients/client-kafka/src/commands/DescribeClusterOperationV2Command.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ export interface DescribeClusterOperationV2CommandOutput extends DescribeCluster
156156
* // },
157157
* // },
158158
* // StorageMode: "LOCAL" || "TIERED",
159+
* // BrokerCountUpdateInfo: { // BrokerCountUpdateInfo
160+
* // CreatedBrokerIds: [ // __listOf__double
161+
* // Number("double"),
162+
* // ],
163+
* // DeletedBrokerIds: [
164+
* // Number("double"),
165+
* // ],
166+
* // },
159167
* // },
160168
* // TargetClusterInfo: {
161169
* // BrokerEBSVolumeInfo: [
@@ -252,6 +260,14 @@ export interface DescribeClusterOperationV2CommandOutput extends DescribeCluster
252260
* // },
253261
* // },
254262
* // StorageMode: "LOCAL" || "TIERED",
263+
* // BrokerCountUpdateInfo: {
264+
* // CreatedBrokerIds: [
265+
* // Number("double"),
266+
* // ],
267+
* // DeletedBrokerIds: [
268+
* // Number("double"),
269+
* // ],
270+
* // },
255271
* // },
256272
* // VpcConnectionInfo: { // VpcConnectionInfo
257273
* // VpcConnectionArn: "STRING_VALUE",

clients/client-kafka/src/commands/ListClusterOperationsCommand.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ export interface ListClusterOperationsCommandOutput extends ListClusterOperation
158158
* // },
159159
* // },
160160
* // StorageMode: "LOCAL" || "TIERED",
161+
* // BrokerCountUpdateInfo: { // BrokerCountUpdateInfo
162+
* // CreatedBrokerIds: [ // __listOf__double
163+
* // Number("double"),
164+
* // ],
165+
* // DeletedBrokerIds: [
166+
* // Number("double"),
167+
* // ],
168+
* // },
161169
* // },
162170
* // TargetClusterInfo: {
163171
* // BrokerEBSVolumeInfo: [
@@ -254,6 +262,14 @@ export interface ListClusterOperationsCommandOutput extends ListClusterOperation
254262
* // },
255263
* // },
256264
* // StorageMode: "LOCAL" || "TIERED",
265+
* // BrokerCountUpdateInfo: {
266+
* // CreatedBrokerIds: [
267+
* // Number("double"),
268+
* // ],
269+
* // DeletedBrokerIds: [
270+
* // Number("double"),
271+
* // ],
272+
* // },
257273
* // },
258274
* // VpcConnectionInfo: { // VpcConnectionInfo
259275
* // VpcConnectionArn: "STRING_VALUE",

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,24 @@ export interface ClusterOperationStep {
11081108
StepName?: string;
11091109
}
11101110

1111+
/**
1112+
* <p>Information regarding UpdateBrokerCount.</p>
1113+
* @public
1114+
*/
1115+
export interface BrokerCountUpdateInfo {
1116+
/**
1117+
* <p>Kafka Broker IDs of brokers being created.</p>
1118+
* @public
1119+
*/
1120+
CreatedBrokerIds?: number[];
1121+
1122+
/**
1123+
* <p>Kafka Broker IDs of brokers being deleted.</p>
1124+
* @public
1125+
*/
1126+
DeletedBrokerIds?: number[];
1127+
}
1128+
11111129
/**
11121130
* <p>Specifies the configuration to use for the brokers.</p>
11131131
* @public
@@ -1202,6 +1220,12 @@ export interface MutableClusterInfo {
12021220
* @public
12031221
*/
12041222
StorageMode?: StorageMode;
1223+
1224+
/**
1225+
* <p>Describes brokers being changed during a broker count update.</p>
1226+
* @public
1227+
*/
1228+
BrokerCountUpdateInfo?: BrokerCountUpdateInfo;
12051229
}
12061230

12071231
/**

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ import { KafkaServiceException as __BaseException } from "../models/KafkaService
157157
import {
158158
AmazonMskCluster,
159159
BadRequestException,
160+
BrokerCountUpdateInfo,
160161
BrokerEBSVolumeInfo,
161162
BrokerLogs,
162163
BrokerNodeGroupInfo,
@@ -3232,6 +3233,18 @@ const se_VpcConnectivityTls = (input: VpcConnectivityTls, context: __SerdeContex
32323233
});
32333234
};
32343235

3236+
/**
3237+
* deserializeAws_restJson1__listOf__double
3238+
*/
3239+
const de___listOf__double = (output: any, context: __SerdeContext): number[] => {
3240+
const retVal = (output || [])
3241+
.filter((e: any) => e != null)
3242+
.map((entry: any) => {
3243+
return __limitedParseDouble(entry) as any;
3244+
});
3245+
return retVal;
3246+
};
3247+
32353248
// de___listOf__string omitted.
32363249

32373250
// de___listOf__stringMax249 omitted.
@@ -3489,6 +3502,16 @@ const de_AmazonMskCluster = (output: any, context: __SerdeContext): AmazonMskClu
34893502
}) as any;
34903503
};
34913504

3505+
/**
3506+
* deserializeAws_restJson1BrokerCountUpdateInfo
3507+
*/
3508+
const de_BrokerCountUpdateInfo = (output: any, context: __SerdeContext): BrokerCountUpdateInfo => {
3509+
return take(output, {
3510+
CreatedBrokerIds: [, (_: any) => de___listOf__double(_, context), `createdBrokerIds`],
3511+
DeletedBrokerIds: [, (_: any) => de___listOf__double(_, context), `deletedBrokerIds`],
3512+
}) as any;
3513+
};
3514+
34923515
/**
34933516
* deserializeAws_restJson1BrokerEBSVolumeInfo
34943517
*/
@@ -3934,6 +3957,7 @@ const de_LoggingInfo = (output: any, context: __SerdeContext): LoggingInfo => {
39343957
*/
39353958
const de_MutableClusterInfo = (output: any, context: __SerdeContext): MutableClusterInfo => {
39363959
return take(output, {
3960+
BrokerCountUpdateInfo: [, (_: any) => de_BrokerCountUpdateInfo(_, context), `brokerCountUpdateInfo`],
39373961
BrokerEBSVolumeInfo: [, (_: any) => de___listOfBrokerEBSVolumeInfo(_, context), `brokerEBSVolumeInfo`],
39383962
ClientAuthentication: [, (_: any) => de_ClientAuthentication(_, context), `clientAuthentication`],
39393963
ConfigurationInfo: [, (_: any) => de_ConfigurationInfo(_, context), `configurationInfo`],

codegen/sdk-codegen/aws-models/kafka.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,28 @@
260260
"smithy.api#documentation": "<p>The distribution of broker nodes across Availability Zones. This is an optional parameter. If you don't specify it, Amazon MSK gives it the value DEFAULT. You can also explicitly set this parameter to the value DEFAULT. No other values are currently allowed.</p>\n <p>Amazon MSK distributes the broker nodes evenly across the Availability Zones that correspond to the subnets you provide when you create the cluster.</p>"
261261
}
262262
},
263+
"com.amazonaws.kafka#BrokerCountUpdateInfo": {
264+
"type": "structure",
265+
"members": {
266+
"CreatedBrokerIds": {
267+
"target": "com.amazonaws.kafka#__listOf__double",
268+
"traits": {
269+
"smithy.api#documentation": "<p>Kafka Broker IDs of brokers being created.</p>",
270+
"smithy.api#jsonName": "createdBrokerIds"
271+
}
272+
},
273+
"DeletedBrokerIds": {
274+
"target": "com.amazonaws.kafka#__listOf__double",
275+
"traits": {
276+
"smithy.api#documentation": "<p>Kafka Broker IDs of brokers being deleted.</p>",
277+
"smithy.api#jsonName": "deletedBrokerIds"
278+
}
279+
}
280+
},
281+
"traits": {
282+
"smithy.api#documentation": "<p>Information regarding UpdateBrokerCount.</p>"
283+
}
284+
},
263285
"com.amazonaws.kafka#BrokerEBSVolumeInfo": {
264286
"type": "structure",
265287
"members": {
@@ -6375,6 +6397,13 @@
63756397
"smithy.api#documentation": "<p>This controls storage mode for supported storage tiers.</p>",
63766398
"smithy.api#jsonName": "storageMode"
63776399
}
6400+
},
6401+
"BrokerCountUpdateInfo": {
6402+
"target": "com.amazonaws.kafka#BrokerCountUpdateInfo",
6403+
"traits": {
6404+
"smithy.api#documentation": "<p>Describes brokers being changed during a broker count update.</p>",
6405+
"smithy.api#jsonName": "brokerCountUpdateInfo"
6406+
}
63786407
}
63796408
},
63806409
"traits": {
@@ -9533,6 +9562,12 @@
95339562
"target": "com.amazonaws.kafka#VpcConnection"
95349563
}
95359564
},
9565+
"com.amazonaws.kafka#__listOf__double": {
9566+
"type": "list",
9567+
"member": {
9568+
"target": "com.amazonaws.kafka#__double"
9569+
}
9570+
},
95369571
"com.amazonaws.kafka#__listOf__string": {
95379572
"type": "list",
95389573
"member": {

0 commit comments

Comments
 (0)