pulumi-ns1 3.5.0__py3-none-any.whl → 3.5.0a1723009616__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_ns1/__init__.py +0 -9
- pulumi_ns1/_inputs.py +17 -334
- pulumi_ns1/_utilities.py +1 -1
- pulumi_ns1/account_whitelist.py +0 -5
- pulumi_ns1/api_key.py +10 -15
- pulumi_ns1/application.py +5 -10
- pulumi_ns1/config/__init__.pyi +0 -5
- pulumi_ns1/config/vars.py +0 -5
- pulumi_ns1/data_feed.py +14 -19
- pulumi_ns1/data_source.py +14 -19
- pulumi_ns1/dataset.py +10 -15
- pulumi_ns1/dnsview.py +0 -5
- pulumi_ns1/get_dns_sec.py +5 -15
- pulumi_ns1/get_monitoring_regions.py +9 -17
- pulumi_ns1/get_networks.py +5 -12
- pulumi_ns1/get_record.py +8 -41
- pulumi_ns1/get_zone.py +6 -33
- pulumi_ns1/monitoring_job.py +33 -38
- pulumi_ns1/notify_list.py +21 -26
- pulumi_ns1/outputs.py +20 -25
- pulumi_ns1/provider.py +0 -5
- pulumi_ns1/pulsar_job.py +9 -14
- pulumi_ns1/pulumi-plugin.json +1 -1
- pulumi_ns1/record.py +81 -120
- pulumi_ns1/redirect.py +13 -5
- pulumi_ns1/redirect_certificate.py +0 -5
- pulumi_ns1/team.py +43 -48
- pulumi_ns1/tsigkey.py +0 -5
- pulumi_ns1/user.py +22 -27
- pulumi_ns1/zone.py +5 -10
- {pulumi_ns1-3.5.0.dist-info → pulumi_ns1-3.5.0a1723009616.dist-info}/METADATA +5 -6
- pulumi_ns1-3.5.0a1723009616.dist-info/RECORD +36 -0
- {pulumi_ns1-3.5.0.dist-info → pulumi_ns1-3.5.0a1723009616.dist-info}/WHEEL +1 -1
- pulumi_ns1/alert.py +0 -549
- pulumi_ns1-3.5.0.dist-info/RECORD +0 -37
- {pulumi_ns1-3.5.0.dist-info → pulumi_ns1-3.5.0a1723009616.dist-info}/top_level.txt +0 -0
pulumi_ns1/get_record.py
CHANGED
@@ -4,14 +4,9 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import warnings
|
7
|
-
import sys
|
8
7
|
import pulumi
|
9
8
|
import pulumi.runtime
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
11
|
-
if sys.version_info >= (3, 11):
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
13
|
-
else:
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
15
10
|
from . import _utilities
|
16
11
|
from . import outputs
|
17
12
|
|
@@ -27,7 +22,7 @@ class GetRecordResult:
|
|
27
22
|
"""
|
28
23
|
A collection of values returned by getRecord.
|
29
24
|
"""
|
30
|
-
def __init__(__self__, answers=None, domain=None, filters=None, id=None, link=None, meta=None,
|
25
|
+
def __init__(__self__, answers=None, domain=None, filters=None, id=None, link=None, meta=None, override_ttl=None, regions=None, short_answers=None, tags=None, ttl=None, type=None, use_client_subnet=None, zone=None):
|
31
26
|
if answers and not isinstance(answers, list):
|
32
27
|
raise TypeError("Expected argument 'answers' to be a list")
|
33
28
|
pulumi.set(__self__, "answers", answers)
|
@@ -46,9 +41,6 @@ class GetRecordResult:
|
|
46
41
|
if meta and not isinstance(meta, dict):
|
47
42
|
raise TypeError("Expected argument 'meta' to be a dict")
|
48
43
|
pulumi.set(__self__, "meta", meta)
|
49
|
-
if override_address_records and not isinstance(override_address_records, bool):
|
50
|
-
raise TypeError("Expected argument 'override_address_records' to be a bool")
|
51
|
-
pulumi.set(__self__, "override_address_records", override_address_records)
|
52
44
|
if override_ttl and not isinstance(override_ttl, bool):
|
53
45
|
raise TypeError("Expected argument 'override_ttl' to be a bool")
|
54
46
|
pulumi.set(__self__, "override_ttl", override_ttl)
|
@@ -113,17 +105,12 @@ class GetRecordResult:
|
|
113
105
|
|
114
106
|
@property
|
115
107
|
@pulumi.getter
|
116
|
-
def meta(self) -> Mapping[str,
|
108
|
+
def meta(self) -> Mapping[str, Any]:
|
117
109
|
"""
|
118
110
|
Map of metadata
|
119
111
|
"""
|
120
112
|
return pulumi.get(self, "meta")
|
121
113
|
|
122
|
-
@property
|
123
|
-
@pulumi.getter(name="overrideAddressRecords")
|
124
|
-
def override_address_records(self) -> bool:
|
125
|
-
return pulumi.get(self, "override_address_records")
|
126
|
-
|
127
114
|
@property
|
128
115
|
@pulumi.getter(name="overrideTtl")
|
129
116
|
def override_ttl(self) -> bool:
|
@@ -144,7 +131,7 @@ class GetRecordResult:
|
|
144
131
|
|
145
132
|
@property
|
146
133
|
@pulumi.getter
|
147
|
-
def tags(self) -> Mapping[str,
|
134
|
+
def tags(self) -> Mapping[str, Any]:
|
148
135
|
return pulumi.get(self, "tags")
|
149
136
|
|
150
137
|
@property
|
@@ -186,7 +173,6 @@ class AwaitableGetRecordResult(GetRecordResult):
|
|
186
173
|
id=self.id,
|
187
174
|
link=self.link,
|
188
175
|
meta=self.meta,
|
189
|
-
override_address_records=self.override_address_records,
|
190
176
|
override_ttl=self.override_ttl,
|
191
177
|
regions=self.regions,
|
192
178
|
short_answers=self.short_answers,
|
@@ -237,7 +223,6 @@ def get_record(domain: Optional[str] = None,
|
|
237
223
|
id=pulumi.get(__ret__, 'id'),
|
238
224
|
link=pulumi.get(__ret__, 'link'),
|
239
225
|
meta=pulumi.get(__ret__, 'meta'),
|
240
|
-
override_address_records=pulumi.get(__ret__, 'override_address_records'),
|
241
226
|
override_ttl=pulumi.get(__ret__, 'override_ttl'),
|
242
227
|
regions=pulumi.get(__ret__, 'regions'),
|
243
228
|
short_answers=pulumi.get(__ret__, 'short_answers'),
|
@@ -246,10 +231,13 @@ def get_record(domain: Optional[str] = None,
|
|
246
231
|
type=pulumi.get(__ret__, 'type'),
|
247
232
|
use_client_subnet=pulumi.get(__ret__, 'use_client_subnet'),
|
248
233
|
zone=pulumi.get(__ret__, 'zone'))
|
234
|
+
|
235
|
+
|
236
|
+
@_utilities.lift_output_func(get_record)
|
249
237
|
def get_record_output(domain: Optional[pulumi.Input[str]] = None,
|
250
238
|
type: Optional[pulumi.Input[str]] = None,
|
251
239
|
zone: Optional[pulumi.Input[str]] = None,
|
252
|
-
opts: Optional[
|
240
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRecordResult]:
|
253
241
|
"""
|
254
242
|
Provides details about a NS1 Record. Use this if you would simply like to read
|
255
243
|
information from NS1 into your configurations. For read/write operations, you
|
@@ -272,25 +260,4 @@ def get_record_output(domain: Optional[pulumi.Input[str]] = None,
|
|
272
260
|
:param str type: The records' RR type.
|
273
261
|
:param str zone: The zone the record belongs to.
|
274
262
|
"""
|
275
|
-
|
276
|
-
__args__['domain'] = domain
|
277
|
-
__args__['type'] = type
|
278
|
-
__args__['zone'] = zone
|
279
|
-
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
280
|
-
__ret__ = pulumi.runtime.invoke_output('ns1:index/getRecord:getRecord', __args__, opts=opts, typ=GetRecordResult)
|
281
|
-
return __ret__.apply(lambda __response__: GetRecordResult(
|
282
|
-
answers=pulumi.get(__response__, 'answers'),
|
283
|
-
domain=pulumi.get(__response__, 'domain'),
|
284
|
-
filters=pulumi.get(__response__, 'filters'),
|
285
|
-
id=pulumi.get(__response__, 'id'),
|
286
|
-
link=pulumi.get(__response__, 'link'),
|
287
|
-
meta=pulumi.get(__response__, 'meta'),
|
288
|
-
override_address_records=pulumi.get(__response__, 'override_address_records'),
|
289
|
-
override_ttl=pulumi.get(__response__, 'override_ttl'),
|
290
|
-
regions=pulumi.get(__response__, 'regions'),
|
291
|
-
short_answers=pulumi.get(__response__, 'short_answers'),
|
292
|
-
tags=pulumi.get(__response__, 'tags'),
|
293
|
-
ttl=pulumi.get(__response__, 'ttl'),
|
294
|
-
type=pulumi.get(__response__, 'type'),
|
295
|
-
use_client_subnet=pulumi.get(__response__, 'use_client_subnet'),
|
296
|
-
zone=pulumi.get(__response__, 'zone')))
|
263
|
+
...
|
pulumi_ns1/get_zone.py
CHANGED
@@ -4,14 +4,9 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import warnings
|
7
|
-
import sys
|
8
7
|
import pulumi
|
9
8
|
import pulumi.runtime
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
11
|
-
if sys.version_info >= (3, 11):
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
13
|
-
else:
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
15
10
|
from . import _utilities
|
16
11
|
from . import outputs
|
17
12
|
|
@@ -202,7 +197,7 @@ class GetZoneResult:
|
|
202
197
|
|
203
198
|
@property
|
204
199
|
@pulumi.getter
|
205
|
-
def tags(self) -> Mapping[str,
|
200
|
+
def tags(self) -> Mapping[str, Any]:
|
206
201
|
return pulumi.get(self, "tags")
|
207
202
|
|
208
203
|
@property
|
@@ -297,11 +292,14 @@ def get_zone(additional_ports: Optional[Sequence[int]] = None,
|
|
297
292
|
tags=pulumi.get(__ret__, 'tags'),
|
298
293
|
ttl=pulumi.get(__ret__, 'ttl'),
|
299
294
|
zone=pulumi.get(__ret__, 'zone'))
|
295
|
+
|
296
|
+
|
297
|
+
@_utilities.lift_output_func(get_zone)
|
300
298
|
def get_zone_output(additional_ports: Optional[pulumi.Input[Optional[Sequence[int]]]] = None,
|
301
299
|
additional_primaries: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
|
302
300
|
primary_port: Optional[pulumi.Input[Optional[int]]] = None,
|
303
301
|
zone: Optional[pulumi.Input[str]] = None,
|
304
|
-
opts: Optional[
|
302
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetZoneResult]:
|
305
303
|
"""
|
306
304
|
Provides details about a NS1 Zone. Use this if you would simply like to read
|
307
305
|
information from NS1 into your configurations. For read/write operations, you
|
@@ -322,29 +320,4 @@ def get_zone_output(additional_ports: Optional[pulumi.Input[Optional[Sequence[in
|
|
322
320
|
zone.
|
323
321
|
:param str zone: The domain name of the zone.
|
324
322
|
"""
|
325
|
-
|
326
|
-
__args__['additionalPorts'] = additional_ports
|
327
|
-
__args__['additionalPrimaries'] = additional_primaries
|
328
|
-
__args__['primaryPort'] = primary_port
|
329
|
-
__args__['zone'] = zone
|
330
|
-
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
331
|
-
__ret__ = pulumi.runtime.invoke_output('ns1:index/getZone:getZone', __args__, opts=opts, typ=GetZoneResult)
|
332
|
-
return __ret__.apply(lambda __response__: GetZoneResult(
|
333
|
-
additional_ports=pulumi.get(__response__, 'additional_ports'),
|
334
|
-
additional_primaries=pulumi.get(__response__, 'additional_primaries'),
|
335
|
-
dns_servers=pulumi.get(__response__, 'dns_servers'),
|
336
|
-
dnssec=pulumi.get(__response__, 'dnssec'),
|
337
|
-
expiry=pulumi.get(__response__, 'expiry'),
|
338
|
-
hostmaster=pulumi.get(__response__, 'hostmaster'),
|
339
|
-
id=pulumi.get(__response__, 'id'),
|
340
|
-
link=pulumi.get(__response__, 'link'),
|
341
|
-
networks=pulumi.get(__response__, 'networks'),
|
342
|
-
nx_ttl=pulumi.get(__response__, 'nx_ttl'),
|
343
|
-
primary=pulumi.get(__response__, 'primary'),
|
344
|
-
primary_port=pulumi.get(__response__, 'primary_port'),
|
345
|
-
refresh=pulumi.get(__response__, 'refresh'),
|
346
|
-
retry=pulumi.get(__response__, 'retry'),
|
347
|
-
secondaries=pulumi.get(__response__, 'secondaries'),
|
348
|
-
tags=pulumi.get(__response__, 'tags'),
|
349
|
-
ttl=pulumi.get(__response__, 'ttl'),
|
350
|
-
zone=pulumi.get(__response__, 'zone')))
|
323
|
+
...
|
pulumi_ns1/monitoring_job.py
CHANGED
@@ -4,14 +4,9 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import warnings
|
7
|
-
import sys
|
8
7
|
import pulumi
|
9
8
|
import pulumi.runtime
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
11
|
-
if sys.version_info >= (3, 11):
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
13
|
-
else:
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
15
10
|
from . import _utilities
|
16
11
|
from . import outputs
|
17
12
|
from ._inputs import *
|
@@ -21,7 +16,7 @@ __all__ = ['MonitoringJobArgs', 'MonitoringJob']
|
|
21
16
|
@pulumi.input_type
|
22
17
|
class MonitoringJobArgs:
|
23
18
|
def __init__(__self__, *,
|
24
|
-
config: pulumi.Input[Mapping[str,
|
19
|
+
config: pulumi.Input[Mapping[str, Any]],
|
25
20
|
frequency: pulumi.Input[int],
|
26
21
|
job_type: pulumi.Input[str],
|
27
22
|
regions: pulumi.Input[Sequence[pulumi.Input[str]]],
|
@@ -39,7 +34,7 @@ class MonitoringJobArgs:
|
|
39
34
|
rules: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringJobRuleArgs']]]] = None):
|
40
35
|
"""
|
41
36
|
The set of arguments for constructing a MonitoringJob resource.
|
42
|
-
:param pulumi.Input[Mapping[str,
|
37
|
+
:param pulumi.Input[Mapping[str, Any]] config: A configuration dictionary with keys and values depending on the job_type. Configuration details for each job_type are found by submitting a GET request to https://api.nsone.net/v1/monitoring/jobtypes.
|
43
38
|
:param pulumi.Input[int] frequency: The frequency, in seconds, at which to run the monitoring job in each region.
|
44
39
|
:param pulumi.Input[str] job_type: The type of monitoring job to be run. Refer to the NS1 API documentation (https://ns1.com/api#monitoring-jobs) for supported values which include ping, tcp, dns, http.
|
45
40
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] regions: The list of region codes in which to run the monitoring
|
@@ -88,14 +83,14 @@ class MonitoringJobArgs:
|
|
88
83
|
|
89
84
|
@property
|
90
85
|
@pulumi.getter
|
91
|
-
def config(self) -> pulumi.Input[Mapping[str,
|
86
|
+
def config(self) -> pulumi.Input[Mapping[str, Any]]:
|
92
87
|
"""
|
93
88
|
A configuration dictionary with keys and values depending on the job_type. Configuration details for each job_type are found by submitting a GET request to https://api.nsone.net/v1/monitoring/jobtypes.
|
94
89
|
"""
|
95
90
|
return pulumi.get(self, "config")
|
96
91
|
|
97
92
|
@config.setter
|
98
|
-
def config(self, value: pulumi.Input[Mapping[str,
|
93
|
+
def config(self, value: pulumi.Input[Mapping[str, Any]]):
|
99
94
|
pulumi.set(self, "config", value)
|
100
95
|
|
101
96
|
@property
|
@@ -282,7 +277,7 @@ class MonitoringJobArgs:
|
|
282
277
|
class _MonitoringJobState:
|
283
278
|
def __init__(__self__, *,
|
284
279
|
active: Optional[pulumi.Input[bool]] = None,
|
285
|
-
config: Optional[pulumi.Input[Mapping[str,
|
280
|
+
config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
|
286
281
|
frequency: Optional[pulumi.Input[int]] = None,
|
287
282
|
job_type: Optional[pulumi.Input[str]] = None,
|
288
283
|
mute: Optional[pulumi.Input[bool]] = None,
|
@@ -300,7 +295,7 @@ class _MonitoringJobState:
|
|
300
295
|
"""
|
301
296
|
Input properties used for looking up and filtering MonitoringJob resources.
|
302
297
|
:param pulumi.Input[bool] active: Indicates if the job is active or temporarily disabled.
|
303
|
-
:param pulumi.Input[Mapping[str,
|
298
|
+
:param pulumi.Input[Mapping[str, Any]] config: A configuration dictionary with keys and values depending on the job_type. Configuration details for each job_type are found by submitting a GET request to https://api.nsone.net/v1/monitoring/jobtypes.
|
304
299
|
:param pulumi.Input[int] frequency: The frequency, in seconds, at which to run the monitoring job in each region.
|
305
300
|
:param pulumi.Input[str] job_type: The type of monitoring job to be run. Refer to the NS1 API documentation (https://ns1.com/api#monitoring-jobs) for supported values which include ping, tcp, dns, http.
|
306
301
|
:param pulumi.Input[bool] mute: turn off the notifications for the monitoring job.
|
@@ -364,14 +359,14 @@ class _MonitoringJobState:
|
|
364
359
|
|
365
360
|
@property
|
366
361
|
@pulumi.getter
|
367
|
-
def config(self) -> Optional[pulumi.Input[Mapping[str,
|
362
|
+
def config(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
|
368
363
|
"""
|
369
364
|
A configuration dictionary with keys and values depending on the job_type. Configuration details for each job_type are found by submitting a GET request to https://api.nsone.net/v1/monitoring/jobtypes.
|
370
365
|
"""
|
371
366
|
return pulumi.get(self, "config")
|
372
367
|
|
373
368
|
@config.setter
|
374
|
-
def config(self, value: Optional[pulumi.Input[Mapping[str,
|
369
|
+
def config(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
|
375
370
|
pulumi.set(self, "config", value)
|
376
371
|
|
377
372
|
@property
|
@@ -548,7 +543,7 @@ class MonitoringJob(pulumi.CustomResource):
|
|
548
543
|
resource_name: str,
|
549
544
|
opts: Optional[pulumi.ResourceOptions] = None,
|
550
545
|
active: Optional[pulumi.Input[bool]] = None,
|
551
|
-
config: Optional[pulumi.Input[Mapping[str,
|
546
|
+
config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
|
552
547
|
frequency: Optional[pulumi.Input[int]] = None,
|
553
548
|
job_type: Optional[pulumi.Input[str]] = None,
|
554
549
|
mute: Optional[pulumi.Input[bool]] = None,
|
@@ -562,7 +557,7 @@ class MonitoringJob(pulumi.CustomResource):
|
|
562
557
|
policy: Optional[pulumi.Input[str]] = None,
|
563
558
|
rapid_recheck: Optional[pulumi.Input[bool]] = None,
|
564
559
|
regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
565
|
-
rules: Optional[pulumi.Input[Sequence[pulumi.Input[
|
560
|
+
rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringJobRuleArgs']]]]] = None,
|
566
561
|
__props__=None):
|
567
562
|
"""
|
568
563
|
Provides a NS1 Monitoring Job resource. This can be used to create, modify, and delete monitoring jobs.
|
@@ -587,16 +582,16 @@ class MonitoringJob(pulumi.CustomResource):
|
|
587
582
|
policy="quorum",
|
588
583
|
mute=True,
|
589
584
|
config={
|
590
|
-
"ssl":
|
585
|
+
"ssl": 1,
|
591
586
|
"send": "HEAD / HTTP/1.0\\\\r\\\\n\\\\r\\\\n",
|
592
|
-
"port":
|
587
|
+
"port": 443,
|
593
588
|
"host": "example-elb-uswest.aws.amazon.com",
|
594
589
|
},
|
595
|
-
rules=[
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
590
|
+
rules=[ns1.MonitoringJobRuleArgs(
|
591
|
+
value="200 OK",
|
592
|
+
comparison="contains",
|
593
|
+
key="output",
|
594
|
+
)])
|
600
595
|
```
|
601
596
|
|
602
597
|
## NS1 Documentation
|
@@ -612,7 +607,7 @@ class MonitoringJob(pulumi.CustomResource):
|
|
612
607
|
:param str resource_name: The name of the resource.
|
613
608
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
614
609
|
:param pulumi.Input[bool] active: Indicates if the job is active or temporarily disabled.
|
615
|
-
:param pulumi.Input[Mapping[str,
|
610
|
+
:param pulumi.Input[Mapping[str, Any]] config: A configuration dictionary with keys and values depending on the job_type. Configuration details for each job_type are found by submitting a GET request to https://api.nsone.net/v1/monitoring/jobtypes.
|
616
611
|
:param pulumi.Input[int] frequency: The frequency, in seconds, at which to run the monitoring job in each region.
|
617
612
|
:param pulumi.Input[str] job_type: The type of monitoring job to be run. Refer to the NS1 API documentation (https://ns1.com/api#monitoring-jobs) for supported values which include ping, tcp, dns, http.
|
618
613
|
:param pulumi.Input[bool] mute: turn off the notifications for the monitoring job.
|
@@ -627,7 +622,7 @@ class MonitoringJob(pulumi.CustomResource):
|
|
627
622
|
:param pulumi.Input[bool] rapid_recheck: If true, on any apparent state change, the job is quickly re-run after one second to confirm the state change before notification.
|
628
623
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] regions: The list of region codes in which to run the monitoring
|
629
624
|
job. See NS1 API docs for supported values.
|
630
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
625
|
+
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringJobRuleArgs']]]] rules: A list of rules for determining failure conditions. Each rule acts on one of the outputs from the monitoring job. You must specify key (the output key); comparison (a comparison to perform on the the output); and value (the value to compare to). For example, {"key":"rtt", "comparison":"<", "value":100} is a rule requiring the rtt from a job to be under 100ms, or the job will be marked failed. Available output keys, comparators, and value types are are found by submitting a GET request to https://api.nsone.net/v1/monitoring/jobtypes.
|
631
626
|
"""
|
632
627
|
...
|
633
628
|
@overload
|
@@ -658,16 +653,16 @@ class MonitoringJob(pulumi.CustomResource):
|
|
658
653
|
policy="quorum",
|
659
654
|
mute=True,
|
660
655
|
config={
|
661
|
-
"ssl":
|
656
|
+
"ssl": 1,
|
662
657
|
"send": "HEAD / HTTP/1.0\\\\r\\\\n\\\\r\\\\n",
|
663
|
-
"port":
|
658
|
+
"port": 443,
|
664
659
|
"host": "example-elb-uswest.aws.amazon.com",
|
665
660
|
},
|
666
|
-
rules=[
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
661
|
+
rules=[ns1.MonitoringJobRuleArgs(
|
662
|
+
value="200 OK",
|
663
|
+
comparison="contains",
|
664
|
+
key="output",
|
665
|
+
)])
|
671
666
|
```
|
672
667
|
|
673
668
|
## NS1 Documentation
|
@@ -696,7 +691,7 @@ class MonitoringJob(pulumi.CustomResource):
|
|
696
691
|
resource_name: str,
|
697
692
|
opts: Optional[pulumi.ResourceOptions] = None,
|
698
693
|
active: Optional[pulumi.Input[bool]] = None,
|
699
|
-
config: Optional[pulumi.Input[Mapping[str,
|
694
|
+
config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
|
700
695
|
frequency: Optional[pulumi.Input[int]] = None,
|
701
696
|
job_type: Optional[pulumi.Input[str]] = None,
|
702
697
|
mute: Optional[pulumi.Input[bool]] = None,
|
@@ -710,7 +705,7 @@ class MonitoringJob(pulumi.CustomResource):
|
|
710
705
|
policy: Optional[pulumi.Input[str]] = None,
|
711
706
|
rapid_recheck: Optional[pulumi.Input[bool]] = None,
|
712
707
|
regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
713
|
-
rules: Optional[pulumi.Input[Sequence[pulumi.Input[
|
708
|
+
rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringJobRuleArgs']]]]] = None,
|
714
709
|
__props__=None):
|
715
710
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
716
711
|
if not isinstance(opts, pulumi.ResourceOptions):
|
@@ -755,7 +750,7 @@ class MonitoringJob(pulumi.CustomResource):
|
|
755
750
|
id: pulumi.Input[str],
|
756
751
|
opts: Optional[pulumi.ResourceOptions] = None,
|
757
752
|
active: Optional[pulumi.Input[bool]] = None,
|
758
|
-
config: Optional[pulumi.Input[Mapping[str,
|
753
|
+
config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
|
759
754
|
frequency: Optional[pulumi.Input[int]] = None,
|
760
755
|
job_type: Optional[pulumi.Input[str]] = None,
|
761
756
|
mute: Optional[pulumi.Input[bool]] = None,
|
@@ -769,7 +764,7 @@ class MonitoringJob(pulumi.CustomResource):
|
|
769
764
|
policy: Optional[pulumi.Input[str]] = None,
|
770
765
|
rapid_recheck: Optional[pulumi.Input[bool]] = None,
|
771
766
|
regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
772
|
-
rules: Optional[pulumi.Input[Sequence[pulumi.Input[
|
767
|
+
rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringJobRuleArgs']]]]] = None) -> 'MonitoringJob':
|
773
768
|
"""
|
774
769
|
Get an existing MonitoringJob resource's state with the given name, id, and optional extra
|
775
770
|
properties used to qualify the lookup.
|
@@ -778,7 +773,7 @@ class MonitoringJob(pulumi.CustomResource):
|
|
778
773
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
779
774
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
780
775
|
:param pulumi.Input[bool] active: Indicates if the job is active or temporarily disabled.
|
781
|
-
:param pulumi.Input[Mapping[str,
|
776
|
+
:param pulumi.Input[Mapping[str, Any]] config: A configuration dictionary with keys and values depending on the job_type. Configuration details for each job_type are found by submitting a GET request to https://api.nsone.net/v1/monitoring/jobtypes.
|
782
777
|
:param pulumi.Input[int] frequency: The frequency, in seconds, at which to run the monitoring job in each region.
|
783
778
|
:param pulumi.Input[str] job_type: The type of monitoring job to be run. Refer to the NS1 API documentation (https://ns1.com/api#monitoring-jobs) for supported values which include ping, tcp, dns, http.
|
784
779
|
:param pulumi.Input[bool] mute: turn off the notifications for the monitoring job.
|
@@ -793,7 +788,7 @@ class MonitoringJob(pulumi.CustomResource):
|
|
793
788
|
:param pulumi.Input[bool] rapid_recheck: If true, on any apparent state change, the job is quickly re-run after one second to confirm the state change before notification.
|
794
789
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] regions: The list of region codes in which to run the monitoring
|
795
790
|
job. See NS1 API docs for supported values.
|
796
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
791
|
+
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringJobRuleArgs']]]] rules: A list of rules for determining failure conditions. Each rule acts on one of the outputs from the monitoring job. You must specify key (the output key); comparison (a comparison to perform on the the output); and value (the value to compare to). For example, {"key":"rtt", "comparison":"<", "value":100} is a rule requiring the rtt from a job to be under 100ms, or the job will be marked failed. Available output keys, comparators, and value types are are found by submitting a GET request to https://api.nsone.net/v1/monitoring/jobtypes.
|
797
792
|
"""
|
798
793
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
799
794
|
|
@@ -827,7 +822,7 @@ class MonitoringJob(pulumi.CustomResource):
|
|
827
822
|
|
828
823
|
@property
|
829
824
|
@pulumi.getter
|
830
|
-
def config(self) -> pulumi.Output[Mapping[str,
|
825
|
+
def config(self) -> pulumi.Output[Mapping[str, Any]]:
|
831
826
|
"""
|
832
827
|
A configuration dictionary with keys and values depending on the job_type. Configuration details for each job_type are found by submitting a GET request to https://api.nsone.net/v1/monitoring/jobtypes.
|
833
828
|
"""
|
pulumi_ns1/notify_list.py
CHANGED
@@ -4,14 +4,9 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import warnings
|
7
|
-
import sys
|
8
7
|
import pulumi
|
9
8
|
import pulumi.runtime
|
10
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
11
|
-
if sys.version_info >= (3, 11):
|
12
|
-
from typing import NotRequired, TypedDict, TypeAlias
|
13
|
-
else:
|
14
|
-
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
15
10
|
from . import _utilities
|
16
11
|
from . import outputs
|
17
12
|
from ._inputs import *
|
@@ -104,7 +99,7 @@ class NotifyList(pulumi.CustomResource):
|
|
104
99
|
resource_name: str,
|
105
100
|
opts: Optional[pulumi.ResourceOptions] = None,
|
106
101
|
name: Optional[pulumi.Input[str]] = None,
|
107
|
-
notifications: Optional[pulumi.Input[Sequence[pulumi.Input[
|
102
|
+
notifications: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NotifyListNotificationArgs']]]]] = None,
|
108
103
|
__props__=None):
|
109
104
|
"""
|
110
105
|
Provides a NS1 Notify List resource. This can be used to create, modify, and delete notify lists.
|
@@ -118,18 +113,18 @@ class NotifyList(pulumi.CustomResource):
|
|
118
113
|
nl = ns1.NotifyList("nl",
|
119
114
|
name="my notify list",
|
120
115
|
notifications=[
|
121
|
-
|
122
|
-
|
123
|
-
|
116
|
+
ns1.NotifyListNotificationArgs(
|
117
|
+
type="webhook",
|
118
|
+
config={
|
124
119
|
"url": "http://www.mywebhook.com",
|
125
120
|
},
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
121
|
+
),
|
122
|
+
ns1.NotifyListNotificationArgs(
|
123
|
+
type="email",
|
124
|
+
config={
|
130
125
|
"email": "test@test.com",
|
131
126
|
},
|
132
|
-
|
127
|
+
),
|
133
128
|
])
|
134
129
|
```
|
135
130
|
|
@@ -146,7 +141,7 @@ class NotifyList(pulumi.CustomResource):
|
|
146
141
|
:param str resource_name: The name of the resource.
|
147
142
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
148
143
|
:param pulumi.Input[str] name: The free-form display name for the notify list.
|
149
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
144
|
+
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NotifyListNotificationArgs']]]] notifications: A list of notifiers. All notifiers in a notification list will receive notifications whenever an event is send to the list (e.g., when a monitoring job fails). Notifiers are documented below.
|
150
145
|
"""
|
151
146
|
...
|
152
147
|
@overload
|
@@ -166,18 +161,18 @@ class NotifyList(pulumi.CustomResource):
|
|
166
161
|
nl = ns1.NotifyList("nl",
|
167
162
|
name="my notify list",
|
168
163
|
notifications=[
|
169
|
-
|
170
|
-
|
171
|
-
|
164
|
+
ns1.NotifyListNotificationArgs(
|
165
|
+
type="webhook",
|
166
|
+
config={
|
172
167
|
"url": "http://www.mywebhook.com",
|
173
168
|
},
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
169
|
+
),
|
170
|
+
ns1.NotifyListNotificationArgs(
|
171
|
+
type="email",
|
172
|
+
config={
|
178
173
|
"email": "test@test.com",
|
179
174
|
},
|
180
|
-
|
175
|
+
),
|
181
176
|
])
|
182
177
|
```
|
183
178
|
|
@@ -207,7 +202,7 @@ class NotifyList(pulumi.CustomResource):
|
|
207
202
|
resource_name: str,
|
208
203
|
opts: Optional[pulumi.ResourceOptions] = None,
|
209
204
|
name: Optional[pulumi.Input[str]] = None,
|
210
|
-
notifications: Optional[pulumi.Input[Sequence[pulumi.Input[
|
205
|
+
notifications: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NotifyListNotificationArgs']]]]] = None,
|
211
206
|
__props__=None):
|
212
207
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
213
208
|
if not isinstance(opts, pulumi.ResourceOptions):
|
@@ -230,7 +225,7 @@ class NotifyList(pulumi.CustomResource):
|
|
230
225
|
id: pulumi.Input[str],
|
231
226
|
opts: Optional[pulumi.ResourceOptions] = None,
|
232
227
|
name: Optional[pulumi.Input[str]] = None,
|
233
|
-
notifications: Optional[pulumi.Input[Sequence[pulumi.Input[
|
228
|
+
notifications: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NotifyListNotificationArgs']]]]] = None) -> 'NotifyList':
|
234
229
|
"""
|
235
230
|
Get an existing NotifyList resource's state with the given name, id, and optional extra
|
236
231
|
properties used to qualify the lookup.
|
@@ -239,7 +234,7 @@ class NotifyList(pulumi.CustomResource):
|
|
239
234
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
240
235
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
241
236
|
:param pulumi.Input[str] name: The free-form display name for the notify list.
|
242
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
237
|
+
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NotifyListNotificationArgs']]]] notifications: A list of notifiers. All notifiers in a notification list will receive notifications whenever an event is send to the list (e.g., when a monitoring job fails). Notifiers are documented below.
|
243
238
|
"""
|
244
239
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
245
240
|
|