pulumi-vsphere 4.10.0a1710160860__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.
- pulumi_vsphere/__init__.py +30 -0
- pulumi_vsphere/_inputs.py +1816 -277
- pulumi_vsphere/_utilities.py +41 -5
- pulumi_vsphere/compute_cluster.py +937 -1488
- pulumi_vsphere/compute_cluster_host_group.py +67 -2
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +69 -34
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +41 -2
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +205 -2
- pulumi_vsphere/compute_cluster_vm_group.py +198 -2
- pulumi_vsphere/compute_cluster_vm_host_rule.py +73 -2
- pulumi_vsphere/config/__init__.pyi +5 -0
- pulumi_vsphere/config/vars.py +5 -0
- pulumi_vsphere/content_library.py +113 -12
- pulumi_vsphere/content_library_item.py +143 -2
- pulumi_vsphere/custom_attribute.py +77 -2
- pulumi_vsphere/datacenter.py +48 -40
- pulumi_vsphere/datastore_cluster.py +217 -366
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +159 -2
- pulumi_vsphere/distributed_port_group.py +416 -189
- pulumi_vsphere/distributed_virtual_switch.py +571 -830
- pulumi_vsphere/dpm_host_override.py +63 -2
- pulumi_vsphere/drs_vm_override.py +67 -2
- pulumi_vsphere/entity_permissions.py +64 -38
- pulumi_vsphere/file.py +21 -24
- pulumi_vsphere/folder.py +148 -30
- pulumi_vsphere/get_compute_cluster.py +16 -9
- pulumi_vsphere/get_compute_cluster_host_group.py +36 -25
- pulumi_vsphere/get_content_library.py +23 -15
- pulumi_vsphere/get_content_library_item.py +29 -13
- pulumi_vsphere/get_custom_attribute.py +14 -9
- pulumi_vsphere/get_datacenter.py +30 -12
- pulumi_vsphere/get_datastore.py +44 -12
- pulumi_vsphere/get_datastore_cluster.py +31 -10
- pulumi_vsphere/get_datastore_stats.py +208 -0
- pulumi_vsphere/get_distributed_virtual_switch.py +18 -9
- pulumi_vsphere/get_dynamic.py +35 -25
- pulumi_vsphere/get_folder.py +23 -11
- pulumi_vsphere/get_guest_os_customization.py +26 -52
- pulumi_vsphere/get_host.py +16 -9
- pulumi_vsphere/get_host_base_images.py +104 -0
- pulumi_vsphere/get_host_pci_device.py +28 -19
- pulumi_vsphere/get_host_thumbprint.py +41 -25
- pulumi_vsphere/get_host_vgpu_profile.py +195 -0
- pulumi_vsphere/get_license.py +20 -10
- pulumi_vsphere/get_network.py +80 -24
- pulumi_vsphere/get_ovf_vm_template.py +56 -5
- pulumi_vsphere/get_policy.py +13 -9
- pulumi_vsphere/get_resource_pool.py +29 -23
- pulumi_vsphere/get_role.py +23 -13
- pulumi_vsphere/get_tag.py +16 -9
- pulumi_vsphere/get_tag_category.py +16 -9
- pulumi_vsphere/get_vapp_container.py +15 -9
- pulumi_vsphere/get_virtual_machine.py +233 -48
- pulumi_vsphere/get_vmfs_disks.py +18 -9
- pulumi_vsphere/guest_os_customization.py +60 -5
- pulumi_vsphere/ha_vm_override.py +352 -380
- pulumi_vsphere/host.py +244 -64
- pulumi_vsphere/host_port_group.py +27 -24
- pulumi_vsphere/host_virtual_switch.py +209 -289
- pulumi_vsphere/license.py +5 -32
- pulumi_vsphere/nas_datastore.py +74 -9
- pulumi_vsphere/offline_software_depot.py +185 -0
- pulumi_vsphere/outputs.py +774 -256
- pulumi_vsphere/provider.py +7 -6
- pulumi_vsphere/pulumi-plugin.json +2 -1
- pulumi_vsphere/resource_pool.py +168 -411
- pulumi_vsphere/role.py +33 -2
- pulumi_vsphere/storage_drs_vm_override.py +133 -2
- pulumi_vsphere/supervisor.py +967 -0
- pulumi_vsphere/tag.py +159 -2
- pulumi_vsphere/tag_category.py +83 -2
- pulumi_vsphere/vapp_container.py +163 -2
- pulumi_vsphere/vapp_entity.py +147 -2
- pulumi_vsphere/virtual_disk.py +123 -36
- pulumi_vsphere/virtual_machine.py +759 -829
- pulumi_vsphere/virtual_machine_class.py +447 -0
- pulumi_vsphere/virtual_machine_snapshot.py +13 -12
- pulumi_vsphere/vm_storage_policy.py +120 -127
- pulumi_vsphere/vmfs_datastore.py +271 -2
- pulumi_vsphere/vnic.py +104 -105
- {pulumi_vsphere-4.10.0a1710160860.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/METADATA +7 -6
- pulumi_vsphere-4.13.0a1736836157.dist-info/RECORD +86 -0
- {pulumi_vsphere-4.10.0a1710160860.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.10.0a1710160860.dist-info/RECORD +0 -80
- {pulumi_vsphere-4.10.0a1710160860.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/top_level.txt +0 -0
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = [
|
|
@@ -106,7 +111,6 @@ def get_host_pci_device(class_id: Optional[str] = None,
|
|
|
106
111
|
|
|
107
112
|
### With Vendor ID And Class ID
|
|
108
113
|
|
|
109
|
-
<!--Start PulumiCodeChooser -->
|
|
110
114
|
```python
|
|
111
115
|
import pulumi
|
|
112
116
|
import pulumi_vsphere as vsphere
|
|
@@ -118,22 +122,19 @@ def get_host_pci_device(class_id: Optional[str] = None,
|
|
|
118
122
|
class_id="123",
|
|
119
123
|
vendor_id="456")
|
|
120
124
|
```
|
|
121
|
-
<!--End PulumiCodeChooser -->
|
|
122
125
|
|
|
123
126
|
### With Name Regular Expression
|
|
124
127
|
|
|
125
|
-
<!--Start PulumiCodeChooser -->
|
|
126
128
|
```python
|
|
127
129
|
import pulumi
|
|
128
130
|
import pulumi_vsphere as vsphere
|
|
129
131
|
|
|
130
132
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
131
133
|
host = vsphere.get_host(name="esxi-01.example.com",
|
|
132
|
-
|
|
134
|
+
datacenter_id=datacenter.id)
|
|
133
135
|
dev = vsphere.get_host_pci_device(host_id=host.id,
|
|
134
|
-
|
|
136
|
+
name_regex="MMC")
|
|
135
137
|
```
|
|
136
|
-
<!--End PulumiCodeChooser -->
|
|
137
138
|
|
|
138
139
|
|
|
139
140
|
:param str class_id: The hexadecimal PCI device class ID
|
|
@@ -141,7 +142,8 @@ def get_host_pci_device(class_id: Optional[str] = None,
|
|
|
141
142
|
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
142
143
|
|
|
143
144
|
> **NOTE:** `name_regex`, `vendor_id`, and `class_id` can all be used together.
|
|
144
|
-
:param str host_id: The [managed object reference ID][docs-about-morefs] of
|
|
145
|
+
:param str host_id: The [managed object reference ID][docs-about-morefs] of
|
|
146
|
+
a host.
|
|
145
147
|
:param str name_regex: A regular expression that will be used to match the
|
|
146
148
|
host PCI device name.
|
|
147
149
|
:param str vendor_id: The hexadecimal PCI device vendor ID.
|
|
@@ -161,14 +163,11 @@ def get_host_pci_device(class_id: Optional[str] = None,
|
|
|
161
163
|
name=pulumi.get(__ret__, 'name'),
|
|
162
164
|
name_regex=pulumi.get(__ret__, 'name_regex'),
|
|
163
165
|
vendor_id=pulumi.get(__ret__, 'vendor_id'))
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
@_utilities.lift_output_func(get_host_pci_device)
|
|
167
166
|
def get_host_pci_device_output(class_id: Optional[pulumi.Input[Optional[str]]] = None,
|
|
168
167
|
host_id: Optional[pulumi.Input[str]] = None,
|
|
169
168
|
name_regex: Optional[pulumi.Input[Optional[str]]] = None,
|
|
170
169
|
vendor_id: Optional[pulumi.Input[Optional[str]]] = None,
|
|
171
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetHostPciDeviceResult]:
|
|
170
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetHostPciDeviceResult]:
|
|
172
171
|
"""
|
|
173
172
|
The `get_host_pci_device` data source can be used to discover the device ID
|
|
174
173
|
of a vSphere host's PCI device. This can then be used with
|
|
@@ -178,7 +177,6 @@ def get_host_pci_device_output(class_id: Optional[pulumi.Input[Optional[str]]] =
|
|
|
178
177
|
|
|
179
178
|
### With Vendor ID And Class ID
|
|
180
179
|
|
|
181
|
-
<!--Start PulumiCodeChooser -->
|
|
182
180
|
```python
|
|
183
181
|
import pulumi
|
|
184
182
|
import pulumi_vsphere as vsphere
|
|
@@ -190,22 +188,19 @@ def get_host_pci_device_output(class_id: Optional[pulumi.Input[Optional[str]]] =
|
|
|
190
188
|
class_id="123",
|
|
191
189
|
vendor_id="456")
|
|
192
190
|
```
|
|
193
|
-
<!--End PulumiCodeChooser -->
|
|
194
191
|
|
|
195
192
|
### With Name Regular Expression
|
|
196
193
|
|
|
197
|
-
<!--Start PulumiCodeChooser -->
|
|
198
194
|
```python
|
|
199
195
|
import pulumi
|
|
200
196
|
import pulumi_vsphere as vsphere
|
|
201
197
|
|
|
202
198
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
203
199
|
host = vsphere.get_host(name="esxi-01.example.com",
|
|
204
|
-
|
|
200
|
+
datacenter_id=datacenter.id)
|
|
205
201
|
dev = vsphere.get_host_pci_device(host_id=host.id,
|
|
206
|
-
|
|
202
|
+
name_regex="MMC")
|
|
207
203
|
```
|
|
208
|
-
<!--End PulumiCodeChooser -->
|
|
209
204
|
|
|
210
205
|
|
|
211
206
|
:param str class_id: The hexadecimal PCI device class ID
|
|
@@ -213,9 +208,23 @@ def get_host_pci_device_output(class_id: Optional[pulumi.Input[Optional[str]]] =
|
|
|
213
208
|
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
214
209
|
|
|
215
210
|
> **NOTE:** `name_regex`, `vendor_id`, and `class_id` can all be used together.
|
|
216
|
-
:param str host_id: The [managed object reference ID][docs-about-morefs] of
|
|
211
|
+
:param str host_id: The [managed object reference ID][docs-about-morefs] of
|
|
212
|
+
a host.
|
|
217
213
|
:param str name_regex: A regular expression that will be used to match the
|
|
218
214
|
host PCI device name.
|
|
219
215
|
:param str vendor_id: The hexadecimal PCI device vendor ID.
|
|
220
216
|
"""
|
|
221
|
-
|
|
217
|
+
__args__ = dict()
|
|
218
|
+
__args__['classId'] = class_id
|
|
219
|
+
__args__['hostId'] = host_id
|
|
220
|
+
__args__['nameRegex'] = name_regex
|
|
221
|
+
__args__['vendorId'] = vendor_id
|
|
222
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
223
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getHostPciDevice:getHostPciDevice', __args__, opts=opts, typ=GetHostPciDeviceResult)
|
|
224
|
+
return __ret__.apply(lambda __response__: GetHostPciDeviceResult(
|
|
225
|
+
class_id=pulumi.get(__response__, 'class_id'),
|
|
226
|
+
host_id=pulumi.get(__response__, 'host_id'),
|
|
227
|
+
id=pulumi.get(__response__, 'id'),
|
|
228
|
+
name=pulumi.get(__response__, 'name'),
|
|
229
|
+
name_regex=pulumi.get(__response__, 'name_regex'),
|
|
230
|
+
vendor_id=pulumi.get(__response__, 'vendor_id')))
|
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = [
|
|
@@ -76,27 +81,29 @@ def get_host_thumbprint(address: Optional[str] = None,
|
|
|
76
81
|
port: Optional[str] = None,
|
|
77
82
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetHostThumbprintResult:
|
|
78
83
|
"""
|
|
79
|
-
The `vsphere_thumbprint` data source can be used to discover the host
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
The `vsphere_thumbprint` data source can be used to discover the host thumbprint
|
|
85
|
+
of an ESXi host. This can be used when adding the `Host` resource to a
|
|
86
|
+
cluster or a vCenter Server instance.
|
|
87
|
+
|
|
88
|
+
* If the ESXi host is using a certificate chain, the first one returned will be
|
|
89
|
+
used to generate the thumbprint.
|
|
90
|
+
|
|
91
|
+
* If the ESXi host has a certificate issued by a certificate authority, ensure
|
|
92
|
+
that the the certificate authority is trusted on the system running the plan.
|
|
83
93
|
|
|
84
94
|
## Example Usage
|
|
85
95
|
|
|
86
|
-
<!--Start PulumiCodeChooser -->
|
|
87
96
|
```python
|
|
88
97
|
import pulumi
|
|
89
98
|
import pulumi_vsphere as vsphere
|
|
90
99
|
|
|
91
100
|
thumbprint = vsphere.get_host_thumbprint(address="esxi-01.example.com")
|
|
92
101
|
```
|
|
93
|
-
<!--End PulumiCodeChooser -->
|
|
94
102
|
|
|
95
103
|
|
|
96
|
-
:param str address: The address of the ESXi host to retrieve the
|
|
97
|
-
|
|
98
|
-
:param bool insecure: Disables SSL certificate verification.
|
|
99
|
-
Default: `false`
|
|
104
|
+
:param str address: The address of the ESXi host to retrieve the thumbprint
|
|
105
|
+
from.
|
|
106
|
+
:param bool insecure: Disables SSL certificate verification. Default: `false`
|
|
100
107
|
:param str port: The port to use connecting to the ESXi host. Default: 443
|
|
101
108
|
"""
|
|
102
109
|
__args__ = dict()
|
|
@@ -111,35 +118,44 @@ def get_host_thumbprint(address: Optional[str] = None,
|
|
|
111
118
|
id=pulumi.get(__ret__, 'id'),
|
|
112
119
|
insecure=pulumi.get(__ret__, 'insecure'),
|
|
113
120
|
port=pulumi.get(__ret__, 'port'))
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
@_utilities.lift_output_func(get_host_thumbprint)
|
|
117
121
|
def get_host_thumbprint_output(address: Optional[pulumi.Input[str]] = None,
|
|
118
122
|
insecure: Optional[pulumi.Input[Optional[bool]]] = None,
|
|
119
123
|
port: Optional[pulumi.Input[Optional[str]]] = None,
|
|
120
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetHostThumbprintResult]:
|
|
124
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetHostThumbprintResult]:
|
|
121
125
|
"""
|
|
122
|
-
The `vsphere_thumbprint` data source can be used to discover the host
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
The `vsphere_thumbprint` data source can be used to discover the host thumbprint
|
|
127
|
+
of an ESXi host. This can be used when adding the `Host` resource to a
|
|
128
|
+
cluster or a vCenter Server instance.
|
|
129
|
+
|
|
130
|
+
* If the ESXi host is using a certificate chain, the first one returned will be
|
|
131
|
+
used to generate the thumbprint.
|
|
132
|
+
|
|
133
|
+
* If the ESXi host has a certificate issued by a certificate authority, ensure
|
|
134
|
+
that the the certificate authority is trusted on the system running the plan.
|
|
126
135
|
|
|
127
136
|
## Example Usage
|
|
128
137
|
|
|
129
|
-
<!--Start PulumiCodeChooser -->
|
|
130
138
|
```python
|
|
131
139
|
import pulumi
|
|
132
140
|
import pulumi_vsphere as vsphere
|
|
133
141
|
|
|
134
142
|
thumbprint = vsphere.get_host_thumbprint(address="esxi-01.example.com")
|
|
135
143
|
```
|
|
136
|
-
<!--End PulumiCodeChooser -->
|
|
137
144
|
|
|
138
145
|
|
|
139
|
-
:param str address: The address of the ESXi host to retrieve the
|
|
140
|
-
|
|
141
|
-
:param bool insecure: Disables SSL certificate verification.
|
|
142
|
-
Default: `false`
|
|
146
|
+
:param str address: The address of the ESXi host to retrieve the thumbprint
|
|
147
|
+
from.
|
|
148
|
+
:param bool insecure: Disables SSL certificate verification. Default: `false`
|
|
143
149
|
:param str port: The port to use connecting to the ESXi host. Default: 443
|
|
144
150
|
"""
|
|
145
|
-
|
|
151
|
+
__args__ = dict()
|
|
152
|
+
__args__['address'] = address
|
|
153
|
+
__args__['insecure'] = insecure
|
|
154
|
+
__args__['port'] = port
|
|
155
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
156
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getHostThumbprint:getHostThumbprint', __args__, opts=opts, typ=GetHostThumbprintResult)
|
|
157
|
+
return __ret__.apply(lambda __response__: GetHostThumbprintResult(
|
|
158
|
+
address=pulumi.get(__response__, 'address'),
|
|
159
|
+
id=pulumi.get(__response__, 'id'),
|
|
160
|
+
insecure=pulumi.get(__response__, 'insecure'),
|
|
161
|
+
port=pulumi.get(__response__, 'port')))
|
|
@@ -0,0 +1,195 @@
|
|
|
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 sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
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
|
|
15
|
+
from . import _utilities
|
|
16
|
+
from . import outputs
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
'GetHostVgpuProfileResult',
|
|
20
|
+
'AwaitableGetHostVgpuProfileResult',
|
|
21
|
+
'get_host_vgpu_profile',
|
|
22
|
+
'get_host_vgpu_profile_output',
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
@pulumi.output_type
|
|
26
|
+
class GetHostVgpuProfileResult:
|
|
27
|
+
"""
|
|
28
|
+
A collection of values returned by getHostVgpuProfile.
|
|
29
|
+
"""
|
|
30
|
+
def __init__(__self__, host_id=None, id=None, name_regex=None, vgpu_profiles=None):
|
|
31
|
+
if host_id and not isinstance(host_id, str):
|
|
32
|
+
raise TypeError("Expected argument 'host_id' to be a str")
|
|
33
|
+
pulumi.set(__self__, "host_id", host_id)
|
|
34
|
+
if id and not isinstance(id, str):
|
|
35
|
+
raise TypeError("Expected argument 'id' to be a str")
|
|
36
|
+
pulumi.set(__self__, "id", id)
|
|
37
|
+
if name_regex and not isinstance(name_regex, str):
|
|
38
|
+
raise TypeError("Expected argument 'name_regex' to be a str")
|
|
39
|
+
pulumi.set(__self__, "name_regex", name_regex)
|
|
40
|
+
if vgpu_profiles and not isinstance(vgpu_profiles, list):
|
|
41
|
+
raise TypeError("Expected argument 'vgpu_profiles' to be a list")
|
|
42
|
+
pulumi.set(__self__, "vgpu_profiles", vgpu_profiles)
|
|
43
|
+
|
|
44
|
+
@property
|
|
45
|
+
@pulumi.getter(name="hostId")
|
|
46
|
+
def host_id(self) -> str:
|
|
47
|
+
"""
|
|
48
|
+
The [managed objectID][docs-about-morefs] of the ESXi host.
|
|
49
|
+
"""
|
|
50
|
+
return pulumi.get(self, "host_id")
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
@pulumi.getter
|
|
54
|
+
def id(self) -> str:
|
|
55
|
+
"""
|
|
56
|
+
The provider-assigned unique ID for this managed resource.
|
|
57
|
+
"""
|
|
58
|
+
return pulumi.get(self, "id")
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
@pulumi.getter(name="nameRegex")
|
|
62
|
+
def name_regex(self) -> Optional[str]:
|
|
63
|
+
"""
|
|
64
|
+
(Optional) A regular expression that will be used to match the
|
|
65
|
+
host vGPU profile name.
|
|
66
|
+
"""
|
|
67
|
+
return pulumi.get(self, "name_regex")
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
@pulumi.getter(name="vgpuProfiles")
|
|
71
|
+
def vgpu_profiles(self) -> Sequence['outputs.GetHostVgpuProfileVgpuProfileResult']:
|
|
72
|
+
"""
|
|
73
|
+
The list of available vGPU profiles on the ESXi host.
|
|
74
|
+
This may be and empty array if no vGPU profile are identified.
|
|
75
|
+
"""
|
|
76
|
+
return pulumi.get(self, "vgpu_profiles")
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class AwaitableGetHostVgpuProfileResult(GetHostVgpuProfileResult):
|
|
80
|
+
# pylint: disable=using-constant-test
|
|
81
|
+
def __await__(self):
|
|
82
|
+
if False:
|
|
83
|
+
yield self
|
|
84
|
+
return GetHostVgpuProfileResult(
|
|
85
|
+
host_id=self.host_id,
|
|
86
|
+
id=self.id,
|
|
87
|
+
name_regex=self.name_regex,
|
|
88
|
+
vgpu_profiles=self.vgpu_profiles)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def get_host_vgpu_profile(host_id: Optional[str] = None,
|
|
92
|
+
name_regex: Optional[str] = None,
|
|
93
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetHostVgpuProfileResult:
|
|
94
|
+
"""
|
|
95
|
+
The `get_host_vgpu_profile` data source can be used to discover the
|
|
96
|
+
available vGPU profiles of a vSphere host.
|
|
97
|
+
|
|
98
|
+
## Example Usage
|
|
99
|
+
|
|
100
|
+
### To Return All VGPU Profiles
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
import pulumi
|
|
104
|
+
import pulumi_vsphere as vsphere
|
|
105
|
+
|
|
106
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
107
|
+
host = vsphere.get_host(name="esxi-01.example.com",
|
|
108
|
+
datacenter_id=datacenter.id)
|
|
109
|
+
vgpu_profile = vsphere.get_host_vgpu_profile(host_id=host.id)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### With VGPU Profile Name_regex
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
import pulumi
|
|
116
|
+
import pulumi_vsphere as vsphere
|
|
117
|
+
|
|
118
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
119
|
+
host = vsphere.get_host(name="esxi-01.example.com",
|
|
120
|
+
datacenter_id=datacenter.id)
|
|
121
|
+
vgpu_profile = vsphere.get_host_vgpu_profile(host_id=host.id,
|
|
122
|
+
name_regex="a100")
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
:param str host_id: The [managed object reference ID][docs-about-morefs] of
|
|
127
|
+
a host.
|
|
128
|
+
:param str name_regex: A regular expression that will be used to match the
|
|
129
|
+
host vGPU profile name.
|
|
130
|
+
|
|
131
|
+
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
132
|
+
"""
|
|
133
|
+
__args__ = dict()
|
|
134
|
+
__args__['hostId'] = host_id
|
|
135
|
+
__args__['nameRegex'] = name_regex
|
|
136
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
137
|
+
__ret__ = pulumi.runtime.invoke('vsphere:index/getHostVgpuProfile:getHostVgpuProfile', __args__, opts=opts, typ=GetHostVgpuProfileResult).value
|
|
138
|
+
|
|
139
|
+
return AwaitableGetHostVgpuProfileResult(
|
|
140
|
+
host_id=pulumi.get(__ret__, 'host_id'),
|
|
141
|
+
id=pulumi.get(__ret__, 'id'),
|
|
142
|
+
name_regex=pulumi.get(__ret__, 'name_regex'),
|
|
143
|
+
vgpu_profiles=pulumi.get(__ret__, 'vgpu_profiles'))
|
|
144
|
+
def get_host_vgpu_profile_output(host_id: Optional[pulumi.Input[str]] = None,
|
|
145
|
+
name_regex: Optional[pulumi.Input[Optional[str]]] = None,
|
|
146
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetHostVgpuProfileResult]:
|
|
147
|
+
"""
|
|
148
|
+
The `get_host_vgpu_profile` data source can be used to discover the
|
|
149
|
+
available vGPU profiles of a vSphere host.
|
|
150
|
+
|
|
151
|
+
## Example Usage
|
|
152
|
+
|
|
153
|
+
### To Return All VGPU Profiles
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
import pulumi
|
|
157
|
+
import pulumi_vsphere as vsphere
|
|
158
|
+
|
|
159
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
160
|
+
host = vsphere.get_host(name="esxi-01.example.com",
|
|
161
|
+
datacenter_id=datacenter.id)
|
|
162
|
+
vgpu_profile = vsphere.get_host_vgpu_profile(host_id=host.id)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### With VGPU Profile Name_regex
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
import pulumi
|
|
169
|
+
import pulumi_vsphere as vsphere
|
|
170
|
+
|
|
171
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
172
|
+
host = vsphere.get_host(name="esxi-01.example.com",
|
|
173
|
+
datacenter_id=datacenter.id)
|
|
174
|
+
vgpu_profile = vsphere.get_host_vgpu_profile(host_id=host.id,
|
|
175
|
+
name_regex="a100")
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
:param str host_id: The [managed object reference ID][docs-about-morefs] of
|
|
180
|
+
a host.
|
|
181
|
+
:param str name_regex: A regular expression that will be used to match the
|
|
182
|
+
host vGPU profile name.
|
|
183
|
+
|
|
184
|
+
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
185
|
+
"""
|
|
186
|
+
__args__ = dict()
|
|
187
|
+
__args__['hostId'] = host_id
|
|
188
|
+
__args__['nameRegex'] = name_regex
|
|
189
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
190
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getHostVgpuProfile:getHostVgpuProfile', __args__, opts=opts, typ=GetHostVgpuProfileResult)
|
|
191
|
+
return __ret__.apply(lambda __response__: GetHostVgpuProfileResult(
|
|
192
|
+
host_id=pulumi.get(__response__, 'host_id'),
|
|
193
|
+
id=pulumi.get(__response__, 'id'),
|
|
194
|
+
name_regex=pulumi.get(__response__, 'name_regex'),
|
|
195
|
+
vgpu_profiles=pulumi.get(__response__, 'vgpu_profiles')))
|
pulumi_vsphere/get_license.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__ = [
|
|
@@ -61,7 +66,8 @@ class GetLicenseResult:
|
|
|
61
66
|
@pulumi.getter
|
|
62
67
|
def labels(self) -> Mapping[str, str]:
|
|
63
68
|
"""
|
|
64
|
-
A map of key/value pairs attached as labels (tags) to the license
|
|
69
|
+
A map of key/value pairs attached as labels (tags) to the license
|
|
70
|
+
key.
|
|
65
71
|
"""
|
|
66
72
|
return pulumi.get(self, "labels")
|
|
67
73
|
|
|
@@ -118,14 +124,12 @@ def get_license(license_key: Optional[str] = None,
|
|
|
118
124
|
|
|
119
125
|
## Example Usage
|
|
120
126
|
|
|
121
|
-
<!--Start PulumiCodeChooser -->
|
|
122
127
|
```python
|
|
123
128
|
import pulumi
|
|
124
129
|
import pulumi_vsphere as vsphere
|
|
125
130
|
|
|
126
131
|
license = vsphere.get_license(license_key="00000-00000-00000-00000-00000")
|
|
127
132
|
```
|
|
128
|
-
<!--End PulumiCodeChooser -->
|
|
129
133
|
|
|
130
134
|
|
|
131
135
|
:param str license_key: The license key.
|
|
@@ -143,27 +147,33 @@ def get_license(license_key: Optional[str] = None,
|
|
|
143
147
|
name=pulumi.get(__ret__, 'name'),
|
|
144
148
|
total=pulumi.get(__ret__, 'total'),
|
|
145
149
|
used=pulumi.get(__ret__, 'used'))
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
@_utilities.lift_output_func(get_license)
|
|
149
150
|
def get_license_output(license_key: Optional[pulumi.Input[str]] = None,
|
|
150
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetLicenseResult]:
|
|
151
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetLicenseResult]:
|
|
151
152
|
"""
|
|
152
153
|
The `License` data source can be used to get the general attributes of
|
|
153
154
|
a license keys from a vCenter Server instance.
|
|
154
155
|
|
|
155
156
|
## Example Usage
|
|
156
157
|
|
|
157
|
-
<!--Start PulumiCodeChooser -->
|
|
158
158
|
```python
|
|
159
159
|
import pulumi
|
|
160
160
|
import pulumi_vsphere as vsphere
|
|
161
161
|
|
|
162
162
|
license = vsphere.get_license(license_key="00000-00000-00000-00000-00000")
|
|
163
163
|
```
|
|
164
|
-
<!--End PulumiCodeChooser -->
|
|
165
164
|
|
|
166
165
|
|
|
167
166
|
:param str license_key: The license key.
|
|
168
167
|
"""
|
|
169
|
-
|
|
168
|
+
__args__ = dict()
|
|
169
|
+
__args__['licenseKey'] = license_key
|
|
170
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
171
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getLicense:getLicense', __args__, opts=opts, typ=GetLicenseResult)
|
|
172
|
+
return __ret__.apply(lambda __response__: GetLicenseResult(
|
|
173
|
+
edition_key=pulumi.get(__response__, 'edition_key'),
|
|
174
|
+
id=pulumi.get(__response__, 'id'),
|
|
175
|
+
labels=pulumi.get(__response__, 'labels'),
|
|
176
|
+
license_key=pulumi.get(__response__, 'license_key'),
|
|
177
|
+
name=pulumi.get(__response__, 'name'),
|
|
178
|
+
total=pulumi.get(__response__, 'total'),
|
|
179
|
+
used=pulumi.get(__response__, 'used')))
|