pulumi-ns1 3.2.0a1710157241__py3-none-any.whl → 3.6.0a1736834553__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/get_record.py CHANGED
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  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
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
 
@@ -22,7 +27,7 @@ class GetRecordResult:
22
27
  """
23
28
  A collection of values returned by getRecord.
24
29
  """
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):
30
+ def __init__(__self__, answers=None, domain=None, filters=None, id=None, link=None, meta=None, override_address_records=None, override_ttl=None, regions=None, short_answers=None, tags=None, ttl=None, type=None, use_client_subnet=None, zone=None):
26
31
  if answers and not isinstance(answers, list):
27
32
  raise TypeError("Expected argument 'answers' to be a list")
28
33
  pulumi.set(__self__, "answers", answers)
@@ -41,6 +46,9 @@ class GetRecordResult:
41
46
  if meta and not isinstance(meta, dict):
42
47
  raise TypeError("Expected argument 'meta' to be a dict")
43
48
  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)
44
52
  if override_ttl and not isinstance(override_ttl, bool):
45
53
  raise TypeError("Expected argument 'override_ttl' to be a bool")
46
54
  pulumi.set(__self__, "override_ttl", override_ttl)
@@ -105,12 +113,17 @@ class GetRecordResult:
105
113
 
106
114
  @property
107
115
  @pulumi.getter
108
- def meta(self) -> Mapping[str, Any]:
116
+ def meta(self) -> Mapping[str, str]:
109
117
  """
110
118
  Map of metadata
111
119
  """
112
120
  return pulumi.get(self, "meta")
113
121
 
122
+ @property
123
+ @pulumi.getter(name="overrideAddressRecords")
124
+ def override_address_records(self) -> bool:
125
+ return pulumi.get(self, "override_address_records")
126
+
114
127
  @property
115
128
  @pulumi.getter(name="overrideTtl")
116
129
  def override_ttl(self) -> bool:
@@ -131,7 +144,7 @@ class GetRecordResult:
131
144
 
132
145
  @property
133
146
  @pulumi.getter
134
- def tags(self) -> Mapping[str, Any]:
147
+ def tags(self) -> Mapping[str, str]:
135
148
  return pulumi.get(self, "tags")
136
149
 
137
150
  @property
@@ -173,6 +186,7 @@ class AwaitableGetRecordResult(GetRecordResult):
173
186
  id=self.id,
174
187
  link=self.link,
175
188
  meta=self.meta,
189
+ override_address_records=self.override_address_records,
176
190
  override_ttl=self.override_ttl,
177
191
  regions=self.regions,
178
192
  short_answers=self.short_answers,
@@ -194,16 +208,15 @@ def get_record(domain: Optional[str] = None,
194
208
 
195
209
  ## Example Usage
196
210
 
197
- <!--Start PulumiCodeChooser -->
198
211
  ```python
199
212
  import pulumi
200
213
  import pulumi_ns1 as ns1
201
214
 
202
- example = ns1.get_record(domain="terraform.example.io",
203
- type="A",
204
- zone="example.io")
215
+ # Get details about a NS1 Record.
216
+ example = ns1.get_record(zone="example.io",
217
+ domain="terraform.example.io",
218
+ type="A")
205
219
  ```
206
- <!--End PulumiCodeChooser -->
207
220
 
208
221
 
209
222
  :param str domain: The records' domain.
@@ -224,6 +237,7 @@ def get_record(domain: Optional[str] = None,
224
237
  id=pulumi.get(__ret__, 'id'),
225
238
  link=pulumi.get(__ret__, 'link'),
226
239
  meta=pulumi.get(__ret__, 'meta'),
240
+ override_address_records=pulumi.get(__ret__, 'override_address_records'),
227
241
  override_ttl=pulumi.get(__ret__, 'override_ttl'),
228
242
  regions=pulumi.get(__ret__, 'regions'),
229
243
  short_answers=pulumi.get(__ret__, 'short_answers'),
@@ -232,13 +246,10 @@ def get_record(domain: Optional[str] = None,
232
246
  type=pulumi.get(__ret__, 'type'),
233
247
  use_client_subnet=pulumi.get(__ret__, 'use_client_subnet'),
234
248
  zone=pulumi.get(__ret__, 'zone'))
235
-
236
-
237
- @_utilities.lift_output_func(get_record)
238
249
  def get_record_output(domain: Optional[pulumi.Input[str]] = None,
239
250
  type: Optional[pulumi.Input[str]] = None,
240
251
  zone: Optional[pulumi.Input[str]] = None,
241
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRecordResult]:
252
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetRecordResult]:
242
253
  """
243
254
  Provides details about a NS1 Record. Use this if you would simply like to read
244
255
  information from NS1 into your configurations. For read/write operations, you
@@ -246,20 +257,40 @@ def get_record_output(domain: Optional[pulumi.Input[str]] = None,
246
257
 
247
258
  ## Example Usage
248
259
 
249
- <!--Start PulumiCodeChooser -->
250
260
  ```python
251
261
  import pulumi
252
262
  import pulumi_ns1 as ns1
253
263
 
254
- example = ns1.get_record(domain="terraform.example.io",
255
- type="A",
256
- zone="example.io")
264
+ # Get details about a NS1 Record.
265
+ example = ns1.get_record(zone="example.io",
266
+ domain="terraform.example.io",
267
+ type="A")
257
268
  ```
258
- <!--End PulumiCodeChooser -->
259
269
 
260
270
 
261
271
  :param str domain: The records' domain.
262
272
  :param str type: The records' RR type.
263
273
  :param str zone: The zone the record belongs to.
264
274
  """
265
- ...
275
+ __args__ = dict()
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')))
pulumi_ns1/get_zone.py CHANGED
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  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
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
 
@@ -197,7 +202,7 @@ class GetZoneResult:
197
202
 
198
203
  @property
199
204
  @pulumi.getter
200
- def tags(self) -> Mapping[str, Any]:
205
+ def tags(self) -> Mapping[str, str]:
201
206
  return pulumi.get(self, "tags")
202
207
 
203
208
  @property
@@ -252,14 +257,13 @@ def get_zone(additional_ports: Optional[Sequence[int]] = None,
252
257
 
253
258
  ## Example Usage
254
259
 
255
- <!--Start PulumiCodeChooser -->
256
260
  ```python
257
261
  import pulumi
258
262
  import pulumi_ns1 as ns1
259
263
 
264
+ # Get details about a NS1 Zone.
260
265
  example = ns1.get_zone(zone="terraform.example.io")
261
266
  ```
262
- <!--End PulumiCodeChooser -->
263
267
 
264
268
 
265
269
  :param Sequence[str] additional_primaries: List of additional IPv4 addresses for the primary
@@ -293,14 +297,11 @@ def get_zone(additional_ports: Optional[Sequence[int]] = None,
293
297
  tags=pulumi.get(__ret__, 'tags'),
294
298
  ttl=pulumi.get(__ret__, 'ttl'),
295
299
  zone=pulumi.get(__ret__, 'zone'))
296
-
297
-
298
- @_utilities.lift_output_func(get_zone)
299
300
  def get_zone_output(additional_ports: Optional[pulumi.Input[Optional[Sequence[int]]]] = None,
300
301
  additional_primaries: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
301
302
  primary_port: Optional[pulumi.Input[Optional[int]]] = None,
302
303
  zone: Optional[pulumi.Input[str]] = None,
303
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetZoneResult]:
304
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetZoneResult]:
304
305
  """
305
306
  Provides details about a NS1 Zone. Use this if you would simply like to read
306
307
  information from NS1 into your configurations. For read/write operations, you
@@ -308,18 +309,42 @@ def get_zone_output(additional_ports: Optional[pulumi.Input[Optional[Sequence[in
308
309
 
309
310
  ## Example Usage
310
311
 
311
- <!--Start PulumiCodeChooser -->
312
312
  ```python
313
313
  import pulumi
314
314
  import pulumi_ns1 as ns1
315
315
 
316
+ # Get details about a NS1 Zone.
316
317
  example = ns1.get_zone(zone="terraform.example.io")
317
318
  ```
318
- <!--End PulumiCodeChooser -->
319
319
 
320
320
 
321
321
  :param Sequence[str] additional_primaries: List of additional IPv4 addresses for the primary
322
322
  zone.
323
323
  :param str zone: The domain name of the zone.
324
324
  """
325
- ...
325
+ __args__ = dict()
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')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  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
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
  from ._inputs import *
@@ -16,7 +21,7 @@ __all__ = ['MonitoringJobArgs', 'MonitoringJob']
16
21
  @pulumi.input_type
17
22
  class MonitoringJobArgs:
18
23
  def __init__(__self__, *,
19
- config: pulumi.Input[Mapping[str, Any]],
24
+ config: pulumi.Input[Mapping[str, pulumi.Input[str]]],
20
25
  frequency: pulumi.Input[int],
21
26
  job_type: pulumi.Input[str],
22
27
  regions: pulumi.Input[Sequence[pulumi.Input[str]]],
@@ -34,7 +39,7 @@ class MonitoringJobArgs:
34
39
  rules: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringJobRuleArgs']]]] = None):
35
40
  """
36
41
  The set of arguments for constructing a MonitoringJob resource.
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.
42
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] 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.
38
43
  :param pulumi.Input[int] frequency: The frequency, in seconds, at which to run the monitoring job in each region.
39
44
  :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.
40
45
  :param pulumi.Input[Sequence[pulumi.Input[str]]] regions: The list of region codes in which to run the monitoring
@@ -83,14 +88,14 @@ class MonitoringJobArgs:
83
88
 
84
89
  @property
85
90
  @pulumi.getter
86
- def config(self) -> pulumi.Input[Mapping[str, Any]]:
91
+ def config(self) -> pulumi.Input[Mapping[str, pulumi.Input[str]]]:
87
92
  """
88
93
  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.
89
94
  """
90
95
  return pulumi.get(self, "config")
91
96
 
92
97
  @config.setter
93
- def config(self, value: pulumi.Input[Mapping[str, Any]]):
98
+ def config(self, value: pulumi.Input[Mapping[str, pulumi.Input[str]]]):
94
99
  pulumi.set(self, "config", value)
95
100
 
96
101
  @property
@@ -277,7 +282,7 @@ class MonitoringJobArgs:
277
282
  class _MonitoringJobState:
278
283
  def __init__(__self__, *,
279
284
  active: Optional[pulumi.Input[bool]] = None,
280
- config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
285
+ config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
281
286
  frequency: Optional[pulumi.Input[int]] = None,
282
287
  job_type: Optional[pulumi.Input[str]] = None,
283
288
  mute: Optional[pulumi.Input[bool]] = None,
@@ -295,7 +300,7 @@ class _MonitoringJobState:
295
300
  """
296
301
  Input properties used for looking up and filtering MonitoringJob resources.
297
302
  :param pulumi.Input[bool] active: Indicates if the job is active or temporarily disabled.
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.
303
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] 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.
299
304
  :param pulumi.Input[int] frequency: The frequency, in seconds, at which to run the monitoring job in each region.
300
305
  :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.
301
306
  :param pulumi.Input[bool] mute: turn off the notifications for the monitoring job.
@@ -359,14 +364,14 @@ class _MonitoringJobState:
359
364
 
360
365
  @property
361
366
  @pulumi.getter
362
- def config(self) -> Optional[pulumi.Input[Mapping[str, Any]]]:
367
+ def config(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
363
368
  """
364
369
  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.
365
370
  """
366
371
  return pulumi.get(self, "config")
367
372
 
368
373
  @config.setter
369
- def config(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
374
+ def config(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
370
375
  pulumi.set(self, "config", value)
371
376
 
372
377
  @property
@@ -543,7 +548,7 @@ class MonitoringJob(pulumi.CustomResource):
543
548
  resource_name: str,
544
549
  opts: Optional[pulumi.ResourceOptions] = None,
545
550
  active: Optional[pulumi.Input[bool]] = None,
546
- config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
551
+ config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
547
552
  frequency: Optional[pulumi.Input[int]] = None,
548
553
  job_type: Optional[pulumi.Input[str]] = None,
549
554
  mute: Optional[pulumi.Input[bool]] = None,
@@ -557,43 +562,42 @@ class MonitoringJob(pulumi.CustomResource):
557
562
  policy: Optional[pulumi.Input[str]] = None,
558
563
  rapid_recheck: Optional[pulumi.Input[bool]] = None,
559
564
  regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
560
- rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringJobRuleArgs']]]]] = None,
565
+ rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['MonitoringJobRuleArgs', 'MonitoringJobRuleArgsDict']]]]] = None,
561
566
  __props__=None):
562
567
  """
563
568
  Provides a NS1 Monitoring Job resource. This can be used to create, modify, and delete monitoring jobs.
564
569
 
565
570
  ## Example Usage
566
571
 
567
- <!--Start PulumiCodeChooser -->
568
572
  ```python
569
573
  import pulumi
570
574
  import pulumi_ns1 as ns1
571
575
 
572
- uswest_monitor = ns1.MonitoringJob("uswestMonitor",
576
+ uswest_monitor = ns1.MonitoringJob("uswest_monitor",
577
+ name="uswest",
573
578
  active=True,
574
- config={
575
- "host": "example-elb-uswest.aws.amazon.com",
576
- "port": 443,
577
- "send": "HEAD / HTTP/1.0\\\\r\\\\n\\\\r\\\\n",
578
- "ssl": 1,
579
- },
580
- frequency=60,
581
- job_type="tcp",
582
- mute=True,
583
- policy="quorum",
584
- rapid_recheck=True,
585
579
  regions=[
586
580
  "lga",
587
581
  "sjc",
588
582
  "sin",
589
583
  ],
590
- rules=[ns1.MonitoringJobRuleArgs(
591
- comparison="contains",
592
- key="output",
593
- value="200 OK",
594
- )])
584
+ job_type="tcp",
585
+ frequency=60,
586
+ rapid_recheck=True,
587
+ policy="quorum",
588
+ mute=True,
589
+ config={
590
+ "ssl": "1",
591
+ "send": "HEAD / HTTP/1.0\\\\r\\\\n\\\\r\\\\n",
592
+ "port": "443",
593
+ "host": "example-elb-uswest.aws.amazon.com",
594
+ },
595
+ rules=[{
596
+ "value": "200 OK",
597
+ "comparison": "contains",
598
+ "key": "output",
599
+ }])
595
600
  ```
596
- <!--End PulumiCodeChooser -->
597
601
 
598
602
  ## NS1 Documentation
599
603
 
@@ -608,7 +612,7 @@ class MonitoringJob(pulumi.CustomResource):
608
612
  :param str resource_name: The name of the resource.
609
613
  :param pulumi.ResourceOptions opts: Options for the resource.
610
614
  :param pulumi.Input[bool] active: Indicates if the job is active or temporarily disabled.
611
- :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.
615
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] 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.
612
616
  :param pulumi.Input[int] frequency: The frequency, in seconds, at which to run the monitoring job in each region.
613
617
  :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.
614
618
  :param pulumi.Input[bool] mute: turn off the notifications for the monitoring job.
@@ -623,7 +627,7 @@ class MonitoringJob(pulumi.CustomResource):
623
627
  :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.
624
628
  :param pulumi.Input[Sequence[pulumi.Input[str]]] regions: The list of region codes in which to run the monitoring
625
629
  job. See NS1 API docs for supported values.
626
- :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.
630
+ :param pulumi.Input[Sequence[pulumi.Input[Union['MonitoringJobRuleArgs', 'MonitoringJobRuleArgsDict']]]] 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.
627
631
  """
628
632
  ...
629
633
  @overload
@@ -636,36 +640,35 @@ class MonitoringJob(pulumi.CustomResource):
636
640
 
637
641
  ## Example Usage
638
642
 
639
- <!--Start PulumiCodeChooser -->
640
643
  ```python
641
644
  import pulumi
642
645
  import pulumi_ns1 as ns1
643
646
 
644
- uswest_monitor = ns1.MonitoringJob("uswestMonitor",
647
+ uswest_monitor = ns1.MonitoringJob("uswest_monitor",
648
+ name="uswest",
645
649
  active=True,
646
- config={
647
- "host": "example-elb-uswest.aws.amazon.com",
648
- "port": 443,
649
- "send": "HEAD / HTTP/1.0\\\\r\\\\n\\\\r\\\\n",
650
- "ssl": 1,
651
- },
652
- frequency=60,
653
- job_type="tcp",
654
- mute=True,
655
- policy="quorum",
656
- rapid_recheck=True,
657
650
  regions=[
658
651
  "lga",
659
652
  "sjc",
660
653
  "sin",
661
654
  ],
662
- rules=[ns1.MonitoringJobRuleArgs(
663
- comparison="contains",
664
- key="output",
665
- value="200 OK",
666
- )])
655
+ job_type="tcp",
656
+ frequency=60,
657
+ rapid_recheck=True,
658
+ policy="quorum",
659
+ mute=True,
660
+ config={
661
+ "ssl": "1",
662
+ "send": "HEAD / HTTP/1.0\\\\r\\\\n\\\\r\\\\n",
663
+ "port": "443",
664
+ "host": "example-elb-uswest.aws.amazon.com",
665
+ },
666
+ rules=[{
667
+ "value": "200 OK",
668
+ "comparison": "contains",
669
+ "key": "output",
670
+ }])
667
671
  ```
668
- <!--End PulumiCodeChooser -->
669
672
 
670
673
  ## NS1 Documentation
671
674
 
@@ -693,7 +696,7 @@ class MonitoringJob(pulumi.CustomResource):
693
696
  resource_name: str,
694
697
  opts: Optional[pulumi.ResourceOptions] = None,
695
698
  active: Optional[pulumi.Input[bool]] = None,
696
- config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
699
+ config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
697
700
  frequency: Optional[pulumi.Input[int]] = None,
698
701
  job_type: Optional[pulumi.Input[str]] = None,
699
702
  mute: Optional[pulumi.Input[bool]] = None,
@@ -707,7 +710,7 @@ class MonitoringJob(pulumi.CustomResource):
707
710
  policy: Optional[pulumi.Input[str]] = None,
708
711
  rapid_recheck: Optional[pulumi.Input[bool]] = None,
709
712
  regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
710
- rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringJobRuleArgs']]]]] = None,
713
+ rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['MonitoringJobRuleArgs', 'MonitoringJobRuleArgsDict']]]]] = None,
711
714
  __props__=None):
712
715
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
713
716
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -752,7 +755,7 @@ class MonitoringJob(pulumi.CustomResource):
752
755
  id: pulumi.Input[str],
753
756
  opts: Optional[pulumi.ResourceOptions] = None,
754
757
  active: Optional[pulumi.Input[bool]] = None,
755
- config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
758
+ config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
756
759
  frequency: Optional[pulumi.Input[int]] = None,
757
760
  job_type: Optional[pulumi.Input[str]] = None,
758
761
  mute: Optional[pulumi.Input[bool]] = None,
@@ -766,7 +769,7 @@ class MonitoringJob(pulumi.CustomResource):
766
769
  policy: Optional[pulumi.Input[str]] = None,
767
770
  rapid_recheck: Optional[pulumi.Input[bool]] = None,
768
771
  regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
769
- rules: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringJobRuleArgs']]]]] = None) -> 'MonitoringJob':
772
+ rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['MonitoringJobRuleArgs', 'MonitoringJobRuleArgsDict']]]]] = None) -> 'MonitoringJob':
770
773
  """
771
774
  Get an existing MonitoringJob resource's state with the given name, id, and optional extra
772
775
  properties used to qualify the lookup.
@@ -775,7 +778,7 @@ class MonitoringJob(pulumi.CustomResource):
775
778
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
776
779
  :param pulumi.ResourceOptions opts: Options for the resource.
777
780
  :param pulumi.Input[bool] active: Indicates if the job is active or temporarily disabled.
778
- :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.
781
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] 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.
779
782
  :param pulumi.Input[int] frequency: The frequency, in seconds, at which to run the monitoring job in each region.
780
783
  :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.
781
784
  :param pulumi.Input[bool] mute: turn off the notifications for the monitoring job.
@@ -790,7 +793,7 @@ class MonitoringJob(pulumi.CustomResource):
790
793
  :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.
791
794
  :param pulumi.Input[Sequence[pulumi.Input[str]]] regions: The list of region codes in which to run the monitoring
792
795
  job. See NS1 API docs for supported values.
793
- :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.
796
+ :param pulumi.Input[Sequence[pulumi.Input[Union['MonitoringJobRuleArgs', 'MonitoringJobRuleArgsDict']]]] 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.
794
797
  """
795
798
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
796
799
 
@@ -824,7 +827,7 @@ class MonitoringJob(pulumi.CustomResource):
824
827
 
825
828
  @property
826
829
  @pulumi.getter
827
- def config(self) -> pulumi.Output[Mapping[str, Any]]:
830
+ def config(self) -> pulumi.Output[Mapping[str, str]]:
828
831
  """
829
832
  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.
830
833
  """