cdktf-cdktf-provider-upcloud 15.8.0__py3-none-any.whl

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 (66) hide show
  1. cdktf_cdktf_provider_upcloud/__init__.py +247 -0
  2. cdktf_cdktf_provider_upcloud/_jsii/__init__.py +45 -0
  3. cdktf_cdktf_provider_upcloud/_jsii/provider-upcloud@15.8.0.jsii.tgz +0 -0
  4. cdktf_cdktf_provider_upcloud/data_upcloud_hosts/__init__.py +894 -0
  5. cdktf_cdktf_provider_upcloud/data_upcloud_ip_addresses/__init__.py +633 -0
  6. cdktf_cdktf_provider_upcloud/data_upcloud_kubernetes_cluster/__init__.py +384 -0
  7. cdktf_cdktf_provider_upcloud/data_upcloud_load_balancer_dns_challenge_domain/__init__.py +319 -0
  8. cdktf_cdktf_provider_upcloud/data_upcloud_managed_database_mysql_sessions/__init__.py +853 -0
  9. cdktf_cdktf_provider_upcloud/data_upcloud_managed_database_opensearch_indices/__init__.py +717 -0
  10. cdktf_cdktf_provider_upcloud/data_upcloud_managed_database_postgresql_sessions/__init__.py +1084 -0
  11. cdktf_cdktf_provider_upcloud/data_upcloud_managed_database_valkey_sessions/__init__.py +898 -0
  12. cdktf_cdktf_provider_upcloud/data_upcloud_managed_object_storage_policies/__init__.py +647 -0
  13. cdktf_cdktf_provider_upcloud/data_upcloud_managed_object_storage_regions/__init__.py +600 -0
  14. cdktf_cdktf_provider_upcloud/data_upcloud_networks/__init__.py +1093 -0
  15. cdktf_cdktf_provider_upcloud/data_upcloud_storage/__init__.py +725 -0
  16. cdktf_cdktf_provider_upcloud/data_upcloud_tags/__init__.py +558 -0
  17. cdktf_cdktf_provider_upcloud/data_upcloud_zone/__init__.py +421 -0
  18. cdktf_cdktf_provider_upcloud/data_upcloud_zones/__init__.py +364 -0
  19. cdktf_cdktf_provider_upcloud/file_storage/__init__.py +1683 -0
  20. cdktf_cdktf_provider_upcloud/firewall_rules/__init__.py +1233 -0
  21. cdktf_cdktf_provider_upcloud/floating_ip_address/__init__.py +552 -0
  22. cdktf_cdktf_provider_upcloud/gateway/__init__.py +1167 -0
  23. cdktf_cdktf_provider_upcloud/gateway_connection/__init__.py +1299 -0
  24. cdktf_cdktf_provider_upcloud/gateway_connection_tunnel/__init__.py +1357 -0
  25. cdktf_cdktf_provider_upcloud/kubernetes_cluster/__init__.py +801 -0
  26. cdktf_cdktf_provider_upcloud/kubernetes_node_group/__init__.py +2674 -0
  27. cdktf_cdktf_provider_upcloud/loadbalancer/__init__.py +2113 -0
  28. cdktf_cdktf_provider_upcloud/loadbalancer_backend/__init__.py +1426 -0
  29. cdktf_cdktf_provider_upcloud/loadbalancer_backend_tls_config/__init__.py +442 -0
  30. cdktf_cdktf_provider_upcloud/loadbalancer_dynamic_backend_member/__init__.py +633 -0
  31. cdktf_cdktf_provider_upcloud/loadbalancer_dynamic_certificate_bundle/__init__.py +459 -0
  32. cdktf_cdktf_provider_upcloud/loadbalancer_frontend/__init__.py +1290 -0
  33. cdktf_cdktf_provider_upcloud/loadbalancer_frontend_rule/__init__.py +11486 -0
  34. cdktf_cdktf_provider_upcloud/loadbalancer_frontend_tls_config/__init__.py +442 -0
  35. cdktf_cdktf_provider_upcloud/loadbalancer_manual_certificate_bundle/__init__.py +504 -0
  36. cdktf_cdktf_provider_upcloud/loadbalancer_resolver/__init__.py +659 -0
  37. cdktf_cdktf_provider_upcloud/loadbalancer_static_backend_member/__init__.py +633 -0
  38. cdktf_cdktf_provider_upcloud/managed_database_logical_database/__init__.py +536 -0
  39. cdktf_cdktf_provider_upcloud/managed_database_mysql/__init__.py +4644 -0
  40. cdktf_cdktf_provider_upcloud/managed_database_opensearch/__init__.py +13812 -0
  41. cdktf_cdktf_provider_upcloud/managed_database_postgresql/__init__.py +7734 -0
  42. cdktf_cdktf_provider_upcloud/managed_database_user/__init__.py +1541 -0
  43. cdktf_cdktf_provider_upcloud/managed_database_valkey/__init__.py +3355 -0
  44. cdktf_cdktf_provider_upcloud/managed_object_storage/__init__.py +1198 -0
  45. cdktf_cdktf_provider_upcloud/managed_object_storage_bucket/__init__.py +409 -0
  46. cdktf_cdktf_provider_upcloud/managed_object_storage_custom_domain/__init__.py +446 -0
  47. cdktf_cdktf_provider_upcloud/managed_object_storage_policy/__init__.py +521 -0
  48. cdktf_cdktf_provider_upcloud/managed_object_storage_user/__init__.py +454 -0
  49. cdktf_cdktf_provider_upcloud/managed_object_storage_user_access_key/__init__.py +505 -0
  50. cdktf_cdktf_provider_upcloud/managed_object_storage_user_policy/__init__.py +485 -0
  51. cdktf_cdktf_provider_upcloud/network/__init__.py +1554 -0
  52. cdktf_cdktf_provider_upcloud/network_peering/__init__.py +1084 -0
  53. cdktf_cdktf_provider_upcloud/provider/__init__.py +544 -0
  54. cdktf_cdktf_provider_upcloud/py.typed +1 -0
  55. cdktf_cdktf_provider_upcloud/router/__init__.py +1030 -0
  56. cdktf_cdktf_provider_upcloud/server/__init__.py +4542 -0
  57. cdktf_cdktf_provider_upcloud/server_group/__init__.py +571 -0
  58. cdktf_cdktf_provider_upcloud/storage/__init__.py +1850 -0
  59. cdktf_cdktf_provider_upcloud/storage_backup/__init__.py +483 -0
  60. cdktf_cdktf_provider_upcloud/storage_template/__init__.py +478 -0
  61. cdktf_cdktf_provider_upcloud/tag/__init__.py +493 -0
  62. cdktf_cdktf_provider_upcloud-15.8.0.dist-info/LICENSE +355 -0
  63. cdktf_cdktf_provider_upcloud-15.8.0.dist-info/METADATA +120 -0
  64. cdktf_cdktf_provider_upcloud-15.8.0.dist-info/RECORD +66 -0
  65. cdktf_cdktf_provider_upcloud-15.8.0.dist-info/WHEEL +5 -0
  66. cdktf_cdktf_provider_upcloud-15.8.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,571 @@
1
+ r'''
2
+ # `upcloud_server_group`
3
+
4
+ Refer to the Terraform Registry for docs: [`upcloud_server_group`](https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group).
5
+ '''
6
+ from pkgutil import extend_path
7
+ __path__ = extend_path(__path__, __name__)
8
+
9
+ import abc
10
+ import builtins
11
+ import datetime
12
+ import enum
13
+ import typing
14
+
15
+ import jsii
16
+ import publication
17
+ import typing_extensions
18
+
19
+ import typeguard
20
+ from importlib.metadata import version as _metadata_package_version
21
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
22
+
23
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
24
+ if TYPEGUARD_MAJOR_VERSION <= 2:
25
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
26
+ else:
27
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
28
+ pass
29
+ else:
30
+ if TYPEGUARD_MAJOR_VERSION == 3:
31
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
32
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
33
+ else:
34
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
35
+
36
+ from .._jsii import *
37
+
38
+ import cdktf as _cdktf_9a9027ec
39
+ import constructs as _constructs_77d1e7e8
40
+
41
+
42
+ class ServerGroup(
43
+ _cdktf_9a9027ec.TerraformResource,
44
+ metaclass=jsii.JSIIMeta,
45
+ jsii_type="@cdktf/provider-upcloud.serverGroup.ServerGroup",
46
+ ):
47
+ '''Represents a {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group upcloud_server_group}.'''
48
+
49
+ def __init__(
50
+ self,
51
+ scope: _constructs_77d1e7e8.Construct,
52
+ id: builtins.str,
53
+ *,
54
+ title: builtins.str,
55
+ anti_affinity_policy: typing.Optional[builtins.str] = None,
56
+ labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
57
+ members: typing.Optional[typing.Sequence[builtins.str]] = None,
58
+ track_members: typing.Optional[typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable]] = None,
59
+ connection: typing.Optional[typing.Union[typing.Union[_cdktf_9a9027ec.SSHProvisionerConnection, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.WinrmProvisionerConnection, typing.Dict[builtins.str, typing.Any]]]] = None,
60
+ count: typing.Optional[typing.Union[jsii.Number, _cdktf_9a9027ec.TerraformCount]] = None,
61
+ depends_on: typing.Optional[typing.Sequence[_cdktf_9a9027ec.ITerraformDependable]] = None,
62
+ for_each: typing.Optional[_cdktf_9a9027ec.ITerraformIterator] = None,
63
+ lifecycle: typing.Optional[typing.Union[_cdktf_9a9027ec.TerraformResourceLifecycle, typing.Dict[builtins.str, typing.Any]]] = None,
64
+ provider: typing.Optional[_cdktf_9a9027ec.TerraformProvider] = None,
65
+ provisioners: typing.Optional[typing.Sequence[typing.Union[typing.Union[_cdktf_9a9027ec.FileProvisioner, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.LocalExecProvisioner, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.RemoteExecProvisioner, typing.Dict[builtins.str, typing.Any]]]]] = None,
66
+ ) -> None:
67
+ '''Create a new {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group upcloud_server_group} Resource.
68
+
69
+ :param scope: The scope in which to define this construct.
70
+ :param id: The scoped construct ID. Must be unique amongst siblings in the same scope
71
+ :param title: Title of your server group. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#title ServerGroup#title}
72
+ :param anti_affinity_policy: Defines if a server group is an anti-affinity group. Setting this to ``strict`` or ``yes`` will result in all servers in the group being placed on separate compute hosts. The value can be ``strict``, ``yes``, or ``no``:: * `strict` policy doesn't allow servers in the same server group to be on the same host * `yes` refers to best-effort policy and tries to put servers on different hosts, but this is not guaranteed * `no` refers to having no policy and thus no effect on server host affinity To verify if the anti-affinity policies are met by requesting a server group details from API. For more information please see UpCloud API documentation on server groups. Plese also note that anti-affinity policies are only applied on server start. This means that if anti-affinity policies in server group are not met, you need to manually restart the servers in said group, for example via API, UpCloud Control Panel or upctl (UpCloud CLI) Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#anti_affinity_policy ServerGroup#anti_affinity_policy}
73
+ :param labels: User defined key-value pairs to classify the server group. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#labels ServerGroup#labels}
74
+ :param members: UUIDs of the servers that are members of this group. Servers can also be attached to the server group via ``server_group`` property of ``upcloud_server``. See also ``track_members`` property. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#members ServerGroup#members}
75
+ :param track_members: Controls if members of the server group are being tracked in this resource. Set to ``false`` when using ``server_group`` property of ``upcloud_server`` to attach servers to the server group to avoid delayed state updates. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#track_members ServerGroup#track_members}
76
+ :param connection:
77
+ :param count:
78
+ :param depends_on:
79
+ :param for_each:
80
+ :param lifecycle:
81
+ :param provider:
82
+ :param provisioners:
83
+ '''
84
+ if __debug__:
85
+ type_hints = typing.get_type_hints(_typecheckingstub__e7bb9d997cccb31358151de22cea5fb9ccb45e5e867434b036acb120ab3beced)
86
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
87
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
88
+ config = ServerGroupConfig(
89
+ title=title,
90
+ anti_affinity_policy=anti_affinity_policy,
91
+ labels=labels,
92
+ members=members,
93
+ track_members=track_members,
94
+ connection=connection,
95
+ count=count,
96
+ depends_on=depends_on,
97
+ for_each=for_each,
98
+ lifecycle=lifecycle,
99
+ provider=provider,
100
+ provisioners=provisioners,
101
+ )
102
+
103
+ jsii.create(self.__class__, self, [scope, id, config])
104
+
105
+ @jsii.member(jsii_name="generateConfigForImport")
106
+ @builtins.classmethod
107
+ def generate_config_for_import(
108
+ cls,
109
+ scope: _constructs_77d1e7e8.Construct,
110
+ import_to_id: builtins.str,
111
+ import_from_id: builtins.str,
112
+ provider: typing.Optional[_cdktf_9a9027ec.TerraformProvider] = None,
113
+ ) -> _cdktf_9a9027ec.ImportableResource:
114
+ '''Generates CDKTF code for importing a ServerGroup resource upon running "cdktf plan ".
115
+
116
+ :param scope: The scope in which to define this construct.
117
+ :param import_to_id: The construct id used in the generated config for the ServerGroup to import.
118
+ :param import_from_id: The id of the existing ServerGroup that should be imported. Refer to the {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#import import section} in the documentation of this resource for the id to use
119
+ :param provider: ? Optional instance of the provider where the ServerGroup to import is found.
120
+ '''
121
+ if __debug__:
122
+ type_hints = typing.get_type_hints(_typecheckingstub__01a47a4baa082216ed86ec081b03e594d18b4aa73be9609d2c5de28d91668514)
123
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
124
+ check_type(argname="argument import_to_id", value=import_to_id, expected_type=type_hints["import_to_id"])
125
+ check_type(argname="argument import_from_id", value=import_from_id, expected_type=type_hints["import_from_id"])
126
+ check_type(argname="argument provider", value=provider, expected_type=type_hints["provider"])
127
+ return typing.cast(_cdktf_9a9027ec.ImportableResource, jsii.sinvoke(cls, "generateConfigForImport", [scope, import_to_id, import_from_id, provider]))
128
+
129
+ @jsii.member(jsii_name="resetAntiAffinityPolicy")
130
+ def reset_anti_affinity_policy(self) -> None:
131
+ return typing.cast(None, jsii.invoke(self, "resetAntiAffinityPolicy", []))
132
+
133
+ @jsii.member(jsii_name="resetLabels")
134
+ def reset_labels(self) -> None:
135
+ return typing.cast(None, jsii.invoke(self, "resetLabels", []))
136
+
137
+ @jsii.member(jsii_name="resetMembers")
138
+ def reset_members(self) -> None:
139
+ return typing.cast(None, jsii.invoke(self, "resetMembers", []))
140
+
141
+ @jsii.member(jsii_name="resetTrackMembers")
142
+ def reset_track_members(self) -> None:
143
+ return typing.cast(None, jsii.invoke(self, "resetTrackMembers", []))
144
+
145
+ @jsii.member(jsii_name="synthesizeAttributes")
146
+ def _synthesize_attributes(self) -> typing.Mapping[builtins.str, typing.Any]:
147
+ return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.invoke(self, "synthesizeAttributes", []))
148
+
149
+ @jsii.member(jsii_name="synthesizeHclAttributes")
150
+ def _synthesize_hcl_attributes(self) -> typing.Mapping[builtins.str, typing.Any]:
151
+ return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.invoke(self, "synthesizeHclAttributes", []))
152
+
153
+ @jsii.python.classproperty
154
+ @jsii.member(jsii_name="tfResourceType")
155
+ def TF_RESOURCE_TYPE(cls) -> builtins.str:
156
+ return typing.cast(builtins.str, jsii.sget(cls, "tfResourceType"))
157
+
158
+ @builtins.property
159
+ @jsii.member(jsii_name="id")
160
+ def id(self) -> builtins.str:
161
+ return typing.cast(builtins.str, jsii.get(self, "id"))
162
+
163
+ @builtins.property
164
+ @jsii.member(jsii_name="antiAffinityPolicyInput")
165
+ def anti_affinity_policy_input(self) -> typing.Optional[builtins.str]:
166
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "antiAffinityPolicyInput"))
167
+
168
+ @builtins.property
169
+ @jsii.member(jsii_name="labelsInput")
170
+ def labels_input(
171
+ self,
172
+ ) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
173
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], jsii.get(self, "labelsInput"))
174
+
175
+ @builtins.property
176
+ @jsii.member(jsii_name="membersInput")
177
+ def members_input(self) -> typing.Optional[typing.List[builtins.str]]:
178
+ return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "membersInput"))
179
+
180
+ @builtins.property
181
+ @jsii.member(jsii_name="titleInput")
182
+ def title_input(self) -> typing.Optional[builtins.str]:
183
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "titleInput"))
184
+
185
+ @builtins.property
186
+ @jsii.member(jsii_name="trackMembersInput")
187
+ def track_members_input(
188
+ self,
189
+ ) -> typing.Optional[typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable]]:
190
+ return typing.cast(typing.Optional[typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable]], jsii.get(self, "trackMembersInput"))
191
+
192
+ @builtins.property
193
+ @jsii.member(jsii_name="antiAffinityPolicy")
194
+ def anti_affinity_policy(self) -> builtins.str:
195
+ return typing.cast(builtins.str, jsii.get(self, "antiAffinityPolicy"))
196
+
197
+ @anti_affinity_policy.setter
198
+ def anti_affinity_policy(self, value: builtins.str) -> None:
199
+ if __debug__:
200
+ type_hints = typing.get_type_hints(_typecheckingstub__4390bd2492fd3d3bbedd7c19e60d04383672093eba56d821ee968f23e93bf140)
201
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
202
+ jsii.set(self, "antiAffinityPolicy", value) # pyright: ignore[reportArgumentType]
203
+
204
+ @builtins.property
205
+ @jsii.member(jsii_name="labels")
206
+ def labels(self) -> typing.Mapping[builtins.str, builtins.str]:
207
+ return typing.cast(typing.Mapping[builtins.str, builtins.str], jsii.get(self, "labels"))
208
+
209
+ @labels.setter
210
+ def labels(self, value: typing.Mapping[builtins.str, builtins.str]) -> None:
211
+ if __debug__:
212
+ type_hints = typing.get_type_hints(_typecheckingstub__c063a7fc6c1346d722a1473260458630c3f8c7f42337e5589ab67dac5732fc2d)
213
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
214
+ jsii.set(self, "labels", value) # pyright: ignore[reportArgumentType]
215
+
216
+ @builtins.property
217
+ @jsii.member(jsii_name="members")
218
+ def members(self) -> typing.List[builtins.str]:
219
+ return typing.cast(typing.List[builtins.str], jsii.get(self, "members"))
220
+
221
+ @members.setter
222
+ def members(self, value: typing.List[builtins.str]) -> None:
223
+ if __debug__:
224
+ type_hints = typing.get_type_hints(_typecheckingstub__78ebd68f276317393d82cc8da37c9a3be28f59d4933cfcf477190dc1856602e9)
225
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
226
+ jsii.set(self, "members", value) # pyright: ignore[reportArgumentType]
227
+
228
+ @builtins.property
229
+ @jsii.member(jsii_name="title")
230
+ def title(self) -> builtins.str:
231
+ return typing.cast(builtins.str, jsii.get(self, "title"))
232
+
233
+ @title.setter
234
+ def title(self, value: builtins.str) -> None:
235
+ if __debug__:
236
+ type_hints = typing.get_type_hints(_typecheckingstub__7194848368d4b426a57d37e7301e9f7cd0a15042f72fed971eaf1ec8f481ba71)
237
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
238
+ jsii.set(self, "title", value) # pyright: ignore[reportArgumentType]
239
+
240
+ @builtins.property
241
+ @jsii.member(jsii_name="trackMembers")
242
+ def track_members(self) -> typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable]:
243
+ return typing.cast(typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable], jsii.get(self, "trackMembers"))
244
+
245
+ @track_members.setter
246
+ def track_members(
247
+ self,
248
+ value: typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable],
249
+ ) -> None:
250
+ if __debug__:
251
+ type_hints = typing.get_type_hints(_typecheckingstub__829c5a6ee0abba8900e0384709d592d3b9dfce002df2c4e19aa1e5c4a5f3c175)
252
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
253
+ jsii.set(self, "trackMembers", value) # pyright: ignore[reportArgumentType]
254
+
255
+
256
+ @jsii.data_type(
257
+ jsii_type="@cdktf/provider-upcloud.serverGroup.ServerGroupConfig",
258
+ jsii_struct_bases=[_cdktf_9a9027ec.TerraformMetaArguments],
259
+ name_mapping={
260
+ "connection": "connection",
261
+ "count": "count",
262
+ "depends_on": "dependsOn",
263
+ "for_each": "forEach",
264
+ "lifecycle": "lifecycle",
265
+ "provider": "provider",
266
+ "provisioners": "provisioners",
267
+ "title": "title",
268
+ "anti_affinity_policy": "antiAffinityPolicy",
269
+ "labels": "labels",
270
+ "members": "members",
271
+ "track_members": "trackMembers",
272
+ },
273
+ )
274
+ class ServerGroupConfig(_cdktf_9a9027ec.TerraformMetaArguments):
275
+ def __init__(
276
+ self,
277
+ *,
278
+ connection: typing.Optional[typing.Union[typing.Union[_cdktf_9a9027ec.SSHProvisionerConnection, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.WinrmProvisionerConnection, typing.Dict[builtins.str, typing.Any]]]] = None,
279
+ count: typing.Optional[typing.Union[jsii.Number, _cdktf_9a9027ec.TerraformCount]] = None,
280
+ depends_on: typing.Optional[typing.Sequence[_cdktf_9a9027ec.ITerraformDependable]] = None,
281
+ for_each: typing.Optional[_cdktf_9a9027ec.ITerraformIterator] = None,
282
+ lifecycle: typing.Optional[typing.Union[_cdktf_9a9027ec.TerraformResourceLifecycle, typing.Dict[builtins.str, typing.Any]]] = None,
283
+ provider: typing.Optional[_cdktf_9a9027ec.TerraformProvider] = None,
284
+ provisioners: typing.Optional[typing.Sequence[typing.Union[typing.Union[_cdktf_9a9027ec.FileProvisioner, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.LocalExecProvisioner, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.RemoteExecProvisioner, typing.Dict[builtins.str, typing.Any]]]]] = None,
285
+ title: builtins.str,
286
+ anti_affinity_policy: typing.Optional[builtins.str] = None,
287
+ labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
288
+ members: typing.Optional[typing.Sequence[builtins.str]] = None,
289
+ track_members: typing.Optional[typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable]] = None,
290
+ ) -> None:
291
+ '''
292
+ :param connection:
293
+ :param count:
294
+ :param depends_on:
295
+ :param for_each:
296
+ :param lifecycle:
297
+ :param provider:
298
+ :param provisioners:
299
+ :param title: Title of your server group. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#title ServerGroup#title}
300
+ :param anti_affinity_policy: Defines if a server group is an anti-affinity group. Setting this to ``strict`` or ``yes`` will result in all servers in the group being placed on separate compute hosts. The value can be ``strict``, ``yes``, or ``no``:: * `strict` policy doesn't allow servers in the same server group to be on the same host * `yes` refers to best-effort policy and tries to put servers on different hosts, but this is not guaranteed * `no` refers to having no policy and thus no effect on server host affinity To verify if the anti-affinity policies are met by requesting a server group details from API. For more information please see UpCloud API documentation on server groups. Plese also note that anti-affinity policies are only applied on server start. This means that if anti-affinity policies in server group are not met, you need to manually restart the servers in said group, for example via API, UpCloud Control Panel or upctl (UpCloud CLI) Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#anti_affinity_policy ServerGroup#anti_affinity_policy}
301
+ :param labels: User defined key-value pairs to classify the server group. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#labels ServerGroup#labels}
302
+ :param members: UUIDs of the servers that are members of this group. Servers can also be attached to the server group via ``server_group`` property of ``upcloud_server``. See also ``track_members`` property. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#members ServerGroup#members}
303
+ :param track_members: Controls if members of the server group are being tracked in this resource. Set to ``false`` when using ``server_group`` property of ``upcloud_server`` to attach servers to the server group to avoid delayed state updates. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#track_members ServerGroup#track_members}
304
+ '''
305
+ if isinstance(lifecycle, dict):
306
+ lifecycle = _cdktf_9a9027ec.TerraformResourceLifecycle(**lifecycle)
307
+ if __debug__:
308
+ type_hints = typing.get_type_hints(_typecheckingstub__b403df006cfad85b18163ab30df327c027139a019345d554635499f601fdf1f4)
309
+ check_type(argname="argument connection", value=connection, expected_type=type_hints["connection"])
310
+ check_type(argname="argument count", value=count, expected_type=type_hints["count"])
311
+ check_type(argname="argument depends_on", value=depends_on, expected_type=type_hints["depends_on"])
312
+ check_type(argname="argument for_each", value=for_each, expected_type=type_hints["for_each"])
313
+ check_type(argname="argument lifecycle", value=lifecycle, expected_type=type_hints["lifecycle"])
314
+ check_type(argname="argument provider", value=provider, expected_type=type_hints["provider"])
315
+ check_type(argname="argument provisioners", value=provisioners, expected_type=type_hints["provisioners"])
316
+ check_type(argname="argument title", value=title, expected_type=type_hints["title"])
317
+ check_type(argname="argument anti_affinity_policy", value=anti_affinity_policy, expected_type=type_hints["anti_affinity_policy"])
318
+ check_type(argname="argument labels", value=labels, expected_type=type_hints["labels"])
319
+ check_type(argname="argument members", value=members, expected_type=type_hints["members"])
320
+ check_type(argname="argument track_members", value=track_members, expected_type=type_hints["track_members"])
321
+ self._values: typing.Dict[builtins.str, typing.Any] = {
322
+ "title": title,
323
+ }
324
+ if connection is not None:
325
+ self._values["connection"] = connection
326
+ if count is not None:
327
+ self._values["count"] = count
328
+ if depends_on is not None:
329
+ self._values["depends_on"] = depends_on
330
+ if for_each is not None:
331
+ self._values["for_each"] = for_each
332
+ if lifecycle is not None:
333
+ self._values["lifecycle"] = lifecycle
334
+ if provider is not None:
335
+ self._values["provider"] = provider
336
+ if provisioners is not None:
337
+ self._values["provisioners"] = provisioners
338
+ if anti_affinity_policy is not None:
339
+ self._values["anti_affinity_policy"] = anti_affinity_policy
340
+ if labels is not None:
341
+ self._values["labels"] = labels
342
+ if members is not None:
343
+ self._values["members"] = members
344
+ if track_members is not None:
345
+ self._values["track_members"] = track_members
346
+
347
+ @builtins.property
348
+ def connection(
349
+ self,
350
+ ) -> typing.Optional[typing.Union[_cdktf_9a9027ec.SSHProvisionerConnection, _cdktf_9a9027ec.WinrmProvisionerConnection]]:
351
+ '''
352
+ :stability: experimental
353
+ '''
354
+ result = self._values.get("connection")
355
+ return typing.cast(typing.Optional[typing.Union[_cdktf_9a9027ec.SSHProvisionerConnection, _cdktf_9a9027ec.WinrmProvisionerConnection]], result)
356
+
357
+ @builtins.property
358
+ def count(
359
+ self,
360
+ ) -> typing.Optional[typing.Union[jsii.Number, _cdktf_9a9027ec.TerraformCount]]:
361
+ '''
362
+ :stability: experimental
363
+ '''
364
+ result = self._values.get("count")
365
+ return typing.cast(typing.Optional[typing.Union[jsii.Number, _cdktf_9a9027ec.TerraformCount]], result)
366
+
367
+ @builtins.property
368
+ def depends_on(
369
+ self,
370
+ ) -> typing.Optional[typing.List[_cdktf_9a9027ec.ITerraformDependable]]:
371
+ '''
372
+ :stability: experimental
373
+ '''
374
+ result = self._values.get("depends_on")
375
+ return typing.cast(typing.Optional[typing.List[_cdktf_9a9027ec.ITerraformDependable]], result)
376
+
377
+ @builtins.property
378
+ def for_each(self) -> typing.Optional[_cdktf_9a9027ec.ITerraformIterator]:
379
+ '''
380
+ :stability: experimental
381
+ '''
382
+ result = self._values.get("for_each")
383
+ return typing.cast(typing.Optional[_cdktf_9a9027ec.ITerraformIterator], result)
384
+
385
+ @builtins.property
386
+ def lifecycle(self) -> typing.Optional[_cdktf_9a9027ec.TerraformResourceLifecycle]:
387
+ '''
388
+ :stability: experimental
389
+ '''
390
+ result = self._values.get("lifecycle")
391
+ return typing.cast(typing.Optional[_cdktf_9a9027ec.TerraformResourceLifecycle], result)
392
+
393
+ @builtins.property
394
+ def provider(self) -> typing.Optional[_cdktf_9a9027ec.TerraformProvider]:
395
+ '''
396
+ :stability: experimental
397
+ '''
398
+ result = self._values.get("provider")
399
+ return typing.cast(typing.Optional[_cdktf_9a9027ec.TerraformProvider], result)
400
+
401
+ @builtins.property
402
+ def provisioners(
403
+ self,
404
+ ) -> typing.Optional[typing.List[typing.Union[_cdktf_9a9027ec.FileProvisioner, _cdktf_9a9027ec.LocalExecProvisioner, _cdktf_9a9027ec.RemoteExecProvisioner]]]:
405
+ '''
406
+ :stability: experimental
407
+ '''
408
+ result = self._values.get("provisioners")
409
+ return typing.cast(typing.Optional[typing.List[typing.Union[_cdktf_9a9027ec.FileProvisioner, _cdktf_9a9027ec.LocalExecProvisioner, _cdktf_9a9027ec.RemoteExecProvisioner]]], result)
410
+
411
+ @builtins.property
412
+ def title(self) -> builtins.str:
413
+ '''Title of your server group.
414
+
415
+ Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#title ServerGroup#title}
416
+ '''
417
+ result = self._values.get("title")
418
+ assert result is not None, "Required property 'title' is missing"
419
+ return typing.cast(builtins.str, result)
420
+
421
+ @builtins.property
422
+ def anti_affinity_policy(self) -> typing.Optional[builtins.str]:
423
+ '''Defines if a server group is an anti-affinity group.
424
+
425
+ Setting this to ``strict`` or ``yes`` will
426
+ result in all servers in the group being placed on separate compute hosts. The value can be ``strict``, ``yes``, or ``no``::
427
+
428
+ * `strict` policy doesn't allow servers in the same server group to be on the same host
429
+ * `yes` refers to best-effort policy and tries to put servers on different hosts, but this is not guaranteed
430
+ * `no` refers to having no policy and thus no effect on server host affinity
431
+
432
+ To verify if the anti-affinity policies are met by requesting a server group details from API. For more information
433
+ please see UpCloud API documentation on server groups.
434
+
435
+ Plese also note that anti-affinity policies are only applied on server start. This means that if anti-affinity
436
+ policies in server group are not met, you need to manually restart the servers in said group,
437
+ for example via API, UpCloud Control Panel or upctl (UpCloud CLI)
438
+
439
+ Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#anti_affinity_policy ServerGroup#anti_affinity_policy}
440
+ '''
441
+ result = self._values.get("anti_affinity_policy")
442
+ return typing.cast(typing.Optional[builtins.str], result)
443
+
444
+ @builtins.property
445
+ def labels(self) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
446
+ '''User defined key-value pairs to classify the server group.
447
+
448
+ Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#labels ServerGroup#labels}
449
+ '''
450
+ result = self._values.get("labels")
451
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
452
+
453
+ @builtins.property
454
+ def members(self) -> typing.Optional[typing.List[builtins.str]]:
455
+ '''UUIDs of the servers that are members of this group.
456
+
457
+ Servers can also be attached to the server group via ``server_group`` property of ``upcloud_server``. See also ``track_members`` property.
458
+
459
+ Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#members ServerGroup#members}
460
+ '''
461
+ result = self._values.get("members")
462
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
463
+
464
+ @builtins.property
465
+ def track_members(
466
+ self,
467
+ ) -> typing.Optional[typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable]]:
468
+ '''Controls if members of the server group are being tracked in this resource.
469
+
470
+ Set to ``false`` when using ``server_group`` property of ``upcloud_server`` to attach servers to the server group to avoid delayed state updates.
471
+
472
+ Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.31.0/docs/resources/server_group#track_members ServerGroup#track_members}
473
+ '''
474
+ result = self._values.get("track_members")
475
+ return typing.cast(typing.Optional[typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable]], result)
476
+
477
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
478
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
479
+
480
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
481
+ return not (rhs == self)
482
+
483
+ def __repr__(self) -> str:
484
+ return "ServerGroupConfig(%s)" % ", ".join(
485
+ k + "=" + repr(v) for k, v in self._values.items()
486
+ )
487
+
488
+
489
+ __all__ = [
490
+ "ServerGroup",
491
+ "ServerGroupConfig",
492
+ ]
493
+
494
+ publication.publish()
495
+
496
+ def _typecheckingstub__e7bb9d997cccb31358151de22cea5fb9ccb45e5e867434b036acb120ab3beced(
497
+ scope: _constructs_77d1e7e8.Construct,
498
+ id: builtins.str,
499
+ *,
500
+ title: builtins.str,
501
+ anti_affinity_policy: typing.Optional[builtins.str] = None,
502
+ labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
503
+ members: typing.Optional[typing.Sequence[builtins.str]] = None,
504
+ track_members: typing.Optional[typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable]] = None,
505
+ connection: typing.Optional[typing.Union[typing.Union[_cdktf_9a9027ec.SSHProvisionerConnection, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.WinrmProvisionerConnection, typing.Dict[builtins.str, typing.Any]]]] = None,
506
+ count: typing.Optional[typing.Union[jsii.Number, _cdktf_9a9027ec.TerraformCount]] = None,
507
+ depends_on: typing.Optional[typing.Sequence[_cdktf_9a9027ec.ITerraformDependable]] = None,
508
+ for_each: typing.Optional[_cdktf_9a9027ec.ITerraformIterator] = None,
509
+ lifecycle: typing.Optional[typing.Union[_cdktf_9a9027ec.TerraformResourceLifecycle, typing.Dict[builtins.str, typing.Any]]] = None,
510
+ provider: typing.Optional[_cdktf_9a9027ec.TerraformProvider] = None,
511
+ provisioners: typing.Optional[typing.Sequence[typing.Union[typing.Union[_cdktf_9a9027ec.FileProvisioner, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.LocalExecProvisioner, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.RemoteExecProvisioner, typing.Dict[builtins.str, typing.Any]]]]] = None,
512
+ ) -> None:
513
+ """Type checking stubs"""
514
+ pass
515
+
516
+ def _typecheckingstub__01a47a4baa082216ed86ec081b03e594d18b4aa73be9609d2c5de28d91668514(
517
+ scope: _constructs_77d1e7e8.Construct,
518
+ import_to_id: builtins.str,
519
+ import_from_id: builtins.str,
520
+ provider: typing.Optional[_cdktf_9a9027ec.TerraformProvider] = None,
521
+ ) -> None:
522
+ """Type checking stubs"""
523
+ pass
524
+
525
+ def _typecheckingstub__4390bd2492fd3d3bbedd7c19e60d04383672093eba56d821ee968f23e93bf140(
526
+ value: builtins.str,
527
+ ) -> None:
528
+ """Type checking stubs"""
529
+ pass
530
+
531
+ def _typecheckingstub__c063a7fc6c1346d722a1473260458630c3f8c7f42337e5589ab67dac5732fc2d(
532
+ value: typing.Mapping[builtins.str, builtins.str],
533
+ ) -> None:
534
+ """Type checking stubs"""
535
+ pass
536
+
537
+ def _typecheckingstub__78ebd68f276317393d82cc8da37c9a3be28f59d4933cfcf477190dc1856602e9(
538
+ value: typing.List[builtins.str],
539
+ ) -> None:
540
+ """Type checking stubs"""
541
+ pass
542
+
543
+ def _typecheckingstub__7194848368d4b426a57d37e7301e9f7cd0a15042f72fed971eaf1ec8f481ba71(
544
+ value: builtins.str,
545
+ ) -> None:
546
+ """Type checking stubs"""
547
+ pass
548
+
549
+ def _typecheckingstub__829c5a6ee0abba8900e0384709d592d3b9dfce002df2c4e19aa1e5c4a5f3c175(
550
+ value: typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable],
551
+ ) -> None:
552
+ """Type checking stubs"""
553
+ pass
554
+
555
+ def _typecheckingstub__b403df006cfad85b18163ab30df327c027139a019345d554635499f601fdf1f4(
556
+ *,
557
+ connection: typing.Optional[typing.Union[typing.Union[_cdktf_9a9027ec.SSHProvisionerConnection, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.WinrmProvisionerConnection, typing.Dict[builtins.str, typing.Any]]]] = None,
558
+ count: typing.Optional[typing.Union[jsii.Number, _cdktf_9a9027ec.TerraformCount]] = None,
559
+ depends_on: typing.Optional[typing.Sequence[_cdktf_9a9027ec.ITerraformDependable]] = None,
560
+ for_each: typing.Optional[_cdktf_9a9027ec.ITerraformIterator] = None,
561
+ lifecycle: typing.Optional[typing.Union[_cdktf_9a9027ec.TerraformResourceLifecycle, typing.Dict[builtins.str, typing.Any]]] = None,
562
+ provider: typing.Optional[_cdktf_9a9027ec.TerraformProvider] = None,
563
+ provisioners: typing.Optional[typing.Sequence[typing.Union[typing.Union[_cdktf_9a9027ec.FileProvisioner, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.LocalExecProvisioner, typing.Dict[builtins.str, typing.Any]], typing.Union[_cdktf_9a9027ec.RemoteExecProvisioner, typing.Dict[builtins.str, typing.Any]]]]] = None,
564
+ title: builtins.str,
565
+ anti_affinity_policy: typing.Optional[builtins.str] = None,
566
+ labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
567
+ members: typing.Optional[typing.Sequence[builtins.str]] = None,
568
+ track_members: typing.Optional[typing.Union[builtins.bool, _cdktf_9a9027ec.IResolvable]] = None,
569
+ ) -> None:
570
+ """Type checking stubs"""
571
+ pass