@@ -1104,6 +1104,7 @@ def __init__(
11041104 allocated_cidr : "builtins.str|None|unset.UnsetType" = unset .Unset ,
11051105 pool_id : "builtins.str|None|unset.UnsetType" = unset .Unset ,
11061106 version : "IpVersion|pool_pb2.IpVersion|None|unset.UnsetType" = unset .Unset ,
1107+ subnet_id : "builtins.str|None|unset.UnsetType" = unset .Unset ,
11071108 ) -> None :
11081109 super ().__init__ (initial_message )
11091110 if not isinstance (allocated_cidr , unset .UnsetType ):
@@ -1112,12 +1113,15 @@ def __init__(
11121113 self .pool_id = pool_id
11131114 if not isinstance (version , unset .UnsetType ):
11141115 self .version = version
1116+ if not isinstance (subnet_id , unset .UnsetType ):
1117+ self .subnet_id = subnet_id
11151118
11161119 def __dir__ (self ) -> abc .Iterable [builtins .str ]:
11171120 return [
11181121 "allocated_cidr" ,
11191122 "pool_id" ,
11201123 "version" ,
1124+ "subnet_id" ,
11211125 ]
11221126
11231127 @builtins .property
@@ -1160,10 +1164,26 @@ def version(self, value: "IpVersion|pool_pb2.IpVersion|None") -> None:
11601164 return super ()._set_field ("version" ,value ,explicit_presence = False ,
11611165 )
11621166
1167+ @builtins .property
1168+ def subnet_id (self ) -> "builtins.str" :
1169+ """
1170+ ID of the subnet associated with this allocation.
1171+ Populated when created with explicit subnet_id, from a subnet-specific pool,
1172+ or when assigned to a resource.
1173+ """
1174+
1175+ return super ()._get_field ("subnet_id" , explicit_presence = False ,
1176+ )
1177+ @subnet_id .setter
1178+ def subnet_id (self , value : "builtins.str|None" ) -> None :
1179+ return super ()._set_field ("subnet_id" ,value ,explicit_presence = False ,
1180+ )
1181+
11631182 __PY_TO_PB2__ : builtins .dict [builtins .str ,builtins .str ] = {
11641183 "allocated_cidr" :"allocated_cidr" ,
11651184 "pool_id" :"pool_id" ,
11661185 "version" :"version" ,
1186+ "subnet_id" :"subnet_id" ,
11671187 }
11681188
11691189class Assignment (pb_classes .Message ):
@@ -1570,6 +1590,68 @@ def page_token(self, value: "builtins.str|None") -> None:
15701590 "page_token" :"page_token" ,
15711591 }
15721592
1593+ class ListAllocationsBySubnetRequest (pb_classes .Message ):
1594+ __PB2_CLASS__ = allocation_service_pb2 .ListAllocationsBySubnetRequest
1595+ __PB2_DESCRIPTOR__ = descriptor .DescriptorWrap [descriptor_1 .Descriptor ](".nebius.vpc.v1.ListAllocationsBySubnetRequest" ,allocation_service_pb2 .DESCRIPTOR ,descriptor_1 .Descriptor )
1596+ __mask_functions__ = {
1597+ }
1598+
1599+ def __init__ (
1600+ self ,
1601+ initial_message : message_1 .Message | None = None ,
1602+ * ,
1603+ subnet_id : "builtins.str|None|unset.UnsetType" = unset .Unset ,
1604+ page_size : "builtins.int|None|unset.UnsetType" = unset .Unset ,
1605+ page_token : "builtins.str|None|unset.UnsetType" = unset .Unset ,
1606+ ) -> None :
1607+ super ().__init__ (initial_message )
1608+ if not isinstance (subnet_id , unset .UnsetType ):
1609+ self .subnet_id = subnet_id
1610+ if not isinstance (page_size , unset .UnsetType ):
1611+ self .page_size = page_size
1612+ if not isinstance (page_token , unset .UnsetType ):
1613+ self .page_token = page_token
1614+
1615+ def __dir__ (self ) -> abc .Iterable [builtins .str ]:
1616+ return [
1617+ "subnet_id" ,
1618+ "page_size" ,
1619+ "page_token" ,
1620+ ]
1621+
1622+ @builtins .property
1623+ def subnet_id (self ) -> "builtins.str" :
1624+ return super ()._get_field ("subnet_id" , explicit_presence = False ,
1625+ )
1626+ @subnet_id .setter
1627+ def subnet_id (self , value : "builtins.str|None" ) -> None :
1628+ return super ()._set_field ("subnet_id" ,value ,explicit_presence = False ,
1629+ )
1630+
1631+ @builtins .property
1632+ def page_size (self ) -> "builtins.int" :
1633+ return super ()._get_field ("page_size" , explicit_presence = False ,
1634+ )
1635+ @page_size .setter
1636+ def page_size (self , value : "builtins.int|None" ) -> None :
1637+ return super ()._set_field ("page_size" ,value ,explicit_presence = False ,
1638+ )
1639+
1640+ @builtins .property
1641+ def page_token (self ) -> "builtins.str" :
1642+ return super ()._get_field ("page_token" , explicit_presence = False ,
1643+ )
1644+ @page_token .setter
1645+ def page_token (self , value : "builtins.str|None" ) -> None :
1646+ return super ()._set_field ("page_token" ,value ,explicit_presence = False ,
1647+ )
1648+
1649+ __PY_TO_PB2__ : builtins .dict [builtins .str ,builtins .str ] = {
1650+ "subnet_id" :"subnet_id" ,
1651+ "page_size" :"page_size" ,
1652+ "page_token" :"page_token" ,
1653+ }
1654+
15731655class ListAllocationsResponse (pb_classes .Message ):
15741656 __PB2_CLASS__ = allocation_service_pb2 .ListAllocationsResponse
15751657 __PB2_DESCRIPTOR__ = descriptor .DescriptorWrap [descriptor_1 .Descriptor ](".nebius.vpc.v1.ListAllocationsResponse" ,allocation_service_pb2 .DESCRIPTOR ,descriptor_1 .Descriptor )
@@ -1885,6 +1967,33 @@ def list_by_pool(self,
18851967 ** kwargs ,
18861968 )
18871969
1970+ def list_by_subnet (self ,
1971+ request : "ListAllocationsBySubnetRequest" ,
1972+ ** kwargs : typing_extensions .Unpack [request_kwargs .RequestKwargs ]
1973+ ) -> request_1 .Request ["ListAllocationsBySubnetRequest" ,"ListAllocationsResponse" ]:
1974+ """
1975+ :param request: The request object to send.
1976+ :type request: :class:`nebius.api.nebius.vpc.v1.ListAllocationsBySubnetRequest`
1977+
1978+ Other parameters can be provided as keyword arguments in the
1979+ ``**kwargs`` dictionary, including metadata, timeouts, and retries.
1980+ See :class:`nebius.aio.request_kwargs.RequestKwargs` for details.
1981+
1982+ :return: A :class:`nebius.aio.request.Request` object representing the
1983+ in-flight RPC. It can be awaited (async) or waited
1984+ synchronously using its ``.wait()`` helpers.
1985+ :rtype: :class:`nebius.aio.request.Request` of
1986+ :class:`nebius.api.nebius.vpc.v1.ListAllocationsResponse`.
1987+ """
1988+
1989+ return super ().request (
1990+ method = "ListBySubnet" ,
1991+ request = request ,
1992+ result_pb2_class = allocation_service_pb2 .ListAllocationsResponse ,
1993+ result_wrapper = pb_classes .simple_wrapper (ListAllocationsResponse ),
1994+ ** kwargs ,
1995+ )
1996+
18881997 def create (self ,
18891998 request : "CreateAllocationRequest" ,
18901999 ** kwargs : typing_extensions .Unpack [request_kwargs .RequestKwargs ]
@@ -7265,6 +7374,7 @@ def update(self,
72657374 "GetAllocationByNameRequest" ,
72667375 "ListAllocationsRequest" ,
72677376 "ListAllocationsByPoolRequest" ,
7377+ "ListAllocationsBySubnetRequest" ,
72687378 "ListAllocationsResponse" ,
72697379 "CreateAllocationRequest" ,
72707380 "UpdateAllocationRequest" ,
0 commit comments