pulumi-dnsimple 3.5.0a1721425071__py3-none-any.whl → 4.0.0a1721432730__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.

Potentially problematic release.


This version of pulumi-dnsimple might be problematic. Click here for more details.

@@ -0,0 +1,427 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import pulumi
8
+ import pulumi.runtime
9
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
10
+ from . import _utilities
11
+
12
+ __all__ = ['ZoneArgs', 'Zone']
13
+
14
+ @pulumi.input_type
15
+ class ZoneArgs:
16
+ def __init__(__self__, *,
17
+ name: pulumi.Input[str],
18
+ active: Optional[pulumi.Input[bool]] = None):
19
+ """
20
+ The set of arguments for constructing a Zone resource.
21
+ :param pulumi.Input[str] name: The zone name
22
+
23
+ # Attributes Reference
24
+ :param pulumi.Input[bool] active: Whether the zone is active.
25
+ """
26
+ pulumi.set(__self__, "name", name)
27
+ if active is not None:
28
+ pulumi.set(__self__, "active", active)
29
+
30
+ @property
31
+ @pulumi.getter
32
+ def name(self) -> pulumi.Input[str]:
33
+ """
34
+ The zone name
35
+
36
+ # Attributes Reference
37
+ """
38
+ return pulumi.get(self, "name")
39
+
40
+ @name.setter
41
+ def name(self, value: pulumi.Input[str]):
42
+ pulumi.set(self, "name", value)
43
+
44
+ @property
45
+ @pulumi.getter
46
+ def active(self) -> Optional[pulumi.Input[bool]]:
47
+ """
48
+ Whether the zone is active.
49
+ """
50
+ return pulumi.get(self, "active")
51
+
52
+ @active.setter
53
+ def active(self, value: Optional[pulumi.Input[bool]]):
54
+ pulumi.set(self, "active", value)
55
+
56
+
57
+ @pulumi.input_type
58
+ class _ZoneState:
59
+ def __init__(__self__, *,
60
+ account_id: Optional[pulumi.Input[int]] = None,
61
+ active: Optional[pulumi.Input[bool]] = None,
62
+ last_transferred_at: Optional[pulumi.Input[str]] = None,
63
+ name: Optional[pulumi.Input[str]] = None,
64
+ reverse: Optional[pulumi.Input[bool]] = None,
65
+ secondary: Optional[pulumi.Input[bool]] = None):
66
+ """
67
+ Input properties used for looking up and filtering Zone resources.
68
+ :param pulumi.Input[int] account_id: The account ID for the zone.
69
+ :param pulumi.Input[bool] active: Whether the zone is active.
70
+ :param pulumi.Input[str] last_transferred_at: The last time the zone was transferred only applicable for **secondary** zones.
71
+ :param pulumi.Input[str] name: The zone name
72
+
73
+ # Attributes Reference
74
+ :param pulumi.Input[bool] reverse: Whether the zone is a reverse zone.
75
+ :param pulumi.Input[bool] secondary: Whether the zone is a secondary zone.
76
+ """
77
+ if account_id is not None:
78
+ pulumi.set(__self__, "account_id", account_id)
79
+ if active is not None:
80
+ pulumi.set(__self__, "active", active)
81
+ if last_transferred_at is not None:
82
+ pulumi.set(__self__, "last_transferred_at", last_transferred_at)
83
+ if name is not None:
84
+ pulumi.set(__self__, "name", name)
85
+ if reverse is not None:
86
+ pulumi.set(__self__, "reverse", reverse)
87
+ if secondary is not None:
88
+ pulumi.set(__self__, "secondary", secondary)
89
+
90
+ @property
91
+ @pulumi.getter(name="accountId")
92
+ def account_id(self) -> Optional[pulumi.Input[int]]:
93
+ """
94
+ The account ID for the zone.
95
+ """
96
+ return pulumi.get(self, "account_id")
97
+
98
+ @account_id.setter
99
+ def account_id(self, value: Optional[pulumi.Input[int]]):
100
+ pulumi.set(self, "account_id", value)
101
+
102
+ @property
103
+ @pulumi.getter
104
+ def active(self) -> Optional[pulumi.Input[bool]]:
105
+ """
106
+ Whether the zone is active.
107
+ """
108
+ return pulumi.get(self, "active")
109
+
110
+ @active.setter
111
+ def active(self, value: Optional[pulumi.Input[bool]]):
112
+ pulumi.set(self, "active", value)
113
+
114
+ @property
115
+ @pulumi.getter(name="lastTransferredAt")
116
+ def last_transferred_at(self) -> Optional[pulumi.Input[str]]:
117
+ """
118
+ The last time the zone was transferred only applicable for **secondary** zones.
119
+ """
120
+ return pulumi.get(self, "last_transferred_at")
121
+
122
+ @last_transferred_at.setter
123
+ def last_transferred_at(self, value: Optional[pulumi.Input[str]]):
124
+ pulumi.set(self, "last_transferred_at", value)
125
+
126
+ @property
127
+ @pulumi.getter
128
+ def name(self) -> Optional[pulumi.Input[str]]:
129
+ """
130
+ The zone name
131
+
132
+ # Attributes Reference
133
+ """
134
+ return pulumi.get(self, "name")
135
+
136
+ @name.setter
137
+ def name(self, value: Optional[pulumi.Input[str]]):
138
+ pulumi.set(self, "name", value)
139
+
140
+ @property
141
+ @pulumi.getter
142
+ def reverse(self) -> Optional[pulumi.Input[bool]]:
143
+ """
144
+ Whether the zone is a reverse zone.
145
+ """
146
+ return pulumi.get(self, "reverse")
147
+
148
+ @reverse.setter
149
+ def reverse(self, value: Optional[pulumi.Input[bool]]):
150
+ pulumi.set(self, "reverse", value)
151
+
152
+ @property
153
+ @pulumi.getter
154
+ def secondary(self) -> Optional[pulumi.Input[bool]]:
155
+ """
156
+ Whether the zone is a secondary zone.
157
+ """
158
+ return pulumi.get(self, "secondary")
159
+
160
+ @secondary.setter
161
+ def secondary(self, value: Optional[pulumi.Input[bool]]):
162
+ pulumi.set(self, "secondary", value)
163
+
164
+
165
+ class Zone(pulumi.CustomResource):
166
+ @overload
167
+ def __init__(__self__,
168
+ resource_name: str,
169
+ opts: Optional[pulumi.ResourceOptions] = None,
170
+ active: Optional[pulumi.Input[bool]] = None,
171
+ name: Optional[pulumi.Input[str]] = None,
172
+ __props__=None):
173
+ """
174
+ Provides a DNSimple zone resource.
175
+
176
+ > Currently the resource creation acts as an import, so the zone must already exist in DNSimple. The only attribute that will be modified during resource creation is the `active` state of the zone. This is because our API does not allow for the creation of zones. Creation of zones happens through the purchase or creation of domains. We expect this behavior to change in the future.
177
+
178
+ ## Example Usage
179
+
180
+ ```python
181
+ import pulumi
182
+ import pulumi_dnsimple as dnsimple
183
+
184
+ # Create a zone
185
+ foobar = dnsimple.Zone("foobar", name=dnsimple["zone"])
186
+ ```
187
+
188
+ ## Import
189
+
190
+ DNSimple zones can be imported using their numeric record ID or the zone name.
191
+
192
+ bash
193
+
194
+ ```sh
195
+ $ pulumi import dnsimple:index/zone:Zone resource_name foo.com
196
+ ```
197
+
198
+ The zone ID can be found within [DNSimple Zones API](https://developer.dnsimple.com/v2/zones/#getZone). Check out [Authentication](https://developer.dnsimple.com/v2/#authentication) in API Overview for available options.
199
+
200
+ bash
201
+
202
+ curl -H 'Authorization: Bearer <ACCESS_TOKEN>' https://api.dnsimple.com/v2/1234/zones/example.com | jq
203
+
204
+ {
205
+
206
+ "data": {
207
+
208
+ "id": 1,
209
+
210
+ "account_id": 1234,
211
+
212
+ "name": "example.com",
213
+
214
+ "reverse": false,
215
+
216
+ "secondary": false,
217
+
218
+ "last_transferred_at": null,
219
+
220
+ "active": true,
221
+
222
+ "created_at": "2023-04-18T04:58:01Z",
223
+
224
+ "updated_at": "2024-01-16T15:53:18Z"
225
+
226
+ }
227
+
228
+ }
229
+
230
+ :param str resource_name: The name of the resource.
231
+ :param pulumi.ResourceOptions opts: Options for the resource.
232
+ :param pulumi.Input[bool] active: Whether the zone is active.
233
+ :param pulumi.Input[str] name: The zone name
234
+
235
+ # Attributes Reference
236
+ """
237
+ ...
238
+ @overload
239
+ def __init__(__self__,
240
+ resource_name: str,
241
+ args: ZoneArgs,
242
+ opts: Optional[pulumi.ResourceOptions] = None):
243
+ """
244
+ Provides a DNSimple zone resource.
245
+
246
+ > Currently the resource creation acts as an import, so the zone must already exist in DNSimple. The only attribute that will be modified during resource creation is the `active` state of the zone. This is because our API does not allow for the creation of zones. Creation of zones happens through the purchase or creation of domains. We expect this behavior to change in the future.
247
+
248
+ ## Example Usage
249
+
250
+ ```python
251
+ import pulumi
252
+ import pulumi_dnsimple as dnsimple
253
+
254
+ # Create a zone
255
+ foobar = dnsimple.Zone("foobar", name=dnsimple["zone"])
256
+ ```
257
+
258
+ ## Import
259
+
260
+ DNSimple zones can be imported using their numeric record ID or the zone name.
261
+
262
+ bash
263
+
264
+ ```sh
265
+ $ pulumi import dnsimple:index/zone:Zone resource_name foo.com
266
+ ```
267
+
268
+ The zone ID can be found within [DNSimple Zones API](https://developer.dnsimple.com/v2/zones/#getZone). Check out [Authentication](https://developer.dnsimple.com/v2/#authentication) in API Overview for available options.
269
+
270
+ bash
271
+
272
+ curl -H 'Authorization: Bearer <ACCESS_TOKEN>' https://api.dnsimple.com/v2/1234/zones/example.com | jq
273
+
274
+ {
275
+
276
+ "data": {
277
+
278
+ "id": 1,
279
+
280
+ "account_id": 1234,
281
+
282
+ "name": "example.com",
283
+
284
+ "reverse": false,
285
+
286
+ "secondary": false,
287
+
288
+ "last_transferred_at": null,
289
+
290
+ "active": true,
291
+
292
+ "created_at": "2023-04-18T04:58:01Z",
293
+
294
+ "updated_at": "2024-01-16T15:53:18Z"
295
+
296
+ }
297
+
298
+ }
299
+
300
+ :param str resource_name: The name of the resource.
301
+ :param ZoneArgs args: The arguments to use to populate this resource's properties.
302
+ :param pulumi.ResourceOptions opts: Options for the resource.
303
+ """
304
+ ...
305
+ def __init__(__self__, resource_name: str, *args, **kwargs):
306
+ resource_args, opts = _utilities.get_resource_args_opts(ZoneArgs, pulumi.ResourceOptions, *args, **kwargs)
307
+ if resource_args is not None:
308
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
309
+ else:
310
+ __self__._internal_init(resource_name, *args, **kwargs)
311
+
312
+ def _internal_init(__self__,
313
+ resource_name: str,
314
+ opts: Optional[pulumi.ResourceOptions] = None,
315
+ active: Optional[pulumi.Input[bool]] = None,
316
+ name: Optional[pulumi.Input[str]] = None,
317
+ __props__=None):
318
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
319
+ if not isinstance(opts, pulumi.ResourceOptions):
320
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
321
+ if opts.id is None:
322
+ if __props__ is not None:
323
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
324
+ __props__ = ZoneArgs.__new__(ZoneArgs)
325
+
326
+ __props__.__dict__["active"] = active
327
+ if name is None and not opts.urn:
328
+ raise TypeError("Missing required property 'name'")
329
+ __props__.__dict__["name"] = name
330
+ __props__.__dict__["account_id"] = None
331
+ __props__.__dict__["last_transferred_at"] = None
332
+ __props__.__dict__["reverse"] = None
333
+ __props__.__dict__["secondary"] = None
334
+ super(Zone, __self__).__init__(
335
+ 'dnsimple:index/zone:Zone',
336
+ resource_name,
337
+ __props__,
338
+ opts)
339
+
340
+ @staticmethod
341
+ def get(resource_name: str,
342
+ id: pulumi.Input[str],
343
+ opts: Optional[pulumi.ResourceOptions] = None,
344
+ account_id: Optional[pulumi.Input[int]] = None,
345
+ active: Optional[pulumi.Input[bool]] = None,
346
+ last_transferred_at: Optional[pulumi.Input[str]] = None,
347
+ name: Optional[pulumi.Input[str]] = None,
348
+ reverse: Optional[pulumi.Input[bool]] = None,
349
+ secondary: Optional[pulumi.Input[bool]] = None) -> 'Zone':
350
+ """
351
+ Get an existing Zone resource's state with the given name, id, and optional extra
352
+ properties used to qualify the lookup.
353
+
354
+ :param str resource_name: The unique name of the resulting resource.
355
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
356
+ :param pulumi.ResourceOptions opts: Options for the resource.
357
+ :param pulumi.Input[int] account_id: The account ID for the zone.
358
+ :param pulumi.Input[bool] active: Whether the zone is active.
359
+ :param pulumi.Input[str] last_transferred_at: The last time the zone was transferred only applicable for **secondary** zones.
360
+ :param pulumi.Input[str] name: The zone name
361
+
362
+ # Attributes Reference
363
+ :param pulumi.Input[bool] reverse: Whether the zone is a reverse zone.
364
+ :param pulumi.Input[bool] secondary: Whether the zone is a secondary zone.
365
+ """
366
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
367
+
368
+ __props__ = _ZoneState.__new__(_ZoneState)
369
+
370
+ __props__.__dict__["account_id"] = account_id
371
+ __props__.__dict__["active"] = active
372
+ __props__.__dict__["last_transferred_at"] = last_transferred_at
373
+ __props__.__dict__["name"] = name
374
+ __props__.__dict__["reverse"] = reverse
375
+ __props__.__dict__["secondary"] = secondary
376
+ return Zone(resource_name, opts=opts, __props__=__props__)
377
+
378
+ @property
379
+ @pulumi.getter(name="accountId")
380
+ def account_id(self) -> pulumi.Output[int]:
381
+ """
382
+ The account ID for the zone.
383
+ """
384
+ return pulumi.get(self, "account_id")
385
+
386
+ @property
387
+ @pulumi.getter
388
+ def active(self) -> pulumi.Output[bool]:
389
+ """
390
+ Whether the zone is active.
391
+ """
392
+ return pulumi.get(self, "active")
393
+
394
+ @property
395
+ @pulumi.getter(name="lastTransferredAt")
396
+ def last_transferred_at(self) -> pulumi.Output[str]:
397
+ """
398
+ The last time the zone was transferred only applicable for **secondary** zones.
399
+ """
400
+ return pulumi.get(self, "last_transferred_at")
401
+
402
+ @property
403
+ @pulumi.getter
404
+ def name(self) -> pulumi.Output[str]:
405
+ """
406
+ The zone name
407
+
408
+ # Attributes Reference
409
+ """
410
+ return pulumi.get(self, "name")
411
+
412
+ @property
413
+ @pulumi.getter
414
+ def reverse(self) -> pulumi.Output[bool]:
415
+ """
416
+ Whether the zone is a reverse zone.
417
+ """
418
+ return pulumi.get(self, "reverse")
419
+
420
+ @property
421
+ @pulumi.getter
422
+ def secondary(self) -> pulumi.Output[bool]:
423
+ """
424
+ Whether the zone is a secondary zone.
425
+ """
426
+ return pulumi.get(self, "secondary")
427
+