diff --git a/scaleway-async/scaleway_async/interlink/v1beta1/api.py b/scaleway-async/scaleway_async/interlink/v1beta1/api.py index a22550cf9..2602e2983 100644 --- a/scaleway-async/scaleway_async/interlink/v1beta1/api.py +++ b/scaleway-async/scaleway_async/interlink/v1beta1/api.py @@ -764,6 +764,7 @@ async def create_link( tags: Optional[List[str]] = None, connection_id: Optional[str] = None, partner_id: Optional[str] = None, + peer_asn: Optional[int] = None, ) -> Link: """ Create a link. @@ -778,6 +779,7 @@ async def create_link( One-Of ('host'): at most one of 'connection_id', 'partner_id' could be set. :param partner_id: If set, creates a hosted link on a partner's connection. Specify the ID of the chosen partner, who already has a shared connection with available bandwidth. One-Of ('host'): at most one of 'connection_id', 'partner_id' could be set. + :param peer_asn: For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned. :return: :class:`Link ` Usage: @@ -805,6 +807,7 @@ async def create_link( region=region, project_id=project_id, tags=tags, + peer_asn=peer_asn, connection_id=connection_id, partner_id=partner_id, ), @@ -822,6 +825,7 @@ async def update_link( region: Optional[ScwRegion] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, + peer_asn: Optional[int] = None, ) -> Link: """ Update a link. @@ -830,6 +834,7 @@ async def update_link( :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the link. :param tags: List of tags to apply to the link. + :param peer_asn: For self-hosted links, AS Number to establish BGP session. :return: :class:`Link ` Usage: @@ -854,6 +859,7 @@ async def update_link( region=region, name=name, tags=tags, + peer_asn=peer_asn, ), self.client, ), diff --git a/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py b/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py index ed47ee5dd..0768e3db6 100644 --- a/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py @@ -576,6 +576,9 @@ def marshal_CreateLinkRequest( if request.tags is not None: output["tags"] = request.tags + if request.peer_asn is not None: + output["peer_asn"] = request.peer_asn + return output @@ -615,6 +618,9 @@ def marshal_UpdateLinkRequest( if request.tags is not None: output["tags"] = request.tags + if request.peer_asn is not None: + output["peer_asn"] = request.peer_asn + return output diff --git a/scaleway-async/scaleway_async/interlink/v1beta1/types.py b/scaleway-async/scaleway_async/interlink/v1beta1/types.py index fe2f1c0f1..b41c803ae 100644 --- a/scaleway-async/scaleway_async/interlink/v1beta1/types.py +++ b/scaleway-async/scaleway_async/interlink/v1beta1/types.py @@ -533,6 +533,11 @@ class CreateLinkRequest: List of tags to apply to the link. """ + peer_asn: Optional[int] + """ + For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned. + """ + connection_id: Optional[str] partner_id: Optional[str] @@ -1070,6 +1075,11 @@ class UpdateLinkRequest: List of tags to apply to the link. """ + peer_asn: Optional[int] + """ + For self-hosted links, AS Number to establish BGP session. + """ + @dataclass class UpdateRoutingPolicyRequest: diff --git a/scaleway/scaleway/interlink/v1beta1/api.py b/scaleway/scaleway/interlink/v1beta1/api.py index f7b89eb04..2df2d000f 100644 --- a/scaleway/scaleway/interlink/v1beta1/api.py +++ b/scaleway/scaleway/interlink/v1beta1/api.py @@ -762,6 +762,7 @@ def create_link( tags: Optional[List[str]] = None, connection_id: Optional[str] = None, partner_id: Optional[str] = None, + peer_asn: Optional[int] = None, ) -> Link: """ Create a link. @@ -776,6 +777,7 @@ def create_link( One-Of ('host'): at most one of 'connection_id', 'partner_id' could be set. :param partner_id: If set, creates a hosted link on a partner's connection. Specify the ID of the chosen partner, who already has a shared connection with available bandwidth. One-Of ('host'): at most one of 'connection_id', 'partner_id' could be set. + :param peer_asn: For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned. :return: :class:`Link ` Usage: @@ -803,6 +805,7 @@ def create_link( region=region, project_id=project_id, tags=tags, + peer_asn=peer_asn, connection_id=connection_id, partner_id=partner_id, ), @@ -820,6 +823,7 @@ def update_link( region: Optional[ScwRegion] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, + peer_asn: Optional[int] = None, ) -> Link: """ Update a link. @@ -828,6 +832,7 @@ def update_link( :param region: Region to target. If none is passed will use default region from the config. :param name: Name of the link. :param tags: List of tags to apply to the link. + :param peer_asn: For self-hosted links, AS Number to establish BGP session. :return: :class:`Link ` Usage: @@ -852,6 +857,7 @@ def update_link( region=region, name=name, tags=tags, + peer_asn=peer_asn, ), self.client, ), diff --git a/scaleway/scaleway/interlink/v1beta1/marshalling.py b/scaleway/scaleway/interlink/v1beta1/marshalling.py index ed47ee5dd..0768e3db6 100644 --- a/scaleway/scaleway/interlink/v1beta1/marshalling.py +++ b/scaleway/scaleway/interlink/v1beta1/marshalling.py @@ -576,6 +576,9 @@ def marshal_CreateLinkRequest( if request.tags is not None: output["tags"] = request.tags + if request.peer_asn is not None: + output["peer_asn"] = request.peer_asn + return output @@ -615,6 +618,9 @@ def marshal_UpdateLinkRequest( if request.tags is not None: output["tags"] = request.tags + if request.peer_asn is not None: + output["peer_asn"] = request.peer_asn + return output diff --git a/scaleway/scaleway/interlink/v1beta1/types.py b/scaleway/scaleway/interlink/v1beta1/types.py index fe2f1c0f1..b41c803ae 100644 --- a/scaleway/scaleway/interlink/v1beta1/types.py +++ b/scaleway/scaleway/interlink/v1beta1/types.py @@ -533,6 +533,11 @@ class CreateLinkRequest: List of tags to apply to the link. """ + peer_asn: Optional[int] + """ + For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned. + """ + connection_id: Optional[str] partner_id: Optional[str] @@ -1070,6 +1075,11 @@ class UpdateLinkRequest: List of tags to apply to the link. """ + peer_asn: Optional[int] + """ + For self-hosted links, AS Number to establish BGP session. + """ + @dataclass class UpdateRoutingPolicyRequest: