Skip to content

Commit 491c912

Browse files
Generate alb
1 parent 11cdfdc commit 491c912

3 files changed

Lines changed: 33 additions & 5 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+
a96d374267d64eddeac8f20c03443f9185058d40

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

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@
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 BaseModel, ConfigDict, Field, StrictStr, field_validator
2122
from pydantic_core import to_jsonable_python
22-
from typing_extensions import Self
23+
from typing_extensions import Annotated, Self
2324

2425
from stackit.alb.models.tls_config import TlsConfig
2526

@@ -32,10 +33,25 @@ class HttpHealthChecks(BaseModel):
3233
ok_statuses: Optional[List[StrictStr]] = Field(
3334
default=None, description="List of HTTP status codes that indicate a healthy response", alias="okStatuses"
3435
)
35-
path: Optional[StrictStr] = Field(default=None, description="Path to send the health check request to")
36+
path: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=253)]] = Field(
37+
default=None, description="Path to send the health check request to"
38+
)
3639
tls: Optional[TlsConfig] = None
3740
__properties: ClassVar[List[str]] = ["okStatuses", "path", "tls"]
3841

42+
@field_validator("path")
43+
def path_validate_regular_expression(cls, value):
44+
"""Validates the regular expression"""
45+
if value is None:
46+
return value
47+
48+
if not isinstance(value, str):
49+
value = str(value)
50+
51+
if not re.match(r"^(?:\/[a-zA-Z0-9\-._]+)*\/?$", value):
52+
raise ValueError(r"must validate the regular expression /^(?:\/[a-zA-Z0-9\-._]+)*\/?$/")
53+
return value
54+
3955
model_config = ConfigDict(
4056
validate_by_name=True,
4157
validate_by_alias=True,

‎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)