pulumi-vsphere 4.10.1__py3-none-any.whl → 4.10.2__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.
- pulumi_vsphere/__init__.py +28 -0
- pulumi_vsphere/_inputs.py +470 -6
- pulumi_vsphere/_utilities.py +35 -0
- pulumi_vsphere/compute_cluster.py +47 -0
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +0 -4
- pulumi_vsphere/datacenter.py +7 -28
- pulumi_vsphere/datastore_cluster.py +0 -14
- pulumi_vsphere/distributed_port_group.py +56 -7
- pulumi_vsphere/distributed_virtual_switch.py +7 -28
- pulumi_vsphere/entity_permissions.py +56 -35
- pulumi_vsphere/folder.py +7 -28
- pulumi_vsphere/get_compute_cluster_host_group.py +18 -16
- pulumi_vsphere/get_content_library.py +10 -6
- pulumi_vsphere/get_content_library_item.py +12 -8
- pulumi_vsphere/get_datastore.py +9 -9
- pulumi_vsphere/get_datastore_stats.py +34 -32
- pulumi_vsphere/get_dynamic.py +14 -12
- pulumi_vsphere/get_folder.py +10 -2
- pulumi_vsphere/get_guest_os_customization.py +8 -43
- pulumi_vsphere/get_host_base_images.py +97 -0
- pulumi_vsphere/get_host_pci_device.py +4 -2
- pulumi_vsphere/get_host_thumbprint.py +12 -12
- pulumi_vsphere/get_host_vgpu_profile.py +4 -2
- pulumi_vsphere/get_license.py +2 -1
- pulumi_vsphere/get_network.py +14 -14
- pulumi_vsphere/get_resource_pool.py +12 -8
- pulumi_vsphere/get_role.py +4 -4
- pulumi_vsphere/get_virtual_machine.py +58 -33
- pulumi_vsphere/guest_os_customization.py +4 -4
- pulumi_vsphere/nas_datastore.py +7 -7
- pulumi_vsphere/offline_software_depot.py +180 -0
- pulumi_vsphere/outputs.py +495 -40
- pulumi_vsphere/provider.py +2 -6
- pulumi_vsphere/pulumi-plugin.json +2 -1
- pulumi_vsphere/resource_pool.py +2 -2
- pulumi_vsphere/supervisor.py +962 -0
- pulumi_vsphere/virtual_disk.py +10 -16
- pulumi_vsphere/virtual_machine.py +2 -2
- pulumi_vsphere/virtual_machine_class.py +442 -0
- pulumi_vsphere/virtual_machine_snapshot.py +2 -2
- pulumi_vsphere/vm_storage_policy.py +2 -2
- pulumi_vsphere/vnic.py +61 -65
- {pulumi_vsphere-4.10.1.dist-info → pulumi_vsphere-4.10.2.dist-info}/METADATA +1 -1
- pulumi_vsphere-4.10.2.dist-info/RECORD +86 -0
- {pulumi_vsphere-4.10.1.dist-info → pulumi_vsphere-4.10.2.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.10.1.dist-info/RECORD +0 -82
- {pulumi_vsphere-4.10.1.dist-info → pulumi_vsphere-4.10.2.dist-info}/top_level.txt +0 -0
pulumi_vsphere/virtual_disk.py
CHANGED
|
@@ -52,7 +52,7 @@ class VirtualDiskArgs:
|
|
|
52
52
|
information on what each kind of disk provisioning policy means, click
|
|
53
53
|
[here][docs-vmware-vm-disk-provisioning].
|
|
54
54
|
|
|
55
|
-
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/
|
|
55
|
+
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-4C0F4D73-82F2-4B81-8AA7-1DD752A8A5AC.html
|
|
56
56
|
"""
|
|
57
57
|
pulumi.set(__self__, "datastore", datastore)
|
|
58
58
|
pulumi.set(__self__, "size", size)
|
|
@@ -109,6 +109,7 @@ class VirtualDiskArgs:
|
|
|
109
109
|
|
|
110
110
|
@property
|
|
111
111
|
@pulumi.getter(name="adapterType")
|
|
112
|
+
@_utilities.deprecated("""this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""")
|
|
112
113
|
def adapter_type(self) -> Optional[pulumi.Input[str]]:
|
|
113
114
|
"""
|
|
114
115
|
The adapter type for this virtual disk. Can be
|
|
@@ -121,9 +122,6 @@ class VirtualDiskArgs:
|
|
|
121
122
|
disk controller types. This parameter will be removed in future versions of the
|
|
122
123
|
vSphere provider.
|
|
123
124
|
"""
|
|
124
|
-
warnings.warn("""this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""", DeprecationWarning)
|
|
125
|
-
pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""")
|
|
126
|
-
|
|
127
125
|
return pulumi.get(self, "adapter_type")
|
|
128
126
|
|
|
129
127
|
@adapter_type.setter
|
|
@@ -171,7 +169,7 @@ class VirtualDiskArgs:
|
|
|
171
169
|
information on what each kind of disk provisioning policy means, click
|
|
172
170
|
[here][docs-vmware-vm-disk-provisioning].
|
|
173
171
|
|
|
174
|
-
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/
|
|
172
|
+
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-4C0F4D73-82F2-4B81-8AA7-1DD752A8A5AC.html
|
|
175
173
|
"""
|
|
176
174
|
return pulumi.get(self, "type")
|
|
177
175
|
|
|
@@ -219,7 +217,7 @@ class _VirtualDiskState:
|
|
|
219
217
|
information on what each kind of disk provisioning policy means, click
|
|
220
218
|
[here][docs-vmware-vm-disk-provisioning].
|
|
221
219
|
|
|
222
|
-
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/
|
|
220
|
+
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-4C0F4D73-82F2-4B81-8AA7-1DD752A8A5AC.html
|
|
223
221
|
:param pulumi.Input[str] vmdk_path: The path, including filename, of the virtual disk to
|
|
224
222
|
be created. This needs to end in `.vmdk`.
|
|
225
223
|
"""
|
|
@@ -243,6 +241,7 @@ class _VirtualDiskState:
|
|
|
243
241
|
|
|
244
242
|
@property
|
|
245
243
|
@pulumi.getter(name="adapterType")
|
|
244
|
+
@_utilities.deprecated("""this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""")
|
|
246
245
|
def adapter_type(self) -> Optional[pulumi.Input[str]]:
|
|
247
246
|
"""
|
|
248
247
|
The adapter type for this virtual disk. Can be
|
|
@@ -255,9 +254,6 @@ class _VirtualDiskState:
|
|
|
255
254
|
disk controller types. This parameter will be removed in future versions of the
|
|
256
255
|
vSphere provider.
|
|
257
256
|
"""
|
|
258
|
-
warnings.warn("""this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""", DeprecationWarning)
|
|
259
|
-
pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""")
|
|
260
|
-
|
|
261
257
|
return pulumi.get(self, "adapter_type")
|
|
262
258
|
|
|
263
259
|
@adapter_type.setter
|
|
@@ -330,7 +326,7 @@ class _VirtualDiskState:
|
|
|
330
326
|
information on what each kind of disk provisioning policy means, click
|
|
331
327
|
[here][docs-vmware-vm-disk-provisioning].
|
|
332
328
|
|
|
333
|
-
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/
|
|
329
|
+
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-4C0F4D73-82F2-4B81-8AA7-1DD752A8A5AC.html
|
|
334
330
|
"""
|
|
335
331
|
return pulumi.get(self, "type")
|
|
336
332
|
|
|
@@ -396,7 +392,7 @@ class VirtualDisk(pulumi.CustomResource):
|
|
|
396
392
|
information on what each kind of disk provisioning policy means, click
|
|
397
393
|
[here][docs-vmware-vm-disk-provisioning].
|
|
398
394
|
|
|
399
|
-
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/
|
|
395
|
+
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-4C0F4D73-82F2-4B81-8AA7-1DD752A8A5AC.html
|
|
400
396
|
:param pulumi.Input[str] vmdk_path: The path, including filename, of the virtual disk to
|
|
401
397
|
be created. This needs to end in `.vmdk`.
|
|
402
398
|
"""
|
|
@@ -503,7 +499,7 @@ class VirtualDisk(pulumi.CustomResource):
|
|
|
503
499
|
information on what each kind of disk provisioning policy means, click
|
|
504
500
|
[here][docs-vmware-vm-disk-provisioning].
|
|
505
501
|
|
|
506
|
-
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/
|
|
502
|
+
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-4C0F4D73-82F2-4B81-8AA7-1DD752A8A5AC.html
|
|
507
503
|
:param pulumi.Input[str] vmdk_path: The path, including filename, of the virtual disk to
|
|
508
504
|
be created. This needs to end in `.vmdk`.
|
|
509
505
|
"""
|
|
@@ -522,6 +518,7 @@ class VirtualDisk(pulumi.CustomResource):
|
|
|
522
518
|
|
|
523
519
|
@property
|
|
524
520
|
@pulumi.getter(name="adapterType")
|
|
521
|
+
@_utilities.deprecated("""this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""")
|
|
525
522
|
def adapter_type(self) -> pulumi.Output[Optional[str]]:
|
|
526
523
|
"""
|
|
527
524
|
The adapter type for this virtual disk. Can be
|
|
@@ -534,9 +531,6 @@ class VirtualDisk(pulumi.CustomResource):
|
|
|
534
531
|
disk controller types. This parameter will be removed in future versions of the
|
|
535
532
|
vSphere provider.
|
|
536
533
|
"""
|
|
537
|
-
warnings.warn("""this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""", DeprecationWarning)
|
|
538
|
-
pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in VirtualMachine instead""")
|
|
539
|
-
|
|
540
534
|
return pulumi.get(self, "adapter_type")
|
|
541
535
|
|
|
542
536
|
@property
|
|
@@ -589,7 +583,7 @@ class VirtualDisk(pulumi.CustomResource):
|
|
|
589
583
|
information on what each kind of disk provisioning policy means, click
|
|
590
584
|
[here][docs-vmware-vm-disk-provisioning].
|
|
591
585
|
|
|
592
|
-
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/
|
|
586
|
+
[docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-4C0F4D73-82F2-4B81-8AA7-1DD752A8A5AC.html
|
|
593
587
|
"""
|
|
594
588
|
return pulumi.get(self, "type")
|
|
595
589
|
|
|
@@ -3493,7 +3493,7 @@ class VirtualMachine(pulumi.CustomResource):
|
|
|
3493
3493
|
|
|
3494
3494
|
@property
|
|
3495
3495
|
@pulumi.getter(name="eptRviMode")
|
|
3496
|
-
def ept_rvi_mode(self) -> pulumi.Output[
|
|
3496
|
+
def ept_rvi_mode(self) -> pulumi.Output[str]:
|
|
3497
3497
|
"""
|
|
3498
3498
|
The EPT/RVI (hardware memory virtualization) setting for this virtual machine. Can be one of automatic, on, or off.
|
|
3499
3499
|
"""
|
|
@@ -3574,7 +3574,7 @@ class VirtualMachine(pulumi.CustomResource):
|
|
|
3574
3574
|
|
|
3575
3575
|
@property
|
|
3576
3576
|
@pulumi.getter(name="hvMode")
|
|
3577
|
-
def hv_mode(self) -> pulumi.Output[
|
|
3577
|
+
def hv_mode(self) -> pulumi.Output[str]:
|
|
3578
3578
|
"""
|
|
3579
3579
|
The (non-nested) hardware virtualization setting for this virtual machine. Can be one of hvAuto, hvOn, or hvOff.
|
|
3580
3580
|
"""
|
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import copy
|
|
6
|
+
import warnings
|
|
7
|
+
import pulumi
|
|
8
|
+
import pulumi.runtime
|
|
9
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
10
|
+
from . import _utilities
|
|
11
|
+
|
|
12
|
+
__all__ = ['VirtualMachineClassArgs', 'VirtualMachineClass']
|
|
13
|
+
|
|
14
|
+
@pulumi.input_type
|
|
15
|
+
class VirtualMachineClassArgs:
|
|
16
|
+
def __init__(__self__, *,
|
|
17
|
+
cpus: pulumi.Input[int],
|
|
18
|
+
memory: pulumi.Input[int],
|
|
19
|
+
cpu_reservation: Optional[pulumi.Input[int]] = None,
|
|
20
|
+
memory_reservation: Optional[pulumi.Input[int]] = None,
|
|
21
|
+
name: Optional[pulumi.Input[str]] = None,
|
|
22
|
+
vgpu_devices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
23
|
+
"""
|
|
24
|
+
The set of arguments for constructing a VirtualMachineClass resource.
|
|
25
|
+
:param pulumi.Input[int] cpus: The number of CPUs.
|
|
26
|
+
:param pulumi.Input[int] memory: The amount of memory in MB.
|
|
27
|
+
:param pulumi.Input[int] cpu_reservation: The percentage of the available CPU capacity which will be reserved.
|
|
28
|
+
:param pulumi.Input[int] memory_reservation: The percentage of memory reservation.
|
|
29
|
+
:param pulumi.Input[str] name: The name for the class.
|
|
30
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] vgpu_devices: The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
|
|
31
|
+
"""
|
|
32
|
+
pulumi.set(__self__, "cpus", cpus)
|
|
33
|
+
pulumi.set(__self__, "memory", memory)
|
|
34
|
+
if cpu_reservation is not None:
|
|
35
|
+
pulumi.set(__self__, "cpu_reservation", cpu_reservation)
|
|
36
|
+
if memory_reservation is not None:
|
|
37
|
+
pulumi.set(__self__, "memory_reservation", memory_reservation)
|
|
38
|
+
if name is not None:
|
|
39
|
+
pulumi.set(__self__, "name", name)
|
|
40
|
+
if vgpu_devices is not None:
|
|
41
|
+
pulumi.set(__self__, "vgpu_devices", vgpu_devices)
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
@pulumi.getter
|
|
45
|
+
def cpus(self) -> pulumi.Input[int]:
|
|
46
|
+
"""
|
|
47
|
+
The number of CPUs.
|
|
48
|
+
"""
|
|
49
|
+
return pulumi.get(self, "cpus")
|
|
50
|
+
|
|
51
|
+
@cpus.setter
|
|
52
|
+
def cpus(self, value: pulumi.Input[int]):
|
|
53
|
+
pulumi.set(self, "cpus", value)
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
@pulumi.getter
|
|
57
|
+
def memory(self) -> pulumi.Input[int]:
|
|
58
|
+
"""
|
|
59
|
+
The amount of memory in MB.
|
|
60
|
+
"""
|
|
61
|
+
return pulumi.get(self, "memory")
|
|
62
|
+
|
|
63
|
+
@memory.setter
|
|
64
|
+
def memory(self, value: pulumi.Input[int]):
|
|
65
|
+
pulumi.set(self, "memory", value)
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
@pulumi.getter(name="cpuReservation")
|
|
69
|
+
def cpu_reservation(self) -> Optional[pulumi.Input[int]]:
|
|
70
|
+
"""
|
|
71
|
+
The percentage of the available CPU capacity which will be reserved.
|
|
72
|
+
"""
|
|
73
|
+
return pulumi.get(self, "cpu_reservation")
|
|
74
|
+
|
|
75
|
+
@cpu_reservation.setter
|
|
76
|
+
def cpu_reservation(self, value: Optional[pulumi.Input[int]]):
|
|
77
|
+
pulumi.set(self, "cpu_reservation", value)
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
@pulumi.getter(name="memoryReservation")
|
|
81
|
+
def memory_reservation(self) -> Optional[pulumi.Input[int]]:
|
|
82
|
+
"""
|
|
83
|
+
The percentage of memory reservation.
|
|
84
|
+
"""
|
|
85
|
+
return pulumi.get(self, "memory_reservation")
|
|
86
|
+
|
|
87
|
+
@memory_reservation.setter
|
|
88
|
+
def memory_reservation(self, value: Optional[pulumi.Input[int]]):
|
|
89
|
+
pulumi.set(self, "memory_reservation", value)
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
@pulumi.getter
|
|
93
|
+
def name(self) -> Optional[pulumi.Input[str]]:
|
|
94
|
+
"""
|
|
95
|
+
The name for the class.
|
|
96
|
+
"""
|
|
97
|
+
return pulumi.get(self, "name")
|
|
98
|
+
|
|
99
|
+
@name.setter
|
|
100
|
+
def name(self, value: Optional[pulumi.Input[str]]):
|
|
101
|
+
pulumi.set(self, "name", value)
|
|
102
|
+
|
|
103
|
+
@property
|
|
104
|
+
@pulumi.getter(name="vgpuDevices")
|
|
105
|
+
def vgpu_devices(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
106
|
+
"""
|
|
107
|
+
The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
|
|
108
|
+
"""
|
|
109
|
+
return pulumi.get(self, "vgpu_devices")
|
|
110
|
+
|
|
111
|
+
@vgpu_devices.setter
|
|
112
|
+
def vgpu_devices(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
|
113
|
+
pulumi.set(self, "vgpu_devices", value)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
@pulumi.input_type
|
|
117
|
+
class _VirtualMachineClassState:
|
|
118
|
+
def __init__(__self__, *,
|
|
119
|
+
cpu_reservation: Optional[pulumi.Input[int]] = None,
|
|
120
|
+
cpus: Optional[pulumi.Input[int]] = None,
|
|
121
|
+
memory: Optional[pulumi.Input[int]] = None,
|
|
122
|
+
memory_reservation: Optional[pulumi.Input[int]] = None,
|
|
123
|
+
name: Optional[pulumi.Input[str]] = None,
|
|
124
|
+
vgpu_devices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
125
|
+
"""
|
|
126
|
+
Input properties used for looking up and filtering VirtualMachineClass resources.
|
|
127
|
+
:param pulumi.Input[int] cpu_reservation: The percentage of the available CPU capacity which will be reserved.
|
|
128
|
+
:param pulumi.Input[int] cpus: The number of CPUs.
|
|
129
|
+
:param pulumi.Input[int] memory: The amount of memory in MB.
|
|
130
|
+
:param pulumi.Input[int] memory_reservation: The percentage of memory reservation.
|
|
131
|
+
:param pulumi.Input[str] name: The name for the class.
|
|
132
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] vgpu_devices: The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
|
|
133
|
+
"""
|
|
134
|
+
if cpu_reservation is not None:
|
|
135
|
+
pulumi.set(__self__, "cpu_reservation", cpu_reservation)
|
|
136
|
+
if cpus is not None:
|
|
137
|
+
pulumi.set(__self__, "cpus", cpus)
|
|
138
|
+
if memory is not None:
|
|
139
|
+
pulumi.set(__self__, "memory", memory)
|
|
140
|
+
if memory_reservation is not None:
|
|
141
|
+
pulumi.set(__self__, "memory_reservation", memory_reservation)
|
|
142
|
+
if name is not None:
|
|
143
|
+
pulumi.set(__self__, "name", name)
|
|
144
|
+
if vgpu_devices is not None:
|
|
145
|
+
pulumi.set(__self__, "vgpu_devices", vgpu_devices)
|
|
146
|
+
|
|
147
|
+
@property
|
|
148
|
+
@pulumi.getter(name="cpuReservation")
|
|
149
|
+
def cpu_reservation(self) -> Optional[pulumi.Input[int]]:
|
|
150
|
+
"""
|
|
151
|
+
The percentage of the available CPU capacity which will be reserved.
|
|
152
|
+
"""
|
|
153
|
+
return pulumi.get(self, "cpu_reservation")
|
|
154
|
+
|
|
155
|
+
@cpu_reservation.setter
|
|
156
|
+
def cpu_reservation(self, value: Optional[pulumi.Input[int]]):
|
|
157
|
+
pulumi.set(self, "cpu_reservation", value)
|
|
158
|
+
|
|
159
|
+
@property
|
|
160
|
+
@pulumi.getter
|
|
161
|
+
def cpus(self) -> Optional[pulumi.Input[int]]:
|
|
162
|
+
"""
|
|
163
|
+
The number of CPUs.
|
|
164
|
+
"""
|
|
165
|
+
return pulumi.get(self, "cpus")
|
|
166
|
+
|
|
167
|
+
@cpus.setter
|
|
168
|
+
def cpus(self, value: Optional[pulumi.Input[int]]):
|
|
169
|
+
pulumi.set(self, "cpus", value)
|
|
170
|
+
|
|
171
|
+
@property
|
|
172
|
+
@pulumi.getter
|
|
173
|
+
def memory(self) -> Optional[pulumi.Input[int]]:
|
|
174
|
+
"""
|
|
175
|
+
The amount of memory in MB.
|
|
176
|
+
"""
|
|
177
|
+
return pulumi.get(self, "memory")
|
|
178
|
+
|
|
179
|
+
@memory.setter
|
|
180
|
+
def memory(self, value: Optional[pulumi.Input[int]]):
|
|
181
|
+
pulumi.set(self, "memory", value)
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
@pulumi.getter(name="memoryReservation")
|
|
185
|
+
def memory_reservation(self) -> Optional[pulumi.Input[int]]:
|
|
186
|
+
"""
|
|
187
|
+
The percentage of memory reservation.
|
|
188
|
+
"""
|
|
189
|
+
return pulumi.get(self, "memory_reservation")
|
|
190
|
+
|
|
191
|
+
@memory_reservation.setter
|
|
192
|
+
def memory_reservation(self, value: Optional[pulumi.Input[int]]):
|
|
193
|
+
pulumi.set(self, "memory_reservation", value)
|
|
194
|
+
|
|
195
|
+
@property
|
|
196
|
+
@pulumi.getter
|
|
197
|
+
def name(self) -> Optional[pulumi.Input[str]]:
|
|
198
|
+
"""
|
|
199
|
+
The name for the class.
|
|
200
|
+
"""
|
|
201
|
+
return pulumi.get(self, "name")
|
|
202
|
+
|
|
203
|
+
@name.setter
|
|
204
|
+
def name(self, value: Optional[pulumi.Input[str]]):
|
|
205
|
+
pulumi.set(self, "name", value)
|
|
206
|
+
|
|
207
|
+
@property
|
|
208
|
+
@pulumi.getter(name="vgpuDevices")
|
|
209
|
+
def vgpu_devices(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
210
|
+
"""
|
|
211
|
+
The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
|
|
212
|
+
"""
|
|
213
|
+
return pulumi.get(self, "vgpu_devices")
|
|
214
|
+
|
|
215
|
+
@vgpu_devices.setter
|
|
216
|
+
def vgpu_devices(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
|
217
|
+
pulumi.set(self, "vgpu_devices", value)
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
class VirtualMachineClass(pulumi.CustomResource):
|
|
221
|
+
@overload
|
|
222
|
+
def __init__(__self__,
|
|
223
|
+
resource_name: str,
|
|
224
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
225
|
+
cpu_reservation: Optional[pulumi.Input[int]] = None,
|
|
226
|
+
cpus: Optional[pulumi.Input[int]] = None,
|
|
227
|
+
memory: Optional[pulumi.Input[int]] = None,
|
|
228
|
+
memory_reservation: Optional[pulumi.Input[int]] = None,
|
|
229
|
+
name: Optional[pulumi.Input[str]] = None,
|
|
230
|
+
vgpu_devices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
231
|
+
__props__=None):
|
|
232
|
+
"""
|
|
233
|
+
Provides a resource for configuring a Virtual Machine class.
|
|
234
|
+
|
|
235
|
+
## Example Usage
|
|
236
|
+
|
|
237
|
+
### S
|
|
238
|
+
|
|
239
|
+
**Create a basic class**
|
|
240
|
+
|
|
241
|
+
```python
|
|
242
|
+
import pulumi
|
|
243
|
+
import pulumi_vsphere as vsphere
|
|
244
|
+
|
|
245
|
+
basic_class = vsphere.VirtualMachineClass("basic_class",
|
|
246
|
+
name="basic-class",
|
|
247
|
+
cpus=4,
|
|
248
|
+
memory=4096)
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Create a class with a vGPU**
|
|
252
|
+
|
|
253
|
+
```python
|
|
254
|
+
import pulumi
|
|
255
|
+
import pulumi_vsphere as vsphere
|
|
256
|
+
|
|
257
|
+
vgp_class = vsphere.VirtualMachineClass("vgp_class",
|
|
258
|
+
name="vgpu-class",
|
|
259
|
+
cpus=4,
|
|
260
|
+
memory=4096,
|
|
261
|
+
memory_reservation=100,
|
|
262
|
+
vgpu_devices=["vgpu1"])
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
:param str resource_name: The name of the resource.
|
|
266
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
267
|
+
:param pulumi.Input[int] cpu_reservation: The percentage of the available CPU capacity which will be reserved.
|
|
268
|
+
:param pulumi.Input[int] cpus: The number of CPUs.
|
|
269
|
+
:param pulumi.Input[int] memory: The amount of memory in MB.
|
|
270
|
+
:param pulumi.Input[int] memory_reservation: The percentage of memory reservation.
|
|
271
|
+
:param pulumi.Input[str] name: The name for the class.
|
|
272
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] vgpu_devices: The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
|
|
273
|
+
"""
|
|
274
|
+
...
|
|
275
|
+
@overload
|
|
276
|
+
def __init__(__self__,
|
|
277
|
+
resource_name: str,
|
|
278
|
+
args: VirtualMachineClassArgs,
|
|
279
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
280
|
+
"""
|
|
281
|
+
Provides a resource for configuring a Virtual Machine class.
|
|
282
|
+
|
|
283
|
+
## Example Usage
|
|
284
|
+
|
|
285
|
+
### S
|
|
286
|
+
|
|
287
|
+
**Create a basic class**
|
|
288
|
+
|
|
289
|
+
```python
|
|
290
|
+
import pulumi
|
|
291
|
+
import pulumi_vsphere as vsphere
|
|
292
|
+
|
|
293
|
+
basic_class = vsphere.VirtualMachineClass("basic_class",
|
|
294
|
+
name="basic-class",
|
|
295
|
+
cpus=4,
|
|
296
|
+
memory=4096)
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
**Create a class with a vGPU**
|
|
300
|
+
|
|
301
|
+
```python
|
|
302
|
+
import pulumi
|
|
303
|
+
import pulumi_vsphere as vsphere
|
|
304
|
+
|
|
305
|
+
vgp_class = vsphere.VirtualMachineClass("vgp_class",
|
|
306
|
+
name="vgpu-class",
|
|
307
|
+
cpus=4,
|
|
308
|
+
memory=4096,
|
|
309
|
+
memory_reservation=100,
|
|
310
|
+
vgpu_devices=["vgpu1"])
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
:param str resource_name: The name of the resource.
|
|
314
|
+
:param VirtualMachineClassArgs args: The arguments to use to populate this resource's properties.
|
|
315
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
316
|
+
"""
|
|
317
|
+
...
|
|
318
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
319
|
+
resource_args, opts = _utilities.get_resource_args_opts(VirtualMachineClassArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
320
|
+
if resource_args is not None:
|
|
321
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
322
|
+
else:
|
|
323
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
324
|
+
|
|
325
|
+
def _internal_init(__self__,
|
|
326
|
+
resource_name: str,
|
|
327
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
328
|
+
cpu_reservation: Optional[pulumi.Input[int]] = None,
|
|
329
|
+
cpus: Optional[pulumi.Input[int]] = None,
|
|
330
|
+
memory: Optional[pulumi.Input[int]] = None,
|
|
331
|
+
memory_reservation: Optional[pulumi.Input[int]] = None,
|
|
332
|
+
name: Optional[pulumi.Input[str]] = None,
|
|
333
|
+
vgpu_devices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
334
|
+
__props__=None):
|
|
335
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
336
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
337
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
338
|
+
if opts.id is None:
|
|
339
|
+
if __props__ is not None:
|
|
340
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
341
|
+
__props__ = VirtualMachineClassArgs.__new__(VirtualMachineClassArgs)
|
|
342
|
+
|
|
343
|
+
__props__.__dict__["cpu_reservation"] = cpu_reservation
|
|
344
|
+
if cpus is None and not opts.urn:
|
|
345
|
+
raise TypeError("Missing required property 'cpus'")
|
|
346
|
+
__props__.__dict__["cpus"] = cpus
|
|
347
|
+
if memory is None and not opts.urn:
|
|
348
|
+
raise TypeError("Missing required property 'memory'")
|
|
349
|
+
__props__.__dict__["memory"] = memory
|
|
350
|
+
__props__.__dict__["memory_reservation"] = memory_reservation
|
|
351
|
+
__props__.__dict__["name"] = name
|
|
352
|
+
__props__.__dict__["vgpu_devices"] = vgpu_devices
|
|
353
|
+
super(VirtualMachineClass, __self__).__init__(
|
|
354
|
+
'vsphere:index/virtualMachineClass:VirtualMachineClass',
|
|
355
|
+
resource_name,
|
|
356
|
+
__props__,
|
|
357
|
+
opts)
|
|
358
|
+
|
|
359
|
+
@staticmethod
|
|
360
|
+
def get(resource_name: str,
|
|
361
|
+
id: pulumi.Input[str],
|
|
362
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
363
|
+
cpu_reservation: Optional[pulumi.Input[int]] = None,
|
|
364
|
+
cpus: Optional[pulumi.Input[int]] = None,
|
|
365
|
+
memory: Optional[pulumi.Input[int]] = None,
|
|
366
|
+
memory_reservation: Optional[pulumi.Input[int]] = None,
|
|
367
|
+
name: Optional[pulumi.Input[str]] = None,
|
|
368
|
+
vgpu_devices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'VirtualMachineClass':
|
|
369
|
+
"""
|
|
370
|
+
Get an existing VirtualMachineClass resource's state with the given name, id, and optional extra
|
|
371
|
+
properties used to qualify the lookup.
|
|
372
|
+
|
|
373
|
+
:param str resource_name: The unique name of the resulting resource.
|
|
374
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
375
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
376
|
+
:param pulumi.Input[int] cpu_reservation: The percentage of the available CPU capacity which will be reserved.
|
|
377
|
+
:param pulumi.Input[int] cpus: The number of CPUs.
|
|
378
|
+
:param pulumi.Input[int] memory: The amount of memory in MB.
|
|
379
|
+
:param pulumi.Input[int] memory_reservation: The percentage of memory reservation.
|
|
380
|
+
:param pulumi.Input[str] name: The name for the class.
|
|
381
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] vgpu_devices: The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
|
|
382
|
+
"""
|
|
383
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
384
|
+
|
|
385
|
+
__props__ = _VirtualMachineClassState.__new__(_VirtualMachineClassState)
|
|
386
|
+
|
|
387
|
+
__props__.__dict__["cpu_reservation"] = cpu_reservation
|
|
388
|
+
__props__.__dict__["cpus"] = cpus
|
|
389
|
+
__props__.__dict__["memory"] = memory
|
|
390
|
+
__props__.__dict__["memory_reservation"] = memory_reservation
|
|
391
|
+
__props__.__dict__["name"] = name
|
|
392
|
+
__props__.__dict__["vgpu_devices"] = vgpu_devices
|
|
393
|
+
return VirtualMachineClass(resource_name, opts=opts, __props__=__props__)
|
|
394
|
+
|
|
395
|
+
@property
|
|
396
|
+
@pulumi.getter(name="cpuReservation")
|
|
397
|
+
def cpu_reservation(self) -> pulumi.Output[Optional[int]]:
|
|
398
|
+
"""
|
|
399
|
+
The percentage of the available CPU capacity which will be reserved.
|
|
400
|
+
"""
|
|
401
|
+
return pulumi.get(self, "cpu_reservation")
|
|
402
|
+
|
|
403
|
+
@property
|
|
404
|
+
@pulumi.getter
|
|
405
|
+
def cpus(self) -> pulumi.Output[int]:
|
|
406
|
+
"""
|
|
407
|
+
The number of CPUs.
|
|
408
|
+
"""
|
|
409
|
+
return pulumi.get(self, "cpus")
|
|
410
|
+
|
|
411
|
+
@property
|
|
412
|
+
@pulumi.getter
|
|
413
|
+
def memory(self) -> pulumi.Output[int]:
|
|
414
|
+
"""
|
|
415
|
+
The amount of memory in MB.
|
|
416
|
+
"""
|
|
417
|
+
return pulumi.get(self, "memory")
|
|
418
|
+
|
|
419
|
+
@property
|
|
420
|
+
@pulumi.getter(name="memoryReservation")
|
|
421
|
+
def memory_reservation(self) -> pulumi.Output[Optional[int]]:
|
|
422
|
+
"""
|
|
423
|
+
The percentage of memory reservation.
|
|
424
|
+
"""
|
|
425
|
+
return pulumi.get(self, "memory_reservation")
|
|
426
|
+
|
|
427
|
+
@property
|
|
428
|
+
@pulumi.getter
|
|
429
|
+
def name(self) -> pulumi.Output[str]:
|
|
430
|
+
"""
|
|
431
|
+
The name for the class.
|
|
432
|
+
"""
|
|
433
|
+
return pulumi.get(self, "name")
|
|
434
|
+
|
|
435
|
+
@property
|
|
436
|
+
@pulumi.getter(name="vgpuDevices")
|
|
437
|
+
def vgpu_devices(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
|
438
|
+
"""
|
|
439
|
+
The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
|
|
440
|
+
"""
|
|
441
|
+
return pulumi.get(self, "vgpu_devices")
|
|
442
|
+
|
|
@@ -290,7 +290,7 @@ class VirtualMachineSnapshot(pulumi.CustomResource):
|
|
|
290
290
|
For more information on managing snapshots and how they work in VMware, see
|
|
291
291
|
[here][ext-vm-snapshot-management].
|
|
292
292
|
|
|
293
|
-
[ext-vm-snapshot-management]: https://docs.vmware.com/en/VMware-vSphere/
|
|
293
|
+
[ext-vm-snapshot-management]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-esxi-host-client/GUID-CA948C69-7F58-4519-AEB1-739545EA94E5.html
|
|
294
294
|
|
|
295
295
|
> **NOTE:** A snapshot in VMware differs from traditional disk snapshots, and
|
|
296
296
|
can contain the actual running state of the virtual machine, data for all disks
|
|
@@ -351,7 +351,7 @@ class VirtualMachineSnapshot(pulumi.CustomResource):
|
|
|
351
351
|
For more information on managing snapshots and how they work in VMware, see
|
|
352
352
|
[here][ext-vm-snapshot-management].
|
|
353
353
|
|
|
354
|
-
[ext-vm-snapshot-management]: https://docs.vmware.com/en/VMware-vSphere/
|
|
354
|
+
[ext-vm-snapshot-management]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-esxi-host-client/GUID-CA948C69-7F58-4519-AEB1-739545EA94E5.html
|
|
355
355
|
|
|
356
356
|
> **NOTE:** A snapshot in VMware differs from traditional disk snapshots, and
|
|
357
357
|
can contain the actual running state of the virtual machine, data for all disks
|
|
@@ -227,7 +227,7 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
227
227
|
])
|
|
228
228
|
```
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
Lastly, when creating a virtual machine resource, a storage policy can be specified to direct virtual machine placement to a datastore which matches the policy's `tags_rules`.
|
|
231
231
|
|
|
232
232
|
```python
|
|
233
233
|
import pulumi
|
|
@@ -345,7 +345,7 @@ class VmStoragePolicy(pulumi.CustomResource):
|
|
|
345
345
|
])
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
-
|
|
348
|
+
Lastly, when creating a virtual machine resource, a storage policy can be specified to direct virtual machine placement to a datastore which matches the policy's `tags_rules`.
|
|
349
349
|
|
|
350
350
|
```python
|
|
351
351
|
import pulumi
|