pulumi-vsphere 4.10.0a1710245029__py3-none-any.whl → 4.13.0a1736836157__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-vsphere might be problematic. Click here for more details.

Files changed (85) hide show
  1. pulumi_vsphere/__init__.py +28 -0
  2. pulumi_vsphere/_inputs.py +1816 -277
  3. pulumi_vsphere/_utilities.py +41 -5
  4. pulumi_vsphere/compute_cluster.py +937 -1488
  5. pulumi_vsphere/compute_cluster_host_group.py +67 -2
  6. pulumi_vsphere/compute_cluster_vm_affinity_rule.py +69 -34
  7. pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +41 -2
  8. pulumi_vsphere/compute_cluster_vm_dependency_rule.py +205 -2
  9. pulumi_vsphere/compute_cluster_vm_group.py +198 -2
  10. pulumi_vsphere/compute_cluster_vm_host_rule.py +73 -2
  11. pulumi_vsphere/config/__init__.pyi +5 -0
  12. pulumi_vsphere/config/vars.py +5 -0
  13. pulumi_vsphere/content_library.py +113 -12
  14. pulumi_vsphere/content_library_item.py +143 -2
  15. pulumi_vsphere/custom_attribute.py +77 -2
  16. pulumi_vsphere/datacenter.py +48 -40
  17. pulumi_vsphere/datastore_cluster.py +217 -366
  18. pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +159 -2
  19. pulumi_vsphere/distributed_port_group.py +416 -189
  20. pulumi_vsphere/distributed_virtual_switch.py +571 -830
  21. pulumi_vsphere/dpm_host_override.py +63 -2
  22. pulumi_vsphere/drs_vm_override.py +67 -2
  23. pulumi_vsphere/entity_permissions.py +64 -38
  24. pulumi_vsphere/file.py +21 -24
  25. pulumi_vsphere/folder.py +148 -30
  26. pulumi_vsphere/get_compute_cluster.py +16 -9
  27. pulumi_vsphere/get_compute_cluster_host_group.py +36 -25
  28. pulumi_vsphere/get_content_library.py +23 -15
  29. pulumi_vsphere/get_content_library_item.py +29 -13
  30. pulumi_vsphere/get_custom_attribute.py +14 -9
  31. pulumi_vsphere/get_datacenter.py +30 -12
  32. pulumi_vsphere/get_datastore.py +29 -21
  33. pulumi_vsphere/get_datastore_cluster.py +31 -10
  34. pulumi_vsphere/get_datastore_stats.py +63 -57
  35. pulumi_vsphere/get_distributed_virtual_switch.py +18 -9
  36. pulumi_vsphere/get_dynamic.py +35 -25
  37. pulumi_vsphere/get_folder.py +23 -11
  38. pulumi_vsphere/get_guest_os_customization.py +26 -52
  39. pulumi_vsphere/get_host.py +16 -9
  40. pulumi_vsphere/get_host_base_images.py +104 -0
  41. pulumi_vsphere/get_host_pci_device.py +28 -19
  42. pulumi_vsphere/get_host_thumbprint.py +41 -25
  43. pulumi_vsphere/get_host_vgpu_profile.py +20 -15
  44. pulumi_vsphere/get_license.py +20 -10
  45. pulumi_vsphere/get_network.py +80 -24
  46. pulumi_vsphere/get_ovf_vm_template.py +56 -5
  47. pulumi_vsphere/get_policy.py +13 -9
  48. pulumi_vsphere/get_resource_pool.py +29 -23
  49. pulumi_vsphere/get_role.py +23 -13
  50. pulumi_vsphere/get_tag.py +16 -9
  51. pulumi_vsphere/get_tag_category.py +16 -9
  52. pulumi_vsphere/get_vapp_container.py +15 -9
  53. pulumi_vsphere/get_virtual_machine.py +205 -48
  54. pulumi_vsphere/get_vmfs_disks.py +18 -9
  55. pulumi_vsphere/guest_os_customization.py +60 -5
  56. pulumi_vsphere/ha_vm_override.py +352 -380
  57. pulumi_vsphere/host.py +244 -64
  58. pulumi_vsphere/host_port_group.py +27 -24
  59. pulumi_vsphere/host_virtual_switch.py +209 -289
  60. pulumi_vsphere/license.py +5 -32
  61. pulumi_vsphere/nas_datastore.py +74 -9
  62. pulumi_vsphere/offline_software_depot.py +185 -0
  63. pulumi_vsphere/outputs.py +717 -270
  64. pulumi_vsphere/provider.py +7 -6
  65. pulumi_vsphere/pulumi-plugin.json +2 -1
  66. pulumi_vsphere/resource_pool.py +168 -411
  67. pulumi_vsphere/role.py +33 -2
  68. pulumi_vsphere/storage_drs_vm_override.py +133 -2
  69. pulumi_vsphere/supervisor.py +967 -0
  70. pulumi_vsphere/tag.py +159 -2
  71. pulumi_vsphere/tag_category.py +83 -2
  72. pulumi_vsphere/vapp_container.py +163 -2
  73. pulumi_vsphere/vapp_entity.py +147 -2
  74. pulumi_vsphere/virtual_disk.py +123 -36
  75. pulumi_vsphere/virtual_machine.py +698 -829
  76. pulumi_vsphere/virtual_machine_class.py +447 -0
  77. pulumi_vsphere/virtual_machine_snapshot.py +13 -12
  78. pulumi_vsphere/vm_storage_policy.py +120 -127
  79. pulumi_vsphere/vmfs_datastore.py +271 -2
  80. pulumi_vsphere/vnic.py +104 -105
  81. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/METADATA +7 -6
  82. pulumi_vsphere-4.13.0a1736836157.dist-info/RECORD +86 -0
  83. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/WHEEL +1 -1
  84. pulumi_vsphere-4.10.0a1710245029.dist-info/RECORD +0 -82
  85. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736836157.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
 
12
17
  __all__ = ['ComputeClusterVmGroupArgs', 'ComputeClusterVmGroup']
@@ -31,6 +36,11 @@ class ComputeClusterVmGroupArgs:
31
36
  `name` argument) is shared with the
32
37
  `ComputeClusterHostGroup`
33
38
  resource. Make sure your names are unique across both resources.
39
+
40
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
41
+ import section. When importing a VM group, validate that all virtual machines that
42
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
43
+ that are not in `virtual_machine_ids` the included will be removed from the group.
34
44
  """
35
45
  pulumi.set(__self__, "compute_cluster_id", compute_cluster_id)
36
46
  if name is not None:
@@ -76,6 +86,11 @@ class ComputeClusterVmGroupArgs:
76
86
  `name` argument) is shared with the
77
87
  `ComputeClusterHostGroup`
78
88
  resource. Make sure your names are unique across both resources.
89
+
90
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
91
+ import section. When importing a VM group, validate that all virtual machines that
92
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
93
+ that are not in `virtual_machine_ids` the included will be removed from the group.
79
94
  """
80
95
  return pulumi.get(self, "virtual_machine_ids")
81
96
 
@@ -104,6 +119,11 @@ class _ComputeClusterVmGroupState:
104
119
  `name` argument) is shared with the
105
120
  `ComputeClusterHostGroup`
106
121
  resource. Make sure your names are unique across both resources.
122
+
123
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
124
+ import section. When importing a VM group, validate that all virtual machines that
125
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
126
+ that are not in `virtual_machine_ids` the included will be removed from the group.
107
127
  """
108
128
  if compute_cluster_id is not None:
109
129
  pulumi.set(__self__, "compute_cluster_id", compute_cluster_id)
@@ -150,6 +170,11 @@ class _ComputeClusterVmGroupState:
150
170
  `name` argument) is shared with the
151
171
  `ComputeClusterHostGroup`
152
172
  resource. Make sure your names are unique across both resources.
173
+
174
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
175
+ import section. When importing a VM group, validate that all virtual machines that
176
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
177
+ that are not in `virtual_machine_ids` the included will be removed from the group.
153
178
  """
154
179
  return pulumi.get(self, "virtual_machine_ids")
155
180
 
@@ -168,7 +193,85 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
168
193
  virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
169
194
  __props__=None):
170
195
  """
171
- Create a ComputeClusterVmGroup resource with the given unique name, props, and options.
196
+ The `ComputeClusterVmGroup` resource can be used to manage groups of
197
+ virtual machines in a cluster, either created by the
198
+ [`ComputeCluster`][tf-vsphere-cluster-resource] resource or looked up
199
+ by the [`ComputeCluster`][tf-vsphere-cluster-data-source] data source.
200
+
201
+ [tf-vsphere-cluster-resource]: /docs/providers/vsphere/r/compute_cluster.html
202
+ [tf-vsphere-cluster-data-source]: /docs/providers/vsphere/d/compute_cluster.html
203
+
204
+ This resource mainly serves as an input to the
205
+ [`ComputeClusterVmDependencyRule`][tf-vsphere-cluster-vm-dependency-rule-resource]
206
+ and
207
+ [`ComputeClusterVmHostRule`][tf-vsphere-cluster-vm-host-rule-resource]
208
+ resources. See the individual resource documentation pages for more information.
209
+
210
+ [tf-vsphere-cluster-vm-dependency-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_dependency_rule.html
211
+ [tf-vsphere-cluster-vm-host-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_host_rule.html
212
+
213
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
214
+ connections.
215
+
216
+ ## Example Usage
217
+
218
+ The example below creates two virtual machines in a cluster using the
219
+ `VirtualMachine` resource, creating the
220
+ virtual machine in the cluster looked up by the
221
+ `ComputeCluster` data source. It
222
+ then creates a group from these two virtual machines.
223
+
224
+ ```python
225
+ import pulumi
226
+ import pulumi_vsphere as vsphere
227
+
228
+ datacenter = vsphere.get_datacenter(name="dc-01")
229
+ datastore = vsphere.get_datastore(name="datastore1",
230
+ datacenter_id=datacenter.id)
231
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
232
+ datacenter_id=datacenter.id)
233
+ network = vsphere.get_network(name="network1",
234
+ datacenter_id=datacenter.id)
235
+ vm = []
236
+ for range in [{"value": i} for i in range(0, 2)]:
237
+ vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
238
+ name=f"test-{range['value']}",
239
+ resource_pool_id=cluster.resource_pool_id,
240
+ datastore_id=datastore.id,
241
+ num_cpus=2,
242
+ memory=2048,
243
+ guest_id="otherLinux64Guest",
244
+ network_interfaces=[{
245
+ "network_id": network.id,
246
+ }],
247
+ disks=[{
248
+ "label": "disk0",
249
+ "size": 20,
250
+ }]))
251
+ cluster_vm_group = vsphere.ComputeClusterVmGroup("cluster_vm_group",
252
+ name="test-cluster-vm-group",
253
+ compute_cluster_id=cluster.id,
254
+ virtual_machine_ids=[[__item.id for __item in vm]])
255
+ ```
256
+
257
+ ## Import
258
+
259
+ An existing group can be imported into this resource by
260
+
261
+ supplying both the path to the cluster, and the name of the VM group. If the
262
+
263
+ name or cluster is not found, or if the group is of a different type, an error
264
+
265
+ will be returned. An example is below:
266
+
267
+ ```sh
268
+ $ pulumi import vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup cluster_vm_group \\
269
+ ```
270
+
271
+ '{"compute_cluster_path": "/dc1/host/cluster1", \\
272
+
273
+ "name": "pulumi-test-cluster-vm-group"}'
274
+
172
275
  :param str resource_name: The name of the resource.
173
276
  :param pulumi.ResourceOptions opts: Options for the resource.
174
277
  :param pulumi.Input[str] compute_cluster_id: The managed object reference
@@ -183,6 +286,11 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
183
286
  `name` argument) is shared with the
184
287
  `ComputeClusterHostGroup`
185
288
  resource. Make sure your names are unique across both resources.
289
+
290
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
291
+ import section. When importing a VM group, validate that all virtual machines that
292
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
293
+ that are not in `virtual_machine_ids` the included will be removed from the group.
186
294
  """
187
295
  ...
188
296
  @overload
@@ -191,7 +299,85 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
191
299
  args: ComputeClusterVmGroupArgs,
192
300
  opts: Optional[pulumi.ResourceOptions] = None):
193
301
  """
194
- Create a ComputeClusterVmGroup resource with the given unique name, props, and options.
302
+ The `ComputeClusterVmGroup` resource can be used to manage groups of
303
+ virtual machines in a cluster, either created by the
304
+ [`ComputeCluster`][tf-vsphere-cluster-resource] resource or looked up
305
+ by the [`ComputeCluster`][tf-vsphere-cluster-data-source] data source.
306
+
307
+ [tf-vsphere-cluster-resource]: /docs/providers/vsphere/r/compute_cluster.html
308
+ [tf-vsphere-cluster-data-source]: /docs/providers/vsphere/d/compute_cluster.html
309
+
310
+ This resource mainly serves as an input to the
311
+ [`ComputeClusterVmDependencyRule`][tf-vsphere-cluster-vm-dependency-rule-resource]
312
+ and
313
+ [`ComputeClusterVmHostRule`][tf-vsphere-cluster-vm-host-rule-resource]
314
+ resources. See the individual resource documentation pages for more information.
315
+
316
+ [tf-vsphere-cluster-vm-dependency-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_dependency_rule.html
317
+ [tf-vsphere-cluster-vm-host-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_host_rule.html
318
+
319
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
320
+ connections.
321
+
322
+ ## Example Usage
323
+
324
+ The example below creates two virtual machines in a cluster using the
325
+ `VirtualMachine` resource, creating the
326
+ virtual machine in the cluster looked up by the
327
+ `ComputeCluster` data source. It
328
+ then creates a group from these two virtual machines.
329
+
330
+ ```python
331
+ import pulumi
332
+ import pulumi_vsphere as vsphere
333
+
334
+ datacenter = vsphere.get_datacenter(name="dc-01")
335
+ datastore = vsphere.get_datastore(name="datastore1",
336
+ datacenter_id=datacenter.id)
337
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
338
+ datacenter_id=datacenter.id)
339
+ network = vsphere.get_network(name="network1",
340
+ datacenter_id=datacenter.id)
341
+ vm = []
342
+ for range in [{"value": i} for i in range(0, 2)]:
343
+ vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
344
+ name=f"test-{range['value']}",
345
+ resource_pool_id=cluster.resource_pool_id,
346
+ datastore_id=datastore.id,
347
+ num_cpus=2,
348
+ memory=2048,
349
+ guest_id="otherLinux64Guest",
350
+ network_interfaces=[{
351
+ "network_id": network.id,
352
+ }],
353
+ disks=[{
354
+ "label": "disk0",
355
+ "size": 20,
356
+ }]))
357
+ cluster_vm_group = vsphere.ComputeClusterVmGroup("cluster_vm_group",
358
+ name="test-cluster-vm-group",
359
+ compute_cluster_id=cluster.id,
360
+ virtual_machine_ids=[[__item.id for __item in vm]])
361
+ ```
362
+
363
+ ## Import
364
+
365
+ An existing group can be imported into this resource by
366
+
367
+ supplying both the path to the cluster, and the name of the VM group. If the
368
+
369
+ name or cluster is not found, or if the group is of a different type, an error
370
+
371
+ will be returned. An example is below:
372
+
373
+ ```sh
374
+ $ pulumi import vsphere:index/computeClusterVmGroup:ComputeClusterVmGroup cluster_vm_group \\
375
+ ```
376
+
377
+ '{"compute_cluster_path": "/dc1/host/cluster1", \\
378
+
379
+ "name": "pulumi-test-cluster-vm-group"}'
380
+
195
381
  :param str resource_name: The name of the resource.
196
382
  :param ComputeClusterVmGroupArgs args: The arguments to use to populate this resource's properties.
197
383
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -256,6 +442,11 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
256
442
  `name` argument) is shared with the
257
443
  `ComputeClusterHostGroup`
258
444
  resource. Make sure your names are unique across both resources.
445
+
446
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
447
+ import section. When importing a VM group, validate that all virtual machines that
448
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
449
+ that are not in `virtual_machine_ids` the included will be removed from the group.
259
450
  """
260
451
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
261
452
 
@@ -296,6 +487,11 @@ class ComputeClusterVmGroup(pulumi.CustomResource):
296
487
  `name` argument) is shared with the
297
488
  `ComputeClusterHostGroup`
298
489
  resource. Make sure your names are unique across both resources.
490
+
491
+ > **NOTE:** To update a existing VM group, you must first import the group with `import` command in
492
+ import section. When importing a VM group, validate that all virtual machines that
493
+ need to be in the group are included in the `virtual_machine_ids`; otherwise, any virtual machines
494
+ that are not in `virtual_machine_ids` the included will be removed from the group.
299
495
  """
300
496
  return pulumi.get(self, "virtual_machine_ids")
301
497
 
@@ -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__ = ['ComputeClusterVmHostRuleArgs', 'ComputeClusterVmHostRule']
@@ -331,7 +336,40 @@ class ComputeClusterVmHostRule(pulumi.CustomResource):
331
336
  vm_group_name: Optional[pulumi.Input[str]] = None,
332
337
  __props__=None):
333
338
  """
334
- Create a ComputeClusterVmHostRule resource with the given unique name, props, and options.
339
+ The `ComputeClusterVmHostRule` resource can be used to manage
340
+ VM-to-host rules in a cluster, either created by the
341
+ `ComputeCluster` resource or looked up
342
+ by the `ComputeCluster` data source.
343
+
344
+ This resource can create both _affinity rules_, where virtual machines run on
345
+ specified hosts, or _anti-affinity_ rules, where virtual machines run on hosts
346
+ outside of the ones specified in the rule. Virtual machines and hosts are
347
+ supplied via groups, which can be managed via the
348
+ `ComputeClusterVmGroup` and
349
+ `ComputeClusterHostGroup`
350
+ resources.
351
+
352
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
353
+ connections.
354
+
355
+ ## Import
356
+
357
+ An existing rule can be imported into this resource by supplying
358
+
359
+ both the path to the cluster, and the name the rule. If the name or cluster is
360
+
361
+ not found, or if the rule is of a different type, an error will be returned. An
362
+
363
+ example is below:
364
+
365
+ ```sh
366
+ $ pulumi import vsphere:index/computeClusterVmHostRule:ComputeClusterVmHostRule cluster_vm_host_rule \\
367
+ ```
368
+
369
+ '{"compute_cluster_path": "/dc1/host/cluster1", \\
370
+
371
+ "name": "pulumi-test-cluster-vm-host-rule"}'
372
+
335
373
  :param str resource_name: The name of the resource.
336
374
  :param pulumi.ResourceOptions opts: Options for the resource.
337
375
  :param pulumi.Input[str] affinity_host_group_name: When this field is used, the virtual
@@ -366,7 +404,40 @@ class ComputeClusterVmHostRule(pulumi.CustomResource):
366
404
  args: ComputeClusterVmHostRuleArgs,
367
405
  opts: Optional[pulumi.ResourceOptions] = None):
368
406
  """
369
- Create a ComputeClusterVmHostRule resource with the given unique name, props, and options.
407
+ The `ComputeClusterVmHostRule` resource can be used to manage
408
+ VM-to-host rules in a cluster, either created by the
409
+ `ComputeCluster` resource or looked up
410
+ by the `ComputeCluster` data source.
411
+
412
+ This resource can create both _affinity rules_, where virtual machines run on
413
+ specified hosts, or _anti-affinity_ rules, where virtual machines run on hosts
414
+ outside of the ones specified in the rule. Virtual machines and hosts are
415
+ supplied via groups, which can be managed via the
416
+ `ComputeClusterVmGroup` and
417
+ `ComputeClusterHostGroup`
418
+ resources.
419
+
420
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
421
+ connections.
422
+
423
+ ## Import
424
+
425
+ An existing rule can be imported into this resource by supplying
426
+
427
+ both the path to the cluster, and the name the rule. If the name or cluster is
428
+
429
+ not found, or if the rule is of a different type, an error will be returned. An
430
+
431
+ example is below:
432
+
433
+ ```sh
434
+ $ pulumi import vsphere:index/computeClusterVmHostRule:ComputeClusterVmHostRule cluster_vm_host_rule \\
435
+ ```
436
+
437
+ '{"compute_cluster_path": "/dc1/host/cluster1", \\
438
+
439
+ "name": "pulumi-test-cluster-vm-host-rule"}'
440
+
370
441
  :param str resource_name: The name of the resource.
371
442
  :param ComputeClusterVmHostRuleArgs args: The arguments to use to populate this resource's properties.
372
443
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -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
  allowUnverifiedSsl: Optional[bool]
@@ -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
  import types
@@ -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 *
@@ -195,19 +200,67 @@ class ContentLibrary(pulumi.CustomResource):
195
200
  opts: Optional[pulumi.ResourceOptions] = None,
196
201
  description: Optional[pulumi.Input[str]] = None,
197
202
  name: Optional[pulumi.Input[str]] = None,
198
- publication: Optional[pulumi.Input[pulumi.InputType['ContentLibraryPublicationArgs']]] = None,
203
+ publication: Optional[pulumi.Input[Union['ContentLibraryPublicationArgs', 'ContentLibraryPublicationArgsDict']]] = None,
199
204
  storage_backings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
200
- subscription: Optional[pulumi.Input[pulumi.InputType['ContentLibrarySubscriptionArgs']]] = None,
205
+ subscription: Optional[pulumi.Input[Union['ContentLibrarySubscriptionArgs', 'ContentLibrarySubscriptionArgsDict']]] = None,
201
206
  __props__=None):
202
207
  """
203
- Create a ContentLibrary resource with the given unique name, props, and options.
208
+ The `ContentLibrary` resource can be used to manage content libraries.
209
+
210
+ > **NOTE:** This resource requires a vCenter Server instance and is not available on direct ESXi host connections.
211
+
212
+ ## Example Usage
213
+
214
+ The following example creates a publishing content library using the datastore named `publisher-datastore` as the storage backing.
215
+
216
+ ```python
217
+ import pulumi
218
+ import pulumi_vsphere as vsphere
219
+
220
+ datacenter_a = vsphere.get_datacenter(name="dc-01-a")
221
+ publisher_datastore = vsphere.get_datastore(name="publisher-datastore",
222
+ datacenter_id=datacenter_a.id)
223
+ publisher_content_library = vsphere.ContentLibrary("publisher_content_library",
224
+ name="Publisher Content Library",
225
+ description="A publishing content library.",
226
+ storage_backings=[publisher_datastore.id])
227
+ ```
228
+
229
+ The next example creates a subscribed content library using the URL of the publisher content library as the source and the datastore named `subscriber-datastore` as the storage backing.
230
+
231
+ ```python
232
+ import pulumi
233
+ import pulumi_vsphere as vsphere
234
+
235
+ datacenter_b = vsphere.get_datacenter(name="dc-01-b")
236
+ subscriber_datastore = vsphere.get_datastore(name="subscriber-datastore",
237
+ datacenter_id=datacenter_b.id)
238
+ subscriber_content_library = vsphere.ContentLibrary("subscriber_content_library",
239
+ name="Subscriber Content Library",
240
+ description="A subscribing content library.",
241
+ storage_backings=[subscriber_datastore.id],
242
+ subscription={
243
+ "subscription_url": "https://vc-01-a.example.com:443/cls/vcsp/lib/f42a4b25-844a-44ec-9063-a3a5e9cc88c7/lib.json",
244
+ "automatic_sync": True,
245
+ "on_demand": False,
246
+ })
247
+ ```
248
+
249
+ ## Import
250
+
251
+ An existing content library can be imported into this resource by supplying the content library ID. For example:
252
+
253
+ ```sh
254
+ $ pulumi import vsphere:index/contentLibrary:ContentLibrary vsphere_content_library publisher_content_library f42a4b25-844a-44ec-9063-a3a5e9cc88c7
255
+ ```
256
+
204
257
  :param str resource_name: The name of the resource.
205
258
  :param pulumi.ResourceOptions opts: Options for the resource.
206
259
  :param pulumi.Input[str] description: A description for the content library.
207
260
  :param pulumi.Input[str] name: The name of the content library.
208
- :param pulumi.Input[pulumi.InputType['ContentLibraryPublicationArgs']] publication: Options to publish a local content library.
261
+ :param pulumi.Input[Union['ContentLibraryPublicationArgs', 'ContentLibraryPublicationArgsDict']] publication: Options to publish a local content library.
209
262
  :param pulumi.Input[Sequence[pulumi.Input[str]]] storage_backings: The managed object reference ID of the datastore on which to store the content library items.
210
- :param pulumi.Input[pulumi.InputType['ContentLibrarySubscriptionArgs']] subscription: Options subscribe to a published content library.
263
+ :param pulumi.Input[Union['ContentLibrarySubscriptionArgs', 'ContentLibrarySubscriptionArgsDict']] subscription: Options subscribe to a published content library.
211
264
  """
212
265
  ...
213
266
  @overload
@@ -216,7 +269,55 @@ class ContentLibrary(pulumi.CustomResource):
216
269
  args: ContentLibraryArgs,
217
270
  opts: Optional[pulumi.ResourceOptions] = None):
218
271
  """
219
- Create a ContentLibrary resource with the given unique name, props, and options.
272
+ The `ContentLibrary` resource can be used to manage content libraries.
273
+
274
+ > **NOTE:** This resource requires a vCenter Server instance and is not available on direct ESXi host connections.
275
+
276
+ ## Example Usage
277
+
278
+ The following example creates a publishing content library using the datastore named `publisher-datastore` as the storage backing.
279
+
280
+ ```python
281
+ import pulumi
282
+ import pulumi_vsphere as vsphere
283
+
284
+ datacenter_a = vsphere.get_datacenter(name="dc-01-a")
285
+ publisher_datastore = vsphere.get_datastore(name="publisher-datastore",
286
+ datacenter_id=datacenter_a.id)
287
+ publisher_content_library = vsphere.ContentLibrary("publisher_content_library",
288
+ name="Publisher Content Library",
289
+ description="A publishing content library.",
290
+ storage_backings=[publisher_datastore.id])
291
+ ```
292
+
293
+ The next example creates a subscribed content library using the URL of the publisher content library as the source and the datastore named `subscriber-datastore` as the storage backing.
294
+
295
+ ```python
296
+ import pulumi
297
+ import pulumi_vsphere as vsphere
298
+
299
+ datacenter_b = vsphere.get_datacenter(name="dc-01-b")
300
+ subscriber_datastore = vsphere.get_datastore(name="subscriber-datastore",
301
+ datacenter_id=datacenter_b.id)
302
+ subscriber_content_library = vsphere.ContentLibrary("subscriber_content_library",
303
+ name="Subscriber Content Library",
304
+ description="A subscribing content library.",
305
+ storage_backings=[subscriber_datastore.id],
306
+ subscription={
307
+ "subscription_url": "https://vc-01-a.example.com:443/cls/vcsp/lib/f42a4b25-844a-44ec-9063-a3a5e9cc88c7/lib.json",
308
+ "automatic_sync": True,
309
+ "on_demand": False,
310
+ })
311
+ ```
312
+
313
+ ## Import
314
+
315
+ An existing content library can be imported into this resource by supplying the content library ID. For example:
316
+
317
+ ```sh
318
+ $ pulumi import vsphere:index/contentLibrary:ContentLibrary vsphere_content_library publisher_content_library f42a4b25-844a-44ec-9063-a3a5e9cc88c7
319
+ ```
320
+
220
321
  :param str resource_name: The name of the resource.
221
322
  :param ContentLibraryArgs args: The arguments to use to populate this resource's properties.
222
323
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -234,9 +335,9 @@ class ContentLibrary(pulumi.CustomResource):
234
335
  opts: Optional[pulumi.ResourceOptions] = None,
235
336
  description: Optional[pulumi.Input[str]] = None,
236
337
  name: Optional[pulumi.Input[str]] = None,
237
- publication: Optional[pulumi.Input[pulumi.InputType['ContentLibraryPublicationArgs']]] = None,
338
+ publication: Optional[pulumi.Input[Union['ContentLibraryPublicationArgs', 'ContentLibraryPublicationArgsDict']]] = None,
238
339
  storage_backings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
239
- subscription: Optional[pulumi.Input[pulumi.InputType['ContentLibrarySubscriptionArgs']]] = None,
340
+ subscription: Optional[pulumi.Input[Union['ContentLibrarySubscriptionArgs', 'ContentLibrarySubscriptionArgsDict']]] = None,
240
341
  __props__=None):
241
342
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
242
343
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -265,9 +366,9 @@ class ContentLibrary(pulumi.CustomResource):
265
366
  opts: Optional[pulumi.ResourceOptions] = None,
266
367
  description: Optional[pulumi.Input[str]] = None,
267
368
  name: Optional[pulumi.Input[str]] = None,
268
- publication: Optional[pulumi.Input[pulumi.InputType['ContentLibraryPublicationArgs']]] = None,
369
+ publication: Optional[pulumi.Input[Union['ContentLibraryPublicationArgs', 'ContentLibraryPublicationArgsDict']]] = None,
269
370
  storage_backings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
270
- subscription: Optional[pulumi.Input[pulumi.InputType['ContentLibrarySubscriptionArgs']]] = None) -> 'ContentLibrary':
371
+ subscription: Optional[pulumi.Input[Union['ContentLibrarySubscriptionArgs', 'ContentLibrarySubscriptionArgsDict']]] = None) -> 'ContentLibrary':
271
372
  """
272
373
  Get an existing ContentLibrary resource's state with the given name, id, and optional extra
273
374
  properties used to qualify the lookup.
@@ -277,9 +378,9 @@ class ContentLibrary(pulumi.CustomResource):
277
378
  :param pulumi.ResourceOptions opts: Options for the resource.
278
379
  :param pulumi.Input[str] description: A description for the content library.
279
380
  :param pulumi.Input[str] name: The name of the content library.
280
- :param pulumi.Input[pulumi.InputType['ContentLibraryPublicationArgs']] publication: Options to publish a local content library.
381
+ :param pulumi.Input[Union['ContentLibraryPublicationArgs', 'ContentLibraryPublicationArgsDict']] publication: Options to publish a local content library.
281
382
  :param pulumi.Input[Sequence[pulumi.Input[str]]] storage_backings: The managed object reference ID of the datastore on which to store the content library items.
282
- :param pulumi.Input[pulumi.InputType['ContentLibrarySubscriptionArgs']] subscription: Options subscribe to a published content library.
383
+ :param pulumi.Input[Union['ContentLibrarySubscriptionArgs', 'ContentLibrarySubscriptionArgsDict']] subscription: Options subscribe to a published content library.
283
384
  """
284
385
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
285
386