Skip to content

Commit

Permalink
feat(client-kafka): AWS MSK support for Broker Removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed May 16, 2024
1 parent d4c2ced commit f11ecac
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ export interface DescribeClusterOperationCommandOutput extends DescribeClusterOp
* // },
* // },
* // StorageMode: "LOCAL" || "TIERED",
* // BrokerCountUpdateInfo: { // BrokerCountUpdateInfo
* // CreatedBrokerIds: [ // __listOf__double
* // Number("double"),
* // ],
* // DeletedBrokerIds: [
* // Number("double"),
* // ],
* // },
* // },
* // TargetClusterInfo: {
* // BrokerEBSVolumeInfo: [
Expand Down Expand Up @@ -251,6 +259,14 @@ export interface DescribeClusterOperationCommandOutput extends DescribeClusterOp
* // },
* // },
* // StorageMode: "LOCAL" || "TIERED",
* // BrokerCountUpdateInfo: {
* // CreatedBrokerIds: [
* // Number("double"),
* // ],
* // DeletedBrokerIds: [
* // Number("double"),
* // ],
* // },
* // },
* // VpcConnectionInfo: { // VpcConnectionInfo
* // VpcConnectionArn: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ export interface DescribeClusterOperationV2CommandOutput extends DescribeCluster
* // },
* // },
* // StorageMode: "LOCAL" || "TIERED",
* // BrokerCountUpdateInfo: { // BrokerCountUpdateInfo
* // CreatedBrokerIds: [ // __listOf__double
* // Number("double"),
* // ],
* // DeletedBrokerIds: [
* // Number("double"),
* // ],
* // },
* // },
* // TargetClusterInfo: {
* // BrokerEBSVolumeInfo: [
Expand Down Expand Up @@ -252,6 +260,14 @@ export interface DescribeClusterOperationV2CommandOutput extends DescribeCluster
* // },
* // },
* // StorageMode: "LOCAL" || "TIERED",
* // BrokerCountUpdateInfo: {
* // CreatedBrokerIds: [
* // Number("double"),
* // ],
* // DeletedBrokerIds: [
* // Number("double"),
* // ],
* // },
* // },
* // VpcConnectionInfo: { // VpcConnectionInfo
* // VpcConnectionArn: "STRING_VALUE",
Expand Down
16 changes: 16 additions & 0 deletions clients/client-kafka/src/commands/ListClusterOperationsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ export interface ListClusterOperationsCommandOutput extends ListClusterOperation
* // },
* // },
* // StorageMode: "LOCAL" || "TIERED",
* // BrokerCountUpdateInfo: { // BrokerCountUpdateInfo
* // CreatedBrokerIds: [ // __listOf__double
* // Number("double"),
* // ],
* // DeletedBrokerIds: [
* // Number("double"),
* // ],
* // },
* // },
* // TargetClusterInfo: {
* // BrokerEBSVolumeInfo: [
Expand Down Expand Up @@ -254,6 +262,14 @@ export interface ListClusterOperationsCommandOutput extends ListClusterOperation
* // },
* // },
* // StorageMode: "LOCAL" || "TIERED",
* // BrokerCountUpdateInfo: {
* // CreatedBrokerIds: [
* // Number("double"),
* // ],
* // DeletedBrokerIds: [
* // Number("double"),
* // ],
* // },
* // },
* // VpcConnectionInfo: { // VpcConnectionInfo
* // VpcConnectionArn: "STRING_VALUE",
Expand Down
24 changes: 24 additions & 0 deletions clients/client-kafka/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,24 @@ export interface ClusterOperationStep {
StepName?: string;
}

/**
* <p>Information regarding UpdateBrokerCount.</p>
* @public
*/
export interface BrokerCountUpdateInfo {
/**
* <p>Kafka Broker IDs of brokers being created.</p>
* @public
*/
CreatedBrokerIds?: number[];

/**
* <p>Kafka Broker IDs of brokers being deleted.</p>
* @public
*/
DeletedBrokerIds?: number[];
}

/**
* <p>Specifies the configuration to use for the brokers.</p>
* @public
Expand Down Expand Up @@ -1202,6 +1220,12 @@ export interface MutableClusterInfo {
* @public
*/
StorageMode?: StorageMode;

/**
* <p>Describes brokers being changed during a broker count update.</p>
* @public
*/
BrokerCountUpdateInfo?: BrokerCountUpdateInfo;
}

/**
Expand Down
24 changes: 24 additions & 0 deletions clients/client-kafka/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ import { KafkaServiceException as __BaseException } from "../models/KafkaService
import {
AmazonMskCluster,
BadRequestException,
BrokerCountUpdateInfo,
BrokerEBSVolumeInfo,
BrokerLogs,
BrokerNodeGroupInfo,
Expand Down Expand Up @@ -3232,6 +3233,18 @@ const se_VpcConnectivityTls = (input: VpcConnectivityTls, context: __SerdeContex
});
};

/**
* deserializeAws_restJson1__listOf__double
*/
const de___listOf__double = (output: any, context: __SerdeContext): number[] => {
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
return __limitedParseDouble(entry) as any;
});
return retVal;
};

// de___listOf__string omitted.

// de___listOf__stringMax249 omitted.
Expand Down Expand Up @@ -3489,6 +3502,16 @@ const de_AmazonMskCluster = (output: any, context: __SerdeContext): AmazonMskClu
}) as any;
};

/**
* deserializeAws_restJson1BrokerCountUpdateInfo
*/
const de_BrokerCountUpdateInfo = (output: any, context: __SerdeContext): BrokerCountUpdateInfo => {
return take(output, {
CreatedBrokerIds: [, (_: any) => de___listOf__double(_, context), `createdBrokerIds`],
DeletedBrokerIds: [, (_: any) => de___listOf__double(_, context), `deletedBrokerIds`],
}) as any;
};

/**
* deserializeAws_restJson1BrokerEBSVolumeInfo
*/
Expand Down Expand Up @@ -3934,6 +3957,7 @@ const de_LoggingInfo = (output: any, context: __SerdeContext): LoggingInfo => {
*/
const de_MutableClusterInfo = (output: any, context: __SerdeContext): MutableClusterInfo => {
return take(output, {
BrokerCountUpdateInfo: [, (_: any) => de_BrokerCountUpdateInfo(_, context), `brokerCountUpdateInfo`],
BrokerEBSVolumeInfo: [, (_: any) => de___listOfBrokerEBSVolumeInfo(_, context), `brokerEBSVolumeInfo`],
ClientAuthentication: [, (_: any) => de_ClientAuthentication(_, context), `clientAuthentication`],
ConfigurationInfo: [, (_: any) => de_ConfigurationInfo(_, context), `configurationInfo`],
Expand Down
35 changes: 35 additions & 0 deletions codegen/sdk-codegen/aws-models/kafka.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,28 @@
"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>"
}
},
"com.amazonaws.kafka#BrokerCountUpdateInfo": {
"type": "structure",
"members": {
"CreatedBrokerIds": {
"target": "com.amazonaws.kafka#__listOf__double",
"traits": {
"smithy.api#documentation": "<p>Kafka Broker IDs of brokers being created.</p>",
"smithy.api#jsonName": "createdBrokerIds"
}
},
"DeletedBrokerIds": {
"target": "com.amazonaws.kafka#__listOf__double",
"traits": {
"smithy.api#documentation": "<p>Kafka Broker IDs of brokers being deleted.</p>",
"smithy.api#jsonName": "deletedBrokerIds"
}
}
},
"traits": {
"smithy.api#documentation": "<p>Information regarding UpdateBrokerCount.</p>"
}
},
"com.amazonaws.kafka#BrokerEBSVolumeInfo": {
"type": "structure",
"members": {
Expand Down Expand Up @@ -6375,6 +6397,13 @@
"smithy.api#documentation": "<p>This controls storage mode for supported storage tiers.</p>",
"smithy.api#jsonName": "storageMode"
}
},
"BrokerCountUpdateInfo": {
"target": "com.amazonaws.kafka#BrokerCountUpdateInfo",
"traits": {
"smithy.api#documentation": "<p>Describes brokers being changed during a broker count update.</p>",
"smithy.api#jsonName": "brokerCountUpdateInfo"
}
}
},
"traits": {
Expand Down Expand Up @@ -9533,6 +9562,12 @@
"target": "com.amazonaws.kafka#VpcConnection"
}
},
"com.amazonaws.kafka#__listOf__double": {
"type": "list",
"member": {
"target": "com.amazonaws.kafka#__double"
}
},
"com.amazonaws.kafka#__listOf__string": {
"type": "list",
"member": {
Expand Down

0 comments on commit f11ecac

Please sign in to comment.