diff --git a/CHANGELOG.md b/CHANGELOG.md index 14b9945d..928ab448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,11 @@ - `MachineType` - Set max length of description of `Network` to 255 - Update the description of `Server` and `CreateServerPayload` status field to include new possible value `PAUSED` -- `loadbalanccer`: [v0.3.0](services/loadbalancer/CHANGELOG.md#v030-2025-06-10) - - **Feature:** Add new field `target_security_group` in `LoadBalancer` Model +- `loadbalancer`: + - [v0.4.0](services/loadbalancer/CHANGELOG.md#v040-2025-06-12) + - **Feature:** Add new field `disable_target_security_group_assignment` in `LoadBalancer`, `CreateLoadBalancerPayload` and `UpdateLoadBalancerPayload` Models + - [v0.3.0](services/loadbalancer/CHANGELOG.md#v030-2025-06-10) + - **Feature:** Add new field `target_security_group` in `LoadBalancer` Model - `resourcemanager`: [v0.5.0](services/resourcemanager/CHANGELOG.md#v050-2025-06-04) - **Feature:** Delete Organization labels using the new method `DeleteOrganizationLabels` - **Feature:** Delete Project labels using the new method `DeleteProjectLabels` diff --git a/services/loadbalancer/CHANGELOG.md b/services/loadbalancer/CHANGELOG.md index b8c57ba3..99f41374 100644 --- a/services/loadbalancer/CHANGELOG.md +++ b/services/loadbalancer/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.4.0 (2025-06-12) +- **Feature:** Add new field `disable_target_security_group_assignment` in `LoadBalancer`, `CreateLoadBalancerPayload` and `UpdateLoadBalancerPayload` Models + ## v0.3.0 (2025-06-10) - **Feature:** Add new field `target_security_group` in `LoadBalancer` Model diff --git a/services/loadbalancer/pyproject.toml b/services/loadbalancer/pyproject.toml index 0c3eac61..58cbc4ab 100644 --- a/services/loadbalancer/pyproject.toml +++ b/services/loadbalancer/pyproject.toml @@ -3,7 +3,7 @@ name = "stackit-loadbalancer" [tool.poetry] name = "stackit-loadbalancer" -version = "v0.3.0" +version = "v0.4.0" authors = [ "STACKIT Developer Tools ", ] diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/create_load_balancer_payload.py b/services/loadbalancer/src/stackit/loadbalancer/models/create_load_balancer_payload.py index 68470ac9..9102b893 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/create_load_balancer_payload.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/create_load_balancer_payload.py @@ -18,7 +18,14 @@ import re from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) from typing_extensions import Annotated, Self from stackit.loadbalancer.models.listener import Listener @@ -34,6 +41,11 @@ class CreateLoadBalancerPayload(BaseModel): CreateLoadBalancerPayload """ + disable_target_security_group_assignment: Optional[StrictBool] = Field( + default=None, + description="Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation.", + alias="disableTargetSecurityGroupAssignment", + ) errors: Optional[List[LoadBalancerError]] = Field( default=None, description="Reports all errors a load balancer has." ) @@ -73,7 +85,7 @@ class CreateLoadBalancerPayload(BaseModel): ) target_security_group: Optional[SecurityGroup] = Field( default=None, - description="Security Group permitting network traffic from the LoadBalancer to the targets.", + description="Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets.", alias="targetSecurityGroup", ) version: Optional[StrictStr] = Field( @@ -81,6 +93,7 @@ class CreateLoadBalancerPayload(BaseModel): description="Load balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this load balancer resource that changes during updates of the load balancers. On updates this field specified the load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case.", ) __properties: ClassVar[List[str]] = [ + "disableTargetSecurityGroupAssignment", "errors", "externalAddress", "listeners", @@ -217,6 +230,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { + "disableTargetSecurityGroupAssignment": obj.get("disableTargetSecurityGroupAssignment"), "errors": ( [LoadBalancerError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer.py b/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer.py index 4dc76d84..bfc94782 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer.py @@ -18,7 +18,14 @@ import re from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) from typing_extensions import Annotated, Self from stackit.loadbalancer.models.listener import Listener @@ -34,6 +41,11 @@ class LoadBalancer(BaseModel): LoadBalancer """ + disable_target_security_group_assignment: Optional[StrictBool] = Field( + default=None, + description="Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation.", + alias="disableTargetSecurityGroupAssignment", + ) errors: Optional[List[LoadBalancerError]] = Field( default=None, description="Reports all errors a load balancer has." ) @@ -73,7 +85,7 @@ class LoadBalancer(BaseModel): ) target_security_group: Optional[SecurityGroup] = Field( default=None, - description="Security Group permitting network traffic from the LoadBalancer to the targets.", + description="Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets.", alias="targetSecurityGroup", ) version: Optional[StrictStr] = Field( @@ -81,6 +93,7 @@ class LoadBalancer(BaseModel): description="Load balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this load balancer resource that changes during updates of the load balancers. On updates this field specified the load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case.", ) __properties: ClassVar[List[str]] = [ + "disableTargetSecurityGroupAssignment", "errors", "externalAddress", "listeners", @@ -217,6 +230,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { + "disableTargetSecurityGroupAssignment": obj.get("disableTargetSecurityGroupAssignment"), "errors": ( [LoadBalancerError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/update_load_balancer_payload.py b/services/loadbalancer/src/stackit/loadbalancer/models/update_load_balancer_payload.py index d4d324d2..6bdd9430 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/update_load_balancer_payload.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/update_load_balancer_payload.py @@ -18,7 +18,14 @@ import re from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) from typing_extensions import Annotated, Self from stackit.loadbalancer.models.listener import Listener @@ -34,6 +41,11 @@ class UpdateLoadBalancerPayload(BaseModel): UpdateLoadBalancerPayload """ + disable_target_security_group_assignment: Optional[StrictBool] = Field( + default=None, + description="Disable target security group assignemt to allow targets outside of the given network. Connectivity to targets need to be ensured by the customer, including routing and Security Groups (targetSecurityGroup can be assigned). Not changeable after creation.", + alias="disableTargetSecurityGroupAssignment", + ) errors: Optional[List[LoadBalancerError]] = Field( default=None, description="Reports all errors a load balancer has." ) @@ -73,7 +85,7 @@ class UpdateLoadBalancerPayload(BaseModel): ) target_security_group: Optional[SecurityGroup] = Field( default=None, - description="Security Group permitting network traffic from the LoadBalancer to the targets.", + description="Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets.", alias="targetSecurityGroup", ) version: Optional[StrictStr] = Field( @@ -81,6 +93,7 @@ class UpdateLoadBalancerPayload(BaseModel): description="Load balancer resource version. Must be empty or unset for creating load balancers, non-empty for updating load balancers. Semantics: While retrieving load balancers, this is the current version of this load balancer resource that changes during updates of the load balancers. On updates this field specified the load balancer version you calculated your update for instead of the future version to enable concurrency safe updates. Update calls will then report the new version in their result as you would see with a load balancer retrieval call later. There exist no total order of the version, so you can only compare it for equality, but not for less/greater than another version. Since the creation of load balancer is always intended to create the first version of it, there should be no existing version. That's why this field must by empty of not present in that case.", ) __properties: ClassVar[List[str]] = [ + "disableTargetSecurityGroupAssignment", "errors", "externalAddress", "listeners", @@ -217,6 +230,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { + "disableTargetSecurityGroupAssignment": obj.get("disableTargetSecurityGroupAssignment"), "errors": ( [LoadBalancerError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None