diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cc6e48cf..af95e81a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Release (2026-MM-DD) +- `alb`: + - [v0.13.0](services/alb/CHANGELOG.md#v0130) + - **Feature:** Add `ip_block_list_name` field to `LoadbalancerOptionAccessControl` model - `telemetryrouter`: - [v0.6.0](services/telemetryrouter/CHANGELOG.md#v060) - **Feature:** Add `disabled` field to `ConfigFilter` to allow disabling a filter without removing it diff --git a/services/alb/CHANGELOG.md b/services/alb/CHANGELOG.md index f8d0e7b6f..74cf9c504 100644 --- a/services/alb/CHANGELOG.md +++ b/services/alb/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.13.0 +- **Feature:** Add `ip_block_list_name` field to `LoadbalancerOptionAccessControl` model + ## v0.12.0 - **Feature:** Add new enum values `TYPE_FIP_NOT_FOUND`, `TYPE_IP_EXHAUSTED`, `TYPE_DNS_NOT_CONFIGURED` and `TYPE_VM_PORT_NOT_CONFIGURED` to `LoadBalancerError` model diff --git a/services/alb/oas_commit b/services/alb/oas_commit index 7d368bd2a..35b7f4140 100644 --- a/services/alb/oas_commit +++ b/services/alb/oas_commit @@ -1 +1 @@ -1deab1542e767cd08525dfd6c2cd0b65b9c923c3 +7e7c0c6d141ef436fa9dee1e9724936562b7d6da diff --git a/services/alb/pyproject.toml b/services/alb/pyproject.toml index ab71a3c00..cddcd50f3 100644 --- a/services/alb/pyproject.toml +++ b/services/alb/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "stackit-alb" -version = "v0.12.0" +version = "v0.13.0" description = "Application Load Balancer API" authors = [{ name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud" }] requires-python = ">=3.10,<4.0" diff --git a/services/alb/src/stackit/alb/models/loadbalancer_option_access_control.py b/services/alb/src/stackit/alb/models/loadbalancer_option_access_control.py index b5f5ff138..9da554579 100644 --- a/services/alb/src/stackit/alb/models/loadbalancer_option_access_control.py +++ b/services/alb/src/stackit/alb/models/loadbalancer_option_access_control.py @@ -15,24 +15,43 @@ 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 class LoadbalancerOptionAccessControl(BaseModel): """ - Use this option to limit the IP ranges that can use the Application Load Balancer. + Use this option to limit the IP ranges that can use the Application Load Balancer. `allowed_source_ranges` and `ip_block_list_name` may be set together. When both are set, `allowed_source_ranges` is evaluated first, then `ip_block_list_name` is evaluated. """ # noqa: E501 allowed_source_ranges: Optional[List[StrictStr]] = Field( default=None, - description="Application Load Balancer is accessible only from an IP address in this range", + description="Application Load Balancer is accessible only from an IP address in this range. May be combined with `ipBlockListName`; `allowedSourceRanges` is evaluated first, then `ipBlockListName`.", alias="allowedSourceRanges", ) - __properties: ClassVar[List[str]] = ["allowedSourceRanges"] + ip_block_list_name: Optional[Annotated[str, Field(strict=True)]] = Field( + default=None, + description='Reference to an IP block list by name. Traffic originating from any IP in the referenced list is denied access to the Application Load Balancer. See "IP Lists API" for how to manage IP block lists. May be combined with `allowedSourceRanges`; `allowedSourceRanges` is evaluated first, then `ipBlockListName`.', + alias="ipBlockListName", + ) + __properties: ClassVar[List[str]] = ["allowedSourceRanges", "ipBlockListName"] + + @field_validator("ip_block_list_name") + def ip_block_list_name_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"^[0-9a-z](?:(?:[0-9a-z]|-){0,49}[0-9a-z])?$", value): + raise ValueError(r"must validate the regular expression /^[0-9a-z](?:(?:[0-9a-z]|-){0,49}[0-9a-z])?$/") + return value model_config = ConfigDict( validate_by_name=True, @@ -82,5 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"allowedSourceRanges": obj.get("allowedSourceRanges")}) + _obj = cls.model_validate( + {"allowedSourceRanges": obj.get("allowedSourceRanges"), "ipBlockListName": obj.get("ipBlockListName")} + ) return _obj diff --git a/services/alb/uv.lock b/services/alb/uv.lock index e58b84cf5..d048baac3 100644 --- a/services/alb/uv.lock +++ b/services/alb/uv.lock @@ -1019,7 +1019,7 @@ wheels = [ [[package]] name = "stackit-alb" -version = "0.12.0" +version = "0.13.0" source = { editable = "." } dependencies = [ { name = "pydantic" },