@@ -327,6 +327,20 @@ def to_pb(self):
327
327
return self ._pb
328
328
329
329
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
+
330
344
class ReplicationPolicy (object ):
331
345
def __init__ (self ):
332
346
self ._pb = _apis .ydb_table .ReplicationPolicy ()
@@ -1124,6 +1138,7 @@ def alter_table(
1124
1138
alter_partitioning_settings = None ,
1125
1139
set_key_bloom_filter = None ,
1126
1140
set_read_replicas_settings = None ,
1141
+ rename_indexes = None ,
1127
1142
):
1128
1143
pass
1129
1144
@@ -1321,6 +1336,7 @@ def alter_table(
1321
1336
alter_partitioning_settings : Optional ["ydb.PartitioningSettings" ] = None ,
1322
1337
set_key_bloom_filter : Optional ["ydb.FeatureFlag" ] = None ,
1323
1338
set_read_replicas_settings : Optional ["ydb.ReadReplicasSettings" ] = None ,
1339
+ rename_indexes : Optional [List ["ydb.RenameIndexItem" ]] = None ,
1324
1340
) -> "ydb.Operation" :
1325
1341
"""
1326
1342
Alter a YDB table.
@@ -1340,6 +1356,7 @@ def alter_table(
1340
1356
:param set_compaction_policy: Compaction policy
1341
1357
:param alter_partitioning_settings: ydb.PartitioningSettings to alter
1342
1358
:param set_key_bloom_filter: ydb.FeatureFlag to set key bloom filter
1359
+ :param rename_indexes: List of ydb.RenameIndexItem to rename
1343
1360
1344
1361
:return: Operation or YDB error otherwise.
1345
1362
"""
@@ -1364,6 +1381,7 @@ def callee(session: Session):
1364
1381
alter_partitioning_settings = alter_partitioning_settings ,
1365
1382
set_key_bloom_filter = set_key_bloom_filter ,
1366
1383
set_read_replicas_settings = set_read_replicas_settings ,
1384
+ rename_indexes = rename_indexes ,
1367
1385
)
1368
1386
1369
1387
return self ._pool .retry_operation_sync (callee )
@@ -1857,6 +1875,7 @@ def alter_table(
1857
1875
alter_partitioning_settings = None ,
1858
1876
set_key_bloom_filter = None ,
1859
1877
set_read_replicas_settings = None ,
1878
+ rename_indexes = None ,
1860
1879
):
1861
1880
return self ._driver (
1862
1881
_session_impl .alter_table_request_factory (
@@ -1876,6 +1895,7 @@ def alter_table(
1876
1895
alter_partitioning_settings ,
1877
1896
set_key_bloom_filter ,
1878
1897
set_read_replicas_settings ,
1898
+ rename_indexes ,
1879
1899
),
1880
1900
_apis .TableService .Stub ,
1881
1901
_apis .TableService .AlterTable ,
@@ -2088,6 +2108,7 @@ def async_alter_table(
2088
2108
alter_partitioning_settings = None ,
2089
2109
set_key_bloom_filter = None ,
2090
2110
set_read_replicas_settings = None ,
2111
+ rename_indexes = None ,
2091
2112
):
2092
2113
return self ._driver .future (
2093
2114
_session_impl .alter_table_request_factory (
@@ -2107,6 +2128,7 @@ def async_alter_table(
2107
2128
alter_partitioning_settings ,
2108
2129
set_key_bloom_filter ,
2109
2130
set_read_replicas_settings ,
2131
+ rename_indexes ,
2110
2132
),
2111
2133
_apis .TableService .Stub ,
2112
2134
_apis .TableService .AlterTable ,
0 commit comments