@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,603 @@
|
|
|
1
|
+
// https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/monitor_downtime
|
|
2
|
+
// generated from terraform resource schema
|
|
3
|
+
import * as cdktf from 'cdktf';
|
|
4
|
+
export function monitorDowntimeEndRepeatToTerraform(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
|
+
on_date: cdktf.stringToTerraform(struct.onDate),
|
|
13
|
+
on_repeat: cdktf.numberToTerraform(struct.onRepeat),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function monitorDowntimeEndRepeatToHclTerraform(struct) {
|
|
17
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
18
|
+
return struct;
|
|
19
|
+
}
|
|
20
|
+
if (cdktf.isComplexElement(struct)) {
|
|
21
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
22
|
+
}
|
|
23
|
+
const attrs = {
|
|
24
|
+
on_date: {
|
|
25
|
+
value: cdktf.stringToHclTerraform(struct.onDate),
|
|
26
|
+
isBlock: false,
|
|
27
|
+
type: "simple",
|
|
28
|
+
storageClassType: "string",
|
|
29
|
+
},
|
|
30
|
+
on_repeat: {
|
|
31
|
+
value: cdktf.numberToHclTerraform(struct.onRepeat),
|
|
32
|
+
isBlock: false,
|
|
33
|
+
type: "simple",
|
|
34
|
+
storageClassType: "number",
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
// remove undefined attributes
|
|
38
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
39
|
+
}
|
|
40
|
+
export class MonitorDowntimeEndRepeatOutputReference extends cdktf.ComplexObject {
|
|
41
|
+
isEmptyObject = false;
|
|
42
|
+
/**
|
|
43
|
+
* @param terraformResource The parent resource
|
|
44
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
45
|
+
*/
|
|
46
|
+
constructor(terraformResource, terraformAttribute) {
|
|
47
|
+
super(terraformResource, terraformAttribute, false, 0);
|
|
48
|
+
}
|
|
49
|
+
get internalValue() {
|
|
50
|
+
let hasAnyValues = this.isEmptyObject;
|
|
51
|
+
const internalValueResult = {};
|
|
52
|
+
if (this._onDate !== undefined) {
|
|
53
|
+
hasAnyValues = true;
|
|
54
|
+
internalValueResult.onDate = this._onDate;
|
|
55
|
+
}
|
|
56
|
+
if (this._onRepeat !== undefined) {
|
|
57
|
+
hasAnyValues = true;
|
|
58
|
+
internalValueResult.onRepeat = this._onRepeat;
|
|
59
|
+
}
|
|
60
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
61
|
+
}
|
|
62
|
+
set internalValue(value) {
|
|
63
|
+
if (value === undefined) {
|
|
64
|
+
this.isEmptyObject = false;
|
|
65
|
+
this._onDate = undefined;
|
|
66
|
+
this._onRepeat = undefined;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
70
|
+
this._onDate = value.onDate;
|
|
71
|
+
this._onRepeat = value.onRepeat;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// on_date - computed: false, optional: true, required: false
|
|
75
|
+
_onDate;
|
|
76
|
+
get onDate() {
|
|
77
|
+
return this.getStringAttribute('on_date');
|
|
78
|
+
}
|
|
79
|
+
set onDate(value) {
|
|
80
|
+
this._onDate = value;
|
|
81
|
+
}
|
|
82
|
+
resetOnDate() {
|
|
83
|
+
this._onDate = undefined;
|
|
84
|
+
}
|
|
85
|
+
// Temporarily expose input value. Use with caution.
|
|
86
|
+
get onDateInput() {
|
|
87
|
+
return this._onDate;
|
|
88
|
+
}
|
|
89
|
+
// on_repeat - computed: false, optional: true, required: false
|
|
90
|
+
_onRepeat;
|
|
91
|
+
get onRepeat() {
|
|
92
|
+
return this.getNumberAttribute('on_repeat');
|
|
93
|
+
}
|
|
94
|
+
set onRepeat(value) {
|
|
95
|
+
this._onRepeat = value;
|
|
96
|
+
}
|
|
97
|
+
resetOnRepeat() {
|
|
98
|
+
this._onRepeat = undefined;
|
|
99
|
+
}
|
|
100
|
+
// Temporarily expose input value. Use with caution.
|
|
101
|
+
get onRepeatInput() {
|
|
102
|
+
return this._onRepeat;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
export function monitorDowntimeFrequencyDaysOfWeekToTerraform(struct) {
|
|
106
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
107
|
+
return struct;
|
|
108
|
+
}
|
|
109
|
+
if (cdktf.isComplexElement(struct)) {
|
|
110
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
ordinal_day_of_month: cdktf.stringToTerraform(struct.ordinalDayOfMonth),
|
|
114
|
+
week_day: cdktf.stringToTerraform(struct.weekDay),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export function monitorDowntimeFrequencyDaysOfWeekToHclTerraform(struct) {
|
|
118
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
119
|
+
return struct;
|
|
120
|
+
}
|
|
121
|
+
if (cdktf.isComplexElement(struct)) {
|
|
122
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
123
|
+
}
|
|
124
|
+
const attrs = {
|
|
125
|
+
ordinal_day_of_month: {
|
|
126
|
+
value: cdktf.stringToHclTerraform(struct.ordinalDayOfMonth),
|
|
127
|
+
isBlock: false,
|
|
128
|
+
type: "simple",
|
|
129
|
+
storageClassType: "string",
|
|
130
|
+
},
|
|
131
|
+
week_day: {
|
|
132
|
+
value: cdktf.stringToHclTerraform(struct.weekDay),
|
|
133
|
+
isBlock: false,
|
|
134
|
+
type: "simple",
|
|
135
|
+
storageClassType: "string",
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
// remove undefined attributes
|
|
139
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
140
|
+
}
|
|
141
|
+
export class MonitorDowntimeFrequencyDaysOfWeekOutputReference extends cdktf.ComplexObject {
|
|
142
|
+
isEmptyObject = false;
|
|
143
|
+
/**
|
|
144
|
+
* @param terraformResource The parent resource
|
|
145
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
146
|
+
*/
|
|
147
|
+
constructor(terraformResource, terraformAttribute) {
|
|
148
|
+
super(terraformResource, terraformAttribute, false, 0);
|
|
149
|
+
}
|
|
150
|
+
get internalValue() {
|
|
151
|
+
let hasAnyValues = this.isEmptyObject;
|
|
152
|
+
const internalValueResult = {};
|
|
153
|
+
if (this._ordinalDayOfMonth !== undefined) {
|
|
154
|
+
hasAnyValues = true;
|
|
155
|
+
internalValueResult.ordinalDayOfMonth = this._ordinalDayOfMonth;
|
|
156
|
+
}
|
|
157
|
+
if (this._weekDay !== undefined) {
|
|
158
|
+
hasAnyValues = true;
|
|
159
|
+
internalValueResult.weekDay = this._weekDay;
|
|
160
|
+
}
|
|
161
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
162
|
+
}
|
|
163
|
+
set internalValue(value) {
|
|
164
|
+
if (value === undefined) {
|
|
165
|
+
this.isEmptyObject = false;
|
|
166
|
+
this._ordinalDayOfMonth = undefined;
|
|
167
|
+
this._weekDay = undefined;
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
171
|
+
this._ordinalDayOfMonth = value.ordinalDayOfMonth;
|
|
172
|
+
this._weekDay = value.weekDay;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
// ordinal_day_of_month - computed: false, optional: false, required: true
|
|
176
|
+
_ordinalDayOfMonth;
|
|
177
|
+
get ordinalDayOfMonth() {
|
|
178
|
+
return this.getStringAttribute('ordinal_day_of_month');
|
|
179
|
+
}
|
|
180
|
+
set ordinalDayOfMonth(value) {
|
|
181
|
+
this._ordinalDayOfMonth = value;
|
|
182
|
+
}
|
|
183
|
+
// Temporarily expose input value. Use with caution.
|
|
184
|
+
get ordinalDayOfMonthInput() {
|
|
185
|
+
return this._ordinalDayOfMonth;
|
|
186
|
+
}
|
|
187
|
+
// week_day - computed: false, optional: false, required: true
|
|
188
|
+
_weekDay;
|
|
189
|
+
get weekDay() {
|
|
190
|
+
return this.getStringAttribute('week_day');
|
|
191
|
+
}
|
|
192
|
+
set weekDay(value) {
|
|
193
|
+
this._weekDay = value;
|
|
194
|
+
}
|
|
195
|
+
// Temporarily expose input value. Use with caution.
|
|
196
|
+
get weekDayInput() {
|
|
197
|
+
return this._weekDay;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
export function monitorDowntimeFrequencyToTerraform(struct) {
|
|
201
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
202
|
+
return struct;
|
|
203
|
+
}
|
|
204
|
+
if (cdktf.isComplexElement(struct)) {
|
|
205
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
days_of_month: cdktf.listMapper(cdktf.numberToTerraform, false)(struct.daysOfMonth),
|
|
209
|
+
days_of_week: monitorDowntimeFrequencyDaysOfWeekToTerraform(struct.daysOfWeek),
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
export function monitorDowntimeFrequencyToHclTerraform(struct) {
|
|
213
|
+
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
|
|
214
|
+
return struct;
|
|
215
|
+
}
|
|
216
|
+
if (cdktf.isComplexElement(struct)) {
|
|
217
|
+
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
|
|
218
|
+
}
|
|
219
|
+
const attrs = {
|
|
220
|
+
days_of_month: {
|
|
221
|
+
value: cdktf.listMapperHcl(cdktf.numberToHclTerraform, false)(struct.daysOfMonth),
|
|
222
|
+
isBlock: false,
|
|
223
|
+
type: "set",
|
|
224
|
+
storageClassType: "numberList",
|
|
225
|
+
},
|
|
226
|
+
days_of_week: {
|
|
227
|
+
value: monitorDowntimeFrequencyDaysOfWeekToHclTerraform(struct.daysOfWeek),
|
|
228
|
+
isBlock: true,
|
|
229
|
+
type: "list",
|
|
230
|
+
storageClassType: "MonitorDowntimeFrequencyDaysOfWeekList",
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
// remove undefined attributes
|
|
234
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
235
|
+
}
|
|
236
|
+
export class MonitorDowntimeFrequencyOutputReference extends cdktf.ComplexObject {
|
|
237
|
+
isEmptyObject = false;
|
|
238
|
+
/**
|
|
239
|
+
* @param terraformResource The parent resource
|
|
240
|
+
* @param terraformAttribute The attribute on the parent resource this class is referencing
|
|
241
|
+
*/
|
|
242
|
+
constructor(terraformResource, terraformAttribute) {
|
|
243
|
+
super(terraformResource, terraformAttribute, false, 0);
|
|
244
|
+
}
|
|
245
|
+
get internalValue() {
|
|
246
|
+
let hasAnyValues = this.isEmptyObject;
|
|
247
|
+
const internalValueResult = {};
|
|
248
|
+
if (this._daysOfMonth !== undefined) {
|
|
249
|
+
hasAnyValues = true;
|
|
250
|
+
internalValueResult.daysOfMonth = this._daysOfMonth;
|
|
251
|
+
}
|
|
252
|
+
if (this._daysOfWeek?.internalValue !== undefined) {
|
|
253
|
+
hasAnyValues = true;
|
|
254
|
+
internalValueResult.daysOfWeek = this._daysOfWeek?.internalValue;
|
|
255
|
+
}
|
|
256
|
+
return hasAnyValues ? internalValueResult : undefined;
|
|
257
|
+
}
|
|
258
|
+
set internalValue(value) {
|
|
259
|
+
if (value === undefined) {
|
|
260
|
+
this.isEmptyObject = false;
|
|
261
|
+
this._daysOfMonth = undefined;
|
|
262
|
+
this._daysOfWeek.internalValue = undefined;
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
this.isEmptyObject = Object.keys(value).length === 0;
|
|
266
|
+
this._daysOfMonth = value.daysOfMonth;
|
|
267
|
+
this._daysOfWeek.internalValue = value.daysOfWeek;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
// days_of_month - computed: false, optional: true, required: false
|
|
271
|
+
_daysOfMonth;
|
|
272
|
+
get daysOfMonth() {
|
|
273
|
+
return cdktf.Token.asNumberList(cdktf.Fn.tolist(this.getNumberListAttribute('days_of_month')));
|
|
274
|
+
}
|
|
275
|
+
set daysOfMonth(value) {
|
|
276
|
+
this._daysOfMonth = value;
|
|
277
|
+
}
|
|
278
|
+
resetDaysOfMonth() {
|
|
279
|
+
this._daysOfMonth = undefined;
|
|
280
|
+
}
|
|
281
|
+
// Temporarily expose input value. Use with caution.
|
|
282
|
+
get daysOfMonthInput() {
|
|
283
|
+
return this._daysOfMonth;
|
|
284
|
+
}
|
|
285
|
+
// days_of_week - computed: false, optional: true, required: false
|
|
286
|
+
_daysOfWeek = new MonitorDowntimeFrequencyDaysOfWeekOutputReference(this, "days_of_week");
|
|
287
|
+
get daysOfWeek() {
|
|
288
|
+
return this._daysOfWeek;
|
|
289
|
+
}
|
|
290
|
+
putDaysOfWeek(value) {
|
|
291
|
+
this._daysOfWeek.internalValue = value;
|
|
292
|
+
}
|
|
293
|
+
resetDaysOfWeek() {
|
|
294
|
+
this._daysOfWeek.internalValue = undefined;
|
|
295
|
+
}
|
|
296
|
+
// Temporarily expose input value. Use with caution.
|
|
297
|
+
get daysOfWeekInput() {
|
|
298
|
+
return this._daysOfWeek.internalValue;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Represents a {@link https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/monitor_downtime newrelic_monitor_downtime}
|
|
303
|
+
*/
|
|
304
|
+
export class MonitorDowntime extends cdktf.TerraformResource {
|
|
305
|
+
// =================
|
|
306
|
+
// STATIC PROPERTIES
|
|
307
|
+
// =================
|
|
308
|
+
static tfResourceType = "newrelic_monitor_downtime";
|
|
309
|
+
// ==============
|
|
310
|
+
// STATIC Methods
|
|
311
|
+
// ==============
|
|
312
|
+
/**
|
|
313
|
+
* Generates CDKTF code for importing a MonitorDowntime resource upon running "cdktf plan <stack-name>"
|
|
314
|
+
* @param scope The scope in which to define this construct
|
|
315
|
+
* @param importToId The construct id used in the generated config for the MonitorDowntime to import
|
|
316
|
+
* @param importFromId The id of the existing MonitorDowntime that should be imported. Refer to the {@link https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/monitor_downtime#import import section} in the documentation of this resource for the id to use
|
|
317
|
+
* @param provider? Optional instance of the provider where the MonitorDowntime to import is found
|
|
318
|
+
*/
|
|
319
|
+
static generateConfigForImport(scope, importToId, importFromId, provider) {
|
|
320
|
+
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "newrelic_monitor_downtime", importId: importFromId, provider });
|
|
321
|
+
}
|
|
322
|
+
// ===========
|
|
323
|
+
// INITIALIZER
|
|
324
|
+
// ===========
|
|
325
|
+
/**
|
|
326
|
+
* Create a new {@link https://registry.terraform.io/providers/newrelic/newrelic/3.75.4/docs/resources/monitor_downtime newrelic_monitor_downtime} Resource
|
|
327
|
+
*
|
|
328
|
+
* @param scope The scope in which to define this construct
|
|
329
|
+
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
|
|
330
|
+
* @param options MonitorDowntimeConfig
|
|
331
|
+
*/
|
|
332
|
+
constructor(scope, id, config) {
|
|
333
|
+
super(scope, id, {
|
|
334
|
+
terraformResourceType: 'newrelic_monitor_downtime',
|
|
335
|
+
terraformGeneratorMetadata: {
|
|
336
|
+
providerName: 'newrelic',
|
|
337
|
+
providerVersion: '3.75.4',
|
|
338
|
+
providerVersionConstraint: '3.75.4'
|
|
339
|
+
},
|
|
340
|
+
provider: config.provider,
|
|
341
|
+
dependsOn: config.dependsOn,
|
|
342
|
+
count: config.count,
|
|
343
|
+
lifecycle: config.lifecycle,
|
|
344
|
+
provisioners: config.provisioners,
|
|
345
|
+
connection: config.connection,
|
|
346
|
+
forEach: config.forEach
|
|
347
|
+
});
|
|
348
|
+
this._accountId = config.accountId;
|
|
349
|
+
this._endTime = config.endTime;
|
|
350
|
+
this._id = config.id;
|
|
351
|
+
this._maintenanceDays = config.maintenanceDays;
|
|
352
|
+
this._mode = config.mode;
|
|
353
|
+
this._monitorGuids = config.monitorGuids;
|
|
354
|
+
this._name = config.name;
|
|
355
|
+
this._startTime = config.startTime;
|
|
356
|
+
this._timeZone = config.timeZone;
|
|
357
|
+
this._endRepeat.internalValue = config.endRepeat;
|
|
358
|
+
this._frequency.internalValue = config.frequency;
|
|
359
|
+
}
|
|
360
|
+
// ==========
|
|
361
|
+
// ATTRIBUTES
|
|
362
|
+
// ==========
|
|
363
|
+
// account_id - computed: true, optional: true, required: false
|
|
364
|
+
_accountId;
|
|
365
|
+
get accountId() {
|
|
366
|
+
return this.getNumberAttribute('account_id');
|
|
367
|
+
}
|
|
368
|
+
set accountId(value) {
|
|
369
|
+
this._accountId = value;
|
|
370
|
+
}
|
|
371
|
+
resetAccountId() {
|
|
372
|
+
this._accountId = undefined;
|
|
373
|
+
}
|
|
374
|
+
// Temporarily expose input value. Use with caution.
|
|
375
|
+
get accountIdInput() {
|
|
376
|
+
return this._accountId;
|
|
377
|
+
}
|
|
378
|
+
// end_time - computed: false, optional: false, required: true
|
|
379
|
+
_endTime;
|
|
380
|
+
get endTime() {
|
|
381
|
+
return this.getStringAttribute('end_time');
|
|
382
|
+
}
|
|
383
|
+
set endTime(value) {
|
|
384
|
+
this._endTime = value;
|
|
385
|
+
}
|
|
386
|
+
// Temporarily expose input value. Use with caution.
|
|
387
|
+
get endTimeInput() {
|
|
388
|
+
return this._endTime;
|
|
389
|
+
}
|
|
390
|
+
// id - computed: true, optional: true, required: false
|
|
391
|
+
_id;
|
|
392
|
+
get id() {
|
|
393
|
+
return this.getStringAttribute('id');
|
|
394
|
+
}
|
|
395
|
+
set id(value) {
|
|
396
|
+
this._id = value;
|
|
397
|
+
}
|
|
398
|
+
resetId() {
|
|
399
|
+
this._id = undefined;
|
|
400
|
+
}
|
|
401
|
+
// Temporarily expose input value. Use with caution.
|
|
402
|
+
get idInput() {
|
|
403
|
+
return this._id;
|
|
404
|
+
}
|
|
405
|
+
// maintenance_days - computed: false, optional: true, required: false
|
|
406
|
+
_maintenanceDays;
|
|
407
|
+
get maintenanceDays() {
|
|
408
|
+
return cdktf.Fn.tolist(this.getListAttribute('maintenance_days'));
|
|
409
|
+
}
|
|
410
|
+
set maintenanceDays(value) {
|
|
411
|
+
this._maintenanceDays = value;
|
|
412
|
+
}
|
|
413
|
+
resetMaintenanceDays() {
|
|
414
|
+
this._maintenanceDays = undefined;
|
|
415
|
+
}
|
|
416
|
+
// Temporarily expose input value. Use with caution.
|
|
417
|
+
get maintenanceDaysInput() {
|
|
418
|
+
return this._maintenanceDays;
|
|
419
|
+
}
|
|
420
|
+
// mode - computed: false, optional: false, required: true
|
|
421
|
+
_mode;
|
|
422
|
+
get mode() {
|
|
423
|
+
return this.getStringAttribute('mode');
|
|
424
|
+
}
|
|
425
|
+
set mode(value) {
|
|
426
|
+
this._mode = value;
|
|
427
|
+
}
|
|
428
|
+
// Temporarily expose input value. Use with caution.
|
|
429
|
+
get modeInput() {
|
|
430
|
+
return this._mode;
|
|
431
|
+
}
|
|
432
|
+
// monitor_guids - computed: false, optional: true, required: false
|
|
433
|
+
_monitorGuids;
|
|
434
|
+
get monitorGuids() {
|
|
435
|
+
return cdktf.Fn.tolist(this.getListAttribute('monitor_guids'));
|
|
436
|
+
}
|
|
437
|
+
set monitorGuids(value) {
|
|
438
|
+
this._monitorGuids = value;
|
|
439
|
+
}
|
|
440
|
+
resetMonitorGuids() {
|
|
441
|
+
this._monitorGuids = undefined;
|
|
442
|
+
}
|
|
443
|
+
// Temporarily expose input value. Use with caution.
|
|
444
|
+
get monitorGuidsInput() {
|
|
445
|
+
return this._monitorGuids;
|
|
446
|
+
}
|
|
447
|
+
// name - computed: false, optional: false, required: true
|
|
448
|
+
_name;
|
|
449
|
+
get name() {
|
|
450
|
+
return this.getStringAttribute('name');
|
|
451
|
+
}
|
|
452
|
+
set name(value) {
|
|
453
|
+
this._name = value;
|
|
454
|
+
}
|
|
455
|
+
// Temporarily expose input value. Use with caution.
|
|
456
|
+
get nameInput() {
|
|
457
|
+
return this._name;
|
|
458
|
+
}
|
|
459
|
+
// start_time - computed: false, optional: false, required: true
|
|
460
|
+
_startTime;
|
|
461
|
+
get startTime() {
|
|
462
|
+
return this.getStringAttribute('start_time');
|
|
463
|
+
}
|
|
464
|
+
set startTime(value) {
|
|
465
|
+
this._startTime = value;
|
|
466
|
+
}
|
|
467
|
+
// Temporarily expose input value. Use with caution.
|
|
468
|
+
get startTimeInput() {
|
|
469
|
+
return this._startTime;
|
|
470
|
+
}
|
|
471
|
+
// time_zone - computed: false, optional: false, required: true
|
|
472
|
+
_timeZone;
|
|
473
|
+
get timeZone() {
|
|
474
|
+
return this.getStringAttribute('time_zone');
|
|
475
|
+
}
|
|
476
|
+
set timeZone(value) {
|
|
477
|
+
this._timeZone = value;
|
|
478
|
+
}
|
|
479
|
+
// Temporarily expose input value. Use with caution.
|
|
480
|
+
get timeZoneInput() {
|
|
481
|
+
return this._timeZone;
|
|
482
|
+
}
|
|
483
|
+
// end_repeat - computed: false, optional: true, required: false
|
|
484
|
+
_endRepeat = new MonitorDowntimeEndRepeatOutputReference(this, "end_repeat");
|
|
485
|
+
get endRepeat() {
|
|
486
|
+
return this._endRepeat;
|
|
487
|
+
}
|
|
488
|
+
putEndRepeat(value) {
|
|
489
|
+
this._endRepeat.internalValue = value;
|
|
490
|
+
}
|
|
491
|
+
resetEndRepeat() {
|
|
492
|
+
this._endRepeat.internalValue = undefined;
|
|
493
|
+
}
|
|
494
|
+
// Temporarily expose input value. Use with caution.
|
|
495
|
+
get endRepeatInput() {
|
|
496
|
+
return this._endRepeat.internalValue;
|
|
497
|
+
}
|
|
498
|
+
// frequency - computed: false, optional: true, required: false
|
|
499
|
+
_frequency = new MonitorDowntimeFrequencyOutputReference(this, "frequency");
|
|
500
|
+
get frequency() {
|
|
501
|
+
return this._frequency;
|
|
502
|
+
}
|
|
503
|
+
putFrequency(value) {
|
|
504
|
+
this._frequency.internalValue = value;
|
|
505
|
+
}
|
|
506
|
+
resetFrequency() {
|
|
507
|
+
this._frequency.internalValue = undefined;
|
|
508
|
+
}
|
|
509
|
+
// Temporarily expose input value. Use with caution.
|
|
510
|
+
get frequencyInput() {
|
|
511
|
+
return this._frequency.internalValue;
|
|
512
|
+
}
|
|
513
|
+
// =========
|
|
514
|
+
// SYNTHESIS
|
|
515
|
+
// =========
|
|
516
|
+
synthesizeAttributes() {
|
|
517
|
+
return {
|
|
518
|
+
account_id: cdktf.numberToTerraform(this._accountId),
|
|
519
|
+
end_time: cdktf.stringToTerraform(this._endTime),
|
|
520
|
+
id: cdktf.stringToTerraform(this._id),
|
|
521
|
+
maintenance_days: cdktf.listMapper(cdktf.stringToTerraform, false)(this._maintenanceDays),
|
|
522
|
+
mode: cdktf.stringToTerraform(this._mode),
|
|
523
|
+
monitor_guids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._monitorGuids),
|
|
524
|
+
name: cdktf.stringToTerraform(this._name),
|
|
525
|
+
start_time: cdktf.stringToTerraform(this._startTime),
|
|
526
|
+
time_zone: cdktf.stringToTerraform(this._timeZone),
|
|
527
|
+
end_repeat: monitorDowntimeEndRepeatToTerraform(this._endRepeat.internalValue),
|
|
528
|
+
frequency: monitorDowntimeFrequencyToTerraform(this._frequency.internalValue),
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
synthesizeHclAttributes() {
|
|
532
|
+
const attrs = {
|
|
533
|
+
account_id: {
|
|
534
|
+
value: cdktf.numberToHclTerraform(this._accountId),
|
|
535
|
+
isBlock: false,
|
|
536
|
+
type: "simple",
|
|
537
|
+
storageClassType: "number",
|
|
538
|
+
},
|
|
539
|
+
end_time: {
|
|
540
|
+
value: cdktf.stringToHclTerraform(this._endTime),
|
|
541
|
+
isBlock: false,
|
|
542
|
+
type: "simple",
|
|
543
|
+
storageClassType: "string",
|
|
544
|
+
},
|
|
545
|
+
id: {
|
|
546
|
+
value: cdktf.stringToHclTerraform(this._id),
|
|
547
|
+
isBlock: false,
|
|
548
|
+
type: "simple",
|
|
549
|
+
storageClassType: "string",
|
|
550
|
+
},
|
|
551
|
+
maintenance_days: {
|
|
552
|
+
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._maintenanceDays),
|
|
553
|
+
isBlock: false,
|
|
554
|
+
type: "set",
|
|
555
|
+
storageClassType: "stringList",
|
|
556
|
+
},
|
|
557
|
+
mode: {
|
|
558
|
+
value: cdktf.stringToHclTerraform(this._mode),
|
|
559
|
+
isBlock: false,
|
|
560
|
+
type: "simple",
|
|
561
|
+
storageClassType: "string",
|
|
562
|
+
},
|
|
563
|
+
monitor_guids: {
|
|
564
|
+
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._monitorGuids),
|
|
565
|
+
isBlock: false,
|
|
566
|
+
type: "set",
|
|
567
|
+
storageClassType: "stringList",
|
|
568
|
+
},
|
|
569
|
+
name: {
|
|
570
|
+
value: cdktf.stringToHclTerraform(this._name),
|
|
571
|
+
isBlock: false,
|
|
572
|
+
type: "simple",
|
|
573
|
+
storageClassType: "string",
|
|
574
|
+
},
|
|
575
|
+
start_time: {
|
|
576
|
+
value: cdktf.stringToHclTerraform(this._startTime),
|
|
577
|
+
isBlock: false,
|
|
578
|
+
type: "simple",
|
|
579
|
+
storageClassType: "string",
|
|
580
|
+
},
|
|
581
|
+
time_zone: {
|
|
582
|
+
value: cdktf.stringToHclTerraform(this._timeZone),
|
|
583
|
+
isBlock: false,
|
|
584
|
+
type: "simple",
|
|
585
|
+
storageClassType: "string",
|
|
586
|
+
},
|
|
587
|
+
end_repeat: {
|
|
588
|
+
value: monitorDowntimeEndRepeatToHclTerraform(this._endRepeat.internalValue),
|
|
589
|
+
isBlock: true,
|
|
590
|
+
type: "list",
|
|
591
|
+
storageClassType: "MonitorDowntimeEndRepeatList",
|
|
592
|
+
},
|
|
593
|
+
frequency: {
|
|
594
|
+
value: monitorDowntimeFrequencyToHclTerraform(this._frequency.internalValue),
|
|
595
|
+
isBlock: true,
|
|
596
|
+
type: "list",
|
|
597
|
+
storageClassType: "MonitorDowntimeFrequencyList",
|
|
598
|
+
},
|
|
599
|
+
};
|
|
600
|
+
// remove undefined attributes
|
|
601
|
+
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
|
|
602
|
+
}
|
|
603
|
+
}
|