From fee55812d4f8d7e805f03727773091274b0f533b Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Fri, 4 Dec 2026 12:26:13 +0000 Subject: [PATCH] Generate alb --- services/alb/oas_commit | 2 +- .../stackit/alb/models/http_health_checks.py | 37 +++++++++++++++++-- .../alb/models/load_balancer_options.py | 14 ++++++- 3 files changed, 47 insertions(+), 6 deletions(-) diff --git a/services/alb/oas_commit b/services/alb/oas_commit index 35b7f4140..adcb2c2f7 100644 --- a/services/alb/oas_commit +++ b/services/alb/oas_commit @@ -1 +1 @@ -7e7c0c6d141ef436fa9dee1e9724936562b7d6da +5ca5acc9e3049a1a90df22df28da3168b697ed26 diff --git a/services/alb/src/stackit/alb/models/http_health_checks.py b/services/alb/src/stackit/alb/models/http_health_checks.py index 03157b80d..ef48c2032 100644 --- a/services/alb/src/stackit/alb/models/http_health_checks.py +++ b/services/alb/src/stackit/alb/models/http_health_checks.py @@ -15,11 +15,19 @@ import json import pprint +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) from pydantic_core import to_jsonable_python -from typing_extensions import Self +from typing_extensions import Annotated, Self from stackit.alb.models.tls_config import TlsConfig @@ -29,12 +37,32 @@ class HttpHealthChecks(BaseModel): Options for the HTTP health checking. """ # noqa: E501 + disable_connection_reuse: Optional[StrictBool] = Field( + default=None, + description="If true, each HTTP health check probe opens a new TCP connection instead of reusing an existing one. Defaults to false (connections are reused across consecutive probes).", + alias="disableConnectionReuse", + ) ok_statuses: Optional[List[StrictStr]] = Field( default=None, description="List of HTTP status codes that indicate a healthy response", alias="okStatuses" ) - path: Optional[StrictStr] = Field(default=None, description="Path to send the health check request to") + path: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=253)]] = Field( + default=None, description="Path to send the health check request to" + ) tls: Optional[TlsConfig] = None - __properties: ClassVar[List[str]] = ["okStatuses", "path", "tls"] + __properties: ClassVar[List[str]] = ["disableConnectionReuse", "okStatuses", "path", "tls"] + + @field_validator("path") + def path_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + + if not re.match(r"^(?:\/[a-zA-Z0-9\-._]+)*\/?$", value): + raise ValueError(r"must validate the regular expression /^(?:\/[a-zA-Z0-9\-._]+)*\/?$/") + return value model_config = ConfigDict( validate_by_name=True, @@ -89,6 +117,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { + "disableConnectionReuse": obj.get("disableConnectionReuse"), "okStatuses": obj.get("okStatuses"), "path": obj.get("path"), "tls": TlsConfig.from_dict(obj["tls"]) if obj.get("tls") is not None else None, diff --git a/services/alb/src/stackit/alb/models/load_balancer_options.py b/services/alb/src/stackit/alb/models/load_balancer_options.py index cbc539c9a..6c730974d 100644 --- a/services/alb/src/stackit/alb/models/load_balancer_options.py +++ b/services/alb/src/stackit/alb/models/load_balancer_options.py @@ -35,6 +35,11 @@ class LoadBalancerOptions(BaseModel): """ # noqa: E501 access_control: Optional[LoadbalancerOptionAccessControl] = Field(default=None, alias="accessControl") + access_logs: Optional[StrictBool] = Field( + default=None, + description="Enable per-request access logs on the Application Load Balancer. Defaults to false. Enable only when the Application Load Balancer's expected traffic volume can be sustained by the downstream logging pipeline, as access-log volume scales linearly with request rate. Requires a STACKIT Telemetry Router to be set up for the logs to be viewable.", + alias="accessLogs", + ) ephemeral_address: Optional[StrictBool] = Field( default=None, description="This option automates the handling of the external IP address for an Application Load Balancer. If set to true a new IP address will be automatically created. It will also be automatically deleted when the Load Balancer is deleted.", @@ -46,7 +51,13 @@ class LoadBalancerOptions(BaseModel): description="Application Load Balancer is accessible only via a private network ip address. Not changeable after creation.", alias="privateNetworkOnly", ) - __properties: ClassVar[List[str]] = ["accessControl", "ephemeralAddress", "observability", "privateNetworkOnly"] + __properties: ClassVar[List[str]] = [ + "accessControl", + "accessLogs", + "ephemeralAddress", + "observability", + "privateNetworkOnly", + ] model_config = ConfigDict( validate_by_name=True, @@ -109,6 +120,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("accessControl") is not None else None ), + "accessLogs": obj.get("accessLogs"), "ephemeralAddress": obj.get("ephemeralAddress"), "observability": ( LoadbalancerOptionObservability.from_dict(obj["observability"])