pulumi-ns1 3.2.0a1710245297__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/__init__.py +21 -3
- pulumi_ns1/_inputs.py +334 -17
- pulumi_ns1/_utilities.py +41 -5
- pulumi_ns1/account_whitelist.py +17 -12
- pulumi_ns1/alert.py +549 -0
- pulumi_ns1/api_key.py +157 -235
- pulumi_ns1/application.py +10 -49
- pulumi_ns1/config/__init__.pyi +5 -5
- pulumi_ns1/config/vars.py +5 -7
- pulumi_ns1/data_feed.py +45 -30
- pulumi_ns1/data_source.py +25 -20
- pulumi_ns1/dataset.py +15 -10
- pulumi_ns1/dnsview.py +5 -0
- pulumi_ns1/get_dns_sec.py +23 -17
- pulumi_ns1/get_monitoring_regions.py +19 -13
- pulumi_ns1/get_networks.py +14 -9
- pulumi_ns1/get_record.py +49 -18
- pulumi_ns1/get_zone.py +35 -10
- pulumi_ns1/monitoring_job.py +60 -57
- pulumi_ns1/notify_list.py +38 -33
- pulumi_ns1/outputs.py +25 -20
- pulumi_ns1/provider.py +5 -20
- pulumi_ns1/pulsar_job.py +14 -9
- pulumi_ns1/pulumi-plugin.json +2 -1
- pulumi_ns1/record.py +308 -34
- pulumi_ns1/redirect.py +715 -0
- pulumi_ns1/redirect_certificate.py +236 -0
- pulumi_ns1/team.py +187 -263
- pulumi_ns1/tsigkey.py +7 -4
- pulumi_ns1/user.py +166 -222
- pulumi_ns1/zone.py +23 -5
- {pulumi_ns1-3.2.0a1710245297.dist-info → pulumi_ns1-3.6.0a1736834553.dist-info}/METADATA +7 -6
- pulumi_ns1-3.6.0a1736834553.dist-info/RECORD +37 -0
- {pulumi_ns1-3.2.0a1710245297.dist-info → pulumi_ns1-3.6.0a1736834553.dist-info}/WHEEL +1 -1
- pulumi_ns1/subnet.py +0 -504
- pulumi_ns1-3.2.0a1710245297.dist-info/RECORD +0 -35
- {pulumi_ns1-3.2.0a1710245297.dist-info → pulumi_ns1-3.6.0a1736834553.dist-info}/top_level.txt +0 -0
pulumi_ns1/redirect.py
ADDED
@@ -0,0 +1,715 @@
|
|
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 sys
|
8
|
+
import pulumi
|
9
|
+
import pulumi.runtime
|
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
|
15
|
+
from . import _utilities
|
16
|
+
|
17
|
+
__all__ = ['RedirectArgs', 'Redirect']
|
18
|
+
|
19
|
+
@pulumi.input_type
|
20
|
+
class RedirectArgs:
|
21
|
+
def __init__(__self__, *,
|
22
|
+
domain: pulumi.Input[str],
|
23
|
+
path: pulumi.Input[str],
|
24
|
+
target: pulumi.Input[str],
|
25
|
+
certificate_id: Optional[pulumi.Input[str]] = None,
|
26
|
+
forwarding_mode: Optional[pulumi.Input[str]] = None,
|
27
|
+
forwarding_type: Optional[pulumi.Input[str]] = None,
|
28
|
+
https_forced: Optional[pulumi.Input[bool]] = None,
|
29
|
+
query_forwarding: Optional[pulumi.Input[bool]] = None,
|
30
|
+
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
31
|
+
"""
|
32
|
+
The set of arguments for constructing a Redirect resource.
|
33
|
+
:param pulumi.Input[str] domain: The domain the redirect refers to.
|
34
|
+
:param pulumi.Input[str] path: The path on the domain to redirect from.
|
35
|
+
:param pulumi.Input[str] target: The URL to redirect to.
|
36
|
+
:param pulumi.Input[str] forwarding_mode: How the target is interpreted:
|
37
|
+
* __all__ appends the entire incoming path to the target destination;
|
38
|
+
* __capture__ appends only the part of the incoming path corresponding to the wildcard (*);
|
39
|
+
* __none__ does not append any part of the incoming path.
|
40
|
+
:param pulumi.Input[str] forwarding_type: How the redirect is executed:
|
41
|
+
* __permanent__ (HTTP 301) indicates to search engines that they should remove the old page from
|
42
|
+
their database and replace it with the new target page (this is recommended for SEO);
|
43
|
+
* __temporary__ (HTTP 302) less common, indicates that search engines should keep the old domain or
|
44
|
+
page indexed as the redirect is only temporary (while both pages might appear in the
|
45
|
+
search results, a temporary redirect suggests to the search engine that it should
|
46
|
+
prefer the new target page);
|
47
|
+
* __masking__ preserves the redirected domain in the browser's address bar (this lets users see the
|
48
|
+
address they entered, even though the displayed content comes from a different web page).
|
49
|
+
:param pulumi.Input[bool] https_forced: Forces redirect for users that try to visit HTTP domain to HTTPS instead.
|
50
|
+
:param pulumi.Input[bool] query_forwarding: Enables the query string of a URL to be applied directly to the new target URL.
|
51
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: Tags associated with the configuration.
|
52
|
+
"""
|
53
|
+
pulumi.set(__self__, "domain", domain)
|
54
|
+
pulumi.set(__self__, "path", path)
|
55
|
+
pulumi.set(__self__, "target", target)
|
56
|
+
if certificate_id is not None:
|
57
|
+
pulumi.set(__self__, "certificate_id", certificate_id)
|
58
|
+
if forwarding_mode is not None:
|
59
|
+
pulumi.set(__self__, "forwarding_mode", forwarding_mode)
|
60
|
+
if forwarding_type is not None:
|
61
|
+
pulumi.set(__self__, "forwarding_type", forwarding_type)
|
62
|
+
if https_forced is not None:
|
63
|
+
pulumi.set(__self__, "https_forced", https_forced)
|
64
|
+
if query_forwarding is not None:
|
65
|
+
pulumi.set(__self__, "query_forwarding", query_forwarding)
|
66
|
+
if tags is not None:
|
67
|
+
pulumi.set(__self__, "tags", tags)
|
68
|
+
|
69
|
+
@property
|
70
|
+
@pulumi.getter
|
71
|
+
def domain(self) -> pulumi.Input[str]:
|
72
|
+
"""
|
73
|
+
The domain the redirect refers to.
|
74
|
+
"""
|
75
|
+
return pulumi.get(self, "domain")
|
76
|
+
|
77
|
+
@domain.setter
|
78
|
+
def domain(self, value: pulumi.Input[str]):
|
79
|
+
pulumi.set(self, "domain", value)
|
80
|
+
|
81
|
+
@property
|
82
|
+
@pulumi.getter
|
83
|
+
def path(self) -> pulumi.Input[str]:
|
84
|
+
"""
|
85
|
+
The path on the domain to redirect from.
|
86
|
+
"""
|
87
|
+
return pulumi.get(self, "path")
|
88
|
+
|
89
|
+
@path.setter
|
90
|
+
def path(self, value: pulumi.Input[str]):
|
91
|
+
pulumi.set(self, "path", value)
|
92
|
+
|
93
|
+
@property
|
94
|
+
@pulumi.getter
|
95
|
+
def target(self) -> pulumi.Input[str]:
|
96
|
+
"""
|
97
|
+
The URL to redirect to.
|
98
|
+
"""
|
99
|
+
return pulumi.get(self, "target")
|
100
|
+
|
101
|
+
@target.setter
|
102
|
+
def target(self, value: pulumi.Input[str]):
|
103
|
+
pulumi.set(self, "target", value)
|
104
|
+
|
105
|
+
@property
|
106
|
+
@pulumi.getter(name="certificateId")
|
107
|
+
def certificate_id(self) -> Optional[pulumi.Input[str]]:
|
108
|
+
return pulumi.get(self, "certificate_id")
|
109
|
+
|
110
|
+
@certificate_id.setter
|
111
|
+
def certificate_id(self, value: Optional[pulumi.Input[str]]):
|
112
|
+
pulumi.set(self, "certificate_id", value)
|
113
|
+
|
114
|
+
@property
|
115
|
+
@pulumi.getter(name="forwardingMode")
|
116
|
+
def forwarding_mode(self) -> Optional[pulumi.Input[str]]:
|
117
|
+
"""
|
118
|
+
How the target is interpreted:
|
119
|
+
* __all__ appends the entire incoming path to the target destination;
|
120
|
+
* __capture__ appends only the part of the incoming path corresponding to the wildcard (*);
|
121
|
+
* __none__ does not append any part of the incoming path.
|
122
|
+
"""
|
123
|
+
return pulumi.get(self, "forwarding_mode")
|
124
|
+
|
125
|
+
@forwarding_mode.setter
|
126
|
+
def forwarding_mode(self, value: Optional[pulumi.Input[str]]):
|
127
|
+
pulumi.set(self, "forwarding_mode", value)
|
128
|
+
|
129
|
+
@property
|
130
|
+
@pulumi.getter(name="forwardingType")
|
131
|
+
def forwarding_type(self) -> Optional[pulumi.Input[str]]:
|
132
|
+
"""
|
133
|
+
How the redirect is executed:
|
134
|
+
* __permanent__ (HTTP 301) indicates to search engines that they should remove the old page from
|
135
|
+
their database and replace it with the new target page (this is recommended for SEO);
|
136
|
+
* __temporary__ (HTTP 302) less common, indicates that search engines should keep the old domain or
|
137
|
+
page indexed as the redirect is only temporary (while both pages might appear in the
|
138
|
+
search results, a temporary redirect suggests to the search engine that it should
|
139
|
+
prefer the new target page);
|
140
|
+
* __masking__ preserves the redirected domain in the browser's address bar (this lets users see the
|
141
|
+
address they entered, even though the displayed content comes from a different web page).
|
142
|
+
"""
|
143
|
+
return pulumi.get(self, "forwarding_type")
|
144
|
+
|
145
|
+
@forwarding_type.setter
|
146
|
+
def forwarding_type(self, value: Optional[pulumi.Input[str]]):
|
147
|
+
pulumi.set(self, "forwarding_type", value)
|
148
|
+
|
149
|
+
@property
|
150
|
+
@pulumi.getter(name="httpsForced")
|
151
|
+
def https_forced(self) -> Optional[pulumi.Input[bool]]:
|
152
|
+
"""
|
153
|
+
Forces redirect for users that try to visit HTTP domain to HTTPS instead.
|
154
|
+
"""
|
155
|
+
return pulumi.get(self, "https_forced")
|
156
|
+
|
157
|
+
@https_forced.setter
|
158
|
+
def https_forced(self, value: Optional[pulumi.Input[bool]]):
|
159
|
+
pulumi.set(self, "https_forced", value)
|
160
|
+
|
161
|
+
@property
|
162
|
+
@pulumi.getter(name="queryForwarding")
|
163
|
+
def query_forwarding(self) -> Optional[pulumi.Input[bool]]:
|
164
|
+
"""
|
165
|
+
Enables the query string of a URL to be applied directly to the new target URL.
|
166
|
+
"""
|
167
|
+
return pulumi.get(self, "query_forwarding")
|
168
|
+
|
169
|
+
@query_forwarding.setter
|
170
|
+
def query_forwarding(self, value: Optional[pulumi.Input[bool]]):
|
171
|
+
pulumi.set(self, "query_forwarding", value)
|
172
|
+
|
173
|
+
@property
|
174
|
+
@pulumi.getter
|
175
|
+
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
176
|
+
"""
|
177
|
+
Tags associated with the configuration.
|
178
|
+
"""
|
179
|
+
return pulumi.get(self, "tags")
|
180
|
+
|
181
|
+
@tags.setter
|
182
|
+
def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
183
|
+
pulumi.set(self, "tags", value)
|
184
|
+
|
185
|
+
|
186
|
+
@pulumi.input_type
|
187
|
+
class _RedirectState:
|
188
|
+
def __init__(__self__, *,
|
189
|
+
certificate_id: Optional[pulumi.Input[str]] = None,
|
190
|
+
domain: Optional[pulumi.Input[str]] = None,
|
191
|
+
forwarding_mode: Optional[pulumi.Input[str]] = None,
|
192
|
+
forwarding_type: Optional[pulumi.Input[str]] = None,
|
193
|
+
https_enabled: Optional[pulumi.Input[bool]] = None,
|
194
|
+
https_forced: Optional[pulumi.Input[bool]] = None,
|
195
|
+
last_updated: Optional[pulumi.Input[int]] = None,
|
196
|
+
path: Optional[pulumi.Input[str]] = None,
|
197
|
+
query_forwarding: Optional[pulumi.Input[bool]] = None,
|
198
|
+
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
199
|
+
target: Optional[pulumi.Input[str]] = None):
|
200
|
+
"""
|
201
|
+
Input properties used for looking up and filtering Redirect resources.
|
202
|
+
:param pulumi.Input[str] domain: The domain the redirect refers to.
|
203
|
+
:param pulumi.Input[str] forwarding_mode: How the target is interpreted:
|
204
|
+
* __all__ appends the entire incoming path to the target destination;
|
205
|
+
* __capture__ appends only the part of the incoming path corresponding to the wildcard (*);
|
206
|
+
* __none__ does not append any part of the incoming path.
|
207
|
+
:param pulumi.Input[str] forwarding_type: How the redirect is executed:
|
208
|
+
* __permanent__ (HTTP 301) indicates to search engines that they should remove the old page from
|
209
|
+
their database and replace it with the new target page (this is recommended for SEO);
|
210
|
+
* __temporary__ (HTTP 302) less common, indicates that search engines should keep the old domain or
|
211
|
+
page indexed as the redirect is only temporary (while both pages might appear in the
|
212
|
+
search results, a temporary redirect suggests to the search engine that it should
|
213
|
+
prefer the new target page);
|
214
|
+
* __masking__ preserves the redirected domain in the browser's address bar (this lets users see the
|
215
|
+
address they entered, even though the displayed content comes from a different web page).
|
216
|
+
:param pulumi.Input[bool] https_enabled: True if HTTPS is supported on the source domain by using Let's Encrypt certificates.
|
217
|
+
:param pulumi.Input[bool] https_forced: Forces redirect for users that try to visit HTTP domain to HTTPS instead.
|
218
|
+
:param pulumi.Input[int] last_updated: The Unix timestamp representing when the certificate was last signed.
|
219
|
+
:param pulumi.Input[str] path: The path on the domain to redirect from.
|
220
|
+
:param pulumi.Input[bool] query_forwarding: Enables the query string of a URL to be applied directly to the new target URL.
|
221
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: Tags associated with the configuration.
|
222
|
+
:param pulumi.Input[str] target: The URL to redirect to.
|
223
|
+
"""
|
224
|
+
if certificate_id is not None:
|
225
|
+
pulumi.set(__self__, "certificate_id", certificate_id)
|
226
|
+
if domain is not None:
|
227
|
+
pulumi.set(__self__, "domain", domain)
|
228
|
+
if forwarding_mode is not None:
|
229
|
+
pulumi.set(__self__, "forwarding_mode", forwarding_mode)
|
230
|
+
if forwarding_type is not None:
|
231
|
+
pulumi.set(__self__, "forwarding_type", forwarding_type)
|
232
|
+
if https_enabled is not None:
|
233
|
+
pulumi.set(__self__, "https_enabled", https_enabled)
|
234
|
+
if https_forced is not None:
|
235
|
+
pulumi.set(__self__, "https_forced", https_forced)
|
236
|
+
if last_updated is not None:
|
237
|
+
pulumi.set(__self__, "last_updated", last_updated)
|
238
|
+
if path is not None:
|
239
|
+
pulumi.set(__self__, "path", path)
|
240
|
+
if query_forwarding is not None:
|
241
|
+
pulumi.set(__self__, "query_forwarding", query_forwarding)
|
242
|
+
if tags is not None:
|
243
|
+
pulumi.set(__self__, "tags", tags)
|
244
|
+
if target is not None:
|
245
|
+
pulumi.set(__self__, "target", target)
|
246
|
+
|
247
|
+
@property
|
248
|
+
@pulumi.getter(name="certificateId")
|
249
|
+
def certificate_id(self) -> Optional[pulumi.Input[str]]:
|
250
|
+
return pulumi.get(self, "certificate_id")
|
251
|
+
|
252
|
+
@certificate_id.setter
|
253
|
+
def certificate_id(self, value: Optional[pulumi.Input[str]]):
|
254
|
+
pulumi.set(self, "certificate_id", value)
|
255
|
+
|
256
|
+
@property
|
257
|
+
@pulumi.getter
|
258
|
+
def domain(self) -> Optional[pulumi.Input[str]]:
|
259
|
+
"""
|
260
|
+
The domain the redirect refers to.
|
261
|
+
"""
|
262
|
+
return pulumi.get(self, "domain")
|
263
|
+
|
264
|
+
@domain.setter
|
265
|
+
def domain(self, value: Optional[pulumi.Input[str]]):
|
266
|
+
pulumi.set(self, "domain", value)
|
267
|
+
|
268
|
+
@property
|
269
|
+
@pulumi.getter(name="forwardingMode")
|
270
|
+
def forwarding_mode(self) -> Optional[pulumi.Input[str]]:
|
271
|
+
"""
|
272
|
+
How the target is interpreted:
|
273
|
+
* __all__ appends the entire incoming path to the target destination;
|
274
|
+
* __capture__ appends only the part of the incoming path corresponding to the wildcard (*);
|
275
|
+
* __none__ does not append any part of the incoming path.
|
276
|
+
"""
|
277
|
+
return pulumi.get(self, "forwarding_mode")
|
278
|
+
|
279
|
+
@forwarding_mode.setter
|
280
|
+
def forwarding_mode(self, value: Optional[pulumi.Input[str]]):
|
281
|
+
pulumi.set(self, "forwarding_mode", value)
|
282
|
+
|
283
|
+
@property
|
284
|
+
@pulumi.getter(name="forwardingType")
|
285
|
+
def forwarding_type(self) -> Optional[pulumi.Input[str]]:
|
286
|
+
"""
|
287
|
+
How the redirect is executed:
|
288
|
+
* __permanent__ (HTTP 301) indicates to search engines that they should remove the old page from
|
289
|
+
their database and replace it with the new target page (this is recommended for SEO);
|
290
|
+
* __temporary__ (HTTP 302) less common, indicates that search engines should keep the old domain or
|
291
|
+
page indexed as the redirect is only temporary (while both pages might appear in the
|
292
|
+
search results, a temporary redirect suggests to the search engine that it should
|
293
|
+
prefer the new target page);
|
294
|
+
* __masking__ preserves the redirected domain in the browser's address bar (this lets users see the
|
295
|
+
address they entered, even though the displayed content comes from a different web page).
|
296
|
+
"""
|
297
|
+
return pulumi.get(self, "forwarding_type")
|
298
|
+
|
299
|
+
@forwarding_type.setter
|
300
|
+
def forwarding_type(self, value: Optional[pulumi.Input[str]]):
|
301
|
+
pulumi.set(self, "forwarding_type", value)
|
302
|
+
|
303
|
+
@property
|
304
|
+
@pulumi.getter(name="httpsEnabled")
|
305
|
+
def https_enabled(self) -> Optional[pulumi.Input[bool]]:
|
306
|
+
"""
|
307
|
+
True if HTTPS is supported on the source domain by using Let's Encrypt certificates.
|
308
|
+
"""
|
309
|
+
return pulumi.get(self, "https_enabled")
|
310
|
+
|
311
|
+
@https_enabled.setter
|
312
|
+
def https_enabled(self, value: Optional[pulumi.Input[bool]]):
|
313
|
+
pulumi.set(self, "https_enabled", value)
|
314
|
+
|
315
|
+
@property
|
316
|
+
@pulumi.getter(name="httpsForced")
|
317
|
+
def https_forced(self) -> Optional[pulumi.Input[bool]]:
|
318
|
+
"""
|
319
|
+
Forces redirect for users that try to visit HTTP domain to HTTPS instead.
|
320
|
+
"""
|
321
|
+
return pulumi.get(self, "https_forced")
|
322
|
+
|
323
|
+
@https_forced.setter
|
324
|
+
def https_forced(self, value: Optional[pulumi.Input[bool]]):
|
325
|
+
pulumi.set(self, "https_forced", value)
|
326
|
+
|
327
|
+
@property
|
328
|
+
@pulumi.getter(name="lastUpdated")
|
329
|
+
def last_updated(self) -> Optional[pulumi.Input[int]]:
|
330
|
+
"""
|
331
|
+
The Unix timestamp representing when the certificate was last signed.
|
332
|
+
"""
|
333
|
+
return pulumi.get(self, "last_updated")
|
334
|
+
|
335
|
+
@last_updated.setter
|
336
|
+
def last_updated(self, value: Optional[pulumi.Input[int]]):
|
337
|
+
pulumi.set(self, "last_updated", value)
|
338
|
+
|
339
|
+
@property
|
340
|
+
@pulumi.getter
|
341
|
+
def path(self) -> Optional[pulumi.Input[str]]:
|
342
|
+
"""
|
343
|
+
The path on the domain to redirect from.
|
344
|
+
"""
|
345
|
+
return pulumi.get(self, "path")
|
346
|
+
|
347
|
+
@path.setter
|
348
|
+
def path(self, value: Optional[pulumi.Input[str]]):
|
349
|
+
pulumi.set(self, "path", value)
|
350
|
+
|
351
|
+
@property
|
352
|
+
@pulumi.getter(name="queryForwarding")
|
353
|
+
def query_forwarding(self) -> Optional[pulumi.Input[bool]]:
|
354
|
+
"""
|
355
|
+
Enables the query string of a URL to be applied directly to the new target URL.
|
356
|
+
"""
|
357
|
+
return pulumi.get(self, "query_forwarding")
|
358
|
+
|
359
|
+
@query_forwarding.setter
|
360
|
+
def query_forwarding(self, value: Optional[pulumi.Input[bool]]):
|
361
|
+
pulumi.set(self, "query_forwarding", value)
|
362
|
+
|
363
|
+
@property
|
364
|
+
@pulumi.getter
|
365
|
+
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
366
|
+
"""
|
367
|
+
Tags associated with the configuration.
|
368
|
+
"""
|
369
|
+
return pulumi.get(self, "tags")
|
370
|
+
|
371
|
+
@tags.setter
|
372
|
+
def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
373
|
+
pulumi.set(self, "tags", value)
|
374
|
+
|
375
|
+
@property
|
376
|
+
@pulumi.getter
|
377
|
+
def target(self) -> Optional[pulumi.Input[str]]:
|
378
|
+
"""
|
379
|
+
The URL to redirect to.
|
380
|
+
"""
|
381
|
+
return pulumi.get(self, "target")
|
382
|
+
|
383
|
+
@target.setter
|
384
|
+
def target(self, value: Optional[pulumi.Input[str]]):
|
385
|
+
pulumi.set(self, "target", value)
|
386
|
+
|
387
|
+
|
388
|
+
class Redirect(pulumi.CustomResource):
|
389
|
+
@overload
|
390
|
+
def __init__(__self__,
|
391
|
+
resource_name: str,
|
392
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
393
|
+
certificate_id: Optional[pulumi.Input[str]] = None,
|
394
|
+
domain: Optional[pulumi.Input[str]] = None,
|
395
|
+
forwarding_mode: Optional[pulumi.Input[str]] = None,
|
396
|
+
forwarding_type: Optional[pulumi.Input[str]] = None,
|
397
|
+
https_forced: Optional[pulumi.Input[bool]] = None,
|
398
|
+
path: Optional[pulumi.Input[str]] = None,
|
399
|
+
query_forwarding: Optional[pulumi.Input[bool]] = None,
|
400
|
+
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
401
|
+
target: Optional[pulumi.Input[str]] = None,
|
402
|
+
__props__=None):
|
403
|
+
"""
|
404
|
+
Provides a NS1 Redirect resource. This can be used to create, modify, and delete redirects.
|
405
|
+
|
406
|
+
## Example Usage
|
407
|
+
|
408
|
+
```python
|
409
|
+
import pulumi
|
410
|
+
import pulumi_ns1 as ns1
|
411
|
+
|
412
|
+
example = ns1.Redirect("example",
|
413
|
+
domain="www.example.com",
|
414
|
+
path="/from/path",
|
415
|
+
target="https://url.com/target/path")
|
416
|
+
```
|
417
|
+
|
418
|
+
### Additional Examples
|
419
|
+
|
420
|
+
```python
|
421
|
+
import pulumi
|
422
|
+
import pulumi_ns1 as ns1
|
423
|
+
|
424
|
+
example = ns1.RedirectCertificate("example", domain="www.example.com")
|
425
|
+
```
|
426
|
+
|
427
|
+
## NS1 Documentation
|
428
|
+
|
429
|
+
[Redirect Api Doc](https://ns1.com/api#redirect)
|
430
|
+
|
431
|
+
# ns1\\_redirect\\_certificate
|
432
|
+
|
433
|
+
Provides a NS1 Redirect Certificate resource. This can be used to create, modify, and delete redirect certificates.
|
434
|
+
|
435
|
+
## NS1 Documentation
|
436
|
+
|
437
|
+
[Redirect Api Doc](https://ns1.com/api#redirect)
|
438
|
+
|
439
|
+
:param str resource_name: The name of the resource.
|
440
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
441
|
+
:param pulumi.Input[str] domain: The domain the redirect refers to.
|
442
|
+
:param pulumi.Input[str] forwarding_mode: How the target is interpreted:
|
443
|
+
* __all__ appends the entire incoming path to the target destination;
|
444
|
+
* __capture__ appends only the part of the incoming path corresponding to the wildcard (*);
|
445
|
+
* __none__ does not append any part of the incoming path.
|
446
|
+
:param pulumi.Input[str] forwarding_type: How the redirect is executed:
|
447
|
+
* __permanent__ (HTTP 301) indicates to search engines that they should remove the old page from
|
448
|
+
their database and replace it with the new target page (this is recommended for SEO);
|
449
|
+
* __temporary__ (HTTP 302) less common, indicates that search engines should keep the old domain or
|
450
|
+
page indexed as the redirect is only temporary (while both pages might appear in the
|
451
|
+
search results, a temporary redirect suggests to the search engine that it should
|
452
|
+
prefer the new target page);
|
453
|
+
* __masking__ preserves the redirected domain in the browser's address bar (this lets users see the
|
454
|
+
address they entered, even though the displayed content comes from a different web page).
|
455
|
+
:param pulumi.Input[bool] https_forced: Forces redirect for users that try to visit HTTP domain to HTTPS instead.
|
456
|
+
:param pulumi.Input[str] path: The path on the domain to redirect from.
|
457
|
+
:param pulumi.Input[bool] query_forwarding: Enables the query string of a URL to be applied directly to the new target URL.
|
458
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: Tags associated with the configuration.
|
459
|
+
:param pulumi.Input[str] target: The URL to redirect to.
|
460
|
+
"""
|
461
|
+
...
|
462
|
+
@overload
|
463
|
+
def __init__(__self__,
|
464
|
+
resource_name: str,
|
465
|
+
args: RedirectArgs,
|
466
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
467
|
+
"""
|
468
|
+
Provides a NS1 Redirect resource. This can be used to create, modify, and delete redirects.
|
469
|
+
|
470
|
+
## Example Usage
|
471
|
+
|
472
|
+
```python
|
473
|
+
import pulumi
|
474
|
+
import pulumi_ns1 as ns1
|
475
|
+
|
476
|
+
example = ns1.Redirect("example",
|
477
|
+
domain="www.example.com",
|
478
|
+
path="/from/path",
|
479
|
+
target="https://url.com/target/path")
|
480
|
+
```
|
481
|
+
|
482
|
+
### Additional Examples
|
483
|
+
|
484
|
+
```python
|
485
|
+
import pulumi
|
486
|
+
import pulumi_ns1 as ns1
|
487
|
+
|
488
|
+
example = ns1.RedirectCertificate("example", domain="www.example.com")
|
489
|
+
```
|
490
|
+
|
491
|
+
## NS1 Documentation
|
492
|
+
|
493
|
+
[Redirect Api Doc](https://ns1.com/api#redirect)
|
494
|
+
|
495
|
+
# ns1\\_redirect\\_certificate
|
496
|
+
|
497
|
+
Provides a NS1 Redirect Certificate resource. This can be used to create, modify, and delete redirect certificates.
|
498
|
+
|
499
|
+
## NS1 Documentation
|
500
|
+
|
501
|
+
[Redirect Api Doc](https://ns1.com/api#redirect)
|
502
|
+
|
503
|
+
:param str resource_name: The name of the resource.
|
504
|
+
:param RedirectArgs args: The arguments to use to populate this resource's properties.
|
505
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
506
|
+
"""
|
507
|
+
...
|
508
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
509
|
+
resource_args, opts = _utilities.get_resource_args_opts(RedirectArgs, pulumi.ResourceOptions, *args, **kwargs)
|
510
|
+
if resource_args is not None:
|
511
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
512
|
+
else:
|
513
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
514
|
+
|
515
|
+
def _internal_init(__self__,
|
516
|
+
resource_name: str,
|
517
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
518
|
+
certificate_id: Optional[pulumi.Input[str]] = None,
|
519
|
+
domain: Optional[pulumi.Input[str]] = None,
|
520
|
+
forwarding_mode: Optional[pulumi.Input[str]] = None,
|
521
|
+
forwarding_type: Optional[pulumi.Input[str]] = None,
|
522
|
+
https_forced: Optional[pulumi.Input[bool]] = None,
|
523
|
+
path: Optional[pulumi.Input[str]] = None,
|
524
|
+
query_forwarding: Optional[pulumi.Input[bool]] = None,
|
525
|
+
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
526
|
+
target: Optional[pulumi.Input[str]] = None,
|
527
|
+
__props__=None):
|
528
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
529
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
530
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
531
|
+
if opts.id is None:
|
532
|
+
if __props__ is not None:
|
533
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
534
|
+
__props__ = RedirectArgs.__new__(RedirectArgs)
|
535
|
+
|
536
|
+
__props__.__dict__["certificate_id"] = certificate_id
|
537
|
+
if domain is None and not opts.urn:
|
538
|
+
raise TypeError("Missing required property 'domain'")
|
539
|
+
__props__.__dict__["domain"] = domain
|
540
|
+
__props__.__dict__["forwarding_mode"] = forwarding_mode
|
541
|
+
__props__.__dict__["forwarding_type"] = forwarding_type
|
542
|
+
__props__.__dict__["https_forced"] = https_forced
|
543
|
+
if path is None and not opts.urn:
|
544
|
+
raise TypeError("Missing required property 'path'")
|
545
|
+
__props__.__dict__["path"] = path
|
546
|
+
__props__.__dict__["query_forwarding"] = query_forwarding
|
547
|
+
__props__.__dict__["tags"] = tags
|
548
|
+
if target is None and not opts.urn:
|
549
|
+
raise TypeError("Missing required property 'target'")
|
550
|
+
__props__.__dict__["target"] = target
|
551
|
+
__props__.__dict__["https_enabled"] = None
|
552
|
+
__props__.__dict__["last_updated"] = None
|
553
|
+
super(Redirect, __self__).__init__(
|
554
|
+
'ns1:index/redirect:Redirect',
|
555
|
+
resource_name,
|
556
|
+
__props__,
|
557
|
+
opts)
|
558
|
+
|
559
|
+
@staticmethod
|
560
|
+
def get(resource_name: str,
|
561
|
+
id: pulumi.Input[str],
|
562
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
563
|
+
certificate_id: Optional[pulumi.Input[str]] = None,
|
564
|
+
domain: Optional[pulumi.Input[str]] = None,
|
565
|
+
forwarding_mode: Optional[pulumi.Input[str]] = None,
|
566
|
+
forwarding_type: Optional[pulumi.Input[str]] = None,
|
567
|
+
https_enabled: Optional[pulumi.Input[bool]] = None,
|
568
|
+
https_forced: Optional[pulumi.Input[bool]] = None,
|
569
|
+
last_updated: Optional[pulumi.Input[int]] = None,
|
570
|
+
path: Optional[pulumi.Input[str]] = None,
|
571
|
+
query_forwarding: Optional[pulumi.Input[bool]] = None,
|
572
|
+
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
573
|
+
target: Optional[pulumi.Input[str]] = None) -> 'Redirect':
|
574
|
+
"""
|
575
|
+
Get an existing Redirect resource's state with the given name, id, and optional extra
|
576
|
+
properties used to qualify the lookup.
|
577
|
+
|
578
|
+
:param str resource_name: The unique name of the resulting resource.
|
579
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
580
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
581
|
+
:param pulumi.Input[str] domain: The domain the redirect refers to.
|
582
|
+
:param pulumi.Input[str] forwarding_mode: How the target is interpreted:
|
583
|
+
* __all__ appends the entire incoming path to the target destination;
|
584
|
+
* __capture__ appends only the part of the incoming path corresponding to the wildcard (*);
|
585
|
+
* __none__ does not append any part of the incoming path.
|
586
|
+
:param pulumi.Input[str] forwarding_type: How the redirect is executed:
|
587
|
+
* __permanent__ (HTTP 301) indicates to search engines that they should remove the old page from
|
588
|
+
their database and replace it with the new target page (this is recommended for SEO);
|
589
|
+
* __temporary__ (HTTP 302) less common, indicates that search engines should keep the old domain or
|
590
|
+
page indexed as the redirect is only temporary (while both pages might appear in the
|
591
|
+
search results, a temporary redirect suggests to the search engine that it should
|
592
|
+
prefer the new target page);
|
593
|
+
* __masking__ preserves the redirected domain in the browser's address bar (this lets users see the
|
594
|
+
address they entered, even though the displayed content comes from a different web page).
|
595
|
+
:param pulumi.Input[bool] https_enabled: True if HTTPS is supported on the source domain by using Let's Encrypt certificates.
|
596
|
+
:param pulumi.Input[bool] https_forced: Forces redirect for users that try to visit HTTP domain to HTTPS instead.
|
597
|
+
:param pulumi.Input[int] last_updated: The Unix timestamp representing when the certificate was last signed.
|
598
|
+
:param pulumi.Input[str] path: The path on the domain to redirect from.
|
599
|
+
:param pulumi.Input[bool] query_forwarding: Enables the query string of a URL to be applied directly to the new target URL.
|
600
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] tags: Tags associated with the configuration.
|
601
|
+
:param pulumi.Input[str] target: The URL to redirect to.
|
602
|
+
"""
|
603
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
604
|
+
|
605
|
+
__props__ = _RedirectState.__new__(_RedirectState)
|
606
|
+
|
607
|
+
__props__.__dict__["certificate_id"] = certificate_id
|
608
|
+
__props__.__dict__["domain"] = domain
|
609
|
+
__props__.__dict__["forwarding_mode"] = forwarding_mode
|
610
|
+
__props__.__dict__["forwarding_type"] = forwarding_type
|
611
|
+
__props__.__dict__["https_enabled"] = https_enabled
|
612
|
+
__props__.__dict__["https_forced"] = https_forced
|
613
|
+
__props__.__dict__["last_updated"] = last_updated
|
614
|
+
__props__.__dict__["path"] = path
|
615
|
+
__props__.__dict__["query_forwarding"] = query_forwarding
|
616
|
+
__props__.__dict__["tags"] = tags
|
617
|
+
__props__.__dict__["target"] = target
|
618
|
+
return Redirect(resource_name, opts=opts, __props__=__props__)
|
619
|
+
|
620
|
+
@property
|
621
|
+
@pulumi.getter(name="certificateId")
|
622
|
+
def certificate_id(self) -> pulumi.Output[str]:
|
623
|
+
return pulumi.get(self, "certificate_id")
|
624
|
+
|
625
|
+
@property
|
626
|
+
@pulumi.getter
|
627
|
+
def domain(self) -> pulumi.Output[str]:
|
628
|
+
"""
|
629
|
+
The domain the redirect refers to.
|
630
|
+
"""
|
631
|
+
return pulumi.get(self, "domain")
|
632
|
+
|
633
|
+
@property
|
634
|
+
@pulumi.getter(name="forwardingMode")
|
635
|
+
def forwarding_mode(self) -> pulumi.Output[Optional[str]]:
|
636
|
+
"""
|
637
|
+
How the target is interpreted:
|
638
|
+
* __all__ appends the entire incoming path to the target destination;
|
639
|
+
* __capture__ appends only the part of the incoming path corresponding to the wildcard (*);
|
640
|
+
* __none__ does not append any part of the incoming path.
|
641
|
+
"""
|
642
|
+
return pulumi.get(self, "forwarding_mode")
|
643
|
+
|
644
|
+
@property
|
645
|
+
@pulumi.getter(name="forwardingType")
|
646
|
+
def forwarding_type(self) -> pulumi.Output[Optional[str]]:
|
647
|
+
"""
|
648
|
+
How the redirect is executed:
|
649
|
+
* __permanent__ (HTTP 301) indicates to search engines that they should remove the old page from
|
650
|
+
their database and replace it with the new target page (this is recommended for SEO);
|
651
|
+
* __temporary__ (HTTP 302) less common, indicates that search engines should keep the old domain or
|
652
|
+
page indexed as the redirect is only temporary (while both pages might appear in the
|
653
|
+
search results, a temporary redirect suggests to the search engine that it should
|
654
|
+
prefer the new target page);
|
655
|
+
* __masking__ preserves the redirected domain in the browser's address bar (this lets users see the
|
656
|
+
address they entered, even though the displayed content comes from a different web page).
|
657
|
+
"""
|
658
|
+
return pulumi.get(self, "forwarding_type")
|
659
|
+
|
660
|
+
@property
|
661
|
+
@pulumi.getter(name="httpsEnabled")
|
662
|
+
def https_enabled(self) -> pulumi.Output[bool]:
|
663
|
+
"""
|
664
|
+
True if HTTPS is supported on the source domain by using Let's Encrypt certificates.
|
665
|
+
"""
|
666
|
+
return pulumi.get(self, "https_enabled")
|
667
|
+
|
668
|
+
@property
|
669
|
+
@pulumi.getter(name="httpsForced")
|
670
|
+
def https_forced(self) -> pulumi.Output[bool]:
|
671
|
+
"""
|
672
|
+
Forces redirect for users that try to visit HTTP domain to HTTPS instead.
|
673
|
+
"""
|
674
|
+
return pulumi.get(self, "https_forced")
|
675
|
+
|
676
|
+
@property
|
677
|
+
@pulumi.getter(name="lastUpdated")
|
678
|
+
def last_updated(self) -> pulumi.Output[int]:
|
679
|
+
"""
|
680
|
+
The Unix timestamp representing when the certificate was last signed.
|
681
|
+
"""
|
682
|
+
return pulumi.get(self, "last_updated")
|
683
|
+
|
684
|
+
@property
|
685
|
+
@pulumi.getter
|
686
|
+
def path(self) -> pulumi.Output[str]:
|
687
|
+
"""
|
688
|
+
The path on the domain to redirect from.
|
689
|
+
"""
|
690
|
+
return pulumi.get(self, "path")
|
691
|
+
|
692
|
+
@property
|
693
|
+
@pulumi.getter(name="queryForwarding")
|
694
|
+
def query_forwarding(self) -> pulumi.Output[Optional[bool]]:
|
695
|
+
"""
|
696
|
+
Enables the query string of a URL to be applied directly to the new target URL.
|
697
|
+
"""
|
698
|
+
return pulumi.get(self, "query_forwarding")
|
699
|
+
|
700
|
+
@property
|
701
|
+
@pulumi.getter
|
702
|
+
def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
703
|
+
"""
|
704
|
+
Tags associated with the configuration.
|
705
|
+
"""
|
706
|
+
return pulumi.get(self, "tags")
|
707
|
+
|
708
|
+
@property
|
709
|
+
@pulumi.getter
|
710
|
+
def target(self) -> pulumi.Output[str]:
|
711
|
+
"""
|
712
|
+
The URL to redirect to.
|
713
|
+
"""
|
714
|
+
return pulumi.get(self, "target")
|
715
|
+
|