pulumi-vsphere 4.10.0a1709017641__py3-none-any.whl → 4.17.0a1763710194__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 +51 -1
- pulumi_vsphere/_inputs.py +2568 -1025
- pulumi_vsphere/_utilities.py +50 -10
- pulumi_vsphere/compute_cluster.py +1564 -2373
- pulumi_vsphere/compute_cluster_host_group.py +191 -55
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +157 -113
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +133 -89
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +314 -106
- pulumi_vsphere/compute_cluster_vm_group.py +256 -55
- pulumi_vsphere/compute_cluster_vm_host_rule.py +323 -123
- pulumi_vsphere/config/__init__.py +2 -1
- pulumi_vsphere/config/__init__.pyi +7 -2
- pulumi_vsphere/config/vars.py +20 -15
- pulumi_vsphere/configuration_profile.py +286 -0
- pulumi_vsphere/content_library.py +177 -71
- pulumi_vsphere/content_library_item.py +252 -106
- pulumi_vsphere/custom_attribute.py +118 -38
- pulumi_vsphere/datacenter.py +128 -107
- pulumi_vsphere/datastore_cluster.py +636 -731
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +251 -89
- pulumi_vsphere/distributed_port_group.py +1129 -967
- pulumi_vsphere/distributed_virtual_switch.py +1971 -2239
- pulumi_vsphere/distributed_virtual_switch_pvlan_mapping.py +294 -0
- pulumi_vsphere/dpm_host_override.py +222 -72
- pulumi_vsphere/drs_vm_override.py +236 -72
- pulumi_vsphere/entity_permissions.py +96 -69
- pulumi_vsphere/file.py +173 -178
- pulumi_vsphere/folder.py +236 -113
- pulumi_vsphere/get_compute_cluster.py +34 -23
- pulumi_vsphere/get_compute_cluster_host_group.py +52 -41
- pulumi_vsphere/get_configuration_profile.py +145 -0
- pulumi_vsphere/get_content_library.py +33 -21
- pulumi_vsphere/get_content_library_item.py +47 -31
- pulumi_vsphere/get_custom_attribute.py +26 -17
- pulumi_vsphere/get_datacenter.py +40 -18
- pulumi_vsphere/get_datastore.py +60 -24
- pulumi_vsphere/get_datastore_cluster.py +47 -22
- pulumi_vsphere/get_datastore_stats.py +204 -0
- pulumi_vsphere/get_distributed_virtual_switch.py +36 -23
- pulumi_vsphere/get_dynamic.py +55 -45
- pulumi_vsphere/get_folder.py +163 -25
- pulumi_vsphere/get_guest_os_customization.py +68 -37
- pulumi_vsphere/get_host.py +34 -23
- pulumi_vsphere/get_host_base_images.py +104 -0
- pulumi_vsphere/get_host_pci_device.py +78 -35
- pulumi_vsphere/get_host_thumbprint.py +58 -38
- pulumi_vsphere/get_host_vgpu_profile.py +195 -0
- pulumi_vsphere/get_license.py +44 -28
- pulumi_vsphere/get_network.py +157 -46
- pulumi_vsphere/get_ovf_vm_template.py +184 -301
- pulumi_vsphere/get_policy.py +23 -15
- pulumi_vsphere/get_resource_pool.py +107 -40
- pulumi_vsphere/get_role.py +49 -35
- pulumi_vsphere/get_tag.py +34 -23
- pulumi_vsphere/get_tag_category.py +32 -21
- pulumi_vsphere/get_vapp_container.py +31 -21
- pulumi_vsphere/get_virtual_machine.py +499 -287
- pulumi_vsphere/get_vmfs_disks.py +42 -29
- pulumi_vsphere/guest_os_customization.py +135 -79
- pulumi_vsphere/ha_vm_override.py +470 -577
- pulumi_vsphere/host.py +515 -262
- pulumi_vsphere/host_port_group.py +352 -355
- pulumi_vsphere/host_virtual_switch.py +580 -580
- pulumi_vsphere/license.py +110 -92
- pulumi_vsphere/nas_datastore.py +398 -270
- pulumi_vsphere/offline_software_depot.py +190 -0
- pulumi_vsphere/outputs.py +1582 -1027
- pulumi_vsphere/provider.py +172 -152
- pulumi_vsphere/pulumi-plugin.json +2 -1
- pulumi_vsphere/resource_pool.py +357 -273
- pulumi_vsphere/role.py +79 -47
- pulumi_vsphere/storage_drs_vm_override.py +225 -89
- pulumi_vsphere/supervisor.py +1064 -0
- pulumi_vsphere/tag.py +217 -55
- pulumi_vsphere/tag_category.py +158 -72
- pulumi_vsphere/vapp_container.py +425 -259
- pulumi_vsphere/vapp_entity.py +324 -174
- pulumi_vsphere/virtual_disk.py +245 -153
- pulumi_vsphere/virtual_machine.py +1696 -1836
- pulumi_vsphere/virtual_machine_class.py +448 -0
- pulumi_vsphere/virtual_machine_snapshot.py +137 -131
- pulumi_vsphere/vm_storage_policy.py +160 -154
- pulumi_vsphere/vmfs_datastore.py +460 -186
- pulumi_vsphere/vnic.py +249 -231
- {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/METADATA +7 -6
- pulumi_vsphere-4.17.0a1763710194.dist-info/RECORD +89 -0
- {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.10.0a1709017641.dist-info/RECORD +0 -80
- {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/top_level.txt +0 -0
pulumi_vsphere/get_folder.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
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__ = [
|
|
@@ -29,17 +34,17 @@ class GetFolderResult:
|
|
|
29
34
|
raise TypeError("Expected argument 'path' to be a str")
|
|
30
35
|
pulumi.set(__self__, "path", path)
|
|
31
36
|
|
|
32
|
-
@property
|
|
37
|
+
@_builtins.property
|
|
33
38
|
@pulumi.getter
|
|
34
|
-
def id(self) -> str:
|
|
39
|
+
def id(self) -> _builtins.str:
|
|
35
40
|
"""
|
|
36
41
|
The provider-assigned unique ID for this managed resource.
|
|
37
42
|
"""
|
|
38
43
|
return pulumi.get(self, "id")
|
|
39
44
|
|
|
40
|
-
@property
|
|
45
|
+
@_builtins.property
|
|
41
46
|
@pulumi.getter
|
|
42
|
-
def path(self) -> str:
|
|
47
|
+
def path(self) -> _builtins.str:
|
|
43
48
|
return pulumi.get(self, "path")
|
|
44
49
|
|
|
45
50
|
|
|
@@ -53,11 +58,15 @@ class AwaitableGetFolderResult(GetFolderResult):
|
|
|
53
58
|
path=self.path)
|
|
54
59
|
|
|
55
60
|
|
|
56
|
-
def get_folder(path: Optional[str] = None,
|
|
61
|
+
def get_folder(path: Optional[_builtins.str] = None,
|
|
57
62
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetFolderResult:
|
|
58
63
|
"""
|
|
59
64
|
The `Folder` data source can be used to get the general attributes of a
|
|
60
|
-
vSphere inventory folder.
|
|
65
|
+
vSphere inventory folder. The data source supports creating folders of the 5
|
|
66
|
+
major types - datacenter folders, host and cluster folders, virtual machine
|
|
67
|
+
folders, storage folders, and network folders.
|
|
68
|
+
|
|
69
|
+
Paths are absolute and must include the datacenter.
|
|
61
70
|
|
|
62
71
|
## Example Usage
|
|
63
72
|
|
|
@@ -65,15 +74,76 @@ def get_folder(path: Optional[str] = None,
|
|
|
65
74
|
import pulumi
|
|
66
75
|
import pulumi_vsphere as vsphere
|
|
67
76
|
|
|
68
|
-
|
|
77
|
+
datacenter_folder_folder = vsphere.Folder("datacenter_folder",
|
|
78
|
+
path="example-datacenter-folder",
|
|
79
|
+
type="datacenter")
|
|
80
|
+
datacenter_folder = vsphere.get_folder_output(path=datacenter_folder_folder.path.apply(lambda path: f"/{path}"))
|
|
81
|
+
datacenter_datacenter = vsphere.Datacenter("datacenter",
|
|
82
|
+
name="example-datacenter",
|
|
83
|
+
folder=datacenter_folder.path,
|
|
84
|
+
opts = pulumi.ResourceOptions(depends_on=[datacenter_folder]))
|
|
85
|
+
datacenter = vsphere.get_datacenter_output(name=datacenter_datacenter.name)
|
|
86
|
+
vm_folder_folder = vsphere.Folder("vm_folder",
|
|
87
|
+
path="example-vm-folder",
|
|
88
|
+
type="vm",
|
|
89
|
+
datacenter_id=datacenter.id)
|
|
90
|
+
datastore_folder_folder = vsphere.Folder("datastore_folder",
|
|
91
|
+
path="example-datastore-folder",
|
|
92
|
+
type="datastore",
|
|
93
|
+
datacenter_id=datacenter.id)
|
|
94
|
+
network_folder_folder = vsphere.Folder("network_folder",
|
|
95
|
+
path="example-network-folder",
|
|
96
|
+
type="network",
|
|
97
|
+
datacenter_id=datacenter.id)
|
|
98
|
+
host_folder_folder = vsphere.Folder("host_folder",
|
|
99
|
+
path="example-host-folder",
|
|
100
|
+
type="host",
|
|
101
|
+
datacenter_id=datacenter.id)
|
|
102
|
+
vm_folder = vsphere.get_folder_output(path=pulumi.Output.all(
|
|
103
|
+
datacenterFolderFolderPath=datacenter_folder_folder.path,
|
|
104
|
+
name=datacenter_datacenter.name,
|
|
105
|
+
vmFolderFolderPath=vm_folder_folder.path
|
|
106
|
+
).apply(lambda resolved_outputs: f"/{resolved_outputs['datacenterFolderFolderPath']}/{resolved_outputs['name']}/vm/{resolved_outputs['vmFolderFolderPath']}")
|
|
107
|
+
)
|
|
108
|
+
datastore_folder = vsphere.get_folder_output(path=pulumi.Output.all(
|
|
109
|
+
datacenterFolderFolderPath=datacenter_folder_folder.path,
|
|
110
|
+
name=datacenter_datacenter.name,
|
|
111
|
+
datastoreFolderFolderPath=datastore_folder_folder.path
|
|
112
|
+
).apply(lambda resolved_outputs: f"/{resolved_outputs['datacenterFolderFolderPath']}/{resolved_outputs['name']}/datastore/{resolved_outputs['datastoreFolderFolderPath']}")
|
|
113
|
+
)
|
|
114
|
+
network_folder = vsphere.get_folder_output(path=pulumi.Output.all(
|
|
115
|
+
datacenterFolderFolderPath=datacenter_folder_folder.path,
|
|
116
|
+
name=datacenter_datacenter.name,
|
|
117
|
+
networkFolderFolderPath=network_folder_folder.path
|
|
118
|
+
).apply(lambda resolved_outputs: f"/{resolved_outputs['datacenterFolderFolderPath']}/{resolved_outputs['name']}/network/{resolved_outputs['networkFolderFolderPath']}")
|
|
119
|
+
)
|
|
120
|
+
host_folder = vsphere.get_folder_output(path=pulumi.Output.all(
|
|
121
|
+
datacenterFolderFolderPath=datacenter_folder_folder.path,
|
|
122
|
+
name=datacenter_datacenter.name,
|
|
123
|
+
hostFolderFolderPath=host_folder_folder.path
|
|
124
|
+
).apply(lambda resolved_outputs: f"/{resolved_outputs['datacenterFolderFolderPath']}/{resolved_outputs['name']}/host/{resolved_outputs['hostFolderFolderPath']}")
|
|
125
|
+
)
|
|
126
|
+
pulumi.export("vmFolderId", vm_folder.id)
|
|
127
|
+
pulumi.export("datastoreFolderId", datastore_folder.id)
|
|
128
|
+
pulumi.export("networkFolderId", network_folder.id)
|
|
129
|
+
pulumi.export("hostFolderId", host_folder.id)
|
|
130
|
+
pulumi.export("datacenterId", datacenter.id)
|
|
131
|
+
pulumi.export("datacenterFolderPath", datacenter_folder_folder.path)
|
|
69
132
|
```
|
|
70
133
|
|
|
71
134
|
|
|
72
|
-
:param str path: The absolute path of the folder. For example, given a
|
|
135
|
+
:param _builtins.str path: The absolute path of the folder. For example, given a
|
|
73
136
|
default datacenter of `default-dc`, a folder of type `vm`, and a folder name
|
|
74
|
-
of `
|
|
75
|
-
`/default-dc/vm/
|
|
76
|
-
|
|
137
|
+
of `example-vm-folder`, the resulting `path` would be
|
|
138
|
+
`/default-dc/vm/example-vm-folder`.
|
|
139
|
+
|
|
140
|
+
For nested datacenters, include the full hierarchy in the path. For example, if datacenter
|
|
141
|
+
`default-dc` is inside folder `parent-folder`, the path to a VM folder would be
|
|
142
|
+
`/parent-folder/default-dc/vm/example-vm-folder`.
|
|
143
|
+
|
|
144
|
+
The valid folder types to be used in a `path` are: `vm`, `host`, `datacenter`, `datastore`, or `network`.
|
|
145
|
+
|
|
146
|
+
Always include a leading slash in the `path`.
|
|
77
147
|
"""
|
|
78
148
|
__args__ = dict()
|
|
79
149
|
__args__['path'] = path
|
|
@@ -83,14 +153,15 @@ def get_folder(path: Optional[str] = None,
|
|
|
83
153
|
return AwaitableGetFolderResult(
|
|
84
154
|
id=pulumi.get(__ret__, 'id'),
|
|
85
155
|
path=pulumi.get(__ret__, 'path'))
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
@_utilities.lift_output_func(get_folder)
|
|
89
|
-
def get_folder_output(path: Optional[pulumi.Input[str]] = None,
|
|
90
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetFolderResult]:
|
|
156
|
+
def get_folder_output(path: Optional[pulumi.Input[_builtins.str]] = None,
|
|
157
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetFolderResult]:
|
|
91
158
|
"""
|
|
92
159
|
The `Folder` data source can be used to get the general attributes of a
|
|
93
|
-
vSphere inventory folder.
|
|
160
|
+
vSphere inventory folder. The data source supports creating folders of the 5
|
|
161
|
+
major types - datacenter folders, host and cluster folders, virtual machine
|
|
162
|
+
folders, storage folders, and network folders.
|
|
163
|
+
|
|
164
|
+
Paths are absolute and must include the datacenter.
|
|
94
165
|
|
|
95
166
|
## Example Usage
|
|
96
167
|
|
|
@@ -98,14 +169,81 @@ def get_folder_output(path: Optional[pulumi.Input[str]] = None,
|
|
|
98
169
|
import pulumi
|
|
99
170
|
import pulumi_vsphere as vsphere
|
|
100
171
|
|
|
101
|
-
|
|
172
|
+
datacenter_folder_folder = vsphere.Folder("datacenter_folder",
|
|
173
|
+
path="example-datacenter-folder",
|
|
174
|
+
type="datacenter")
|
|
175
|
+
datacenter_folder = vsphere.get_folder_output(path=datacenter_folder_folder.path.apply(lambda path: f"/{path}"))
|
|
176
|
+
datacenter_datacenter = vsphere.Datacenter("datacenter",
|
|
177
|
+
name="example-datacenter",
|
|
178
|
+
folder=datacenter_folder.path,
|
|
179
|
+
opts = pulumi.ResourceOptions(depends_on=[datacenter_folder]))
|
|
180
|
+
datacenter = vsphere.get_datacenter_output(name=datacenter_datacenter.name)
|
|
181
|
+
vm_folder_folder = vsphere.Folder("vm_folder",
|
|
182
|
+
path="example-vm-folder",
|
|
183
|
+
type="vm",
|
|
184
|
+
datacenter_id=datacenter.id)
|
|
185
|
+
datastore_folder_folder = vsphere.Folder("datastore_folder",
|
|
186
|
+
path="example-datastore-folder",
|
|
187
|
+
type="datastore",
|
|
188
|
+
datacenter_id=datacenter.id)
|
|
189
|
+
network_folder_folder = vsphere.Folder("network_folder",
|
|
190
|
+
path="example-network-folder",
|
|
191
|
+
type="network",
|
|
192
|
+
datacenter_id=datacenter.id)
|
|
193
|
+
host_folder_folder = vsphere.Folder("host_folder",
|
|
194
|
+
path="example-host-folder",
|
|
195
|
+
type="host",
|
|
196
|
+
datacenter_id=datacenter.id)
|
|
197
|
+
vm_folder = vsphere.get_folder_output(path=pulumi.Output.all(
|
|
198
|
+
datacenterFolderFolderPath=datacenter_folder_folder.path,
|
|
199
|
+
name=datacenter_datacenter.name,
|
|
200
|
+
vmFolderFolderPath=vm_folder_folder.path
|
|
201
|
+
).apply(lambda resolved_outputs: f"/{resolved_outputs['datacenterFolderFolderPath']}/{resolved_outputs['name']}/vm/{resolved_outputs['vmFolderFolderPath']}")
|
|
202
|
+
)
|
|
203
|
+
datastore_folder = vsphere.get_folder_output(path=pulumi.Output.all(
|
|
204
|
+
datacenterFolderFolderPath=datacenter_folder_folder.path,
|
|
205
|
+
name=datacenter_datacenter.name,
|
|
206
|
+
datastoreFolderFolderPath=datastore_folder_folder.path
|
|
207
|
+
).apply(lambda resolved_outputs: f"/{resolved_outputs['datacenterFolderFolderPath']}/{resolved_outputs['name']}/datastore/{resolved_outputs['datastoreFolderFolderPath']}")
|
|
208
|
+
)
|
|
209
|
+
network_folder = vsphere.get_folder_output(path=pulumi.Output.all(
|
|
210
|
+
datacenterFolderFolderPath=datacenter_folder_folder.path,
|
|
211
|
+
name=datacenter_datacenter.name,
|
|
212
|
+
networkFolderFolderPath=network_folder_folder.path
|
|
213
|
+
).apply(lambda resolved_outputs: f"/{resolved_outputs['datacenterFolderFolderPath']}/{resolved_outputs['name']}/network/{resolved_outputs['networkFolderFolderPath']}")
|
|
214
|
+
)
|
|
215
|
+
host_folder = vsphere.get_folder_output(path=pulumi.Output.all(
|
|
216
|
+
datacenterFolderFolderPath=datacenter_folder_folder.path,
|
|
217
|
+
name=datacenter_datacenter.name,
|
|
218
|
+
hostFolderFolderPath=host_folder_folder.path
|
|
219
|
+
).apply(lambda resolved_outputs: f"/{resolved_outputs['datacenterFolderFolderPath']}/{resolved_outputs['name']}/host/{resolved_outputs['hostFolderFolderPath']}")
|
|
220
|
+
)
|
|
221
|
+
pulumi.export("vmFolderId", vm_folder.id)
|
|
222
|
+
pulumi.export("datastoreFolderId", datastore_folder.id)
|
|
223
|
+
pulumi.export("networkFolderId", network_folder.id)
|
|
224
|
+
pulumi.export("hostFolderId", host_folder.id)
|
|
225
|
+
pulumi.export("datacenterId", datacenter.id)
|
|
226
|
+
pulumi.export("datacenterFolderPath", datacenter_folder_folder.path)
|
|
102
227
|
```
|
|
103
228
|
|
|
104
229
|
|
|
105
|
-
:param str path: The absolute path of the folder. For example, given a
|
|
230
|
+
:param _builtins.str path: The absolute path of the folder. For example, given a
|
|
106
231
|
default datacenter of `default-dc`, a folder of type `vm`, and a folder name
|
|
107
|
-
of `
|
|
108
|
-
`/default-dc/vm/
|
|
109
|
-
|
|
232
|
+
of `example-vm-folder`, the resulting `path` would be
|
|
233
|
+
`/default-dc/vm/example-vm-folder`.
|
|
234
|
+
|
|
235
|
+
For nested datacenters, include the full hierarchy in the path. For example, if datacenter
|
|
236
|
+
`default-dc` is inside folder `parent-folder`, the path to a VM folder would be
|
|
237
|
+
`/parent-folder/default-dc/vm/example-vm-folder`.
|
|
238
|
+
|
|
239
|
+
The valid folder types to be used in a `path` are: `vm`, `host`, `datacenter`, `datastore`, or `network`.
|
|
240
|
+
|
|
241
|
+
Always include a leading slash in the `path`.
|
|
110
242
|
"""
|
|
111
|
-
|
|
243
|
+
__args__ = dict()
|
|
244
|
+
__args__['path'] = path
|
|
245
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
246
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getFolder:getFolder', __args__, opts=opts, typ=GetFolderResult)
|
|
247
|
+
return __ret__.apply(lambda __response__: GetFolderResult(
|
|
248
|
+
id=pulumi.get(__response__, 'id'),
|
|
249
|
+
path=pulumi.get(__response__, 'path')))
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
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
|
from . import outputs
|
|
12
17
|
|
|
@@ -45,54 +50,58 @@ class GetGuestOsCustomizationResult:
|
|
|
45
50
|
raise TypeError("Expected argument 'type' to be a str")
|
|
46
51
|
pulumi.set(__self__, "type", type)
|
|
47
52
|
|
|
48
|
-
@property
|
|
53
|
+
@_builtins.property
|
|
49
54
|
@pulumi.getter(name="changeVersion")
|
|
50
|
-
def change_version(self) -> str:
|
|
55
|
+
def change_version(self) -> _builtins.str:
|
|
51
56
|
"""
|
|
52
|
-
The number of last changed version to the customization
|
|
57
|
+
The number of last changed version to the customization
|
|
58
|
+
specification.
|
|
53
59
|
"""
|
|
54
60
|
return pulumi.get(self, "change_version")
|
|
55
61
|
|
|
56
|
-
@property
|
|
62
|
+
@_builtins.property
|
|
57
63
|
@pulumi.getter
|
|
58
|
-
def description(self) -> str:
|
|
64
|
+
def description(self) -> _builtins.str:
|
|
59
65
|
"""
|
|
60
66
|
The description for the customization specification.
|
|
61
67
|
"""
|
|
62
68
|
return pulumi.get(self, "description")
|
|
63
69
|
|
|
64
|
-
@property
|
|
70
|
+
@_builtins.property
|
|
65
71
|
@pulumi.getter
|
|
66
|
-
def id(self) -> str:
|
|
72
|
+
def id(self) -> _builtins.str:
|
|
67
73
|
"""
|
|
68
74
|
The provider-assigned unique ID for this managed resource.
|
|
69
75
|
"""
|
|
70
76
|
return pulumi.get(self, "id")
|
|
71
77
|
|
|
72
|
-
@property
|
|
78
|
+
@_builtins.property
|
|
73
79
|
@pulumi.getter(name="lastUpdateTime")
|
|
74
|
-
def last_update_time(self) -> str:
|
|
80
|
+
def last_update_time(self) -> _builtins.str:
|
|
75
81
|
"""
|
|
76
|
-
The time of last modification to the customization
|
|
82
|
+
The time of last modification to the customization
|
|
83
|
+
specification.
|
|
77
84
|
"""
|
|
78
85
|
return pulumi.get(self, "last_update_time")
|
|
79
86
|
|
|
80
|
-
@property
|
|
87
|
+
@_builtins.property
|
|
81
88
|
@pulumi.getter
|
|
82
|
-
def name(self) -> str:
|
|
89
|
+
def name(self) -> _builtins.str:
|
|
83
90
|
return pulumi.get(self, "name")
|
|
84
91
|
|
|
85
|
-
@property
|
|
92
|
+
@_builtins.property
|
|
86
93
|
@pulumi.getter
|
|
87
94
|
def specs(self) -> Sequence['outputs.GetGuestOsCustomizationSpecResult']:
|
|
88
95
|
"""
|
|
89
|
-
Container object for the guest operating system properties to be
|
|
96
|
+
Container object for the guest operating system properties to be
|
|
97
|
+
customized. See
|
|
98
|
+
virtual machine customizations
|
|
90
99
|
"""
|
|
91
100
|
return pulumi.get(self, "specs")
|
|
92
101
|
|
|
93
|
-
@property
|
|
102
|
+
@_builtins.property
|
|
94
103
|
@pulumi.getter
|
|
95
|
-
def type(self) -> str:
|
|
104
|
+
def type(self) -> _builtins.str:
|
|
96
105
|
"""
|
|
97
106
|
The type of customization specification: One among: Windows, Linux.
|
|
98
107
|
"""
|
|
@@ -114,13 +123,11 @@ class AwaitableGetGuestOsCustomizationResult(GetGuestOsCustomizationResult):
|
|
|
114
123
|
type=self.type)
|
|
115
124
|
|
|
116
125
|
|
|
117
|
-
def get_guest_os_customization(name: Optional[str] = None,
|
|
126
|
+
def get_guest_os_customization(name: Optional[_builtins.str] = None,
|
|
118
127
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGuestOsCustomizationResult:
|
|
119
128
|
"""
|
|
120
|
-
The `GuestOsCustomization` data source can be used to discover the
|
|
121
|
-
|
|
122
|
-
Suggested change
|
|
123
|
-
> **NOTE:** The name attribute is the unique identifier for the customization specification per vCenter Server instance.
|
|
129
|
+
The `GuestOsCustomization` data source can be used to discover the
|
|
130
|
+
details about a customization specification for a guest operating system.
|
|
124
131
|
|
|
125
132
|
## Example Usage
|
|
126
133
|
|
|
@@ -128,11 +135,20 @@ def get_guest_os_customization(name: Optional[str] = None,
|
|
|
128
135
|
import pulumi
|
|
129
136
|
import pulumi_vsphere as vsphere
|
|
130
137
|
|
|
131
|
-
|
|
138
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
139
|
+
template = vsphere.get_virtual_machine(name="windows-template",
|
|
140
|
+
datacenter_id=datacenter.id)
|
|
141
|
+
windows = vsphere.get_guest_os_customization(name="windows")
|
|
142
|
+
vm = vsphere.VirtualMachine("vm",
|
|
143
|
+
template_uuid=template.id,
|
|
144
|
+
customization_spec=[{
|
|
145
|
+
"id": windows.id,
|
|
146
|
+
}])
|
|
132
147
|
```
|
|
133
148
|
|
|
134
149
|
|
|
135
|
-
:param str name: The name of the customization specification is the unique
|
|
150
|
+
:param _builtins.str name: The name of the customization specification is the unique
|
|
151
|
+
identifier per vCenter Server instance.
|
|
136
152
|
"""
|
|
137
153
|
__args__ = dict()
|
|
138
154
|
__args__['name'] = name
|
|
@@ -147,16 +163,11 @@ def get_guest_os_customization(name: Optional[str] = None,
|
|
|
147
163
|
name=pulumi.get(__ret__, 'name'),
|
|
148
164
|
specs=pulumi.get(__ret__, 'specs'),
|
|
149
165
|
type=pulumi.get(__ret__, 'type'))
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
@_utilities.lift_output_func(get_guest_os_customization)
|
|
153
|
-
def get_guest_os_customization_output(name: Optional[pulumi.Input[str]] = None,
|
|
154
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetGuestOsCustomizationResult]:
|
|
166
|
+
def get_guest_os_customization_output(name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
167
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGuestOsCustomizationResult]:
|
|
155
168
|
"""
|
|
156
|
-
The `GuestOsCustomization` data source can be used to discover the
|
|
157
|
-
|
|
158
|
-
Suggested change
|
|
159
|
-
> **NOTE:** The name attribute is the unique identifier for the customization specification per vCenter Server instance.
|
|
169
|
+
The `GuestOsCustomization` data source can be used to discover the
|
|
170
|
+
details about a customization specification for a guest operating system.
|
|
160
171
|
|
|
161
172
|
## Example Usage
|
|
162
173
|
|
|
@@ -164,10 +175,30 @@ def get_guest_os_customization_output(name: Optional[pulumi.Input[str]] = None,
|
|
|
164
175
|
import pulumi
|
|
165
176
|
import pulumi_vsphere as vsphere
|
|
166
177
|
|
|
167
|
-
|
|
178
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
179
|
+
template = vsphere.get_virtual_machine(name="windows-template",
|
|
180
|
+
datacenter_id=datacenter.id)
|
|
181
|
+
windows = vsphere.get_guest_os_customization(name="windows")
|
|
182
|
+
vm = vsphere.VirtualMachine("vm",
|
|
183
|
+
template_uuid=template.id,
|
|
184
|
+
customization_spec=[{
|
|
185
|
+
"id": windows.id,
|
|
186
|
+
}])
|
|
168
187
|
```
|
|
169
188
|
|
|
170
189
|
|
|
171
|
-
:param str name: The name of the customization specification is the unique
|
|
190
|
+
:param _builtins.str name: The name of the customization specification is the unique
|
|
191
|
+
identifier per vCenter Server instance.
|
|
172
192
|
"""
|
|
173
|
-
|
|
193
|
+
__args__ = dict()
|
|
194
|
+
__args__['name'] = name
|
|
195
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
196
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getGuestOsCustomization:getGuestOsCustomization', __args__, opts=opts, typ=GetGuestOsCustomizationResult)
|
|
197
|
+
return __ret__.apply(lambda __response__: GetGuestOsCustomizationResult(
|
|
198
|
+
change_version=pulumi.get(__response__, 'change_version'),
|
|
199
|
+
description=pulumi.get(__response__, 'description'),
|
|
200
|
+
id=pulumi.get(__response__, 'id'),
|
|
201
|
+
last_update_time=pulumi.get(__response__, 'last_update_time'),
|
|
202
|
+
name=pulumi.get(__response__, 'name'),
|
|
203
|
+
specs=pulumi.get(__response__, 'specs'),
|
|
204
|
+
type=pulumi.get(__response__, 'type')))
|
pulumi_vsphere/get_host.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
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__ = [
|
|
@@ -35,27 +40,27 @@ class GetHostResult:
|
|
|
35
40
|
raise TypeError("Expected argument 'resource_pool_id' to be a str")
|
|
36
41
|
pulumi.set(__self__, "resource_pool_id", resource_pool_id)
|
|
37
42
|
|
|
38
|
-
@property
|
|
43
|
+
@_builtins.property
|
|
39
44
|
@pulumi.getter(name="datacenterId")
|
|
40
|
-
def datacenter_id(self) -> str:
|
|
45
|
+
def datacenter_id(self) -> _builtins.str:
|
|
41
46
|
return pulumi.get(self, "datacenter_id")
|
|
42
47
|
|
|
43
|
-
@property
|
|
48
|
+
@_builtins.property
|
|
44
49
|
@pulumi.getter
|
|
45
|
-
def id(self) -> str:
|
|
50
|
+
def id(self) -> _builtins.str:
|
|
46
51
|
"""
|
|
47
52
|
The provider-assigned unique ID for this managed resource.
|
|
48
53
|
"""
|
|
49
54
|
return pulumi.get(self, "id")
|
|
50
55
|
|
|
51
|
-
@property
|
|
56
|
+
@_builtins.property
|
|
52
57
|
@pulumi.getter
|
|
53
|
-
def name(self) -> Optional[str]:
|
|
58
|
+
def name(self) -> Optional[_builtins.str]:
|
|
54
59
|
return pulumi.get(self, "name")
|
|
55
60
|
|
|
56
|
-
@property
|
|
61
|
+
@_builtins.property
|
|
57
62
|
@pulumi.getter(name="resourcePoolId")
|
|
58
|
-
def resource_pool_id(self) -> str:
|
|
63
|
+
def resource_pool_id(self) -> _builtins.str:
|
|
59
64
|
"""
|
|
60
65
|
The managed object ID of the ESXi
|
|
61
66
|
host's root resource pool.
|
|
@@ -75,8 +80,8 @@ class AwaitableGetHostResult(GetHostResult):
|
|
|
75
80
|
resource_pool_id=self.resource_pool_id)
|
|
76
81
|
|
|
77
82
|
|
|
78
|
-
def get_host(datacenter_id: Optional[str] = None,
|
|
79
|
-
name: Optional[str] = None,
|
|
83
|
+
def get_host(datacenter_id: Optional[_builtins.str] = None,
|
|
84
|
+
name: Optional[_builtins.str] = None,
|
|
80
85
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetHostResult:
|
|
81
86
|
"""
|
|
82
87
|
The `Host` data source can be used to discover the ID of an ESXi host.
|
|
@@ -95,9 +100,9 @@ def get_host(datacenter_id: Optional[str] = None,
|
|
|
95
100
|
```
|
|
96
101
|
|
|
97
102
|
|
|
98
|
-
:param str datacenter_id: The managed object reference ID
|
|
103
|
+
:param _builtins.str datacenter_id: The managed object reference ID
|
|
99
104
|
of a vSphere datacenter object.
|
|
100
|
-
:param str name: The name of the ESXI host. This can be a name or path.
|
|
105
|
+
:param _builtins.str name: The name of the ESXI host. This can be a name or path.
|
|
101
106
|
Can be omitted if there is only one host in your inventory.
|
|
102
107
|
|
|
103
108
|
> **NOTE:** When used against an ESXi host directly, this data source _always_
|
|
@@ -114,12 +119,9 @@ def get_host(datacenter_id: Optional[str] = None,
|
|
|
114
119
|
id=pulumi.get(__ret__, 'id'),
|
|
115
120
|
name=pulumi.get(__ret__, 'name'),
|
|
116
121
|
resource_pool_id=pulumi.get(__ret__, 'resource_pool_id'))
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
def get_host_output(datacenter_id: Optional[pulumi.Input[str]] = None,
|
|
121
|
-
name: Optional[pulumi.Input[Optional[str]]] = None,
|
|
122
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetHostResult]:
|
|
122
|
+
def get_host_output(datacenter_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
123
|
+
name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
124
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetHostResult]:
|
|
123
125
|
"""
|
|
124
126
|
The `Host` data source can be used to discover the ID of an ESXi host.
|
|
125
127
|
This can then be used with resources or data sources that require an ESX
|
|
@@ -137,12 +139,21 @@ def get_host_output(datacenter_id: Optional[pulumi.Input[str]] = None,
|
|
|
137
139
|
```
|
|
138
140
|
|
|
139
141
|
|
|
140
|
-
:param str datacenter_id: The managed object reference ID
|
|
142
|
+
:param _builtins.str datacenter_id: The managed object reference ID
|
|
141
143
|
of a vSphere datacenter object.
|
|
142
|
-
:param str name: The name of the ESXI host. This can be a name or path.
|
|
144
|
+
:param _builtins.str name: The name of the ESXI host. This can be a name or path.
|
|
143
145
|
Can be omitted if there is only one host in your inventory.
|
|
144
146
|
|
|
145
147
|
> **NOTE:** When used against an ESXi host directly, this data source _always_
|
|
146
148
|
returns the ESXi host's object ID, regardless of what is entered into `name`.
|
|
147
149
|
"""
|
|
148
|
-
|
|
150
|
+
__args__ = dict()
|
|
151
|
+
__args__['datacenterId'] = datacenter_id
|
|
152
|
+
__args__['name'] = name
|
|
153
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
154
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getHost:getHost', __args__, opts=opts, typ=GetHostResult)
|
|
155
|
+
return __ret__.apply(lambda __response__: GetHostResult(
|
|
156
|
+
datacenter_id=pulumi.get(__response__, 'datacenter_id'),
|
|
157
|
+
id=pulumi.get(__response__, 'id'),
|
|
158
|
+
name=pulumi.get(__response__, 'name'),
|
|
159
|
+
resource_pool_id=pulumi.get(__response__, 'resource_pool_id')))
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
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
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
'GetHostBaseImagesResult',
|
|
19
|
+
'AwaitableGetHostBaseImagesResult',
|
|
20
|
+
'get_host_base_images',
|
|
21
|
+
'get_host_base_images_output',
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
@pulumi.output_type
|
|
25
|
+
class GetHostBaseImagesResult:
|
|
26
|
+
"""
|
|
27
|
+
A collection of values returned by getHostBaseImages.
|
|
28
|
+
"""
|
|
29
|
+
def __init__(__self__, id=None, versions=None):
|
|
30
|
+
if id and not isinstance(id, str):
|
|
31
|
+
raise TypeError("Expected argument 'id' to be a str")
|
|
32
|
+
pulumi.set(__self__, "id", id)
|
|
33
|
+
if versions and not isinstance(versions, list):
|
|
34
|
+
raise TypeError("Expected argument 'versions' to be a list")
|
|
35
|
+
pulumi.set(__self__, "versions", versions)
|
|
36
|
+
|
|
37
|
+
@_builtins.property
|
|
38
|
+
@pulumi.getter
|
|
39
|
+
def id(self) -> _builtins.str:
|
|
40
|
+
"""
|
|
41
|
+
The provider-assigned unique ID for this managed resource.
|
|
42
|
+
"""
|
|
43
|
+
return pulumi.get(self, "id")
|
|
44
|
+
|
|
45
|
+
@_builtins.property
|
|
46
|
+
@pulumi.getter
|
|
47
|
+
def versions(self) -> Sequence[_builtins.str]:
|
|
48
|
+
"""
|
|
49
|
+
The ESXi version identifier for the image
|
|
50
|
+
"""
|
|
51
|
+
return pulumi.get(self, "versions")
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class AwaitableGetHostBaseImagesResult(GetHostBaseImagesResult):
|
|
55
|
+
# pylint: disable=using-constant-test
|
|
56
|
+
def __await__(self):
|
|
57
|
+
if False:
|
|
58
|
+
yield self
|
|
59
|
+
return GetHostBaseImagesResult(
|
|
60
|
+
id=self.id,
|
|
61
|
+
versions=self.versions)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def get_host_base_images(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetHostBaseImagesResult:
|
|
65
|
+
"""
|
|
66
|
+
The `get_host_base_images` data source can be used to get the list of ESXi
|
|
67
|
+
base images available for cluster software management.
|
|
68
|
+
|
|
69
|
+
## Example Usage
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
import pulumi
|
|
73
|
+
import pulumi_vsphere as vsphere
|
|
74
|
+
|
|
75
|
+
base_images = vsphere.get_host_base_images()
|
|
76
|
+
```
|
|
77
|
+
"""
|
|
78
|
+
__args__ = dict()
|
|
79
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
80
|
+
__ret__ = pulumi.runtime.invoke('vsphere:index/getHostBaseImages:getHostBaseImages', __args__, opts=opts, typ=GetHostBaseImagesResult).value
|
|
81
|
+
|
|
82
|
+
return AwaitableGetHostBaseImagesResult(
|
|
83
|
+
id=pulumi.get(__ret__, 'id'),
|
|
84
|
+
versions=pulumi.get(__ret__, 'versions'))
|
|
85
|
+
def get_host_base_images_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetHostBaseImagesResult]:
|
|
86
|
+
"""
|
|
87
|
+
The `get_host_base_images` data source can be used to get the list of ESXi
|
|
88
|
+
base images available for cluster software management.
|
|
89
|
+
|
|
90
|
+
## Example Usage
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
import pulumi
|
|
94
|
+
import pulumi_vsphere as vsphere
|
|
95
|
+
|
|
96
|
+
base_images = vsphere.get_host_base_images()
|
|
97
|
+
```
|
|
98
|
+
"""
|
|
99
|
+
__args__ = dict()
|
|
100
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
101
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getHostBaseImages:getHostBaseImages', __args__, opts=opts, typ=GetHostBaseImagesResult)
|
|
102
|
+
return __ret__.apply(lambda __response__: GetHostBaseImagesResult(
|
|
103
|
+
id=pulumi.get(__response__, 'id'),
|
|
104
|
+
versions=pulumi.get(__response__, 'versions')))
|