From f11ecace41cfc9e5cfdff01feb4ba6d192f9cdaf Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 16 May 2024 18:16:03 +0000 Subject: [PATCH] feat(client-kafka): AWS MSK support for Broker Removal. --- .../DescribeClusterOperationCommand.ts | 16 +++++++++ .../DescribeClusterOperationV2Command.ts | 16 +++++++++ .../commands/ListClusterOperationsCommand.ts | 16 +++++++++ clients/client-kafka/src/models/models_0.ts | 24 +++++++++++++ .../src/protocols/Aws_restJson1.ts | 24 +++++++++++++ codegen/sdk-codegen/aws-models/kafka.json | 35 +++++++++++++++++++ 6 files changed, 131 insertions(+) diff --git a/clients/client-kafka/src/commands/DescribeClusterOperationCommand.ts b/clients/client-kafka/src/commands/DescribeClusterOperationCommand.ts index bf2a15b3ca78..0d00cf056f43 100644 --- a/clients/client-kafka/src/commands/DescribeClusterOperationCommand.ts +++ b/clients/client-kafka/src/commands/DescribeClusterOperationCommand.ts @@ -155,6 +155,14 @@ export interface DescribeClusterOperationCommandOutput extends DescribeClusterOp * // }, * // }, * // StorageMode: "LOCAL" || "TIERED", + * // BrokerCountUpdateInfo: { // BrokerCountUpdateInfo + * // CreatedBrokerIds: [ // __listOf__double + * // Number("double"), + * // ], + * // DeletedBrokerIds: [ + * // Number("double"), + * // ], + * // }, * // }, * // TargetClusterInfo: { * // BrokerEBSVolumeInfo: [ @@ -251,6 +259,14 @@ export interface DescribeClusterOperationCommandOutput extends DescribeClusterOp * // }, * // }, * // StorageMode: "LOCAL" || "TIERED", + * // BrokerCountUpdateInfo: { + * // CreatedBrokerIds: [ + * // Number("double"), + * // ], + * // DeletedBrokerIds: [ + * // Number("double"), + * // ], + * // }, * // }, * // VpcConnectionInfo: { // VpcConnectionInfo * // VpcConnectionArn: "STRING_VALUE", diff --git a/clients/client-kafka/src/commands/DescribeClusterOperationV2Command.ts b/clients/client-kafka/src/commands/DescribeClusterOperationV2Command.ts index b51768cb1027..361bda25b0a7 100644 --- a/clients/client-kafka/src/commands/DescribeClusterOperationV2Command.ts +++ b/clients/client-kafka/src/commands/DescribeClusterOperationV2Command.ts @@ -156,6 +156,14 @@ export interface DescribeClusterOperationV2CommandOutput extends DescribeCluster * // }, * // }, * // StorageMode: "LOCAL" || "TIERED", + * // BrokerCountUpdateInfo: { // BrokerCountUpdateInfo + * // CreatedBrokerIds: [ // __listOf__double + * // Number("double"), + * // ], + * // DeletedBrokerIds: [ + * // Number("double"), + * // ], + * // }, * // }, * // TargetClusterInfo: { * // BrokerEBSVolumeInfo: [ @@ -252,6 +260,14 @@ export interface DescribeClusterOperationV2CommandOutput extends DescribeCluster * // }, * // }, * // StorageMode: "LOCAL" || "TIERED", + * // BrokerCountUpdateInfo: { + * // CreatedBrokerIds: [ + * // Number("double"), + * // ], + * // DeletedBrokerIds: [ + * // Number("double"), + * // ], + * // }, * // }, * // VpcConnectionInfo: { // VpcConnectionInfo * // VpcConnectionArn: "STRING_VALUE", diff --git a/clients/client-kafka/src/commands/ListClusterOperationsCommand.ts b/clients/client-kafka/src/commands/ListClusterOperationsCommand.ts index 8d43d44db357..dcfb10f5a397 100644 --- a/clients/client-kafka/src/commands/ListClusterOperationsCommand.ts +++ b/clients/client-kafka/src/commands/ListClusterOperationsCommand.ts @@ -158,6 +158,14 @@ export interface ListClusterOperationsCommandOutput extends ListClusterOperation * // }, * // }, * // StorageMode: "LOCAL" || "TIERED", + * // BrokerCountUpdateInfo: { // BrokerCountUpdateInfo + * // CreatedBrokerIds: [ // __listOf__double + * // Number("double"), + * // ], + * // DeletedBrokerIds: [ + * // Number("double"), + * // ], + * // }, * // }, * // TargetClusterInfo: { * // BrokerEBSVolumeInfo: [ @@ -254,6 +262,14 @@ export interface ListClusterOperationsCommandOutput extends ListClusterOperation * // }, * // }, * // StorageMode: "LOCAL" || "TIERED", + * // BrokerCountUpdateInfo: { + * // CreatedBrokerIds: [ + * // Number("double"), + * // ], + * // DeletedBrokerIds: [ + * // Number("double"), + * // ], + * // }, * // }, * // VpcConnectionInfo: { // VpcConnectionInfo * // VpcConnectionArn: "STRING_VALUE", diff --git a/clients/client-kafka/src/models/models_0.ts b/clients/client-kafka/src/models/models_0.ts index 3feceb94738b..14df698cd663 100644 --- a/clients/client-kafka/src/models/models_0.ts +++ b/clients/client-kafka/src/models/models_0.ts @@ -1108,6 +1108,24 @@ export interface ClusterOperationStep { StepName?: string; } +/** + *

Information regarding UpdateBrokerCount.

+ * @public + */ +export interface BrokerCountUpdateInfo { + /** + *

Kafka Broker IDs of brokers being created.

+ * @public + */ + CreatedBrokerIds?: number[]; + + /** + *

Kafka Broker IDs of brokers being deleted.

+ * @public + */ + DeletedBrokerIds?: number[]; +} + /** *

Specifies the configuration to use for the brokers.

* @public @@ -1202,6 +1220,12 @@ export interface MutableClusterInfo { * @public */ StorageMode?: StorageMode; + + /** + *

Describes brokers being changed during a broker count update.

+ * @public + */ + BrokerCountUpdateInfo?: BrokerCountUpdateInfo; } /** diff --git a/clients/client-kafka/src/protocols/Aws_restJson1.ts b/clients/client-kafka/src/protocols/Aws_restJson1.ts index 99b8f75b0b00..630c042f60be 100644 --- a/clients/client-kafka/src/protocols/Aws_restJson1.ts +++ b/clients/client-kafka/src/protocols/Aws_restJson1.ts @@ -157,6 +157,7 @@ import { KafkaServiceException as __BaseException } from "../models/KafkaService import { AmazonMskCluster, BadRequestException, + BrokerCountUpdateInfo, BrokerEBSVolumeInfo, BrokerLogs, BrokerNodeGroupInfo, @@ -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. @@ -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 */ @@ -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`], diff --git a/codegen/sdk-codegen/aws-models/kafka.json b/codegen/sdk-codegen/aws-models/kafka.json index 4499e87923f3..5ab828fbcc75 100644 --- a/codegen/sdk-codegen/aws-models/kafka.json +++ b/codegen/sdk-codegen/aws-models/kafka.json @@ -260,6 +260,28 @@ "smithy.api#documentation": "

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.

\n

Amazon MSK distributes the broker nodes evenly across the Availability Zones that correspond to the subnets you provide when you create the cluster.

" } }, + "com.amazonaws.kafka#BrokerCountUpdateInfo": { + "type": "structure", + "members": { + "CreatedBrokerIds": { + "target": "com.amazonaws.kafka#__listOf__double", + "traits": { + "smithy.api#documentation": "

Kafka Broker IDs of brokers being created.

", + "smithy.api#jsonName": "createdBrokerIds" + } + }, + "DeletedBrokerIds": { + "target": "com.amazonaws.kafka#__listOf__double", + "traits": { + "smithy.api#documentation": "

Kafka Broker IDs of brokers being deleted.

", + "smithy.api#jsonName": "deletedBrokerIds" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information regarding UpdateBrokerCount.

" + } + }, "com.amazonaws.kafka#BrokerEBSVolumeInfo": { "type": "structure", "members": { @@ -6375,6 +6397,13 @@ "smithy.api#documentation": "

This controls storage mode for supported storage tiers.

", "smithy.api#jsonName": "storageMode" } + }, + "BrokerCountUpdateInfo": { + "target": "com.amazonaws.kafka#BrokerCountUpdateInfo", + "traits": { + "smithy.api#documentation": "

Describes brokers being changed during a broker count update.

", + "smithy.api#jsonName": "brokerCountUpdateInfo" + } } }, "traits": { @@ -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": {