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