diff --git a/scaleway-async/scaleway_async/interlink/v1beta1/api.py b/scaleway-async/scaleway_async/interlink/v1beta1/api.py index fd41addc8..3ae1403eb 100644 --- a/scaleway-async/scaleway_async/interlink/v1beta1/api.py +++ b/scaleway-async/scaleway_async/interlink/v1beta1/api.py @@ -767,6 +767,7 @@ async def create_link( connection_id: Optional[str] = None, partner_id: Optional[str] = None, peer_asn: Optional[int] = None, + vlan: Optional[int] = None, ) -> Link: """ Create a link. @@ -782,6 +783,7 @@ async def create_link( :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. + :param vlan: For self-hosted links only, it is possible to choose the VLAN ID. If the VLAN is not available (ie already taken or out of range), an error is returned. :return: :class:`Link ` Usage: @@ -810,6 +812,7 @@ async def create_link( project_id=project_id, tags=tags, peer_asn=peer_asn, + vlan=vlan, connection_id=connection_id, partner_id=partner_id, ), diff --git a/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py b/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py index 0c567d65c..7e01aa313 100644 --- a/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/interlink/v1beta1/marshalling.py @@ -596,6 +596,9 @@ def marshal_CreateLinkRequest( if request.peer_asn is not None: output["peer_asn"] = request.peer_asn + if request.vlan is not None: + output["vlan"] = request.vlan + return output diff --git a/scaleway-async/scaleway_async/interlink/v1beta1/types.py b/scaleway-async/scaleway_async/interlink/v1beta1/types.py index bbc7e0092..56696a502 100644 --- a/scaleway-async/scaleway_async/interlink/v1beta1/types.py +++ b/scaleway-async/scaleway_async/interlink/v1beta1/types.py @@ -553,6 +553,11 @@ class CreateLinkRequest: For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned. """ + vlan: Optional[int] + """ + For self-hosted links only, it is possible to choose the VLAN ID. If the VLAN is not available (ie already taken or out of range), an error is returned. + """ + connection_id: Optional[str] partner_id: Optional[str] diff --git a/scaleway/scaleway/interlink/v1beta1/api.py b/scaleway/scaleway/interlink/v1beta1/api.py index 355178ec3..de13b59c6 100644 --- a/scaleway/scaleway/interlink/v1beta1/api.py +++ b/scaleway/scaleway/interlink/v1beta1/api.py @@ -765,6 +765,7 @@ def create_link( connection_id: Optional[str] = None, partner_id: Optional[str] = None, peer_asn: Optional[int] = None, + vlan: Optional[int] = None, ) -> Link: """ Create a link. @@ -780,6 +781,7 @@ def create_link( :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. + :param vlan: For self-hosted links only, it is possible to choose the VLAN ID. If the VLAN is not available (ie already taken or out of range), an error is returned. :return: :class:`Link ` Usage: @@ -808,6 +810,7 @@ def create_link( project_id=project_id, tags=tags, peer_asn=peer_asn, + vlan=vlan, connection_id=connection_id, partner_id=partner_id, ), diff --git a/scaleway/scaleway/interlink/v1beta1/marshalling.py b/scaleway/scaleway/interlink/v1beta1/marshalling.py index 0c567d65c..7e01aa313 100644 --- a/scaleway/scaleway/interlink/v1beta1/marshalling.py +++ b/scaleway/scaleway/interlink/v1beta1/marshalling.py @@ -596,6 +596,9 @@ def marshal_CreateLinkRequest( if request.peer_asn is not None: output["peer_asn"] = request.peer_asn + if request.vlan is not None: + output["vlan"] = request.vlan + return output diff --git a/scaleway/scaleway/interlink/v1beta1/types.py b/scaleway/scaleway/interlink/v1beta1/types.py index bbc7e0092..56696a502 100644 --- a/scaleway/scaleway/interlink/v1beta1/types.py +++ b/scaleway/scaleway/interlink/v1beta1/types.py @@ -553,6 +553,11 @@ class CreateLinkRequest: For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned. """ + vlan: Optional[int] + """ + For self-hosted links only, it is possible to choose the VLAN ID. If the VLAN is not available (ie already taken or out of range), an error is returned. + """ + connection_id: Optional[str] partner_id: Optional[str]