diff --git a/scaleway-async/scaleway_async/ipam/v1/api.py b/scaleway-async/scaleway_async/ipam/v1/api.py index 3b7962f7c..19411d586 100644 --- a/scaleway-async/scaleway_async/ipam/v1/api.py +++ b/scaleway-async/scaleway_async/ipam/v1/api.py @@ -272,6 +272,7 @@ async def list_i_ps( organization_id: Optional[str] = None, is_ipv6: Optional[bool] = None, ip_ids: Optional[List[str]] = None, + source_vpc_id: Optional[str] = None, ) -> ListIPsResponse: """ List existing IPs. @@ -282,11 +283,11 @@ async def list_i_ps( :param page_size: Maximum number of IPs to return per page. :param project_id: Project ID to filter for. Only IPs belonging to this Project will be returned. :param zonal: Zone to filter for. Only IPs that are zonal, and in this zone, will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param private_network_id: Only IPs that are private, and in this Private Network, will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param subnet_id: Only IPs inside this exact subnet will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param vpc_id: Only IPs owned by resources in this VPC will be returned. :param attached: Defines whether to filter only for IPs which are attached to a resource. :param resource_name: Attached resource name to filter for, only IPs attached to a resource with this string within their name will be returned. @@ -299,6 +300,8 @@ async def list_i_ps( :param organization_id: Organization ID to filter for. Only IPs belonging to this Organization will be returned. :param is_ipv6: Defines whether to filter only for IPv4s or IPv6s. :param ip_ids: IP IDs to filter for. Only IPs with these UUIDs will be returned. + :param source_vpc_id: + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :return: :class:`ListIPsResponse ` Usage: @@ -335,6 +338,7 @@ async def list_i_ps( **resolve_one_of( [ OneOfPossibility("private_network_id", private_network_id), + OneOfPossibility("source_vpc_id", source_vpc_id), OneOfPossibility("subnet_id", subnet_id), OneOfPossibility("zonal", zonal), ] @@ -368,6 +372,7 @@ async def list_i_ps_all( organization_id: Optional[str] = None, is_ipv6: Optional[bool] = None, ip_ids: Optional[List[str]] = None, + source_vpc_id: Optional[str] = None, ) -> List[IP]: """ List existing IPs. @@ -378,11 +383,11 @@ async def list_i_ps_all( :param page_size: Maximum number of IPs to return per page. :param project_id: Project ID to filter for. Only IPs belonging to this Project will be returned. :param zonal: Zone to filter for. Only IPs that are zonal, and in this zone, will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param private_network_id: Only IPs that are private, and in this Private Network, will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param subnet_id: Only IPs inside this exact subnet will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param vpc_id: Only IPs owned by resources in this VPC will be returned. :param attached: Defines whether to filter only for IPs which are attached to a resource. :param resource_name: Attached resource name to filter for, only IPs attached to a resource with this string within their name will be returned. @@ -395,6 +400,8 @@ async def list_i_ps_all( :param organization_id: Organization ID to filter for. Only IPs belonging to this Organization will be returned. :param is_ipv6: Defines whether to filter only for IPv4s or IPv6s. :param ip_ids: IP IDs to filter for. Only IPs with these UUIDs will be returned. + :param source_vpc_id: + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :return: :class:`List[IP] ` Usage: @@ -428,6 +435,7 @@ async def list_i_ps_all( "zonal": zonal, "private_network_id": private_network_id, "subnet_id": subnet_id, + "source_vpc_id": source_vpc_id, }, ) diff --git a/scaleway-async/scaleway_async/ipam/v1/marshalling.py b/scaleway-async/scaleway_async/ipam/v1/marshalling.py index dc61dff97..11f91ffb7 100644 --- a/scaleway-async/scaleway_async/ipam/v1/marshalling.py +++ b/scaleway-async/scaleway_async/ipam/v1/marshalling.py @@ -103,6 +103,12 @@ def unmarshal_Source(data: Any) -> Source: else: args["subnet_id"] = None + field = data.get("vpc_id", None) + if field is not None: + args["vpc_id"] = field + else: + args["vpc_id"] = None + return Source(**args) @@ -234,6 +240,7 @@ def marshal_Source( OneOfPossibility("zonal", request.zonal), OneOfPossibility("private_network_id", request.private_network_id), OneOfPossibility("subnet_id", request.subnet_id), + OneOfPossibility("vpc_id", request.vpc_id), ] ), ) diff --git a/scaleway-async/scaleway_async/ipam/v1/types.py b/scaleway-async/scaleway_async/ipam/v1/types.py index 1c7ed6fba..90fb17de7 100644 --- a/scaleway-async/scaleway_async/ipam/v1/types.py +++ b/scaleway-async/scaleway_async/ipam/v1/types.py @@ -101,6 +101,8 @@ class Source: subnet_id: Optional[str] + vpc_id: Optional[str] + @dataclass class CustomResource: @@ -358,6 +360,8 @@ class ListIPsRequest: subnet_id: Optional[str] + source_vpc_id: Optional[str] + @dataclass class ListIPsResponse: diff --git a/scaleway/scaleway/ipam/v1/api.py b/scaleway/scaleway/ipam/v1/api.py index e629b62e1..ad43dcd85 100644 --- a/scaleway/scaleway/ipam/v1/api.py +++ b/scaleway/scaleway/ipam/v1/api.py @@ -272,6 +272,7 @@ def list_i_ps( organization_id: Optional[str] = None, is_ipv6: Optional[bool] = None, ip_ids: Optional[List[str]] = None, + source_vpc_id: Optional[str] = None, ) -> ListIPsResponse: """ List existing IPs. @@ -282,11 +283,11 @@ def list_i_ps( :param page_size: Maximum number of IPs to return per page. :param project_id: Project ID to filter for. Only IPs belonging to this Project will be returned. :param zonal: Zone to filter for. Only IPs that are zonal, and in this zone, will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param private_network_id: Only IPs that are private, and in this Private Network, will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param subnet_id: Only IPs inside this exact subnet will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param vpc_id: Only IPs owned by resources in this VPC will be returned. :param attached: Defines whether to filter only for IPs which are attached to a resource. :param resource_name: Attached resource name to filter for, only IPs attached to a resource with this string within their name will be returned. @@ -299,6 +300,8 @@ def list_i_ps( :param organization_id: Organization ID to filter for. Only IPs belonging to this Organization will be returned. :param is_ipv6: Defines whether to filter only for IPv4s or IPv6s. :param ip_ids: IP IDs to filter for. Only IPs with these UUIDs will be returned. + :param source_vpc_id: + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :return: :class:`ListIPsResponse ` Usage: @@ -335,6 +338,7 @@ def list_i_ps( **resolve_one_of( [ OneOfPossibility("private_network_id", private_network_id), + OneOfPossibility("source_vpc_id", source_vpc_id), OneOfPossibility("subnet_id", subnet_id), OneOfPossibility("zonal", zonal), ] @@ -368,6 +372,7 @@ def list_i_ps_all( organization_id: Optional[str] = None, is_ipv6: Optional[bool] = None, ip_ids: Optional[List[str]] = None, + source_vpc_id: Optional[str] = None, ) -> List[IP]: """ List existing IPs. @@ -378,11 +383,11 @@ def list_i_ps_all( :param page_size: Maximum number of IPs to return per page. :param project_id: Project ID to filter for. Only IPs belonging to this Project will be returned. :param zonal: Zone to filter for. Only IPs that are zonal, and in this zone, will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param private_network_id: Only IPs that are private, and in this Private Network, will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param subnet_id: Only IPs inside this exact subnet will be returned. - One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id' could be set. + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :param vpc_id: Only IPs owned by resources in this VPC will be returned. :param attached: Defines whether to filter only for IPs which are attached to a resource. :param resource_name: Attached resource name to filter for, only IPs attached to a resource with this string within their name will be returned. @@ -395,6 +400,8 @@ def list_i_ps_all( :param organization_id: Organization ID to filter for. Only IPs belonging to this Organization will be returned. :param is_ipv6: Defines whether to filter only for IPv4s or IPv6s. :param ip_ids: IP IDs to filter for. Only IPs with these UUIDs will be returned. + :param source_vpc_id: + One-Of ('source'): at most one of 'zonal', 'private_network_id', 'subnet_id', 'source_vpc_id' could be set. :return: :class:`List[IP] ` Usage: @@ -428,6 +435,7 @@ def list_i_ps_all( "zonal": zonal, "private_network_id": private_network_id, "subnet_id": subnet_id, + "source_vpc_id": source_vpc_id, }, ) diff --git a/scaleway/scaleway/ipam/v1/marshalling.py b/scaleway/scaleway/ipam/v1/marshalling.py index dc61dff97..11f91ffb7 100644 --- a/scaleway/scaleway/ipam/v1/marshalling.py +++ b/scaleway/scaleway/ipam/v1/marshalling.py @@ -103,6 +103,12 @@ def unmarshal_Source(data: Any) -> Source: else: args["subnet_id"] = None + field = data.get("vpc_id", None) + if field is not None: + args["vpc_id"] = field + else: + args["vpc_id"] = None + return Source(**args) @@ -234,6 +240,7 @@ def marshal_Source( OneOfPossibility("zonal", request.zonal), OneOfPossibility("private_network_id", request.private_network_id), OneOfPossibility("subnet_id", request.subnet_id), + OneOfPossibility("vpc_id", request.vpc_id), ] ), ) diff --git a/scaleway/scaleway/ipam/v1/types.py b/scaleway/scaleway/ipam/v1/types.py index 1c7ed6fba..90fb17de7 100644 --- a/scaleway/scaleway/ipam/v1/types.py +++ b/scaleway/scaleway/ipam/v1/types.py @@ -101,6 +101,8 @@ class Source: subnet_id: Optional[str] + vpc_id: Optional[str] + @dataclass class CustomResource: @@ -358,6 +360,8 @@ class ListIPsRequest: subnet_id: Optional[str] + source_vpc_id: Optional[str] + @dataclass class ListIPsResponse: