@cdktf-providers/edge-center-edgecenter 0.10.4

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 (173) hide show
  1. package/LICENSE +355 -0
  2. package/README.md +19 -0
  3. package/dist/baremetal/index.d.ts +528 -0
  4. package/dist/baremetal/index.js +1250 -0
  5. package/dist/cdn-lecert/index.d.ts +76 -0
  6. package/dist/cdn-lecert/index.js +157 -0
  7. package/dist/cdn-origingroup/index.d.ts +237 -0
  8. package/dist/cdn-origingroup/index.js +560 -0
  9. package/dist/cdn-resource/index.d.ts +2223 -0
  10. package/dist/cdn-resource/index.js +5865 -0
  11. package/dist/cdn-rule/index.d.ts +2037 -0
  12. package/dist/cdn-rule/index.js +5381 -0
  13. package/dist/cdn-shielding/index.d.ts +64 -0
  14. package/dist/cdn-shielding/index.js +131 -0
  15. package/dist/cdn-sslcert/index.d.ts +76 -0
  16. package/dist/cdn-sslcert/index.js +159 -0
  17. package/dist/data-edgecenter-availability-zone/index.d.ts +67 -0
  18. package/dist/data-edgecenter-availability-zone/index.js +141 -0
  19. package/dist/data-edgecenter-cdn-shielding-location/index.d.ts +54 -0
  20. package/dist/data-edgecenter-cdn-shielding-location/index.js +111 -0
  21. package/dist/data-edgecenter-floatingip/index.d.ts +183 -0
  22. package/dist/data-edgecenter-floatingip/index.js +378 -0
  23. package/dist/data-edgecenter-image/index.d.ts +183 -0
  24. package/dist/data-edgecenter-image/index.js +378 -0
  25. package/dist/data-edgecenter-instance/index.d.ts +312 -0
  26. package/dist/data-edgecenter-instance/index.js +690 -0
  27. package/dist/data-edgecenter-instance-port-security/index.d.ts +110 -0
  28. package/dist/data-edgecenter-instance-port-security/index.js +231 -0
  29. package/dist/data-edgecenter-instance-v2/index.d.ts +222 -0
  30. package/dist/data-edgecenter-instance-v2/index.js +501 -0
  31. package/dist/data-edgecenter-k8s/index.d.ts +167 -0
  32. package/dist/data-edgecenter-k8s/index.js +412 -0
  33. package/dist/data-edgecenter-k8s-client-config/index.d.ts +100 -0
  34. package/dist/data-edgecenter-k8s-client-config/index.js +211 -0
  35. package/dist/data-edgecenter-k8s-pool/index.d.ts +120 -0
  36. package/dist/data-edgecenter-k8s-pool/index.js +271 -0
  37. package/dist/data-edgecenter-lb-l7policy/index.d.ts +114 -0
  38. package/dist/data-edgecenter-lb-l7policy/index.js +258 -0
  39. package/dist/data-edgecenter-lb-l7rule/index.d.ts +120 -0
  40. package/dist/data-edgecenter-lb-l7rule/index.js +262 -0
  41. package/dist/data-edgecenter-lblistener/index.d.ts +122 -0
  42. package/dist/data-edgecenter-lblistener/index.js +269 -0
  43. package/dist/data-edgecenter-lbpool/index.d.ts +204 -0
  44. package/dist/data-edgecenter-lbpool/index.js +454 -0
  45. package/dist/data-edgecenter-loadbalancer/index.d.ts +203 -0
  46. package/dist/data-edgecenter-loadbalancer/index.js +427 -0
  47. package/dist/data-edgecenter-loadbalancerv2/index.d.ts +169 -0
  48. package/dist/data-edgecenter-loadbalancerv2/index.js +343 -0
  49. package/dist/data-edgecenter-network/index.d.ts +270 -0
  50. package/dist/data-edgecenter-network/index.js +589 -0
  51. package/dist/data-edgecenter-project/index.d.ts +72 -0
  52. package/dist/data-edgecenter-project/index.js +153 -0
  53. package/dist/data-edgecenter-region/index.d.ts +54 -0
  54. package/dist/data-edgecenter-region/index.js +111 -0
  55. package/dist/data-edgecenter-reseller-images/index.d.ts +91 -0
  56. package/dist/data-edgecenter-reseller-images/index.js +198 -0
  57. package/dist/data-edgecenter-reseller-images-v2/index.d.ts +101 -0
  58. package/dist/data-edgecenter-reseller-images-v2/index.js +218 -0
  59. package/dist/data-edgecenter-reseller-networks/index.d.ts +269 -0
  60. package/dist/data-edgecenter-reseller-networks/index.js +610 -0
  61. package/dist/data-edgecenter-reservedfixedip/index.d.ts +141 -0
  62. package/dist/data-edgecenter-reservedfixedip/index.js +311 -0
  63. package/dist/data-edgecenter-router/index.d.ts +245 -0
  64. package/dist/data-edgecenter-router/index.js +538 -0
  65. package/dist/data-edgecenter-secret/index.d.ts +109 -0
  66. package/dist/data-edgecenter-secret/index.js +235 -0
  67. package/dist/data-edgecenter-securitygroup/index.d.ts +211 -0
  68. package/dist/data-edgecenter-securitygroup/index.js +450 -0
  69. package/dist/data-edgecenter-servergroup/index.d.ts +137 -0
  70. package/dist/data-edgecenter-servergroup/index.js +289 -0
  71. package/dist/data-edgecenter-snapshot/index.d.ts +129 -0
  72. package/dist/data-edgecenter-snapshot/index.js +281 -0
  73. package/dist/data-edgecenter-storage-s3/index.d.ts +71 -0
  74. package/dist/data-edgecenter-storage-s3/index.js +157 -0
  75. package/dist/data-edgecenter-storage-s3-bucket/index.d.ts +64 -0
  76. package/dist/data-edgecenter-storage-s3-bucket/index.js +131 -0
  77. package/dist/data-edgecenter-subnet/index.d.ts +253 -0
  78. package/dist/data-edgecenter-subnet/index.js +536 -0
  79. package/dist/data-edgecenter-useractions-subscription-amqp/index.d.ts +48 -0
  80. package/dist/data-edgecenter-useractions-subscription-amqp/index.js +107 -0
  81. package/dist/data-edgecenter-useractions-subscription-log/index.d.ts +47 -0
  82. package/dist/data-edgecenter-useractions-subscription-log/index.js +103 -0
  83. package/dist/data-edgecenter-volume/index.d.ts +169 -0
  84. package/dist/data-edgecenter-volume/index.js +343 -0
  85. package/dist/dns-zone/index.d.ts +54 -0
  86. package/dist/dns-zone/index.js +111 -0
  87. package/dist/dns-zone-record/index.d.ts +494 -0
  88. package/dist/dns-zone-record/index.js +1217 -0
  89. package/dist/floatingip/index.d.ts +185 -0
  90. package/dist/floatingip/index.js +394 -0
  91. package/dist/index.d.ts +83 -0
  92. package/dist/index.js +84 -0
  93. package/dist/instance/index.d.ts +830 -0
  94. package/dist/instance/index.js +1948 -0
  95. package/dist/instance-port-security/index.d.ts +229 -0
  96. package/dist/instance-port-security/index.js +564 -0
  97. package/dist/instance-v2/index.d.ts +552 -0
  98. package/dist/instance-v2/index.js +1244 -0
  99. package/dist/k8s/index.d.ts +342 -0
  100. package/dist/k8s/index.js +856 -0
  101. package/dist/k8s-pool/index.d.ts +227 -0
  102. package/dist/k8s-pool/index.js +514 -0
  103. package/dist/keypair/index.d.ts +88 -0
  104. package/dist/keypair/index.js +185 -0
  105. package/dist/lazy-index.d.ts +0 -0
  106. package/dist/lazy-index.js +84 -0
  107. package/dist/lb-l7policy/index.d.ts +244 -0
  108. package/dist/lb-l7policy/index.js +566 -0
  109. package/dist/lb-l7rule/index.d.ts +219 -0
  110. package/dist/lb-l7rule/index.js +506 -0
  111. package/dist/lblistener/index.d.ts +264 -0
  112. package/dist/lblistener/index.js +597 -0
  113. package/dist/lbmember/index.d.ts +207 -0
  114. package/dist/lbmember/index.js +473 -0
  115. package/dist/lbpool/index.d.ts +387 -0
  116. package/dist/lbpool/index.js +934 -0
  117. package/dist/lifecyclepolicy/index.d.ts +476 -0
  118. package/dist/lifecyclepolicy/index.js +1188 -0
  119. package/dist/loadbalancer/index.d.ts +341 -0
  120. package/dist/loadbalancer/index.js +851 -0
  121. package/dist/loadbalancerv2/index.d.ts +253 -0
  122. package/dist/loadbalancerv2/index.js +562 -0
  123. package/dist/network/index.d.ts +187 -0
  124. package/dist/network/index.js +382 -0
  125. package/dist/project/index.d.ts +68 -0
  126. package/dist/project/index.js +150 -0
  127. package/dist/protection-resource/index.d.ts +179 -0
  128. package/dist/protection-resource/index.js +381 -0
  129. package/dist/protection-resource-alias/index.d.ts +64 -0
  130. package/dist/protection-resource-alias/index.js +131 -0
  131. package/dist/protection-resource-alias-certificate/index.d.ts +88 -0
  132. package/dist/protection-resource-alias-certificate/index.js +185 -0
  133. package/dist/protection-resource-blacklist-entry/index.d.ts +64 -0
  134. package/dist/protection-resource-blacklist-entry/index.js +131 -0
  135. package/dist/protection-resource-certificate/index.d.ts +88 -0
  136. package/dist/protection-resource-certificate/index.js +185 -0
  137. package/dist/protection-resource-header/index.d.ts +74 -0
  138. package/dist/protection-resource-header/index.js +151 -0
  139. package/dist/protection-resource-origin/index.d.ts +119 -0
  140. package/dist/protection-resource-origin/index.js +246 -0
  141. package/dist/protection-resource-whitelist-entry/index.d.ts +64 -0
  142. package/dist/protection-resource-whitelist-entry/index.js +131 -0
  143. package/dist/provider/index.d.ts +182 -0
  144. package/dist/provider/index.js +384 -0
  145. package/dist/reseller-images/index.d.ts +120 -0
  146. package/dist/reseller-images/index.js +272 -0
  147. package/dist/reseller-images-v2/index.d.ts +130 -0
  148. package/dist/reseller-images-v2/index.js +292 -0
  149. package/dist/reservedfixedip/index.d.ts +230 -0
  150. package/dist/reservedfixedip/index.js +513 -0
  151. package/dist/router/index.d.ts +322 -0
  152. package/dist/router/index.js +755 -0
  153. package/dist/secret/index.d.ts +146 -0
  154. package/dist/secret/index.js +311 -0
  155. package/dist/securitygroup/index.d.ts +291 -0
  156. package/dist/securitygroup/index.js +654 -0
  157. package/dist/servergroup/index.d.ts +143 -0
  158. package/dist/servergroup/index.js +302 -0
  159. package/dist/snapshot/index.d.ts +185 -0
  160. package/dist/snapshot/index.js +383 -0
  161. package/dist/storage-s3/index.d.ts +141 -0
  162. package/dist/storage-s3/index.js +292 -0
  163. package/dist/storage-s3-bucket/index.d.ts +64 -0
  164. package/dist/storage-s3-bucket/index.js +131 -0
  165. package/dist/subnet/index.d.ts +346 -0
  166. package/dist/subnet/index.js +751 -0
  167. package/dist/useractions-subscription-amqp/index.d.ts +87 -0
  168. package/dist/useractions-subscription-amqp/index.js +180 -0
  169. package/dist/useractions-subscription-log/index.d.ts +74 -0
  170. package/dist/useractions-subscription-log/index.js +151 -0
  171. package/dist/volume/index.d.ts +208 -0
  172. package/dist/volume/index.js +424 -0
  173. package/package.json +51 -0
@@ -0,0 +1,934 @@
1
+ // https://registry.terraform.io/providers/edge-center/edgecenter/0.10.4/docs/resources/lbpool
2
+ // generated from terraform resource schema
3
+ import * as cdktf from 'cdktf';
4
+ export function lbpoolHealthMonitorToTerraform(struct) {
5
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
6
+ return struct;
7
+ }
8
+ if (cdktf.isComplexElement(struct)) {
9
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
10
+ }
11
+ return {
12
+ delay: cdktf.numberToTerraform(struct.delay),
13
+ expected_codes: cdktf.stringToTerraform(struct.expectedCodes),
14
+ http_method: cdktf.stringToTerraform(struct.httpMethod),
15
+ id: cdktf.stringToTerraform(struct.id),
16
+ max_retries: cdktf.numberToTerraform(struct.maxRetries),
17
+ max_retries_down: cdktf.numberToTerraform(struct.maxRetriesDown),
18
+ timeout: cdktf.numberToTerraform(struct.timeout),
19
+ type: cdktf.stringToTerraform(struct.type),
20
+ url_path: cdktf.stringToTerraform(struct.urlPath),
21
+ };
22
+ }
23
+ export function lbpoolHealthMonitorToHclTerraform(struct) {
24
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
25
+ return struct;
26
+ }
27
+ if (cdktf.isComplexElement(struct)) {
28
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
29
+ }
30
+ const attrs = {
31
+ delay: {
32
+ value: cdktf.numberToHclTerraform(struct.delay),
33
+ isBlock: false,
34
+ type: "simple",
35
+ storageClassType: "number",
36
+ },
37
+ expected_codes: {
38
+ value: cdktf.stringToHclTerraform(struct.expectedCodes),
39
+ isBlock: false,
40
+ type: "simple",
41
+ storageClassType: "string",
42
+ },
43
+ http_method: {
44
+ value: cdktf.stringToHclTerraform(struct.httpMethod),
45
+ isBlock: false,
46
+ type: "simple",
47
+ storageClassType: "string",
48
+ },
49
+ id: {
50
+ value: cdktf.stringToHclTerraform(struct.id),
51
+ isBlock: false,
52
+ type: "simple",
53
+ storageClassType: "string",
54
+ },
55
+ max_retries: {
56
+ value: cdktf.numberToHclTerraform(struct.maxRetries),
57
+ isBlock: false,
58
+ type: "simple",
59
+ storageClassType: "number",
60
+ },
61
+ max_retries_down: {
62
+ value: cdktf.numberToHclTerraform(struct.maxRetriesDown),
63
+ isBlock: false,
64
+ type: "simple",
65
+ storageClassType: "number",
66
+ },
67
+ timeout: {
68
+ value: cdktf.numberToHclTerraform(struct.timeout),
69
+ isBlock: false,
70
+ type: "simple",
71
+ storageClassType: "number",
72
+ },
73
+ type: {
74
+ value: cdktf.stringToHclTerraform(struct.type),
75
+ isBlock: false,
76
+ type: "simple",
77
+ storageClassType: "string",
78
+ },
79
+ url_path: {
80
+ value: cdktf.stringToHclTerraform(struct.urlPath),
81
+ isBlock: false,
82
+ type: "simple",
83
+ storageClassType: "string",
84
+ },
85
+ };
86
+ // remove undefined attributes
87
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
88
+ }
89
+ export class LbpoolHealthMonitorOutputReference extends cdktf.ComplexObject {
90
+ isEmptyObject = false;
91
+ /**
92
+ * @param terraformResource The parent resource
93
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
94
+ */
95
+ constructor(terraformResource, terraformAttribute) {
96
+ super(terraformResource, terraformAttribute, false, 0);
97
+ }
98
+ get internalValue() {
99
+ let hasAnyValues = this.isEmptyObject;
100
+ const internalValueResult = {};
101
+ if (this._delay !== undefined) {
102
+ hasAnyValues = true;
103
+ internalValueResult.delay = this._delay;
104
+ }
105
+ if (this._expectedCodes !== undefined) {
106
+ hasAnyValues = true;
107
+ internalValueResult.expectedCodes = this._expectedCodes;
108
+ }
109
+ if (this._httpMethod !== undefined) {
110
+ hasAnyValues = true;
111
+ internalValueResult.httpMethod = this._httpMethod;
112
+ }
113
+ if (this._id !== undefined) {
114
+ hasAnyValues = true;
115
+ internalValueResult.id = this._id;
116
+ }
117
+ if (this._maxRetries !== undefined) {
118
+ hasAnyValues = true;
119
+ internalValueResult.maxRetries = this._maxRetries;
120
+ }
121
+ if (this._maxRetriesDown !== undefined) {
122
+ hasAnyValues = true;
123
+ internalValueResult.maxRetriesDown = this._maxRetriesDown;
124
+ }
125
+ if (this._timeout !== undefined) {
126
+ hasAnyValues = true;
127
+ internalValueResult.timeout = this._timeout;
128
+ }
129
+ if (this._type !== undefined) {
130
+ hasAnyValues = true;
131
+ internalValueResult.type = this._type;
132
+ }
133
+ if (this._urlPath !== undefined) {
134
+ hasAnyValues = true;
135
+ internalValueResult.urlPath = this._urlPath;
136
+ }
137
+ return hasAnyValues ? internalValueResult : undefined;
138
+ }
139
+ set internalValue(value) {
140
+ if (value === undefined) {
141
+ this.isEmptyObject = false;
142
+ this._delay = undefined;
143
+ this._expectedCodes = undefined;
144
+ this._httpMethod = undefined;
145
+ this._id = undefined;
146
+ this._maxRetries = undefined;
147
+ this._maxRetriesDown = undefined;
148
+ this._timeout = undefined;
149
+ this._type = undefined;
150
+ this._urlPath = undefined;
151
+ }
152
+ else {
153
+ this.isEmptyObject = Object.keys(value).length === 0;
154
+ this._delay = value.delay;
155
+ this._expectedCodes = value.expectedCodes;
156
+ this._httpMethod = value.httpMethod;
157
+ this._id = value.id;
158
+ this._maxRetries = value.maxRetries;
159
+ this._maxRetriesDown = value.maxRetriesDown;
160
+ this._timeout = value.timeout;
161
+ this._type = value.type;
162
+ this._urlPath = value.urlPath;
163
+ }
164
+ }
165
+ // delay - computed: false, optional: false, required: true
166
+ _delay;
167
+ get delay() {
168
+ return this.getNumberAttribute('delay');
169
+ }
170
+ set delay(value) {
171
+ this._delay = value;
172
+ }
173
+ // Temporarily expose input value. Use with caution.
174
+ get delayInput() {
175
+ return this._delay;
176
+ }
177
+ // expected_codes - computed: true, optional: true, required: false
178
+ _expectedCodes;
179
+ get expectedCodes() {
180
+ return this.getStringAttribute('expected_codes');
181
+ }
182
+ set expectedCodes(value) {
183
+ this._expectedCodes = value;
184
+ }
185
+ resetExpectedCodes() {
186
+ this._expectedCodes = undefined;
187
+ }
188
+ // Temporarily expose input value. Use with caution.
189
+ get expectedCodesInput() {
190
+ return this._expectedCodes;
191
+ }
192
+ // http_method - computed: true, optional: true, required: false
193
+ _httpMethod;
194
+ get httpMethod() {
195
+ return this.getStringAttribute('http_method');
196
+ }
197
+ set httpMethod(value) {
198
+ this._httpMethod = value;
199
+ }
200
+ resetHttpMethod() {
201
+ this._httpMethod = undefined;
202
+ }
203
+ // Temporarily expose input value. Use with caution.
204
+ get httpMethodInput() {
205
+ return this._httpMethod;
206
+ }
207
+ // id - computed: true, optional: true, required: false
208
+ _id;
209
+ get id() {
210
+ return this.getStringAttribute('id');
211
+ }
212
+ set id(value) {
213
+ this._id = value;
214
+ }
215
+ resetId() {
216
+ this._id = undefined;
217
+ }
218
+ // Temporarily expose input value. Use with caution.
219
+ get idInput() {
220
+ return this._id;
221
+ }
222
+ // max_retries - computed: false, optional: false, required: true
223
+ _maxRetries;
224
+ get maxRetries() {
225
+ return this.getNumberAttribute('max_retries');
226
+ }
227
+ set maxRetries(value) {
228
+ this._maxRetries = value;
229
+ }
230
+ // Temporarily expose input value. Use with caution.
231
+ get maxRetriesInput() {
232
+ return this._maxRetries;
233
+ }
234
+ // max_retries_down - computed: true, optional: true, required: false
235
+ _maxRetriesDown;
236
+ get maxRetriesDown() {
237
+ return this.getNumberAttribute('max_retries_down');
238
+ }
239
+ set maxRetriesDown(value) {
240
+ this._maxRetriesDown = value;
241
+ }
242
+ resetMaxRetriesDown() {
243
+ this._maxRetriesDown = undefined;
244
+ }
245
+ // Temporarily expose input value. Use with caution.
246
+ get maxRetriesDownInput() {
247
+ return this._maxRetriesDown;
248
+ }
249
+ // timeout - computed: false, optional: false, required: true
250
+ _timeout;
251
+ get timeout() {
252
+ return this.getNumberAttribute('timeout');
253
+ }
254
+ set timeout(value) {
255
+ this._timeout = value;
256
+ }
257
+ // Temporarily expose input value. Use with caution.
258
+ get timeoutInput() {
259
+ return this._timeout;
260
+ }
261
+ // type - computed: false, optional: false, required: true
262
+ _type;
263
+ get type() {
264
+ return this.getStringAttribute('type');
265
+ }
266
+ set type(value) {
267
+ this._type = value;
268
+ }
269
+ // Temporarily expose input value. Use with caution.
270
+ get typeInput() {
271
+ return this._type;
272
+ }
273
+ // url_path - computed: true, optional: true, required: false
274
+ _urlPath;
275
+ get urlPath() {
276
+ return this.getStringAttribute('url_path');
277
+ }
278
+ set urlPath(value) {
279
+ this._urlPath = value;
280
+ }
281
+ resetUrlPath() {
282
+ this._urlPath = undefined;
283
+ }
284
+ // Temporarily expose input value. Use with caution.
285
+ get urlPathInput() {
286
+ return this._urlPath;
287
+ }
288
+ }
289
+ export function lbpoolSessionPersistenceToTerraform(struct) {
290
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
291
+ return struct;
292
+ }
293
+ if (cdktf.isComplexElement(struct)) {
294
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
295
+ }
296
+ return {
297
+ cookie_name: cdktf.stringToTerraform(struct.cookieName),
298
+ persistence_granularity: cdktf.stringToTerraform(struct.persistenceGranularity),
299
+ persistence_timeout: cdktf.numberToTerraform(struct.persistenceTimeout),
300
+ type: cdktf.stringToTerraform(struct.type),
301
+ };
302
+ }
303
+ export function lbpoolSessionPersistenceToHclTerraform(struct) {
304
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
305
+ return struct;
306
+ }
307
+ if (cdktf.isComplexElement(struct)) {
308
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
309
+ }
310
+ const attrs = {
311
+ cookie_name: {
312
+ value: cdktf.stringToHclTerraform(struct.cookieName),
313
+ isBlock: false,
314
+ type: "simple",
315
+ storageClassType: "string",
316
+ },
317
+ persistence_granularity: {
318
+ value: cdktf.stringToHclTerraform(struct.persistenceGranularity),
319
+ isBlock: false,
320
+ type: "simple",
321
+ storageClassType: "string",
322
+ },
323
+ persistence_timeout: {
324
+ value: cdktf.numberToHclTerraform(struct.persistenceTimeout),
325
+ isBlock: false,
326
+ type: "simple",
327
+ storageClassType: "number",
328
+ },
329
+ type: {
330
+ value: cdktf.stringToHclTerraform(struct.type),
331
+ isBlock: false,
332
+ type: "simple",
333
+ storageClassType: "string",
334
+ },
335
+ };
336
+ // remove undefined attributes
337
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
338
+ }
339
+ export class LbpoolSessionPersistenceOutputReference extends cdktf.ComplexObject {
340
+ isEmptyObject = false;
341
+ /**
342
+ * @param terraformResource The parent resource
343
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
344
+ */
345
+ constructor(terraformResource, terraformAttribute) {
346
+ super(terraformResource, terraformAttribute, false, 0);
347
+ }
348
+ get internalValue() {
349
+ let hasAnyValues = this.isEmptyObject;
350
+ const internalValueResult = {};
351
+ if (this._cookieName !== undefined) {
352
+ hasAnyValues = true;
353
+ internalValueResult.cookieName = this._cookieName;
354
+ }
355
+ if (this._persistenceGranularity !== undefined) {
356
+ hasAnyValues = true;
357
+ internalValueResult.persistenceGranularity = this._persistenceGranularity;
358
+ }
359
+ if (this._persistenceTimeout !== undefined) {
360
+ hasAnyValues = true;
361
+ internalValueResult.persistenceTimeout = this._persistenceTimeout;
362
+ }
363
+ if (this._type !== undefined) {
364
+ hasAnyValues = true;
365
+ internalValueResult.type = this._type;
366
+ }
367
+ return hasAnyValues ? internalValueResult : undefined;
368
+ }
369
+ set internalValue(value) {
370
+ if (value === undefined) {
371
+ this.isEmptyObject = false;
372
+ this._cookieName = undefined;
373
+ this._persistenceGranularity = undefined;
374
+ this._persistenceTimeout = undefined;
375
+ this._type = undefined;
376
+ }
377
+ else {
378
+ this.isEmptyObject = Object.keys(value).length === 0;
379
+ this._cookieName = value.cookieName;
380
+ this._persistenceGranularity = value.persistenceGranularity;
381
+ this._persistenceTimeout = value.persistenceTimeout;
382
+ this._type = value.type;
383
+ }
384
+ }
385
+ // cookie_name - computed: true, optional: true, required: false
386
+ _cookieName;
387
+ get cookieName() {
388
+ return this.getStringAttribute('cookie_name');
389
+ }
390
+ set cookieName(value) {
391
+ this._cookieName = value;
392
+ }
393
+ resetCookieName() {
394
+ this._cookieName = undefined;
395
+ }
396
+ // Temporarily expose input value. Use with caution.
397
+ get cookieNameInput() {
398
+ return this._cookieName;
399
+ }
400
+ // persistence_granularity - computed: true, optional: true, required: false
401
+ _persistenceGranularity;
402
+ get persistenceGranularity() {
403
+ return this.getStringAttribute('persistence_granularity');
404
+ }
405
+ set persistenceGranularity(value) {
406
+ this._persistenceGranularity = value;
407
+ }
408
+ resetPersistenceGranularity() {
409
+ this._persistenceGranularity = undefined;
410
+ }
411
+ // Temporarily expose input value. Use with caution.
412
+ get persistenceGranularityInput() {
413
+ return this._persistenceGranularity;
414
+ }
415
+ // persistence_timeout - computed: true, optional: true, required: false
416
+ _persistenceTimeout;
417
+ get persistenceTimeout() {
418
+ return this.getNumberAttribute('persistence_timeout');
419
+ }
420
+ set persistenceTimeout(value) {
421
+ this._persistenceTimeout = value;
422
+ }
423
+ resetPersistenceTimeout() {
424
+ this._persistenceTimeout = undefined;
425
+ }
426
+ // Temporarily expose input value. Use with caution.
427
+ get persistenceTimeoutInput() {
428
+ return this._persistenceTimeout;
429
+ }
430
+ // type - computed: false, optional: true, required: false
431
+ _type;
432
+ get type() {
433
+ return this.getStringAttribute('type');
434
+ }
435
+ set type(value) {
436
+ this._type = value;
437
+ }
438
+ resetType() {
439
+ this._type = undefined;
440
+ }
441
+ // Temporarily expose input value. Use with caution.
442
+ get typeInput() {
443
+ return this._type;
444
+ }
445
+ }
446
+ export function lbpoolTimeoutsToTerraform(struct) {
447
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
448
+ return struct;
449
+ }
450
+ if (cdktf.isComplexElement(struct)) {
451
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
452
+ }
453
+ return {
454
+ create: cdktf.stringToTerraform(struct.create),
455
+ delete: cdktf.stringToTerraform(struct.delete),
456
+ };
457
+ }
458
+ export function lbpoolTimeoutsToHclTerraform(struct) {
459
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
460
+ return struct;
461
+ }
462
+ if (cdktf.isComplexElement(struct)) {
463
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
464
+ }
465
+ const attrs = {
466
+ create: {
467
+ value: cdktf.stringToHclTerraform(struct.create),
468
+ isBlock: false,
469
+ type: "simple",
470
+ storageClassType: "string",
471
+ },
472
+ delete: {
473
+ value: cdktf.stringToHclTerraform(struct.delete),
474
+ isBlock: false,
475
+ type: "simple",
476
+ storageClassType: "string",
477
+ },
478
+ };
479
+ // remove undefined attributes
480
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
481
+ }
482
+ export class LbpoolTimeoutsOutputReference extends cdktf.ComplexObject {
483
+ isEmptyObject = false;
484
+ resolvableValue;
485
+ /**
486
+ * @param terraformResource The parent resource
487
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
488
+ */
489
+ constructor(terraformResource, terraformAttribute) {
490
+ super(terraformResource, terraformAttribute, false);
491
+ }
492
+ get internalValue() {
493
+ if (this.resolvableValue) {
494
+ return this.resolvableValue;
495
+ }
496
+ let hasAnyValues = this.isEmptyObject;
497
+ const internalValueResult = {};
498
+ if (this._create !== undefined) {
499
+ hasAnyValues = true;
500
+ internalValueResult.create = this._create;
501
+ }
502
+ if (this._delete !== undefined) {
503
+ hasAnyValues = true;
504
+ internalValueResult.delete = this._delete;
505
+ }
506
+ return hasAnyValues ? internalValueResult : undefined;
507
+ }
508
+ set internalValue(value) {
509
+ if (value === undefined) {
510
+ this.isEmptyObject = false;
511
+ this.resolvableValue = undefined;
512
+ this._create = undefined;
513
+ this._delete = undefined;
514
+ }
515
+ else if (cdktf.Tokenization.isResolvable(value)) {
516
+ this.isEmptyObject = false;
517
+ this.resolvableValue = value;
518
+ }
519
+ else {
520
+ this.isEmptyObject = Object.keys(value).length === 0;
521
+ this.resolvableValue = undefined;
522
+ this._create = value.create;
523
+ this._delete = value.delete;
524
+ }
525
+ }
526
+ // create - computed: false, optional: true, required: false
527
+ _create;
528
+ get create() {
529
+ return this.getStringAttribute('create');
530
+ }
531
+ set create(value) {
532
+ this._create = value;
533
+ }
534
+ resetCreate() {
535
+ this._create = undefined;
536
+ }
537
+ // Temporarily expose input value. Use with caution.
538
+ get createInput() {
539
+ return this._create;
540
+ }
541
+ // delete - computed: false, optional: true, required: false
542
+ _delete;
543
+ get delete() {
544
+ return this.getStringAttribute('delete');
545
+ }
546
+ set delete(value) {
547
+ this._delete = value;
548
+ }
549
+ resetDelete() {
550
+ this._delete = undefined;
551
+ }
552
+ // Temporarily expose input value. Use with caution.
553
+ get deleteInput() {
554
+ return this._delete;
555
+ }
556
+ }
557
+ /**
558
+ * Represents a {@link https://registry.terraform.io/providers/edge-center/edgecenter/0.10.4/docs/resources/lbpool edgecenter_lbpool}
559
+ */
560
+ export class Lbpool extends cdktf.TerraformResource {
561
+ // =================
562
+ // STATIC PROPERTIES
563
+ // =================
564
+ static tfResourceType = "edgecenter_lbpool";
565
+ // ==============
566
+ // STATIC Methods
567
+ // ==============
568
+ /**
569
+ * Generates CDKTF code for importing a Lbpool resource upon running "cdktf plan <stack-name>"
570
+ * @param scope The scope in which to define this construct
571
+ * @param importToId The construct id used in the generated config for the Lbpool to import
572
+ * @param importFromId The id of the existing Lbpool that should be imported. Refer to the {@link https://registry.terraform.io/providers/edge-center/edgecenter/0.10.4/docs/resources/lbpool#import import section} in the documentation of this resource for the id to use
573
+ * @param provider? Optional instance of the provider where the Lbpool to import is found
574
+ */
575
+ static generateConfigForImport(scope, importToId, importFromId, provider) {
576
+ return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "edgecenter_lbpool", importId: importFromId, provider });
577
+ }
578
+ // ===========
579
+ // INITIALIZER
580
+ // ===========
581
+ /**
582
+ * Create a new {@link https://registry.terraform.io/providers/edge-center/edgecenter/0.10.4/docs/resources/lbpool edgecenter_lbpool} Resource
583
+ *
584
+ * @param scope The scope in which to define this construct
585
+ * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
586
+ * @param options LbpoolConfig
587
+ */
588
+ constructor(scope, id, config) {
589
+ super(scope, id, {
590
+ terraformResourceType: 'edgecenter_lbpool',
591
+ terraformGeneratorMetadata: {
592
+ providerName: 'edgecenter',
593
+ providerVersion: '0.10.4',
594
+ providerVersionConstraint: '0.10.4'
595
+ },
596
+ provider: config.provider,
597
+ dependsOn: config.dependsOn,
598
+ count: config.count,
599
+ lifecycle: config.lifecycle,
600
+ provisioners: config.provisioners,
601
+ connection: config.connection,
602
+ forEach: config.forEach
603
+ });
604
+ this._id = config.id;
605
+ this._lastUpdated = config.lastUpdated;
606
+ this._lbAlgorithm = config.lbAlgorithm;
607
+ this._listenerId = config.listenerId;
608
+ this._loadbalancerId = config.loadbalancerId;
609
+ this._name = config.name;
610
+ this._projectId = config.projectId;
611
+ this._projectName = config.projectName;
612
+ this._protocol = config.protocol;
613
+ this._regionId = config.regionId;
614
+ this._regionName = config.regionName;
615
+ this._healthMonitor.internalValue = config.healthMonitor;
616
+ this._sessionPersistence.internalValue = config.sessionPersistence;
617
+ this._timeouts.internalValue = config.timeouts;
618
+ }
619
+ // ==========
620
+ // ATTRIBUTES
621
+ // ==========
622
+ // id - computed: true, optional: true, required: false
623
+ _id;
624
+ get id() {
625
+ return this.getStringAttribute('id');
626
+ }
627
+ set id(value) {
628
+ this._id = value;
629
+ }
630
+ resetId() {
631
+ this._id = undefined;
632
+ }
633
+ // Temporarily expose input value. Use with caution.
634
+ get idInput() {
635
+ return this._id;
636
+ }
637
+ // last_updated - computed: true, optional: true, required: false
638
+ _lastUpdated;
639
+ get lastUpdated() {
640
+ return this.getStringAttribute('last_updated');
641
+ }
642
+ set lastUpdated(value) {
643
+ this._lastUpdated = value;
644
+ }
645
+ resetLastUpdated() {
646
+ this._lastUpdated = undefined;
647
+ }
648
+ // Temporarily expose input value. Use with caution.
649
+ get lastUpdatedInput() {
650
+ return this._lastUpdated;
651
+ }
652
+ // lb_algorithm - computed: false, optional: false, required: true
653
+ _lbAlgorithm;
654
+ get lbAlgorithm() {
655
+ return this.getStringAttribute('lb_algorithm');
656
+ }
657
+ set lbAlgorithm(value) {
658
+ this._lbAlgorithm = value;
659
+ }
660
+ // Temporarily expose input value. Use with caution.
661
+ get lbAlgorithmInput() {
662
+ return this._lbAlgorithm;
663
+ }
664
+ // listener_id - computed: false, optional: true, required: false
665
+ _listenerId;
666
+ get listenerId() {
667
+ return this.getStringAttribute('listener_id');
668
+ }
669
+ set listenerId(value) {
670
+ this._listenerId = value;
671
+ }
672
+ resetListenerId() {
673
+ this._listenerId = undefined;
674
+ }
675
+ // Temporarily expose input value. Use with caution.
676
+ get listenerIdInput() {
677
+ return this._listenerId;
678
+ }
679
+ // loadbalancer_id - computed: false, optional: true, required: false
680
+ _loadbalancerId;
681
+ get loadbalancerId() {
682
+ return this.getStringAttribute('loadbalancer_id');
683
+ }
684
+ set loadbalancerId(value) {
685
+ this._loadbalancerId = value;
686
+ }
687
+ resetLoadbalancerId() {
688
+ this._loadbalancerId = undefined;
689
+ }
690
+ // Temporarily expose input value. Use with caution.
691
+ get loadbalancerIdInput() {
692
+ return this._loadbalancerId;
693
+ }
694
+ // name - computed: false, optional: false, required: true
695
+ _name;
696
+ get name() {
697
+ return this.getStringAttribute('name');
698
+ }
699
+ set name(value) {
700
+ this._name = value;
701
+ }
702
+ // Temporarily expose input value. Use with caution.
703
+ get nameInput() {
704
+ return this._name;
705
+ }
706
+ // project_id - computed: false, optional: true, required: false
707
+ _projectId;
708
+ get projectId() {
709
+ return this.getNumberAttribute('project_id');
710
+ }
711
+ set projectId(value) {
712
+ this._projectId = value;
713
+ }
714
+ resetProjectId() {
715
+ this._projectId = undefined;
716
+ }
717
+ // Temporarily expose input value. Use with caution.
718
+ get projectIdInput() {
719
+ return this._projectId;
720
+ }
721
+ // project_name - computed: false, optional: true, required: false
722
+ _projectName;
723
+ get projectName() {
724
+ return this.getStringAttribute('project_name');
725
+ }
726
+ set projectName(value) {
727
+ this._projectName = value;
728
+ }
729
+ resetProjectName() {
730
+ this._projectName = undefined;
731
+ }
732
+ // Temporarily expose input value. Use with caution.
733
+ get projectNameInput() {
734
+ return this._projectName;
735
+ }
736
+ // protocol - computed: false, optional: false, required: true
737
+ _protocol;
738
+ get protocol() {
739
+ return this.getStringAttribute('protocol');
740
+ }
741
+ set protocol(value) {
742
+ this._protocol = value;
743
+ }
744
+ // Temporarily expose input value. Use with caution.
745
+ get protocolInput() {
746
+ return this._protocol;
747
+ }
748
+ // region_id - computed: false, optional: true, required: false
749
+ _regionId;
750
+ get regionId() {
751
+ return this.getNumberAttribute('region_id');
752
+ }
753
+ set regionId(value) {
754
+ this._regionId = value;
755
+ }
756
+ resetRegionId() {
757
+ this._regionId = undefined;
758
+ }
759
+ // Temporarily expose input value. Use with caution.
760
+ get regionIdInput() {
761
+ return this._regionId;
762
+ }
763
+ // region_name - computed: false, optional: true, required: false
764
+ _regionName;
765
+ get regionName() {
766
+ return this.getStringAttribute('region_name');
767
+ }
768
+ set regionName(value) {
769
+ this._regionName = value;
770
+ }
771
+ resetRegionName() {
772
+ this._regionName = undefined;
773
+ }
774
+ // Temporarily expose input value. Use with caution.
775
+ get regionNameInput() {
776
+ return this._regionName;
777
+ }
778
+ // health_monitor - computed: false, optional: true, required: false
779
+ _healthMonitor = new LbpoolHealthMonitorOutputReference(this, "health_monitor");
780
+ get healthMonitor() {
781
+ return this._healthMonitor;
782
+ }
783
+ putHealthMonitor(value) {
784
+ this._healthMonitor.internalValue = value;
785
+ }
786
+ resetHealthMonitor() {
787
+ this._healthMonitor.internalValue = undefined;
788
+ }
789
+ // Temporarily expose input value. Use with caution.
790
+ get healthMonitorInput() {
791
+ return this._healthMonitor.internalValue;
792
+ }
793
+ // session_persistence - computed: false, optional: true, required: false
794
+ _sessionPersistence = new LbpoolSessionPersistenceOutputReference(this, "session_persistence");
795
+ get sessionPersistence() {
796
+ return this._sessionPersistence;
797
+ }
798
+ putSessionPersistence(value) {
799
+ this._sessionPersistence.internalValue = value;
800
+ }
801
+ resetSessionPersistence() {
802
+ this._sessionPersistence.internalValue = undefined;
803
+ }
804
+ // Temporarily expose input value. Use with caution.
805
+ get sessionPersistenceInput() {
806
+ return this._sessionPersistence.internalValue;
807
+ }
808
+ // timeouts - computed: false, optional: true, required: false
809
+ _timeouts = new LbpoolTimeoutsOutputReference(this, "timeouts");
810
+ get timeouts() {
811
+ return this._timeouts;
812
+ }
813
+ putTimeouts(value) {
814
+ this._timeouts.internalValue = value;
815
+ }
816
+ resetTimeouts() {
817
+ this._timeouts.internalValue = undefined;
818
+ }
819
+ // Temporarily expose input value. Use with caution.
820
+ get timeoutsInput() {
821
+ return this._timeouts.internalValue;
822
+ }
823
+ // =========
824
+ // SYNTHESIS
825
+ // =========
826
+ synthesizeAttributes() {
827
+ return {
828
+ id: cdktf.stringToTerraform(this._id),
829
+ last_updated: cdktf.stringToTerraform(this._lastUpdated),
830
+ lb_algorithm: cdktf.stringToTerraform(this._lbAlgorithm),
831
+ listener_id: cdktf.stringToTerraform(this._listenerId),
832
+ loadbalancer_id: cdktf.stringToTerraform(this._loadbalancerId),
833
+ name: cdktf.stringToTerraform(this._name),
834
+ project_id: cdktf.numberToTerraform(this._projectId),
835
+ project_name: cdktf.stringToTerraform(this._projectName),
836
+ protocol: cdktf.stringToTerraform(this._protocol),
837
+ region_id: cdktf.numberToTerraform(this._regionId),
838
+ region_name: cdktf.stringToTerraform(this._regionName),
839
+ health_monitor: lbpoolHealthMonitorToTerraform(this._healthMonitor.internalValue),
840
+ session_persistence: lbpoolSessionPersistenceToTerraform(this._sessionPersistence.internalValue),
841
+ timeouts: lbpoolTimeoutsToTerraform(this._timeouts.internalValue),
842
+ };
843
+ }
844
+ synthesizeHclAttributes() {
845
+ const attrs = {
846
+ id: {
847
+ value: cdktf.stringToHclTerraform(this._id),
848
+ isBlock: false,
849
+ type: "simple",
850
+ storageClassType: "string",
851
+ },
852
+ last_updated: {
853
+ value: cdktf.stringToHclTerraform(this._lastUpdated),
854
+ isBlock: false,
855
+ type: "simple",
856
+ storageClassType: "string",
857
+ },
858
+ lb_algorithm: {
859
+ value: cdktf.stringToHclTerraform(this._lbAlgorithm),
860
+ isBlock: false,
861
+ type: "simple",
862
+ storageClassType: "string",
863
+ },
864
+ listener_id: {
865
+ value: cdktf.stringToHclTerraform(this._listenerId),
866
+ isBlock: false,
867
+ type: "simple",
868
+ storageClassType: "string",
869
+ },
870
+ loadbalancer_id: {
871
+ value: cdktf.stringToHclTerraform(this._loadbalancerId),
872
+ isBlock: false,
873
+ type: "simple",
874
+ storageClassType: "string",
875
+ },
876
+ name: {
877
+ value: cdktf.stringToHclTerraform(this._name),
878
+ isBlock: false,
879
+ type: "simple",
880
+ storageClassType: "string",
881
+ },
882
+ project_id: {
883
+ value: cdktf.numberToHclTerraform(this._projectId),
884
+ isBlock: false,
885
+ type: "simple",
886
+ storageClassType: "number",
887
+ },
888
+ project_name: {
889
+ value: cdktf.stringToHclTerraform(this._projectName),
890
+ isBlock: false,
891
+ type: "simple",
892
+ storageClassType: "string",
893
+ },
894
+ protocol: {
895
+ value: cdktf.stringToHclTerraform(this._protocol),
896
+ isBlock: false,
897
+ type: "simple",
898
+ storageClassType: "string",
899
+ },
900
+ region_id: {
901
+ value: cdktf.numberToHclTerraform(this._regionId),
902
+ isBlock: false,
903
+ type: "simple",
904
+ storageClassType: "number",
905
+ },
906
+ region_name: {
907
+ value: cdktf.stringToHclTerraform(this._regionName),
908
+ isBlock: false,
909
+ type: "simple",
910
+ storageClassType: "string",
911
+ },
912
+ health_monitor: {
913
+ value: lbpoolHealthMonitorToHclTerraform(this._healthMonitor.internalValue),
914
+ isBlock: true,
915
+ type: "list",
916
+ storageClassType: "LbpoolHealthMonitorList",
917
+ },
918
+ session_persistence: {
919
+ value: lbpoolSessionPersistenceToHclTerraform(this._sessionPersistence.internalValue),
920
+ isBlock: true,
921
+ type: "list",
922
+ storageClassType: "LbpoolSessionPersistenceList",
923
+ },
924
+ timeouts: {
925
+ value: lbpoolTimeoutsToHclTerraform(this._timeouts.internalValue),
926
+ isBlock: true,
927
+ type: "struct",
928
+ storageClassType: "LbpoolTimeouts",
929
+ },
930
+ };
931
+ // remove undefined attributes
932
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
933
+ }
934
+ }