Skip to content

Commit 35826c1

Browse files
Generate loadbalancer
1 parent dd986d0 commit 35826c1

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

services/loadbalancer/src/stackit/loadbalancer/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 load balancer IP address where this 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 LB. **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(
5862
default=None,
5963
description="There is a maximum listener count of 20. Port and protocol limitations: - UDP listeners cannot have the same port. - TCP-derived listeners cannot have the same port. A TCP-derived listener is any listener that listens on a TCP port. As of now those are: TCP, TCP_PROXY, and PROTOCOL_TLS_PASSTHROUGH. The only exception is, if all listeners for the same port are PROTOCOL_TLS_PASSTHROUGH. - PROTOCOL_TLS_PASSTHROUGH listeners cannot have the same port and at least one common domain name. - PROTOCOL_TLS_PASSTHROUGH listeners can have the same domain name and different ports though (e.g. ports 443 and 8443 for domain example.com). - PROTOCOL_TLS_PASSTHROUGH listeners without a domain name serve as a default listener and you can have only one default listener. ",
@@ -101,6 +105,7 @@ class CreateLoadBalancerPayload(BaseModel):
101105
"disableTargetSecurityGroupAssignment",
102106
"errors",
103107
"externalAddress",
108+
"labels",
104109
"listeners",
105110
"loadBalancerSecurityGroup",
106111
"name",
@@ -248,6 +253,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
248253
else None
249254
),
250255
"externalAddress": obj.get("externalAddress"),
256+
"labels": obj.get("labels"),
251257
"listeners": (
252258
[Listener.from_dict(_item) for _item in obj["listeners"]]
253259
if obj.get("listeners") is not None

services/loadbalancer/src/stackit/loadbalancer/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 load balancer IP address where this 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 LB. **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(
5862
default=None,
5963
description="There is a maximum listener count of 20. Port and protocol limitations: - UDP listeners cannot have the same port. - TCP-derived listeners cannot have the same port. A TCP-derived listener is any listener that listens on a TCP port. As of now those are: TCP, TCP_PROXY, and PROTOCOL_TLS_PASSTHROUGH. The only exception is, if all listeners for the same port are PROTOCOL_TLS_PASSTHROUGH. - PROTOCOL_TLS_PASSTHROUGH listeners cannot have the same port and at least one common domain name. - PROTOCOL_TLS_PASSTHROUGH listeners can have the same domain name and different ports though (e.g. ports 443 and 8443 for domain example.com). - PROTOCOL_TLS_PASSTHROUGH listeners without a domain name serve as a default listener and you can have only one default listener. ",
@@ -101,6 +105,7 @@ class LoadBalancer(BaseModel):
101105
"disableTargetSecurityGroupAssignment",
102106
"errors",
103107
"externalAddress",
108+
"labels",
104109
"listeners",
105110
"loadBalancerSecurityGroup",
106111
"name",
@@ -248,6 +253,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
248253
else None
249254
),
250255
"externalAddress": obj.get("externalAddress"),
256+
"labels": obj.get("labels"),
251257
"listeners": (
252258
[Listener.from_dict(_item) for _item in obj["listeners"]]
253259
if obj.get("listeners") is not None

services/loadbalancer/src/stackit/loadbalancer/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 load balancer IP address where this 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 LB. **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(
5862
default=None,
5963
description="There is a maximum listener count of 20. Port and protocol limitations: - UDP listeners cannot have the same port. - TCP-derived listeners cannot have the same port. A TCP-derived listener is any listener that listens on a TCP port. As of now those are: TCP, TCP_PROXY, and PROTOCOL_TLS_PASSTHROUGH. The only exception is, if all listeners for the same port are PROTOCOL_TLS_PASSTHROUGH. - PROTOCOL_TLS_PASSTHROUGH listeners cannot have the same port and at least one common domain name. - PROTOCOL_TLS_PASSTHROUGH listeners can have the same domain name and different ports though (e.g. ports 443 and 8443 for domain example.com). - PROTOCOL_TLS_PASSTHROUGH listeners without a domain name serve as a default listener and you can have only one default listener. ",
@@ -101,6 +105,7 @@ class UpdateLoadBalancerPayload(BaseModel):
101105
"disableTargetSecurityGroupAssignment",
102106
"errors",
103107
"externalAddress",
108+
"labels",
104109
"listeners",
105110
"loadBalancerSecurityGroup",
106111
"name",
@@ -248,6 +253,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
248253
else None
249254
),
250255
"externalAddress": obj.get("externalAddress"),
256+
"labels": obj.get("labels"),
251257
"listeners": (
252258
[Listener.from_dict(_item) for _item in obj["listeners"]]
253259
if obj.get("listeners") is not None

0 commit comments

Comments
 (0)