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
30 changes: 30 additions & 0 deletions scaleway-async/scaleway_async/lb/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,8 @@ async def create_backend(
failover_host: Optional[str] = None,
ssl_bridging: Optional[bool] = None,
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
) -> Backend:
"""
Create a backend in a given load balancer.
Expand All @@ -932,6 +934,8 @@ async def create_backend(
:param failover_host: Scaleway S3 bucket website to be served as failover if all backend servers are down, e.g. failover-website.s3-website.fr-par.scw.cloud. Do not include the scheme (eg https://).
:param ssl_bridging: Defines whether to enable SSL between the Load Balancer and backend servers.
: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.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -977,6 +981,8 @@ async def create_backend(
failover_host=failover_host,
ssl_bridging=ssl_bridging,
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
),
self.client,
),
Expand Down Expand Up @@ -1036,6 +1042,8 @@ async def update_backend(
failover_host: Optional[str] = None,
ssl_bridging: Optional[bool] = None,
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
) -> Backend:
"""
Update a backend in a given load balancer.
Expand All @@ -1056,6 +1064,8 @@ async def update_backend(
:param failover_host: Scaleway S3 bucket website to be served as failover if all backend servers are down, e.g. failover-website.s3-website.fr-par.scw.cloud. Do not include the scheme (eg https://).
:param ssl_bridging: Defines whether to enable SSL bridging between the Load Balancer and backend servers.
: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 retries.
:param max_retries: Number of retries when a backend server connection failed.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -1098,6 +1108,8 @@ async def update_backend(
failover_host=failover_host,
ssl_bridging=ssl_bridging,
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
),
self.client,
),
Expand Down Expand Up @@ -1285,6 +1297,7 @@ async def update_health_check(
tcp_config: Optional[HealthCheckTcpConfig] = None,
http_config: Optional[HealthCheckHttpConfig] = None,
https_config: Optional[HealthCheckHttpsConfig] = None,
transient_check_delay: Optional[str] = None,
) -> HealthCheck:
"""
Update an health check for a given backend.
Expand Down Expand Up @@ -1316,6 +1329,7 @@ async def update_health_check(

One-of ('config'): at most one of 'mysql_config', 'ldap_config', 'redis_config', 'pgsql_config', 'tcp_config', 'http_config', 'https_config' could be set.
:param check_send_proxy: Defines whether proxy protocol should be activated for the health check.
:param transient_check_delay: Time to wait between two consecutive health checks when a backend server is in a transient state (going UP or DOWN).
:return: :class:`HealthCheck <HealthCheck>`

Usage:
Expand Down Expand Up @@ -1355,6 +1369,7 @@ async def update_health_check(
tcp_config=tcp_config,
http_config=http_config,
https_config=https_config,
transient_check_delay=transient_check_delay,
),
self.client,
),
Expand Down Expand Up @@ -3794,6 +3809,8 @@ async def create_backend(
failover_host: Optional[str] = None,
ssl_bridging: Optional[bool] = None,
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
) -> Backend:
"""
Create a backend for a given Load Balancer.
Expand All @@ -3817,6 +3834,8 @@ async def create_backend(
:param failover_host: Scaleway S3 bucket website to be served as failover if all backend servers are down, e.g. failover-website.s3-website.fr-par.scw.cloud. Do not include the scheme (eg https://).
:param ssl_bridging: Defines whether to enable SSL between the Load Balancer and backend servers.
: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.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -3860,6 +3879,8 @@ async def create_backend(
failover_host=failover_host,
ssl_bridging=ssl_bridging,
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
),
self.client,
),
Expand Down Expand Up @@ -3918,6 +3939,8 @@ async def update_backend(
failover_host: Optional[str] = None,
ssl_bridging: Optional[bool] = None,
ignore_ssl_server_verify: Optional[bool] = None,
redispatch_attempt_count: Optional[int] = None,
max_retries: Optional[int] = None,
) -> Backend:
"""
Update a backend of a given Load Balancer.
Expand All @@ -3939,6 +3962,8 @@ async def update_backend(
:param failover_host: Scaleway S3 bucket website to be served as failover if all backend servers are down, e.g. failover-website.s3-website.fr-par.scw.cloud. Do not include the scheme (eg https://).
:param ssl_bridging: Defines whether to enable SSL bridging between the Load Balancer and backend servers.
: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 retries.
:param max_retries: Number of retries when a backend server connection failed.
:return: :class:`Backend <Backend>`

Usage:
Expand Down Expand Up @@ -3979,6 +4004,8 @@ async def update_backend(
failover_host=failover_host,
ssl_bridging=ssl_bridging,
ignore_ssl_server_verify=ignore_ssl_server_verify,
redispatch_attempt_count=redispatch_attempt_count,
max_retries=max_retries,
),
self.client,
),
Expand Down Expand Up @@ -4162,6 +4189,7 @@ async def update_health_check(
tcp_config: Optional[HealthCheckTcpConfig] = None,
http_config: Optional[HealthCheckHttpConfig] = None,
https_config: Optional[HealthCheckHttpsConfig] = None,
transient_check_delay: Optional[str] = None,
) -> HealthCheck:
"""
Update a health check for a given backend.
Expand Down Expand Up @@ -4194,6 +4222,7 @@ async def update_health_check(

One-of ('config'): at most one of 'mysql_config', 'ldap_config', 'redis_config', 'pgsql_config', 'tcp_config', 'http_config', 'https_config' could be set.
:param check_send_proxy: Defines whether proxy protocol should be activated for the health check.
:param transient_check_delay: Time to wait between two consecutive health checks when a backend server is in a transient state (going UP or DOWN).
:return: :class:`HealthCheck <HealthCheck>`

Usage:
Expand Down Expand Up @@ -4231,6 +4260,7 @@ async def update_health_check(
tcp_config=tcp_config,
http_config=http_config,
https_config=https_config,
transient_check_delay=transient_check_delay,
),
self.client,
),
Expand Down
20 changes: 20 additions & 0 deletions scaleway-async/scaleway_async/lb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ def unmarshal_HealthCheck(data: Any) -> HealthCheck:
unmarshal_HealthCheckTcpConfig(field) if field is not None else None
)

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

return HealthCheck(**args)


Expand Down Expand Up @@ -533,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_retries")
args["max_retries"] = field

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

Expand All @@ -545,6 +551,9 @@ def unmarshal_Backend(data: Any) -> Backend:
field = data.get("proxy_protocol")
args["proxy_protocol"] = field

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

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

Expand Down Expand Up @@ -1341,6 +1350,7 @@ def marshal_HealthCheck(
"check_send_proxy": request.check_send_proxy,
"check_timeout": request.check_timeout,
"port": request.port,
"transient_check_delay": request.transient_check_delay,
}


Expand Down Expand Up @@ -1473,9 +1483,11 @@ def marshal_CreateBackendRequest(
else None,
"health_check": marshal_HealthCheck(request.health_check, defaults),
"ignore_ssl_server_verify": request.ignore_ssl_server_verify,
"max_retries": request.max_retries,
"name": request.name,
"on_marked_down_action": OnMarkedDownAction(request.on_marked_down_action),
"proxy_protocol": ProxyProtocol(request.proxy_protocol),
"redispatch_attempt_count": request.redispatch_attempt_count,
"send_proxy_v2": request.send_proxy_v2,
"server_ip": request.server_ip,
"ssl_bridging": request.ssl_bridging,
Expand Down Expand Up @@ -1715,9 +1727,11 @@ def marshal_UpdateBackendRequest(
if request.forward_protocol is not None
else None,
"ignore_ssl_server_verify": request.ignore_ssl_server_verify,
"max_retries": request.max_retries,
"name": request.name,
"on_marked_down_action": OnMarkedDownAction(request.on_marked_down_action),
"proxy_protocol": ProxyProtocol(request.proxy_protocol),
"redispatch_attempt_count": request.redispatch_attempt_count,
"send_proxy_v2": request.send_proxy_v2,
"ssl_bridging": request.ssl_bridging,
"sticky_sessions": StickySessionsType(request.sticky_sessions)
Expand Down Expand Up @@ -1810,6 +1824,7 @@ def marshal_UpdateHealthCheckRequest(
"check_send_proxy": request.check_send_proxy,
"check_timeout": request.check_timeout,
"port": request.port,
"transient_check_delay": request.transient_check_delay,
}


Expand Down Expand Up @@ -1942,9 +1957,11 @@ def marshal_ZonedApiCreateBackendRequest(
else None,
"health_check": marshal_HealthCheck(request.health_check, defaults),
"ignore_ssl_server_verify": request.ignore_ssl_server_verify,
"max_retries": request.max_retries,
"name": request.name,
"on_marked_down_action": OnMarkedDownAction(request.on_marked_down_action),
"proxy_protocol": ProxyProtocol(request.proxy_protocol),
"redispatch_attempt_count": request.redispatch_attempt_count,
"send_proxy_v2": request.send_proxy_v2,
"server_ip": request.server_ip,
"ssl_bridging": request.ssl_bridging,
Expand Down Expand Up @@ -2193,9 +2210,11 @@ def marshal_ZonedApiUpdateBackendRequest(
if request.forward_protocol is not None
else None,
"ignore_ssl_server_verify": request.ignore_ssl_server_verify,
"max_retries": request.max_retries,
"name": request.name,
"on_marked_down_action": OnMarkedDownAction(request.on_marked_down_action),
"proxy_protocol": ProxyProtocol(request.proxy_protocol),
"redispatch_attempt_count": request.redispatch_attempt_count,
"send_proxy_v2": request.send_proxy_v2,
"ssl_bridging": request.ssl_bridging,
"sticky_sessions": StickySessionsType(request.sticky_sessions)
Expand Down Expand Up @@ -2288,6 +2307,7 @@ def marshal_ZonedApiUpdateHealthCheckRequest(
"check_send_proxy": request.check_send_proxy,
"check_timeout": request.check_timeout,
"port": request.port,
"transient_check_delay": request.transient_check_delay,
}


Expand Down
65 changes: 65 additions & 0 deletions scaleway-async/scaleway_async/lb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,16 @@ class Backend:
Defines whether the server certificate verification should be ignored.
"""

redispatch_attempt_count: Optional[int]
"""
Whether to use another backend server on each attempt.
"""

max_retries: Optional[int]
"""
Number of retries when a backend server connection failed.
"""


@dataclass
class BackendServerStats:
Expand Down Expand Up @@ -815,6 +825,11 @@ class HealthCheck:
Defines whether proxy protocol should be activated for the health check.
"""

transient_check_delay: Optional[str]
"""
Time to wait between two consecutive health checks when a backend server is in a transient state (going UP or DOWN).
"""


@dataclass
class HealthCheckHttpConfig:
Expand Down Expand Up @@ -1933,6 +1948,16 @@ class CreateBackendRequest:
Defines whether the server certificate verification should be ignored.
"""

redispatch_attempt_count: Optional[int]
"""
Whether to use another backend server on each attempt.
"""

max_retries: Optional[int]
"""
Number of retries when a backend server connection failed.
"""


@dataclass
class GetBackendRequest:
Expand Down Expand Up @@ -2035,6 +2060,16 @@ class UpdateBackendRequest:
Defines whether the server certificate verification should be ignored.
"""

redispatch_attempt_count: Optional[int]
"""
Whether to use another backend server on each retries.
"""

max_retries: Optional[int]
"""
Number of retries when a backend server connection failed.
"""


@dataclass
class DeleteBackendRequest:
Expand Down Expand Up @@ -2189,6 +2224,11 @@ class UpdateHealthCheckRequest:
Defines whether proxy protocol should be activated for the health check.
"""

transient_check_delay: Optional[str]
"""
Time to wait between two consecutive health checks when a backend server is in a transient state (going UP or DOWN).
"""


@dataclass
class ListFrontendsRequest:
Expand Down Expand Up @@ -3405,6 +3445,16 @@ class ZonedApiCreateBackendRequest:
Defines whether the server certificate verification should be ignored.
"""

redispatch_attempt_count: Optional[int]
"""
Whether to use another backend server on each attempt.
"""

max_retries: Optional[int]
"""
Number of retries when a backend server connection failed.
"""


@dataclass
class ZonedApiGetBackendRequest:
Expand Down Expand Up @@ -3507,6 +3557,16 @@ class ZonedApiUpdateBackendRequest:
Defines whether the server certificate verification should be ignored.
"""

redispatch_attempt_count: Optional[int]
"""
Whether to use another backend server on each retries.
"""

max_retries: Optional[int]
"""
Number of retries when a backend server connection failed.
"""


@dataclass
class ZonedApiDeleteBackendRequest:
Expand Down Expand Up @@ -3661,6 +3721,11 @@ class ZonedApiUpdateHealthCheckRequest:
Defines whether proxy protocol should be activated for the health check.
"""

transient_check_delay: Optional[str]
"""
Time to wait between two consecutive health checks when a backend server is in a transient state (going UP or DOWN).
"""


@dataclass
class ZonedApiListFrontendsRequest:
Expand Down
Loading