From 643fa2fa26c72f0f9df3f64c352f021a47f39568 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 24 Sep 2025 15:06:34 +0000 Subject: [PATCH 1/2] Generate alb --- .../models/create_load_balancer_payload.py | 6 ++++++ .../alb/src/stackit/alb/models/listener.py | 19 ++++++++++++++++++- .../src/stackit/alb/models/load_balancer.py | 6 ++++++ .../models/update_load_balancer_payload.py | 6 ++++++ 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/services/alb/src/stackit/alb/models/create_load_balancer_payload.py b/services/alb/src/stackit/alb/models/create_load_balancer_payload.py index a870e3588..b5d6690f1 100644 --- a/services/alb/src/stackit/alb/models/create_load_balancer_payload.py +++ b/services/alb/src/stackit/alb/models/create_load_balancer_payload.py @@ -54,6 +54,10 @@ class CreateLoadBalancerPayload(BaseModel): description="External application load balancer IP address where this application load balancer is exposed. Not changeable after creation.", alias="externalAddress", ) + labels: Optional[Dict[str, StrictStr]] = Field( + default=None, + description="Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per ALB. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. ", + ) listeners: Optional[List[Listener]] = Field(default=None, description="There is a maximum listener count of 20. ") load_balancer_security_group: Optional[SecurityGroup] = Field( default=None, @@ -98,6 +102,7 @@ class CreateLoadBalancerPayload(BaseModel): "disableTargetSecurityGroupAssignment", "errors", "externalAddress", + "labels", "listeners", "loadBalancerSecurityGroup", "name", @@ -245,6 +250,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: else None ), "externalAddress": obj.get("externalAddress"), + "labels": obj.get("labels"), "listeners": ( [Listener.from_dict(_item) for _item in obj["listeners"]] if obj.get("listeners") is not None diff --git a/services/alb/src/stackit/alb/models/listener.py b/services/alb/src/stackit/alb/models/listener.py index a8a509a8c..1cd549de4 100644 --- a/services/alb/src/stackit/alb/models/listener.py +++ b/services/alb/src/stackit/alb/models/listener.py @@ -15,6 +15,7 @@ import json import pprint +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -42,7 +43,12 @@ class Listener(BaseModel): default=None, description="Protocol is the highest network protocol we understand to load balance. Currently PROTOCOL_HTTP and PROTOCOL_HTTPS are supported.", ) - __properties: ClassVar[List[str]] = ["http", "https", "name", "port", "protocol"] + waf_config_name: Optional[Annotated[str, Field(strict=True)]] = Field( + default=None, + description='Enable Web Application Firewall (WAF), referenced to a by name. See "Application Load Balancer - Web Application Firewall API" for more information.', + alias="wafConfigName", + ) + __properties: ClassVar[List[str]] = ["http", "https", "name", "port", "protocol", "wafConfigName"] @field_validator("protocol") def protocol_validate_enum(cls, value): @@ -54,6 +60,16 @@ def protocol_validate_enum(cls, value): raise ValueError("must be one of enum values ('PROTOCOL_UNSPECIFIED', 'PROTOCOL_HTTP', 'PROTOCOL_HTTPS')") return value + @field_validator("waf_config_name") + def waf_config_name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$", value): + raise ValueError(r"must validate the regular expression /^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$/") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -120,6 +136,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "port": obj.get("port"), "protocol": obj.get("protocol"), + "wafConfigName": obj.get("wafConfigName"), } ) return _obj diff --git a/services/alb/src/stackit/alb/models/load_balancer.py b/services/alb/src/stackit/alb/models/load_balancer.py index 5c98c76e5..cddc3af32 100644 --- a/services/alb/src/stackit/alb/models/load_balancer.py +++ b/services/alb/src/stackit/alb/models/load_balancer.py @@ -54,6 +54,10 @@ class LoadBalancer(BaseModel): description="External application load balancer IP address where this application load balancer is exposed. Not changeable after creation.", alias="externalAddress", ) + labels: Optional[Dict[str, StrictStr]] = Field( + default=None, + description="Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per ALB. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. ", + ) listeners: Optional[List[Listener]] = Field(default=None, description="There is a maximum listener count of 20. ") load_balancer_security_group: Optional[SecurityGroup] = Field( default=None, @@ -98,6 +102,7 @@ class LoadBalancer(BaseModel): "disableTargetSecurityGroupAssignment", "errors", "externalAddress", + "labels", "listeners", "loadBalancerSecurityGroup", "name", @@ -245,6 +250,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: else None ), "externalAddress": obj.get("externalAddress"), + "labels": obj.get("labels"), "listeners": ( [Listener.from_dict(_item) for _item in obj["listeners"]] if obj.get("listeners") is not None diff --git a/services/alb/src/stackit/alb/models/update_load_balancer_payload.py b/services/alb/src/stackit/alb/models/update_load_balancer_payload.py index c28d21240..a4bc21586 100644 --- a/services/alb/src/stackit/alb/models/update_load_balancer_payload.py +++ b/services/alb/src/stackit/alb/models/update_load_balancer_payload.py @@ -54,6 +54,10 @@ class UpdateLoadBalancerPayload(BaseModel): description="External application load balancer IP address where this application load balancer is exposed. Not changeable after creation.", alias="externalAddress", ) + labels: Optional[Dict[str, StrictStr]] = Field( + default=None, + description="Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per ALB. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. ", + ) listeners: Optional[List[Listener]] = Field(default=None, description="There is a maximum listener count of 20. ") load_balancer_security_group: Optional[SecurityGroup] = Field( default=None, @@ -98,6 +102,7 @@ class UpdateLoadBalancerPayload(BaseModel): "disableTargetSecurityGroupAssignment", "errors", "externalAddress", + "labels", "listeners", "loadBalancerSecurityGroup", "name", @@ -245,6 +250,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: else None ), "externalAddress": obj.get("externalAddress"), + "labels": obj.get("labels"), "listeners": ( [Listener.from_dict(_item) for _item in obj["listeners"]] if obj.get("listeners") is not None From aafed79a4e4257ac1d5b936cca555a050562b303 Mon Sep 17 00:00:00 2001 From: Ruben Hoenle Date: Wed, 24 Sep 2025 18:05:06 +0200 Subject: [PATCH 2/2] add changelog entries --- CHANGELOG.md | 3 +++ services/alb/CHANGELOG.md | 4 ++++ services/alb/pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8da3c373d..e4fba8b0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ - **Feature:** Added `PlanId` to `CatalogProductPricingOption` and `SubscriptionProduct` - `loadbalancer`: [v0.7.0](services/loadbalancer/CHANGELOG.md#v070) - **Feature**: Add new attribute `labels` to `LoadBalancer`, `CreateLoadBalancerPayload`, `UpdateLoadBalancerPayload` model classes +- `alb`: [v0.6.0](services/alb/CHANGELOG.md#v060) + - **Feature**: Add attribute `labels` to `LoadBalancer`, `CreateLoadBalancerPayload`, `UpdateLoadBalancerPayload` model classes + - **Feature**: Add attribute `waf_config_name` to `Listener` model class ## Release (2025-09-11) - `cdn`: [v1.6.0](services/cdn/CHANGELOG.md#v160) diff --git a/services/alb/CHANGELOG.md b/services/alb/CHANGELOG.md index dba3152e7..1e9637999 100644 --- a/services/alb/CHANGELOG.md +++ b/services/alb/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.6.0 +- **Feature**: Add attribute `labels` to `LoadBalancer`, `CreateLoadBalancerPayload`, `UpdateLoadBalancerPayload` model classes +- **Feature**: Add attribute `waf_config_name` to `Listener` model class + ## v0.5.0 - **Version**: Minimal version is now python 3.9 diff --git a/services/alb/pyproject.toml b/services/alb/pyproject.toml index b4fff3abb..7142f5ff2 100644 --- a/services/alb/pyproject.toml +++ b/services/alb/pyproject.toml @@ -3,7 +3,7 @@ name = "stackit-alb" [tool.poetry] name = "stackit-alb" -version = "v0.5.0" +version = "v0.6.0" authors = [ "STACKIT Developer Tools ", ]