pulumi-newrelic 5.16.0a1703138319__py3-none-any.whl → 5.17.0__py3-none-any.whl
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.
- pulumi_newrelic/__init__.py +9 -0
- pulumi_newrelic/_inputs.py +126 -0
- pulumi_newrelic/alert_condition.py +2 -2
- pulumi_newrelic/get_service_level_alert_helper.py +2 -2
- pulumi_newrelic/infra_alert_condition.py +2 -2
- pulumi_newrelic/monitor_downtime.py +904 -0
- pulumi_newrelic/nrql_alert_condition.py +207 -9
- pulumi_newrelic/outputs.py +159 -0
- pulumi_newrelic/synthetics/alert_condition.py +2 -2
- {pulumi_newrelic-5.16.0a1703138319.dist-info → pulumi_newrelic-5.17.0.dist-info}/METADATA +2 -2
- {pulumi_newrelic-5.16.0a1703138319.dist-info → pulumi_newrelic-5.17.0.dist-info}/RECORD +13 -12
- {pulumi_newrelic-5.16.0a1703138319.dist-info → pulumi_newrelic-5.17.0.dist-info}/WHEEL +0 -0
- {pulumi_newrelic-5.16.0a1703138319.dist-info → pulumi_newrelic-5.17.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,904 @@
|
|
1
|
+
# coding=utf-8
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
4
|
+
|
5
|
+
import copy
|
6
|
+
import warnings
|
7
|
+
import pulumi
|
8
|
+
import pulumi.runtime
|
9
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
10
|
+
from . import _utilities
|
11
|
+
from . import outputs
|
12
|
+
from ._inputs import *
|
13
|
+
|
14
|
+
__all__ = ['MonitorDowntimeArgs', 'MonitorDowntime']
|
15
|
+
|
16
|
+
@pulumi.input_type
|
17
|
+
class MonitorDowntimeArgs:
|
18
|
+
def __init__(__self__, *,
|
19
|
+
end_time: pulumi.Input[str],
|
20
|
+
mode: pulumi.Input[str],
|
21
|
+
start_time: pulumi.Input[str],
|
22
|
+
time_zone: pulumi.Input[str],
|
23
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
24
|
+
end_repeat: Optional[pulumi.Input['MonitorDowntimeEndRepeatArgs']] = None,
|
25
|
+
frequency: Optional[pulumi.Input['MonitorDowntimeFrequencyArgs']] = None,
|
26
|
+
maintenance_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
27
|
+
monitor_guids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
28
|
+
name: Optional[pulumi.Input[str]] = None):
|
29
|
+
"""
|
30
|
+
The set of arguments for constructing a MonitorDowntime resource.
|
31
|
+
:param pulumi.Input[str] end_time: The time at which the monitor downtime would end operating, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2024-01-05T14:27:07`.
|
32
|
+
:param pulumi.Input[str] mode: One of the four modes of operation of monitor downtimes - `ONE_TIME`, `DAILY`, `MONTHLY` or `WEEKLY`.
|
33
|
+
:param pulumi.Input[str] start_time: The time at which the monitor downtime would begin to operate, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2023-12-20T10:48:53`.
|
34
|
+
:param pulumi.Input[str] time_zone: The timezone that applies to the Monitor Downtime schedule.
|
35
|
+
:param pulumi.Input[str] account_id: The account in which the monitor downtime would be created. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` (or the `account_id` specified in the `provider{}`), if not specified.
|
36
|
+
:param pulumi.Input['MonitorDowntimeEndRepeatArgs'] end_repeat: Options which may be used to specify when the repeat cycle of the monitor should end. This argument comprises the following nested arguments -
|
37
|
+
:param pulumi.Input['MonitorDowntimeFrequencyArgs'] frequency: Options which may be used to specify the configuration of a monthly monitor downtime. This argument comprises the following nested arguments -
|
38
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] maintenance_days: A list of days on which weekly monitor downtimes would function. Valid values which go into this list would be `"SUNDAY"`, `"MONDAY"`, `"TUESDAY"`, `"WEDNESDAY"`, `"THURSDAY"`, `"FRIDAY"` and/or `"SATURDAY"`.
|
39
|
+
|
40
|
+
> **NOTE:** `maintenance_days` **can only be used with the mode** `WEEKLY`, and **is a required argument** with weekly monitor downtimes (i.e. if the `mode` is `WEEKLY`).
|
41
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] monitor_guids: A list of GUIDs of synthetic monitors the monitor downtime would need to be applied to.
|
42
|
+
:param pulumi.Input[str] name: Name of the monitor downtime to be created.
|
43
|
+
"""
|
44
|
+
pulumi.set(__self__, "end_time", end_time)
|
45
|
+
pulumi.set(__self__, "mode", mode)
|
46
|
+
pulumi.set(__self__, "start_time", start_time)
|
47
|
+
pulumi.set(__self__, "time_zone", time_zone)
|
48
|
+
if account_id is not None:
|
49
|
+
pulumi.set(__self__, "account_id", account_id)
|
50
|
+
if end_repeat is not None:
|
51
|
+
pulumi.set(__self__, "end_repeat", end_repeat)
|
52
|
+
if frequency is not None:
|
53
|
+
pulumi.set(__self__, "frequency", frequency)
|
54
|
+
if maintenance_days is not None:
|
55
|
+
pulumi.set(__self__, "maintenance_days", maintenance_days)
|
56
|
+
if monitor_guids is not None:
|
57
|
+
pulumi.set(__self__, "monitor_guids", monitor_guids)
|
58
|
+
if name is not None:
|
59
|
+
pulumi.set(__self__, "name", name)
|
60
|
+
|
61
|
+
@property
|
62
|
+
@pulumi.getter(name="endTime")
|
63
|
+
def end_time(self) -> pulumi.Input[str]:
|
64
|
+
"""
|
65
|
+
The time at which the monitor downtime would end operating, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2024-01-05T14:27:07`.
|
66
|
+
"""
|
67
|
+
return pulumi.get(self, "end_time")
|
68
|
+
|
69
|
+
@end_time.setter
|
70
|
+
def end_time(self, value: pulumi.Input[str]):
|
71
|
+
pulumi.set(self, "end_time", value)
|
72
|
+
|
73
|
+
@property
|
74
|
+
@pulumi.getter
|
75
|
+
def mode(self) -> pulumi.Input[str]:
|
76
|
+
"""
|
77
|
+
One of the four modes of operation of monitor downtimes - `ONE_TIME`, `DAILY`, `MONTHLY` or `WEEKLY`.
|
78
|
+
"""
|
79
|
+
return pulumi.get(self, "mode")
|
80
|
+
|
81
|
+
@mode.setter
|
82
|
+
def mode(self, value: pulumi.Input[str]):
|
83
|
+
pulumi.set(self, "mode", value)
|
84
|
+
|
85
|
+
@property
|
86
|
+
@pulumi.getter(name="startTime")
|
87
|
+
def start_time(self) -> pulumi.Input[str]:
|
88
|
+
"""
|
89
|
+
The time at which the monitor downtime would begin to operate, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2023-12-20T10:48:53`.
|
90
|
+
"""
|
91
|
+
return pulumi.get(self, "start_time")
|
92
|
+
|
93
|
+
@start_time.setter
|
94
|
+
def start_time(self, value: pulumi.Input[str]):
|
95
|
+
pulumi.set(self, "start_time", value)
|
96
|
+
|
97
|
+
@property
|
98
|
+
@pulumi.getter(name="timeZone")
|
99
|
+
def time_zone(self) -> pulumi.Input[str]:
|
100
|
+
"""
|
101
|
+
The timezone that applies to the Monitor Downtime schedule.
|
102
|
+
"""
|
103
|
+
return pulumi.get(self, "time_zone")
|
104
|
+
|
105
|
+
@time_zone.setter
|
106
|
+
def time_zone(self, value: pulumi.Input[str]):
|
107
|
+
pulumi.set(self, "time_zone", value)
|
108
|
+
|
109
|
+
@property
|
110
|
+
@pulumi.getter(name="accountId")
|
111
|
+
def account_id(self) -> Optional[pulumi.Input[str]]:
|
112
|
+
"""
|
113
|
+
The account in which the monitor downtime would be created. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` (or the `account_id` specified in the `provider{}`), if not specified.
|
114
|
+
"""
|
115
|
+
return pulumi.get(self, "account_id")
|
116
|
+
|
117
|
+
@account_id.setter
|
118
|
+
def account_id(self, value: Optional[pulumi.Input[str]]):
|
119
|
+
pulumi.set(self, "account_id", value)
|
120
|
+
|
121
|
+
@property
|
122
|
+
@pulumi.getter(name="endRepeat")
|
123
|
+
def end_repeat(self) -> Optional[pulumi.Input['MonitorDowntimeEndRepeatArgs']]:
|
124
|
+
"""
|
125
|
+
Options which may be used to specify when the repeat cycle of the monitor should end. This argument comprises the following nested arguments -
|
126
|
+
"""
|
127
|
+
return pulumi.get(self, "end_repeat")
|
128
|
+
|
129
|
+
@end_repeat.setter
|
130
|
+
def end_repeat(self, value: Optional[pulumi.Input['MonitorDowntimeEndRepeatArgs']]):
|
131
|
+
pulumi.set(self, "end_repeat", value)
|
132
|
+
|
133
|
+
@property
|
134
|
+
@pulumi.getter
|
135
|
+
def frequency(self) -> Optional[pulumi.Input['MonitorDowntimeFrequencyArgs']]:
|
136
|
+
"""
|
137
|
+
Options which may be used to specify the configuration of a monthly monitor downtime. This argument comprises the following nested arguments -
|
138
|
+
"""
|
139
|
+
return pulumi.get(self, "frequency")
|
140
|
+
|
141
|
+
@frequency.setter
|
142
|
+
def frequency(self, value: Optional[pulumi.Input['MonitorDowntimeFrequencyArgs']]):
|
143
|
+
pulumi.set(self, "frequency", value)
|
144
|
+
|
145
|
+
@property
|
146
|
+
@pulumi.getter(name="maintenanceDays")
|
147
|
+
def maintenance_days(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
148
|
+
"""
|
149
|
+
A list of days on which weekly monitor downtimes would function. Valid values which go into this list would be `"SUNDAY"`, `"MONDAY"`, `"TUESDAY"`, `"WEDNESDAY"`, `"THURSDAY"`, `"FRIDAY"` and/or `"SATURDAY"`.
|
150
|
+
|
151
|
+
> **NOTE:** `maintenance_days` **can only be used with the mode** `WEEKLY`, and **is a required argument** with weekly monitor downtimes (i.e. if the `mode` is `WEEKLY`).
|
152
|
+
"""
|
153
|
+
return pulumi.get(self, "maintenance_days")
|
154
|
+
|
155
|
+
@maintenance_days.setter
|
156
|
+
def maintenance_days(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
157
|
+
pulumi.set(self, "maintenance_days", value)
|
158
|
+
|
159
|
+
@property
|
160
|
+
@pulumi.getter(name="monitorGuids")
|
161
|
+
def monitor_guids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
162
|
+
"""
|
163
|
+
A list of GUIDs of synthetic monitors the monitor downtime would need to be applied to.
|
164
|
+
"""
|
165
|
+
return pulumi.get(self, "monitor_guids")
|
166
|
+
|
167
|
+
@monitor_guids.setter
|
168
|
+
def monitor_guids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
169
|
+
pulumi.set(self, "monitor_guids", value)
|
170
|
+
|
171
|
+
@property
|
172
|
+
@pulumi.getter
|
173
|
+
def name(self) -> Optional[pulumi.Input[str]]:
|
174
|
+
"""
|
175
|
+
Name of the monitor downtime to be created.
|
176
|
+
"""
|
177
|
+
return pulumi.get(self, "name")
|
178
|
+
|
179
|
+
@name.setter
|
180
|
+
def name(self, value: Optional[pulumi.Input[str]]):
|
181
|
+
pulumi.set(self, "name", value)
|
182
|
+
|
183
|
+
|
184
|
+
@pulumi.input_type
|
185
|
+
class _MonitorDowntimeState:
|
186
|
+
def __init__(__self__, *,
|
187
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
188
|
+
end_repeat: Optional[pulumi.Input['MonitorDowntimeEndRepeatArgs']] = None,
|
189
|
+
end_time: Optional[pulumi.Input[str]] = None,
|
190
|
+
frequency: Optional[pulumi.Input['MonitorDowntimeFrequencyArgs']] = None,
|
191
|
+
maintenance_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
192
|
+
mode: Optional[pulumi.Input[str]] = None,
|
193
|
+
monitor_guids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
194
|
+
name: Optional[pulumi.Input[str]] = None,
|
195
|
+
start_time: Optional[pulumi.Input[str]] = None,
|
196
|
+
time_zone: Optional[pulumi.Input[str]] = None):
|
197
|
+
"""
|
198
|
+
Input properties used for looking up and filtering MonitorDowntime resources.
|
199
|
+
:param pulumi.Input[str] account_id: The account in which the monitor downtime would be created. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` (or the `account_id` specified in the `provider{}`), if not specified.
|
200
|
+
:param pulumi.Input['MonitorDowntimeEndRepeatArgs'] end_repeat: Options which may be used to specify when the repeat cycle of the monitor should end. This argument comprises the following nested arguments -
|
201
|
+
:param pulumi.Input[str] end_time: The time at which the monitor downtime would end operating, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2024-01-05T14:27:07`.
|
202
|
+
:param pulumi.Input['MonitorDowntimeFrequencyArgs'] frequency: Options which may be used to specify the configuration of a monthly monitor downtime. This argument comprises the following nested arguments -
|
203
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] maintenance_days: A list of days on which weekly monitor downtimes would function. Valid values which go into this list would be `"SUNDAY"`, `"MONDAY"`, `"TUESDAY"`, `"WEDNESDAY"`, `"THURSDAY"`, `"FRIDAY"` and/or `"SATURDAY"`.
|
204
|
+
|
205
|
+
> **NOTE:** `maintenance_days` **can only be used with the mode** `WEEKLY`, and **is a required argument** with weekly monitor downtimes (i.e. if the `mode` is `WEEKLY`).
|
206
|
+
:param pulumi.Input[str] mode: One of the four modes of operation of monitor downtimes - `ONE_TIME`, `DAILY`, `MONTHLY` or `WEEKLY`.
|
207
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] monitor_guids: A list of GUIDs of synthetic monitors the monitor downtime would need to be applied to.
|
208
|
+
:param pulumi.Input[str] name: Name of the monitor downtime to be created.
|
209
|
+
:param pulumi.Input[str] start_time: The time at which the monitor downtime would begin to operate, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2023-12-20T10:48:53`.
|
210
|
+
:param pulumi.Input[str] time_zone: The timezone that applies to the Monitor Downtime schedule.
|
211
|
+
"""
|
212
|
+
if account_id is not None:
|
213
|
+
pulumi.set(__self__, "account_id", account_id)
|
214
|
+
if end_repeat is not None:
|
215
|
+
pulumi.set(__self__, "end_repeat", end_repeat)
|
216
|
+
if end_time is not None:
|
217
|
+
pulumi.set(__self__, "end_time", end_time)
|
218
|
+
if frequency is not None:
|
219
|
+
pulumi.set(__self__, "frequency", frequency)
|
220
|
+
if maintenance_days is not None:
|
221
|
+
pulumi.set(__self__, "maintenance_days", maintenance_days)
|
222
|
+
if mode is not None:
|
223
|
+
pulumi.set(__self__, "mode", mode)
|
224
|
+
if monitor_guids is not None:
|
225
|
+
pulumi.set(__self__, "monitor_guids", monitor_guids)
|
226
|
+
if name is not None:
|
227
|
+
pulumi.set(__self__, "name", name)
|
228
|
+
if start_time is not None:
|
229
|
+
pulumi.set(__self__, "start_time", start_time)
|
230
|
+
if time_zone is not None:
|
231
|
+
pulumi.set(__self__, "time_zone", time_zone)
|
232
|
+
|
233
|
+
@property
|
234
|
+
@pulumi.getter(name="accountId")
|
235
|
+
def account_id(self) -> Optional[pulumi.Input[str]]:
|
236
|
+
"""
|
237
|
+
The account in which the monitor downtime would be created. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` (or the `account_id` specified in the `provider{}`), if not specified.
|
238
|
+
"""
|
239
|
+
return pulumi.get(self, "account_id")
|
240
|
+
|
241
|
+
@account_id.setter
|
242
|
+
def account_id(self, value: Optional[pulumi.Input[str]]):
|
243
|
+
pulumi.set(self, "account_id", value)
|
244
|
+
|
245
|
+
@property
|
246
|
+
@pulumi.getter(name="endRepeat")
|
247
|
+
def end_repeat(self) -> Optional[pulumi.Input['MonitorDowntimeEndRepeatArgs']]:
|
248
|
+
"""
|
249
|
+
Options which may be used to specify when the repeat cycle of the monitor should end. This argument comprises the following nested arguments -
|
250
|
+
"""
|
251
|
+
return pulumi.get(self, "end_repeat")
|
252
|
+
|
253
|
+
@end_repeat.setter
|
254
|
+
def end_repeat(self, value: Optional[pulumi.Input['MonitorDowntimeEndRepeatArgs']]):
|
255
|
+
pulumi.set(self, "end_repeat", value)
|
256
|
+
|
257
|
+
@property
|
258
|
+
@pulumi.getter(name="endTime")
|
259
|
+
def end_time(self) -> Optional[pulumi.Input[str]]:
|
260
|
+
"""
|
261
|
+
The time at which the monitor downtime would end operating, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2024-01-05T14:27:07`.
|
262
|
+
"""
|
263
|
+
return pulumi.get(self, "end_time")
|
264
|
+
|
265
|
+
@end_time.setter
|
266
|
+
def end_time(self, value: Optional[pulumi.Input[str]]):
|
267
|
+
pulumi.set(self, "end_time", value)
|
268
|
+
|
269
|
+
@property
|
270
|
+
@pulumi.getter
|
271
|
+
def frequency(self) -> Optional[pulumi.Input['MonitorDowntimeFrequencyArgs']]:
|
272
|
+
"""
|
273
|
+
Options which may be used to specify the configuration of a monthly monitor downtime. This argument comprises the following nested arguments -
|
274
|
+
"""
|
275
|
+
return pulumi.get(self, "frequency")
|
276
|
+
|
277
|
+
@frequency.setter
|
278
|
+
def frequency(self, value: Optional[pulumi.Input['MonitorDowntimeFrequencyArgs']]):
|
279
|
+
pulumi.set(self, "frequency", value)
|
280
|
+
|
281
|
+
@property
|
282
|
+
@pulumi.getter(name="maintenanceDays")
|
283
|
+
def maintenance_days(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
284
|
+
"""
|
285
|
+
A list of days on which weekly monitor downtimes would function. Valid values which go into this list would be `"SUNDAY"`, `"MONDAY"`, `"TUESDAY"`, `"WEDNESDAY"`, `"THURSDAY"`, `"FRIDAY"` and/or `"SATURDAY"`.
|
286
|
+
|
287
|
+
> **NOTE:** `maintenance_days` **can only be used with the mode** `WEEKLY`, and **is a required argument** with weekly monitor downtimes (i.e. if the `mode` is `WEEKLY`).
|
288
|
+
"""
|
289
|
+
return pulumi.get(self, "maintenance_days")
|
290
|
+
|
291
|
+
@maintenance_days.setter
|
292
|
+
def maintenance_days(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
293
|
+
pulumi.set(self, "maintenance_days", value)
|
294
|
+
|
295
|
+
@property
|
296
|
+
@pulumi.getter
|
297
|
+
def mode(self) -> Optional[pulumi.Input[str]]:
|
298
|
+
"""
|
299
|
+
One of the four modes of operation of monitor downtimes - `ONE_TIME`, `DAILY`, `MONTHLY` or `WEEKLY`.
|
300
|
+
"""
|
301
|
+
return pulumi.get(self, "mode")
|
302
|
+
|
303
|
+
@mode.setter
|
304
|
+
def mode(self, value: Optional[pulumi.Input[str]]):
|
305
|
+
pulumi.set(self, "mode", value)
|
306
|
+
|
307
|
+
@property
|
308
|
+
@pulumi.getter(name="monitorGuids")
|
309
|
+
def monitor_guids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
310
|
+
"""
|
311
|
+
A list of GUIDs of synthetic monitors the monitor downtime would need to be applied to.
|
312
|
+
"""
|
313
|
+
return pulumi.get(self, "monitor_guids")
|
314
|
+
|
315
|
+
@monitor_guids.setter
|
316
|
+
def monitor_guids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
317
|
+
pulumi.set(self, "monitor_guids", value)
|
318
|
+
|
319
|
+
@property
|
320
|
+
@pulumi.getter
|
321
|
+
def name(self) -> Optional[pulumi.Input[str]]:
|
322
|
+
"""
|
323
|
+
Name of the monitor downtime to be created.
|
324
|
+
"""
|
325
|
+
return pulumi.get(self, "name")
|
326
|
+
|
327
|
+
@name.setter
|
328
|
+
def name(self, value: Optional[pulumi.Input[str]]):
|
329
|
+
pulumi.set(self, "name", value)
|
330
|
+
|
331
|
+
@property
|
332
|
+
@pulumi.getter(name="startTime")
|
333
|
+
def start_time(self) -> Optional[pulumi.Input[str]]:
|
334
|
+
"""
|
335
|
+
The time at which the monitor downtime would begin to operate, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2023-12-20T10:48:53`.
|
336
|
+
"""
|
337
|
+
return pulumi.get(self, "start_time")
|
338
|
+
|
339
|
+
@start_time.setter
|
340
|
+
def start_time(self, value: Optional[pulumi.Input[str]]):
|
341
|
+
pulumi.set(self, "start_time", value)
|
342
|
+
|
343
|
+
@property
|
344
|
+
@pulumi.getter(name="timeZone")
|
345
|
+
def time_zone(self) -> Optional[pulumi.Input[str]]:
|
346
|
+
"""
|
347
|
+
The timezone that applies to the Monitor Downtime schedule.
|
348
|
+
"""
|
349
|
+
return pulumi.get(self, "time_zone")
|
350
|
+
|
351
|
+
@time_zone.setter
|
352
|
+
def time_zone(self, value: Optional[pulumi.Input[str]]):
|
353
|
+
pulumi.set(self, "time_zone", value)
|
354
|
+
|
355
|
+
|
356
|
+
class MonitorDowntime(pulumi.CustomResource):
|
357
|
+
@overload
|
358
|
+
def __init__(__self__,
|
359
|
+
resource_name: str,
|
360
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
361
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
362
|
+
end_repeat: Optional[pulumi.Input[pulumi.InputType['MonitorDowntimeEndRepeatArgs']]] = None,
|
363
|
+
end_time: Optional[pulumi.Input[str]] = None,
|
364
|
+
frequency: Optional[pulumi.Input[pulumi.InputType['MonitorDowntimeFrequencyArgs']]] = None,
|
365
|
+
maintenance_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
366
|
+
mode: Optional[pulumi.Input[str]] = None,
|
367
|
+
monitor_guids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
368
|
+
name: Optional[pulumi.Input[str]] = None,
|
369
|
+
start_time: Optional[pulumi.Input[str]] = None,
|
370
|
+
time_zone: Optional[pulumi.Input[str]] = None,
|
371
|
+
__props__=None):
|
372
|
+
"""
|
373
|
+
Use this resource to create, update, and delete [Monitor Downtimes](https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/using-monitors/monitor-downtimes-disable-monitoring-during-scheduled-maintenance-times/) in New Relic.
|
374
|
+
|
375
|
+
## Example Usage
|
376
|
+
|
377
|
+
```python
|
378
|
+
import pulumi
|
379
|
+
import pulumi_newrelic as newrelic
|
380
|
+
|
381
|
+
foo = newrelic.MonitorDowntime("foo",
|
382
|
+
end_repeat=newrelic.MonitorDowntimeEndRepeatArgs(
|
383
|
+
on_date="2023-12-20",
|
384
|
+
),
|
385
|
+
end_time="2023-12-10T02:45:30",
|
386
|
+
maintenance_days=[
|
387
|
+
"FRIDAY",
|
388
|
+
"SATURDAY",
|
389
|
+
],
|
390
|
+
mode="WEEKLY",
|
391
|
+
monitor_guids=[
|
392
|
+
"<GUID-1>",
|
393
|
+
"<GUID-2>",
|
394
|
+
],
|
395
|
+
start_time="2023-11-30T10:30:00",
|
396
|
+
time_zone="Asia/Kolkata")
|
397
|
+
```
|
398
|
+
Monitor Downtimes are of four types; **one-time**, **daily**, **weekly** and **monthly**. For more details on each type and the right arguments that go with them, check out the argument reference and examples sections below.
|
399
|
+
## Examples
|
400
|
+
|
401
|
+
### One-Time Monitor Downtime
|
402
|
+
|
403
|
+
The below example illustrates creating a **one-time** monitor downtime.
|
404
|
+
|
405
|
+
```python
|
406
|
+
import pulumi
|
407
|
+
import pulumi_newrelic as newrelic
|
408
|
+
|
409
|
+
sample_one_time_newrelic_monitor_downtime = newrelic.MonitorDowntime("sampleOneTimeNewrelicMonitorDowntime",
|
410
|
+
end_time="2024-01-04T16:24:30",
|
411
|
+
mode="ONE_TIME",
|
412
|
+
monitor_guids=[
|
413
|
+
"<GUID-1>",
|
414
|
+
"<GUID-2>",
|
415
|
+
],
|
416
|
+
start_time="2023-12-04T10:15:00",
|
417
|
+
time_zone="America/Los_Angeles")
|
418
|
+
```
|
419
|
+
|
420
|
+
### Daily Monitor Downtime
|
421
|
+
|
422
|
+
The below example illustrates creating a **daily** monitor downtime.
|
423
|
+
|
424
|
+
Note that `end_repeat` has been specified in the configuration; however, this is optional, in accordance with the rules of `end_repeat` specified in the argument reference section above. This example uses the `on_date` nested argument of `end_repeat`, however, the other nested argument, `on_repeat` may also be used _instead_, as you may see in some of the other examples below; though both `on_date` and `on_repeat` cannot be specified together, as they are mutually exclusive.
|
425
|
+
|
426
|
+
```python
|
427
|
+
import pulumi
|
428
|
+
import pulumi_newrelic as newrelic
|
429
|
+
|
430
|
+
sample_daily_newrelic_monitor_downtime = newrelic.MonitorDowntime("sampleDailyNewrelicMonitorDowntime",
|
431
|
+
end_repeat=newrelic.MonitorDowntimeEndRepeatArgs(
|
432
|
+
on_date="2023-12-25",
|
433
|
+
),
|
434
|
+
end_time="2024-01-04T07:15:00",
|
435
|
+
mode="DAILY",
|
436
|
+
monitor_guids=[
|
437
|
+
"<GUID-1>",
|
438
|
+
"<GUID-2>",
|
439
|
+
],
|
440
|
+
start_time="2023-12-04T18:15:00",
|
441
|
+
time_zone="Asia/Kolkata")
|
442
|
+
```
|
443
|
+
|
444
|
+
### Weekly Monitor Downtime
|
445
|
+
|
446
|
+
The below example illustrates creating a **weekly** monitor downtime.
|
447
|
+
|
448
|
+
Note that `maintenance_days` has been specified in the configuration as it is required with weekly monitor downtimes; and `end_repeat` has not been specified as it is optional, all in accordance with the rules of these arguments specified in the argument reference section above.
|
449
|
+
|
450
|
+
```python
|
451
|
+
import pulumi
|
452
|
+
import pulumi_newrelic as newrelic
|
453
|
+
|
454
|
+
sample_weekly_newrelic_monitor_downtime = newrelic.MonitorDowntime("sampleWeeklyNewrelicMonitorDowntime",
|
455
|
+
end_time="2024-01-04T23:55:00",
|
456
|
+
maintenance_days=[
|
457
|
+
"SATURDAY",
|
458
|
+
"SUNDAY",
|
459
|
+
],
|
460
|
+
mode="WEEKLY",
|
461
|
+
monitor_guids=[
|
462
|
+
"<GUID-1>",
|
463
|
+
"<GUID-2>",
|
464
|
+
],
|
465
|
+
start_time="2023-12-04T14:15:00",
|
466
|
+
time_zone="US/Hawaii")
|
467
|
+
```
|
468
|
+
|
469
|
+
### Monthly Monitor Downtime
|
470
|
+
|
471
|
+
The below example illustrates creating a **monthly** monitor downtime.
|
472
|
+
|
473
|
+
Note that `frequency` has been specified in the configuration as it is required with monthly monitor downtimes, and `end_repeat` has been specified too, though it is optional. `frequency` has been specified with `days_of_week` comprising both of its nested arguments, `ordinal_day_of_month` and `week_day`; all in accordance with the rules of these arguments specified in the argument reference section above.
|
474
|
+
|
475
|
+
```python
|
476
|
+
import pulumi
|
477
|
+
import pulumi_newrelic as newrelic
|
478
|
+
|
479
|
+
sample_monthly_newrelic_monitor_downtime = newrelic.MonitorDowntime("sampleMonthlyNewrelicMonitorDowntime",
|
480
|
+
end_repeat=newrelic.MonitorDowntimeEndRepeatArgs(
|
481
|
+
on_repeat=6,
|
482
|
+
),
|
483
|
+
end_time="2024-01-04T19:15:00",
|
484
|
+
frequency=newrelic.MonitorDowntimeFrequencyArgs(
|
485
|
+
days_of_week=newrelic.MonitorDowntimeFrequencyDaysOfWeekArgs(
|
486
|
+
ordinal_day_of_month="SECOND",
|
487
|
+
week_day="SATURDAY",
|
488
|
+
),
|
489
|
+
),
|
490
|
+
mode="MONTHLY",
|
491
|
+
monitor_guids=[
|
492
|
+
"<GUID-1>",
|
493
|
+
"<GUID-2>",
|
494
|
+
],
|
495
|
+
start_time="2023-12-04T07:15:00",
|
496
|
+
time_zone="Europe/Dublin")
|
497
|
+
```
|
498
|
+
However, the `frequency` block in monthly monitor downtimes may also be specified with its other nested argument, `days_of_month`, as shown in the example below - though both `days_of_month` and `days_of_week` cannot be specified together, as they are mutually exclusive.
|
499
|
+
```python
|
500
|
+
import pulumi
|
501
|
+
import pulumi_newrelic as newrelic
|
502
|
+
|
503
|
+
sample_monthly_newrelic_monitor_downtime = newrelic.MonitorDowntime("sampleMonthlyNewrelicMonitorDowntime",
|
504
|
+
end_repeat=newrelic.MonitorDowntimeEndRepeatArgs(
|
505
|
+
on_repeat=6,
|
506
|
+
),
|
507
|
+
end_time="2024-01-04T19:15:00",
|
508
|
+
frequency=newrelic.MonitorDowntimeFrequencyArgs(
|
509
|
+
days_of_months=[
|
510
|
+
3,
|
511
|
+
6,
|
512
|
+
14,
|
513
|
+
23,
|
514
|
+
],
|
515
|
+
),
|
516
|
+
mode="MONTHLY",
|
517
|
+
monitor_guids=[
|
518
|
+
"<GUID-1>",
|
519
|
+
"<GUID-2>",
|
520
|
+
],
|
521
|
+
start_time="2023-12-04T07:15:00",
|
522
|
+
time_zone="Europe/Dublin")
|
523
|
+
```
|
524
|
+
|
525
|
+
## Import
|
526
|
+
|
527
|
+
A monitor downtime can be imported into Terraform configuration using its `guid`, i.e. bash
|
528
|
+
|
529
|
+
```sh
|
530
|
+
$ pulumi import newrelic:index/monitorDowntime:MonitorDowntime monitor <guid>
|
531
|
+
```
|
532
|
+
|
533
|
+
:param str resource_name: The name of the resource.
|
534
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
535
|
+
:param pulumi.Input[str] account_id: The account in which the monitor downtime would be created. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` (or the `account_id` specified in the `provider{}`), if not specified.
|
536
|
+
:param pulumi.Input[pulumi.InputType['MonitorDowntimeEndRepeatArgs']] end_repeat: Options which may be used to specify when the repeat cycle of the monitor should end. This argument comprises the following nested arguments -
|
537
|
+
:param pulumi.Input[str] end_time: The time at which the monitor downtime would end operating, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2024-01-05T14:27:07`.
|
538
|
+
:param pulumi.Input[pulumi.InputType['MonitorDowntimeFrequencyArgs']] frequency: Options which may be used to specify the configuration of a monthly monitor downtime. This argument comprises the following nested arguments -
|
539
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] maintenance_days: A list of days on which weekly monitor downtimes would function. Valid values which go into this list would be `"SUNDAY"`, `"MONDAY"`, `"TUESDAY"`, `"WEDNESDAY"`, `"THURSDAY"`, `"FRIDAY"` and/or `"SATURDAY"`.
|
540
|
+
|
541
|
+
> **NOTE:** `maintenance_days` **can only be used with the mode** `WEEKLY`, and **is a required argument** with weekly monitor downtimes (i.e. if the `mode` is `WEEKLY`).
|
542
|
+
:param pulumi.Input[str] mode: One of the four modes of operation of monitor downtimes - `ONE_TIME`, `DAILY`, `MONTHLY` or `WEEKLY`.
|
543
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] monitor_guids: A list of GUIDs of synthetic monitors the monitor downtime would need to be applied to.
|
544
|
+
:param pulumi.Input[str] name: Name of the monitor downtime to be created.
|
545
|
+
:param pulumi.Input[str] start_time: The time at which the monitor downtime would begin to operate, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2023-12-20T10:48:53`.
|
546
|
+
:param pulumi.Input[str] time_zone: The timezone that applies to the Monitor Downtime schedule.
|
547
|
+
"""
|
548
|
+
...
|
549
|
+
@overload
|
550
|
+
def __init__(__self__,
|
551
|
+
resource_name: str,
|
552
|
+
args: MonitorDowntimeArgs,
|
553
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
554
|
+
"""
|
555
|
+
Use this resource to create, update, and delete [Monitor Downtimes](https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/using-monitors/monitor-downtimes-disable-monitoring-during-scheduled-maintenance-times/) in New Relic.
|
556
|
+
|
557
|
+
## Example Usage
|
558
|
+
|
559
|
+
```python
|
560
|
+
import pulumi
|
561
|
+
import pulumi_newrelic as newrelic
|
562
|
+
|
563
|
+
foo = newrelic.MonitorDowntime("foo",
|
564
|
+
end_repeat=newrelic.MonitorDowntimeEndRepeatArgs(
|
565
|
+
on_date="2023-12-20",
|
566
|
+
),
|
567
|
+
end_time="2023-12-10T02:45:30",
|
568
|
+
maintenance_days=[
|
569
|
+
"FRIDAY",
|
570
|
+
"SATURDAY",
|
571
|
+
],
|
572
|
+
mode="WEEKLY",
|
573
|
+
monitor_guids=[
|
574
|
+
"<GUID-1>",
|
575
|
+
"<GUID-2>",
|
576
|
+
],
|
577
|
+
start_time="2023-11-30T10:30:00",
|
578
|
+
time_zone="Asia/Kolkata")
|
579
|
+
```
|
580
|
+
Monitor Downtimes are of four types; **one-time**, **daily**, **weekly** and **monthly**. For more details on each type and the right arguments that go with them, check out the argument reference and examples sections below.
|
581
|
+
## Examples
|
582
|
+
|
583
|
+
### One-Time Monitor Downtime
|
584
|
+
|
585
|
+
The below example illustrates creating a **one-time** monitor downtime.
|
586
|
+
|
587
|
+
```python
|
588
|
+
import pulumi
|
589
|
+
import pulumi_newrelic as newrelic
|
590
|
+
|
591
|
+
sample_one_time_newrelic_monitor_downtime = newrelic.MonitorDowntime("sampleOneTimeNewrelicMonitorDowntime",
|
592
|
+
end_time="2024-01-04T16:24:30",
|
593
|
+
mode="ONE_TIME",
|
594
|
+
monitor_guids=[
|
595
|
+
"<GUID-1>",
|
596
|
+
"<GUID-2>",
|
597
|
+
],
|
598
|
+
start_time="2023-12-04T10:15:00",
|
599
|
+
time_zone="America/Los_Angeles")
|
600
|
+
```
|
601
|
+
|
602
|
+
### Daily Monitor Downtime
|
603
|
+
|
604
|
+
The below example illustrates creating a **daily** monitor downtime.
|
605
|
+
|
606
|
+
Note that `end_repeat` has been specified in the configuration; however, this is optional, in accordance with the rules of `end_repeat` specified in the argument reference section above. This example uses the `on_date` nested argument of `end_repeat`, however, the other nested argument, `on_repeat` may also be used _instead_, as you may see in some of the other examples below; though both `on_date` and `on_repeat` cannot be specified together, as they are mutually exclusive.
|
607
|
+
|
608
|
+
```python
|
609
|
+
import pulumi
|
610
|
+
import pulumi_newrelic as newrelic
|
611
|
+
|
612
|
+
sample_daily_newrelic_monitor_downtime = newrelic.MonitorDowntime("sampleDailyNewrelicMonitorDowntime",
|
613
|
+
end_repeat=newrelic.MonitorDowntimeEndRepeatArgs(
|
614
|
+
on_date="2023-12-25",
|
615
|
+
),
|
616
|
+
end_time="2024-01-04T07:15:00",
|
617
|
+
mode="DAILY",
|
618
|
+
monitor_guids=[
|
619
|
+
"<GUID-1>",
|
620
|
+
"<GUID-2>",
|
621
|
+
],
|
622
|
+
start_time="2023-12-04T18:15:00",
|
623
|
+
time_zone="Asia/Kolkata")
|
624
|
+
```
|
625
|
+
|
626
|
+
### Weekly Monitor Downtime
|
627
|
+
|
628
|
+
The below example illustrates creating a **weekly** monitor downtime.
|
629
|
+
|
630
|
+
Note that `maintenance_days` has been specified in the configuration as it is required with weekly monitor downtimes; and `end_repeat` has not been specified as it is optional, all in accordance with the rules of these arguments specified in the argument reference section above.
|
631
|
+
|
632
|
+
```python
|
633
|
+
import pulumi
|
634
|
+
import pulumi_newrelic as newrelic
|
635
|
+
|
636
|
+
sample_weekly_newrelic_monitor_downtime = newrelic.MonitorDowntime("sampleWeeklyNewrelicMonitorDowntime",
|
637
|
+
end_time="2024-01-04T23:55:00",
|
638
|
+
maintenance_days=[
|
639
|
+
"SATURDAY",
|
640
|
+
"SUNDAY",
|
641
|
+
],
|
642
|
+
mode="WEEKLY",
|
643
|
+
monitor_guids=[
|
644
|
+
"<GUID-1>",
|
645
|
+
"<GUID-2>",
|
646
|
+
],
|
647
|
+
start_time="2023-12-04T14:15:00",
|
648
|
+
time_zone="US/Hawaii")
|
649
|
+
```
|
650
|
+
|
651
|
+
### Monthly Monitor Downtime
|
652
|
+
|
653
|
+
The below example illustrates creating a **monthly** monitor downtime.
|
654
|
+
|
655
|
+
Note that `frequency` has been specified in the configuration as it is required with monthly monitor downtimes, and `end_repeat` has been specified too, though it is optional. `frequency` has been specified with `days_of_week` comprising both of its nested arguments, `ordinal_day_of_month` and `week_day`; all in accordance with the rules of these arguments specified in the argument reference section above.
|
656
|
+
|
657
|
+
```python
|
658
|
+
import pulumi
|
659
|
+
import pulumi_newrelic as newrelic
|
660
|
+
|
661
|
+
sample_monthly_newrelic_monitor_downtime = newrelic.MonitorDowntime("sampleMonthlyNewrelicMonitorDowntime",
|
662
|
+
end_repeat=newrelic.MonitorDowntimeEndRepeatArgs(
|
663
|
+
on_repeat=6,
|
664
|
+
),
|
665
|
+
end_time="2024-01-04T19:15:00",
|
666
|
+
frequency=newrelic.MonitorDowntimeFrequencyArgs(
|
667
|
+
days_of_week=newrelic.MonitorDowntimeFrequencyDaysOfWeekArgs(
|
668
|
+
ordinal_day_of_month="SECOND",
|
669
|
+
week_day="SATURDAY",
|
670
|
+
),
|
671
|
+
),
|
672
|
+
mode="MONTHLY",
|
673
|
+
monitor_guids=[
|
674
|
+
"<GUID-1>",
|
675
|
+
"<GUID-2>",
|
676
|
+
],
|
677
|
+
start_time="2023-12-04T07:15:00",
|
678
|
+
time_zone="Europe/Dublin")
|
679
|
+
```
|
680
|
+
However, the `frequency` block in monthly monitor downtimes may also be specified with its other nested argument, `days_of_month`, as shown in the example below - though both `days_of_month` and `days_of_week` cannot be specified together, as they are mutually exclusive.
|
681
|
+
```python
|
682
|
+
import pulumi
|
683
|
+
import pulumi_newrelic as newrelic
|
684
|
+
|
685
|
+
sample_monthly_newrelic_monitor_downtime = newrelic.MonitorDowntime("sampleMonthlyNewrelicMonitorDowntime",
|
686
|
+
end_repeat=newrelic.MonitorDowntimeEndRepeatArgs(
|
687
|
+
on_repeat=6,
|
688
|
+
),
|
689
|
+
end_time="2024-01-04T19:15:00",
|
690
|
+
frequency=newrelic.MonitorDowntimeFrequencyArgs(
|
691
|
+
days_of_months=[
|
692
|
+
3,
|
693
|
+
6,
|
694
|
+
14,
|
695
|
+
23,
|
696
|
+
],
|
697
|
+
),
|
698
|
+
mode="MONTHLY",
|
699
|
+
monitor_guids=[
|
700
|
+
"<GUID-1>",
|
701
|
+
"<GUID-2>",
|
702
|
+
],
|
703
|
+
start_time="2023-12-04T07:15:00",
|
704
|
+
time_zone="Europe/Dublin")
|
705
|
+
```
|
706
|
+
|
707
|
+
## Import
|
708
|
+
|
709
|
+
A monitor downtime can be imported into Terraform configuration using its `guid`, i.e. bash
|
710
|
+
|
711
|
+
```sh
|
712
|
+
$ pulumi import newrelic:index/monitorDowntime:MonitorDowntime monitor <guid>
|
713
|
+
```
|
714
|
+
|
715
|
+
:param str resource_name: The name of the resource.
|
716
|
+
:param MonitorDowntimeArgs args: The arguments to use to populate this resource's properties.
|
717
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
718
|
+
"""
|
719
|
+
...
|
720
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
721
|
+
resource_args, opts = _utilities.get_resource_args_opts(MonitorDowntimeArgs, pulumi.ResourceOptions, *args, **kwargs)
|
722
|
+
if resource_args is not None:
|
723
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
724
|
+
else:
|
725
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
726
|
+
|
727
|
+
def _internal_init(__self__,
|
728
|
+
resource_name: str,
|
729
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
730
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
731
|
+
end_repeat: Optional[pulumi.Input[pulumi.InputType['MonitorDowntimeEndRepeatArgs']]] = None,
|
732
|
+
end_time: Optional[pulumi.Input[str]] = None,
|
733
|
+
frequency: Optional[pulumi.Input[pulumi.InputType['MonitorDowntimeFrequencyArgs']]] = None,
|
734
|
+
maintenance_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
735
|
+
mode: Optional[pulumi.Input[str]] = None,
|
736
|
+
monitor_guids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
737
|
+
name: Optional[pulumi.Input[str]] = None,
|
738
|
+
start_time: Optional[pulumi.Input[str]] = None,
|
739
|
+
time_zone: Optional[pulumi.Input[str]] = None,
|
740
|
+
__props__=None):
|
741
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
742
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
743
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
744
|
+
if opts.id is None:
|
745
|
+
if __props__ is not None:
|
746
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
747
|
+
__props__ = MonitorDowntimeArgs.__new__(MonitorDowntimeArgs)
|
748
|
+
|
749
|
+
__props__.__dict__["account_id"] = account_id
|
750
|
+
__props__.__dict__["end_repeat"] = end_repeat
|
751
|
+
if end_time is None and not opts.urn:
|
752
|
+
raise TypeError("Missing required property 'end_time'")
|
753
|
+
__props__.__dict__["end_time"] = end_time
|
754
|
+
__props__.__dict__["frequency"] = frequency
|
755
|
+
__props__.__dict__["maintenance_days"] = maintenance_days
|
756
|
+
if mode is None and not opts.urn:
|
757
|
+
raise TypeError("Missing required property 'mode'")
|
758
|
+
__props__.__dict__["mode"] = mode
|
759
|
+
__props__.__dict__["monitor_guids"] = monitor_guids
|
760
|
+
__props__.__dict__["name"] = name
|
761
|
+
if start_time is None and not opts.urn:
|
762
|
+
raise TypeError("Missing required property 'start_time'")
|
763
|
+
__props__.__dict__["start_time"] = start_time
|
764
|
+
if time_zone is None and not opts.urn:
|
765
|
+
raise TypeError("Missing required property 'time_zone'")
|
766
|
+
__props__.__dict__["time_zone"] = time_zone
|
767
|
+
super(MonitorDowntime, __self__).__init__(
|
768
|
+
'newrelic:index/monitorDowntime:MonitorDowntime',
|
769
|
+
resource_name,
|
770
|
+
__props__,
|
771
|
+
opts)
|
772
|
+
|
773
|
+
@staticmethod
|
774
|
+
def get(resource_name: str,
|
775
|
+
id: pulumi.Input[str],
|
776
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
777
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
778
|
+
end_repeat: Optional[pulumi.Input[pulumi.InputType['MonitorDowntimeEndRepeatArgs']]] = None,
|
779
|
+
end_time: Optional[pulumi.Input[str]] = None,
|
780
|
+
frequency: Optional[pulumi.Input[pulumi.InputType['MonitorDowntimeFrequencyArgs']]] = None,
|
781
|
+
maintenance_days: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
782
|
+
mode: Optional[pulumi.Input[str]] = None,
|
783
|
+
monitor_guids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
784
|
+
name: Optional[pulumi.Input[str]] = None,
|
785
|
+
start_time: Optional[pulumi.Input[str]] = None,
|
786
|
+
time_zone: Optional[pulumi.Input[str]] = None) -> 'MonitorDowntime':
|
787
|
+
"""
|
788
|
+
Get an existing MonitorDowntime resource's state with the given name, id, and optional extra
|
789
|
+
properties used to qualify the lookup.
|
790
|
+
|
791
|
+
:param str resource_name: The unique name of the resulting resource.
|
792
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
793
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
794
|
+
:param pulumi.Input[str] account_id: The account in which the monitor downtime would be created. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` (or the `account_id` specified in the `provider{}`), if not specified.
|
795
|
+
:param pulumi.Input[pulumi.InputType['MonitorDowntimeEndRepeatArgs']] end_repeat: Options which may be used to specify when the repeat cycle of the monitor should end. This argument comprises the following nested arguments -
|
796
|
+
:param pulumi.Input[str] end_time: The time at which the monitor downtime would end operating, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2024-01-05T14:27:07`.
|
797
|
+
:param pulumi.Input[pulumi.InputType['MonitorDowntimeFrequencyArgs']] frequency: Options which may be used to specify the configuration of a monthly monitor downtime. This argument comprises the following nested arguments -
|
798
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] maintenance_days: A list of days on which weekly monitor downtimes would function. Valid values which go into this list would be `"SUNDAY"`, `"MONDAY"`, `"TUESDAY"`, `"WEDNESDAY"`, `"THURSDAY"`, `"FRIDAY"` and/or `"SATURDAY"`.
|
799
|
+
|
800
|
+
> **NOTE:** `maintenance_days` **can only be used with the mode** `WEEKLY`, and **is a required argument** with weekly monitor downtimes (i.e. if the `mode` is `WEEKLY`).
|
801
|
+
:param pulumi.Input[str] mode: One of the four modes of operation of monitor downtimes - `ONE_TIME`, `DAILY`, `MONTHLY` or `WEEKLY`.
|
802
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] monitor_guids: A list of GUIDs of synthetic monitors the monitor downtime would need to be applied to.
|
803
|
+
:param pulumi.Input[str] name: Name of the monitor downtime to be created.
|
804
|
+
:param pulumi.Input[str] start_time: The time at which the monitor downtime would begin to operate, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2023-12-20T10:48:53`.
|
805
|
+
:param pulumi.Input[str] time_zone: The timezone that applies to the Monitor Downtime schedule.
|
806
|
+
"""
|
807
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
808
|
+
|
809
|
+
__props__ = _MonitorDowntimeState.__new__(_MonitorDowntimeState)
|
810
|
+
|
811
|
+
__props__.__dict__["account_id"] = account_id
|
812
|
+
__props__.__dict__["end_repeat"] = end_repeat
|
813
|
+
__props__.__dict__["end_time"] = end_time
|
814
|
+
__props__.__dict__["frequency"] = frequency
|
815
|
+
__props__.__dict__["maintenance_days"] = maintenance_days
|
816
|
+
__props__.__dict__["mode"] = mode
|
817
|
+
__props__.__dict__["monitor_guids"] = monitor_guids
|
818
|
+
__props__.__dict__["name"] = name
|
819
|
+
__props__.__dict__["start_time"] = start_time
|
820
|
+
__props__.__dict__["time_zone"] = time_zone
|
821
|
+
return MonitorDowntime(resource_name, opts=opts, __props__=__props__)
|
822
|
+
|
823
|
+
@property
|
824
|
+
@pulumi.getter(name="accountId")
|
825
|
+
def account_id(self) -> pulumi.Output[Optional[str]]:
|
826
|
+
"""
|
827
|
+
The account in which the monitor downtime would be created. Defaults to the value of the environment variable `NEW_RELIC_ACCOUNT_ID` (or the `account_id` specified in the `provider{}`), if not specified.
|
828
|
+
"""
|
829
|
+
return pulumi.get(self, "account_id")
|
830
|
+
|
831
|
+
@property
|
832
|
+
@pulumi.getter(name="endRepeat")
|
833
|
+
def end_repeat(self) -> pulumi.Output[Optional['outputs.MonitorDowntimeEndRepeat']]:
|
834
|
+
"""
|
835
|
+
Options which may be used to specify when the repeat cycle of the monitor should end. This argument comprises the following nested arguments -
|
836
|
+
"""
|
837
|
+
return pulumi.get(self, "end_repeat")
|
838
|
+
|
839
|
+
@property
|
840
|
+
@pulumi.getter(name="endTime")
|
841
|
+
def end_time(self) -> pulumi.Output[str]:
|
842
|
+
"""
|
843
|
+
The time at which the monitor downtime would end operating, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2024-01-05T14:27:07`.
|
844
|
+
"""
|
845
|
+
return pulumi.get(self, "end_time")
|
846
|
+
|
847
|
+
@property
|
848
|
+
@pulumi.getter
|
849
|
+
def frequency(self) -> pulumi.Output[Optional['outputs.MonitorDowntimeFrequency']]:
|
850
|
+
"""
|
851
|
+
Options which may be used to specify the configuration of a monthly monitor downtime. This argument comprises the following nested arguments -
|
852
|
+
"""
|
853
|
+
return pulumi.get(self, "frequency")
|
854
|
+
|
855
|
+
@property
|
856
|
+
@pulumi.getter(name="maintenanceDays")
|
857
|
+
def maintenance_days(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
858
|
+
"""
|
859
|
+
A list of days on which weekly monitor downtimes would function. Valid values which go into this list would be `"SUNDAY"`, `"MONDAY"`, `"TUESDAY"`, `"WEDNESDAY"`, `"THURSDAY"`, `"FRIDAY"` and/or `"SATURDAY"`.
|
860
|
+
|
861
|
+
> **NOTE:** `maintenance_days` **can only be used with the mode** `WEEKLY`, and **is a required argument** with weekly monitor downtimes (i.e. if the `mode` is `WEEKLY`).
|
862
|
+
"""
|
863
|
+
return pulumi.get(self, "maintenance_days")
|
864
|
+
|
865
|
+
@property
|
866
|
+
@pulumi.getter
|
867
|
+
def mode(self) -> pulumi.Output[str]:
|
868
|
+
"""
|
869
|
+
One of the four modes of operation of monitor downtimes - `ONE_TIME`, `DAILY`, `MONTHLY` or `WEEKLY`.
|
870
|
+
"""
|
871
|
+
return pulumi.get(self, "mode")
|
872
|
+
|
873
|
+
@property
|
874
|
+
@pulumi.getter(name="monitorGuids")
|
875
|
+
def monitor_guids(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
876
|
+
"""
|
877
|
+
A list of GUIDs of synthetic monitors the monitor downtime would need to be applied to.
|
878
|
+
"""
|
879
|
+
return pulumi.get(self, "monitor_guids")
|
880
|
+
|
881
|
+
@property
|
882
|
+
@pulumi.getter
|
883
|
+
def name(self) -> pulumi.Output[str]:
|
884
|
+
"""
|
885
|
+
Name of the monitor downtime to be created.
|
886
|
+
"""
|
887
|
+
return pulumi.get(self, "name")
|
888
|
+
|
889
|
+
@property
|
890
|
+
@pulumi.getter(name="startTime")
|
891
|
+
def start_time(self) -> pulumi.Output[str]:
|
892
|
+
"""
|
893
|
+
The time at which the monitor downtime would begin to operate, a timestamp specified in the ISO 8601 format without the offset/timezone - for instance, `2023-12-20T10:48:53`.
|
894
|
+
"""
|
895
|
+
return pulumi.get(self, "start_time")
|
896
|
+
|
897
|
+
@property
|
898
|
+
@pulumi.getter(name="timeZone")
|
899
|
+
def time_zone(self) -> pulumi.Output[str]:
|
900
|
+
"""
|
901
|
+
The timezone that applies to the Monitor Downtime schedule.
|
902
|
+
"""
|
903
|
+
return pulumi.get(self, "time_zone")
|
904
|
+
|