pulumi-vsphere 4.11.5__py3-none-any.whl → 4.12.0a1725603256__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/_inputs.py +5 -1066
- pulumi_vsphere/_utilities.py +1 -1
- pulumi_vsphere/compute_cluster.py +2 -181
- pulumi_vsphere/compute_cluster_host_group.py +2 -67
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +2 -29
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +2 -41
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +2 -205
- pulumi_vsphere/compute_cluster_vm_group.py +2 -198
- pulumi_vsphere/compute_cluster_vm_host_rule.py +2 -73
- pulumi_vsphere/config/__init__.pyi +0 -5
- pulumi_vsphere/config/vars.py +0 -5
- pulumi_vsphere/content_library.py +2 -103
- pulumi_vsphere/content_library_item.py +2 -143
- pulumi_vsphere/custom_attribute.py +2 -77
- pulumi_vsphere/datacenter.py +4 -19
- pulumi_vsphere/datastore_cluster.py +2 -63
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +2 -159
- pulumi_vsphere/distributed_port_group.py +2 -285
- pulumi_vsphere/distributed_virtual_switch.py +2 -261
- pulumi_vsphere/dpm_host_override.py +2 -63
- pulumi_vsphere/drs_vm_override.py +2 -67
- pulumi_vsphere/entity_permissions.py +0 -5
- pulumi_vsphere/file.py +0 -5
- pulumi_vsphere/folder.py +2 -141
- pulumi_vsphere/get_compute_cluster.py +4 -15
- pulumi_vsphere/get_compute_cluster_host_group.py +6 -17
- pulumi_vsphere/get_content_library.py +4 -12
- pulumi_vsphere/get_content_library_item.py +4 -16
- pulumi_vsphere/get_custom_attribute.py +4 -13
- pulumi_vsphere/get_datacenter.py +4 -12
- pulumi_vsphere/get_datastore.py +4 -16
- pulumi_vsphere/get_datastore_cluster.py +4 -14
- pulumi_vsphere/get_datastore_stats.py +4 -16
- pulumi_vsphere/get_distributed_virtual_switch.py +4 -15
- pulumi_vsphere/get_dynamic.py +4 -16
- pulumi_vsphere/get_folder.py +4 -12
- pulumi_vsphere/get_guest_os_customization.py +4 -17
- pulumi_vsphere/get_host.py +4 -15
- pulumi_vsphere/get_host_base_images.py +4 -11
- pulumi_vsphere/get_host_pci_device.py +4 -19
- pulumi_vsphere/get_host_thumbprint.py +14 -34
- pulumi_vsphere/get_host_vgpu_profile.py +4 -15
- pulumi_vsphere/get_license.py +4 -17
- pulumi_vsphere/get_network.py +4 -17
- pulumi_vsphere/get_ovf_vm_template.py +4 -55
- pulumi_vsphere/get_policy.py +4 -12
- pulumi_vsphere/get_resource_pool.py +4 -14
- pulumi_vsphere/get_role.py +4 -18
- pulumi_vsphere/get_tag.py +4 -15
- pulumi_vsphere/get_tag_category.py +4 -15
- pulumi_vsphere/get_vapp_container.py +4 -14
- pulumi_vsphere/get_virtual_machine.py +4 -130
- pulumi_vsphere/get_vmfs_disks.py +4 -17
- pulumi_vsphere/guest_os_customization.py +0 -5
- pulumi_vsphere/ha_vm_override.py +2 -163
- pulumi_vsphere/host.py +12 -203
- pulumi_vsphere/host_port_group.py +2 -17
- pulumi_vsphere/host_virtual_switch.py +2 -69
- pulumi_vsphere/license.py +0 -5
- pulumi_vsphere/nas_datastore.py +2 -67
- pulumi_vsphere/offline_software_depot.py +0 -5
- pulumi_vsphere/outputs.py +0 -5
- pulumi_vsphere/provider.py +0 -5
- pulumi_vsphere/pulumi-plugin.json +1 -1
- pulumi_vsphere/resource_pool.py +437 -168
- pulumi_vsphere/role.py +2 -33
- pulumi_vsphere/storage_drs_vm_override.py +2 -133
- pulumi_vsphere/supervisor.py +0 -5
- pulumi_vsphere/tag.py +2 -159
- pulumi_vsphere/tag_category.py +2 -83
- pulumi_vsphere/vapp_container.py +2 -163
- pulumi_vsphere/vapp_entity.py +2 -147
- pulumi_vsphere/virtual_disk.py +2 -81
- pulumi_vsphere/virtual_machine.py +2 -53
- pulumi_vsphere/virtual_machine_class.py +0 -5
- pulumi_vsphere/virtual_machine_snapshot.py +0 -5
- pulumi_vsphere/vm_storage_policy.py +0 -5
- pulumi_vsphere/vmfs_datastore.py +2 -271
- pulumi_vsphere/vnic.py +4 -19
- {pulumi_vsphere-4.11.5.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/METADATA +2 -3
- pulumi_vsphere-4.12.0a1725603256.dist-info/RECORD +86 -0
- {pulumi_vsphere-4.11.5.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.11.5.dist-info/RECORD +0 -86
- {pulumi_vsphere-4.11.5.dist-info → pulumi_vsphere-4.12.0a1725603256.dist-info}/top_level.txt +0 -0
pulumi_vsphere/role.py
CHANGED
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
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
10
|
from . import _utilities
|
|
16
11
|
|
|
17
12
|
__all__ = ['RoleArgs', 'Role']
|
|
@@ -121,20 +116,7 @@ class Role(pulumi.CustomResource):
|
|
|
121
116
|
role_privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
122
117
|
__props__=None):
|
|
123
118
|
"""
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
An existing role can be imported into this resource by supplying the role id. An example is below:
|
|
127
|
-
|
|
128
|
-
```sh
|
|
129
|
-
$ pulumi import vsphere:index/role:Role role1 -709298051
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Use [`vsphere_role` data source][ref-vsphere-role-data-source]
|
|
133
|
-
|
|
134
|
-
to read information about system roles.
|
|
135
|
-
|
|
136
|
-
[ref-vsphere-role-data-source]: /docs/providers/vsphere/d/vsphere_role.html
|
|
137
|
-
|
|
119
|
+
Create a Role resource with the given unique name, props, and options.
|
|
138
120
|
:param str resource_name: The name of the resource.
|
|
139
121
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
140
122
|
:param pulumi.Input[str] name: The name of the role.
|
|
@@ -147,20 +129,7 @@ class Role(pulumi.CustomResource):
|
|
|
147
129
|
args: Optional[RoleArgs] = None,
|
|
148
130
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
149
131
|
"""
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
An existing role can be imported into this resource by supplying the role id. An example is below:
|
|
153
|
-
|
|
154
|
-
```sh
|
|
155
|
-
$ pulumi import vsphere:index/role:Role role1 -709298051
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
Use [`vsphere_role` data source][ref-vsphere-role-data-source]
|
|
159
|
-
|
|
160
|
-
to read information about system roles.
|
|
161
|
-
|
|
162
|
-
[ref-vsphere-role-data-source]: /docs/providers/vsphere/d/vsphere_role.html
|
|
163
|
-
|
|
132
|
+
Create a Role resource with the given unique name, props, and options.
|
|
164
133
|
:param str resource_name: The name of the resource.
|
|
165
134
|
:param RoleArgs args: The arguments to use to populate this resource's properties.
|
|
166
135
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
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
10
|
from . import _utilities
|
|
16
11
|
|
|
17
12
|
__all__ = ['StorageDrsVmOverrideArgs', 'StorageDrsVmOverride']
|
|
@@ -250,70 +245,7 @@ class StorageDrsVmOverride(pulumi.CustomResource):
|
|
|
250
245
|
virtual_machine_id: Optional[pulumi.Input[str]] = None,
|
|
251
246
|
__props__=None):
|
|
252
247
|
"""
|
|
253
|
-
|
|
254
|
-
override to a datastore cluster for a specific virtual machine. With this
|
|
255
|
-
resource, one can enable or disable Storage DRS, and control the automation
|
|
256
|
-
level and disk affinity for a single virtual machine without affecting the rest
|
|
257
|
-
of the datastore cluster.
|
|
258
|
-
|
|
259
|
-
For more information on vSphere datastore clusters and Storage DRS, see [this
|
|
260
|
-
page][ref-vsphere-datastore-clusters].
|
|
261
|
-
|
|
262
|
-
[ref-vsphere-datastore-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-598DF695-107E-406B-9C95-0AF961FC227A.html
|
|
263
|
-
|
|
264
|
-
## Example Usage
|
|
265
|
-
|
|
266
|
-
```python
|
|
267
|
-
import pulumi
|
|
268
|
-
import pulumi_vsphere as vsphere
|
|
269
|
-
|
|
270
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
271
|
-
datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster1",
|
|
272
|
-
datacenter_id=datacenter.id)
|
|
273
|
-
member_datastore = vsphere.get_datastore(name="datastore-cluster1-member1",
|
|
274
|
-
datacenter_id=datacenter.id)
|
|
275
|
-
pool = vsphere.get_resource_pool(name="cluster1/Resources",
|
|
276
|
-
datacenter_id=datacenter.id)
|
|
277
|
-
network = vsphere.get_network(name="public",
|
|
278
|
-
datacenter_id=datacenter.id)
|
|
279
|
-
vm = vsphere.VirtualMachine("vm",
|
|
280
|
-
name="test",
|
|
281
|
-
resource_pool_id=pool.id,
|
|
282
|
-
datastore_id=member_datastore.id,
|
|
283
|
-
num_cpus=2,
|
|
284
|
-
memory=1024,
|
|
285
|
-
guest_id="otherLinux64Guest",
|
|
286
|
-
network_interfaces=[{
|
|
287
|
-
"network_id": network.id,
|
|
288
|
-
}],
|
|
289
|
-
disks=[{
|
|
290
|
-
"label": "disk0",
|
|
291
|
-
"size": 20,
|
|
292
|
-
}])
|
|
293
|
-
drs_vm_override = vsphere.StorageDrsVmOverride("drs_vm_override",
|
|
294
|
-
datastore_cluster_id=datastore_cluster.id,
|
|
295
|
-
virtual_machine_id=vm.id,
|
|
296
|
-
sdrs_enabled="false")
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
## Import
|
|
300
|
-
|
|
301
|
-
An existing override can be imported into this resource by
|
|
302
|
-
|
|
303
|
-
supplying both the path to the datastore cluster and the path to the virtual
|
|
304
|
-
|
|
305
|
-
machine to `pulumi import`. If no override exists, an error will be given.
|
|
306
|
-
|
|
307
|
-
An example is below:
|
|
308
|
-
|
|
309
|
-
```sh
|
|
310
|
-
$ pulumi import vsphere:index/storageDrsVmOverride:StorageDrsVmOverride drs_vm_override \\
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
'{"datastore_cluster_path": "/dc1/datastore/ds-cluster", \\
|
|
314
|
-
|
|
315
|
-
"virtual_machine_path": "/dc1/vm/srv1"}'
|
|
316
|
-
|
|
248
|
+
Create a StorageDrsVmOverride resource with the given unique name, props, and options.
|
|
317
249
|
:param str resource_name: The name of the resource.
|
|
318
250
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
319
251
|
:param pulumi.Input[str] datastore_cluster_id: The managed object reference
|
|
@@ -341,70 +273,7 @@ class StorageDrsVmOverride(pulumi.CustomResource):
|
|
|
341
273
|
args: StorageDrsVmOverrideArgs,
|
|
342
274
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
343
275
|
"""
|
|
344
|
-
|
|
345
|
-
override to a datastore cluster for a specific virtual machine. With this
|
|
346
|
-
resource, one can enable or disable Storage DRS, and control the automation
|
|
347
|
-
level and disk affinity for a single virtual machine without affecting the rest
|
|
348
|
-
of the datastore cluster.
|
|
349
|
-
|
|
350
|
-
For more information on vSphere datastore clusters and Storage DRS, see [this
|
|
351
|
-
page][ref-vsphere-datastore-clusters].
|
|
352
|
-
|
|
353
|
-
[ref-vsphere-datastore-clusters]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-598DF695-107E-406B-9C95-0AF961FC227A.html
|
|
354
|
-
|
|
355
|
-
## Example Usage
|
|
356
|
-
|
|
357
|
-
```python
|
|
358
|
-
import pulumi
|
|
359
|
-
import pulumi_vsphere as vsphere
|
|
360
|
-
|
|
361
|
-
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
362
|
-
datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster1",
|
|
363
|
-
datacenter_id=datacenter.id)
|
|
364
|
-
member_datastore = vsphere.get_datastore(name="datastore-cluster1-member1",
|
|
365
|
-
datacenter_id=datacenter.id)
|
|
366
|
-
pool = vsphere.get_resource_pool(name="cluster1/Resources",
|
|
367
|
-
datacenter_id=datacenter.id)
|
|
368
|
-
network = vsphere.get_network(name="public",
|
|
369
|
-
datacenter_id=datacenter.id)
|
|
370
|
-
vm = vsphere.VirtualMachine("vm",
|
|
371
|
-
name="test",
|
|
372
|
-
resource_pool_id=pool.id,
|
|
373
|
-
datastore_id=member_datastore.id,
|
|
374
|
-
num_cpus=2,
|
|
375
|
-
memory=1024,
|
|
376
|
-
guest_id="otherLinux64Guest",
|
|
377
|
-
network_interfaces=[{
|
|
378
|
-
"network_id": network.id,
|
|
379
|
-
}],
|
|
380
|
-
disks=[{
|
|
381
|
-
"label": "disk0",
|
|
382
|
-
"size": 20,
|
|
383
|
-
}])
|
|
384
|
-
drs_vm_override = vsphere.StorageDrsVmOverride("drs_vm_override",
|
|
385
|
-
datastore_cluster_id=datastore_cluster.id,
|
|
386
|
-
virtual_machine_id=vm.id,
|
|
387
|
-
sdrs_enabled="false")
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
## Import
|
|
391
|
-
|
|
392
|
-
An existing override can be imported into this resource by
|
|
393
|
-
|
|
394
|
-
supplying both the path to the datastore cluster and the path to the virtual
|
|
395
|
-
|
|
396
|
-
machine to `pulumi import`. If no override exists, an error will be given.
|
|
397
|
-
|
|
398
|
-
An example is below:
|
|
399
|
-
|
|
400
|
-
```sh
|
|
401
|
-
$ pulumi import vsphere:index/storageDrsVmOverride:StorageDrsVmOverride drs_vm_override \\
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
'{"datastore_cluster_path": "/dc1/datastore/ds-cluster", \\
|
|
405
|
-
|
|
406
|
-
"virtual_machine_path": "/dc1/vm/srv1"}'
|
|
407
|
-
|
|
276
|
+
Create a StorageDrsVmOverride resource with the given unique name, props, and options.
|
|
408
277
|
:param str resource_name: The name of the resource.
|
|
409
278
|
:param StorageDrsVmOverrideArgs args: The arguments to use to populate this resource's properties.
|
|
410
279
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
pulumi_vsphere/supervisor.py
CHANGED
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
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
10
|
from . import _utilities
|
|
16
11
|
from . import outputs
|
|
17
12
|
from ._inputs import *
|
pulumi_vsphere/tag.py
CHANGED
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
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
10
|
from . import _utilities
|
|
16
11
|
|
|
17
12
|
__all__ = ['TagArgs', 'Tag']
|
|
@@ -145,83 +140,7 @@ class Tag(pulumi.CustomResource):
|
|
|
145
140
|
name: Optional[pulumi.Input[str]] = None,
|
|
146
141
|
__props__=None):
|
|
147
142
|
"""
|
|
148
|
-
|
|
149
|
-
you to attach metadata to objects in the vSphere inventory to make these
|
|
150
|
-
objects more sortable and searchable.
|
|
151
|
-
|
|
152
|
-
For more information about tags, click [here][ext-tags-general].
|
|
153
|
-
|
|
154
|
-
[ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
|
|
155
|
-
|
|
156
|
-
## Example Usage
|
|
157
|
-
|
|
158
|
-
This example creates a tag named `test-tag`. This tag is assigned the
|
|
159
|
-
`test-category` category, which was created by the
|
|
160
|
-
`TagCategory` resource. The resulting
|
|
161
|
-
tag can be assigned to VMs and datastores only, and can be the only value in
|
|
162
|
-
the category that can be assigned, as per the restrictions defined by the
|
|
163
|
-
category.
|
|
164
|
-
|
|
165
|
-
```python
|
|
166
|
-
import pulumi
|
|
167
|
-
import pulumi_vsphere as vsphere
|
|
168
|
-
|
|
169
|
-
category = vsphere.TagCategory("category",
|
|
170
|
-
name="test-category",
|
|
171
|
-
cardinality="SINGLE",
|
|
172
|
-
description="Managed by Pulumi",
|
|
173
|
-
associable_types=[
|
|
174
|
-
"VirtualMachine",
|
|
175
|
-
"Datastore",
|
|
176
|
-
])
|
|
177
|
-
tag = vsphere.Tag("tag",
|
|
178
|
-
name="test-tag",
|
|
179
|
-
category_id=category.id,
|
|
180
|
-
description="Managed by Pulumi")
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
### Using Tags in a Supported Resource
|
|
184
|
-
|
|
185
|
-
Tags can be applied to vSphere resources via the `tags` argument
|
|
186
|
-
in any supported resource.
|
|
187
|
-
|
|
188
|
-
The following example builds on the above example by creating a
|
|
189
|
-
`VirtualMachine` and applying the
|
|
190
|
-
created tag to it:
|
|
191
|
-
|
|
192
|
-
```python
|
|
193
|
-
import pulumi
|
|
194
|
-
import pulumi_vsphere as vsphere
|
|
195
|
-
|
|
196
|
-
category = vsphere.TagCategory("category",
|
|
197
|
-
name="test-category",
|
|
198
|
-
cardinality="SINGLE",
|
|
199
|
-
description="Managed by Pulumi",
|
|
200
|
-
associable_types=[
|
|
201
|
-
"VirtualMachine",
|
|
202
|
-
"Datastore",
|
|
203
|
-
])
|
|
204
|
-
tag = vsphere.Tag("tag",
|
|
205
|
-
name="test-tag",
|
|
206
|
-
category_id=category.id,
|
|
207
|
-
description="Managed by Pulumi")
|
|
208
|
-
web = vsphere.VirtualMachine("web", tags=[tag.id])
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
## Import
|
|
212
|
-
|
|
213
|
-
An existing tag can be imported into this resource by supplying
|
|
214
|
-
|
|
215
|
-
both the tag's category name and the name of the tag as a JSON string to
|
|
216
|
-
|
|
217
|
-
`pulumi import`, as per the example below:
|
|
218
|
-
|
|
219
|
-
```sh
|
|
220
|
-
$ pulumi import vsphere:index/tag:Tag tag \\
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
'{"category_name": "pulumi-test-category", "tag_name": "pulumi-test-tag"}'
|
|
224
|
-
|
|
143
|
+
Create a Tag resource with the given unique name, props, and options.
|
|
225
144
|
:param str resource_name: The name of the resource.
|
|
226
145
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
227
146
|
:param pulumi.Input[str] category_id: The unique identifier of the parent category in
|
|
@@ -237,83 +156,7 @@ class Tag(pulumi.CustomResource):
|
|
|
237
156
|
args: TagArgs,
|
|
238
157
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
239
158
|
"""
|
|
240
|
-
|
|
241
|
-
you to attach metadata to objects in the vSphere inventory to make these
|
|
242
|
-
objects more sortable and searchable.
|
|
243
|
-
|
|
244
|
-
For more information about tags, click [here][ext-tags-general].
|
|
245
|
-
|
|
246
|
-
[ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
|
|
247
|
-
|
|
248
|
-
## Example Usage
|
|
249
|
-
|
|
250
|
-
This example creates a tag named `test-tag`. This tag is assigned the
|
|
251
|
-
`test-category` category, which was created by the
|
|
252
|
-
`TagCategory` resource. The resulting
|
|
253
|
-
tag can be assigned to VMs and datastores only, and can be the only value in
|
|
254
|
-
the category that can be assigned, as per the restrictions defined by the
|
|
255
|
-
category.
|
|
256
|
-
|
|
257
|
-
```python
|
|
258
|
-
import pulumi
|
|
259
|
-
import pulumi_vsphere as vsphere
|
|
260
|
-
|
|
261
|
-
category = vsphere.TagCategory("category",
|
|
262
|
-
name="test-category",
|
|
263
|
-
cardinality="SINGLE",
|
|
264
|
-
description="Managed by Pulumi",
|
|
265
|
-
associable_types=[
|
|
266
|
-
"VirtualMachine",
|
|
267
|
-
"Datastore",
|
|
268
|
-
])
|
|
269
|
-
tag = vsphere.Tag("tag",
|
|
270
|
-
name="test-tag",
|
|
271
|
-
category_id=category.id,
|
|
272
|
-
description="Managed by Pulumi")
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
### Using Tags in a Supported Resource
|
|
276
|
-
|
|
277
|
-
Tags can be applied to vSphere resources via the `tags` argument
|
|
278
|
-
in any supported resource.
|
|
279
|
-
|
|
280
|
-
The following example builds on the above example by creating a
|
|
281
|
-
`VirtualMachine` and applying the
|
|
282
|
-
created tag to it:
|
|
283
|
-
|
|
284
|
-
```python
|
|
285
|
-
import pulumi
|
|
286
|
-
import pulumi_vsphere as vsphere
|
|
287
|
-
|
|
288
|
-
category = vsphere.TagCategory("category",
|
|
289
|
-
name="test-category",
|
|
290
|
-
cardinality="SINGLE",
|
|
291
|
-
description="Managed by Pulumi",
|
|
292
|
-
associable_types=[
|
|
293
|
-
"VirtualMachine",
|
|
294
|
-
"Datastore",
|
|
295
|
-
])
|
|
296
|
-
tag = vsphere.Tag("tag",
|
|
297
|
-
name="test-tag",
|
|
298
|
-
category_id=category.id,
|
|
299
|
-
description="Managed by Pulumi")
|
|
300
|
-
web = vsphere.VirtualMachine("web", tags=[tag.id])
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
## Import
|
|
304
|
-
|
|
305
|
-
An existing tag can be imported into this resource by supplying
|
|
306
|
-
|
|
307
|
-
both the tag's category name and the name of the tag as a JSON string to
|
|
308
|
-
|
|
309
|
-
`pulumi import`, as per the example below:
|
|
310
|
-
|
|
311
|
-
```sh
|
|
312
|
-
$ pulumi import vsphere:index/tag:Tag tag \\
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
'{"category_name": "pulumi-test-category", "tag_name": "pulumi-test-tag"}'
|
|
316
|
-
|
|
159
|
+
Create a Tag resource with the given unique name, props, and options.
|
|
317
160
|
:param str resource_name: The name of the resource.
|
|
318
161
|
:param TagArgs args: The arguments to use to populate this resource's properties.
|
|
319
162
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
pulumi_vsphere/tag_category.py
CHANGED
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
-
import sys
|
|
8
7
|
import pulumi
|
|
9
8
|
import pulumi.runtime
|
|
10
9
|
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
10
|
from . import _utilities
|
|
16
11
|
|
|
17
12
|
__all__ = ['TagCategoryArgs', 'TagCategory']
|
|
@@ -201,45 +196,7 @@ class TagCategory(pulumi.CustomResource):
|
|
|
201
196
|
name: Optional[pulumi.Input[str]] = None,
|
|
202
197
|
__props__=None):
|
|
203
198
|
"""
|
|
204
|
-
|
|
205
|
-
categories, which determine how tags are grouped together and applied to
|
|
206
|
-
specific objects.
|
|
207
|
-
|
|
208
|
-
For more information about tags, click [here][ext-tags-general].
|
|
209
|
-
|
|
210
|
-
[ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
|
|
211
|
-
|
|
212
|
-
## Example Usage
|
|
213
|
-
|
|
214
|
-
This example creates a tag category named `test-category`, with
|
|
215
|
-
single cardinality (meaning that only one tag in this category can be assigned
|
|
216
|
-
to an object at any given time). Tags in this category can only be assigned to
|
|
217
|
-
VMs and datastores.
|
|
218
|
-
|
|
219
|
-
```python
|
|
220
|
-
import pulumi
|
|
221
|
-
import pulumi_vsphere as vsphere
|
|
222
|
-
|
|
223
|
-
category = vsphere.TagCategory("category",
|
|
224
|
-
name="test-category",
|
|
225
|
-
description="Managed by Pulumi",
|
|
226
|
-
cardinality="SINGLE",
|
|
227
|
-
associable_types=[
|
|
228
|
-
"VirtualMachine",
|
|
229
|
-
"Datastore",
|
|
230
|
-
])
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
## Import
|
|
234
|
-
|
|
235
|
-
An existing tag category can be imported into this resource via
|
|
236
|
-
|
|
237
|
-
its name, using the following command:
|
|
238
|
-
|
|
239
|
-
```sh
|
|
240
|
-
$ pulumi import vsphere:index/tagCategory:TagCategory category terraform-test-category
|
|
241
|
-
```
|
|
242
|
-
|
|
199
|
+
Create a TagCategory resource with the given unique name, props, and options.
|
|
243
200
|
:param str resource_name: The name of the resource.
|
|
244
201
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
245
202
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] associable_types: A list object types that this category is
|
|
@@ -262,45 +219,7 @@ class TagCategory(pulumi.CustomResource):
|
|
|
262
219
|
args: TagCategoryArgs,
|
|
263
220
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
264
221
|
"""
|
|
265
|
-
|
|
266
|
-
categories, which determine how tags are grouped together and applied to
|
|
267
|
-
specific objects.
|
|
268
|
-
|
|
269
|
-
For more information about tags, click [here][ext-tags-general].
|
|
270
|
-
|
|
271
|
-
[ext-tags-general]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vcenter-esxi-management/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html
|
|
272
|
-
|
|
273
|
-
## Example Usage
|
|
274
|
-
|
|
275
|
-
This example creates a tag category named `test-category`, with
|
|
276
|
-
single cardinality (meaning that only one tag in this category can be assigned
|
|
277
|
-
to an object at any given time). Tags in this category can only be assigned to
|
|
278
|
-
VMs and datastores.
|
|
279
|
-
|
|
280
|
-
```python
|
|
281
|
-
import pulumi
|
|
282
|
-
import pulumi_vsphere as vsphere
|
|
283
|
-
|
|
284
|
-
category = vsphere.TagCategory("category",
|
|
285
|
-
name="test-category",
|
|
286
|
-
description="Managed by Pulumi",
|
|
287
|
-
cardinality="SINGLE",
|
|
288
|
-
associable_types=[
|
|
289
|
-
"VirtualMachine",
|
|
290
|
-
"Datastore",
|
|
291
|
-
])
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
## Import
|
|
295
|
-
|
|
296
|
-
An existing tag category can be imported into this resource via
|
|
297
|
-
|
|
298
|
-
its name, using the following command:
|
|
299
|
-
|
|
300
|
-
```sh
|
|
301
|
-
$ pulumi import vsphere:index/tagCategory:TagCategory category terraform-test-category
|
|
302
|
-
```
|
|
303
|
-
|
|
222
|
+
Create a TagCategory resource with the given unique name, props, and options.
|
|
304
223
|
:param str resource_name: The name of the resource.
|
|
305
224
|
:param TagCategoryArgs args: The arguments to use to populate this resource's properties.
|
|
306
225
|
:param pulumi.ResourceOptions opts: Options for the resource.
|