pulumi-ns1 3.2.1__py3-none-any.whl → 3.3.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_ns1/__init__.py +18 -0
- pulumi_ns1/account_whitelist.py +12 -12
- pulumi_ns1/api_key.py +8 -10
- pulumi_ns1/application.py +0 -44
- pulumi_ns1/data_feed.py +26 -16
- pulumi_ns1/data_source.py +6 -6
- pulumi_ns1/get_dns_sec.py +8 -12
- pulumi_ns1/get_monitoring_regions.py +2 -4
- pulumi_ns1/get_networks.py +2 -4
- pulumi_ns1/get_record.py +8 -10
- pulumi_ns1/get_zone.py +2 -4
- pulumi_ns1/monitoring_job.py +28 -30
- pulumi_ns1/notify_list.py +32 -32
- pulumi_ns1/pulumi-plugin.json +2 -1
- pulumi_ns1/record.py +241 -0
- pulumi_ns1/redirect.py +723 -0
- pulumi_ns1/redirect_certificate.py +231 -0
- pulumi_ns1/team.py +22 -22
- pulumi_ns1/tsigkey.py +2 -4
- pulumi_ns1/user.py +10 -10
- pulumi_ns1/zone.py +13 -0
- {pulumi_ns1-3.2.1.dist-info → pulumi_ns1-3.3.0.dist-info}/METADATA +1 -1
- pulumi_ns1-3.3.0.dist-info/RECORD +37 -0
- {pulumi_ns1-3.2.1.dist-info → pulumi_ns1-3.3.0.dist-info}/WHEEL +1 -1
- pulumi_ns1-3.2.1.dist-info/RECORD +0 -35
- {pulumi_ns1-3.2.1.dist-info → pulumi_ns1-3.3.0.dist-info}/top_level.txt +0 -0
pulumi_ns1/notify_list.py
CHANGED
@@ -106,27 +106,27 @@ class NotifyList(pulumi.CustomResource):
|
|
106
106
|
|
107
107
|
## Example Usage
|
108
108
|
|
109
|
-
<!--Start PulumiCodeChooser -->
|
110
109
|
```python
|
111
110
|
import pulumi
|
112
111
|
import pulumi_ns1 as ns1
|
113
112
|
|
114
|
-
nl = ns1.NotifyList("nl",
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
113
|
+
nl = ns1.NotifyList("nl",
|
114
|
+
name="my notify list",
|
115
|
+
notifications=[
|
116
|
+
ns1.NotifyListNotificationArgs(
|
117
|
+
type="webhook",
|
118
|
+
config={
|
119
|
+
"url": "http://www.mywebhook.com",
|
120
|
+
},
|
121
|
+
),
|
122
|
+
ns1.NotifyListNotificationArgs(
|
123
|
+
type="email",
|
124
|
+
config={
|
125
|
+
"email": "test@test.com",
|
126
|
+
},
|
127
|
+
),
|
128
|
+
])
|
128
129
|
```
|
129
|
-
<!--End PulumiCodeChooser -->
|
130
130
|
|
131
131
|
## NS1 Documentation
|
132
132
|
|
@@ -154,27 +154,27 @@ class NotifyList(pulumi.CustomResource):
|
|
154
154
|
|
155
155
|
## Example Usage
|
156
156
|
|
157
|
-
<!--Start PulumiCodeChooser -->
|
158
157
|
```python
|
159
158
|
import pulumi
|
160
159
|
import pulumi_ns1 as ns1
|
161
160
|
|
162
|
-
nl = ns1.NotifyList("nl",
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
161
|
+
nl = ns1.NotifyList("nl",
|
162
|
+
name="my notify list",
|
163
|
+
notifications=[
|
164
|
+
ns1.NotifyListNotificationArgs(
|
165
|
+
type="webhook",
|
166
|
+
config={
|
167
|
+
"url": "http://www.mywebhook.com",
|
168
|
+
},
|
169
|
+
),
|
170
|
+
ns1.NotifyListNotificationArgs(
|
171
|
+
type="email",
|
172
|
+
config={
|
173
|
+
"email": "test@test.com",
|
174
|
+
},
|
175
|
+
),
|
176
|
+
])
|
176
177
|
```
|
177
|
-
<!--End PulumiCodeChooser -->
|
178
178
|
|
179
179
|
## NS1 Documentation
|
180
180
|
|
pulumi_ns1/pulumi-plugin.json
CHANGED
pulumi_ns1/record.py
CHANGED
@@ -47,6 +47,7 @@ class RecordArgs:
|
|
47
47
|
just groupings based on metadata, and are called "Answer Groups" in the NS1 UI,
|
48
48
|
but remain `regions` here for legacy reasons. Regions are
|
49
49
|
documented below. Please note the ordering requirement!
|
50
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: map of tags in the form of `"key" = "value"` where both key and value are strings
|
50
51
|
:param pulumi.Input[int] ttl: The records' time to live (in seconds).
|
51
52
|
:param pulumi.Input[bool] use_client_subnet: Whether to use EDNS client subnet data when
|
52
53
|
available(in filter chain).
|
@@ -216,6 +217,9 @@ class RecordArgs:
|
|
216
217
|
@property
|
217
218
|
@pulumi.getter
|
218
219
|
def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
220
|
+
"""
|
221
|
+
map of tags in the form of `"key" = "value"` where both key and value are strings
|
222
|
+
"""
|
219
223
|
return pulumi.get(self, "tags")
|
220
224
|
|
221
225
|
@tags.setter
|
@@ -281,6 +285,7 @@ class _RecordState:
|
|
281
285
|
just groupings based on metadata, and are called "Answer Groups" in the NS1 UI,
|
282
286
|
but remain `regions` here for legacy reasons. Regions are
|
283
287
|
documented below. Please note the ordering requirement!
|
288
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: map of tags in the form of `"key" = "value"` where both key and value are strings
|
284
289
|
:param pulumi.Input[int] ttl: The records' time to live (in seconds).
|
285
290
|
:param pulumi.Input[str] type: The records' RR type.
|
286
291
|
:param pulumi.Input[bool] use_client_subnet: Whether to use EDNS client subnet data when
|
@@ -431,6 +436,9 @@ class _RecordState:
|
|
431
436
|
@property
|
432
437
|
@pulumi.getter
|
433
438
|
def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
439
|
+
"""
|
440
|
+
map of tags in the form of `"key" = "value"` where both key and value are strings
|
441
|
+
"""
|
434
442
|
return pulumi.get(self, "tags")
|
435
443
|
|
436
444
|
@tags.setter
|
@@ -513,6 +521,120 @@ class Record(pulumi.CustomResource):
|
|
513
521
|
"""
|
514
522
|
Provides a NS1 Record resource. This can be used to create, modify, and delete records.
|
515
523
|
|
524
|
+
## Example Usage
|
525
|
+
|
526
|
+
```python
|
527
|
+
import pulumi
|
528
|
+
import json
|
529
|
+
import pulumi_external as external
|
530
|
+
import pulumi_ns1 as ns1
|
531
|
+
import pulumi_std as std
|
532
|
+
|
533
|
+
example = ns1.Zone("example", zone="terraform.example.io")
|
534
|
+
ns1 = ns1.DataSource("ns1",
|
535
|
+
name="ns1_source",
|
536
|
+
sourcetype="nsone_v1")
|
537
|
+
foo = ns1.DataFeed("foo",
|
538
|
+
name="foo_feed",
|
539
|
+
source_id=ns1.id,
|
540
|
+
config={
|
541
|
+
"label": "foo",
|
542
|
+
})
|
543
|
+
bar = ns1.DataFeed("bar",
|
544
|
+
name="bar_feed",
|
545
|
+
source_id=ns1.id,
|
546
|
+
config={
|
547
|
+
"label": "bar",
|
548
|
+
})
|
549
|
+
www = ns1.Record("www",
|
550
|
+
zone=tld["zone"],
|
551
|
+
domain=f"www.{tld['zone']}",
|
552
|
+
type="CNAME",
|
553
|
+
ttl=60,
|
554
|
+
meta={
|
555
|
+
"up": True,
|
556
|
+
},
|
557
|
+
regions=[
|
558
|
+
ns1.RecordRegionArgs(
|
559
|
+
name="east",
|
560
|
+
meta={
|
561
|
+
"georegion": "US-EAST",
|
562
|
+
},
|
563
|
+
),
|
564
|
+
ns1.RecordRegionArgs(
|
565
|
+
name="usa",
|
566
|
+
meta={
|
567
|
+
"country": "US",
|
568
|
+
},
|
569
|
+
),
|
570
|
+
],
|
571
|
+
answers=[
|
572
|
+
ns1.RecordAnswerArgs(
|
573
|
+
answer=f"sub1.{tld['zone']}",
|
574
|
+
region="east",
|
575
|
+
meta={
|
576
|
+
"up": foo.id.apply(lambda id: f"{{\\"feed\\":\\"{id}\\"}}"),
|
577
|
+
},
|
578
|
+
),
|
579
|
+
ns1.RecordAnswerArgs(
|
580
|
+
answer=f"sub2.{tld['zone']}",
|
581
|
+
meta={
|
582
|
+
"up": bar.id.apply(lambda id: f"{{\\"feed\\":\\"{id}\\"}}"),
|
583
|
+
"connections": 3,
|
584
|
+
},
|
585
|
+
),
|
586
|
+
ns1.RecordAnswerArgs(
|
587
|
+
answer=f"sub3.{tld['zone']}",
|
588
|
+
meta={
|
589
|
+
"pulsar": json.dumps([{
|
590
|
+
"job_id": "abcdef",
|
591
|
+
"bias": "*0.55",
|
592
|
+
"a5m_cutoff": 0.9,
|
593
|
+
}]),
|
594
|
+
"subdivisions": json.dumps({
|
595
|
+
"BR": [
|
596
|
+
"SP",
|
597
|
+
"SC",
|
598
|
+
],
|
599
|
+
"DZ": [
|
600
|
+
"01",
|
601
|
+
"02",
|
602
|
+
"03",
|
603
|
+
],
|
604
|
+
}),
|
605
|
+
},
|
606
|
+
),
|
607
|
+
],
|
608
|
+
filters=[ns1.RecordFilterArgs(
|
609
|
+
filter="select_first_n",
|
610
|
+
config={
|
611
|
+
"N": 1,
|
612
|
+
},
|
613
|
+
)])
|
614
|
+
# Some other non-NS1 provider that returns a zone with a trailing dot and a domain with a leading dot.
|
615
|
+
baz = external.index.Source("baz",
|
616
|
+
zone=terraform.example.io.,
|
617
|
+
domain=.www.terraform.example.io)
|
618
|
+
# Basic record showing how to clean a zone or domain field that comes from
|
619
|
+
# another non-NS1 resource. DNS names often end in '.' characters to signify
|
620
|
+
# the root of the DNS tree, but the NS1 provider does not support this.
|
621
|
+
#
|
622
|
+
# In other cases, a domain or zone may be passed in with a preceding dot ('.')
|
623
|
+
# character which would likewise lead the system to fail.
|
624
|
+
external = ns1.Record("external",
|
625
|
+
zone=std.replace(text=zone,
|
626
|
+
search="/(^\\\\.)|(\\\\.$)/",
|
627
|
+
replace="").result,
|
628
|
+
domain=std.replace(text=domain,
|
629
|
+
search="/(^\\\\.)|(\\\\.$)/",
|
630
|
+
replace="").result,
|
631
|
+
type="CNAME")
|
632
|
+
```
|
633
|
+
|
634
|
+
## NS1 Documentation
|
635
|
+
|
636
|
+
[Record Api Doc](https://ns1.com/api#records)
|
637
|
+
|
516
638
|
## Import
|
517
639
|
|
518
640
|
```sh
|
@@ -539,6 +661,7 @@ class Record(pulumi.CustomResource):
|
|
539
661
|
just groupings based on metadata, and are called "Answer Groups" in the NS1 UI,
|
540
662
|
but remain `regions` here for legacy reasons. Regions are
|
541
663
|
documented below. Please note the ordering requirement!
|
664
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: map of tags in the form of `"key" = "value"` where both key and value are strings
|
542
665
|
:param pulumi.Input[int] ttl: The records' time to live (in seconds).
|
543
666
|
:param pulumi.Input[str] type: The records' RR type.
|
544
667
|
:param pulumi.Input[bool] use_client_subnet: Whether to use EDNS client subnet data when
|
@@ -557,6 +680,120 @@ class Record(pulumi.CustomResource):
|
|
557
680
|
"""
|
558
681
|
Provides a NS1 Record resource. This can be used to create, modify, and delete records.
|
559
682
|
|
683
|
+
## Example Usage
|
684
|
+
|
685
|
+
```python
|
686
|
+
import pulumi
|
687
|
+
import json
|
688
|
+
import pulumi_external as external
|
689
|
+
import pulumi_ns1 as ns1
|
690
|
+
import pulumi_std as std
|
691
|
+
|
692
|
+
example = ns1.Zone("example", zone="terraform.example.io")
|
693
|
+
ns1 = ns1.DataSource("ns1",
|
694
|
+
name="ns1_source",
|
695
|
+
sourcetype="nsone_v1")
|
696
|
+
foo = ns1.DataFeed("foo",
|
697
|
+
name="foo_feed",
|
698
|
+
source_id=ns1.id,
|
699
|
+
config={
|
700
|
+
"label": "foo",
|
701
|
+
})
|
702
|
+
bar = ns1.DataFeed("bar",
|
703
|
+
name="bar_feed",
|
704
|
+
source_id=ns1.id,
|
705
|
+
config={
|
706
|
+
"label": "bar",
|
707
|
+
})
|
708
|
+
www = ns1.Record("www",
|
709
|
+
zone=tld["zone"],
|
710
|
+
domain=f"www.{tld['zone']}",
|
711
|
+
type="CNAME",
|
712
|
+
ttl=60,
|
713
|
+
meta={
|
714
|
+
"up": True,
|
715
|
+
},
|
716
|
+
regions=[
|
717
|
+
ns1.RecordRegionArgs(
|
718
|
+
name="east",
|
719
|
+
meta={
|
720
|
+
"georegion": "US-EAST",
|
721
|
+
},
|
722
|
+
),
|
723
|
+
ns1.RecordRegionArgs(
|
724
|
+
name="usa",
|
725
|
+
meta={
|
726
|
+
"country": "US",
|
727
|
+
},
|
728
|
+
),
|
729
|
+
],
|
730
|
+
answers=[
|
731
|
+
ns1.RecordAnswerArgs(
|
732
|
+
answer=f"sub1.{tld['zone']}",
|
733
|
+
region="east",
|
734
|
+
meta={
|
735
|
+
"up": foo.id.apply(lambda id: f"{{\\"feed\\":\\"{id}\\"}}"),
|
736
|
+
},
|
737
|
+
),
|
738
|
+
ns1.RecordAnswerArgs(
|
739
|
+
answer=f"sub2.{tld['zone']}",
|
740
|
+
meta={
|
741
|
+
"up": bar.id.apply(lambda id: f"{{\\"feed\\":\\"{id}\\"}}"),
|
742
|
+
"connections": 3,
|
743
|
+
},
|
744
|
+
),
|
745
|
+
ns1.RecordAnswerArgs(
|
746
|
+
answer=f"sub3.{tld['zone']}",
|
747
|
+
meta={
|
748
|
+
"pulsar": json.dumps([{
|
749
|
+
"job_id": "abcdef",
|
750
|
+
"bias": "*0.55",
|
751
|
+
"a5m_cutoff": 0.9,
|
752
|
+
}]),
|
753
|
+
"subdivisions": json.dumps({
|
754
|
+
"BR": [
|
755
|
+
"SP",
|
756
|
+
"SC",
|
757
|
+
],
|
758
|
+
"DZ": [
|
759
|
+
"01",
|
760
|
+
"02",
|
761
|
+
"03",
|
762
|
+
],
|
763
|
+
}),
|
764
|
+
},
|
765
|
+
),
|
766
|
+
],
|
767
|
+
filters=[ns1.RecordFilterArgs(
|
768
|
+
filter="select_first_n",
|
769
|
+
config={
|
770
|
+
"N": 1,
|
771
|
+
},
|
772
|
+
)])
|
773
|
+
# Some other non-NS1 provider that returns a zone with a trailing dot and a domain with a leading dot.
|
774
|
+
baz = external.index.Source("baz",
|
775
|
+
zone=terraform.example.io.,
|
776
|
+
domain=.www.terraform.example.io)
|
777
|
+
# Basic record showing how to clean a zone or domain field that comes from
|
778
|
+
# another non-NS1 resource. DNS names often end in '.' characters to signify
|
779
|
+
# the root of the DNS tree, but the NS1 provider does not support this.
|
780
|
+
#
|
781
|
+
# In other cases, a domain or zone may be passed in with a preceding dot ('.')
|
782
|
+
# character which would likewise lead the system to fail.
|
783
|
+
external = ns1.Record("external",
|
784
|
+
zone=std.replace(text=zone,
|
785
|
+
search="/(^\\\\.)|(\\\\.$)/",
|
786
|
+
replace="").result,
|
787
|
+
domain=std.replace(text=domain,
|
788
|
+
search="/(^\\\\.)|(\\\\.$)/",
|
789
|
+
replace="").result,
|
790
|
+
type="CNAME")
|
791
|
+
```
|
792
|
+
|
793
|
+
## NS1 Documentation
|
794
|
+
|
795
|
+
[Record Api Doc](https://ns1.com/api#records)
|
796
|
+
|
560
797
|
## Import
|
561
798
|
|
562
799
|
```sh
|
@@ -670,6 +907,7 @@ class Record(pulumi.CustomResource):
|
|
670
907
|
just groupings based on metadata, and are called "Answer Groups" in the NS1 UI,
|
671
908
|
but remain `regions` here for legacy reasons. Regions are
|
672
909
|
documented below. Please note the ordering requirement!
|
910
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: map of tags in the form of `"key" = "value"` where both key and value are strings
|
673
911
|
:param pulumi.Input[int] ttl: The records' time to live (in seconds).
|
674
912
|
:param pulumi.Input[str] type: The records' RR type.
|
675
913
|
:param pulumi.Input[bool] use_client_subnet: Whether to use EDNS client subnet data when
|
@@ -772,6 +1010,9 @@ class Record(pulumi.CustomResource):
|
|
772
1010
|
@property
|
773
1011
|
@pulumi.getter
|
774
1012
|
def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
|
1013
|
+
"""
|
1014
|
+
map of tags in the form of `"key" = "value"` where both key and value are strings
|
1015
|
+
"""
|
775
1016
|
return pulumi.get(self, "tags")
|
776
1017
|
|
777
1018
|
@property
|