Skip to content

Commit 6126d93

Browse files
Generate alb
1 parent f57da4e commit 6126d93

3 files changed

Lines changed: 47 additions & 6 deletions

File tree

‎services/alb/oas_commit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7e7c0c6d141ef436fa9dee1e9724936562b7d6da
1+
4cd5a53efd662031e40a9debd4148cedd9e980a5

‎services/alb/src/stackit/alb/models/http_health_checks.py‎

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,19 @@
1515

1616
import json
1717
import pprint
18+
import re # noqa: F401
1819
from typing import Any, ClassVar, Dict, List, Optional, Set
1920

20-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
21+
from pydantic import (
22+
BaseModel,
23+
ConfigDict,
24+
Field,
25+
StrictBool,
26+
StrictStr,
27+
field_validator,
28+
)
2129
from pydantic_core import to_jsonable_python
22-
from typing_extensions import Self
30+
from typing_extensions import Annotated, Self
2331

2432
from stackit.alb.models.tls_config import TlsConfig
2533

@@ -29,12 +37,32 @@ class HttpHealthChecks(BaseModel):
2937
Options for the HTTP health checking.
3038
""" # noqa: E501
3139

40+
disable_connection_reuse: Optional[StrictBool] = Field(
41+
default=None,
42+
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).",
43+
alias="disableConnectionReuse",
44+
)
3245
ok_statuses: Optional[List[StrictStr]] = Field(
3346
default=None, description="List of HTTP status codes that indicate a healthy response", alias="okStatuses"
3447
)
35-
path: Optional[StrictStr] = Field(default=None, description="Path to send the health check request to")
48+
path: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=253)]] = Field(
49+
default=None, description="Path to send the health check request to"
50+
)
3651
tls: Optional[TlsConfig] = None
37-
__properties: ClassVar[List[str]] = ["okStatuses", "path", "tls"]
52+
__properties: ClassVar[List[str]] = ["disableConnectionReuse", "okStatuses", "path", "tls"]
53+
54+
@field_validator("path")
55+
def path_validate_regular_expression(cls, value):
56+
"""Validates the regular expression"""
57+
if value is None:
58+
return value
59+
60+
if not isinstance(value, str):
61+
value = str(value)
62+
63+
if not re.match(r"^(?:\/[a-zA-Z0-9\-._]+)*\/?$", value):
64+
raise ValueError(r"must validate the regular expression /^(?:\/[a-zA-Z0-9\-._]+)*\/?$/")
65+
return value
3866

3967
model_config = ConfigDict(
4068
validate_by_name=True,
@@ -89,6 +117,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
89117

90118
_obj = cls.model_validate(
91119
{
120+
"disableConnectionReuse": obj.get("disableConnectionReuse"),
92121
"okStatuses": obj.get("okStatuses"),
93122
"path": obj.get("path"),
94123
"tls": TlsConfig.from_dict(obj["tls"]) if obj.get("tls") is not None else None,

‎services/alb/src/stackit/alb/models/load_balancer_options.py‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ class LoadBalancerOptions(BaseModel):
3535
""" # noqa: E501
3636

3737
access_control: Optional[LoadbalancerOptionAccessControl] = Field(default=None, alias="accessControl")
38+
access_logs: Optional[StrictBool] = Field(
39+
default=None,
40+
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.",
41+
alias="accessLogs",
42+
)
3843
ephemeral_address: Optional[StrictBool] = Field(
3944
default=None,
4045
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):
4651
description="Application Load Balancer is accessible only via a private network ip address. Not changeable after creation.",
4752
alias="privateNetworkOnly",
4853
)
49-
__properties: ClassVar[List[str]] = ["accessControl", "ephemeralAddress", "observability", "privateNetworkOnly"]
54+
__properties: ClassVar[List[str]] = [
55+
"accessControl",
56+
"accessLogs",
57+
"ephemeralAddress",
58+
"observability",
59+
"privateNetworkOnly",
60+
]
5061

5162
model_config = ConfigDict(
5263
validate_by_name=True,
@@ -109,6 +120,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
109120
if obj.get("accessControl") is not None
110121
else None
111122
),
123+
"accessLogs": obj.get("accessLogs"),
112124
"ephemeralAddress": obj.get("ephemeralAddress"),
113125
"observability": (
114126
LoadbalancerOptionObservability.from_dict(obj["observability"])

0 commit comments

Comments
 (0)