pulumi-vsphere 4.11.0__py3-none-any.whl → 4.11.0a1__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 (48) hide show
  1. pulumi_vsphere/_inputs.py +6 -92
  2. pulumi_vsphere/_utilities.py +4 -40
  3. pulumi_vsphere/compute_cluster.py +20 -20
  4. pulumi_vsphere/compute_cluster_vm_affinity_rule.py +18 -14
  5. pulumi_vsphere/content_library.py +10 -10
  6. pulumi_vsphere/datacenter.py +28 -7
  7. pulumi_vsphere/datastore_cluster.py +14 -0
  8. pulumi_vsphere/distributed_port_group.py +12 -61
  9. pulumi_vsphere/distributed_virtual_switch.py +43 -22
  10. pulumi_vsphere/entity_permissions.py +38 -59
  11. pulumi_vsphere/folder.py +21 -0
  12. pulumi_vsphere/get_compute_cluster_host_group.py +16 -18
  13. pulumi_vsphere/get_content_library.py +6 -10
  14. pulumi_vsphere/get_content_library_item.py +8 -12
  15. pulumi_vsphere/get_datastore.py +12 -12
  16. pulumi_vsphere/get_datastore_stats.py +40 -42
  17. pulumi_vsphere/get_dynamic.py +12 -14
  18. pulumi_vsphere/get_guest_os_customization.py +43 -8
  19. pulumi_vsphere/get_host_base_images.py +6 -6
  20. pulumi_vsphere/get_host_pci_device.py +2 -4
  21. pulumi_vsphere/get_host_thumbprint.py +12 -12
  22. pulumi_vsphere/get_host_vgpu_profile.py +2 -4
  23. pulumi_vsphere/get_license.py +1 -2
  24. pulumi_vsphere/get_network.py +14 -14
  25. pulumi_vsphere/get_resource_pool.py +8 -12
  26. pulumi_vsphere/get_role.py +4 -4
  27. pulumi_vsphere/get_virtual_machine.py +35 -60
  28. pulumi_vsphere/guest_os_customization.py +31 -31
  29. pulumi_vsphere/host.py +40 -49
  30. pulumi_vsphere/host_port_group.py +2 -2
  31. pulumi_vsphere/nas_datastore.py +7 -7
  32. pulumi_vsphere/offline_software_depot.py +2 -2
  33. pulumi_vsphere/outputs.py +40 -129
  34. pulumi_vsphere/provider.py +6 -2
  35. pulumi_vsphere/pulumi-plugin.json +1 -1
  36. pulumi_vsphere/resource_pool.py +2 -2
  37. pulumi_vsphere/supervisor.py +30 -134
  38. pulumi_vsphere/virtual_disk.py +30 -38
  39. pulumi_vsphere/virtual_machine.py +32 -32
  40. pulumi_vsphere/virtual_machine_class.py +0 -2
  41. pulumi_vsphere/virtual_machine_snapshot.py +2 -2
  42. pulumi_vsphere/vm_storage_policy.py +67 -67
  43. pulumi_vsphere/vnic.py +93 -89
  44. {pulumi_vsphere-4.11.0.dist-info → pulumi_vsphere-4.11.0a1.dist-info}/METADATA +1 -1
  45. pulumi_vsphere-4.11.0a1.dist-info/RECORD +86 -0
  46. {pulumi_vsphere-4.11.0.dist-info → pulumi_vsphere-4.11.0a1.dist-info}/WHEEL +1 -1
  47. pulumi_vsphere-4.11.0.dist-info/RECORD +0 -86
  48. {pulumi_vsphere-4.11.0.dist-info → pulumi_vsphere-4.11.0a1.dist-info}/top_level.txt +0 -0
@@ -23,7 +23,7 @@ class GetVirtualMachineResult:
23
23
  """
24
24
  A collection of values returned by getVirtualMachine.
25
25
  """
26
- def __init__(__self__, alternate_guest_name=None, annotation=None, boot_delay=None, boot_retry_delay=None, boot_retry_enabled=None, change_version=None, cpu_hot_add_enabled=None, cpu_hot_remove_enabled=None, cpu_limit=None, cpu_performance_counters_enabled=None, cpu_reservation=None, cpu_share_count=None, cpu_share_level=None, datacenter_id=None, default_ip_address=None, disks=None, efi_secure_boot_enabled=None, enable_disk_uuid=None, enable_logging=None, ept_rvi_mode=None, extra_config=None, extra_config_reboot_required=None, firmware=None, folder=None, guest_id=None, guest_ip_addresses=None, hardware_version=None, hv_mode=None, id=None, ide_controller_scan_count=None, instance_uuid=None, latency_sensitivity=None, memory=None, memory_hot_add_enabled=None, memory_limit=None, memory_reservation=None, memory_reservation_locked_to_max=None, memory_share_count=None, memory_share_level=None, moid=None, name=None, nested_hv_enabled=None, network_interface_types=None, network_interfaces=None, num_cores_per_socket=None, num_cpus=None, replace_trigger=None, run_tools_scripts_after_power_on=None, run_tools_scripts_after_resume=None, run_tools_scripts_before_guest_reboot=None, run_tools_scripts_before_guest_shutdown=None, run_tools_scripts_before_guest_standby=None, sata_controller_scan_count=None, scsi_bus_sharing=None, scsi_controller_scan_count=None, scsi_type=None, storage_policy_id=None, swap_placement_policy=None, sync_time_with_host=None, sync_time_with_host_periodically=None, tools_upgrade_policy=None, uuid=None, vapp=None, vapp_transports=None, vbs_enabled=None, vvtd_enabled=None):
26
+ def __init__(__self__, alternate_guest_name=None, annotation=None, boot_delay=None, boot_retry_delay=None, boot_retry_enabled=None, change_version=None, cpu_hot_add_enabled=None, cpu_hot_remove_enabled=None, cpu_limit=None, cpu_performance_counters_enabled=None, cpu_reservation=None, cpu_share_count=None, cpu_share_level=None, datacenter_id=None, default_ip_address=None, disks=None, efi_secure_boot_enabled=None, enable_disk_uuid=None, enable_logging=None, ept_rvi_mode=None, extra_config=None, extra_config_reboot_required=None, firmware=None, folder=None, guest_id=None, guest_ip_addresses=None, hardware_version=None, hv_mode=None, id=None, ide_controller_scan_count=None, latency_sensitivity=None, memory=None, memory_hot_add_enabled=None, memory_limit=None, memory_reservation=None, memory_reservation_locked_to_max=None, memory_share_count=None, memory_share_level=None, moid=None, name=None, nested_hv_enabled=None, network_interface_types=None, network_interfaces=None, num_cores_per_socket=None, num_cpus=None, replace_trigger=None, run_tools_scripts_after_power_on=None, run_tools_scripts_after_resume=None, run_tools_scripts_before_guest_reboot=None, run_tools_scripts_before_guest_shutdown=None, run_tools_scripts_before_guest_standby=None, sata_controller_scan_count=None, scsi_bus_sharing=None, scsi_controller_scan_count=None, scsi_type=None, storage_policy_id=None, swap_placement_policy=None, sync_time_with_host=None, sync_time_with_host_periodically=None, tools_upgrade_policy=None, uuid=None, vapp=None, vapp_transports=None, vbs_enabled=None, vvtd_enabled=None):
27
27
  if alternate_guest_name and not isinstance(alternate_guest_name, str):
28
28
  raise TypeError("Expected argument 'alternate_guest_name' to be a str")
29
29
  pulumi.set(__self__, "alternate_guest_name", alternate_guest_name)
@@ -114,9 +114,6 @@ class GetVirtualMachineResult:
114
114
  if ide_controller_scan_count and not isinstance(ide_controller_scan_count, int):
115
115
  raise TypeError("Expected argument 'ide_controller_scan_count' to be a int")
116
116
  pulumi.set(__self__, "ide_controller_scan_count", ide_controller_scan_count)
117
- if instance_uuid and not isinstance(instance_uuid, str):
118
- raise TypeError("Expected argument 'instance_uuid' to be a str")
119
- pulumi.set(__self__, "instance_uuid", instance_uuid)
120
117
  if latency_sensitivity and not isinstance(latency_sensitivity, str):
121
118
  raise TypeError("Expected argument 'latency_sensitivity' to be a str")
122
119
  pulumi.set(__self__, "latency_sensitivity", latency_sensitivity)
@@ -228,8 +225,7 @@ class GetVirtualMachineResult:
228
225
  def alternate_guest_name(self) -> Optional[str]:
229
226
  """
230
227
  The alternate guest name of the virtual machine when
231
- `guest_id` is a non-specific operating system, like `otherGuest` or
232
- `otherGuest64`.
228
+ `guest_id` is a non-specific operating system, like `otherGuest` or `otherGuest64`.
233
229
  """
234
230
  return pulumi.get(self, "alternate_guest_name")
235
231
 
@@ -305,11 +301,11 @@ class GetVirtualMachineResult:
305
301
  @pulumi.getter(name="defaultIpAddress")
306
302
  def default_ip_address(self) -> str:
307
303
  """
308
- Whenever possible, this is the first IPv4 address that
309
- is reachable through the default gateway configured on the machine, then the
310
- first reachable IPv6 address, and then the first general discovered address if
311
- neither exist. If VMware Tools is not running on the virtual machine, or if
312
- the VM is powered off, this value will be blank.
304
+ Whenever possible, this is the first IPv4 address that is reachable through
305
+ the default gateway configured on the machine, then the first reachable IPv6
306
+ address, and then the first general discovered address if neither exist. If
307
+ VMware Tools is not running on the virtual machine, or if the VM is powered
308
+ off, this value will be blank.
313
309
  """
314
310
  return pulumi.get(self, "default_ip_address")
315
311
 
@@ -321,10 +317,10 @@ class GetVirtualMachineResult:
321
317
  template. These are sorted by bus and unit number so that they can be applied
322
318
  to a `VirtualMachine` resource in the order the resource expects
323
319
  while cloning. This is useful for discovering certain disk settings while
324
- performing a linked clone, as all settings that are output by this data source
325
- must be the same on the destination virtual machine as the source. Only the
326
- first number of controllers defined by `scsi_controller_scan_count` are
327
- scanned for disks. The sub-attributes are:
320
+ performing a linked clone, as all settings that are output by this data
321
+ source must be the same on the destination virtual machine as the source.
322
+ Only the first number of controllers defined by `scsi_controller_scan_count`
323
+ are scanned for disks. The sub-attributes are:
328
324
  """
329
325
  return pulumi.get(self, "disks")
330
326
 
@@ -345,7 +341,7 @@ class GetVirtualMachineResult:
345
341
 
346
342
  @property
347
343
  @pulumi.getter(name="eptRviMode")
348
- def ept_rvi_mode(self) -> str:
344
+ def ept_rvi_mode(self) -> Optional[str]:
349
345
  return pulumi.get(self, "ept_rvi_mode")
350
346
 
351
347
  @property
@@ -362,8 +358,7 @@ class GetVirtualMachineResult:
362
358
  @pulumi.getter
363
359
  def firmware(self) -> Optional[str]:
364
360
  """
365
- The firmware type for this virtual machine. Can be `bios` or
366
- `efi`.
361
+ The firmware type for this virtual machine. Can be `bios` or `efi`.
367
362
  """
368
363
  return pulumi.get(self, "firmware")
369
364
 
@@ -398,7 +393,7 @@ class GetVirtualMachineResult:
398
393
 
399
394
  @property
400
395
  @pulumi.getter(name="hvMode")
401
- def hv_mode(self) -> str:
396
+ def hv_mode(self) -> Optional[str]:
402
397
  return pulumi.get(self, "hv_mode")
403
398
 
404
399
  @property
@@ -414,14 +409,6 @@ class GetVirtualMachineResult:
414
409
  def ide_controller_scan_count(self) -> Optional[int]:
415
410
  return pulumi.get(self, "ide_controller_scan_count")
416
411
 
417
- @property
418
- @pulumi.getter(name="instanceUuid")
419
- def instance_uuid(self) -> str:
420
- """
421
- The instance UUID of the virtual machine or template.
422
- """
423
- return pulumi.get(self, "instance_uuid")
424
-
425
412
  @property
426
413
  @pulumi.getter(name="latencySensitivity")
427
414
  def latency_sensitivity(self) -> Optional[str]:
@@ -486,8 +473,7 @@ class GetVirtualMachineResult:
486
473
  """
487
474
  The network interface types for each network
488
475
  interface found on the virtual machine, in device bus order. Will be one of
489
- `e1000`, `e1000e`, `pcnet32`, `sriov`, `vmxnet2`, `vmxnet3vrdma`, or
490
- `vmxnet3`.
476
+ `e1000`, `e1000e`, `pcnet32`, `sriov`, `vmxnet2`, `vmxnet3vrdma`, or `vmxnet3`.
491
477
  """
492
478
  return pulumi.get(self, "network_interface_types")
493
479
 
@@ -495,13 +481,13 @@ class GetVirtualMachineResult:
495
481
  @pulumi.getter(name="networkInterfaces")
496
482
  def network_interfaces(self) -> Sequence['outputs.GetVirtualMachineNetworkInterfaceResult']:
497
483
  """
498
- Information about each of the network interfaces on
499
- this virtual machine or template. These are sorted by device bus order so that
500
- they can be applied to a `VirtualMachine` resource in the order the
501
- resource expects while cloning. This is useful for discovering certain network
502
- interface settings while performing a linked clone, as all settings that are
503
- output by this data source must be the same on the destination virtual machine
504
- as the source. The sub-attributes are:
484
+ Information about each of the network interfaces on this
485
+ virtual machine or template. These are sorted by device bus order so that they
486
+ can be applied to a `VirtualMachine` resource in the order the resource
487
+ expects while cloning. This is useful for discovering certain network interface
488
+ settings while performing a linked clone, as all settings that are output by this
489
+ data source must be the same on the destination virtual machine as the source.
490
+ The sub-attributes are:
505
491
  """
506
492
  return pulumi.get(self, "network_interfaces")
507
493
 
@@ -509,8 +495,7 @@ class GetVirtualMachineResult:
509
495
  @pulumi.getter(name="numCoresPerSocket")
510
496
  def num_cores_per_socket(self) -> Optional[int]:
511
497
  """
512
- The number of cores per socket for this virtual
513
- machine.
498
+ The number of cores per socket for this virtual machine.
514
499
  """
515
500
  return pulumi.get(self, "num_cores_per_socket")
516
501
 
@@ -672,7 +657,6 @@ class AwaitableGetVirtualMachineResult(GetVirtualMachineResult):
672
657
  hv_mode=self.hv_mode,
673
658
  id=self.id,
674
659
  ide_controller_scan_count=self.ide_controller_scan_count,
675
- instance_uuid=self.instance_uuid,
676
660
  latency_sensitivity=self.latency_sensitivity,
677
661
  memory=self.memory,
678
662
  memory_hot_add_enabled=self.memory_hot_add_enabled,
@@ -762,7 +746,7 @@ def get_virtual_machine(alternate_guest_name: Optional[str] = None,
762
746
  sync_time_with_host_periodically: Optional[bool] = None,
763
747
  tools_upgrade_policy: Optional[str] = None,
764
748
  uuid: Optional[str] = None,
765
- vapp: Optional[Union['GetVirtualMachineVappArgs', 'GetVirtualMachineVappArgsDict']] = None,
749
+ vapp: Optional[pulumi.InputType['GetVirtualMachineVappArgs']] = None,
766
750
  vbs_enabled: Optional[bool] = None,
767
751
  vvtd_enabled: Optional[bool] = None,
768
752
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVirtualMachineResult:
@@ -775,8 +759,8 @@ def get_virtual_machine(alternate_guest_name: Optional[str] = None,
775
759
 
776
760
  ## Example Usage
777
761
 
778
- In the following example, a virtual machine template is returned by its unique
779
- name within the `Datacenter`.
762
+ In the following example, a virtual machine template is returned by its
763
+ unique name within the `Datacenter`.
780
764
 
781
765
  ```python
782
766
  import pulumi
@@ -786,7 +770,6 @@ def get_virtual_machine(alternate_guest_name: Optional[str] = None,
786
770
  template = vsphere.get_virtual_machine(name="ubuntu-server-template",
787
771
  datacenter_id=datacenter.id)
788
772
  ```
789
-
790
773
  In the following example, each virtual machine template is returned by its
791
774
  unique full path within the `Datacenter`.
792
775
 
@@ -803,16 +786,14 @@ def get_virtual_machine(alternate_guest_name: Optional[str] = None,
803
786
 
804
787
 
805
788
  :param str alternate_guest_name: The alternate guest name of the virtual machine when
806
- `guest_id` is a non-specific operating system, like `otherGuest` or
807
- `otherGuest64`.
789
+ `guest_id` is a non-specific operating system, like `otherGuest` or `otherGuest64`.
808
790
  :param str annotation: The user-provided description of this virtual machine.
809
791
  :param str datacenter_id: The managed object reference
810
792
  ID of the datacenter the virtual machine is located in.
811
793
  This can be omitted if the search path used in `name` is an absolute path.
812
794
  For default datacenters, use the `id` attribute from an empty
813
795
  `Datacenter` data source.
814
- :param str firmware: The firmware type for this virtual machine. Can be `bios` or
815
- `efi`.
796
+ :param str firmware: The firmware type for this virtual machine. Can be `bios` or `efi`.
816
797
  :param str folder: The name of the virtual machine folder where the virtual machine is located. The `name` argument is limited to 80 characters. If the `name` argument includes the full path to the virtual machine and exceeds the 80 characters limit, the `folder` folder argument can be used.
817
798
  :param str guest_id: The guest ID of the virtual machine or template.
818
799
  :param int hardware_version: The hardware version number on this virtual machine.
@@ -820,8 +801,7 @@ def get_virtual_machine(alternate_guest_name: Optional[str] = None,
820
801
  :param str name: The name of the virtual machine. This can be a name or
821
802
  the full path relative to the datacenter. This is required if a UUID lookup
822
803
  is not performed.
823
- :param int num_cores_per_socket: The number of cores per socket for this virtual
824
- machine.
804
+ :param int num_cores_per_socket: The number of cores per socket for this virtual machine.
825
805
  :param int num_cpus: The total number of virtual processor cores assigned to this
826
806
  virtual machine.
827
807
  :param int scsi_controller_scan_count: The number of SCSI controllers to
@@ -925,7 +905,6 @@ def get_virtual_machine(alternate_guest_name: Optional[str] = None,
925
905
  hv_mode=pulumi.get(__ret__, 'hv_mode'),
926
906
  id=pulumi.get(__ret__, 'id'),
927
907
  ide_controller_scan_count=pulumi.get(__ret__, 'ide_controller_scan_count'),
928
- instance_uuid=pulumi.get(__ret__, 'instance_uuid'),
929
908
  latency_sensitivity=pulumi.get(__ret__, 'latency_sensitivity'),
930
909
  memory=pulumi.get(__ret__, 'memory'),
931
910
  memory_hot_add_enabled=pulumi.get(__ret__, 'memory_hot_add_enabled'),
@@ -1016,7 +995,7 @@ def get_virtual_machine_output(alternate_guest_name: Optional[pulumi.Input[Optio
1016
995
  sync_time_with_host_periodically: Optional[pulumi.Input[Optional[bool]]] = None,
1017
996
  tools_upgrade_policy: Optional[pulumi.Input[Optional[str]]] = None,
1018
997
  uuid: Optional[pulumi.Input[Optional[str]]] = None,
1019
- vapp: Optional[pulumi.Input[Optional[Union['GetVirtualMachineVappArgs', 'GetVirtualMachineVappArgsDict']]]] = None,
998
+ vapp: Optional[pulumi.Input[Optional[pulumi.InputType['GetVirtualMachineVappArgs']]]] = None,
1020
999
  vbs_enabled: Optional[pulumi.Input[Optional[bool]]] = None,
1021
1000
  vvtd_enabled: Optional[pulumi.Input[Optional[bool]]] = None,
1022
1001
  opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetVirtualMachineResult]:
@@ -1029,8 +1008,8 @@ def get_virtual_machine_output(alternate_guest_name: Optional[pulumi.Input[Optio
1029
1008
 
1030
1009
  ## Example Usage
1031
1010
 
1032
- In the following example, a virtual machine template is returned by its unique
1033
- name within the `Datacenter`.
1011
+ In the following example, a virtual machine template is returned by its
1012
+ unique name within the `Datacenter`.
1034
1013
 
1035
1014
  ```python
1036
1015
  import pulumi
@@ -1040,7 +1019,6 @@ def get_virtual_machine_output(alternate_guest_name: Optional[pulumi.Input[Optio
1040
1019
  template = vsphere.get_virtual_machine(name="ubuntu-server-template",
1041
1020
  datacenter_id=datacenter.id)
1042
1021
  ```
1043
-
1044
1022
  In the following example, each virtual machine template is returned by its
1045
1023
  unique full path within the `Datacenter`.
1046
1024
 
@@ -1057,16 +1035,14 @@ def get_virtual_machine_output(alternate_guest_name: Optional[pulumi.Input[Optio
1057
1035
 
1058
1036
 
1059
1037
  :param str alternate_guest_name: The alternate guest name of the virtual machine when
1060
- `guest_id` is a non-specific operating system, like `otherGuest` or
1061
- `otherGuest64`.
1038
+ `guest_id` is a non-specific operating system, like `otherGuest` or `otherGuest64`.
1062
1039
  :param str annotation: The user-provided description of this virtual machine.
1063
1040
  :param str datacenter_id: The managed object reference
1064
1041
  ID of the datacenter the virtual machine is located in.
1065
1042
  This can be omitted if the search path used in `name` is an absolute path.
1066
1043
  For default datacenters, use the `id` attribute from an empty
1067
1044
  `Datacenter` data source.
1068
- :param str firmware: The firmware type for this virtual machine. Can be `bios` or
1069
- `efi`.
1045
+ :param str firmware: The firmware type for this virtual machine. Can be `bios` or `efi`.
1070
1046
  :param str folder: The name of the virtual machine folder where the virtual machine is located. The `name` argument is limited to 80 characters. If the `name` argument includes the full path to the virtual machine and exceeds the 80 characters limit, the `folder` folder argument can be used.
1071
1047
  :param str guest_id: The guest ID of the virtual machine or template.
1072
1048
  :param int hardware_version: The hardware version number on this virtual machine.
@@ -1074,8 +1050,7 @@ def get_virtual_machine_output(alternate_guest_name: Optional[pulumi.Input[Optio
1074
1050
  :param str name: The name of the virtual machine. This can be a name or
1075
1051
  the full path relative to the datacenter. This is required if a UUID lookup
1076
1052
  is not performed.
1077
- :param int num_cores_per_socket: The number of cores per socket for this virtual
1078
- machine.
1053
+ :param int num_cores_per_socket: The number of cores per socket for this virtual machine.
1079
1054
  :param int num_cpus: The total number of virtual processor cores assigned to this
1080
1055
  virtual machine.
1081
1056
  :param int scsi_controller_scan_count: The number of SCSI controllers to
@@ -194,7 +194,7 @@ class GuestOsCustomization(pulumi.CustomResource):
194
194
  opts: Optional[pulumi.ResourceOptions] = None,
195
195
  description: Optional[pulumi.Input[str]] = None,
196
196
  name: Optional[pulumi.Input[str]] = None,
197
- spec: Optional[pulumi.Input[Union['GuestOsCustomizationSpecArgs', 'GuestOsCustomizationSpecArgsDict']]] = None,
197
+ spec: Optional[pulumi.Input[pulumi.InputType['GuestOsCustomizationSpecArgs']]] = None,
198
198
  type: Optional[pulumi.Input[str]] = None,
199
199
  __props__=None):
200
200
  """
@@ -208,30 +208,30 @@ class GuestOsCustomization(pulumi.CustomResource):
208
208
  import pulumi
209
209
  import pulumi_vsphere as vsphere
210
210
 
211
- windows = vsphere.GuestOsCustomization("windows",
212
- name="windows",
211
+ windows_customization = vsphere.GuestOsCustomization("windows_customization",
212
+ name="windows-spec",
213
213
  type="Windows",
214
- spec={
215
- "windows_options": {
216
- "run_once_command_lists": [
214
+ spec=vsphere.GuestOsCustomizationSpecArgs(
215
+ windows_options=vsphere.GuestOsCustomizationSpecWindowsOptionsArgs(
216
+ run_once_command_lists=[
217
217
  "command-1",
218
218
  "command-2",
219
219
  ],
220
- "computer_name": "windows",
221
- "auto_logon": False,
222
- "auto_logon_count": 0,
223
- "admin_password": "VMware1!",
224
- "time_zone": 4,
225
- "workgroup": "workgroup",
226
- },
227
- })
220
+ computer_name="windows",
221
+ auto_logon=False,
222
+ auto_logon_count=0,
223
+ admin_password="VMware1!",
224
+ time_zone=4,
225
+ workgroup="workgroup",
226
+ ),
227
+ ))
228
228
  ```
229
229
 
230
230
  :param str resource_name: The name of the resource.
231
231
  :param pulumi.ResourceOptions opts: Options for the resource.
232
232
  :param pulumi.Input[str] description: The description for the customization specification.
233
233
  :param pulumi.Input[str] name: The name of the customization specification is the unique identifier per vCenter Server instance.
234
- :param pulumi.Input[Union['GuestOsCustomizationSpecArgs', 'GuestOsCustomizationSpecArgsDict']] spec: Container object for the Guest OS properties about to be customized . See virtual machine customizations
234
+ :param pulumi.Input[pulumi.InputType['GuestOsCustomizationSpecArgs']] spec: Container object for the Guest OS properties about to be customized . See virtual machine customizations
235
235
  :param pulumi.Input[str] type: The type of customization specification: One among: Windows, Linux.
236
236
  """
237
237
  ...
@@ -251,23 +251,23 @@ class GuestOsCustomization(pulumi.CustomResource):
251
251
  import pulumi
252
252
  import pulumi_vsphere as vsphere
253
253
 
254
- windows = vsphere.GuestOsCustomization("windows",
255
- name="windows",
254
+ windows_customization = vsphere.GuestOsCustomization("windows_customization",
255
+ name="windows-spec",
256
256
  type="Windows",
257
- spec={
258
- "windows_options": {
259
- "run_once_command_lists": [
257
+ spec=vsphere.GuestOsCustomizationSpecArgs(
258
+ windows_options=vsphere.GuestOsCustomizationSpecWindowsOptionsArgs(
259
+ run_once_command_lists=[
260
260
  "command-1",
261
261
  "command-2",
262
262
  ],
263
- "computer_name": "windows",
264
- "auto_logon": False,
265
- "auto_logon_count": 0,
266
- "admin_password": "VMware1!",
267
- "time_zone": 4,
268
- "workgroup": "workgroup",
269
- },
270
- })
263
+ computer_name="windows",
264
+ auto_logon=False,
265
+ auto_logon_count=0,
266
+ admin_password="VMware1!",
267
+ time_zone=4,
268
+ workgroup="workgroup",
269
+ ),
270
+ ))
271
271
  ```
272
272
 
273
273
  :param str resource_name: The name of the resource.
@@ -287,7 +287,7 @@ class GuestOsCustomization(pulumi.CustomResource):
287
287
  opts: Optional[pulumi.ResourceOptions] = None,
288
288
  description: Optional[pulumi.Input[str]] = None,
289
289
  name: Optional[pulumi.Input[str]] = None,
290
- spec: Optional[pulumi.Input[Union['GuestOsCustomizationSpecArgs', 'GuestOsCustomizationSpecArgsDict']]] = None,
290
+ spec: Optional[pulumi.Input[pulumi.InputType['GuestOsCustomizationSpecArgs']]] = None,
291
291
  type: Optional[pulumi.Input[str]] = None,
292
292
  __props__=None):
293
293
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
@@ -322,7 +322,7 @@ class GuestOsCustomization(pulumi.CustomResource):
322
322
  description: Optional[pulumi.Input[str]] = None,
323
323
  last_update_time: Optional[pulumi.Input[str]] = None,
324
324
  name: Optional[pulumi.Input[str]] = None,
325
- spec: Optional[pulumi.Input[Union['GuestOsCustomizationSpecArgs', 'GuestOsCustomizationSpecArgsDict']]] = None,
325
+ spec: Optional[pulumi.Input[pulumi.InputType['GuestOsCustomizationSpecArgs']]] = None,
326
326
  type: Optional[pulumi.Input[str]] = None) -> 'GuestOsCustomization':
327
327
  """
328
328
  Get an existing GuestOsCustomization resource's state with the given name, id, and optional extra
@@ -335,7 +335,7 @@ class GuestOsCustomization(pulumi.CustomResource):
335
335
  :param pulumi.Input[str] description: The description for the customization specification.
336
336
  :param pulumi.Input[str] last_update_time: The time of last modification to the customization specification.
337
337
  :param pulumi.Input[str] name: The name of the customization specification is the unique identifier per vCenter Server instance.
338
- :param pulumi.Input[Union['GuestOsCustomizationSpecArgs', 'GuestOsCustomizationSpecArgsDict']] spec: Container object for the Guest OS properties about to be customized . See virtual machine customizations
338
+ :param pulumi.Input[pulumi.InputType['GuestOsCustomizationSpecArgs']] spec: Container object for the Guest OS properties about to be customized . See virtual machine customizations
339
339
  :param pulumi.Input[str] type: The type of customization specification: One among: Windows, Linux.
340
340
  """
341
341
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
pulumi_vsphere/host.py CHANGED
@@ -8,8 +8,6 @@ import pulumi
8
8
  import pulumi.runtime
9
9
  from typing import Any, Mapping, Optional, Sequence, Union, overload
10
10
  from . import _utilities
11
- from . import outputs
12
- from ._inputs import *
13
11
 
14
12
  __all__ = ['HostArgs', 'Host']
15
13
 
@@ -28,7 +26,6 @@ class HostArgs:
28
26
  license: Optional[pulumi.Input[str]] = None,
29
27
  lockdown: Optional[pulumi.Input[str]] = None,
30
28
  maintenance: Optional[pulumi.Input[bool]] = None,
31
- services: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]] = None,
32
29
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
33
30
  thumbprint: Optional[pulumi.Input[str]] = None):
34
31
  """
@@ -66,7 +63,6 @@ class HostArgs:
66
63
  `disabled`, `normal`, and `strict`. Default is `disabled`.
67
64
  :param pulumi.Input[bool] maintenance: Set the management state of the host.
68
65
  Default is `false`.
69
- :param pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]] services: Set Services on host, the settings to be set are based on service being set as part of import.
70
66
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
71
67
  refer to the `Tag` resource for more information on applying
72
68
  tags to resources.
@@ -99,8 +95,6 @@ class HostArgs:
99
95
  pulumi.set(__self__, "lockdown", lockdown)
100
96
  if maintenance is not None:
101
97
  pulumi.set(__self__, "maintenance", maintenance)
102
- if services is not None:
103
- pulumi.set(__self__, "services", services)
104
98
  if tags is not None:
105
99
  pulumi.set(__self__, "tags", tags)
106
100
  if thumbprint is not None:
@@ -271,18 +265,6 @@ class HostArgs:
271
265
  def maintenance(self, value: Optional[pulumi.Input[bool]]):
272
266
  pulumi.set(self, "maintenance", value)
273
267
 
274
- @property
275
- @pulumi.getter
276
- def services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]:
277
- """
278
- Set Services on host, the settings to be set are based on service being set as part of import.
279
- """
280
- return pulumi.get(self, "services")
281
-
282
- @services.setter
283
- def services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]):
284
- pulumi.set(self, "services", value)
285
-
286
268
  @property
287
269
  @pulumi.getter
288
270
  def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
@@ -330,7 +312,6 @@ class _HostState:
330
312
  lockdown: Optional[pulumi.Input[str]] = None,
331
313
  maintenance: Optional[pulumi.Input[bool]] = None,
332
314
  password: Optional[pulumi.Input[str]] = None,
333
- services: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]] = None,
334
315
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
335
316
  thumbprint: Optional[pulumi.Input[str]] = None,
336
317
  username: Optional[pulumi.Input[str]] = None):
@@ -367,7 +348,6 @@ class _HostState:
367
348
  Default is `false`.
368
349
  :param pulumi.Input[str] password: Password that will be used by vSphere to authenticate
369
350
  to the host.
370
- :param pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]] services: Set Services on host, the settings to be set are based on service being set as part of import.
371
351
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
372
352
  refer to the `Tag` resource for more information on applying
373
353
  tags to resources.
@@ -403,8 +383,6 @@ class _HostState:
403
383
  pulumi.set(__self__, "maintenance", maintenance)
404
384
  if password is not None:
405
385
  pulumi.set(__self__, "password", password)
406
- if services is not None:
407
- pulumi.set(__self__, "services", services)
408
386
  if tags is not None:
409
387
  pulumi.set(__self__, "tags", tags)
410
388
  if thumbprint is not None:
@@ -564,18 +542,6 @@ class _HostState:
564
542
  def password(self, value: Optional[pulumi.Input[str]]):
565
543
  pulumi.set(self, "password", value)
566
544
 
567
- @property
568
- @pulumi.getter
569
- def services(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]:
570
- """
571
- Set Services on host, the settings to be set are based on service being set as part of import.
572
- """
573
- return pulumi.get(self, "services")
574
-
575
- @services.setter
576
- def services(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['HostServiceArgs']]]]):
577
- pulumi.set(self, "services", value)
578
-
579
545
  @property
580
546
  @pulumi.getter
581
547
  def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
@@ -638,7 +604,6 @@ class Host(pulumi.CustomResource):
638
604
  lockdown: Optional[pulumi.Input[str]] = None,
639
605
  maintenance: Optional[pulumi.Input[bool]] = None,
640
606
  password: Optional[pulumi.Input[str]] = None,
641
- services: Optional[pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]]] = None,
642
607
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
643
608
  thumbprint: Optional[pulumi.Input[str]] = None,
644
609
  username: Optional[pulumi.Input[str]] = None,
@@ -667,6 +632,26 @@ class Host(pulumi.CustomResource):
667
632
  datacenter=datacenter.id)
668
633
  ```
669
634
 
635
+ ### Create host in a compute cluster
636
+
637
+ ```python
638
+ import pulumi
639
+ import pulumi_vsphere as vsphere
640
+
641
+ datacenter = vsphere.get_datacenter(name="dc-01")
642
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
643
+ datacenter_id=datacenter.id)
644
+ thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com",
645
+ insecure=True)
646
+ esx_01 = vsphere.Host("esx-01",
647
+ hostname="esx-01.example.com",
648
+ username="root",
649
+ password="password",
650
+ license="00000-00000-00000-00000-00000",
651
+ thumbprint=thumbprint.id,
652
+ cluster=cluster.id)
653
+ ```
654
+
670
655
  ## Importing
671
656
 
672
657
  An existing host can be [imported][docs-import] into this resource by supplying
@@ -709,7 +694,6 @@ class Host(pulumi.CustomResource):
709
694
  Default is `false`.
710
695
  :param pulumi.Input[str] password: Password that will be used by vSphere to authenticate
711
696
  to the host.
712
- :param pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]] services: Set Services on host, the settings to be set are based on service being set as part of import.
713
697
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
714
698
  refer to the `Tag` resource for more information on applying
715
699
  tags to resources.
@@ -753,6 +737,26 @@ class Host(pulumi.CustomResource):
753
737
  datacenter=datacenter.id)
754
738
  ```
755
739
 
740
+ ### Create host in a compute cluster
741
+
742
+ ```python
743
+ import pulumi
744
+ import pulumi_vsphere as vsphere
745
+
746
+ datacenter = vsphere.get_datacenter(name="dc-01")
747
+ cluster = vsphere.get_compute_cluster(name="cluster-01",
748
+ datacenter_id=datacenter.id)
749
+ thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com",
750
+ insecure=True)
751
+ esx_01 = vsphere.Host("esx-01",
752
+ hostname="esx-01.example.com",
753
+ username="root",
754
+ password="password",
755
+ license="00000-00000-00000-00000-00000",
756
+ thumbprint=thumbprint.id,
757
+ cluster=cluster.id)
758
+ ```
759
+
756
760
  ## Importing
757
761
 
758
762
  An existing host can be [imported][docs-import] into this resource by supplying
@@ -788,7 +792,6 @@ class Host(pulumi.CustomResource):
788
792
  lockdown: Optional[pulumi.Input[str]] = None,
789
793
  maintenance: Optional[pulumi.Input[bool]] = None,
790
794
  password: Optional[pulumi.Input[str]] = None,
791
- services: Optional[pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]]] = None,
792
795
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
793
796
  thumbprint: Optional[pulumi.Input[str]] = None,
794
797
  username: Optional[pulumi.Input[str]] = None,
@@ -816,7 +819,6 @@ class Host(pulumi.CustomResource):
816
819
  if password is None and not opts.urn:
817
820
  raise TypeError("Missing required property 'password'")
818
821
  __props__.__dict__["password"] = None if password is None else pulumi.Output.secret(password)
819
- __props__.__dict__["services"] = services
820
822
  __props__.__dict__["tags"] = tags
821
823
  __props__.__dict__["thumbprint"] = thumbprint
822
824
  if username is None and not opts.urn:
@@ -845,7 +847,6 @@ class Host(pulumi.CustomResource):
845
847
  lockdown: Optional[pulumi.Input[str]] = None,
846
848
  maintenance: Optional[pulumi.Input[bool]] = None,
847
849
  password: Optional[pulumi.Input[str]] = None,
848
- services: Optional[pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]]] = None,
849
850
  tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
850
851
  thumbprint: Optional[pulumi.Input[str]] = None,
851
852
  username: Optional[pulumi.Input[str]] = None) -> 'Host':
@@ -887,7 +888,6 @@ class Host(pulumi.CustomResource):
887
888
  Default is `false`.
888
889
  :param pulumi.Input[str] password: Password that will be used by vSphere to authenticate
889
890
  to the host.
890
- :param pulumi.Input[Sequence[pulumi.Input[Union['HostServiceArgs', 'HostServiceArgsDict']]]] services: Set Services on host, the settings to be set are based on service being set as part of import.
891
891
  :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. Please
892
892
  refer to the `Tag` resource for more information on applying
893
893
  tags to resources.
@@ -916,7 +916,6 @@ class Host(pulumi.CustomResource):
916
916
  __props__.__dict__["lockdown"] = lockdown
917
917
  __props__.__dict__["maintenance"] = maintenance
918
918
  __props__.__dict__["password"] = password
919
- __props__.__dict__["services"] = services
920
919
  __props__.__dict__["tags"] = tags
921
920
  __props__.__dict__["thumbprint"] = thumbprint
922
921
  __props__.__dict__["username"] = username
@@ -1030,14 +1029,6 @@ class Host(pulumi.CustomResource):
1030
1029
  """
1031
1030
  return pulumi.get(self, "password")
1032
1031
 
1033
- @property
1034
- @pulumi.getter
1035
- def services(self) -> pulumi.Output[Optional[Sequence['outputs.HostService']]]:
1036
- """
1037
- Set Services on host, the settings to be set are based on service being set as part of import.
1038
- """
1039
- return pulumi.get(self, "services")
1040
-
1041
1032
  @property
1042
1033
  @pulumi.getter
1043
1034
  def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
@@ -953,7 +953,7 @@ class HostPortGroup(pulumi.CustomResource):
953
953
  key: Optional[pulumi.Input[str]] = None,
954
954
  name: Optional[pulumi.Input[str]] = None,
955
955
  notify_switches: Optional[pulumi.Input[bool]] = None,
956
- ports: Optional[pulumi.Input[Sequence[pulumi.Input[Union['HostPortGroupPortArgs', 'HostPortGroupPortArgsDict']]]]] = None,
956
+ ports: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['HostPortGroupPortArgs']]]]] = None,
957
957
  shaping_average_bandwidth: Optional[pulumi.Input[int]] = None,
958
958
  shaping_burst_size: Optional[pulumi.Input[int]] = None,
959
959
  shaping_enabled: Optional[pulumi.Input[bool]] = None,
@@ -986,7 +986,7 @@ class HostPortGroup(pulumi.CustomResource):
986
986
  :param pulumi.Input[str] name: The name of the port group. Forces a new resource if
987
987
  changed.
988
988
  :param pulumi.Input[bool] notify_switches: If true, the teaming policy will notify the broadcast network of a NIC failover, triggering cache updates.
989
- :param pulumi.Input[Sequence[pulumi.Input[Union['HostPortGroupPortArgs', 'HostPortGroupPortArgsDict']]]] ports: A list of ports that currently exist and are used on this port group.
989
+ :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['HostPortGroupPortArgs']]]] ports: A list of ports that currently exist and are used on this port group.
990
990
  :param pulumi.Input[int] shaping_average_bandwidth: The average bandwidth in bits per second if traffic shaping is enabled.
991
991
  :param pulumi.Input[int] shaping_burst_size: The maximum burst size allowed in bytes if traffic shaping is enabled.
992
992
  :param pulumi.Input[bool] shaping_enabled: Enable traffic shaping on this virtual switch or port group.