Skip to content

Commit fc37164

Browse files
Generator: Update SDK /services/alb (#3110)
* Generate alb * Add changelogs Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> --------- Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> Co-authored-by: Alexander Dahmen <alexander.dahmen@inovex.de>
1 parent 891ddb4 commit fc37164

File tree

11 files changed

+44
-24
lines changed

11 files changed

+44
-24
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Release (2026-xx-xx)
22

3+
- `alb`: [v0.9.0](services/alb/CHANGELOG.md#v090)
4+
- **Feature:** Add new field `AltPort` to `ActiveHealthCheck`
5+
- **Feature:** Add new field `Tls` to `HttpHealthCheck`
6+
- **Breaking change:** Renamed `TargetPoolTlsConfig` to `TlsConfig`
37
- `sfs`: [v0.3.0](services/sfs/CHANGELOG.md#v030)
48
- **Breaking change:** The `name` and `spaceHardLimitGigabytes` fields are now marked as required for `ShareExportPayload`, `SharePayload`.
59
- `serviceaccount`: [v0.5.0](services/serviceaccount/CHANGELOG.md#v050)

services/alb/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v0.9.0
2+
- **Feature:** Add new field `AltPort` to `ActiveHealthCheck`
3+
- **Feature:** Add new field `Tls` to `HttpHealthCheck`
4+
- **Breaking change:** Renamed `TargetPoolTlsConfig` to `TlsConfig`
5+
16
## v0.8.1
27
- Update regular expressions to allow longer names
38

services/alb/oas_commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9916269dab33d42aa2f1a5f30c80b954b6c1221f
1+
10774896634990c655a523f5f0fabd6e2be9e216

services/alb/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-alb"
33

44
[tool.poetry]
55
name = "stackit-alb"
6-
version = "v0.8.1"
6+
version = "v0.9.0"
77
authors = [
88
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
99
]

services/alb/src/stackit/alb/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"Status",
6464
"Target",
6565
"TargetPool",
66-
"TargetPoolTlsConfig",
66+
"TlsConfig",
6767
"UpdateCredentialsPayload",
6868
"UpdateCredentialsResponse",
6969
"UpdateLoadBalancerPayload",
@@ -156,9 +156,7 @@
156156
from stackit.alb.models.status import Status as Status
157157
from stackit.alb.models.target import Target as Target
158158
from stackit.alb.models.target_pool import TargetPool as TargetPool
159-
from stackit.alb.models.target_pool_tls_config import (
160-
TargetPoolTlsConfig as TargetPoolTlsConfig,
161-
)
159+
from stackit.alb.models.tls_config import TlsConfig as TlsConfig
162160
from stackit.alb.models.update_credentials_payload import (
163161
UpdateCredentialsPayload as UpdateCredentialsPayload,
164162
)

services/alb/src/stackit/alb/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
from stackit.alb.models.status import Status
5454
from stackit.alb.models.target import Target
5555
from stackit.alb.models.target_pool import TargetPool
56-
from stackit.alb.models.target_pool_tls_config import TargetPoolTlsConfig
56+
from stackit.alb.models.tls_config import TlsConfig
5757
from stackit.alb.models.update_credentials_payload import UpdateCredentialsPayload
5858
from stackit.alb.models.update_credentials_response import UpdateCredentialsResponse
5959
from stackit.alb.models.update_load_balancer_payload import UpdateLoadBalancerPayload

services/alb/src/stackit/alb/models/active_health_check.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import re # noqa: F401
1919
from typing import Any, ClassVar, Dict, List, Optional, Set
2020

21-
from pydantic import BaseModel, ConfigDict, Field, field_validator
21+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator
2222
from typing_extensions import Annotated, Self
2323

2424
from stackit.alb.models.http_health_checks import HttpHealthChecks
@@ -29,6 +29,9 @@ class ActiveHealthCheck(BaseModel):
2929
Set this to customize active health checks for targets in this pool.
3030
""" # noqa: E501
3131

32+
alt_port: Optional[StrictInt] = Field(
33+
default=None, description="Overrides the default port used for health check probes.", alias="altPort"
34+
)
3235
healthy_threshold: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(
3336
default=None, description="Healthy threshold of the health checking", alias="healthyThreshold"
3437
)
@@ -48,6 +51,7 @@ class ActiveHealthCheck(BaseModel):
4851
default=None, description="Unhealthy threshold of the health checking", alias="unhealthyThreshold"
4952
)
5053
__properties: ClassVar[List[str]] = [
54+
"altPort",
5155
"healthyThreshold",
5256
"httpHealthChecks",
5357
"interval",
@@ -139,6 +143,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
139143

140144
_obj = cls.model_validate(
141145
{
146+
"altPort": obj.get("altPort"),
142147
"healthyThreshold": obj.get("healthyThreshold"),
143148
"httpHealthChecks": (
144149
HttpHealthChecks.from_dict(obj["httpHealthChecks"])

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
from pydantic import BaseModel, ConfigDict, Field, StrictStr
2121
from typing_extensions import Self
2222

23+
from stackit.alb.models.tls_config import TlsConfig
24+
2325

2426
class HttpHealthChecks(BaseModel):
2527
"""
@@ -30,7 +32,8 @@ class HttpHealthChecks(BaseModel):
3032
default=None, description="List of HTTP status codes that indicate a healthy response", alias="okStatuses"
3133
)
3234
path: Optional[StrictStr] = Field(default=None, description="Path to send the health check request to")
33-
__properties: ClassVar[List[str]] = ["okStatuses", "path"]
35+
tls: Optional[TlsConfig] = None
36+
__properties: ClassVar[List[str]] = ["okStatuses", "path", "tls"]
3437

3538
model_config = ConfigDict(
3639
populate_by_name=True,
@@ -69,6 +72,9 @@ def to_dict(self) -> Dict[str, Any]:
6972
exclude=excluded_fields,
7073
exclude_none=True,
7174
)
75+
# override the default output from pydantic by calling `to_dict()` of tls
76+
if self.tls:
77+
_dict["tls"] = self.tls.to_dict()
7278
return _dict
7379

7480
@classmethod
@@ -80,5 +86,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
8086
if not isinstance(obj, dict):
8187
return cls.model_validate(obj)
8288

83-
_obj = cls.model_validate({"okStatuses": obj.get("okStatuses"), "path": obj.get("path")})
89+
_obj = cls.model_validate(
90+
{
91+
"okStatuses": obj.get("okStatuses"),
92+
"path": obj.get("path"),
93+
"tls": TlsConfig.from_dict(obj["tls"]) if obj.get("tls") is not None else None,
94+
}
95+
)
8496
return _obj

services/alb/src/stackit/alb/models/target_pool.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
from stackit.alb.models.active_health_check import ActiveHealthCheck
2525
from stackit.alb.models.target import Target
26-
from stackit.alb.models.target_pool_tls_config import TargetPoolTlsConfig
26+
from stackit.alb.models.tls_config import TlsConfig
2727

2828

2929
class TargetPool(BaseModel):
@@ -41,7 +41,7 @@ class TargetPool(BaseModel):
4141
targets: Optional[List[Target]] = Field(
4242
default=None, description="List of all targets which will be used in the pool. Limited to 250."
4343
)
44-
tls_config: Optional[TargetPoolTlsConfig] = Field(default=None, alias="tlsConfig")
44+
tls_config: Optional[TlsConfig] = Field(default=None, alias="tlsConfig")
4545
__properties: ClassVar[List[str]] = ["activeHealthCheck", "name", "targetPort", "targets", "tlsConfig"]
4646

4747
@field_validator("name")
@@ -127,9 +127,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
127127
"targets": (
128128
[Target.from_dict(_item) for _item in obj["targets"]] if obj.get("targets") is not None else None
129129
),
130-
"tlsConfig": (
131-
TargetPoolTlsConfig.from_dict(obj["tlsConfig"]) if obj.get("tlsConfig") is not None else None
132-
),
130+
"tlsConfig": TlsConfig.from_dict(obj["tlsConfig"]) if obj.get("tlsConfig") is not None else None,
133131
}
134132
)
135133
return _obj

services/alb/src/stackit/alb/models/target_pool_tls_config.py renamed to services/alb/src/stackit/alb/models/tls_config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
from typing_extensions import Self
2828

2929

30-
class TargetPoolTlsConfig(BaseModel):
30+
class TlsConfig(BaseModel):
3131
"""
32-
TLSConfig used for the target pool.
32+
Set this to configure TLS settings.
3333
""" # noqa: E501
3434

3535
custom_ca: Optional[StrictStr] = Field(
@@ -65,7 +65,7 @@ def to_json(self) -> str:
6565

6666
@classmethod
6767
def from_json(cls, json_str: str) -> Optional[Self]:
68-
"""Create an instance of TargetPoolTlsConfig from a JSON string"""
68+
"""Create an instance of TlsConfig from a JSON string"""
6969
return cls.from_dict(json.loads(json_str))
7070

7171
def to_dict(self) -> Dict[str, Any]:
@@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]:
8989

9090
@classmethod
9191
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
92-
"""Create an instance of TargetPoolTlsConfig from a dict"""
92+
"""Create an instance of TlsConfig from a dict"""
9393
if obj is None:
9494
return None
9595

0 commit comments

Comments
 (0)