stackit-loadbalancer 0.2.4__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/PKG-INFO +1 -1
  2. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/pyproject.toml +1 -1
  3. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/__init__.py +1 -0
  4. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/__init__.py +1 -0
  5. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/create_load_balancer_payload.py +32 -1
  6. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/load_balancer.py +32 -1
  7. stackit_loadbalancer-0.4.0/src/stackit/loadbalancer/models/security_group.py +82 -0
  8. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/update_load_balancer_payload.py +32 -1
  9. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/LICENSE.md +0 -0
  10. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/NOTICE.txt +0 -0
  11. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/README.md +0 -0
  12. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/api/__init__.py +0 -0
  13. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/api/default_api.py +0 -0
  14. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/api_client.py +0 -0
  15. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/api_response.py +0 -0
  16. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/configuration.py +0 -0
  17. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/exceptions.py +0 -0
  18. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/active_health_check.py +0 -0
  19. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/create_credentials_payload.py +0 -0
  20. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/create_credentials_response.py +0 -0
  21. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/credentials_response.py +0 -0
  22. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/get_credentials_response.py +0 -0
  23. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/get_quota_response.py +0 -0
  24. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/google_protobuf_any.py +0 -0
  25. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/list_credentials_response.py +0 -0
  26. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/list_load_balancers_response.py +0 -0
  27. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/list_plans_response.py +0 -0
  28. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/listener.py +0 -0
  29. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/load_balancer_error.py +0 -0
  30. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/load_balancer_options.py +0 -0
  31. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/loadbalancer_option_access_control.py +0 -0
  32. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/loadbalancer_option_logs.py +0 -0
  33. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/loadbalancer_option_metrics.py +0 -0
  34. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/loadbalancer_option_observability.py +0 -0
  35. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/network.py +0 -0
  36. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/options_tcp.py +0 -0
  37. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/options_udp.py +0 -0
  38. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/plan_details.py +0 -0
  39. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/server_name_indicator.py +0 -0
  40. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/session_persistence.py +0 -0
  41. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/status.py +0 -0
  42. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/target.py +0 -0
  43. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/target_pool.py +0 -0
  44. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/update_credentials_payload.py +0 -0
  45. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/update_credentials_response.py +0 -0
  46. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/models/update_target_pool_payload.py +0 -0
  47. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/py.typed +0 -0
  48. {stackit_loadbalancer-0.2.4 → stackit_loadbalancer-0.4.0}/src/stackit/loadbalancer/rest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stackit-loadbalancer
3
- Version: 0.2.4
3
+ Version: 0.4.0
4
4
  Summary: Load Balancer API
5
5
  Author: STACKIT Developer Tools
6
6
  Author-email: developer-tools@stackit.cloud
@@ -3,7 +3,7 @@ name = "stackit-loadbalancer"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "stackit-loadbalancer"
6
- version = "v0.2.4"
6
+ version = "v0.4.0"
7
7
  authors = [
8
8
  "STACKIT Developer Tools <developer-tools@stackit.cloud>",
9
9
  ]
@@ -72,6 +72,7 @@ from stackit.loadbalancer.models.network import Network
72
72
  from stackit.loadbalancer.models.options_tcp import OptionsTCP
73
73
  from stackit.loadbalancer.models.options_udp import OptionsUDP
74
74
  from stackit.loadbalancer.models.plan_details import PlanDetails
75
+ from stackit.loadbalancer.models.security_group import SecurityGroup
75
76
  from stackit.loadbalancer.models.server_name_indicator import ServerNameIndicator
76
77
  from stackit.loadbalancer.models.session_persistence import SessionPersistence
77
78
  from stackit.loadbalancer.models.status import Status
@@ -53,6 +53,7 @@ from stackit.loadbalancer.models.network import Network
53
53
  from stackit.loadbalancer.models.options_tcp import OptionsTCP
54
54
  from stackit.loadbalancer.models.options_udp import OptionsUDP
55
55
  from stackit.loadbalancer.models.plan_details import PlanDetails
56
+ from stackit.loadbalancer.models.security_group import SecurityGroup
56
57
  from stackit.loadbalancer.models.server_name_indicator import ServerNameIndicator
57
58
  from stackit.loadbalancer.models.session_persistence import SessionPersistence
58
59
  from stackit.loadbalancer.models.status import Status
@@ -18,13 +18,21 @@ import pprint
18
18
  import re
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
+ from pydantic import (
22
+ BaseModel,
23
+ ConfigDict,
24
+ Field,
25
+ StrictBool,
26
+ StrictStr,
27
+ field_validator,
28
+ )
22
29
  from typing_extensions import Annotated, Self
23
30
 
24
31
  from stackit.loadbalancer.models.listener import Listener
25
32
  from stackit.loadbalancer.models.load_balancer_error import LoadBalancerError
26
33
  from stackit.loadbalancer.models.load_balancer_options import LoadBalancerOptions
27
34
  from stackit.loadbalancer.models.network import Network
35
+ from stackit.loadbalancer.models.security_group import SecurityGroup
28
36
  from stackit.loadbalancer.models.target_pool import TargetPool
29
37
 
30
38
 
@@ -33,6 +41,11 @@ class CreateLoadBalancerPayload(BaseModel):
33
41
  CreateLoadBalancerPayload
34
42
  """
35
43
 
44
+ disable_target_security_group_assignment: Optional[StrictBool] = Field(
45
+ default=None,
46
+ 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.",
47
+ alias="disableTargetSecurityGroupAssignment",
48
+ )
36
49
  errors: Optional[List[LoadBalancerError]] = Field(
37
50
  default=None, description="Reports all errors a load balancer has."
38
51
  )
@@ -70,11 +83,17 @@ class CreateLoadBalancerPayload(BaseModel):
70
83
  description="List of all target pools which will be used in the load balancer. Limited to 20.",
71
84
  alias="targetPools",
72
85
  )
86
+ target_security_group: Optional[SecurityGroup] = Field(
87
+ default=None,
88
+ description="Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets.",
89
+ alias="targetSecurityGroup",
90
+ )
73
91
  version: Optional[StrictStr] = Field(
74
92
  default=None,
75
93
  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.",
76
94
  )
77
95
  __properties: ClassVar[List[str]] = [
96
+ "disableTargetSecurityGroupAssignment",
78
97
  "errors",
79
98
  "externalAddress",
80
99
  "listeners",
@@ -86,6 +105,7 @@ class CreateLoadBalancerPayload(BaseModel):
86
105
  "region",
87
106
  "status",
88
107
  "targetPools",
108
+ "targetSecurityGroup",
89
109
  "version",
90
110
  ]
91
111
 
@@ -146,6 +166,7 @@ class CreateLoadBalancerPayload(BaseModel):
146
166
  * OpenAPI `readOnly` fields are excluded.
147
167
  * OpenAPI `readOnly` fields are excluded.
148
168
  * OpenAPI `readOnly` fields are excluded.
169
+ * OpenAPI `readOnly` fields are excluded.
149
170
  """
150
171
  excluded_fields: Set[str] = set(
151
172
  [
@@ -153,6 +174,7 @@ class CreateLoadBalancerPayload(BaseModel):
153
174
  "private_address",
154
175
  "region",
155
176
  "status",
177
+ "target_security_group",
156
178
  ]
157
179
  )
158
180
 
@@ -192,6 +214,9 @@ class CreateLoadBalancerPayload(BaseModel):
192
214
  if _item:
193
215
  _items.append(_item.to_dict())
194
216
  _dict["targetPools"] = _items
217
+ # override the default output from pydantic by calling `to_dict()` of target_security_group
218
+ if self.target_security_group:
219
+ _dict["targetSecurityGroup"] = self.target_security_group.to_dict()
195
220
  return _dict
196
221
 
197
222
  @classmethod
@@ -205,6 +230,7 @@ class CreateLoadBalancerPayload(BaseModel):
205
230
 
206
231
  _obj = cls.model_validate(
207
232
  {
233
+ "disableTargetSecurityGroupAssignment": obj.get("disableTargetSecurityGroupAssignment"),
208
234
  "errors": (
209
235
  [LoadBalancerError.from_dict(_item) for _item in obj["errors"]]
210
236
  if obj.get("errors") is not None
@@ -230,6 +256,11 @@ class CreateLoadBalancerPayload(BaseModel):
230
256
  if obj.get("targetPools") is not None
231
257
  else None
232
258
  ),
259
+ "targetSecurityGroup": (
260
+ SecurityGroup.from_dict(obj["targetSecurityGroup"])
261
+ if obj.get("targetSecurityGroup") is not None
262
+ else None
263
+ ),
233
264
  "version": obj.get("version"),
234
265
  }
235
266
  )
@@ -18,13 +18,21 @@ import pprint
18
18
  import re
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
+ from pydantic import (
22
+ BaseModel,
23
+ ConfigDict,
24
+ Field,
25
+ StrictBool,
26
+ StrictStr,
27
+ field_validator,
28
+ )
22
29
  from typing_extensions import Annotated, Self
23
30
 
24
31
  from stackit.loadbalancer.models.listener import Listener
25
32
  from stackit.loadbalancer.models.load_balancer_error import LoadBalancerError
26
33
  from stackit.loadbalancer.models.load_balancer_options import LoadBalancerOptions
27
34
  from stackit.loadbalancer.models.network import Network
35
+ from stackit.loadbalancer.models.security_group import SecurityGroup
28
36
  from stackit.loadbalancer.models.target_pool import TargetPool
29
37
 
30
38
 
@@ -33,6 +41,11 @@ class LoadBalancer(BaseModel):
33
41
  LoadBalancer
34
42
  """
35
43
 
44
+ disable_target_security_group_assignment: Optional[StrictBool] = Field(
45
+ default=None,
46
+ 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.",
47
+ alias="disableTargetSecurityGroupAssignment",
48
+ )
36
49
  errors: Optional[List[LoadBalancerError]] = Field(
37
50
  default=None, description="Reports all errors a load balancer has."
38
51
  )
@@ -70,11 +83,17 @@ class LoadBalancer(BaseModel):
70
83
  description="List of all target pools which will be used in the load balancer. Limited to 20.",
71
84
  alias="targetPools",
72
85
  )
86
+ target_security_group: Optional[SecurityGroup] = Field(
87
+ default=None,
88
+ description="Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets.",
89
+ alias="targetSecurityGroup",
90
+ )
73
91
  version: Optional[StrictStr] = Field(
74
92
  default=None,
75
93
  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.",
76
94
  )
77
95
  __properties: ClassVar[List[str]] = [
96
+ "disableTargetSecurityGroupAssignment",
78
97
  "errors",
79
98
  "externalAddress",
80
99
  "listeners",
@@ -86,6 +105,7 @@ class LoadBalancer(BaseModel):
86
105
  "region",
87
106
  "status",
88
107
  "targetPools",
108
+ "targetSecurityGroup",
89
109
  "version",
90
110
  ]
91
111
 
@@ -146,6 +166,7 @@ class LoadBalancer(BaseModel):
146
166
  * OpenAPI `readOnly` fields are excluded.
147
167
  * OpenAPI `readOnly` fields are excluded.
148
168
  * OpenAPI `readOnly` fields are excluded.
169
+ * OpenAPI `readOnly` fields are excluded.
149
170
  """
150
171
  excluded_fields: Set[str] = set(
151
172
  [
@@ -153,6 +174,7 @@ class LoadBalancer(BaseModel):
153
174
  "private_address",
154
175
  "region",
155
176
  "status",
177
+ "target_security_group",
156
178
  ]
157
179
  )
158
180
 
@@ -192,6 +214,9 @@ class LoadBalancer(BaseModel):
192
214
  if _item:
193
215
  _items.append(_item.to_dict())
194
216
  _dict["targetPools"] = _items
217
+ # override the default output from pydantic by calling `to_dict()` of target_security_group
218
+ if self.target_security_group:
219
+ _dict["targetSecurityGroup"] = self.target_security_group.to_dict()
195
220
  return _dict
196
221
 
197
222
  @classmethod
@@ -205,6 +230,7 @@ class LoadBalancer(BaseModel):
205
230
 
206
231
  _obj = cls.model_validate(
207
232
  {
233
+ "disableTargetSecurityGroupAssignment": obj.get("disableTargetSecurityGroupAssignment"),
208
234
  "errors": (
209
235
  [LoadBalancerError.from_dict(_item) for _item in obj["errors"]]
210
236
  if obj.get("errors") is not None
@@ -230,6 +256,11 @@ class LoadBalancer(BaseModel):
230
256
  if obj.get("targetPools") is not None
231
257
  else None
232
258
  ),
259
+ "targetSecurityGroup": (
260
+ SecurityGroup.from_dict(obj["targetSecurityGroup"])
261
+ if obj.get("targetSecurityGroup") is not None
262
+ else None
263
+ ),
233
264
  "version": obj.get("version"),
234
265
  }
235
266
  )
@@ -0,0 +1,82 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Load Balancer API
5
+
6
+ This API offers an interface to provision and manage load balancing servers in your STACKIT project. It also has the possibility of pooling target servers for load balancing purposes. For each load balancer provided, two VMs are deployed in your OpenStack project subject to a fee.
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501 docstring might be too long
13
+
14
+ from __future__ import annotations
15
+
16
+ import json
17
+ import pprint
18
+ from typing import Any, ClassVar, Dict, List, Optional, Set
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing_extensions import Self
22
+
23
+
24
+ class SecurityGroup(BaseModel):
25
+ """
26
+ SecurityGroup
27
+ """
28
+
29
+ id: Optional[StrictStr] = Field(default=None, description="ID of the security Group")
30
+ name: Optional[StrictStr] = Field(default=None, description="Name of the security Group")
31
+ __properties: ClassVar[List[str]] = ["id", "name"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of SecurityGroup from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([])
64
+
65
+ _dict = self.model_dump(
66
+ by_alias=True,
67
+ exclude=excluded_fields,
68
+ exclude_none=True,
69
+ )
70
+ return _dict
71
+
72
+ @classmethod
73
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
74
+ """Create an instance of SecurityGroup from a dict"""
75
+ if obj is None:
76
+ return None
77
+
78
+ if not isinstance(obj, dict):
79
+ return cls.model_validate(obj)
80
+
81
+ _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name")})
82
+ return _obj
@@ -18,13 +18,21 @@ import pprint
18
18
  import re
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
- from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
+ from pydantic import (
22
+ BaseModel,
23
+ ConfigDict,
24
+ Field,
25
+ StrictBool,
26
+ StrictStr,
27
+ field_validator,
28
+ )
22
29
  from typing_extensions import Annotated, Self
23
30
 
24
31
  from stackit.loadbalancer.models.listener import Listener
25
32
  from stackit.loadbalancer.models.load_balancer_error import LoadBalancerError
26
33
  from stackit.loadbalancer.models.load_balancer_options import LoadBalancerOptions
27
34
  from stackit.loadbalancer.models.network import Network
35
+ from stackit.loadbalancer.models.security_group import SecurityGroup
28
36
  from stackit.loadbalancer.models.target_pool import TargetPool
29
37
 
30
38
 
@@ -33,6 +41,11 @@ class UpdateLoadBalancerPayload(BaseModel):
33
41
  UpdateLoadBalancerPayload
34
42
  """
35
43
 
44
+ disable_target_security_group_assignment: Optional[StrictBool] = Field(
45
+ default=None,
46
+ 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.",
47
+ alias="disableTargetSecurityGroupAssignment",
48
+ )
36
49
  errors: Optional[List[LoadBalancerError]] = Field(
37
50
  default=None, description="Reports all errors a load balancer has."
38
51
  )
@@ -70,11 +83,17 @@ class UpdateLoadBalancerPayload(BaseModel):
70
83
  description="List of all target pools which will be used in the load balancer. Limited to 20.",
71
84
  alias="targetPools",
72
85
  )
86
+ target_security_group: Optional[SecurityGroup] = Field(
87
+ default=None,
88
+ description="Security Group permitting network traffic from the LoadBalancer to the targets. Useful when disableTargetSecurityGroupAssignment=true to manually assign target security groups to targets.",
89
+ alias="targetSecurityGroup",
90
+ )
73
91
  version: Optional[StrictStr] = Field(
74
92
  default=None,
75
93
  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.",
76
94
  )
77
95
  __properties: ClassVar[List[str]] = [
96
+ "disableTargetSecurityGroupAssignment",
78
97
  "errors",
79
98
  "externalAddress",
80
99
  "listeners",
@@ -86,6 +105,7 @@ class UpdateLoadBalancerPayload(BaseModel):
86
105
  "region",
87
106
  "status",
88
107
  "targetPools",
108
+ "targetSecurityGroup",
89
109
  "version",
90
110
  ]
91
111
 
@@ -146,6 +166,7 @@ class UpdateLoadBalancerPayload(BaseModel):
146
166
  * OpenAPI `readOnly` fields are excluded.
147
167
  * OpenAPI `readOnly` fields are excluded.
148
168
  * OpenAPI `readOnly` fields are excluded.
169
+ * OpenAPI `readOnly` fields are excluded.
149
170
  """
150
171
  excluded_fields: Set[str] = set(
151
172
  [
@@ -153,6 +174,7 @@ class UpdateLoadBalancerPayload(BaseModel):
153
174
  "private_address",
154
175
  "region",
155
176
  "status",
177
+ "target_security_group",
156
178
  ]
157
179
  )
158
180
 
@@ -192,6 +214,9 @@ class UpdateLoadBalancerPayload(BaseModel):
192
214
  if _item:
193
215
  _items.append(_item.to_dict())
194
216
  _dict["targetPools"] = _items
217
+ # override the default output from pydantic by calling `to_dict()` of target_security_group
218
+ if self.target_security_group:
219
+ _dict["targetSecurityGroup"] = self.target_security_group.to_dict()
195
220
  return _dict
196
221
 
197
222
  @classmethod
@@ -205,6 +230,7 @@ class UpdateLoadBalancerPayload(BaseModel):
205
230
 
206
231
  _obj = cls.model_validate(
207
232
  {
233
+ "disableTargetSecurityGroupAssignment": obj.get("disableTargetSecurityGroupAssignment"),
208
234
  "errors": (
209
235
  [LoadBalancerError.from_dict(_item) for _item in obj["errors"]]
210
236
  if obj.get("errors") is not None
@@ -230,6 +256,11 @@ class UpdateLoadBalancerPayload(BaseModel):
230
256
  if obj.get("targetPools") is not None
231
257
  else None
232
258
  ),
259
+ "targetSecurityGroup": (
260
+ SecurityGroup.from_dict(obj["targetSecurityGroup"])
261
+ if obj.get("targetSecurityGroup") is not None
262
+ else None
263
+ ),
233
264
  "version": obj.get("version"),
234
265
  }
235
266
  )