Skip to content

Commit 5526ef7

Browse files
author
awstools
committed
feat(client-kafka): Added support for specifying the starting position of topic replication in MSK-Replicator.
1 parent 3e83504 commit 5526ef7

File tree

5 files changed

+102
-0
lines changed

5 files changed

+102
-0
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ export interface CreateReplicatorCommandOutput extends CreateReplicatorResponse,
7171
* CopyAccessControlListsForTopics: true || false,
7272
* CopyTopicConfigurations: true || false,
7373
* DetectAndCopyNewTopics: true || false,
74+
* StartingPosition: { // ReplicationStartingPosition
75+
* Type: "LATEST" || "EARLIEST",
76+
* },
7477
* TopicsToExclude: [ // __listOf__stringMax249
7578
* "STRING_VALUE",
7679
* ],

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

+3
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export interface DescribeReplicatorCommandOutput extends DescribeReplicatorRespo
7979
* // CopyAccessControlListsForTopics: true || false,
8080
* // CopyTopicConfigurations: true || false,
8181
* // DetectAndCopyNewTopics: true || false,
82+
* // StartingPosition: { // ReplicationStartingPosition
83+
* // Type: "LATEST" || "EARLIEST",
84+
* // },
8285
* // TopicsToExclude: [ // __listOf__stringMax249
8386
* // "STRING_VALUE",
8487
* // ],

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

+33
Original file line numberDiff line numberDiff line change
@@ -1789,6 +1789,33 @@ export const TargetCompressionType = {
17891789
*/
17901790
export type TargetCompressionType = (typeof TargetCompressionType)[keyof typeof TargetCompressionType];
17911791

1792+
/**
1793+
* @public
1794+
* @enum
1795+
*/
1796+
export const ReplicationStartingPositionType = {
1797+
EARLIEST: "EARLIEST",
1798+
LATEST: "LATEST",
1799+
} as const;
1800+
1801+
/**
1802+
* @public
1803+
*/
1804+
export type ReplicationStartingPositionType =
1805+
(typeof ReplicationStartingPositionType)[keyof typeof ReplicationStartingPositionType];
1806+
1807+
/**
1808+
* @public
1809+
* <p>Configuration for specifying the position in the topics to start replicating from.</p>
1810+
*/
1811+
export interface ReplicationStartingPosition {
1812+
/**
1813+
* @public
1814+
* <p>The type of replication starting position.</p>
1815+
*/
1816+
Type?: ReplicationStartingPositionType;
1817+
}
1818+
17921819
/**
17931820
* @public
17941821
* <p>Details about topic replication.</p>
@@ -1812,6 +1839,12 @@ export interface TopicReplication {
18121839
*/
18131840
DetectAndCopyNewTopics?: boolean;
18141841

1842+
/**
1843+
* @public
1844+
* <p>Configuration for specifying the position in the topics to start replicating from.</p>
1845+
*/
1846+
StartingPosition?: ReplicationStartingPosition;
1847+
18151848
/**
18161849
* @public
18171850
* <p>List of regular expression patterns indicating the topics that should not be replicated.</p>

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

+21
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ import {
215215
ReplicationInfo,
216216
ReplicationInfoDescription,
217217
ReplicationInfoSummary,
218+
ReplicationStartingPosition,
218219
ReplicationStateInfo,
219220
ReplicatorSummary,
220221
S3,
@@ -3040,6 +3041,15 @@ const se_ReplicationInfo = (input: ReplicationInfo, context: __SerdeContext): an
30403041
});
30413042
};
30423043

3044+
/**
3045+
* serializeAws_restJson1ReplicationStartingPosition
3046+
*/
3047+
const se_ReplicationStartingPosition = (input: ReplicationStartingPosition, context: __SerdeContext): any => {
3048+
return take(input, {
3049+
type: [, , `Type`],
3050+
});
3051+
};
3052+
30433053
/**
30443054
* serializeAws_restJson1S3
30453055
*/
@@ -3125,6 +3135,7 @@ const se_TopicReplication = (input: TopicReplication, context: __SerdeContext):
31253135
copyAccessControlListsForTopics: [, , `CopyAccessControlListsForTopics`],
31263136
copyTopicConfigurations: [, , `CopyTopicConfigurations`],
31273137
detectAndCopyNewTopics: [, , `DetectAndCopyNewTopics`],
3138+
startingPosition: [, (_) => se_ReplicationStartingPosition(_, context), `StartingPosition`],
31283139
topicsToExclude: [, _json, `TopicsToExclude`],
31293140
topicsToReplicate: [, _json, `TopicsToReplicate`],
31303141
});
@@ -4070,6 +4081,15 @@ const de_ReplicationInfoSummary = (output: any, context: __SerdeContext): Replic
40704081
}) as any;
40714082
};
40724083

4084+
/**
4085+
* deserializeAws_restJson1ReplicationStartingPosition
4086+
*/
4087+
const de_ReplicationStartingPosition = (output: any, context: __SerdeContext): ReplicationStartingPosition => {
4088+
return take(output, {
4089+
Type: [, __expectString, `type`],
4090+
}) as any;
4091+
};
4092+
40734093
/**
40744094
* deserializeAws_restJson1ReplicationStateInfo
40754095
*/
@@ -4196,6 +4216,7 @@ const de_TopicReplication = (output: any, context: __SerdeContext): TopicReplica
41964216
CopyAccessControlListsForTopics: [, __expectBoolean, `copyAccessControlListsForTopics`],
41974217
CopyTopicConfigurations: [, __expectBoolean, `copyTopicConfigurations`],
41984218
DetectAndCopyNewTopics: [, __expectBoolean, `detectAndCopyNewTopics`],
4219+
StartingPosition: [, (_: any) => de_ReplicationStartingPosition(_, context), `startingPosition`],
41994220
TopicsToExclude: [, _json, `topicsToExclude`],
42004221
TopicsToReplicate: [, _json, `topicsToReplicate`],
42014222
}) as any;

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

+42
Original file line numberDiff line numberDiff line change
@@ -7145,6 +7145,41 @@
71457145
"smithy.api#documentation": "<p>Summarized information of replication between clusters.</p>"
71467146
}
71477147
},
7148+
"com.amazonaws.kafka#ReplicationStartingPosition": {
7149+
"type": "structure",
7150+
"members": {
7151+
"Type": {
7152+
"target": "com.amazonaws.kafka#ReplicationStartingPositionType",
7153+
"traits": {
7154+
"smithy.api#documentation": "<p>The type of replication starting position.</p>",
7155+
"smithy.api#jsonName": "type"
7156+
}
7157+
}
7158+
},
7159+
"traits": {
7160+
"smithy.api#documentation": "<p>Configuration for specifying the position in the topics to start replicating from.</p>"
7161+
}
7162+
},
7163+
"com.amazonaws.kafka#ReplicationStartingPositionType": {
7164+
"type": "enum",
7165+
"members": {
7166+
"LATEST": {
7167+
"target": "smithy.api#Unit",
7168+
"traits": {
7169+
"smithy.api#enumValue": "LATEST"
7170+
}
7171+
},
7172+
"EARLIEST": {
7173+
"target": "smithy.api#Unit",
7174+
"traits": {
7175+
"smithy.api#enumValue": "EARLIEST"
7176+
}
7177+
}
7178+
},
7179+
"traits": {
7180+
"smithy.api#documentation": "<p>The type of replication starting position.</p>"
7181+
}
7182+
},
71487183
"com.amazonaws.kafka#ReplicationStateInfo": {
71497184
"type": "structure",
71507185
"members": {
@@ -7653,6 +7688,13 @@
76537688
"smithy.api#jsonName": "detectAndCopyNewTopics"
76547689
}
76557690
},
7691+
"StartingPosition": {
7692+
"target": "com.amazonaws.kafka#ReplicationStartingPosition",
7693+
"traits": {
7694+
"smithy.api#documentation": "<p>Configuration for specifying the position in the topics to start replicating from.</p>",
7695+
"smithy.api#jsonName": "startingPosition"
7696+
}
7697+
},
76567698
"TopicsToExclude": {
76577699
"target": "com.amazonaws.kafka#__listOf__stringMax249",
76587700
"traits": {

0 commit comments

Comments
 (0)