pulumi-vsphere 4.10.0a1710245029__py3-none-any.whl → 4.13.0a1736849827__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.
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.0a1736849827.dist-info}/METADATA +7 -6
  82. pulumi_vsphere-4.13.0a1736849827.dist-info/RECORD +86 -0
  83. {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736849827.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.0a1736849827.dist-info}/top_level.txt +0 -0
pulumi_vsphere/folder.py CHANGED
@@ -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__ = ['FolderArgs', 'Folder']
@@ -36,7 +41,7 @@ class FolderArgs:
36
41
  `datacenter` for datacenter folders, `host` for host and cluster folders,
37
42
  `vm` for virtual machine folders, `datastore` for datastore folders, and
38
43
  `network` for network folders. Forces a new resource if changed.
39
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
44
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
40
45
  value strings to set for folder. See [here][docs-setting-custom-attributes]
41
46
  for a reference on how to set values for custom attributes.
42
47
 
@@ -48,9 +53,6 @@ class FolderArgs:
48
53
  Required for all folder types except for datacenter folders. Forces a new
49
54
  resource if changed.
50
55
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
51
-
52
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
53
- requires vCenter 6.0 or higher.
54
56
  """
55
57
  pulumi.set(__self__, "path", path)
56
58
  pulumi.set(__self__, "type", type)
@@ -102,7 +104,7 @@ class FolderArgs:
102
104
  @pulumi.getter(name="customAttributes")
103
105
  def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
104
106
  """
105
- Map of custom attribute ids to attribute
107
+ Map of custom attribute ids to attribute
106
108
  value strings to set for folder. See [here][docs-setting-custom-attributes]
107
109
  for a reference on how to set values for custom attributes.
108
110
 
@@ -136,9 +138,6 @@ class FolderArgs:
136
138
  def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
137
139
  """
138
140
  The IDs of any tags to attach to this resource.
139
-
140
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
141
- requires vCenter 6.0 or higher.
142
141
  """
143
142
  return pulumi.get(self, "tags")
144
143
 
@@ -157,7 +156,7 @@ class _FolderState:
157
156
  type: Optional[pulumi.Input[str]] = None):
158
157
  """
159
158
  Input properties used for looking up and filtering Folder resources.
160
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
159
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
161
160
  value strings to set for folder. See [here][docs-setting-custom-attributes]
162
161
  for a reference on how to set values for custom attributes.
163
162
 
@@ -180,9 +179,6 @@ class _FolderState:
180
179
  any part before the last `/`), your folder will be moved to that new parent. If
181
180
  modifying the name (the part after the last `/`), your folder will be renamed.
182
181
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
183
-
184
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
185
- requires vCenter 6.0 or higher.
186
182
  :param pulumi.Input[str] type: The type of folder to create. Allowed options are
187
183
  `datacenter` for datacenter folders, `host` for host and cluster folders,
188
184
  `vm` for virtual machine folders, `datastore` for datastore folders, and
@@ -203,7 +199,7 @@ class _FolderState:
203
199
  @pulumi.getter(name="customAttributes")
204
200
  def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
205
201
  """
206
- Map of custom attribute ids to attribute
202
+ Map of custom attribute ids to attribute
207
203
  value strings to set for folder. See [here][docs-setting-custom-attributes]
208
204
  for a reference on how to set values for custom attributes.
209
205
 
@@ -259,9 +255,6 @@ class _FolderState:
259
255
  def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
260
256
  """
261
257
  The IDs of any tags to attach to this resource.
262
-
263
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
264
- requires vCenter 6.0 or higher.
265
258
  """
266
259
  return pulumi.get(self, "tags")
267
260
 
@@ -297,10 +290,77 @@ class Folder(pulumi.CustomResource):
297
290
  type: Optional[pulumi.Input[str]] = None,
298
291
  __props__=None):
299
292
  """
300
- Create a Folder resource with the given unique name, props, and options.
293
+ The `Folder` resource can be used to manage vSphere inventory folders.
294
+ The resource supports creating folders of the 5 major types - datacenter
295
+ folders, host and cluster folders, virtual machine folders, storage folders,
296
+ and network folders.
297
+
298
+ Paths are always relative to the specific type of folder you are creating.
299
+ A subfolder is discovered by parsing the relative path specified in `path`, so
300
+ `foo/bar` will create a folder named `bar` in the parent folder `foo`, as long
301
+ as that folder exists.
302
+
303
+ ## Example Usage
304
+
305
+ The basic example below creates a virtual machine folder named
306
+ `test-folder` in the default datacenter's VM hierarchy.
307
+
308
+ ```python
309
+ import pulumi
310
+ import pulumi_vsphere as vsphere
311
+
312
+ datacenter = vsphere.get_datacenter()
313
+ folder = vsphere.Folder("folder",
314
+ path="test-folder",
315
+ type="vm",
316
+ datacenter_id=datacenter.id)
317
+ ```
318
+
319
+ ### Example with subfolders
320
+
321
+ The below example builds off of the above by first creating a folder named
322
+ `test-parent`, and then locating `test-folder` in that
323
+ folder. To ensure the parent is created first, we create an interpolation
324
+ dependency off the parent's `path` attribute.
325
+
326
+ Note that if you change parents (for example, went from the above basic
327
+ configuration to this one), your folder will be moved to be under the correct
328
+ parent.
329
+
330
+ ```python
331
+ import pulumi
332
+ import pulumi_vsphere as vsphere
333
+
334
+ datacenter = vsphere.get_datacenter()
335
+ parent = vsphere.Folder("parent",
336
+ path="test-parent",
337
+ type="vm",
338
+ datacenter_id=datacenter.id)
339
+ folder = vsphere.Folder("folder",
340
+ path=parent.path.apply(lambda path: f"{path}/test-folder"),
341
+ type="vm",
342
+ datacenter_id=datacenter.id)
343
+ ```
344
+
345
+ ## Import
346
+
347
+ An existing folder can be imported into this resource via
348
+
349
+ its full path, via the following command:
350
+
351
+ ```sh
352
+ $ pulumi import vsphere:index/folder:Folder folder /default-dc/vm/terraform-test-folder
353
+ ```
354
+
355
+ The above command would import the folder from our examples above, the VM
356
+
357
+ folder named `terraform-test-folder` located in the datacenter named
358
+
359
+ `default-dc`.
360
+
301
361
  :param str resource_name: The name of the resource.
302
362
  :param pulumi.ResourceOptions opts: Options for the resource.
303
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
363
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
304
364
  value strings to set for folder. See [here][docs-setting-custom-attributes]
305
365
  for a reference on how to set values for custom attributes.
306
366
 
@@ -323,9 +383,6 @@ class Folder(pulumi.CustomResource):
323
383
  any part before the last `/`), your folder will be moved to that new parent. If
324
384
  modifying the name (the part after the last `/`), your folder will be renamed.
325
385
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
326
-
327
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
328
- requires vCenter 6.0 or higher.
329
386
  :param pulumi.Input[str] type: The type of folder to create. Allowed options are
330
387
  `datacenter` for datacenter folders, `host` for host and cluster folders,
331
388
  `vm` for virtual machine folders, `datastore` for datastore folders, and
@@ -338,7 +395,74 @@ class Folder(pulumi.CustomResource):
338
395
  args: FolderArgs,
339
396
  opts: Optional[pulumi.ResourceOptions] = None):
340
397
  """
341
- Create a Folder resource with the given unique name, props, and options.
398
+ The `Folder` resource can be used to manage vSphere inventory folders.
399
+ The resource supports creating folders of the 5 major types - datacenter
400
+ folders, host and cluster folders, virtual machine folders, storage folders,
401
+ and network folders.
402
+
403
+ Paths are always relative to the specific type of folder you are creating.
404
+ A subfolder is discovered by parsing the relative path specified in `path`, so
405
+ `foo/bar` will create a folder named `bar` in the parent folder `foo`, as long
406
+ as that folder exists.
407
+
408
+ ## Example Usage
409
+
410
+ The basic example below creates a virtual machine folder named
411
+ `test-folder` in the default datacenter's VM hierarchy.
412
+
413
+ ```python
414
+ import pulumi
415
+ import pulumi_vsphere as vsphere
416
+
417
+ datacenter = vsphere.get_datacenter()
418
+ folder = vsphere.Folder("folder",
419
+ path="test-folder",
420
+ type="vm",
421
+ datacenter_id=datacenter.id)
422
+ ```
423
+
424
+ ### Example with subfolders
425
+
426
+ The below example builds off of the above by first creating a folder named
427
+ `test-parent`, and then locating `test-folder` in that
428
+ folder. To ensure the parent is created first, we create an interpolation
429
+ dependency off the parent's `path` attribute.
430
+
431
+ Note that if you change parents (for example, went from the above basic
432
+ configuration to this one), your folder will be moved to be under the correct
433
+ parent.
434
+
435
+ ```python
436
+ import pulumi
437
+ import pulumi_vsphere as vsphere
438
+
439
+ datacenter = vsphere.get_datacenter()
440
+ parent = vsphere.Folder("parent",
441
+ path="test-parent",
442
+ type="vm",
443
+ datacenter_id=datacenter.id)
444
+ folder = vsphere.Folder("folder",
445
+ path=parent.path.apply(lambda path: f"{path}/test-folder"),
446
+ type="vm",
447
+ datacenter_id=datacenter.id)
448
+ ```
449
+
450
+ ## Import
451
+
452
+ An existing folder can be imported into this resource via
453
+
454
+ its full path, via the following command:
455
+
456
+ ```sh
457
+ $ pulumi import vsphere:index/folder:Folder folder /default-dc/vm/terraform-test-folder
458
+ ```
459
+
460
+ The above command would import the folder from our examples above, the VM
461
+
462
+ folder named `terraform-test-folder` located in the datacenter named
463
+
464
+ `default-dc`.
465
+
342
466
  :param str resource_name: The name of the resource.
343
467
  :param FolderArgs args: The arguments to use to populate this resource's properties.
344
468
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -399,7 +523,7 @@ class Folder(pulumi.CustomResource):
399
523
  :param str resource_name: The unique name of the resulting resource.
400
524
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
401
525
  :param pulumi.ResourceOptions opts: Options for the resource.
402
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
526
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
403
527
  value strings to set for folder. See [here][docs-setting-custom-attributes]
404
528
  for a reference on how to set values for custom attributes.
405
529
 
@@ -422,9 +546,6 @@ class Folder(pulumi.CustomResource):
422
546
  any part before the last `/`), your folder will be moved to that new parent. If
423
547
  modifying the name (the part after the last `/`), your folder will be renamed.
424
548
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
425
-
426
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
427
- requires vCenter 6.0 or higher.
428
549
  :param pulumi.Input[str] type: The type of folder to create. Allowed options are
429
550
  `datacenter` for datacenter folders, `host` for host and cluster folders,
430
551
  `vm` for virtual machine folders, `datastore` for datastore folders, and
@@ -445,7 +566,7 @@ class Folder(pulumi.CustomResource):
445
566
  @pulumi.getter(name="customAttributes")
446
567
  def custom_attributes(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
447
568
  """
448
- Map of custom attribute ids to attribute
569
+ Map of custom attribute ids to attribute
449
570
  value strings to set for folder. See [here][docs-setting-custom-attributes]
450
571
  for a reference on how to set values for custom attributes.
451
572
 
@@ -489,9 +610,6 @@ class Folder(pulumi.CustomResource):
489
610
  def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
490
611
  """
491
612
  The IDs of any tags to attach to this resource.
492
-
493
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
494
- requires vCenter 6.0 or higher.
495
613
  """
496
614
  return pulumi.get(self, "tags")
497
615
 
@@ -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__ = [
@@ -91,7 +96,6 @@ def get_compute_cluster(datacenter_id: Optional[str] = None,
91
96
 
92
97
  ## Example Usage
93
98
 
94
- <!--Start PulumiCodeChooser -->
95
99
  ```python
96
100
  import pulumi
97
101
  import pulumi_vsphere as vsphere
@@ -100,7 +104,6 @@ def get_compute_cluster(datacenter_id: Optional[str] = None,
100
104
  compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
101
105
  datacenter_id=datacenter.id)
102
106
  ```
103
- <!--End PulumiCodeChooser -->
104
107
 
105
108
 
106
109
  :param str datacenter_id: The managed object reference ID
@@ -120,12 +123,9 @@ def get_compute_cluster(datacenter_id: Optional[str] = None,
120
123
  id=pulumi.get(__ret__, 'id'),
121
124
  name=pulumi.get(__ret__, 'name'),
122
125
  resource_pool_id=pulumi.get(__ret__, 'resource_pool_id'))
123
-
124
-
125
- @_utilities.lift_output_func(get_compute_cluster)
126
126
  def get_compute_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = None,
127
127
  name: Optional[pulumi.Input[str]] = None,
128
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetComputeClusterResult]:
128
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetComputeClusterResult]:
129
129
  """
130
130
  The `ComputeCluster` data source can be used to discover the ID of a
131
131
  cluster in vSphere. This is useful to fetch the ID of a cluster that you want
@@ -139,7 +139,6 @@ def get_compute_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[str
139
139
 
140
140
  ## Example Usage
141
141
 
142
- <!--Start PulumiCodeChooser -->
143
142
  ```python
144
143
  import pulumi
145
144
  import pulumi_vsphere as vsphere
@@ -148,7 +147,6 @@ def get_compute_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[str
148
147
  compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
149
148
  datacenter_id=datacenter.id)
150
149
  ```
151
- <!--End PulumiCodeChooser -->
152
150
 
153
151
 
154
152
  :param str datacenter_id: The managed object reference ID
@@ -157,4 +155,13 @@ def get_compute_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[str
157
155
  use the `id` attribute from an empty `Datacenter` data source.
158
156
  :param str name: The name or absolute path to the cluster.
159
157
  """
160
- ...
158
+ __args__ = dict()
159
+ __args__['datacenterId'] = datacenter_id
160
+ __args__['name'] = name
161
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
162
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getComputeCluster:getComputeCluster', __args__, opts=opts, typ=GetComputeClusterResult)
163
+ return __ret__.apply(lambda __response__: GetComputeClusterResult(
164
+ datacenter_id=pulumi.get(__response__, 'datacenter_id'),
165
+ id=pulumi.get(__response__, 'id'),
166
+ name=pulumi.get(__response__, 'name'),
167
+ resource_pool_id=pulumi.get(__response__, 'resource_pool_id')))
@@ -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__ = [
@@ -85,26 +90,26 @@ def get_compute_cluster_host_group(compute_cluster_id: Optional[str] = None,
85
90
 
86
91
  ## Example Usage
87
92
 
88
- <!--Start PulumiCodeChooser -->
89
93
  ```python
90
94
  import pulumi
91
95
  import pulumi_vsphere as vsphere
92
96
 
93
- datacenter = vsphere.get_datacenter(name=var["vsphere_datacenter"])
94
- cluster = vsphere.get_compute_cluster(name=var["vsphere_cluster"],
97
+ datacenter = vsphere.get_datacenter(name="dc-01")
98
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
95
99
  datacenter_id=datacenter.id)
96
- host_group1 = vsphere.get_compute_cluster_host_group(name="host_group1",
100
+ host_group = vsphere.get_compute_cluster_host_group(name="hostgroup-01",
97
101
  compute_cluster_id=cluster.id)
98
- host_rule1 = vsphere.ComputeClusterVmHostRule("hostRule1",
102
+ host_rule = vsphere.ComputeClusterVmHostRule("host_rule",
99
103
  compute_cluster_id=cluster.id,
100
- vm_group_name="vm_group1",
101
- affinity_host_group_name=host_group1.name)
104
+ name="pulumi-host-rule1",
105
+ vm_group_name="vmgroup-01",
106
+ affinity_host_group_name=host_group.name)
102
107
  ```
103
- <!--End PulumiCodeChooser -->
104
108
 
105
109
 
106
- :param str compute_cluster_id: The [managed object reference ID][docs-about-morefs]
107
- of the compute cluster for the host group.
110
+ :param str compute_cluster_id: The
111
+ [managed object reference ID][docs-about-morefs] of the compute cluster for
112
+ the host group.
108
113
 
109
114
  [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
110
115
  :param str name: The name of the host group.
@@ -120,12 +125,9 @@ def get_compute_cluster_host_group(compute_cluster_id: Optional[str] = None,
120
125
  host_system_ids=pulumi.get(__ret__, 'host_system_ids'),
121
126
  id=pulumi.get(__ret__, 'id'),
122
127
  name=pulumi.get(__ret__, 'name'))
123
-
124
-
125
- @_utilities.lift_output_func(get_compute_cluster_host_group)
126
128
  def get_compute_cluster_host_group_output(compute_cluster_id: Optional[pulumi.Input[str]] = None,
127
129
  name: Optional[pulumi.Input[str]] = None,
128
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetComputeClusterHostGroupResult]:
130
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetComputeClusterHostGroupResult]:
129
131
  """
130
132
  The `ComputeClusterHostGroup` data source can be used to discover
131
133
  the IDs ESXi hosts in a host group and return host group attributes to other
@@ -133,28 +135,37 @@ def get_compute_cluster_host_group_output(compute_cluster_id: Optional[pulumi.In
133
135
 
134
136
  ## Example Usage
135
137
 
136
- <!--Start PulumiCodeChooser -->
137
138
  ```python
138
139
  import pulumi
139
140
  import pulumi_vsphere as vsphere
140
141
 
141
- datacenter = vsphere.get_datacenter(name=var["vsphere_datacenter"])
142
- cluster = vsphere.get_compute_cluster(name=var["vsphere_cluster"],
142
+ datacenter = vsphere.get_datacenter(name="dc-01")
143
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
143
144
  datacenter_id=datacenter.id)
144
- host_group1 = vsphere.get_compute_cluster_host_group(name="host_group1",
145
+ host_group = vsphere.get_compute_cluster_host_group(name="hostgroup-01",
145
146
  compute_cluster_id=cluster.id)
146
- host_rule1 = vsphere.ComputeClusterVmHostRule("hostRule1",
147
+ host_rule = vsphere.ComputeClusterVmHostRule("host_rule",
147
148
  compute_cluster_id=cluster.id,
148
- vm_group_name="vm_group1",
149
- affinity_host_group_name=host_group1.name)
149
+ name="pulumi-host-rule1",
150
+ vm_group_name="vmgroup-01",
151
+ affinity_host_group_name=host_group.name)
150
152
  ```
151
- <!--End PulumiCodeChooser -->
152
153
 
153
154
 
154
- :param str compute_cluster_id: The [managed object reference ID][docs-about-morefs]
155
- of the compute cluster for the host group.
155
+ :param str compute_cluster_id: The
156
+ [managed object reference ID][docs-about-morefs] of the compute cluster for
157
+ the host group.
156
158
 
157
159
  [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
158
160
  :param str name: The name of the host group.
159
161
  """
160
- ...
162
+ __args__ = dict()
163
+ __args__['computeClusterId'] = compute_cluster_id
164
+ __args__['name'] = name
165
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
166
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getComputeClusterHostGroup:getComputeClusterHostGroup', __args__, opts=opts, typ=GetComputeClusterHostGroupResult)
167
+ return __ret__.apply(lambda __response__: GetComputeClusterHostGroupResult(
168
+ compute_cluster_id=pulumi.get(__response__, 'compute_cluster_id'),
169
+ host_system_ids=pulumi.get(__response__, 'host_system_ids'),
170
+ id=pulumi.get(__response__, 'id'),
171
+ name=pulumi.get(__response__, 'name')))
@@ -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__ = [
@@ -56,20 +61,20 @@ class AwaitableGetContentLibraryResult(GetContentLibraryResult):
56
61
  def get_content_library(name: Optional[str] = None,
57
62
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetContentLibraryResult:
58
63
  """
59
- The `ContentLibrary` data source can be used to discover the ID of a content library.
64
+ The `ContentLibrary` data source can be used to discover the ID of a
65
+ content library.
60
66
 
61
- > **NOTE:** This resource requires vCenter Server and is not available on direct ESXi host connections.
67
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
68
+ host connections.
62
69
 
63
70
  ## Example Usage
64
71
 
65
- <!--Start PulumiCodeChooser -->
66
72
  ```python
67
73
  import pulumi
68
74
  import pulumi_vsphere as vsphere
69
75
 
70
- library = vsphere.get_content_library(name="Content Library")
76
+ content_library = vsphere.get_content_library(name="Content Library")
71
77
  ```
72
- <!--End PulumiCodeChooser -->
73
78
 
74
79
 
75
80
  :param str name: The name of the content library.
@@ -82,28 +87,31 @@ def get_content_library(name: Optional[str] = None,
82
87
  return AwaitableGetContentLibraryResult(
83
88
  id=pulumi.get(__ret__, 'id'),
84
89
  name=pulumi.get(__ret__, 'name'))
85
-
86
-
87
- @_utilities.lift_output_func(get_content_library)
88
90
  def get_content_library_output(name: Optional[pulumi.Input[str]] = None,
89
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetContentLibraryResult]:
91
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetContentLibraryResult]:
90
92
  """
91
- The `ContentLibrary` data source can be used to discover the ID of a content library.
93
+ The `ContentLibrary` data source can be used to discover the ID of a
94
+ content library.
92
95
 
93
- > **NOTE:** This resource requires vCenter Server and is not available on direct ESXi host connections.
96
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
97
+ host connections.
94
98
 
95
99
  ## Example Usage
96
100
 
97
- <!--Start PulumiCodeChooser -->
98
101
  ```python
99
102
  import pulumi
100
103
  import pulumi_vsphere as vsphere
101
104
 
102
- library = vsphere.get_content_library(name="Content Library")
105
+ content_library = vsphere.get_content_library(name="Content Library")
103
106
  ```
104
- <!--End PulumiCodeChooser -->
105
107
 
106
108
 
107
109
  :param str name: The name of the content library.
108
110
  """
109
- ...
111
+ __args__ = dict()
112
+ __args__['name'] = name
113
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
114
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getContentLibrary:getContentLibrary', __args__, opts=opts, typ=GetContentLibraryResult)
115
+ return __ret__.apply(lambda __response__: GetContentLibraryResult(
116
+ id=pulumi.get(__response__, 'id'),
117
+ name=pulumi.get(__response__, 'name')))
@@ -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__ = [
@@ -79,13 +84,15 @@ def get_content_library_item(library_id: Optional[str] = None,
79
84
  The `ContentLibraryItem` data source can be used to discover the ID
80
85
  of a content library item.
81
86
 
82
- > **NOTE:** This resource requires vCenter Server and is not available on
83
- direct ESXi host connections.
87
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
88
+ host connections.
84
89
 
85
90
 
86
- :param str library_id: The ID of the content library in which the item exists.
91
+ :param str library_id: The ID of the content library in which the item
92
+ exists.
87
93
  :param str name: The name of the content library item.
88
- :param str type: The type for the content library item. One of `ovf`, `vm-template`, or `iso`
94
+ :param str type: The type for the content library item. One of `ovf`,
95
+ `vm-template`, or `iso`
89
96
  """
90
97
  __args__ = dict()
91
98
  __args__['libraryId'] = library_id
@@ -99,23 +106,32 @@ def get_content_library_item(library_id: Optional[str] = None,
99
106
  library_id=pulumi.get(__ret__, 'library_id'),
100
107
  name=pulumi.get(__ret__, 'name'),
101
108
  type=pulumi.get(__ret__, 'type'))
102
-
103
-
104
- @_utilities.lift_output_func(get_content_library_item)
105
109
  def get_content_library_item_output(library_id: Optional[pulumi.Input[str]] = None,
106
110
  name: Optional[pulumi.Input[str]] = None,
107
111
  type: Optional[pulumi.Input[str]] = None,
108
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetContentLibraryItemResult]:
112
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetContentLibraryItemResult]:
109
113
  """
110
114
  The `ContentLibraryItem` data source can be used to discover the ID
111
115
  of a content library item.
112
116
 
113
- > **NOTE:** This resource requires vCenter Server and is not available on
114
- direct ESXi host connections.
117
+ > **NOTE:** This resource requires vCenter and is not available on direct ESXi
118
+ host connections.
115
119
 
116
120
 
117
- :param str library_id: The ID of the content library in which the item exists.
121
+ :param str library_id: The ID of the content library in which the item
122
+ exists.
118
123
  :param str name: The name of the content library item.
119
- :param str type: The type for the content library item. One of `ovf`, `vm-template`, or `iso`
124
+ :param str type: The type for the content library item. One of `ovf`,
125
+ `vm-template`, or `iso`
120
126
  """
121
- ...
127
+ __args__ = dict()
128
+ __args__['libraryId'] = library_id
129
+ __args__['name'] = name
130
+ __args__['type'] = type
131
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
132
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getContentLibraryItem:getContentLibraryItem', __args__, opts=opts, typ=GetContentLibraryItemResult)
133
+ return __ret__.apply(lambda __response__: GetContentLibraryItemResult(
134
+ id=pulumi.get(__response__, 'id'),
135
+ library_id=pulumi.get(__response__, 'library_id'),
136
+ name=pulumi.get(__response__, 'name'),
137
+ type=pulumi.get(__response__, 'type')))