pulumi-digitalocean 4.27.0__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.0.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.0.dist-info → pulumi_digitalocean-4.39.0a1736833057.dist-info}/WHEEL +1 -1
  106. pulumi_digitalocean-4.27.0.dist-info/RECORD +0 -97
  107. {pulumi_digitalocean-4.27.0.dist-info → pulumi_digitalocean-4.39.0a1736833057.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,197 @@
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
+ from . import outputs
17
+
18
+ __all__ = [
19
+ 'GetDropletAutoscaleResult',
20
+ 'AwaitableGetDropletAutoscaleResult',
21
+ 'get_droplet_autoscale',
22
+ 'get_droplet_autoscale_output',
23
+ ]
24
+
25
+ @pulumi.output_type
26
+ class GetDropletAutoscaleResult:
27
+ """
28
+ A collection of values returned by getDropletAutoscale.
29
+ """
30
+ def __init__(__self__, configs=None, created_at=None, current_utilizations=None, droplet_templates=None, id=None, name=None, status=None, updated_at=None):
31
+ if configs and not isinstance(configs, list):
32
+ raise TypeError("Expected argument 'configs' to be a list")
33
+ pulumi.set(__self__, "configs", configs)
34
+ if created_at and not isinstance(created_at, str):
35
+ raise TypeError("Expected argument 'created_at' to be a str")
36
+ pulumi.set(__self__, "created_at", created_at)
37
+ if current_utilizations and not isinstance(current_utilizations, list):
38
+ raise TypeError("Expected argument 'current_utilizations' to be a list")
39
+ pulumi.set(__self__, "current_utilizations", current_utilizations)
40
+ if droplet_templates and not isinstance(droplet_templates, list):
41
+ raise TypeError("Expected argument 'droplet_templates' to be a list")
42
+ pulumi.set(__self__, "droplet_templates", droplet_templates)
43
+ if id and not isinstance(id, str):
44
+ raise TypeError("Expected argument 'id' to be a str")
45
+ pulumi.set(__self__, "id", id)
46
+ if name and not isinstance(name, str):
47
+ raise TypeError("Expected argument 'name' to be a str")
48
+ pulumi.set(__self__, "name", name)
49
+ if status and not isinstance(status, str):
50
+ raise TypeError("Expected argument 'status' to be a str")
51
+ pulumi.set(__self__, "status", status)
52
+ if updated_at and not isinstance(updated_at, str):
53
+ raise TypeError("Expected argument 'updated_at' to be a str")
54
+ pulumi.set(__self__, "updated_at", updated_at)
55
+
56
+ @property
57
+ @pulumi.getter
58
+ def configs(self) -> Sequence['outputs.GetDropletAutoscaleConfigResult']:
59
+ return pulumi.get(self, "configs")
60
+
61
+ @property
62
+ @pulumi.getter(name="createdAt")
63
+ def created_at(self) -> str:
64
+ return pulumi.get(self, "created_at")
65
+
66
+ @property
67
+ @pulumi.getter(name="currentUtilizations")
68
+ def current_utilizations(self) -> Sequence['outputs.GetDropletAutoscaleCurrentUtilizationResult']:
69
+ return pulumi.get(self, "current_utilizations")
70
+
71
+ @property
72
+ @pulumi.getter(name="dropletTemplates")
73
+ def droplet_templates(self) -> Sequence['outputs.GetDropletAutoscaleDropletTemplateResult']:
74
+ return pulumi.get(self, "droplet_templates")
75
+
76
+ @property
77
+ @pulumi.getter
78
+ def id(self) -> Optional[str]:
79
+ return pulumi.get(self, "id")
80
+
81
+ @property
82
+ @pulumi.getter
83
+ def name(self) -> Optional[str]:
84
+ return pulumi.get(self, "name")
85
+
86
+ @property
87
+ @pulumi.getter
88
+ def status(self) -> str:
89
+ return pulumi.get(self, "status")
90
+
91
+ @property
92
+ @pulumi.getter(name="updatedAt")
93
+ def updated_at(self) -> str:
94
+ return pulumi.get(self, "updated_at")
95
+
96
+
97
+ class AwaitableGetDropletAutoscaleResult(GetDropletAutoscaleResult):
98
+ # pylint: disable=using-constant-test
99
+ def __await__(self):
100
+ if False:
101
+ yield self
102
+ return GetDropletAutoscaleResult(
103
+ configs=self.configs,
104
+ created_at=self.created_at,
105
+ current_utilizations=self.current_utilizations,
106
+ droplet_templates=self.droplet_templates,
107
+ id=self.id,
108
+ name=self.name,
109
+ status=self.status,
110
+ updated_at=self.updated_at)
111
+
112
+
113
+ def get_droplet_autoscale(id: Optional[str] = None,
114
+ name: Optional[str] = None,
115
+ opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDropletAutoscaleResult:
116
+ """
117
+ ## Example Usage
118
+
119
+ Get the Droplet Autoscale pool by name:
120
+
121
+ ```python
122
+ import pulumi
123
+ import pulumi_digitalocean as digitalocean
124
+
125
+ my_imported_autoscale_pool = digitalocean.get_droplet_autoscale(name=my_existing_autoscale_pool["name"])
126
+ ```
127
+
128
+ Get the Droplet Autoscale pool by ID:
129
+
130
+ ```python
131
+ import pulumi
132
+ import pulumi_digitalocean as digitalocean
133
+
134
+ my_imported_autoscale_pool = digitalocean.get_droplet_autoscale(id=my_existing_autoscale_pool["id"])
135
+ ```
136
+
137
+
138
+ :param str id: The ID of Droplet Autoscale pool.
139
+ :param str name: The name of Droplet Autoscale pool.
140
+ """
141
+ __args__ = dict()
142
+ __args__['id'] = id
143
+ __args__['name'] = name
144
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
145
+ __ret__ = pulumi.runtime.invoke('digitalocean:index/getDropletAutoscale:getDropletAutoscale', __args__, opts=opts, typ=GetDropletAutoscaleResult).value
146
+
147
+ return AwaitableGetDropletAutoscaleResult(
148
+ configs=pulumi.get(__ret__, 'configs'),
149
+ created_at=pulumi.get(__ret__, 'created_at'),
150
+ current_utilizations=pulumi.get(__ret__, 'current_utilizations'),
151
+ droplet_templates=pulumi.get(__ret__, 'droplet_templates'),
152
+ id=pulumi.get(__ret__, 'id'),
153
+ name=pulumi.get(__ret__, 'name'),
154
+ status=pulumi.get(__ret__, 'status'),
155
+ updated_at=pulumi.get(__ret__, 'updated_at'))
156
+ def get_droplet_autoscale_output(id: Optional[pulumi.Input[Optional[str]]] = None,
157
+ name: Optional[pulumi.Input[Optional[str]]] = None,
158
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDropletAutoscaleResult]:
159
+ """
160
+ ## Example Usage
161
+
162
+ Get the Droplet Autoscale pool by name:
163
+
164
+ ```python
165
+ import pulumi
166
+ import pulumi_digitalocean as digitalocean
167
+
168
+ my_imported_autoscale_pool = digitalocean.get_droplet_autoscale(name=my_existing_autoscale_pool["name"])
169
+ ```
170
+
171
+ Get the Droplet Autoscale pool by ID:
172
+
173
+ ```python
174
+ import pulumi
175
+ import pulumi_digitalocean as digitalocean
176
+
177
+ my_imported_autoscale_pool = digitalocean.get_droplet_autoscale(id=my_existing_autoscale_pool["id"])
178
+ ```
179
+
180
+
181
+ :param str id: The ID of Droplet Autoscale pool.
182
+ :param str name: The name of Droplet Autoscale pool.
183
+ """
184
+ __args__ = dict()
185
+ __args__['id'] = id
186
+ __args__['name'] = name
187
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
188
+ __ret__ = pulumi.runtime.invoke_output('digitalocean:index/getDropletAutoscale:getDropletAutoscale', __args__, opts=opts, typ=GetDropletAutoscaleResult)
189
+ return __ret__.apply(lambda __response__: GetDropletAutoscaleResult(
190
+ configs=pulumi.get(__response__, 'configs'),
191
+ created_at=pulumi.get(__response__, 'created_at'),
192
+ current_utilizations=pulumi.get(__response__, 'current_utilizations'),
193
+ droplet_templates=pulumi.get(__response__, 'droplet_templates'),
194
+ id=pulumi.get(__response__, 'id'),
195
+ name=pulumi.get(__response__, 'name'),
196
+ status=pulumi.get(__response__, 'status'),
197
+ updated_at=pulumi.get(__response__, 'updated_at')))
@@ -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__ = [
@@ -154,20 +159,17 @@ def get_droplet_snapshot(most_recent: Optional[bool] = None,
154
159
 
155
160
  Get the Droplet snapshot:
156
161
 
157
- <!--Start PulumiCodeChooser -->
158
162
  ```python
159
163
  import pulumi
160
164
  import pulumi_digitalocean as digitalocean
161
165
 
162
- web_snapshot = digitalocean.get_droplet_snapshot(most_recent=True,
163
- name_regex="^web",
164
- region="nyc3")
166
+ web_snapshot = digitalocean.get_droplet_snapshot(name_regex="^web",
167
+ region="nyc3",
168
+ most_recent=True)
165
169
  ```
166
- <!--End PulumiCodeChooser -->
167
170
 
168
171
  Create image from snapshot:
169
172
 
170
- <!--Start PulumiCodeChooser -->
171
173
  ```python
172
174
  import pulumi
173
175
  import pulumi_digitalocean as digitalocean
@@ -177,10 +179,10 @@ def get_droplet_snapshot(most_recent: Optional[bool] = None,
177
179
  most_recent=True)
178
180
  from_snapshot = digitalocean.Droplet("from-snapshot",
179
181
  image=web_snapshot.id,
180
- region="nyc3",
181
- size="s-2vcpu-4gb")
182
+ name="web-02",
183
+ region=digitalocean.Region.NYC3,
184
+ size=digitalocean.DropletSlug.DROPLET_S2_VCPU4_GB)
182
185
  ```
183
- <!--End PulumiCodeChooser -->
184
186
 
185
187
 
186
188
  :param bool most_recent: If more than one result is returned, use the most recent Droplet snapshot.
@@ -211,14 +213,11 @@ def get_droplet_snapshot(most_recent: Optional[bool] = None,
211
213
  region=pulumi.get(__ret__, 'region'),
212
214
  regions=pulumi.get(__ret__, 'regions'),
213
215
  size=pulumi.get(__ret__, 'size'))
214
-
215
-
216
- @_utilities.lift_output_func(get_droplet_snapshot)
217
216
  def get_droplet_snapshot_output(most_recent: Optional[pulumi.Input[Optional[bool]]] = None,
218
217
  name: Optional[pulumi.Input[Optional[str]]] = None,
219
218
  name_regex: Optional[pulumi.Input[Optional[str]]] = None,
220
219
  region: Optional[pulumi.Input[Optional[str]]] = None,
221
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDropletSnapshotResult]:
220
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDropletSnapshotResult]:
222
221
  """
223
222
  Droplet snapshots are saved instances of a Droplet. Use this data
224
223
  source to retrieve the ID of a DigitalOcean Droplet snapshot for use in other
@@ -228,20 +227,17 @@ def get_droplet_snapshot_output(most_recent: Optional[pulumi.Input[Optional[bool
228
227
 
229
228
  Get the Droplet snapshot:
230
229
 
231
- <!--Start PulumiCodeChooser -->
232
230
  ```python
233
231
  import pulumi
234
232
  import pulumi_digitalocean as digitalocean
235
233
 
236
- web_snapshot = digitalocean.get_droplet_snapshot(most_recent=True,
237
- name_regex="^web",
238
- region="nyc3")
234
+ web_snapshot = digitalocean.get_droplet_snapshot(name_regex="^web",
235
+ region="nyc3",
236
+ most_recent=True)
239
237
  ```
240
- <!--End PulumiCodeChooser -->
241
238
 
242
239
  Create image from snapshot:
243
240
 
244
- <!--Start PulumiCodeChooser -->
245
241
  ```python
246
242
  import pulumi
247
243
  import pulumi_digitalocean as digitalocean
@@ -251,10 +247,10 @@ def get_droplet_snapshot_output(most_recent: Optional[pulumi.Input[Optional[bool
251
247
  most_recent=True)
252
248
  from_snapshot = digitalocean.Droplet("from-snapshot",
253
249
  image=web_snapshot.id,
254
- region="nyc3",
255
- size="s-2vcpu-4gb")
250
+ name="web-02",
251
+ region=digitalocean.Region.NYC3,
252
+ size=digitalocean.DropletSlug.DROPLET_S2_VCPU4_GB)
256
253
  ```
257
- <!--End PulumiCodeChooser -->
258
254
 
259
255
 
260
256
  :param bool most_recent: If more than one result is returned, use the most recent Droplet snapshot.
@@ -266,4 +262,21 @@ def get_droplet_snapshot_output(most_recent: Optional[pulumi.Input[Optional[bool
266
262
  :param str name_regex: A regex string to apply to the Droplet snapshot list returned by DigitalOcean. This allows more advanced filtering not supported from the DigitalOcean API. This filtering is done locally on what DigitalOcean returns.
267
263
  :param str region: A "slug" representing a DigitalOcean region (e.g. `nyc1`). If set, only Droplet snapshots available in the region will be returned.
268
264
  """
269
- ...
265
+ __args__ = dict()
266
+ __args__['mostRecent'] = most_recent
267
+ __args__['name'] = name
268
+ __args__['nameRegex'] = name_regex
269
+ __args__['region'] = region
270
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
271
+ __ret__ = pulumi.runtime.invoke_output('digitalocean:index/getDropletSnapshot:getDropletSnapshot', __args__, opts=opts, typ=GetDropletSnapshotResult)
272
+ return __ret__.apply(lambda __response__: GetDropletSnapshotResult(
273
+ created_at=pulumi.get(__response__, 'created_at'),
274
+ droplet_id=pulumi.get(__response__, 'droplet_id'),
275
+ id=pulumi.get(__response__, 'id'),
276
+ min_disk_size=pulumi.get(__response__, 'min_disk_size'),
277
+ most_recent=pulumi.get(__response__, 'most_recent'),
278
+ name=pulumi.get(__response__, 'name'),
279
+ name_regex=pulumi.get(__response__, 'name_regex'),
280
+ region=pulumi.get(__response__, 'region'),
281
+ regions=pulumi.get(__response__, 'regions'),
282
+ size=pulumi.get(__response__, 'size')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
  from ._inputs import *
@@ -23,13 +28,16 @@ class GetDropletsResult:
23
28
  """
24
29
  A collection of values returned by getDroplets.
25
30
  """
26
- def __init__(__self__, droplets=None, filters=None, id=None, sorts=None):
31
+ def __init__(__self__, droplets=None, filters=None, gpus=None, id=None, sorts=None):
27
32
  if droplets and not isinstance(droplets, list):
28
33
  raise TypeError("Expected argument 'droplets' to be a list")
29
34
  pulumi.set(__self__, "droplets", droplets)
30
35
  if filters and not isinstance(filters, list):
31
36
  raise TypeError("Expected argument 'filters' to be a list")
32
37
  pulumi.set(__self__, "filters", filters)
38
+ if gpus and not isinstance(gpus, bool):
39
+ raise TypeError("Expected argument 'gpus' to be a bool")
40
+ pulumi.set(__self__, "gpus", gpus)
33
41
  if id and not isinstance(id, str):
34
42
  raise TypeError("Expected argument 'id' to be a str")
35
43
  pulumi.set(__self__, "id", id)
@@ -50,6 +58,11 @@ class GetDropletsResult:
50
58
  def filters(self) -> Optional[Sequence['outputs.GetDropletsFilterResult']]:
51
59
  return pulumi.get(self, "filters")
52
60
 
61
+ @property
62
+ @pulumi.getter
63
+ def gpus(self) -> Optional[bool]:
64
+ return pulumi.get(self, "gpus")
65
+
53
66
  @property
54
67
  @pulumi.getter
55
68
  def id(self) -> str:
@@ -72,12 +85,14 @@ class AwaitableGetDropletsResult(GetDropletsResult):
72
85
  return GetDropletsResult(
73
86
  droplets=self.droplets,
74
87
  filters=self.filters,
88
+ gpus=self.gpus,
75
89
  id=self.id,
76
90
  sorts=self.sorts)
77
91
 
78
92
 
79
- def get_droplets(filters: Optional[Sequence[pulumi.InputType['GetDropletsFilterArgs']]] = None,
80
- sorts: Optional[Sequence[pulumi.InputType['GetDropletsSortArgs']]] = None,
93
+ def get_droplets(filters: Optional[Sequence[Union['GetDropletsFilterArgs', 'GetDropletsFilterArgsDict']]] = None,
94
+ gpus: Optional[bool] = None,
95
+ sorts: Optional[Sequence[Union['GetDropletsSortArgs', 'GetDropletsSortArgsDict']]] = None,
81
96
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDropletsResult:
82
97
  """
83
98
  Get information on Droplets for use in other resources, with the ability to filter and sort the results.
@@ -86,6 +101,9 @@ def get_droplets(filters: Optional[Sequence[pulumi.InputType['GetDropletsFilterA
86
101
  This data source is useful if the Droplets in question are not managed by the provider or you need to
87
102
  utilize any of the Droplets' data.
88
103
 
104
+ By default, only non-GPU Droplets are returned. To list only GPU Droplets, set
105
+ the `gpus` attribute to `true`.
106
+
89
107
  Note: You can use the `Droplet` data source to obtain metadata
90
108
  about a single Droplet if you already know the `id`, unique `name`, or unique `tag` to retrieve.
91
109
 
@@ -95,50 +113,48 @@ def get_droplets(filters: Optional[Sequence[pulumi.InputType['GetDropletsFilterA
95
113
 
96
114
  For example to find all Droplets with size `s-1vcpu-1gb`:
97
115
 
98
- <!--Start PulumiCodeChooser -->
99
116
  ```python
100
117
  import pulumi
101
118
  import pulumi_digitalocean as digitalocean
102
119
 
103
- small = digitalocean.get_droplets(filters=[digitalocean.GetDropletsFilterArgs(
104
- key="size",
105
- values=["s-1vcpu-1gb"],
106
- )])
120
+ small = digitalocean.get_droplets(filters=[{
121
+ "key": "size",
122
+ "values": ["s-1vcpu-1gb"],
123
+ }])
107
124
  ```
108
- <!--End PulumiCodeChooser -->
109
125
 
110
126
  You can filter on multiple fields and sort the results as well:
111
127
 
112
- <!--Start PulumiCodeChooser -->
113
128
  ```python
114
129
  import pulumi
115
130
  import pulumi_digitalocean as digitalocean
116
131
 
117
132
  small_with_backups = digitalocean.get_droplets(filters=[
118
- digitalocean.GetDropletsFilterArgs(
119
- key="size",
120
- values=["s-1vcpu-1gb"],
121
- ),
122
- digitalocean.GetDropletsFilterArgs(
123
- key="backups",
124
- values=["true"],
125
- ),
133
+ {
134
+ "key": "size",
135
+ "values": ["s-1vcpu-1gb"],
136
+ },
137
+ {
138
+ "key": "backups",
139
+ "values": ["true"],
140
+ },
126
141
  ],
127
- sorts=[digitalocean.GetDropletsSortArgs(
128
- direction="desc",
129
- key="created_at",
130
- )])
142
+ sorts=[{
143
+ "key": "created_at",
144
+ "direction": "desc",
145
+ }])
131
146
  ```
132
- <!--End PulumiCodeChooser -->
133
147
 
134
148
 
135
- :param Sequence[pulumi.InputType['GetDropletsFilterArgs']] filters: Filter the results.
149
+ :param Sequence[Union['GetDropletsFilterArgs', 'GetDropletsFilterArgsDict']] filters: Filter the results.
136
150
  The `filter` block is documented below.
137
- :param Sequence[pulumi.InputType['GetDropletsSortArgs']] sorts: Sort the results.
151
+ :param bool gpus: A boolean value specifying whether or not to list GPU Droplets
152
+ :param Sequence[Union['GetDropletsSortArgs', 'GetDropletsSortArgsDict']] sorts: Sort the results.
138
153
  The `sort` block is documented below.
139
154
  """
140
155
  __args__ = dict()
141
156
  __args__['filters'] = filters
157
+ __args__['gpus'] = gpus
142
158
  __args__['sorts'] = sorts
143
159
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
144
160
  __ret__ = pulumi.runtime.invoke('digitalocean:index/getDroplets:getDroplets', __args__, opts=opts, typ=GetDropletsResult).value
@@ -146,14 +162,13 @@ def get_droplets(filters: Optional[Sequence[pulumi.InputType['GetDropletsFilterA
146
162
  return AwaitableGetDropletsResult(
147
163
  droplets=pulumi.get(__ret__, 'droplets'),
148
164
  filters=pulumi.get(__ret__, 'filters'),
165
+ gpus=pulumi.get(__ret__, 'gpus'),
149
166
  id=pulumi.get(__ret__, 'id'),
150
167
  sorts=pulumi.get(__ret__, 'sorts'))
151
-
152
-
153
- @_utilities.lift_output_func(get_droplets)
154
- def get_droplets_output(filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetDropletsFilterArgs']]]]] = None,
155
- sorts: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetDropletsSortArgs']]]]] = None,
156
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDropletsResult]:
168
+ def get_droplets_output(filters: Optional[pulumi.Input[Optional[Sequence[Union['GetDropletsFilterArgs', 'GetDropletsFilterArgsDict']]]]] = None,
169
+ gpus: Optional[pulumi.Input[Optional[bool]]] = None,
170
+ sorts: Optional[pulumi.Input[Optional[Sequence[Union['GetDropletsSortArgs', 'GetDropletsSortArgsDict']]]]] = None,
171
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDropletsResult]:
157
172
  """
158
173
  Get information on Droplets for use in other resources, with the ability to filter and sort the results.
159
174
  If no filters are specified, all Droplets will be returned.
@@ -161,6 +176,9 @@ def get_droplets_output(filters: Optional[pulumi.Input[Optional[Sequence[pulumi.
161
176
  This data source is useful if the Droplets in question are not managed by the provider or you need to
162
177
  utilize any of the Droplets' data.
163
178
 
179
+ By default, only non-GPU Droplets are returned. To list only GPU Droplets, set
180
+ the `gpus` attribute to `true`.
181
+
164
182
  Note: You can use the `Droplet` data source to obtain metadata
165
183
  about a single Droplet if you already know the `id`, unique `name`, or unique `tag` to retrieve.
166
184
 
@@ -170,46 +188,54 @@ def get_droplets_output(filters: Optional[pulumi.Input[Optional[Sequence[pulumi.
170
188
 
171
189
  For example to find all Droplets with size `s-1vcpu-1gb`:
172
190
 
173
- <!--Start PulumiCodeChooser -->
174
191
  ```python
175
192
  import pulumi
176
193
  import pulumi_digitalocean as digitalocean
177
194
 
178
- small = digitalocean.get_droplets(filters=[digitalocean.GetDropletsFilterArgs(
179
- key="size",
180
- values=["s-1vcpu-1gb"],
181
- )])
195
+ small = digitalocean.get_droplets(filters=[{
196
+ "key": "size",
197
+ "values": ["s-1vcpu-1gb"],
198
+ }])
182
199
  ```
183
- <!--End PulumiCodeChooser -->
184
200
 
185
201
  You can filter on multiple fields and sort the results as well:
186
202
 
187
- <!--Start PulumiCodeChooser -->
188
203
  ```python
189
204
  import pulumi
190
205
  import pulumi_digitalocean as digitalocean
191
206
 
192
207
  small_with_backups = digitalocean.get_droplets(filters=[
193
- digitalocean.GetDropletsFilterArgs(
194
- key="size",
195
- values=["s-1vcpu-1gb"],
196
- ),
197
- digitalocean.GetDropletsFilterArgs(
198
- key="backups",
199
- values=["true"],
200
- ),
208
+ {
209
+ "key": "size",
210
+ "values": ["s-1vcpu-1gb"],
211
+ },
212
+ {
213
+ "key": "backups",
214
+ "values": ["true"],
215
+ },
201
216
  ],
202
- sorts=[digitalocean.GetDropletsSortArgs(
203
- direction="desc",
204
- key="created_at",
205
- )])
217
+ sorts=[{
218
+ "key": "created_at",
219
+ "direction": "desc",
220
+ }])
206
221
  ```
207
- <!--End PulumiCodeChooser -->
208
222
 
209
223
 
210
- :param Sequence[pulumi.InputType['GetDropletsFilterArgs']] filters: Filter the results.
224
+ :param Sequence[Union['GetDropletsFilterArgs', 'GetDropletsFilterArgsDict']] filters: Filter the results.
211
225
  The `filter` block is documented below.
212
- :param Sequence[pulumi.InputType['GetDropletsSortArgs']] sorts: Sort the results.
226
+ :param bool gpus: A boolean value specifying whether or not to list GPU Droplets
227
+ :param Sequence[Union['GetDropletsSortArgs', 'GetDropletsSortArgsDict']] sorts: Sort the results.
213
228
  The `sort` block is documented below.
214
229
  """
215
- ...
230
+ __args__ = dict()
231
+ __args__['filters'] = filters
232
+ __args__['gpus'] = gpus
233
+ __args__['sorts'] = sorts
234
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
235
+ __ret__ = pulumi.runtime.invoke_output('digitalocean:index/getDroplets:getDroplets', __args__, opts=opts, typ=GetDropletsResult)
236
+ return __ret__.apply(lambda __response__: GetDropletsResult(
237
+ droplets=pulumi.get(__response__, 'droplets'),
238
+ filters=pulumi.get(__response__, 'filters'),
239
+ gpus=pulumi.get(__response__, 'gpus'),
240
+ id=pulumi.get(__response__, 'id'),
241
+ sorts=pulumi.get(__response__, 'sorts')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
  from ._inputs import *
@@ -153,8 +158,8 @@ class AwaitableGetFirewallResult(GetFirewallResult):
153
158
 
154
159
  def get_firewall(droplet_ids: Optional[Sequence[int]] = None,
155
160
  firewall_id: Optional[str] = None,
156
- inbound_rules: Optional[Sequence[pulumi.InputType['GetFirewallInboundRuleArgs']]] = None,
157
- outbound_rules: Optional[Sequence[pulumi.InputType['GetFirewallOutboundRuleArgs']]] = None,
161
+ inbound_rules: Optional[Sequence[Union['GetFirewallInboundRuleArgs', 'GetFirewallInboundRuleArgsDict']]] = None,
162
+ outbound_rules: Optional[Sequence[Union['GetFirewallOutboundRuleArgs', 'GetFirewallOutboundRuleArgsDict']]] = None,
158
163
  tags: Optional[Sequence[str]] = None,
159
164
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetFirewallResult:
160
165
  """
@@ -164,7 +169,6 @@ def get_firewall(droplet_ids: Optional[Sequence[int]] = None,
164
169
 
165
170
  Get the firewall:
166
171
 
167
- <!--Start PulumiCodeChooser -->
168
172
  ```python
169
173
  import pulumi
170
174
  import pulumi_digitalocean as digitalocean
@@ -172,7 +176,6 @@ def get_firewall(droplet_ids: Optional[Sequence[int]] = None,
172
176
  example = digitalocean.get_firewall(firewall_id="1df48973-6eef-4214-854f-fa7726e7e583")
173
177
  pulumi.export("exampleFirewallName", example.name)
174
178
  ```
175
- <!--End PulumiCodeChooser -->
176
179
 
177
180
 
178
181
  :param Sequence[int] droplet_ids: The list of the IDs of the Droplets assigned to
@@ -201,15 +204,12 @@ def get_firewall(droplet_ids: Optional[Sequence[int]] = None,
201
204
  pending_changes=pulumi.get(__ret__, 'pending_changes'),
202
205
  status=pulumi.get(__ret__, 'status'),
203
206
  tags=pulumi.get(__ret__, 'tags'))
204
-
205
-
206
- @_utilities.lift_output_func(get_firewall)
207
207
  def get_firewall_output(droplet_ids: Optional[pulumi.Input[Optional[Sequence[int]]]] = None,
208
208
  firewall_id: Optional[pulumi.Input[str]] = None,
209
- inbound_rules: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetFirewallInboundRuleArgs']]]]] = None,
210
- outbound_rules: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetFirewallOutboundRuleArgs']]]]] = None,
209
+ inbound_rules: Optional[pulumi.Input[Optional[Sequence[Union['GetFirewallInboundRuleArgs', 'GetFirewallInboundRuleArgsDict']]]]] = None,
210
+ outbound_rules: Optional[pulumi.Input[Optional[Sequence[Union['GetFirewallOutboundRuleArgs', 'GetFirewallOutboundRuleArgsDict']]]]] = None,
211
211
  tags: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
212
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetFirewallResult]:
212
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetFirewallResult]:
213
213
  """
214
214
  Get information on a DigitalOcean Firewall.
215
215
 
@@ -217,7 +217,6 @@ def get_firewall_output(droplet_ids: Optional[pulumi.Input[Optional[Sequence[int
217
217
 
218
218
  Get the firewall:
219
219
 
220
- <!--Start PulumiCodeChooser -->
221
220
  ```python
222
221
  import pulumi
223
222
  import pulumi_digitalocean as digitalocean
@@ -225,7 +224,6 @@ def get_firewall_output(droplet_ids: Optional[pulumi.Input[Optional[Sequence[int
225
224
  example = digitalocean.get_firewall(firewall_id="1df48973-6eef-4214-854f-fa7726e7e583")
226
225
  pulumi.export("exampleFirewallName", example.name)
227
226
  ```
228
- <!--End PulumiCodeChooser -->
229
227
 
230
228
 
231
229
  :param Sequence[int] droplet_ids: The list of the IDs of the Droplets assigned to
@@ -234,4 +232,22 @@ def get_firewall_output(droplet_ids: Optional[pulumi.Input[Optional[Sequence[int
234
232
  about.
235
233
  :param Sequence[str] tags: The names of the Tags assigned to the Firewall.
236
234
  """
237
- ...
235
+ __args__ = dict()
236
+ __args__['dropletIds'] = droplet_ids
237
+ __args__['firewallId'] = firewall_id
238
+ __args__['inboundRules'] = inbound_rules
239
+ __args__['outboundRules'] = outbound_rules
240
+ __args__['tags'] = tags
241
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
242
+ __ret__ = pulumi.runtime.invoke_output('digitalocean:index/getFirewall:getFirewall', __args__, opts=opts, typ=GetFirewallResult)
243
+ return __ret__.apply(lambda __response__: GetFirewallResult(
244
+ created_at=pulumi.get(__response__, 'created_at'),
245
+ droplet_ids=pulumi.get(__response__, 'droplet_ids'),
246
+ firewall_id=pulumi.get(__response__, 'firewall_id'),
247
+ id=pulumi.get(__response__, 'id'),
248
+ inbound_rules=pulumi.get(__response__, 'inbound_rules'),
249
+ name=pulumi.get(__response__, 'name'),
250
+ outbound_rules=pulumi.get(__response__, 'outbound_rules'),
251
+ pending_changes=pulumi.get(__response__, 'pending_changes'),
252
+ status=pulumi.get(__response__, 'status'),
253
+ tags=pulumi.get(__response__, 'tags')))