@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,587 @@
|
|
|
1
|
+
// https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/alert_condition
|
|
2
|
+
// generated from terraform resource schema
|
|
3
|
+
import * as cdktf from 'cdktf';
|
|
4
|
+
export function alertConditionTermToTerraform(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
|
+
operator: cdktf.stringToTerraform(struct.operator),
|
|
14
|
+
priority: cdktf.stringToTerraform(struct.priority),
|
|
15
|
+
threshold: cdktf.numberToTerraform(struct.threshold),
|
|
16
|
+
time_function: cdktf.stringToTerraform(struct.timeFunction),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function alertConditionTermToHclTerraform(struct) {
|
|
20
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
21
|
+
return struct;
|
|
22
|
+
}
|
|
23
|
+
if (cdktf.isComplexElement(struct)) {
|
|
24
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
25
|
+
}
|
|
26
|
+
const attrs = {
|
|
27
|
+
duration: {
|
|
28
|
+
value: cdktf.numberToHclTerraform(struct.duration),
|
|
29
|
+
isBlock: false,
|
|
30
|
+
type: "simple",
|
|
31
|
+
storageClassType: "number",
|
|
32
|
+
},
|
|
33
|
+
operator: {
|
|
34
|
+
value: cdktf.stringToHclTerraform(struct.operator),
|
|
35
|
+
isBlock: false,
|
|
36
|
+
type: "simple",
|
|
37
|
+
storageClassType: "string",
|
|
38
|
+
},
|
|
39
|
+
priority: {
|
|
40
|
+
value: cdktf.stringToHclTerraform(struct.priority),
|
|
41
|
+
isBlock: false,
|
|
42
|
+
type: "simple",
|
|
43
|
+
storageClassType: "string",
|
|
44
|
+
},
|
|
45
|
+
threshold: {
|
|
46
|
+
value: cdktf.numberToHclTerraform(struct.threshold),
|
|
47
|
+
isBlock: false,
|
|
48
|
+
type: "simple",
|
|
49
|
+
storageClassType: "number",
|
|
50
|
+
},
|
|
51
|
+
time_function: {
|
|
52
|
+
value: cdktf.stringToHclTerraform(struct.timeFunction),
|
|
53
|
+
isBlock: false,
|
|
54
|
+
type: "simple",
|
|
55
|
+
storageClassType: "string",
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
// remove undefined attributes
|
|
59
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
60
|
+
}
|
|
61
|
+
export class AlertConditionTermOutputReference extends cdktf.ComplexObject {
|
|
62
|
+
isEmptyObject = false;
|
|
63
|
+
resolvableValue;
|
|
64
|
+
/**
|
|
65
|
+
* @param terraformResource The parent resource
|
|
66
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
67
|
+
* @param complexObjectIndex the index of this item in the list
|
|
68
|
+
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
69
|
+
*/
|
|
70
|
+
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
|
|
71
|
+
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
|
|
72
|
+
}
|
|
73
|
+
get internalValue() {
|
|
74
|
+
if (this.resolvableValue) {
|
|
75
|
+
return this.resolvableValue;
|
|
76
|
+
}
|
|
77
|
+
let hasAnyValues = this.isEmptyObject;
|
|
78
|
+
const internalValueResult = {};
|
|
79
|
+
if (this._duration !== undefined) {
|
|
80
|
+
hasAnyValues = true;
|
|
81
|
+
internalValueResult.duration = this._duration;
|
|
82
|
+
}
|
|
83
|
+
if (this._operator !== undefined) {
|
|
84
|
+
hasAnyValues = true;
|
|
85
|
+
internalValueResult.operator = this._operator;
|
|
86
|
+
}
|
|
87
|
+
if (this._priority !== undefined) {
|
|
88
|
+
hasAnyValues = true;
|
|
89
|
+
internalValueResult.priority = this._priority;
|
|
90
|
+
}
|
|
91
|
+
if (this._threshold !== undefined) {
|
|
92
|
+
hasAnyValues = true;
|
|
93
|
+
internalValueResult.threshold = this._threshold;
|
|
94
|
+
}
|
|
95
|
+
if (this._timeFunction !== undefined) {
|
|
96
|
+
hasAnyValues = true;
|
|
97
|
+
internalValueResult.timeFunction = this._timeFunction;
|
|
98
|
+
}
|
|
99
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
100
|
+
}
|
|
101
|
+
set internalValue(value) {
|
|
102
|
+
if (value === undefined) {
|
|
103
|
+
this.isEmptyObject = false;
|
|
104
|
+
this.resolvableValue = undefined;
|
|
105
|
+
this._duration = undefined;
|
|
106
|
+
this._operator = undefined;
|
|
107
|
+
this._priority = undefined;
|
|
108
|
+
this._threshold = undefined;
|
|
109
|
+
this._timeFunction = undefined;
|
|
110
|
+
}
|
|
111
|
+
else if (cdktf.Tokenization.isResolvable(value)) {
|
|
112
|
+
this.isEmptyObject = false;
|
|
113
|
+
this.resolvableValue = value;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
117
|
+
this.resolvableValue = undefined;
|
|
118
|
+
this._duration = value.duration;
|
|
119
|
+
this._operator = value.operator;
|
|
120
|
+
this._priority = value.priority;
|
|
121
|
+
this._threshold = value.threshold;
|
|
122
|
+
this._timeFunction = value.timeFunction;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// duration - computed: false, optional: false, required: true
|
|
126
|
+
_duration;
|
|
127
|
+
get duration() {
|
|
128
|
+
return this.getNumberAttribute('duration');
|
|
129
|
+
}
|
|
130
|
+
set duration(value) {
|
|
131
|
+
this._duration = value;
|
|
132
|
+
}
|
|
133
|
+
// Temporarily expose input value. Use with caution.
|
|
134
|
+
get durationInput() {
|
|
135
|
+
return this._duration;
|
|
136
|
+
}
|
|
137
|
+
// operator - computed: false, optional: true, required: false
|
|
138
|
+
_operator;
|
|
139
|
+
get operator() {
|
|
140
|
+
return this.getStringAttribute('operator');
|
|
141
|
+
}
|
|
142
|
+
set operator(value) {
|
|
143
|
+
this._operator = value;
|
|
144
|
+
}
|
|
145
|
+
resetOperator() {
|
|
146
|
+
this._operator = undefined;
|
|
147
|
+
}
|
|
148
|
+
// Temporarily expose input value. Use with caution.
|
|
149
|
+
get operatorInput() {
|
|
150
|
+
return this._operator;
|
|
151
|
+
}
|
|
152
|
+
// priority - computed: false, optional: true, required: false
|
|
153
|
+
_priority;
|
|
154
|
+
get priority() {
|
|
155
|
+
return this.getStringAttribute('priority');
|
|
156
|
+
}
|
|
157
|
+
set priority(value) {
|
|
158
|
+
this._priority = value;
|
|
159
|
+
}
|
|
160
|
+
resetPriority() {
|
|
161
|
+
this._priority = undefined;
|
|
162
|
+
}
|
|
163
|
+
// Temporarily expose input value. Use with caution.
|
|
164
|
+
get priorityInput() {
|
|
165
|
+
return this._priority;
|
|
166
|
+
}
|
|
167
|
+
// threshold - computed: false, optional: false, required: true
|
|
168
|
+
_threshold;
|
|
169
|
+
get threshold() {
|
|
170
|
+
return this.getNumberAttribute('threshold');
|
|
171
|
+
}
|
|
172
|
+
set threshold(value) {
|
|
173
|
+
this._threshold = value;
|
|
174
|
+
}
|
|
175
|
+
// Temporarily expose input value. Use with caution.
|
|
176
|
+
get thresholdInput() {
|
|
177
|
+
return this._threshold;
|
|
178
|
+
}
|
|
179
|
+
// time_function - computed: false, optional: false, required: true
|
|
180
|
+
_timeFunction;
|
|
181
|
+
get timeFunction() {
|
|
182
|
+
return this.getStringAttribute('time_function');
|
|
183
|
+
}
|
|
184
|
+
set timeFunction(value) {
|
|
185
|
+
this._timeFunction = value;
|
|
186
|
+
}
|
|
187
|
+
// Temporarily expose input value. Use with caution.
|
|
188
|
+
get timeFunctionInput() {
|
|
189
|
+
return this._timeFunction;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
export class AlertConditionTermList extends cdktf.ComplexList {
|
|
193
|
+
terraformResource;
|
|
194
|
+
terraformAttribute;
|
|
195
|
+
wrapsSet;
|
|
196
|
+
internalValue;
|
|
197
|
+
/**
|
|
198
|
+
* @param terraformResource The parent resource
|
|
199
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
200
|
+
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
|
|
201
|
+
*/
|
|
202
|
+
constructor(terraformResource, terraformAttribute, wrapsSet) {
|
|
203
|
+
super(terraformResource, terraformAttribute, wrapsSet);
|
|
204
|
+
this.terraformResource = terraformResource;
|
|
205
|
+
this.terraformAttribute = terraformAttribute;
|
|
206
|
+
this.wrapsSet = wrapsSet;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* @param index the index of the item to return
|
|
210
|
+
*/
|
|
211
|
+
get(index) {
|
|
212
|
+
return new AlertConditionTermOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Represents a {@link https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/alert_condition newrelic_alert_condition}
|
|
217
|
+
*/
|
|
218
|
+
export class AlertCondition extends cdktf.TerraformResource {
|
|
219
|
+
// =================
|
|
220
|
+
// STATIC PROPERTIES
|
|
221
|
+
// =================
|
|
222
|
+
static tfResourceType = "newrelic_alert_condition";
|
|
223
|
+
// ==============
|
|
224
|
+
// STATIC Methods
|
|
225
|
+
// ==============
|
|
226
|
+
/**
|
|
227
|
+
* Generates CDKTF code for importing a AlertCondition resource upon running "cdktf plan <stack-name>"
|
|
228
|
+
* @param scope The scope in which to define this construct
|
|
229
|
+
* @param importToId The construct id used in the generated config for the AlertCondition to import
|
|
230
|
+
* @param importFromId The id of the existing AlertCondition that should be imported. Refer to the {@link https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/alert_condition#import import section} in the documentation of this resource for the id to use
|
|
231
|
+
* @param provider? Optional instance of the provider where the AlertCondition to import is found
|
|
232
|
+
*/
|
|
233
|
+
static generateConfigForImport(scope, importToId, importFromId, provider) {
|
|
234
|
+
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "newrelic_alert_condition", importId: importFromId, provider });
|
|
235
|
+
}
|
|
236
|
+
// ===========
|
|
237
|
+
// INITIALIZER
|
|
238
|
+
// ===========
|
|
239
|
+
/**
|
|
240
|
+
* Create a new {@link https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/alert_condition newrelic_alert_condition} Resource
|
|
241
|
+
*
|
|
242
|
+
* @param scope The scope in which to define this construct
|
|
243
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
244
|
+
* @param options AlertConditionConfig
|
|
245
|
+
*/
|
|
246
|
+
constructor(scope, id, config) {
|
|
247
|
+
super(scope, id, {
|
|
248
|
+
terraformResourceType: 'newrelic_alert_condition',
|
|
249
|
+
terraformGeneratorMetadata: {
|
|
250
|
+
providerName: 'newrelic',
|
|
251
|
+
providerVersion: '3.75.4',
|
|
252
|
+
providerVersionConstraint: '3.75.4'
|
|
253
|
+
},
|
|
254
|
+
provider: config.provider,
|
|
255
|
+
dependsOn: config.dependsOn,
|
|
256
|
+
count: config.count,
|
|
257
|
+
lifecycle: config.lifecycle,
|
|
258
|
+
provisioners: config.provisioners,
|
|
259
|
+
connection: config.connection,
|
|
260
|
+
forEach: config.forEach
|
|
261
|
+
});
|
|
262
|
+
this._conditionScope = config.conditionScope;
|
|
263
|
+
this._enabled = config.enabled;
|
|
264
|
+
this._entities = config.entities;
|
|
265
|
+
this._gcMetric = config.gcMetric;
|
|
266
|
+
this._id = config.id;
|
|
267
|
+
this._metric = config.metric;
|
|
268
|
+
this._name = config.name;
|
|
269
|
+
this._policyId = config.policyId;
|
|
270
|
+
this._runbookUrl = config.runbookUrl;
|
|
271
|
+
this._type = config.type;
|
|
272
|
+
this._userDefinedMetric = config.userDefinedMetric;
|
|
273
|
+
this._userDefinedValueFunction = config.userDefinedValueFunction;
|
|
274
|
+
this._violationCloseTimer = config.violationCloseTimer;
|
|
275
|
+
this._term.internalValue = config.term;
|
|
276
|
+
}
|
|
277
|
+
// ==========
|
|
278
|
+
// ATTRIBUTES
|
|
279
|
+
// ==========
|
|
280
|
+
// condition_scope - computed: false, optional: true, required: false
|
|
281
|
+
_conditionScope;
|
|
282
|
+
get conditionScope() {
|
|
283
|
+
return this.getStringAttribute('condition_scope');
|
|
284
|
+
}
|
|
285
|
+
set conditionScope(value) {
|
|
286
|
+
this._conditionScope = value;
|
|
287
|
+
}
|
|
288
|
+
resetConditionScope() {
|
|
289
|
+
this._conditionScope = undefined;
|
|
290
|
+
}
|
|
291
|
+
// Temporarily expose input value. Use with caution.
|
|
292
|
+
get conditionScopeInput() {
|
|
293
|
+
return this._conditionScope;
|
|
294
|
+
}
|
|
295
|
+
// enabled - computed: false, optional: true, required: false
|
|
296
|
+
_enabled;
|
|
297
|
+
get enabled() {
|
|
298
|
+
return this.getBooleanAttribute('enabled');
|
|
299
|
+
}
|
|
300
|
+
set enabled(value) {
|
|
301
|
+
this._enabled = value;
|
|
302
|
+
}
|
|
303
|
+
resetEnabled() {
|
|
304
|
+
this._enabled = undefined;
|
|
305
|
+
}
|
|
306
|
+
// Temporarily expose input value. Use with caution.
|
|
307
|
+
get enabledInput() {
|
|
308
|
+
return this._enabled;
|
|
309
|
+
}
|
|
310
|
+
// entities - computed: false, optional: false, required: true
|
|
311
|
+
_entities;
|
|
312
|
+
get entities() {
|
|
313
|
+
return cdktf.Token.asNumberList(cdktf.Fn.tolist(this.getNumberListAttribute('entities')));
|
|
314
|
+
}
|
|
315
|
+
set entities(value) {
|
|
316
|
+
this._entities = value;
|
|
317
|
+
}
|
|
318
|
+
// Temporarily expose input value. Use with caution.
|
|
319
|
+
get entitiesInput() {
|
|
320
|
+
return this._entities;
|
|
321
|
+
}
|
|
322
|
+
// entity_guid - computed: true, optional: false, required: false
|
|
323
|
+
get entityGuid() {
|
|
324
|
+
return this.getStringAttribute('entity_guid');
|
|
325
|
+
}
|
|
326
|
+
// gc_metric - computed: false, optional: true, required: false
|
|
327
|
+
_gcMetric;
|
|
328
|
+
get gcMetric() {
|
|
329
|
+
return this.getStringAttribute('gc_metric');
|
|
330
|
+
}
|
|
331
|
+
set gcMetric(value) {
|
|
332
|
+
this._gcMetric = value;
|
|
333
|
+
}
|
|
334
|
+
resetGcMetric() {
|
|
335
|
+
this._gcMetric = undefined;
|
|
336
|
+
}
|
|
337
|
+
// Temporarily expose input value. Use with caution.
|
|
338
|
+
get gcMetricInput() {
|
|
339
|
+
return this._gcMetric;
|
|
340
|
+
}
|
|
341
|
+
// id - computed: true, optional: true, required: false
|
|
342
|
+
_id;
|
|
343
|
+
get id() {
|
|
344
|
+
return this.getStringAttribute('id');
|
|
345
|
+
}
|
|
346
|
+
set id(value) {
|
|
347
|
+
this._id = value;
|
|
348
|
+
}
|
|
349
|
+
resetId() {
|
|
350
|
+
this._id = undefined;
|
|
351
|
+
}
|
|
352
|
+
// Temporarily expose input value. Use with caution.
|
|
353
|
+
get idInput() {
|
|
354
|
+
return this._id;
|
|
355
|
+
}
|
|
356
|
+
// metric - computed: false, optional: false, required: true
|
|
357
|
+
_metric;
|
|
358
|
+
get metric() {
|
|
359
|
+
return this.getStringAttribute('metric');
|
|
360
|
+
}
|
|
361
|
+
set metric(value) {
|
|
362
|
+
this._metric = value;
|
|
363
|
+
}
|
|
364
|
+
// Temporarily expose input value. Use with caution.
|
|
365
|
+
get metricInput() {
|
|
366
|
+
return this._metric;
|
|
367
|
+
}
|
|
368
|
+
// name - computed: false, optional: false, required: true
|
|
369
|
+
_name;
|
|
370
|
+
get name() {
|
|
371
|
+
return this.getStringAttribute('name');
|
|
372
|
+
}
|
|
373
|
+
set name(value) {
|
|
374
|
+
this._name = value;
|
|
375
|
+
}
|
|
376
|
+
// Temporarily expose input value. Use with caution.
|
|
377
|
+
get nameInput() {
|
|
378
|
+
return this._name;
|
|
379
|
+
}
|
|
380
|
+
// policy_id - computed: false, optional: false, required: true
|
|
381
|
+
_policyId;
|
|
382
|
+
get policyId() {
|
|
383
|
+
return this.getNumberAttribute('policy_id');
|
|
384
|
+
}
|
|
385
|
+
set policyId(value) {
|
|
386
|
+
this._policyId = value;
|
|
387
|
+
}
|
|
388
|
+
// Temporarily expose input value. Use with caution.
|
|
389
|
+
get policyIdInput() {
|
|
390
|
+
return this._policyId;
|
|
391
|
+
}
|
|
392
|
+
// runbook_url - computed: false, optional: true, required: false
|
|
393
|
+
_runbookUrl;
|
|
394
|
+
get runbookUrl() {
|
|
395
|
+
return this.getStringAttribute('runbook_url');
|
|
396
|
+
}
|
|
397
|
+
set runbookUrl(value) {
|
|
398
|
+
this._runbookUrl = value;
|
|
399
|
+
}
|
|
400
|
+
resetRunbookUrl() {
|
|
401
|
+
this._runbookUrl = undefined;
|
|
402
|
+
}
|
|
403
|
+
// Temporarily expose input value. Use with caution.
|
|
404
|
+
get runbookUrlInput() {
|
|
405
|
+
return this._runbookUrl;
|
|
406
|
+
}
|
|
407
|
+
// type - computed: false, optional: false, required: true
|
|
408
|
+
_type;
|
|
409
|
+
get type() {
|
|
410
|
+
return this.getStringAttribute('type');
|
|
411
|
+
}
|
|
412
|
+
set type(value) {
|
|
413
|
+
this._type = value;
|
|
414
|
+
}
|
|
415
|
+
// Temporarily expose input value. Use with caution.
|
|
416
|
+
get typeInput() {
|
|
417
|
+
return this._type;
|
|
418
|
+
}
|
|
419
|
+
// user_defined_metric - computed: false, optional: true, required: false
|
|
420
|
+
_userDefinedMetric;
|
|
421
|
+
get userDefinedMetric() {
|
|
422
|
+
return this.getStringAttribute('user_defined_metric');
|
|
423
|
+
}
|
|
424
|
+
set userDefinedMetric(value) {
|
|
425
|
+
this._userDefinedMetric = value;
|
|
426
|
+
}
|
|
427
|
+
resetUserDefinedMetric() {
|
|
428
|
+
this._userDefinedMetric = undefined;
|
|
429
|
+
}
|
|
430
|
+
// Temporarily expose input value. Use with caution.
|
|
431
|
+
get userDefinedMetricInput() {
|
|
432
|
+
return this._userDefinedMetric;
|
|
433
|
+
}
|
|
434
|
+
// user_defined_value_function - computed: false, optional: true, required: false
|
|
435
|
+
_userDefinedValueFunction;
|
|
436
|
+
get userDefinedValueFunction() {
|
|
437
|
+
return this.getStringAttribute('user_defined_value_function');
|
|
438
|
+
}
|
|
439
|
+
set userDefinedValueFunction(value) {
|
|
440
|
+
this._userDefinedValueFunction = value;
|
|
441
|
+
}
|
|
442
|
+
resetUserDefinedValueFunction() {
|
|
443
|
+
this._userDefinedValueFunction = undefined;
|
|
444
|
+
}
|
|
445
|
+
// Temporarily expose input value. Use with caution.
|
|
446
|
+
get userDefinedValueFunctionInput() {
|
|
447
|
+
return this._userDefinedValueFunction;
|
|
448
|
+
}
|
|
449
|
+
// violation_close_timer - computed: false, optional: true, required: false
|
|
450
|
+
_violationCloseTimer;
|
|
451
|
+
get violationCloseTimer() {
|
|
452
|
+
return this.getNumberAttribute('violation_close_timer');
|
|
453
|
+
}
|
|
454
|
+
set violationCloseTimer(value) {
|
|
455
|
+
this._violationCloseTimer = value;
|
|
456
|
+
}
|
|
457
|
+
resetViolationCloseTimer() {
|
|
458
|
+
this._violationCloseTimer = undefined;
|
|
459
|
+
}
|
|
460
|
+
// Temporarily expose input value. Use with caution.
|
|
461
|
+
get violationCloseTimerInput() {
|
|
462
|
+
return this._violationCloseTimer;
|
|
463
|
+
}
|
|
464
|
+
// term - computed: false, optional: false, required: true
|
|
465
|
+
_term = new AlertConditionTermList(this, "term", true);
|
|
466
|
+
get term() {
|
|
467
|
+
return this._term;
|
|
468
|
+
}
|
|
469
|
+
putTerm(value) {
|
|
470
|
+
this._term.internalValue = value;
|
|
471
|
+
}
|
|
472
|
+
// Temporarily expose input value. Use with caution.
|
|
473
|
+
get termInput() {
|
|
474
|
+
return this._term.internalValue;
|
|
475
|
+
}
|
|
476
|
+
// =========
|
|
477
|
+
// SYNTHESIS
|
|
478
|
+
// =========
|
|
479
|
+
synthesizeAttributes() {
|
|
480
|
+
return {
|
|
481
|
+
condition_scope: cdktf.stringToTerraform(this._conditionScope),
|
|
482
|
+
enabled: cdktf.booleanToTerraform(this._enabled),
|
|
483
|
+
entities: cdktf.listMapper(cdktf.numberToTerraform, false)(this._entities),
|
|
484
|
+
gc_metric: cdktf.stringToTerraform(this._gcMetric),
|
|
485
|
+
id: cdktf.stringToTerraform(this._id),
|
|
486
|
+
metric: cdktf.stringToTerraform(this._metric),
|
|
487
|
+
name: cdktf.stringToTerraform(this._name),
|
|
488
|
+
policy_id: cdktf.numberToTerraform(this._policyId),
|
|
489
|
+
runbook_url: cdktf.stringToTerraform(this._runbookUrl),
|
|
490
|
+
type: cdktf.stringToTerraform(this._type),
|
|
491
|
+
user_defined_metric: cdktf.stringToTerraform(this._userDefinedMetric),
|
|
492
|
+
user_defined_value_function: cdktf.stringToTerraform(this._userDefinedValueFunction),
|
|
493
|
+
violation_close_timer: cdktf.numberToTerraform(this._violationCloseTimer),
|
|
494
|
+
term: cdktf.listMapper(alertConditionTermToTerraform, true)(this._term.internalValue),
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
synthesizeHclAttributes() {
|
|
498
|
+
const attrs = {
|
|
499
|
+
condition_scope: {
|
|
500
|
+
value: cdktf.stringToHclTerraform(this._conditionScope),
|
|
501
|
+
isBlock: false,
|
|
502
|
+
type: "simple",
|
|
503
|
+
storageClassType: "string",
|
|
504
|
+
},
|
|
505
|
+
enabled: {
|
|
506
|
+
value: cdktf.booleanToHclTerraform(this._enabled),
|
|
507
|
+
isBlock: false,
|
|
508
|
+
type: "simple",
|
|
509
|
+
storageClassType: "boolean",
|
|
510
|
+
},
|
|
511
|
+
entities: {
|
|
512
|
+
value: cdktf.listMapperHcl(cdktf.numberToHclTerraform, false)(this._entities),
|
|
513
|
+
isBlock: false,
|
|
514
|
+
type: "set",
|
|
515
|
+
storageClassType: "numberList",
|
|
516
|
+
},
|
|
517
|
+
gc_metric: {
|
|
518
|
+
value: cdktf.stringToHclTerraform(this._gcMetric),
|
|
519
|
+
isBlock: false,
|
|
520
|
+
type: "simple",
|
|
521
|
+
storageClassType: "string",
|
|
522
|
+
},
|
|
523
|
+
id: {
|
|
524
|
+
value: cdktf.stringToHclTerraform(this._id),
|
|
525
|
+
isBlock: false,
|
|
526
|
+
type: "simple",
|
|
527
|
+
storageClassType: "string",
|
|
528
|
+
},
|
|
529
|
+
metric: {
|
|
530
|
+
value: cdktf.stringToHclTerraform(this._metric),
|
|
531
|
+
isBlock: false,
|
|
532
|
+
type: "simple",
|
|
533
|
+
storageClassType: "string",
|
|
534
|
+
},
|
|
535
|
+
name: {
|
|
536
|
+
value: cdktf.stringToHclTerraform(this._name),
|
|
537
|
+
isBlock: false,
|
|
538
|
+
type: "simple",
|
|
539
|
+
storageClassType: "string",
|
|
540
|
+
},
|
|
541
|
+
policy_id: {
|
|
542
|
+
value: cdktf.numberToHclTerraform(this._policyId),
|
|
543
|
+
isBlock: false,
|
|
544
|
+
type: "simple",
|
|
545
|
+
storageClassType: "number",
|
|
546
|
+
},
|
|
547
|
+
runbook_url: {
|
|
548
|
+
value: cdktf.stringToHclTerraform(this._runbookUrl),
|
|
549
|
+
isBlock: false,
|
|
550
|
+
type: "simple",
|
|
551
|
+
storageClassType: "string",
|
|
552
|
+
},
|
|
553
|
+
type: {
|
|
554
|
+
value: cdktf.stringToHclTerraform(this._type),
|
|
555
|
+
isBlock: false,
|
|
556
|
+
type: "simple",
|
|
557
|
+
storageClassType: "string",
|
|
558
|
+
},
|
|
559
|
+
user_defined_metric: {
|
|
560
|
+
value: cdktf.stringToHclTerraform(this._userDefinedMetric),
|
|
561
|
+
isBlock: false,
|
|
562
|
+
type: "simple",
|
|
563
|
+
storageClassType: "string",
|
|
564
|
+
},
|
|
565
|
+
user_defined_value_function: {
|
|
566
|
+
value: cdktf.stringToHclTerraform(this._userDefinedValueFunction),
|
|
567
|
+
isBlock: false,
|
|
568
|
+
type: "simple",
|
|
569
|
+
storageClassType: "string",
|
|
570
|
+
},
|
|
571
|
+
violation_close_timer: {
|
|
572
|
+
value: cdktf.numberToHclTerraform(this._violationCloseTimer),
|
|
573
|
+
isBlock: false,
|
|
574
|
+
type: "simple",
|
|
575
|
+
storageClassType: "number",
|
|
576
|
+
},
|
|
577
|
+
term: {
|
|
578
|
+
value: cdktf.listMapperHcl(alertConditionTermToHclTerraform, true)(this._term.internalValue),
|
|
579
|
+
isBlock: true,
|
|
580
|
+
type: "set",
|
|
581
|
+
storageClassType: "AlertConditionTermList",
|
|
582
|
+
},
|
|
583
|
+
};
|
|
584
|
+
// remove undefined attributes
|
|
585
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
586
|
+
}
|
|
587
|
+
}
|