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
pulumi_vsphere/tag.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__ = ['TagArgs', 'Tag']
@@ -140,7 +145,83 @@ class Tag(pulumi.CustomResource):
140
145
  name: Optional[pulumi.Input[str]] = None,
141
146
  __props__=None):
142
147
  """
143
- Create a Tag resource with the given unique name, props, and options.
148
+ The `Tag` resource can be used to create and manage tags, which allow
149
+ you to attach metadata to objects in the vSphere inventory to make these
150
+ objects more sortable and searchable.
151
+
152
+ For more information about tags, click [here][ext-tags-general].
153
+
154
+ [ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
155
+
156
+ ## Example Usage
157
+
158
+ This example creates a tag named `test-tag`. This tag is assigned the
159
+ `test-category` category, which was created by the
160
+ `TagCategory` resource. The resulting
161
+ tag can be assigned to VMs and datastores only, and can be the only value in
162
+ the category that can be assigned, as per the restrictions defined by the
163
+ category.
164
+
165
+ ```python
166
+ import pulumi
167
+ import pulumi_vsphere as vsphere
168
+
169
+ category = vsphere.TagCategory("category",
170
+ name="test-category",
171
+ cardinality="SINGLE",
172
+ description="Managed by Pulumi",
173
+ associable_types=[
174
+ "VirtualMachine",
175
+ "Datastore",
176
+ ])
177
+ tag = vsphere.Tag("tag",
178
+ name="test-tag",
179
+ category_id=category.id,
180
+ description="Managed by Pulumi")
181
+ ```
182
+
183
+ ### Using Tags in a Supported Resource
184
+
185
+ Tags can be applied to vSphere resources via the `tags` argument
186
+ in any supported resource.
187
+
188
+ The following example builds on the above example by creating a
189
+ `VirtualMachine` and applying the
190
+ created tag to it:
191
+
192
+ ```python
193
+ import pulumi
194
+ import pulumi_vsphere as vsphere
195
+
196
+ category = vsphere.TagCategory("category",
197
+ name="test-category",
198
+ cardinality="SINGLE",
199
+ description="Managed by Pulumi",
200
+ associable_types=[
201
+ "VirtualMachine",
202
+ "Datastore",
203
+ ])
204
+ tag = vsphere.Tag("tag",
205
+ name="test-tag",
206
+ category_id=category.id,
207
+ description="Managed by Pulumi")
208
+ web = vsphere.VirtualMachine("web", tags=[tag.id])
209
+ ```
210
+
211
+ ## Import
212
+
213
+ An existing tag can be imported into this resource by supplying
214
+
215
+ both the tag's category name and the name of the tag as a JSON string to
216
+
217
+ `pulumi import`, as per the example below:
218
+
219
+ ```sh
220
+ $ pulumi import vsphere:index/tag:Tag tag \\
221
+ ```
222
+
223
+ '{"category_name": "pulumi-test-category", "tag_name": "pulumi-test-tag"}'
224
+
144
225
  :param str resource_name: The name of the resource.
145
226
  :param pulumi.ResourceOptions opts: Options for the resource.
146
227
  :param pulumi.Input[str] category_id: The unique identifier of the parent category in
@@ -156,7 +237,83 @@ class Tag(pulumi.CustomResource):
156
237
  args: TagArgs,
157
238
  opts: Optional[pulumi.ResourceOptions] = None):
158
239
  """
159
- Create a Tag resource with the given unique name, props, and options.
240
+ The `Tag` resource can be used to create and manage tags, which allow
241
+ you to attach metadata to objects in the vSphere inventory to make these
242
+ objects more sortable and searchable.
243
+
244
+ For more information about tags, click [here][ext-tags-general].
245
+
246
+ [ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
247
+
248
+ ## Example Usage
249
+
250
+ This example creates a tag named `test-tag`. This tag is assigned the
251
+ `test-category` category, which was created by the
252
+ `TagCategory` resource. The resulting
253
+ tag can be assigned to VMs and datastores only, and can be the only value in
254
+ the category that can be assigned, as per the restrictions defined by the
255
+ category.
256
+
257
+ ```python
258
+ import pulumi
259
+ import pulumi_vsphere as vsphere
260
+
261
+ category = vsphere.TagCategory("category",
262
+ name="test-category",
263
+ cardinality="SINGLE",
264
+ description="Managed by Pulumi",
265
+ associable_types=[
266
+ "VirtualMachine",
267
+ "Datastore",
268
+ ])
269
+ tag = vsphere.Tag("tag",
270
+ name="test-tag",
271
+ category_id=category.id,
272
+ description="Managed by Pulumi")
273
+ ```
274
+
275
+ ### Using Tags in a Supported Resource
276
+
277
+ Tags can be applied to vSphere resources via the `tags` argument
278
+ in any supported resource.
279
+
280
+ The following example builds on the above example by creating a
281
+ `VirtualMachine` and applying the
282
+ created tag to it:
283
+
284
+ ```python
285
+ import pulumi
286
+ import pulumi_vsphere as vsphere
287
+
288
+ category = vsphere.TagCategory("category",
289
+ name="test-category",
290
+ cardinality="SINGLE",
291
+ description="Managed by Pulumi",
292
+ associable_types=[
293
+ "VirtualMachine",
294
+ "Datastore",
295
+ ])
296
+ tag = vsphere.Tag("tag",
297
+ name="test-tag",
298
+ category_id=category.id,
299
+ description="Managed by Pulumi")
300
+ web = vsphere.VirtualMachine("web", tags=[tag.id])
301
+ ```
302
+
303
+ ## Import
304
+
305
+ An existing tag can be imported into this resource by supplying
306
+
307
+ both the tag's category name and the name of the tag as a JSON string to
308
+
309
+ `pulumi import`, as per the example below:
310
+
311
+ ```sh
312
+ $ pulumi import vsphere:index/tag:Tag tag \\
313
+ ```
314
+
315
+ '{"category_name": "pulumi-test-category", "tag_name": "pulumi-test-tag"}'
316
+
160
317
  :param str resource_name: The name of the resource.
161
318
  :param TagArgs args: The arguments to use to populate this resource's properties.
162
319
  :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
  __all__ = ['TagCategoryArgs', 'TagCategory']
@@ -196,7 +201,45 @@ class TagCategory(pulumi.CustomResource):
196
201
  name: Optional[pulumi.Input[str]] = None,
197
202
  __props__=None):
198
203
  """
199
- Create a TagCategory resource with the given unique name, props, and options.
204
+ The `TagCategory` resource can be used to create and manage tag
205
+ categories, which determine how tags are grouped together and applied to
206
+ specific objects.
207
+
208
+ For more information about tags, click [here][ext-tags-general].
209
+
210
+ [ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
211
+
212
+ ## Example Usage
213
+
214
+ This example creates a tag category named `test-category`, with
215
+ single cardinality (meaning that only one tag in this category can be assigned
216
+ to an object at any given time). Tags in this category can only be assigned to
217
+ VMs and datastores.
218
+
219
+ ```python
220
+ import pulumi
221
+ import pulumi_vsphere as vsphere
222
+
223
+ category = vsphere.TagCategory("category",
224
+ name="test-category",
225
+ description="Managed by Pulumi",
226
+ cardinality="SINGLE",
227
+ associable_types=[
228
+ "VirtualMachine",
229
+ "Datastore",
230
+ ])
231
+ ```
232
+
233
+ ## Import
234
+
235
+ An existing tag category can be imported into this resource via
236
+
237
+ its name, using the following command:
238
+
239
+ ```sh
240
+ $ pulumi import vsphere:index/tagCategory:TagCategory category terraform-test-category
241
+ ```
242
+
200
243
  :param str resource_name: The name of the resource.
201
244
  :param pulumi.ResourceOptions opts: Options for the resource.
202
245
  :param pulumi.Input[Sequence[pulumi.Input[str]]] associable_types: A list object types that this category is
@@ -219,7 +262,45 @@ class TagCategory(pulumi.CustomResource):
219
262
  args: TagCategoryArgs,
220
263
  opts: Optional[pulumi.ResourceOptions] = None):
221
264
  """
222
- Create a TagCategory resource with the given unique name, props, and options.
265
+ The `TagCategory` resource can be used to create and manage tag
266
+ categories, which determine how tags are grouped together and applied to
267
+ specific objects.
268
+
269
+ For more information about tags, click [here][ext-tags-general].
270
+
271
+ [ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
272
+
273
+ ## Example Usage
274
+
275
+ This example creates a tag category named `test-category`, with
276
+ single cardinality (meaning that only one tag in this category can be assigned
277
+ to an object at any given time). Tags in this category can only be assigned to
278
+ VMs and datastores.
279
+
280
+ ```python
281
+ import pulumi
282
+ import pulumi_vsphere as vsphere
283
+
284
+ category = vsphere.TagCategory("category",
285
+ name="test-category",
286
+ description="Managed by Pulumi",
287
+ cardinality="SINGLE",
288
+ associable_types=[
289
+ "VirtualMachine",
290
+ "Datastore",
291
+ ])
292
+ ```
293
+
294
+ ## Import
295
+
296
+ An existing tag category can be imported into this resource via
297
+
298
+ its name, using the following command:
299
+
300
+ ```sh
301
+ $ pulumi import vsphere:index/tagCategory:TagCategory category terraform-test-category
302
+ ```
303
+
223
304
  :param str resource_name: The name of the resource.
224
305
  :param TagCategoryArgs args: The arguments to use to populate this resource's properties.
225
306
  :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
  __all__ = ['VappContainerArgs', 'VappContainer']
@@ -640,7 +645,85 @@ class VappContainer(pulumi.CustomResource):
640
645
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
641
646
  __props__=None):
642
647
  """
643
- Create a VappContainer resource with the given unique name, props, and options.
648
+ The `VappContainer` resource can be used to create and manage
649
+ vApps.
650
+
651
+ For more information on vSphere vApps, see the VMware vSphere [product documentation][ref-vsphere-vapp].
652
+
653
+ [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-E6E9D2A9-D358-4996-9BC7-F8D9D9645290.html
654
+
655
+ ## Basic Example
656
+
657
+ The example below sets up a vSphere vApp container in a compute cluster which uses
658
+ the default settings for CPU and memory reservations, shares, and limits. The compute cluster
659
+ needs to already exist in vSphere.
660
+
661
+ ```python
662
+ import pulumi
663
+ import pulumi_vsphere as vsphere
664
+
665
+ datacenter = vsphere.get_datacenter(name="dc-01")
666
+ compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
667
+ datacenter_id=datacenter.id)
668
+ vapp_container = vsphere.VappContainer("vapp_container",
669
+ name="vapp-01",
670
+ parent_resource_pool_id=compute_cluster.resource_pool_id)
671
+ ```
672
+
673
+ ### Example with a Virtual Machine
674
+
675
+ The example below builds off the basic example, but includes a virtual machine
676
+ in the new vApp container. To accomplish this, the `resource_pool_id` of the
677
+ virtual machine is set to the `id` of the vApp container.
678
+
679
+ ```python
680
+ import pulumi
681
+ import pulumi_vsphere as vsphere
682
+
683
+ datacenter = vsphere.get_datacenter(name="dc-01")
684
+ compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
685
+ datacenter_id=datacenter.id)
686
+ datastore = vsphere.get_datastore(name="datastore-01",
687
+ datacenter_id=datacenter.id)
688
+ network = vsphere.get_network(name="VM Network",
689
+ datacenter_id=datacenter.id)
690
+ vapp_container = vsphere.VappContainer("vapp_container",
691
+ name="vapp-01",
692
+ parent_resource_pool_id=compute_cluster.resource_pool_id)
693
+ vm = vsphere.VirtualMachine("vm",
694
+ name="foo",
695
+ resource_pool_id=vapp_container_vsphere_vapp_container["id"],
696
+ datastore_id=datastore.id,
697
+ num_cpus=1,
698
+ memory=1024,
699
+ guest_id="ubuntu64Guest",
700
+ network_interfaces=[{
701
+ "network_id": network.id,
702
+ }],
703
+ disks=[{
704
+ "label": "disk0",
705
+ "size": 20,
706
+ }])
707
+ ```
708
+
709
+ ## Import
710
+
711
+ An existing vApp container can be imported into this resource via
712
+
713
+ the path to the vApp container, using the following command:
714
+
715
+ Example:
716
+
717
+ ```sh
718
+ $ pulumi import vsphere:index/vappContainer:VappContainer vapp_container /dc-01/host/cluster-01/Resources/resource-pool-01/vapp-01
719
+ ```
720
+
721
+ The example above would import the vApp container named `vapp-01` that is
722
+
723
+ located in the resource pool `resource-pool-01` that is part of the host cluster
724
+
725
+ `cluster-01` in the `dc-01` datacenter.
726
+
644
727
  :param str resource_name: The name of the resource.
645
728
  :param pulumi.ResourceOptions opts: Options for the resource.
646
729
  :param pulumi.Input[bool] cpu_expandable: Determines if the reservation on a vApp
@@ -694,7 +777,85 @@ class VappContainer(pulumi.CustomResource):
694
777
  args: VappContainerArgs,
695
778
  opts: Optional[pulumi.ResourceOptions] = None):
696
779
  """
697
- Create a VappContainer resource with the given unique name, props, and options.
780
+ The `VappContainer` resource can be used to create and manage
781
+ vApps.
782
+
783
+ For more information on vSphere vApps, see the VMware vSphere [product documentation][ref-vsphere-vapp].
784
+
785
+ [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-E6E9D2A9-D358-4996-9BC7-F8D9D9645290.html
786
+
787
+ ## Basic Example
788
+
789
+ The example below sets up a vSphere vApp container in a compute cluster which uses
790
+ the default settings for CPU and memory reservations, shares, and limits. The compute cluster
791
+ needs to already exist in vSphere.
792
+
793
+ ```python
794
+ import pulumi
795
+ import pulumi_vsphere as vsphere
796
+
797
+ datacenter = vsphere.get_datacenter(name="dc-01")
798
+ compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
799
+ datacenter_id=datacenter.id)
800
+ vapp_container = vsphere.VappContainer("vapp_container",
801
+ name="vapp-01",
802
+ parent_resource_pool_id=compute_cluster.resource_pool_id)
803
+ ```
804
+
805
+ ### Example with a Virtual Machine
806
+
807
+ The example below builds off the basic example, but includes a virtual machine
808
+ in the new vApp container. To accomplish this, the `resource_pool_id` of the
809
+ virtual machine is set to the `id` of the vApp container.
810
+
811
+ ```python
812
+ import pulumi
813
+ import pulumi_vsphere as vsphere
814
+
815
+ datacenter = vsphere.get_datacenter(name="dc-01")
816
+ compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
817
+ datacenter_id=datacenter.id)
818
+ datastore = vsphere.get_datastore(name="datastore-01",
819
+ datacenter_id=datacenter.id)
820
+ network = vsphere.get_network(name="VM Network",
821
+ datacenter_id=datacenter.id)
822
+ vapp_container = vsphere.VappContainer("vapp_container",
823
+ name="vapp-01",
824
+ parent_resource_pool_id=compute_cluster.resource_pool_id)
825
+ vm = vsphere.VirtualMachine("vm",
826
+ name="foo",
827
+ resource_pool_id=vapp_container_vsphere_vapp_container["id"],
828
+ datastore_id=datastore.id,
829
+ num_cpus=1,
830
+ memory=1024,
831
+ guest_id="ubuntu64Guest",
832
+ network_interfaces=[{
833
+ "network_id": network.id,
834
+ }],
835
+ disks=[{
836
+ "label": "disk0",
837
+ "size": 20,
838
+ }])
839
+ ```
840
+
841
+ ## Import
842
+
843
+ An existing vApp container can be imported into this resource via
844
+
845
+ the path to the vApp container, using the following command:
846
+
847
+ Example:
848
+
849
+ ```sh
850
+ $ pulumi import vsphere:index/vappContainer:VappContainer vapp_container /dc-01/host/cluster-01/Resources/resource-pool-01/vapp-01
851
+ ```
852
+
853
+ The example above would import the vApp container named `vapp-01` that is
854
+
855
+ located in the resource pool `resource-pool-01` that is part of the host cluster
856
+
857
+ `cluster-01` in the `dc-01` datacenter.
858
+
698
859
  :param str resource_name: The name of the resource.
699
860
  :param VappContainerArgs args: The arguments to use to populate this resource's properties.
700
861
  :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
  __all__ = ['VappEntityArgs', 'VappEntity']
@@ -406,7 +411,77 @@ class VappEntity(pulumi.CustomResource):
406
411
  wait_for_guest: Optional[pulumi.Input[bool]] = None,
407
412
  __props__=None):
408
413
  """
409
- Create a VappEntity resource with the given unique name, props, and options.
414
+ The `VappEntity` resource can be used to describe the behavior of an
415
+ entity (virtual machine or sub-vApp container) in a vApp container.
416
+
417
+ For more information on vSphere vApps, see [this
418
+ page][ref-vsphere-vapp].
419
+
420
+ [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-2A95EBB8-1779-40FA-B4FB-4D0845750879.html
421
+
422
+ ## Example Usage
423
+
424
+ The basic example below sets up a vApp container and a virtual machine in a
425
+ compute cluster and then creates a vApp entity to change the virtual machine's
426
+ power on behavior in the vApp container.
427
+
428
+ ```python
429
+ import pulumi
430
+ import pulumi_vsphere as vsphere
431
+
432
+ config = pulumi.Config()
433
+ datacenter = config.get("datacenter")
434
+ if datacenter is None:
435
+ datacenter = "dc-01"
436
+ cluster = config.get("cluster")
437
+ if cluster is None:
438
+ cluster = "cluster-01"
439
+ datacenter_get_datacenter = vsphere.get_datacenter(name=datacenter)
440
+ compute_cluster = vsphere.get_compute_cluster(name=cluster,
441
+ datacenter_id=datacenter_get_datacenter.id)
442
+ network = vsphere.get_network(name="network1",
443
+ datacenter_id=datacenter_get_datacenter.id)
444
+ datastore = vsphere.get_datastore(name="datastore1",
445
+ datacenter_id=datacenter_get_datacenter.id)
446
+ vapp_container = vsphere.VappContainer("vapp_container",
447
+ name="vapp-container-test",
448
+ parent_resource_pool_id=compute_cluster.id)
449
+ vm = vsphere.VirtualMachine("vm",
450
+ name="virtual-machine-test",
451
+ resource_pool_id=vapp_container.id,
452
+ datastore_id=datastore.id,
453
+ num_cpus=2,
454
+ memory=1024,
455
+ guest_id="ubuntu64Guest",
456
+ disks=[{
457
+ "label": "disk0",
458
+ "size": 1,
459
+ }],
460
+ network_interfaces=[{
461
+ "network_id": network.id,
462
+ }])
463
+ vapp_entity = vsphere.VappEntity("vapp_entity",
464
+ target_id=vm.moid,
465
+ container_id=vapp_container.id,
466
+ start_action="none")
467
+ ```
468
+
469
+ ## Import
470
+
471
+ An existing vApp entity can be imported into this resource via
472
+
473
+ the ID of the vApp Entity.
474
+
475
+ ```sh
476
+ $ pulumi import vsphere:index/vappEntity:VappEntity vapp_entity vm-123:res-456
477
+ ```
478
+
479
+ The above would import the vApp entity that governs the behavior of the virtual
480
+
481
+ machine with a [managed object ID][docs-about-morefs] of vm-123 in the vApp
482
+
483
+ container with the [managed object ID][docs-about-morefs] res-456.
484
+
410
485
  :param str resource_name: The name of the resource.
411
486
  :param pulumi.ResourceOptions opts: Options for the resource.
412
487
  :param pulumi.Input[str] container_id: Managed object ID of the vApp
@@ -438,7 +513,77 @@ class VappEntity(pulumi.CustomResource):
438
513
  args: VappEntityArgs,
439
514
  opts: Optional[pulumi.ResourceOptions] = None):
440
515
  """
441
- Create a VappEntity resource with the given unique name, props, and options.
516
+ The `VappEntity` resource can be used to describe the behavior of an
517
+ entity (virtual machine or sub-vApp container) in a vApp container.
518
+
519
+ For more information on vSphere vApps, see [this
520
+ page][ref-vsphere-vapp].
521
+
522
+ [ref-vsphere-vapp]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-2A95EBB8-1779-40FA-B4FB-4D0845750879.html
523
+
524
+ ## Example Usage
525
+
526
+ The basic example below sets up a vApp container and a virtual machine in a
527
+ compute cluster and then creates a vApp entity to change the virtual machine's
528
+ power on behavior in the vApp container.
529
+
530
+ ```python
531
+ import pulumi
532
+ import pulumi_vsphere as vsphere
533
+
534
+ config = pulumi.Config()
535
+ datacenter = config.get("datacenter")
536
+ if datacenter is None:
537
+ datacenter = "dc-01"
538
+ cluster = config.get("cluster")
539
+ if cluster is None:
540
+ cluster = "cluster-01"
541
+ datacenter_get_datacenter = vsphere.get_datacenter(name=datacenter)
542
+ compute_cluster = vsphere.get_compute_cluster(name=cluster,
543
+ datacenter_id=datacenter_get_datacenter.id)
544
+ network = vsphere.get_network(name="network1",
545
+ datacenter_id=datacenter_get_datacenter.id)
546
+ datastore = vsphere.get_datastore(name="datastore1",
547
+ datacenter_id=datacenter_get_datacenter.id)
548
+ vapp_container = vsphere.VappContainer("vapp_container",
549
+ name="vapp-container-test",
550
+ parent_resource_pool_id=compute_cluster.id)
551
+ vm = vsphere.VirtualMachine("vm",
552
+ name="virtual-machine-test",
553
+ resource_pool_id=vapp_container.id,
554
+ datastore_id=datastore.id,
555
+ num_cpus=2,
556
+ memory=1024,
557
+ guest_id="ubuntu64Guest",
558
+ disks=[{
559
+ "label": "disk0",
560
+ "size": 1,
561
+ }],
562
+ network_interfaces=[{
563
+ "network_id": network.id,
564
+ }])
565
+ vapp_entity = vsphere.VappEntity("vapp_entity",
566
+ target_id=vm.moid,
567
+ container_id=vapp_container.id,
568
+ start_action="none")
569
+ ```
570
+
571
+ ## Import
572
+
573
+ An existing vApp entity can be imported into this resource via
574
+
575
+ the ID of the vApp Entity.
576
+
577
+ ```sh
578
+ $ pulumi import vsphere:index/vappEntity:VappEntity vapp_entity vm-123:res-456
579
+ ```
580
+
581
+ The above would import the vApp entity that governs the behavior of the virtual
582
+
583
+ machine with a [managed object ID][docs-about-morefs] of vm-123 in the vApp
584
+
585
+ container with the [managed object ID][docs-about-morefs] res-456.
586
+
442
587
  :param str resource_name: The name of the resource.
443
588
  :param VappEntityArgs args: The arguments to use to populate this resource's properties.
444
589
  :param pulumi.ResourceOptions opts: Options for the resource.