@cdktf-providers/newrelic 3.75.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 (147) hide show
  1. package/LICENSE +355 -0
  2. package/README.md +19 -0
  3. package/dist/account-management/index.d.ts +64 -0
  4. package/dist/account-management/index.js +131 -0
  5. package/dist/alert-channel/index.d.ts +347 -0
  6. package/dist/alert-channel/index.js +810 -0
  7. package/dist/alert-condition/index.d.ts +267 -0
  8. package/dist/alert-condition/index.js +587 -0
  9. package/dist/alert-muting-rule/index.d.ts +305 -0
  10. package/dist/alert-muting-rule/index.js +731 -0
  11. package/dist/alert-policy/index.d.ts +87 -0
  12. package/dist/alert-policy/index.js +180 -0
  13. package/dist/alert-policy-channel/index.d.ts +110 -0
  14. package/dist/alert-policy-channel/index.js +260 -0
  15. package/dist/api-access-key/index.d.ts +98 -0
  16. package/dist/api-access-key/index.js +230 -0
  17. package/dist/application-settings/index.d.ts +410 -0
  18. package/dist/application-settings/index.js +966 -0
  19. package/dist/browser-application/index.d.ts +101 -0
  20. package/dist/browser-application/index.js +215 -0
  21. package/dist/cloud-aws-govcloud-integrations/index.d.ts +1519 -0
  22. package/dist/cloud-aws-govcloud-integrations/index.js +3846 -0
  23. package/dist/cloud-aws-govcloud-link-account/index.d.ts +86 -0
  24. package/dist/cloud-aws-govcloud-link-account/index.js +177 -0
  25. package/dist/cloud-aws-integrations/index.d.ts +3294 -0
  26. package/dist/cloud-aws-integrations/index.js +8554 -0
  27. package/dist/cloud-aws-link-account/index.d.ts +86 -0
  28. package/dist/cloud-aws-link-account/index.js +177 -0
  29. package/dist/cloud-azure-integrations/index.d.ts +1662 -0
  30. package/dist/cloud-azure-integrations/index.js +4338 -0
  31. package/dist/cloud-azure-link-account/index.d.ts +105 -0
  32. package/dist/cloud-azure-link-account/index.js +214 -0
  33. package/dist/cloud-gcp-integrations/index.d.ts +1045 -0
  34. package/dist/cloud-gcp-integrations/index.js +2742 -0
  35. package/dist/cloud-gcp-link-account/index.d.ts +75 -0
  36. package/dist/cloud-gcp-link-account/index.js +154 -0
  37. package/dist/cloud-oci-link-account/index.d.ts +191 -0
  38. package/dist/cloud-oci-link-account/index.js +392 -0
  39. package/dist/data-newrelic-account/index.d.ts +77 -0
  40. package/dist/data-newrelic-account/index.js +160 -0
  41. package/dist/data-newrelic-alert-channel/index.d.ts +122 -0
  42. package/dist/data-newrelic-alert-channel/index.js +295 -0
  43. package/dist/data-newrelic-alert-policy/index.d.ts +78 -0
  44. package/dist/data-newrelic-alert-policy/index.js +165 -0
  45. package/dist/data-newrelic-application/index.d.ts +56 -0
  46. package/dist/data-newrelic-application/index.js +119 -0
  47. package/dist/data-newrelic-authentication-domain/index.d.ts +43 -0
  48. package/dist/data-newrelic-authentication-domain/index.js +92 -0
  49. package/dist/data-newrelic-cloud-account/index.d.ts +75 -0
  50. package/dist/data-newrelic-cloud-account/index.js +154 -0
  51. package/dist/data-newrelic-entity/index.d.ts +185 -0
  52. package/dist/data-newrelic-entity/index.js +414 -0
  53. package/dist/data-newrelic-group/index.d.ts +54 -0
  54. package/dist/data-newrelic-group/index.js +116 -0
  55. package/dist/data-newrelic-key-transaction/index.d.ts +78 -0
  56. package/dist/data-newrelic-key-transaction/index.js +165 -0
  57. package/dist/data-newrelic-notification-destination/index.d.ts +161 -0
  58. package/dist/data-newrelic-notification-destination/index.js +368 -0
  59. package/dist/data-newrelic-obfuscation-expression/index.d.ts +65 -0
  60. package/dist/data-newrelic-obfuscation-expression/index.js +134 -0
  61. package/dist/data-newrelic-service-level-alert-helper/index.d.ts +107 -0
  62. package/dist/data-newrelic-service-level-alert-helper/index.js +256 -0
  63. package/dist/data-newrelic-synthetics-private-location/index.d.ts +76 -0
  64. package/dist/data-newrelic-synthetics-private-location/index.js +157 -0
  65. package/dist/data-newrelic-synthetics-secure-credential/index.d.ts +67 -0
  66. package/dist/data-newrelic-synthetics-secure-credential/index.js +142 -0
  67. package/dist/data-newrelic-test-grok-pattern/index.d.ts +145 -0
  68. package/dist/data-newrelic-test-grok-pattern/index.js +312 -0
  69. package/dist/data-newrelic-user/index.d.ts +65 -0
  70. package/dist/data-newrelic-user/index.js +138 -0
  71. package/dist/data-partition-rule/index.d.ts +142 -0
  72. package/dist/data-partition-rule/index.js +327 -0
  73. package/dist/entity-tags/index.d.ts +152 -0
  74. package/dist/entity-tags/index.js +367 -0
  75. package/dist/events-to-metrics-rule/index.d.ts +98 -0
  76. package/dist/events-to-metrics-rule/index.js +204 -0
  77. package/dist/group/index.d.ts +75 -0
  78. package/dist/group/index.js +154 -0
  79. package/dist/index.d.ts +67 -0
  80. package/dist/index.js +68 -0
  81. package/dist/infra-alert-condition/index.d.ts +289 -0
  82. package/dist/infra-alert-condition/index.js +691 -0
  83. package/dist/insights-event/index.d.ts +182 -0
  84. package/dist/insights-event/index.js +427 -0
  85. package/dist/key-transaction/index.d.ts +96 -0
  86. package/dist/key-transaction/index.js +199 -0
  87. package/dist/lazy-index.d.ts +0 -0
  88. package/dist/lazy-index.js +68 -0
  89. package/dist/log-parsing-rule/index.d.ts +128 -0
  90. package/dist/log-parsing-rule/index.js +264 -0
  91. package/dist/monitor-downtime/index.d.ts +255 -0
  92. package/dist/monitor-downtime/index.js +603 -0
  93. package/dist/notification-channel/index.d.ts +236 -0
  94. package/dist/notification-channel/index.js +561 -0
  95. package/dist/notification-destination/index.d.ts +402 -0
  96. package/dist/notification-destination/index.js +1039 -0
  97. package/dist/nrql-alert-condition/index.d.ts +892 -0
  98. package/dist/nrql-alert-condition/index.js +2177 -0
  99. package/dist/nrql-drop-rule/index.d.ts +123 -0
  100. package/dist/nrql-drop-rule/index.js +291 -0
  101. package/dist/obfuscation-expression/index.d.ts +86 -0
  102. package/dist/obfuscation-expression/index.js +177 -0
  103. package/dist/obfuscation-rule/index.d.ts +169 -0
  104. package/dist/obfuscation-rule/index.js +372 -0
  105. package/dist/one-dashboard/index-structs/index.d.ts +2 -0
  106. package/dist/one-dashboard/index-structs/index.js +2 -0
  107. package/dist/one-dashboard/index-structs/structs0.d.ts +6996 -0
  108. package/dist/one-dashboard/index-structs/structs0.js +18191 -0
  109. package/dist/one-dashboard/index-structs/structs400.d.ts +3699 -0
  110. package/dist/one-dashboard/index-structs/structs400.js +9611 -0
  111. package/dist/one-dashboard/index.d.ts +112 -0
  112. package/dist/one-dashboard/index.js +232 -0
  113. package/dist/one-dashboard-json/index.d.ts +112 -0
  114. package/dist/one-dashboard-json/index.js +280 -0
  115. package/dist/one-dashboard-raw/index.d.ts +274 -0
  116. package/dist/one-dashboard-raw/index.js +666 -0
  117. package/dist/pipeline-cloud-rule/index.d.ts +86 -0
  118. package/dist/pipeline-cloud-rule/index.js +177 -0
  119. package/dist/provider/index.d.ts +160 -0
  120. package/dist/provider/index.js +378 -0
  121. package/dist/service-level/index.d.ts +501 -0
  122. package/dist/service-level/index.js +1425 -0
  123. package/dist/synthetics-alert-condition/index.d.ts +97 -0
  124. package/dist/synthetics-alert-condition/index.js +201 -0
  125. package/dist/synthetics-broken-links-monitor/index.d.ts +217 -0
  126. package/dist/synthetics-broken-links-monitor/index.js +474 -0
  127. package/dist/synthetics-cert-check-monitor/index.d.ts +222 -0
  128. package/dist/synthetics-cert-check-monitor/index.js +490 -0
  129. package/dist/synthetics-monitor/index.d.ts +404 -0
  130. package/dist/synthetics-monitor/index.js +885 -0
  131. package/dist/synthetics-multilocation-alert-condition/index.d.ts +177 -0
  132. package/dist/synthetics-multilocation-alert-condition/index.js +407 -0
  133. package/dist/synthetics-private-location/index.d.ts +90 -0
  134. package/dist/synthetics-private-location/index.js +193 -0
  135. package/dist/synthetics-script-monitor/index.d.ts +348 -0
  136. package/dist/synthetics-script-monitor/index.js +768 -0
  137. package/dist/synthetics-secure-credential/index.d.ts +132 -0
  138. package/dist/synthetics-secure-credential/index.js +306 -0
  139. package/dist/synthetics-step-monitor/index.d.ts +368 -0
  140. package/dist/synthetics-step-monitor/index.js +834 -0
  141. package/dist/user/index.d.ts +85 -0
  142. package/dist/user/index.js +174 -0
  143. package/dist/workflow/index.d.ts +441 -0
  144. package/dist/workflow/index.js +1066 -0
  145. package/dist/workload/index.d.ts +514 -0
  146. package/dist/workload/index.js +1283 -0
  147. package/package.json +50 -0
@@ -0,0 +1,731 @@
1
+ // https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/alert_muting_rule
2
+ // generated from terraform resource schema
3
+ import * as cdktf from 'cdktf';
4
+ export function alertMutingRuleConditionConditionsToTerraform(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
+ attribute: cdktf.stringToTerraform(struct.attribute),
13
+ operator: cdktf.stringToTerraform(struct.operator),
14
+ values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.values),
15
+ };
16
+ }
17
+ export function alertMutingRuleConditionConditionsToHclTerraform(struct) {
18
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
19
+ return struct;
20
+ }
21
+ if (cdktf.isComplexElement(struct)) {
22
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
23
+ }
24
+ const attrs = {
25
+ attribute: {
26
+ value: cdktf.stringToHclTerraform(struct.attribute),
27
+ isBlock: false,
28
+ type: "simple",
29
+ storageClassType: "string",
30
+ },
31
+ operator: {
32
+ value: cdktf.stringToHclTerraform(struct.operator),
33
+ isBlock: false,
34
+ type: "simple",
35
+ storageClassType: "string",
36
+ },
37
+ values: {
38
+ value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.values),
39
+ isBlock: false,
40
+ type: "list",
41
+ storageClassType: "stringList",
42
+ },
43
+ };
44
+ // remove undefined attributes
45
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
46
+ }
47
+ export class AlertMutingRuleConditionConditionsOutputReference extends cdktf.ComplexObject {
48
+ isEmptyObject = false;
49
+ resolvableValue;
50
+ /**
51
+ * @param terraformResource The parent resource
52
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
53
+ * @param complexObjectIndex the index of this item in the list
54
+ * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
55
+ */
56
+ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
57
+ super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
58
+ }
59
+ get internalValue() {
60
+ if (this.resolvableValue) {
61
+ return this.resolvableValue;
62
+ }
63
+ let hasAnyValues = this.isEmptyObject;
64
+ const internalValueResult = {};
65
+ if (this._attribute !== undefined) {
66
+ hasAnyValues = true;
67
+ internalValueResult.attribute = this._attribute;
68
+ }
69
+ if (this._operator !== undefined) {
70
+ hasAnyValues = true;
71
+ internalValueResult.operator = this._operator;
72
+ }
73
+ if (this._values !== undefined) {
74
+ hasAnyValues = true;
75
+ internalValueResult.values = this._values;
76
+ }
77
+ return hasAnyValues ? internalValueResult : undefined;
78
+ }
79
+ set internalValue(value) {
80
+ if (value === undefined) {
81
+ this.isEmptyObject = false;
82
+ this.resolvableValue = undefined;
83
+ this._attribute = undefined;
84
+ this._operator = undefined;
85
+ this._values = undefined;
86
+ }
87
+ else if (cdktf.Tokenization.isResolvable(value)) {
88
+ this.isEmptyObject = false;
89
+ this.resolvableValue = value;
90
+ }
91
+ else {
92
+ this.isEmptyObject = Object.keys(value).length === 0;
93
+ this.resolvableValue = undefined;
94
+ this._attribute = value.attribute;
95
+ this._operator = value.operator;
96
+ this._values = value.values;
97
+ }
98
+ }
99
+ // attribute - computed: false, optional: false, required: true
100
+ _attribute;
101
+ get attribute() {
102
+ return this.getStringAttribute('attribute');
103
+ }
104
+ set attribute(value) {
105
+ this._attribute = value;
106
+ }
107
+ // Temporarily expose input value. Use with caution.
108
+ get attributeInput() {
109
+ return this._attribute;
110
+ }
111
+ // operator - computed: false, optional: false, required: true
112
+ _operator;
113
+ get operator() {
114
+ return this.getStringAttribute('operator');
115
+ }
116
+ set operator(value) {
117
+ this._operator = value;
118
+ }
119
+ // Temporarily expose input value. Use with caution.
120
+ get operatorInput() {
121
+ return this._operator;
122
+ }
123
+ // values - computed: false, optional: false, required: true
124
+ _values;
125
+ get values() {
126
+ return this.getListAttribute('values');
127
+ }
128
+ set values(value) {
129
+ this._values = value;
130
+ }
131
+ // Temporarily expose input value. Use with caution.
132
+ get valuesInput() {
133
+ return this._values;
134
+ }
135
+ }
136
+ export class AlertMutingRuleConditionConditionsList extends cdktf.ComplexList {
137
+ terraformResource;
138
+ terraformAttribute;
139
+ wrapsSet;
140
+ internalValue;
141
+ /**
142
+ * @param terraformResource The parent resource
143
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
144
+ * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
145
+ */
146
+ constructor(terraformResource, terraformAttribute, wrapsSet) {
147
+ super(terraformResource, terraformAttribute, wrapsSet);
148
+ this.terraformResource = terraformResource;
149
+ this.terraformAttribute = terraformAttribute;
150
+ this.wrapsSet = wrapsSet;
151
+ }
152
+ /**
153
+ * @param index the index of the item to return
154
+ */
155
+ get(index) {
156
+ return new AlertMutingRuleConditionConditionsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
157
+ }
158
+ }
159
+ export function alertMutingRuleConditionToTerraform(struct) {
160
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
161
+ return struct;
162
+ }
163
+ if (cdktf.isComplexElement(struct)) {
164
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
165
+ }
166
+ return {
167
+ operator: cdktf.stringToTerraform(struct.operator),
168
+ conditions: cdktf.listMapper(alertMutingRuleConditionConditionsToTerraform, true)(struct.conditions),
169
+ };
170
+ }
171
+ export function alertMutingRuleConditionToHclTerraform(struct) {
172
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
173
+ return struct;
174
+ }
175
+ if (cdktf.isComplexElement(struct)) {
176
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
177
+ }
178
+ const attrs = {
179
+ operator: {
180
+ value: cdktf.stringToHclTerraform(struct.operator),
181
+ isBlock: false,
182
+ type: "simple",
183
+ storageClassType: "string",
184
+ },
185
+ conditions: {
186
+ value: cdktf.listMapperHcl(alertMutingRuleConditionConditionsToHclTerraform, true)(struct.conditions),
187
+ isBlock: true,
188
+ type: "list",
189
+ storageClassType: "AlertMutingRuleConditionConditionsList",
190
+ },
191
+ };
192
+ // remove undefined attributes
193
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
194
+ }
195
+ export class AlertMutingRuleConditionOutputReference extends cdktf.ComplexObject {
196
+ isEmptyObject = false;
197
+ /**
198
+ * @param terraformResource The parent resource
199
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
200
+ */
201
+ constructor(terraformResource, terraformAttribute) {
202
+ super(terraformResource, terraformAttribute, false, 0);
203
+ }
204
+ get internalValue() {
205
+ let hasAnyValues = this.isEmptyObject;
206
+ const internalValueResult = {};
207
+ if (this._operator !== undefined) {
208
+ hasAnyValues = true;
209
+ internalValueResult.operator = this._operator;
210
+ }
211
+ if (this._conditions?.internalValue !== undefined) {
212
+ hasAnyValues = true;
213
+ internalValueResult.conditions = this._conditions?.internalValue;
214
+ }
215
+ return hasAnyValues ? internalValueResult : undefined;
216
+ }
217
+ set internalValue(value) {
218
+ if (value === undefined) {
219
+ this.isEmptyObject = false;
220
+ this._operator = undefined;
221
+ this._conditions.internalValue = undefined;
222
+ }
223
+ else {
224
+ this.isEmptyObject = Object.keys(value).length === 0;
225
+ this._operator = value.operator;
226
+ this._conditions.internalValue = value.conditions;
227
+ }
228
+ }
229
+ // operator - computed: false, optional: false, required: true
230
+ _operator;
231
+ get operator() {
232
+ return this.getStringAttribute('operator');
233
+ }
234
+ set operator(value) {
235
+ this._operator = value;
236
+ }
237
+ // Temporarily expose input value. Use with caution.
238
+ get operatorInput() {
239
+ return this._operator;
240
+ }
241
+ // conditions - computed: false, optional: false, required: true
242
+ _conditions = new AlertMutingRuleConditionConditionsList(this, "conditions", false);
243
+ get conditions() {
244
+ return this._conditions;
245
+ }
246
+ putConditions(value) {
247
+ this._conditions.internalValue = value;
248
+ }
249
+ // Temporarily expose input value. Use with caution.
250
+ get conditionsInput() {
251
+ return this._conditions.internalValue;
252
+ }
253
+ }
254
+ export function alertMutingRuleScheduleToTerraform(struct) {
255
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
256
+ return struct;
257
+ }
258
+ if (cdktf.isComplexElement(struct)) {
259
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
260
+ }
261
+ return {
262
+ end_repeat: cdktf.stringToTerraform(struct.endRepeat),
263
+ end_time: cdktf.stringToTerraform(struct.endTime),
264
+ repeat: cdktf.stringToTerraform(struct.repeat),
265
+ repeat_count: cdktf.numberToTerraform(struct.repeatCount),
266
+ start_time: cdktf.stringToTerraform(struct.startTime),
267
+ time_zone: cdktf.stringToTerraform(struct.timeZone),
268
+ weekly_repeat_days: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.weeklyRepeatDays),
269
+ };
270
+ }
271
+ export function alertMutingRuleScheduleToHclTerraform(struct) {
272
+ if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
273
+ return struct;
274
+ }
275
+ if (cdktf.isComplexElement(struct)) {
276
+ throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
277
+ }
278
+ const attrs = {
279
+ end_repeat: {
280
+ value: cdktf.stringToHclTerraform(struct.endRepeat),
281
+ isBlock: false,
282
+ type: "simple",
283
+ storageClassType: "string",
284
+ },
285
+ end_time: {
286
+ value: cdktf.stringToHclTerraform(struct.endTime),
287
+ isBlock: false,
288
+ type: "simple",
289
+ storageClassType: "string",
290
+ },
291
+ repeat: {
292
+ value: cdktf.stringToHclTerraform(struct.repeat),
293
+ isBlock: false,
294
+ type: "simple",
295
+ storageClassType: "string",
296
+ },
297
+ repeat_count: {
298
+ value: cdktf.numberToHclTerraform(struct.repeatCount),
299
+ isBlock: false,
300
+ type: "simple",
301
+ storageClassType: "number",
302
+ },
303
+ start_time: {
304
+ value: cdktf.stringToHclTerraform(struct.startTime),
305
+ isBlock: false,
306
+ type: "simple",
307
+ storageClassType: "string",
308
+ },
309
+ time_zone: {
310
+ value: cdktf.stringToHclTerraform(struct.timeZone),
311
+ isBlock: false,
312
+ type: "simple",
313
+ storageClassType: "string",
314
+ },
315
+ weekly_repeat_days: {
316
+ value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.weeklyRepeatDays),
317
+ isBlock: false,
318
+ type: "set",
319
+ storageClassType: "stringList",
320
+ },
321
+ };
322
+ // remove undefined attributes
323
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
324
+ }
325
+ export class AlertMutingRuleScheduleOutputReference extends cdktf.ComplexObject {
326
+ isEmptyObject = false;
327
+ /**
328
+ * @param terraformResource The parent resource
329
+ * @param terraformAttribute The attribute on the parent resource this class is referencing
330
+ */
331
+ constructor(terraformResource, terraformAttribute) {
332
+ super(terraformResource, terraformAttribute, false, 0);
333
+ }
334
+ get internalValue() {
335
+ let hasAnyValues = this.isEmptyObject;
336
+ const internalValueResult = {};
337
+ if (this._endRepeat !== undefined) {
338
+ hasAnyValues = true;
339
+ internalValueResult.endRepeat = this._endRepeat;
340
+ }
341
+ if (this._endTime !== undefined) {
342
+ hasAnyValues = true;
343
+ internalValueResult.endTime = this._endTime;
344
+ }
345
+ if (this._repeat !== undefined) {
346
+ hasAnyValues = true;
347
+ internalValueResult.repeat = this._repeat;
348
+ }
349
+ if (this._repeatCount !== undefined) {
350
+ hasAnyValues = true;
351
+ internalValueResult.repeatCount = this._repeatCount;
352
+ }
353
+ if (this._startTime !== undefined) {
354
+ hasAnyValues = true;
355
+ internalValueResult.startTime = this._startTime;
356
+ }
357
+ if (this._timeZone !== undefined) {
358
+ hasAnyValues = true;
359
+ internalValueResult.timeZone = this._timeZone;
360
+ }
361
+ if (this._weeklyRepeatDays !== undefined) {
362
+ hasAnyValues = true;
363
+ internalValueResult.weeklyRepeatDays = this._weeklyRepeatDays;
364
+ }
365
+ return hasAnyValues ? internalValueResult : undefined;
366
+ }
367
+ set internalValue(value) {
368
+ if (value === undefined) {
369
+ this.isEmptyObject = false;
370
+ this._endRepeat = undefined;
371
+ this._endTime = undefined;
372
+ this._repeat = undefined;
373
+ this._repeatCount = undefined;
374
+ this._startTime = undefined;
375
+ this._timeZone = undefined;
376
+ this._weeklyRepeatDays = undefined;
377
+ }
378
+ else {
379
+ this.isEmptyObject = Object.keys(value).length === 0;
380
+ this._endRepeat = value.endRepeat;
381
+ this._endTime = value.endTime;
382
+ this._repeat = value.repeat;
383
+ this._repeatCount = value.repeatCount;
384
+ this._startTime = value.startTime;
385
+ this._timeZone = value.timeZone;
386
+ this._weeklyRepeatDays = value.weeklyRepeatDays;
387
+ }
388
+ }
389
+ // end_repeat - computed: false, optional: true, required: false
390
+ _endRepeat;
391
+ get endRepeat() {
392
+ return this.getStringAttribute('end_repeat');
393
+ }
394
+ set endRepeat(value) {
395
+ this._endRepeat = value;
396
+ }
397
+ resetEndRepeat() {
398
+ this._endRepeat = undefined;
399
+ }
400
+ // Temporarily expose input value. Use with caution.
401
+ get endRepeatInput() {
402
+ return this._endRepeat;
403
+ }
404
+ // end_time - computed: false, optional: true, required: false
405
+ _endTime;
406
+ get endTime() {
407
+ return this.getStringAttribute('end_time');
408
+ }
409
+ set endTime(value) {
410
+ this._endTime = value;
411
+ }
412
+ resetEndTime() {
413
+ this._endTime = undefined;
414
+ }
415
+ // Temporarily expose input value. Use with caution.
416
+ get endTimeInput() {
417
+ return this._endTime;
418
+ }
419
+ // repeat - computed: false, optional: true, required: false
420
+ _repeat;
421
+ get repeat() {
422
+ return this.getStringAttribute('repeat');
423
+ }
424
+ set repeat(value) {
425
+ this._repeat = value;
426
+ }
427
+ resetRepeat() {
428
+ this._repeat = undefined;
429
+ }
430
+ // Temporarily expose input value. Use with caution.
431
+ get repeatInput() {
432
+ return this._repeat;
433
+ }
434
+ // repeat_count - computed: false, optional: true, required: false
435
+ _repeatCount;
436
+ get repeatCount() {
437
+ return this.getNumberAttribute('repeat_count');
438
+ }
439
+ set repeatCount(value) {
440
+ this._repeatCount = value;
441
+ }
442
+ resetRepeatCount() {
443
+ this._repeatCount = undefined;
444
+ }
445
+ // Temporarily expose input value. Use with caution.
446
+ get repeatCountInput() {
447
+ return this._repeatCount;
448
+ }
449
+ // start_time - computed: false, optional: true, required: false
450
+ _startTime;
451
+ get startTime() {
452
+ return this.getStringAttribute('start_time');
453
+ }
454
+ set startTime(value) {
455
+ this._startTime = value;
456
+ }
457
+ resetStartTime() {
458
+ this._startTime = undefined;
459
+ }
460
+ // Temporarily expose input value. Use with caution.
461
+ get startTimeInput() {
462
+ return this._startTime;
463
+ }
464
+ // time_zone - computed: false, optional: false, required: true
465
+ _timeZone;
466
+ get timeZone() {
467
+ return this.getStringAttribute('time_zone');
468
+ }
469
+ set timeZone(value) {
470
+ this._timeZone = value;
471
+ }
472
+ // Temporarily expose input value. Use with caution.
473
+ get timeZoneInput() {
474
+ return this._timeZone;
475
+ }
476
+ // weekly_repeat_days - computed: false, optional: true, required: false
477
+ _weeklyRepeatDays;
478
+ get weeklyRepeatDays() {
479
+ return cdktf.Fn.tolist(this.getListAttribute('weekly_repeat_days'));
480
+ }
481
+ set weeklyRepeatDays(value) {
482
+ this._weeklyRepeatDays = value;
483
+ }
484
+ resetWeeklyRepeatDays() {
485
+ this._weeklyRepeatDays = undefined;
486
+ }
487
+ // Temporarily expose input value. Use with caution.
488
+ get weeklyRepeatDaysInput() {
489
+ return this._weeklyRepeatDays;
490
+ }
491
+ }
492
+ /**
493
+ * Represents a {@link https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/alert_muting_rule newrelic_alert_muting_rule}
494
+ */
495
+ export class AlertMutingRule extends cdktf.TerraformResource {
496
+ // =================
497
+ // STATIC PROPERTIES
498
+ // =================
499
+ static tfResourceType = "newrelic_alert_muting_rule";
500
+ // ==============
501
+ // STATIC Methods
502
+ // ==============
503
+ /**
504
+ * Generates CDKTF code for importing a AlertMutingRule resource upon running "cdktf plan <stack-name>"
505
+ * @param scope The scope in which to define this construct
506
+ * @param importToId The construct id used in the generated config for the AlertMutingRule to import
507
+ * @param importFromId The id of the existing AlertMutingRule that should be imported. Refer to the {@link https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/alert_muting_rule#import import section} in the documentation of this resource for the id to use
508
+ * @param provider? Optional instance of the provider where the AlertMutingRule to import is found
509
+ */
510
+ static generateConfigForImport(scope, importToId, importFromId, provider) {
511
+ return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "newrelic_alert_muting_rule", importId: importFromId, provider });
512
+ }
513
+ // ===========
514
+ // INITIALIZER
515
+ // ===========
516
+ /**
517
+ * Create a new {@link https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/alert_muting_rule newrelic_alert_muting_rule} Resource
518
+ *
519
+ * @param scope The scope in which to define this construct
520
+ * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
521
+ * @param options AlertMutingRuleConfig
522
+ */
523
+ constructor(scope, id, config) {
524
+ super(scope, id, {
525
+ terraformResourceType: 'newrelic_alert_muting_rule',
526
+ terraformGeneratorMetadata: {
527
+ providerName: 'newrelic',
528
+ providerVersion: '3.75.4',
529
+ providerVersionConstraint: '3.75.4'
530
+ },
531
+ provider: config.provider,
532
+ dependsOn: config.dependsOn,
533
+ count: config.count,
534
+ lifecycle: config.lifecycle,
535
+ provisioners: config.provisioners,
536
+ connection: config.connection,
537
+ forEach: config.forEach
538
+ });
539
+ this._accountId = config.accountId;
540
+ this._actionOnMutingRuleWindowEnded = config.actionOnMutingRuleWindowEnded;
541
+ this._description = config.description;
542
+ this._enabled = config.enabled;
543
+ this._id = config.id;
544
+ this._name = config.name;
545
+ this._condition.internalValue = config.condition;
546
+ this._schedule.internalValue = config.schedule;
547
+ }
548
+ // ==========
549
+ // ATTRIBUTES
550
+ // ==========
551
+ // account_id - computed: true, optional: true, required: false
552
+ _accountId;
553
+ get accountId() {
554
+ return this.getNumberAttribute('account_id');
555
+ }
556
+ set accountId(value) {
557
+ this._accountId = value;
558
+ }
559
+ resetAccountId() {
560
+ this._accountId = undefined;
561
+ }
562
+ // Temporarily expose input value. Use with caution.
563
+ get accountIdInput() {
564
+ return this._accountId;
565
+ }
566
+ // action_on_muting_rule_window_ended - computed: true, optional: true, required: false
567
+ _actionOnMutingRuleWindowEnded;
568
+ get actionOnMutingRuleWindowEnded() {
569
+ return this.getStringAttribute('action_on_muting_rule_window_ended');
570
+ }
571
+ set actionOnMutingRuleWindowEnded(value) {
572
+ this._actionOnMutingRuleWindowEnded = value;
573
+ }
574
+ resetActionOnMutingRuleWindowEnded() {
575
+ this._actionOnMutingRuleWindowEnded = undefined;
576
+ }
577
+ // Temporarily expose input value. Use with caution.
578
+ get actionOnMutingRuleWindowEndedInput() {
579
+ return this._actionOnMutingRuleWindowEnded;
580
+ }
581
+ // description - computed: false, optional: true, required: false
582
+ _description;
583
+ get description() {
584
+ return this.getStringAttribute('description');
585
+ }
586
+ set description(value) {
587
+ this._description = value;
588
+ }
589
+ resetDescription() {
590
+ this._description = undefined;
591
+ }
592
+ // Temporarily expose input value. Use with caution.
593
+ get descriptionInput() {
594
+ return this._description;
595
+ }
596
+ // enabled - computed: false, optional: false, required: true
597
+ _enabled;
598
+ get enabled() {
599
+ return this.getBooleanAttribute('enabled');
600
+ }
601
+ set enabled(value) {
602
+ this._enabled = value;
603
+ }
604
+ // Temporarily expose input value. Use with caution.
605
+ get enabledInput() {
606
+ return this._enabled;
607
+ }
608
+ // id - computed: true, optional: true, required: false
609
+ _id;
610
+ get id() {
611
+ return this.getStringAttribute('id');
612
+ }
613
+ set id(value) {
614
+ this._id = value;
615
+ }
616
+ resetId() {
617
+ this._id = undefined;
618
+ }
619
+ // Temporarily expose input value. Use with caution.
620
+ get idInput() {
621
+ return this._id;
622
+ }
623
+ // name - computed: false, optional: false, required: true
624
+ _name;
625
+ get name() {
626
+ return this.getStringAttribute('name');
627
+ }
628
+ set name(value) {
629
+ this._name = value;
630
+ }
631
+ // Temporarily expose input value. Use with caution.
632
+ get nameInput() {
633
+ return this._name;
634
+ }
635
+ // condition - computed: false, optional: false, required: true
636
+ _condition = new AlertMutingRuleConditionOutputReference(this, "condition");
637
+ get condition() {
638
+ return this._condition;
639
+ }
640
+ putCondition(value) {
641
+ this._condition.internalValue = value;
642
+ }
643
+ // Temporarily expose input value. Use with caution.
644
+ get conditionInput() {
645
+ return this._condition.internalValue;
646
+ }
647
+ // schedule - computed: false, optional: true, required: false
648
+ _schedule = new AlertMutingRuleScheduleOutputReference(this, "schedule");
649
+ get schedule() {
650
+ return this._schedule;
651
+ }
652
+ putSchedule(value) {
653
+ this._schedule.internalValue = value;
654
+ }
655
+ resetSchedule() {
656
+ this._schedule.internalValue = undefined;
657
+ }
658
+ // Temporarily expose input value. Use with caution.
659
+ get scheduleInput() {
660
+ return this._schedule.internalValue;
661
+ }
662
+ // =========
663
+ // SYNTHESIS
664
+ // =========
665
+ synthesizeAttributes() {
666
+ return {
667
+ account_id: cdktf.numberToTerraform(this._accountId),
668
+ action_on_muting_rule_window_ended: cdktf.stringToTerraform(this._actionOnMutingRuleWindowEnded),
669
+ description: cdktf.stringToTerraform(this._description),
670
+ enabled: cdktf.booleanToTerraform(this._enabled),
671
+ id: cdktf.stringToTerraform(this._id),
672
+ name: cdktf.stringToTerraform(this._name),
673
+ condition: alertMutingRuleConditionToTerraform(this._condition.internalValue),
674
+ schedule: alertMutingRuleScheduleToTerraform(this._schedule.internalValue),
675
+ };
676
+ }
677
+ synthesizeHclAttributes() {
678
+ const attrs = {
679
+ account_id: {
680
+ value: cdktf.numberToHclTerraform(this._accountId),
681
+ isBlock: false,
682
+ type: "simple",
683
+ storageClassType: "number",
684
+ },
685
+ action_on_muting_rule_window_ended: {
686
+ value: cdktf.stringToHclTerraform(this._actionOnMutingRuleWindowEnded),
687
+ isBlock: false,
688
+ type: "simple",
689
+ storageClassType: "string",
690
+ },
691
+ description: {
692
+ value: cdktf.stringToHclTerraform(this._description),
693
+ isBlock: false,
694
+ type: "simple",
695
+ storageClassType: "string",
696
+ },
697
+ enabled: {
698
+ value: cdktf.booleanToHclTerraform(this._enabled),
699
+ isBlock: false,
700
+ type: "simple",
701
+ storageClassType: "boolean",
702
+ },
703
+ id: {
704
+ value: cdktf.stringToHclTerraform(this._id),
705
+ isBlock: false,
706
+ type: "simple",
707
+ storageClassType: "string",
708
+ },
709
+ name: {
710
+ value: cdktf.stringToHclTerraform(this._name),
711
+ isBlock: false,
712
+ type: "simple",
713
+ storageClassType: "string",
714
+ },
715
+ condition: {
716
+ value: alertMutingRuleConditionToHclTerraform(this._condition.internalValue),
717
+ isBlock: true,
718
+ type: "list",
719
+ storageClassType: "AlertMutingRuleConditionList",
720
+ },
721
+ schedule: {
722
+ value: alertMutingRuleScheduleToHclTerraform(this._schedule.internalValue),
723
+ isBlock: true,
724
+ type: "list",
725
+ storageClassType: "AlertMutingRuleScheduleList",
726
+ },
727
+ };
728
+ // remove undefined attributes
729
+ return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
730
+ }
731
+ }