Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb655eaf

Browse files
Generator: Update SDK /services/alb (#2331)
Co-authored-by: Ruben Hoenle <Ruben.Hoenle@stackit.cloud>
1 parent5b68cbe commitb655eaf

File tree

7 files changed

+44
-2
lines changed

7 files changed

+44
-2
lines changed

‎CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
-**Feature**: Add support for instance patch operation
2525
-`loadbalancer`:[v0.7.0](services/loadbalancer/CHANGELOG.md#v070)
2626
-**Feature**: Add new attribute`labels` to`LoadBalancer`,`CreateLoadBalancerPayload`,`UpdateLoadBalancerPayload` model classes
27+
-`alb`:[v0.6.0](services/alb/CHANGELOG.md#v060)
28+
-**Feature:** Add attribute`labels` to`LoadBalancer`,`CreateLoadBalancerPayload` and`UpdateLoadBalancerPayload` model classes
29+
-**Feature:** Add attribute`waf_config_name` to`Listener` model class
2730

2831
##Release (2025-09-11)
2932
-`cdn`:[v1.6.0](services/cdn/CHANGELOG.md#v160)

‎services/alb/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
##v0.6.0
2+
-**Feature:** Add attribute`labels` to`LoadBalancer`,`CreateLoadBalancerPayload` and`UpdateLoadBalancerPayload` model classes
3+
-**Feature:** Add attribute`waf_config_name` to`Listener` model class
4+
15
##v0.5.0
26
-**Version**: Minimal version is now python 3.9
37

‎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.5.0"
6+
version ="v0.6.0"
77
authors = [
88
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
99
]

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ class CreateLoadBalancerPayload(BaseModel):
5454
description="External application load balancer IP address where this application load balancer is exposed. Not changeable after creation.",
5555
alias="externalAddress",
5656
)
57+
labels:Optional[Dict[str,StrictStr]]=Field(
58+
default=None,
59+
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. ",
60+
)
5761
listeners:Optional[List[Listener]]=Field(default=None,description="There is a maximum listener count of 20. ")
5862
load_balancer_security_group:Optional[SecurityGroup]=Field(
5963
default=None,
@@ -98,6 +102,7 @@ class CreateLoadBalancerPayload(BaseModel):
98102
"disableTargetSecurityGroupAssignment",
99103
"errors",
100104
"externalAddress",
105+
"labels",
101106
"listeners",
102107
"loadBalancerSecurityGroup",
103108
"name",
@@ -245,6 +250,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
245250
elseNone
246251
),
247252
"externalAddress":obj.get("externalAddress"),
253+
"labels":obj.get("labels"),
248254
"listeners": (
249255
[Listener.from_dict(_item)for_iteminobj["listeners"]]
250256
ifobj.get("listeners")isnotNone

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
importjson
1717
importpprint
18+
importre# noqa: F401
1819
fromtypingimportAny,ClassVar,Dict,List,Optional,Set
1920

2021
frompydanticimportBaseModel,ConfigDict,Field,StrictStr,field_validator
@@ -42,7 +43,12 @@ class Listener(BaseModel):
4243
default=None,
4344
description="Protocol is the highest network protocol we understand to load balance. Currently PROTOCOL_HTTP and PROTOCOL_HTTPS are supported.",
4445
)
45-
__properties:ClassVar[List[str]]= ["http","https","name","port","protocol"]
46+
waf_config_name:Optional[Annotated[str,Field(strict=True)]]=Field(
47+
default=None,
48+
description='Enable Web Application Firewall (WAF), referenced to a by name. See "Application Load Balancer - Web Application Firewall API" for more information.',
49+
alias="wafConfigName",
50+
)
51+
__properties:ClassVar[List[str]]= ["http","https","name","port","protocol","wafConfigName"]
4652

4753
@field_validator("protocol")
4854
defprotocol_validate_enum(cls,value):
@@ -54,6 +60,16 @@ def protocol_validate_enum(cls, value):
5460
raiseValueError("must be one of enum values ('PROTOCOL_UNSPECIFIED', 'PROTOCOL_HTTP', 'PROTOCOL_HTTPS')")
5561
returnvalue
5662

63+
@field_validator("waf_config_name")
64+
defwaf_config_name_validate_regular_expression(cls,value):
65+
"""Validates the regular expression"""
66+
ifvalueisNone:
67+
returnvalue
68+
69+
ifnotre.match(r"^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$",value):
70+
raiseValueError(r"must validate the regular expression /^[0-9a-z](?:(?:[0-9a-z]|-){0,61}[0-9a-z])?$/")
71+
returnvalue
72+
5773
model_config=ConfigDict(
5874
populate_by_name=True,
5975
validate_assignment=True,
@@ -120,6 +136,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
120136
"name":obj.get("name"),
121137
"port":obj.get("port"),
122138
"protocol":obj.get("protocol"),
139+
"wafConfigName":obj.get("wafConfigName"),
123140
}
124141
)
125142
return_obj

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ class LoadBalancer(BaseModel):
5454
description="External application load balancer IP address where this application load balancer is exposed. Not changeable after creation.",
5555
alias="externalAddress",
5656
)
57+
labels:Optional[Dict[str,StrictStr]]=Field(
58+
default=None,
59+
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. ",
60+
)
5761
listeners:Optional[List[Listener]]=Field(default=None,description="There is a maximum listener count of 20. ")
5862
load_balancer_security_group:Optional[SecurityGroup]=Field(
5963
default=None,
@@ -98,6 +102,7 @@ class LoadBalancer(BaseModel):
98102
"disableTargetSecurityGroupAssignment",
99103
"errors",
100104
"externalAddress",
105+
"labels",
101106
"listeners",
102107
"loadBalancerSecurityGroup",
103108
"name",
@@ -245,6 +250,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
245250
elseNone
246251
),
247252
"externalAddress":obj.get("externalAddress"),
253+
"labels":obj.get("labels"),
248254
"listeners": (
249255
[Listener.from_dict(_item)for_iteminobj["listeners"]]
250256
ifobj.get("listeners")isnotNone

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ class UpdateLoadBalancerPayload(BaseModel):
5454
description="External application load balancer IP address where this application load balancer is exposed. Not changeable after creation.",
5555
alias="externalAddress",
5656
)
57+
labels:Optional[Dict[str,StrictStr]]=Field(
58+
default=None,
59+
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. ",
60+
)
5761
listeners:Optional[List[Listener]]=Field(default=None,description="There is a maximum listener count of 20. ")
5862
load_balancer_security_group:Optional[SecurityGroup]=Field(
5963
default=None,
@@ -98,6 +102,7 @@ class UpdateLoadBalancerPayload(BaseModel):
98102
"disableTargetSecurityGroupAssignment",
99103
"errors",
100104
"externalAddress",
105+
"labels",
101106
"listeners",
102107
"loadBalancerSecurityGroup",
103108
"name",
@@ -245,6 +250,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
245250
elseNone
246251
),
247252
"externalAddress":obj.get("externalAddress"),
253+
"labels":obj.get("labels"),
248254
"listeners": (
249255
[Listener.from_dict(_item)for_iteminobj["listeners"]]
250256
ifobj.get("listeners")isnotNone

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp