Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions scaleway-async/scaleway_async/lb/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,8 @@ async def create_backend(
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
max_connections: Optional[int] = None,
timeout_queue: Optional[str] = None,
) -> Backend:
"""
Create a backend in a given load balancer.
Expand All @@ -936,6 +938,8 @@ async def create_backend(
:param ignore_ssl_server_verify: Defines whether the server certificate verification should be ignored.
:param redispatch_attempt_count: Whether to use another backend server on each attempt.
:param max_retries: Number of retries when a backend server connection failed.
:param max_connections: Maximum number of connections allowed per backend server.
:param timeout_queue: Maximum time for a request to be left pending in queue when `max_connections` is reached.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -983,6 +987,8 @@ async def create_backend(
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
max_connections=max_connections,
timeout_queue=timeout_queue,
),
self.client,
),
Expand Down Expand Up @@ -1044,6 +1050,8 @@ async def update_backend(
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
max_connections: Optional[int] = None,
timeout_queue: Optional[str] = None,
) -> Backend:
"""
Update a backend in a given load balancer.
Expand All @@ -1066,6 +1074,8 @@ async def update_backend(
:param ignore_ssl_server_verify: Defines whether the server certificate verification should be ignored.
:param redispatch_attempt_count: Whether to use another backend server on each attempt.
:param max_retries: Number of retries when a backend server connection failed.
:param max_connections: Maximum number of connections allowed per backend server.
:param timeout_queue: Maximum time for a request to be left pending in queue when `max_connections` is reached.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -1110,6 +1120,8 @@ async def update_backend(
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
max_connections=max_connections,
timeout_queue=timeout_queue,
),
self.client,
),
Expand Down Expand Up @@ -3811,6 +3823,8 @@ async def create_backend(
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
max_connections: Optional[int] = None,
timeout_queue: Optional[str] = None,
) -> Backend:
"""
Create a backend for a given Load Balancer.
Expand All @@ -3836,6 +3850,8 @@ async def create_backend(
:param ignore_ssl_server_verify: Defines whether the server certificate verification should be ignored.
:param redispatch_attempt_count: Whether to use another backend server on each attempt.
:param max_retries: Number of retries when a backend server connection failed.
:param max_connections: Maximum number of connections allowed per backend server.
:param timeout_queue: Maximum time for a request to be left pending in queue when `max_connections` is reached.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -3881,6 +3897,8 @@ async def create_backend(
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
max_connections=max_connections,
timeout_queue=timeout_queue,
),
self.client,
),
Expand Down Expand Up @@ -3941,6 +3959,8 @@ async def update_backend(
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
max_connections: Optional[int] = None,
timeout_queue: Optional[str] = None,
) -> Backend:
"""
Update a backend of a given Load Balancer.
Expand All @@ -3964,6 +3984,8 @@ async def update_backend(
:param ignore_ssl_server_verify: Defines whether the server certificate verification should be ignored.
:param redispatch_attempt_count: Whether to use another backend server on each attempt.
:param max_retries: Number of retries when a backend server connection failed.
:param max_connections: Maximum number of connections allowed per backend server.
:param timeout_queue: Maximum time for a request to be left pending in queue when `max_connections` is reached.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -4006,6 +4028,8 @@ async def update_backend(
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
max_connections=max_connections,
timeout_queue=timeout_queue,
),
self.client,
),
Expand Down
14 changes: 14 additions & 0 deletions scaleway-async/scaleway_async/lb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,9 @@ def unmarshal_Backend(data: Any) -> Backend:
field = data.get("lb")
args["lb"] = unmarshal_Lb(field) if field is not None else None

field = data.get("max_connections")
args["max_connections"] = field

field = data.get("max_retries")
args["max_retries"] = field

Expand Down Expand Up @@ -569,6 +572,9 @@ def unmarshal_Backend(data: Any) -> Backend:
field = data.get("timeout_connect")
args["timeout_connect"] = field

field = data.get("timeout_queue")
args["timeout_queue"] = field

field = data.get("timeout_server")
args["timeout_server"] = field

Expand Down Expand Up @@ -1483,6 +1489,7 @@ def marshal_CreateBackendRequest(
else None,
"health_check": marshal_HealthCheck(request.health_check, defaults),
"ignore_ssl_server_verify": request.ignore_ssl_server_verify,
"max_connections": request.max_connections,
"max_retries": request.max_retries,
"name": request.name,
"on_marked_down_action": OnMarkedDownAction(request.on_marked_down_action),
Expand All @@ -1496,6 +1503,7 @@ def marshal_CreateBackendRequest(
else None,
"sticky_sessions_cookie_name": request.sticky_sessions_cookie_name,
"timeout_connect": request.timeout_connect,
"timeout_queue": request.timeout_queue,
"timeout_server": request.timeout_server,
"timeout_tunnel": request.timeout_tunnel,
}
Expand Down Expand Up @@ -1727,6 +1735,7 @@ def marshal_UpdateBackendRequest(
if request.forward_protocol is not None
else None,
"ignore_ssl_server_verify": request.ignore_ssl_server_verify,
"max_connections": request.max_connections,
"max_retries": request.max_retries,
"name": request.name,
"on_marked_down_action": OnMarkedDownAction(request.on_marked_down_action),
Expand All @@ -1739,6 +1748,7 @@ def marshal_UpdateBackendRequest(
else None,
"sticky_sessions_cookie_name": request.sticky_sessions_cookie_name,
"timeout_connect": request.timeout_connect,
"timeout_queue": request.timeout_queue,
"timeout_server": request.timeout_server,
"timeout_tunnel": request.timeout_tunnel,
}
Expand Down Expand Up @@ -1957,6 +1967,7 @@ def marshal_ZonedApiCreateBackendRequest(
else None,
"health_check": marshal_HealthCheck(request.health_check, defaults),
"ignore_ssl_server_verify": request.ignore_ssl_server_verify,
"max_connections": request.max_connections,
"max_retries": request.max_retries,
"name": request.name,
"on_marked_down_action": OnMarkedDownAction(request.on_marked_down_action),
Expand All @@ -1970,6 +1981,7 @@ def marshal_ZonedApiCreateBackendRequest(
else None,
"sticky_sessions_cookie_name": request.sticky_sessions_cookie_name,
"timeout_connect": request.timeout_connect,
"timeout_queue": request.timeout_queue,
"timeout_server": request.timeout_server,
"timeout_tunnel": request.timeout_tunnel,
}
Expand Down Expand Up @@ -2210,6 +2222,7 @@ def marshal_ZonedApiUpdateBackendRequest(
if request.forward_protocol is not None
else None,
"ignore_ssl_server_verify": request.ignore_ssl_server_verify,
"max_connections": request.max_connections,
"max_retries": request.max_retries,
"name": request.name,
"on_marked_down_action": OnMarkedDownAction(request.on_marked_down_action),
Expand All @@ -2222,6 +2235,7 @@ def marshal_ZonedApiUpdateBackendRequest(
else None,
"sticky_sessions_cookie_name": request.sticky_sessions_cookie_name,
"timeout_connect": request.timeout_connect,
"timeout_queue": request.timeout_queue,
"timeout_server": request.timeout_server,
"timeout_tunnel": request.timeout_tunnel,
}
Expand Down
50 changes: 50 additions & 0 deletions scaleway-async/scaleway_async/lb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,16 @@ class Backend:
Number of retries when a backend server connection failed.
"""

max_connections: Optional[int]
"""
Maximum number of connections allowed per backend server.
"""

timeout_queue: Optional[str]
"""
Maximum time for a request to be left pending in queue when `max_connections` is reached.
"""


@dataclass
class BackendServerStats:
Expand Down Expand Up @@ -1996,6 +2006,16 @@ class CreateBackendRequest:
Number of retries when a backend server connection failed.
"""

max_connections: Optional[int]
"""
Maximum number of connections allowed per backend server.
"""

timeout_queue: Optional[str]
"""
Maximum time for a request to be left pending in queue when `max_connections` is reached.
"""


@dataclass
class GetBackendRequest:
Expand Down Expand Up @@ -2108,6 +2128,16 @@ class UpdateBackendRequest:
Number of retries when a backend server connection failed.
"""

max_connections: Optional[int]
"""
Maximum number of connections allowed per backend server.
"""

timeout_queue: Optional[str]
"""
Maximum time for a request to be left pending in queue when `max_connections` is reached.
"""


@dataclass
class DeleteBackendRequest:
Expand Down Expand Up @@ -3496,6 +3526,16 @@ class ZonedApiCreateBackendRequest:
Number of retries when a backend server connection failed.
"""

max_connections: Optional[int]
"""
Maximum number of connections allowed per backend server.
"""

timeout_queue: Optional[str]
"""
Maximum time for a request to be left pending in queue when `max_connections` is reached.
"""


@dataclass
class ZonedApiGetBackendRequest:
Expand Down Expand Up @@ -3608,6 +3648,16 @@ class ZonedApiUpdateBackendRequest:
Number of retries when a backend server connection failed.
"""

max_connections: Optional[int]
"""
Maximum number of connections allowed per backend server.
"""

timeout_queue: Optional[str]
"""
Maximum time for a request to be left pending in queue when `max_connections` is reached.
"""


@dataclass
class ZonedApiDeleteBackendRequest:
Expand Down
24 changes: 24 additions & 0 deletions scaleway/scaleway/lb/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,8 @@ def create_backend(
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
max_connections: Optional[int] = None,
timeout_queue: Optional[str] = None,
) -> Backend:
"""
Create a backend in a given load balancer.
Expand All @@ -936,6 +938,8 @@ def create_backend(
:param ignore_ssl_server_verify: Defines whether the server certificate verification should be ignored.
:param redispatch_attempt_count: Whether to use another backend server on each attempt.
:param max_retries: Number of retries when a backend server connection failed.
:param max_connections: Maximum number of connections allowed per backend server.
:param timeout_queue: Maximum time for a request to be left pending in queue when `max_connections` is reached.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -983,6 +987,8 @@ def create_backend(
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
max_connections=max_connections,
timeout_queue=timeout_queue,
),
self.client,
),
Expand Down Expand Up @@ -1044,6 +1050,8 @@ def update_backend(
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
max_connections: Optional[int] = None,
timeout_queue: Optional[str] = None,
) -> Backend:
"""
Update a backend in a given load balancer.
Expand All @@ -1066,6 +1074,8 @@ def update_backend(
:param ignore_ssl_server_verify: Defines whether the server certificate verification should be ignored.
:param redispatch_attempt_count: Whether to use another backend server on each attempt.
:param max_retries: Number of retries when a backend server connection failed.
:param max_connections: Maximum number of connections allowed per backend server.
:param timeout_queue: Maximum time for a request to be left pending in queue when `max_connections` is reached.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -1110,6 +1120,8 @@ def update_backend(
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
max_connections=max_connections,
timeout_queue=timeout_queue,
),
self.client,
),
Expand Down Expand Up @@ -3809,6 +3821,8 @@ def create_backend(
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
max_connections: Optional[int] = None,
timeout_queue: Optional[str] = None,
) -> Backend:
"""
Create a backend for a given Load Balancer.
Expand All @@ -3834,6 +3848,8 @@ def create_backend(
:param ignore_ssl_server_verify: Defines whether the server certificate verification should be ignored.
:param redispatch_attempt_count: Whether to use another backend server on each attempt.
:param max_retries: Number of retries when a backend server connection failed.
:param max_connections: Maximum number of connections allowed per backend server.
:param timeout_queue: Maximum time for a request to be left pending in queue when `max_connections` is reached.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -3879,6 +3895,8 @@ def create_backend(
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
max_connections=max_connections,
timeout_queue=timeout_queue,
),
self.client,
),
Expand Down Expand Up @@ -3939,6 +3957,8 @@ def update_backend(
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
max_connections: Optional[int] = None,
timeout_queue: Optional[str] = None,
) -> Backend:
"""
Update a backend of a given Load Balancer.
Expand All @@ -3962,6 +3982,8 @@ def update_backend(
:param ignore_ssl_server_verify: Defines whether the server certificate verification should be ignored.
:param redispatch_attempt_count: Whether to use another backend server on each attempt.
:param max_retries: Number of retries when a backend server connection failed.
:param max_connections: Maximum number of connections allowed per backend server.
:param timeout_queue: Maximum time for a request to be left pending in queue when `max_connections` is reached.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -4004,6 +4026,8 @@ def update_backend(
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
max_connections=max_connections,
timeout_queue=timeout_queue,
),
self.client,
),
Expand Down
Loading