pulumi-digitalocean 4.27.0a1710332933__py3-none-any.whl → 4.39.0a1736833057__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-digitalocean might be problematic. Click here for more details.

Files changed (107) hide show
  1. pulumi_digitalocean/__init__.py +75 -0
  2. pulumi_digitalocean/_enums.py +131 -52
  3. pulumi_digitalocean/_inputs.py +5767 -399
  4. pulumi_digitalocean/_utilities.py +41 -5
  5. pulumi_digitalocean/app.py +199 -67
  6. pulumi_digitalocean/cdn.py +20 -23
  7. pulumi_digitalocean/certificate.py +45 -42
  8. pulumi_digitalocean/config/__init__.pyi +5 -0
  9. pulumi_digitalocean/config/vars.py +5 -0
  10. pulumi_digitalocean/container_registry.py +11 -6
  11. pulumi_digitalocean/container_registry_docker_credentials.py +53 -12
  12. pulumi_digitalocean/custom_image.py +13 -8
  13. pulumi_digitalocean/database_cluster.py +298 -120
  14. pulumi_digitalocean/database_connection_pool.py +15 -10
  15. pulumi_digitalocean/database_db.py +19 -12
  16. pulumi_digitalocean/database_firewall.py +78 -75
  17. pulumi_digitalocean/database_kafka_config.py +1040 -0
  18. pulumi_digitalocean/database_kafka_topic.py +66 -61
  19. pulumi_digitalocean/database_mongodb_config.py +452 -0
  20. pulumi_digitalocean/database_mysql_config.py +15 -12
  21. pulumi_digitalocean/database_opensearch_config.py +2069 -0
  22. pulumi_digitalocean/database_postgresql_config.py +2614 -0
  23. pulumi_digitalocean/database_redis_config.py +29 -12
  24. pulumi_digitalocean/database_replica.py +29 -24
  25. pulumi_digitalocean/database_user.py +90 -75
  26. pulumi_digitalocean/dns_record.py +13 -8
  27. pulumi_digitalocean/domain.py +7 -6
  28. pulumi_digitalocean/droplet.py +89 -31
  29. pulumi_digitalocean/droplet_autoscale.py +474 -0
  30. pulumi_digitalocean/droplet_snapshot.py +23 -14
  31. pulumi_digitalocean/firewall.py +118 -106
  32. pulumi_digitalocean/floating_ip.py +19 -16
  33. pulumi_digitalocean/floating_ip_assignment.py +19 -16
  34. pulumi_digitalocean/get_account.py +18 -9
  35. pulumi_digitalocean/get_app.py +57 -10
  36. pulumi_digitalocean/get_certificate.py +19 -9
  37. pulumi_digitalocean/get_container_registry.py +19 -9
  38. pulumi_digitalocean/get_database_ca.py +14 -9
  39. pulumi_digitalocean/get_database_cluster.py +119 -11
  40. pulumi_digitalocean/get_database_connection_pool.py +25 -9
  41. pulumi_digitalocean/get_database_replica.py +29 -9
  42. pulumi_digitalocean/get_database_user.py +21 -9
  43. pulumi_digitalocean/get_domain.py +16 -9
  44. pulumi_digitalocean/get_domains.py +34 -27
  45. pulumi_digitalocean/get_droplet.py +66 -23
  46. pulumi_digitalocean/get_droplet_autoscale.py +197 -0
  47. pulumi_digitalocean/get_droplet_snapshot.py +36 -23
  48. pulumi_digitalocean/get_droplets.py +80 -54
  49. pulumi_digitalocean/get_firewall.py +29 -13
  50. pulumi_digitalocean/get_floating_ip.py +16 -9
  51. pulumi_digitalocean/get_image.py +42 -27
  52. pulumi_digitalocean/get_images.py +56 -53
  53. pulumi_digitalocean/get_kubernetes_cluster.py +53 -6
  54. pulumi_digitalocean/get_kubernetes_versions.py +43 -41
  55. pulumi_digitalocean/get_load_balancer.py +81 -17
  56. pulumi_digitalocean/get_project.py +23 -9
  57. pulumi_digitalocean/get_projects.py +56 -53
  58. pulumi_digitalocean/get_record.py +23 -9
  59. pulumi_digitalocean/get_records.py +62 -13
  60. pulumi_digitalocean/get_region.py +17 -9
  61. pulumi_digitalocean/get_regions.py +56 -53
  62. pulumi_digitalocean/get_reserved_ip.py +16 -9
  63. pulumi_digitalocean/get_reserved_ipv6.py +118 -0
  64. pulumi_digitalocean/get_sizes.py +24 -13
  65. pulumi_digitalocean/get_spaces_bucket.py +18 -9
  66. pulumi_digitalocean/get_spaces_bucket_object.py +41 -14
  67. pulumi_digitalocean/get_spaces_bucket_objects.py +26 -5
  68. pulumi_digitalocean/get_spaces_buckets.py +48 -45
  69. pulumi_digitalocean/get_ssh_key.py +27 -19
  70. pulumi_digitalocean/get_ssh_keys.py +40 -37
  71. pulumi_digitalocean/get_tag.py +31 -19
  72. pulumi_digitalocean/get_tags.py +32 -25
  73. pulumi_digitalocean/get_volume.py +35 -23
  74. pulumi_digitalocean/get_volume_snapshot.py +35 -21
  75. pulumi_digitalocean/get_vpc.py +33 -23
  76. pulumi_digitalocean/get_vpc_peering.py +244 -0
  77. pulumi_digitalocean/kubernetes_cluster.py +86 -35
  78. pulumi_digitalocean/kubernetes_node_pool.py +46 -43
  79. pulumi_digitalocean/load_balancer.py +320 -157
  80. pulumi_digitalocean/monitor_alert.py +17 -12
  81. pulumi_digitalocean/outputs.py +3419 -344
  82. pulumi_digitalocean/project.py +19 -16
  83. pulumi_digitalocean/project_resources.py +11 -8
  84. pulumi_digitalocean/provider.py +5 -0
  85. pulumi_digitalocean/pulumi-plugin.json +2 -1
  86. pulumi_digitalocean/reserved_ip.py +19 -16
  87. pulumi_digitalocean/reserved_ip_assignment.py +19 -16
  88. pulumi_digitalocean/reserved_ipv6.py +232 -0
  89. pulumi_digitalocean/reserved_ipv6_assignment.py +171 -0
  90. pulumi_digitalocean/spaces_bucket.py +70 -79
  91. pulumi_digitalocean/spaces_bucket_cors_configuration.py +30 -25
  92. pulumi_digitalocean/spaces_bucket_object.py +11 -12
  93. pulumi_digitalocean/spaces_bucket_policy.py +21 -16
  94. pulumi_digitalocean/ssh_key.py +19 -10
  95. pulumi_digitalocean/tag.py +13 -10
  96. pulumi_digitalocean/uptime_alert.py +10 -5
  97. pulumi_digitalocean/uptime_check.py +5 -0
  98. pulumi_digitalocean/volume.py +47 -50
  99. pulumi_digitalocean/volume_attachment.py +25 -20
  100. pulumi_digitalocean/volume_snapshot.py +17 -10
  101. pulumi_digitalocean/vpc.py +27 -22
  102. pulumi_digitalocean/vpc_peering.py +378 -0
  103. {pulumi_digitalocean-4.27.0a1710332933.dist-info → pulumi_digitalocean-4.39.0a1736833057.dist-info}/METADATA +7 -6
  104. pulumi_digitalocean-4.39.0a1736833057.dist-info/RECORD +108 -0
  105. {pulumi_digitalocean-4.27.0a1710332933.dist-info → pulumi_digitalocean-4.39.0a1736833057.dist-info}/WHEEL +1 -1
  106. pulumi_digitalocean-4.27.0a1710332933.dist-info/RECORD +0 -97
  107. {pulumi_digitalocean-4.27.0a1710332933.dist-info → pulumi_digitalocean-4.39.0a1736833057.dist-info}/top_level.txt +0 -0
@@ -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 ._enums import *
12
17
 
@@ -33,7 +38,7 @@ class VolumeArgs:
33
38
  :param pulumi.Input[str] initial_filesystem_label: Initial filesystem label for the block storage volume.
34
39
  :param pulumi.Input[Union[str, 'FileSystemType']] initial_filesystem_type: Initial filesystem type (`xfs` or `ext4`) for the block storage volume.
35
40
  :param pulumi.Input[str] name: A name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter.
36
- :param pulumi.Input[str] snapshot_id: The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot
41
+ :param pulumi.Input[str] snapshot_id: The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limited on creation to that of the referenced snapshot
37
42
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A list of the tags to be applied to this Volume.
38
43
  """
39
44
  pulumi.set(__self__, "region", region)
@@ -94,13 +99,11 @@ class VolumeArgs:
94
99
 
95
100
  @property
96
101
  @pulumi.getter(name="filesystemType")
102
+ @_utilities.deprecated("""This fields functionality has been replaced by `initial_filesystem_type`. The property will still remain as a computed attribute representing the current volumes filesystem type.""")
97
103
  def filesystem_type(self) -> Optional[pulumi.Input[str]]:
98
104
  """
99
105
  Filesystem type (`xfs` or `ext4`) for the block storage volume.
100
106
  """
101
- warnings.warn("""This fields functionality has been replaced by `initial_filesystem_type`. The property will still remain as a computed attribute representing the current volumes filesystem type.""", DeprecationWarning)
102
- pulumi.log.warn("""filesystem_type is deprecated: This fields functionality has been replaced by `initial_filesystem_type`. The property will still remain as a computed attribute representing the current volumes filesystem type.""")
103
-
104
107
  return pulumi.get(self, "filesystem_type")
105
108
 
106
109
  @filesystem_type.setter
@@ -147,7 +150,7 @@ class VolumeArgs:
147
150
  @pulumi.getter(name="snapshotId")
148
151
  def snapshot_id(self) -> Optional[pulumi.Input[str]]:
149
152
  """
150
- The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot
153
+ The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limited on creation to that of the referenced snapshot
151
154
  """
152
155
  return pulumi.get(self, "snapshot_id")
153
156
 
@@ -194,7 +197,7 @@ class _VolumeState:
194
197
  :param pulumi.Input[str] name: A name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter.
195
198
  :param pulumi.Input[Union[str, 'Region']] region: The region that the block storage volume will be created in.
196
199
  :param pulumi.Input[int] size: The size of the block storage volume in GiB. If updated, can only be expanded.
197
- :param pulumi.Input[str] snapshot_id: The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot
200
+ :param pulumi.Input[str] snapshot_id: The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limited on creation to that of the referenced snapshot
198
201
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A list of the tags to be applied to this Volume.
199
202
  :param pulumi.Input[str] volume_urn: The uniform resource name for the volume.
200
203
  """
@@ -264,13 +267,11 @@ class _VolumeState:
264
267
 
265
268
  @property
266
269
  @pulumi.getter(name="filesystemType")
270
+ @_utilities.deprecated("""This fields functionality has been replaced by `initial_filesystem_type`. The property will still remain as a computed attribute representing the current volumes filesystem type.""")
267
271
  def filesystem_type(self) -> Optional[pulumi.Input[str]]:
268
272
  """
269
273
  Filesystem type (`xfs` or `ext4`) for the block storage volume.
270
274
  """
271
- warnings.warn("""This fields functionality has been replaced by `initial_filesystem_type`. The property will still remain as a computed attribute representing the current volumes filesystem type.""", DeprecationWarning)
272
- pulumi.log.warn("""filesystem_type is deprecated: This fields functionality has been replaced by `initial_filesystem_type`. The property will still remain as a computed attribute representing the current volumes filesystem type.""")
273
-
274
275
  return pulumi.get(self, "filesystem_type")
275
276
 
276
277
  @filesystem_type.setter
@@ -341,7 +342,7 @@ class _VolumeState:
341
342
  @pulumi.getter(name="snapshotId")
342
343
  def snapshot_id(self) -> Optional[pulumi.Input[str]]:
343
344
  """
344
- The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot
345
+ The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limited on creation to that of the referenced snapshot
345
346
  """
346
347
  return pulumi.get(self, "snapshot_id")
347
348
 
@@ -394,40 +395,39 @@ class Volume(pulumi.CustomResource):
394
395
 
395
396
  ## Example Usage
396
397
 
397
- <!--Start PulumiCodeChooser -->
398
398
  ```python
399
399
  import pulumi
400
400
  import pulumi_digitalocean as digitalocean
401
401
 
402
- foobar_volume = digitalocean.Volume("foobarVolume",
403
- region="nyc1",
402
+ foobar = digitalocean.Volume("foobar",
403
+ region=digitalocean.Region.NYC1,
404
+ name="baz",
404
405
  size=100,
405
- initial_filesystem_type="ext4",
406
+ initial_filesystem_type=digitalocean.FileSystemType.EXT4,
406
407
  description="an example volume")
407
- foobar_droplet = digitalocean.Droplet("foobarDroplet",
408
- size="s-1vcpu-1gb",
408
+ foobar_droplet = digitalocean.Droplet("foobar",
409
+ name="baz",
410
+ size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,
409
411
  image="ubuntu-18-04-x64",
410
- region="nyc1")
411
- foobar_volume_attachment = digitalocean.VolumeAttachment("foobarVolumeAttachment",
412
+ region=digitalocean.Region.NYC1)
413
+ foobar_volume_attachment = digitalocean.VolumeAttachment("foobar",
412
414
  droplet_id=foobar_droplet.id,
413
- volume_id=foobar_volume.id)
415
+ volume_id=foobar.id)
414
416
  ```
415
- <!--End PulumiCodeChooser -->
416
417
 
417
418
  You can also create a volume from an existing snapshot.
418
419
 
419
- <!--Start PulumiCodeChooser -->
420
420
  ```python
421
421
  import pulumi
422
422
  import pulumi_digitalocean as digitalocean
423
423
 
424
- foobar_volume_snapshot = digitalocean.get_volume_snapshot(name="baz")
425
- foobar_volume = digitalocean.Volume("foobarVolume",
426
- region="lon1",
427
- size=foobar_volume_snapshot.min_disk_size,
428
- snapshot_id=foobar_volume_snapshot.id)
424
+ foobar = digitalocean.get_volume_snapshot(name="baz")
425
+ foobar_volume = digitalocean.Volume("foobar",
426
+ region=digitalocean.Region.LON1,
427
+ name="foo",
428
+ size=foobar.min_disk_size,
429
+ snapshot_id=foobar.id)
429
430
  ```
430
- <!--End PulumiCodeChooser -->
431
431
 
432
432
  ## Import
433
433
 
@@ -446,7 +446,7 @@ class Volume(pulumi.CustomResource):
446
446
  :param pulumi.Input[str] name: A name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter.
447
447
  :param pulumi.Input[Union[str, 'Region']] region: The region that the block storage volume will be created in.
448
448
  :param pulumi.Input[int] size: The size of the block storage volume in GiB. If updated, can only be expanded.
449
- :param pulumi.Input[str] snapshot_id: The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot
449
+ :param pulumi.Input[str] snapshot_id: The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limited on creation to that of the referenced snapshot
450
450
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A list of the tags to be applied to this Volume.
451
451
  """
452
452
  ...
@@ -460,40 +460,39 @@ class Volume(pulumi.CustomResource):
460
460
 
461
461
  ## Example Usage
462
462
 
463
- <!--Start PulumiCodeChooser -->
464
463
  ```python
465
464
  import pulumi
466
465
  import pulumi_digitalocean as digitalocean
467
466
 
468
- foobar_volume = digitalocean.Volume("foobarVolume",
469
- region="nyc1",
467
+ foobar = digitalocean.Volume("foobar",
468
+ region=digitalocean.Region.NYC1,
469
+ name="baz",
470
470
  size=100,
471
- initial_filesystem_type="ext4",
471
+ initial_filesystem_type=digitalocean.FileSystemType.EXT4,
472
472
  description="an example volume")
473
- foobar_droplet = digitalocean.Droplet("foobarDroplet",
474
- size="s-1vcpu-1gb",
473
+ foobar_droplet = digitalocean.Droplet("foobar",
474
+ name="baz",
475
+ size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,
475
476
  image="ubuntu-18-04-x64",
476
- region="nyc1")
477
- foobar_volume_attachment = digitalocean.VolumeAttachment("foobarVolumeAttachment",
477
+ region=digitalocean.Region.NYC1)
478
+ foobar_volume_attachment = digitalocean.VolumeAttachment("foobar",
478
479
  droplet_id=foobar_droplet.id,
479
- volume_id=foobar_volume.id)
480
+ volume_id=foobar.id)
480
481
  ```
481
- <!--End PulumiCodeChooser -->
482
482
 
483
483
  You can also create a volume from an existing snapshot.
484
484
 
485
- <!--Start PulumiCodeChooser -->
486
485
  ```python
487
486
  import pulumi
488
487
  import pulumi_digitalocean as digitalocean
489
488
 
490
- foobar_volume_snapshot = digitalocean.get_volume_snapshot(name="baz")
491
- foobar_volume = digitalocean.Volume("foobarVolume",
492
- region="lon1",
493
- size=foobar_volume_snapshot.min_disk_size,
494
- snapshot_id=foobar_volume_snapshot.id)
489
+ foobar = digitalocean.get_volume_snapshot(name="baz")
490
+ foobar_volume = digitalocean.Volume("foobar",
491
+ region=digitalocean.Region.LON1,
492
+ name="foo",
493
+ size=foobar.min_disk_size,
494
+ snapshot_id=foobar.id)
495
495
  ```
496
- <!--End PulumiCodeChooser -->
497
496
 
498
497
  ## Import
499
498
 
@@ -590,7 +589,7 @@ class Volume(pulumi.CustomResource):
590
589
  :param pulumi.Input[str] name: A name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter.
591
590
  :param pulumi.Input[Union[str, 'Region']] region: The region that the block storage volume will be created in.
592
591
  :param pulumi.Input[int] size: The size of the block storage volume in GiB. If updated, can only be expanded.
593
- :param pulumi.Input[str] snapshot_id: The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot
592
+ :param pulumi.Input[str] snapshot_id: The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limited on creation to that of the referenced snapshot
594
593
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: A list of the tags to be applied to this Volume.
595
594
  :param pulumi.Input[str] volume_urn: The uniform resource name for the volume.
596
595
  """
@@ -638,13 +637,11 @@ class Volume(pulumi.CustomResource):
638
637
 
639
638
  @property
640
639
  @pulumi.getter(name="filesystemType")
640
+ @_utilities.deprecated("""This fields functionality has been replaced by `initial_filesystem_type`. The property will still remain as a computed attribute representing the current volumes filesystem type.""")
641
641
  def filesystem_type(self) -> pulumi.Output[str]:
642
642
  """
643
643
  Filesystem type (`xfs` or `ext4`) for the block storage volume.
644
644
  """
645
- warnings.warn("""This fields functionality has been replaced by `initial_filesystem_type`. The property will still remain as a computed attribute representing the current volumes filesystem type.""", DeprecationWarning)
646
- pulumi.log.warn("""filesystem_type is deprecated: This fields functionality has been replaced by `initial_filesystem_type`. The property will still remain as a computed attribute representing the current volumes filesystem type.""")
647
-
648
645
  return pulumi.get(self, "filesystem_type")
649
646
 
650
647
  @property
@@ -691,7 +688,7 @@ class Volume(pulumi.CustomResource):
691
688
  @pulumi.getter(name="snapshotId")
692
689
  def snapshot_id(self) -> pulumi.Output[Optional[str]]:
693
690
  """
694
- The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limitied on creation to that of the referenced snapshot
691
+ The ID of an existing volume snapshot from which the new volume will be created. If supplied, the region and size will be limited on creation to that of the referenced snapshot
695
692
  """
696
693
  return pulumi.get(self, "snapshot_id")
697
694
 
@@ -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
 
12
17
  __all__ = ['VolumeAttachmentArgs', 'VolumeAttachment']
@@ -104,25 +109,25 @@ class VolumeAttachment(pulumi.CustomResource):
104
109
 
105
110
  ## Example Usage
106
111
 
107
- <!--Start PulumiCodeChooser -->
108
112
  ```python
109
113
  import pulumi
110
114
  import pulumi_digitalocean as digitalocean
111
115
 
112
- foobar_volume = digitalocean.Volume("foobarVolume",
113
- region="nyc1",
116
+ foobar = digitalocean.Volume("foobar",
117
+ region=digitalocean.Region.NYC1,
118
+ name="baz",
114
119
  size=100,
115
- initial_filesystem_type="ext4",
120
+ initial_filesystem_type=digitalocean.FileSystemType.EXT4,
116
121
  description="an example volume")
117
- foobar_droplet = digitalocean.Droplet("foobarDroplet",
118
- size="s-1vcpu-1gb",
122
+ foobar_droplet = digitalocean.Droplet("foobar",
123
+ name="baz",
124
+ size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,
119
125
  image="ubuntu-18-04-x64",
120
- region="nyc1")
121
- foobar_volume_attachment = digitalocean.VolumeAttachment("foobarVolumeAttachment",
126
+ region=digitalocean.Region.NYC1)
127
+ foobar_volume_attachment = digitalocean.VolumeAttachment("foobar",
122
128
  droplet_id=foobar_droplet.id,
123
- volume_id=foobar_volume.id)
129
+ volume_id=foobar.id)
124
130
  ```
125
- <!--End PulumiCodeChooser -->
126
131
 
127
132
  :param str resource_name: The name of the resource.
128
133
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -142,25 +147,25 @@ class VolumeAttachment(pulumi.CustomResource):
142
147
 
143
148
  ## Example Usage
144
149
 
145
- <!--Start PulumiCodeChooser -->
146
150
  ```python
147
151
  import pulumi
148
152
  import pulumi_digitalocean as digitalocean
149
153
 
150
- foobar_volume = digitalocean.Volume("foobarVolume",
151
- region="nyc1",
154
+ foobar = digitalocean.Volume("foobar",
155
+ region=digitalocean.Region.NYC1,
156
+ name="baz",
152
157
  size=100,
153
- initial_filesystem_type="ext4",
158
+ initial_filesystem_type=digitalocean.FileSystemType.EXT4,
154
159
  description="an example volume")
155
- foobar_droplet = digitalocean.Droplet("foobarDroplet",
156
- size="s-1vcpu-1gb",
160
+ foobar_droplet = digitalocean.Droplet("foobar",
161
+ name="baz",
162
+ size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,
157
163
  image="ubuntu-18-04-x64",
158
- region="nyc1")
159
- foobar_volume_attachment = digitalocean.VolumeAttachment("foobarVolumeAttachment",
164
+ region=digitalocean.Region.NYC1)
165
+ foobar_volume_attachment = digitalocean.VolumeAttachment("foobar",
160
166
  droplet_id=foobar_droplet.id,
161
- volume_id=foobar_volume.id)
167
+ volume_id=foobar.id)
162
168
  ```
163
- <!--End PulumiCodeChooser -->
164
169
 
165
170
  :param str resource_name: The name of the resource.
166
171
  :param VolumeAttachmentArgs args: The arguments to use to populate this resource's properties.
@@ -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
 
12
17
  __all__ = ['VolumeSnapshotArgs', 'VolumeSnapshot']
@@ -200,18 +205,19 @@ class VolumeSnapshot(pulumi.CustomResource):
200
205
 
201
206
  ## Example Usage
202
207
 
203
- <!--Start PulumiCodeChooser -->
204
208
  ```python
205
209
  import pulumi
206
210
  import pulumi_digitalocean as digitalocean
207
211
 
208
- foobar_volume = digitalocean.Volume("foobarVolume",
209
- region="nyc1",
212
+ foobar = digitalocean.Volume("foobar",
213
+ region=digitalocean.Region.NYC1,
214
+ name="baz",
210
215
  size=100,
211
216
  description="an example volume")
212
- foobar_volume_snapshot = digitalocean.VolumeSnapshot("foobarVolumeSnapshot", volume_id=foobar_volume.id)
217
+ foobar_volume_snapshot = digitalocean.VolumeSnapshot("foobar",
218
+ name="foo",
219
+ volume_id=foobar.id)
213
220
  ```
214
- <!--End PulumiCodeChooser -->
215
221
 
216
222
  ## Import
217
223
 
@@ -238,18 +244,19 @@ class VolumeSnapshot(pulumi.CustomResource):
238
244
 
239
245
  ## Example Usage
240
246
 
241
- <!--Start PulumiCodeChooser -->
242
247
  ```python
243
248
  import pulumi
244
249
  import pulumi_digitalocean as digitalocean
245
250
 
246
- foobar_volume = digitalocean.Volume("foobarVolume",
247
- region="nyc1",
251
+ foobar = digitalocean.Volume("foobar",
252
+ region=digitalocean.Region.NYC1,
253
+ name="baz",
248
254
  size=100,
249
255
  description="an example volume")
250
- foobar_volume_snapshot = digitalocean.VolumeSnapshot("foobarVolumeSnapshot", volume_id=foobar_volume.id)
256
+ foobar_volume_snapshot = digitalocean.VolumeSnapshot("foobar",
257
+ name="foo",
258
+ volume_id=foobar.id)
251
259
  ```
252
- <!--End PulumiCodeChooser -->
253
260
 
254
261
  ## Import
255
262
 
@@ -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
 
12
17
  __all__ = ['VpcArgs', 'Vpc']
@@ -220,16 +225,15 @@ class Vpc(pulumi.CustomResource):
220
225
 
221
226
  ## Example Usage
222
227
 
223
- <!--Start PulumiCodeChooser -->
224
228
  ```python
225
229
  import pulumi
226
230
  import pulumi_digitalocean as digitalocean
227
231
 
228
232
  example = digitalocean.Vpc("example",
229
- ip_range="10.10.10.0/24",
230
- region="nyc3")
233
+ name="example-project-network",
234
+ region="nyc3",
235
+ ip_range="10.10.10.0/24")
231
236
  ```
232
- <!--End PulumiCodeChooser -->
233
237
 
234
238
  ### Resource Assignment
235
239
 
@@ -237,19 +241,20 @@ class Vpc(pulumi.CustomResource):
237
241
  `digitalocean_load_balancer`, and `DatabaseCluster` resources
238
242
  may be assigned to a VPC by referencing its `id`. For example:
239
243
 
240
- <!--Start PulumiCodeChooser -->
241
244
  ```python
242
245
  import pulumi
243
246
  import pulumi_digitalocean as digitalocean
244
247
 
245
- example_vpc = digitalocean.Vpc("exampleVpc", region="nyc3")
246
- example_droplet = digitalocean.Droplet("exampleDroplet",
247
- size="s-1vcpu-1gb",
248
+ example = digitalocean.Vpc("example",
249
+ name="example-project-network",
250
+ region="nyc3")
251
+ example_droplet = digitalocean.Droplet("example",
252
+ name="example-01",
253
+ size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,
248
254
  image="ubuntu-18-04-x64",
249
- region="nyc3",
250
- vpc_uuid=example_vpc.id)
255
+ region=digitalocean.Region.NYC3,
256
+ vpc_uuid=example.id)
251
257
  ```
252
- <!--End PulumiCodeChooser -->
253
258
 
254
259
  ## Import
255
260
 
@@ -280,16 +285,15 @@ class Vpc(pulumi.CustomResource):
280
285
 
281
286
  ## Example Usage
282
287
 
283
- <!--Start PulumiCodeChooser -->
284
288
  ```python
285
289
  import pulumi
286
290
  import pulumi_digitalocean as digitalocean
287
291
 
288
292
  example = digitalocean.Vpc("example",
289
- ip_range="10.10.10.0/24",
290
- region="nyc3")
293
+ name="example-project-network",
294
+ region="nyc3",
295
+ ip_range="10.10.10.0/24")
291
296
  ```
292
- <!--End PulumiCodeChooser -->
293
297
 
294
298
  ### Resource Assignment
295
299
 
@@ -297,19 +301,20 @@ class Vpc(pulumi.CustomResource):
297
301
  `digitalocean_load_balancer`, and `DatabaseCluster` resources
298
302
  may be assigned to a VPC by referencing its `id`. For example:
299
303
 
300
- <!--Start PulumiCodeChooser -->
301
304
  ```python
302
305
  import pulumi
303
306
  import pulumi_digitalocean as digitalocean
304
307
 
305
- example_vpc = digitalocean.Vpc("exampleVpc", region="nyc3")
306
- example_droplet = digitalocean.Droplet("exampleDroplet",
307
- size="s-1vcpu-1gb",
308
+ example = digitalocean.Vpc("example",
309
+ name="example-project-network",
310
+ region="nyc3")
311
+ example_droplet = digitalocean.Droplet("example",
312
+ name="example-01",
313
+ size=digitalocean.DropletSlug.DROPLET_S1_VCPU1_GB,
308
314
  image="ubuntu-18-04-x64",
309
- region="nyc3",
310
- vpc_uuid=example_vpc.id)
315
+ region=digitalocean.Region.NYC3,
316
+ vpc_uuid=example.id)
311
317
  ```
312
- <!--End PulumiCodeChooser -->
313
318
 
314
319
  ## Import
315
320