@@ -327,6 +327,20 @@ def to_pb(self):
327327 return self ._pb
328328
329329
330+ class RenameIndexItem :
331+ def __init__ (self , source_name : str , destination_name : str , replace_destination : bool = False ):
332+ self ._source_name = source_name
333+ self ._destination_name = destination_name
334+ self ._replace_destination = replace_destination
335+
336+ def to_pb (self ):
337+ return _apis .ydb_table .RenameIndexItem (
338+ source_name = self ._source_name ,
339+ destination_name = self ._destination_name ,
340+ replace_destination = self ._replace_destination ,
341+ )
342+
343+
330344class ReplicationPolicy (object ):
331345 def __init__ (self ):
332346 self ._pb = _apis .ydb_table .ReplicationPolicy ()
@@ -1124,6 +1138,7 @@ def alter_table(
11241138 alter_partitioning_settings = None ,
11251139 set_key_bloom_filter = None ,
11261140 set_read_replicas_settings = None ,
1141+ rename_indexes = None ,
11271142 ):
11281143 pass
11291144
@@ -1321,6 +1336,7 @@ def alter_table(
13211336 alter_partitioning_settings : Optional ["ydb.PartitioningSettings" ] = None ,
13221337 set_key_bloom_filter : Optional ["ydb.FeatureFlag" ] = None ,
13231338 set_read_replicas_settings : Optional ["ydb.ReadReplicasSettings" ] = None ,
1339+ rename_indexes : Optional [List ["ydb.RenameIndexItem" ]] = None ,
13241340 ) -> "ydb.Operation" :
13251341 """
13261342 Alter a YDB table.
@@ -1340,6 +1356,7 @@ def alter_table(
13401356 :param set_compaction_policy: Compaction policy
13411357 :param alter_partitioning_settings: ydb.PartitioningSettings to alter
13421358 :param set_key_bloom_filter: ydb.FeatureFlag to set key bloom filter
1359+ :param rename_indexes: List of ydb.RenameIndexItem to rename
13431360
13441361 :return: Operation or YDB error otherwise.
13451362 """
@@ -1364,6 +1381,7 @@ def callee(session: Session):
13641381 alter_partitioning_settings = alter_partitioning_settings ,
13651382 set_key_bloom_filter = set_key_bloom_filter ,
13661383 set_read_replicas_settings = set_read_replicas_settings ,
1384+ rename_indexes = rename_indexes ,
13671385 )
13681386
13691387 return self ._pool .retry_operation_sync (callee )
@@ -1857,6 +1875,7 @@ def alter_table(
18571875 alter_partitioning_settings = None ,
18581876 set_key_bloom_filter = None ,
18591877 set_read_replicas_settings = None ,
1878+ rename_indexes = None ,
18601879 ):
18611880 return self ._driver (
18621881 _session_impl .alter_table_request_factory (
@@ -1876,6 +1895,7 @@ def alter_table(
18761895 alter_partitioning_settings ,
18771896 set_key_bloom_filter ,
18781897 set_read_replicas_settings ,
1898+ rename_indexes ,
18791899 ),
18801900 _apis .TableService .Stub ,
18811901 _apis .TableService .AlterTable ,
@@ -2088,6 +2108,7 @@ def async_alter_table(
20882108 alter_partitioning_settings = None ,
20892109 set_key_bloom_filter = None ,
20902110 set_read_replicas_settings = None ,
2111+ rename_indexes = None ,
20912112 ):
20922113 return self ._driver .future (
20932114 _session_impl .alter_table_request_factory (
@@ -2107,6 +2128,7 @@ def async_alter_table(
21072128 alter_partitioning_settings ,
21082129 set_key_bloom_filter ,
21092130 set_read_replicas_settings ,
2131+ rename_indexes ,
21102132 ),
21112133 _apis .TableService .Stub ,
21122134 _apis .TableService .AlterTable ,
0 commit comments