From 70a0bd108120aa6146360b0e104d0ffc67eb004c Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Fri, 3 May 2024 07:57:13 +0000 Subject: [PATCH] feat: update generated APIs --- scaleway-async/scaleway_async/lb/v1/api.py | 24 +++++++++++++ .../scaleway_async/lb/v1/marshalling.py | 16 +++++++++ scaleway-async/scaleway_async/lb/v1/types.py | 35 +++++++++++++++++++ scaleway/scaleway/lb/v1/api.py | 24 +++++++++++++ scaleway/scaleway/lb/v1/marshalling.py | 16 +++++++++ scaleway/scaleway/lb/v1/types.py | 35 +++++++++++++++++++ 6 files changed, 150 insertions(+) diff --git a/scaleway-async/scaleway_async/lb/v1/api.py b/scaleway-async/scaleway_async/lb/v1/api.py index bea7a6c2e..55687ea97 100644 --- a/scaleway-async/scaleway_async/lb/v1/api.py +++ b/scaleway-async/scaleway_async/lb/v1/api.py @@ -585,6 +585,7 @@ async def list_i_ps( organization_id: Optional[str] = None, project_id: Optional[str] = None, ip_type: Optional[ListIpsRequestIpType] = None, + tags: Optional[List[str]] = None, ) -> ListIpsResponse: """ List IP addresses. @@ -596,6 +597,7 @@ async def list_i_ps( :param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned. :param ip_type: IP type to filter for. + :param tags: Tag to filter for, only IPs with one or more matching tags will be returned. :return: :class:`ListIpsResponse ` Usage: @@ -617,6 +619,7 @@ async def list_i_ps( "page": page, "page_size": page_size or self.client.default_page_size, "project_id": project_id or self.client.default_project_id, + "tags": tags, }, ) @@ -633,6 +636,7 @@ async def list_i_ps_all( organization_id: Optional[str] = None, project_id: Optional[str] = None, ip_type: Optional[ListIpsRequestIpType] = None, + tags: Optional[List[str]] = None, ) -> List[Ip]: """ List IP addresses. @@ -644,6 +648,7 @@ async def list_i_ps_all( :param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned. :param ip_type: IP type to filter for. + :param tags: Tag to filter for, only IPs with one or more matching tags will be returned. :return: :class:`List[Ip] ` Usage: @@ -664,6 +669,7 @@ async def list_i_ps_all( "organization_id": organization_id, "project_id": project_id, "ip_type": ip_type, + "tags": tags, }, ) @@ -675,6 +681,7 @@ async def create_ip( organization_id: Optional[str] = None, project_id: Optional[str] = None, reverse: Optional[str] = None, + tags: Optional[List[str]] = None, ) -> Ip: """ Create an IP address. @@ -686,6 +693,7 @@ async def create_ip( :param project_id: Project ID of the Project where the IP address should be created. One-Of ('project_identifier'): at most one of 'project_id', 'organization_id' could be set. :param reverse: Reverse DNS (domain name) for the IP address. + :param tags: List of tags for the IP. :return: :class:`Ip ` Usage: @@ -706,6 +714,7 @@ async def create_ip( is_ipv6=is_ipv6, zone=zone, reverse=reverse, + tags=tags, project_id=project_id, organization_id=organization_id, ), @@ -785,6 +794,7 @@ async def update_ip( zone: Optional[Zone] = None, reverse: Optional[str] = None, lb_id: Optional[str] = None, + tags: Optional[List[str]] = None, ) -> Ip: """ Update an IP address. @@ -793,6 +803,7 @@ async def update_ip( :param zone: Zone to target. If none is passed will use default zone from the config. :param reverse: Reverse DNS (domain name) for the IP address. :param lb_id: ID of the server on which to attach the flexible IP. + :param tags: List of tags for the IP. :return: :class:`Ip ` Usage: @@ -815,6 +826,7 @@ async def update_ip( zone=zone, reverse=reverse, lb_id=lb_id, + tags=tags, ), self.client, ), @@ -3592,6 +3604,7 @@ async def list_i_ps( organization_id: Optional[str] = None, project_id: Optional[str] = None, ip_type: Optional[ListIpsRequestIpType] = None, + tags: Optional[List[str]] = None, ) -> ListIpsResponse: """ List IPs. @@ -3602,6 +3615,7 @@ async def list_i_ps( :param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned. :param ip_type: IP type to filter for. + :param tags: Tag to filter for, only IPs with one or more matching tags will be returned. :return: :class:`ListIpsResponse ` Usage: @@ -3625,6 +3639,7 @@ async def list_i_ps( "page": page, "page_size": page_size or self.client.default_page_size, "project_id": project_id or self.client.default_project_id, + "tags": tags, }, ) @@ -3641,6 +3656,7 @@ async def list_i_ps_all( organization_id: Optional[str] = None, project_id: Optional[str] = None, ip_type: Optional[ListIpsRequestIpType] = None, + tags: Optional[List[str]] = None, ) -> List[Ip]: """ List IPs. @@ -3651,6 +3667,7 @@ async def list_i_ps_all( :param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned. :param ip_type: IP type to filter for. + :param tags: Tag to filter for, only IPs with one or more matching tags will be returned. :return: :class:`List[Ip] ` Usage: @@ -3671,6 +3688,7 @@ async def list_i_ps_all( "organization_id": organization_id, "project_id": project_id, "ip_type": ip_type, + "tags": tags, }, ) @@ -3682,6 +3700,7 @@ async def create_ip( organization_id: Optional[str] = None, project_id: Optional[str] = None, reverse: Optional[str] = None, + tags: Optional[List[str]] = None, ) -> Ip: """ Create an IP. @@ -3692,6 +3711,7 @@ async def create_ip( :param project_id: Project ID of the Project where the IP address should be created. One-Of ('project_identifier'): at most one of 'project_id', 'organization_id' could be set. :param reverse: Reverse DNS (domain name) for the IP address. + :param tags: List of tags for the IP. :return: :class:`Ip ` Usage: @@ -3714,6 +3734,7 @@ async def create_ip( is_ipv6=is_ipv6, region=region, reverse=reverse, + tags=tags, project_id=project_id, organization_id=organization_id, ), @@ -3795,6 +3816,7 @@ async def update_ip( region: Optional[Region] = None, reverse: Optional[str] = None, lb_id: Optional[str] = None, + tags: Optional[List[str]] = None, ) -> Ip: """ Update an IP. @@ -3802,6 +3824,7 @@ async def update_ip( :param region: Region to target. If none is passed will use default region from the config. :param reverse: Reverse DNS (domain name) for the IP address. :param lb_id: ID of the server on which to attach the flexible IP. + :param tags: List of tags for the IP. :return: :class:`Ip ` Usage: @@ -3826,6 +3849,7 @@ async def update_ip( region=region, reverse=reverse, lb_id=lb_id, + tags=tags, ), self.client, ), diff --git a/scaleway-async/scaleway_async/lb/v1/marshalling.py b/scaleway-async/scaleway_async/lb/v1/marshalling.py index f339251e9..1e80ee760 100644 --- a/scaleway-async/scaleway_async/lb/v1/marshalling.py +++ b/scaleway-async/scaleway_async/lb/v1/marshalling.py @@ -133,6 +133,10 @@ def unmarshal_Ip(data: Any) -> Ip: if field is not None: args["reverse"] = field + field = data.get("tags", None) + if field is not None: + args["tags"] = field + field = data.get("zone", None) if field is not None: args["zone"] = field @@ -1950,6 +1954,9 @@ def marshal_CreateIpRequest( if request.reverse is not None: output["reverse"] = request.reverse + if request.tags is not None: + output["tags"] = request.tags + return output @@ -2328,6 +2335,9 @@ def marshal_UpdateIpRequest( if request.lb_id is not None: output["lb_id"] = request.lb_id + if request.tags is not None: + output["tags"] = request.tags + return output @@ -2589,6 +2599,9 @@ def marshal_ZonedApiCreateIpRequest( if request.reverse is not None: output["reverse"] = request.reverse + if request.tags is not None: + output["tags"] = request.tags + return output @@ -2962,6 +2975,9 @@ def marshal_ZonedApiUpdateIpRequest( if request.lb_id is not None: output["lb_id"] = request.lb_id + if request.tags is not None: + output["tags"] = request.tags + return output diff --git a/scaleway-async/scaleway_async/lb/v1/types.py b/scaleway-async/scaleway_async/lb/v1/types.py index 59c722e28..d12c3de3f 100644 --- a/scaleway-async/scaleway_async/lb/v1/types.py +++ b/scaleway-async/scaleway_async/lb/v1/types.py @@ -440,6 +440,11 @@ class Ip: Reverse DNS (domain name) of the IP address. """ + tags: List[str] + """ + IP tags. + """ + zone: Zone """ The zone the IP address is in. @@ -1484,6 +1489,11 @@ class CreateIpRequest: Reverse DNS (domain name) for the IP address. """ + tags: Optional[List[str]] + """ + List of tags for the IP. + """ + project_id: Optional[str] organization_id: Optional[str] @@ -2104,6 +2114,11 @@ class ListIPsRequest: IP type to filter for. """ + tags: Optional[List[str]] + """ + Tag to filter for, only IPs with one or more matching tags will be returned. + """ + @dataclass class ListIpsResponse: @@ -2740,6 +2755,11 @@ class UpdateIpRequest: ID of the server on which to attach the flexible IP. """ + tags: Optional[List[str]] + """ + List of tags for the IP. + """ + @dataclass class UpdateLbRequest: @@ -3108,6 +3128,11 @@ class ZonedApiCreateIpRequest: Reverse DNS (domain name) for the IP address. """ + tags: Optional[List[str]] + """ + List of tags for the IP. + """ + project_id: Optional[str] organization_id: Optional[str] @@ -3655,6 +3680,11 @@ class ZonedApiListIPsRequest: IP type to filter for. """ + tags: Optional[List[str]] + """ + Tag to filter for, only IPs with one or more matching tags will be returned. + """ + @dataclass class ZonedApiListLbPrivateNetworksRequest: @@ -4218,6 +4248,11 @@ class ZonedApiUpdateIpRequest: ID of the server on which to attach the flexible IP. """ + tags: Optional[List[str]] + """ + List of tags for the IP. + """ + @dataclass class ZonedApiUpdateLbRequest: diff --git a/scaleway/scaleway/lb/v1/api.py b/scaleway/scaleway/lb/v1/api.py index e1b1902aa..2c3c0d596 100644 --- a/scaleway/scaleway/lb/v1/api.py +++ b/scaleway/scaleway/lb/v1/api.py @@ -585,6 +585,7 @@ def list_i_ps( organization_id: Optional[str] = None, project_id: Optional[str] = None, ip_type: Optional[ListIpsRequestIpType] = None, + tags: Optional[List[str]] = None, ) -> ListIpsResponse: """ List IP addresses. @@ -596,6 +597,7 @@ def list_i_ps( :param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned. :param ip_type: IP type to filter for. + :param tags: Tag to filter for, only IPs with one or more matching tags will be returned. :return: :class:`ListIpsResponse ` Usage: @@ -617,6 +619,7 @@ def list_i_ps( "page": page, "page_size": page_size or self.client.default_page_size, "project_id": project_id or self.client.default_project_id, + "tags": tags, }, ) @@ -633,6 +636,7 @@ def list_i_ps_all( organization_id: Optional[str] = None, project_id: Optional[str] = None, ip_type: Optional[ListIpsRequestIpType] = None, + tags: Optional[List[str]] = None, ) -> List[Ip]: """ List IP addresses. @@ -644,6 +648,7 @@ def list_i_ps_all( :param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned. :param ip_type: IP type to filter for. + :param tags: Tag to filter for, only IPs with one or more matching tags will be returned. :return: :class:`List[Ip] ` Usage: @@ -664,6 +669,7 @@ def list_i_ps_all( "organization_id": organization_id, "project_id": project_id, "ip_type": ip_type, + "tags": tags, }, ) @@ -675,6 +681,7 @@ def create_ip( organization_id: Optional[str] = None, project_id: Optional[str] = None, reverse: Optional[str] = None, + tags: Optional[List[str]] = None, ) -> Ip: """ Create an IP address. @@ -686,6 +693,7 @@ def create_ip( :param project_id: Project ID of the Project where the IP address should be created. One-Of ('project_identifier'): at most one of 'project_id', 'organization_id' could be set. :param reverse: Reverse DNS (domain name) for the IP address. + :param tags: List of tags for the IP. :return: :class:`Ip ` Usage: @@ -706,6 +714,7 @@ def create_ip( is_ipv6=is_ipv6, zone=zone, reverse=reverse, + tags=tags, project_id=project_id, organization_id=organization_id, ), @@ -785,6 +794,7 @@ def update_ip( zone: Optional[Zone] = None, reverse: Optional[str] = None, lb_id: Optional[str] = None, + tags: Optional[List[str]] = None, ) -> Ip: """ Update an IP address. @@ -793,6 +803,7 @@ def update_ip( :param zone: Zone to target. If none is passed will use default zone from the config. :param reverse: Reverse DNS (domain name) for the IP address. :param lb_id: ID of the server on which to attach the flexible IP. + :param tags: List of tags for the IP. :return: :class:`Ip ` Usage: @@ -815,6 +826,7 @@ def update_ip( zone=zone, reverse=reverse, lb_id=lb_id, + tags=tags, ), self.client, ), @@ -3590,6 +3602,7 @@ def list_i_ps( organization_id: Optional[str] = None, project_id: Optional[str] = None, ip_type: Optional[ListIpsRequestIpType] = None, + tags: Optional[List[str]] = None, ) -> ListIpsResponse: """ List IPs. @@ -3600,6 +3613,7 @@ def list_i_ps( :param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned. :param ip_type: IP type to filter for. + :param tags: Tag to filter for, only IPs with one or more matching tags will be returned. :return: :class:`ListIpsResponse ` Usage: @@ -3623,6 +3637,7 @@ def list_i_ps( "page": page, "page_size": page_size or self.client.default_page_size, "project_id": project_id or self.client.default_project_id, + "tags": tags, }, ) @@ -3639,6 +3654,7 @@ def list_i_ps_all( organization_id: Optional[str] = None, project_id: Optional[str] = None, ip_type: Optional[ListIpsRequestIpType] = None, + tags: Optional[List[str]] = None, ) -> List[Ip]: """ List IPs. @@ -3649,6 +3665,7 @@ def list_i_ps_all( :param organization_id: Organization ID to filter for, only Load Balancer IP addresses from this Organization will be returned. :param project_id: Project ID to filter for, only Load Balancer IP addresses from this Project will be returned. :param ip_type: IP type to filter for. + :param tags: Tag to filter for, only IPs with one or more matching tags will be returned. :return: :class:`List[Ip] ` Usage: @@ -3669,6 +3686,7 @@ def list_i_ps_all( "organization_id": organization_id, "project_id": project_id, "ip_type": ip_type, + "tags": tags, }, ) @@ -3680,6 +3698,7 @@ def create_ip( organization_id: Optional[str] = None, project_id: Optional[str] = None, reverse: Optional[str] = None, + tags: Optional[List[str]] = None, ) -> Ip: """ Create an IP. @@ -3690,6 +3709,7 @@ def create_ip( :param project_id: Project ID of the Project where the IP address should be created. One-Of ('project_identifier'): at most one of 'project_id', 'organization_id' could be set. :param reverse: Reverse DNS (domain name) for the IP address. + :param tags: List of tags for the IP. :return: :class:`Ip ` Usage: @@ -3712,6 +3732,7 @@ def create_ip( is_ipv6=is_ipv6, region=region, reverse=reverse, + tags=tags, project_id=project_id, organization_id=organization_id, ), @@ -3793,6 +3814,7 @@ def update_ip( region: Optional[Region] = None, reverse: Optional[str] = None, lb_id: Optional[str] = None, + tags: Optional[List[str]] = None, ) -> Ip: """ Update an IP. @@ -3800,6 +3822,7 @@ def update_ip( :param region: Region to target. If none is passed will use default region from the config. :param reverse: Reverse DNS (domain name) for the IP address. :param lb_id: ID of the server on which to attach the flexible IP. + :param tags: List of tags for the IP. :return: :class:`Ip ` Usage: @@ -3824,6 +3847,7 @@ def update_ip( region=region, reverse=reverse, lb_id=lb_id, + tags=tags, ), self.client, ), diff --git a/scaleway/scaleway/lb/v1/marshalling.py b/scaleway/scaleway/lb/v1/marshalling.py index f339251e9..1e80ee760 100644 --- a/scaleway/scaleway/lb/v1/marshalling.py +++ b/scaleway/scaleway/lb/v1/marshalling.py @@ -133,6 +133,10 @@ def unmarshal_Ip(data: Any) -> Ip: if field is not None: args["reverse"] = field + field = data.get("tags", None) + if field is not None: + args["tags"] = field + field = data.get("zone", None) if field is not None: args["zone"] = field @@ -1950,6 +1954,9 @@ def marshal_CreateIpRequest( if request.reverse is not None: output["reverse"] = request.reverse + if request.tags is not None: + output["tags"] = request.tags + return output @@ -2328,6 +2335,9 @@ def marshal_UpdateIpRequest( if request.lb_id is not None: output["lb_id"] = request.lb_id + if request.tags is not None: + output["tags"] = request.tags + return output @@ -2589,6 +2599,9 @@ def marshal_ZonedApiCreateIpRequest( if request.reverse is not None: output["reverse"] = request.reverse + if request.tags is not None: + output["tags"] = request.tags + return output @@ -2962,6 +2975,9 @@ def marshal_ZonedApiUpdateIpRequest( if request.lb_id is not None: output["lb_id"] = request.lb_id + if request.tags is not None: + output["tags"] = request.tags + return output diff --git a/scaleway/scaleway/lb/v1/types.py b/scaleway/scaleway/lb/v1/types.py index 59c722e28..d12c3de3f 100644 --- a/scaleway/scaleway/lb/v1/types.py +++ b/scaleway/scaleway/lb/v1/types.py @@ -440,6 +440,11 @@ class Ip: Reverse DNS (domain name) of the IP address. """ + tags: List[str] + """ + IP tags. + """ + zone: Zone """ The zone the IP address is in. @@ -1484,6 +1489,11 @@ class CreateIpRequest: Reverse DNS (domain name) for the IP address. """ + tags: Optional[List[str]] + """ + List of tags for the IP. + """ + project_id: Optional[str] organization_id: Optional[str] @@ -2104,6 +2114,11 @@ class ListIPsRequest: IP type to filter for. """ + tags: Optional[List[str]] + """ + Tag to filter for, only IPs with one or more matching tags will be returned. + """ + @dataclass class ListIpsResponse: @@ -2740,6 +2755,11 @@ class UpdateIpRequest: ID of the server on which to attach the flexible IP. """ + tags: Optional[List[str]] + """ + List of tags for the IP. + """ + @dataclass class UpdateLbRequest: @@ -3108,6 +3128,11 @@ class ZonedApiCreateIpRequest: Reverse DNS (domain name) for the IP address. """ + tags: Optional[List[str]] + """ + List of tags for the IP. + """ + project_id: Optional[str] organization_id: Optional[str] @@ -3655,6 +3680,11 @@ class ZonedApiListIPsRequest: IP type to filter for. """ + tags: Optional[List[str]] + """ + Tag to filter for, only IPs with one or more matching tags will be returned. + """ + @dataclass class ZonedApiListLbPrivateNetworksRequest: @@ -4218,6 +4248,11 @@ class ZonedApiUpdateIpRequest: ID of the server on which to attach the flexible IP. """ + tags: Optional[List[str]] + """ + List of tags for the IP. + """ + @dataclass class ZonedApiUpdateLbRequest: