Skip to content
Open
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
2 changes: 1 addition & 1 deletion services/alb/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7e7c0c6d141ef436fa9dee1e9724936562b7d6da
716f4d2bf40383fc9a9c3ee0f67a0490d4a15d81
22 changes: 19 additions & 3 deletions services/alb/src/stackit/alb/models/http_health_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@

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, 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

Expand All @@ -32,10 +33,25 @@ class HttpHealthChecks(BaseModel):
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"]

@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,
validate_by_alias=True,
Expand Down
14 changes: 13 additions & 1 deletion services/alb/src/stackit/alb/models/load_balancer_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -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,
Expand Down Expand Up @@ -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"])
Expand Down
Loading