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/tag.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__ = ['TagArgs', 'Tag']
|
|
@@ -14,15 +19,15 @@ __all__ = ['TagArgs', 'Tag']
|
|
|
14
19
|
@pulumi.input_type
|
|
15
20
|
class TagArgs:
|
|
16
21
|
def __init__(__self__, *,
|
|
17
|
-
category_id: pulumi.Input[str],
|
|
18
|
-
description: Optional[pulumi.Input[str]] = None,
|
|
19
|
-
name: Optional[pulumi.Input[str]] = None):
|
|
22
|
+
category_id: pulumi.Input[_builtins.str],
|
|
23
|
+
description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
24
|
+
name: Optional[pulumi.Input[_builtins.str]] = None):
|
|
20
25
|
"""
|
|
21
26
|
The set of arguments for constructing a Tag resource.
|
|
22
|
-
:param pulumi.Input[str] category_id: The unique identifier of the parent category in
|
|
27
|
+
:param pulumi.Input[_builtins.str] category_id: The unique identifier of the parent category in
|
|
23
28
|
which this tag will be created. Forces a new resource if changed.
|
|
24
|
-
:param pulumi.Input[str] description: A description for the tag.
|
|
25
|
-
:param pulumi.Input[str] name: The display name of the tag. The name must be unique
|
|
29
|
+
:param pulumi.Input[_builtins.str] description: A description for the tag.
|
|
30
|
+
:param pulumi.Input[_builtins.str] name: The display name of the tag. The name must be unique
|
|
26
31
|
within its category.
|
|
27
32
|
"""
|
|
28
33
|
pulumi.set(__self__, "category_id", category_id)
|
|
@@ -31,9 +36,9 @@ class TagArgs:
|
|
|
31
36
|
if name is not None:
|
|
32
37
|
pulumi.set(__self__, "name", name)
|
|
33
38
|
|
|
34
|
-
@property
|
|
39
|
+
@_builtins.property
|
|
35
40
|
@pulumi.getter(name="categoryId")
|
|
36
|
-
def category_id(self) -> pulumi.Input[str]:
|
|
41
|
+
def category_id(self) -> pulumi.Input[_builtins.str]:
|
|
37
42
|
"""
|
|
38
43
|
The unique identifier of the parent category in
|
|
39
44
|
which this tag will be created. Forces a new resource if changed.
|
|
@@ -41,24 +46,24 @@ class TagArgs:
|
|
|
41
46
|
return pulumi.get(self, "category_id")
|
|
42
47
|
|
|
43
48
|
@category_id.setter
|
|
44
|
-
def category_id(self, value: pulumi.Input[str]):
|
|
49
|
+
def category_id(self, value: pulumi.Input[_builtins.str]):
|
|
45
50
|
pulumi.set(self, "category_id", value)
|
|
46
51
|
|
|
47
|
-
@property
|
|
52
|
+
@_builtins.property
|
|
48
53
|
@pulumi.getter
|
|
49
|
-
def description(self) -> Optional[pulumi.Input[str]]:
|
|
54
|
+
def description(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
50
55
|
"""
|
|
51
56
|
A description for the tag.
|
|
52
57
|
"""
|
|
53
58
|
return pulumi.get(self, "description")
|
|
54
59
|
|
|
55
60
|
@description.setter
|
|
56
|
-
def description(self, value: Optional[pulumi.Input[str]]):
|
|
61
|
+
def description(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
57
62
|
pulumi.set(self, "description", value)
|
|
58
63
|
|
|
59
|
-
@property
|
|
64
|
+
@_builtins.property
|
|
60
65
|
@pulumi.getter
|
|
61
|
-
def name(self) -> Optional[pulumi.Input[str]]:
|
|
66
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
62
67
|
"""
|
|
63
68
|
The display name of the tag. The name must be unique
|
|
64
69
|
within its category.
|
|
@@ -66,22 +71,22 @@ class TagArgs:
|
|
|
66
71
|
return pulumi.get(self, "name")
|
|
67
72
|
|
|
68
73
|
@name.setter
|
|
69
|
-
def name(self, value: Optional[pulumi.Input[str]]):
|
|
74
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
70
75
|
pulumi.set(self, "name", value)
|
|
71
76
|
|
|
72
77
|
|
|
73
78
|
@pulumi.input_type
|
|
74
79
|
class _TagState:
|
|
75
80
|
def __init__(__self__, *,
|
|
76
|
-
category_id: Optional[pulumi.Input[str]] = None,
|
|
77
|
-
description: Optional[pulumi.Input[str]] = None,
|
|
78
|
-
name: Optional[pulumi.Input[str]] = None):
|
|
81
|
+
category_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
82
|
+
description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
83
|
+
name: Optional[pulumi.Input[_builtins.str]] = None):
|
|
79
84
|
"""
|
|
80
85
|
Input properties used for looking up and filtering Tag resources.
|
|
81
|
-
:param pulumi.Input[str] category_id: The unique identifier of the parent category in
|
|
86
|
+
:param pulumi.Input[_builtins.str] category_id: The unique identifier of the parent category in
|
|
82
87
|
which this tag will be created. Forces a new resource if changed.
|
|
83
|
-
:param pulumi.Input[str] description: A description for the tag.
|
|
84
|
-
:param pulumi.Input[str] name: The display name of the tag. The name must be unique
|
|
88
|
+
:param pulumi.Input[_builtins.str] description: A description for the tag.
|
|
89
|
+
:param pulumi.Input[_builtins.str] name: The display name of the tag. The name must be unique
|
|
85
90
|
within its category.
|
|
86
91
|
"""
|
|
87
92
|
if category_id is not None:
|
|
@@ -91,9 +96,9 @@ class _TagState:
|
|
|
91
96
|
if name is not None:
|
|
92
97
|
pulumi.set(__self__, "name", name)
|
|
93
98
|
|
|
94
|
-
@property
|
|
99
|
+
@_builtins.property
|
|
95
100
|
@pulumi.getter(name="categoryId")
|
|
96
|
-
def category_id(self) -> Optional[pulumi.Input[str]]:
|
|
101
|
+
def category_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
97
102
|
"""
|
|
98
103
|
The unique identifier of the parent category in
|
|
99
104
|
which this tag will be created. Forces a new resource if changed.
|
|
@@ -101,24 +106,24 @@ class _TagState:
|
|
|
101
106
|
return pulumi.get(self, "category_id")
|
|
102
107
|
|
|
103
108
|
@category_id.setter
|
|
104
|
-
def category_id(self, value: Optional[pulumi.Input[str]]):
|
|
109
|
+
def category_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
105
110
|
pulumi.set(self, "category_id", value)
|
|
106
111
|
|
|
107
|
-
@property
|
|
112
|
+
@_builtins.property
|
|
108
113
|
@pulumi.getter
|
|
109
|
-
def description(self) -> Optional[pulumi.Input[str]]:
|
|
114
|
+
def description(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
110
115
|
"""
|
|
111
116
|
A description for the tag.
|
|
112
117
|
"""
|
|
113
118
|
return pulumi.get(self, "description")
|
|
114
119
|
|
|
115
120
|
@description.setter
|
|
116
|
-
def description(self, value: Optional[pulumi.Input[str]]):
|
|
121
|
+
def description(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
117
122
|
pulumi.set(self, "description", value)
|
|
118
123
|
|
|
119
|
-
@property
|
|
124
|
+
@_builtins.property
|
|
120
125
|
@pulumi.getter
|
|
121
|
-
def name(self) -> Optional[pulumi.Input[str]]:
|
|
126
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
122
127
|
"""
|
|
123
128
|
The display name of the tag. The name must be unique
|
|
124
129
|
within its category.
|
|
@@ -126,27 +131,106 @@ class _TagState:
|
|
|
126
131
|
return pulumi.get(self, "name")
|
|
127
132
|
|
|
128
133
|
@name.setter
|
|
129
|
-
def name(self, value: Optional[pulumi.Input[str]]):
|
|
134
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
130
135
|
pulumi.set(self, "name", value)
|
|
131
136
|
|
|
132
137
|
|
|
138
|
+
@pulumi.type_token("vsphere:index/tag:Tag")
|
|
133
139
|
class Tag(pulumi.CustomResource):
|
|
134
140
|
@overload
|
|
135
141
|
def __init__(__self__,
|
|
136
142
|
resource_name: str,
|
|
137
143
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
138
|
-
category_id: Optional[pulumi.Input[str]] = None,
|
|
139
|
-
description: Optional[pulumi.Input[str]] = None,
|
|
140
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
144
|
+
category_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
145
|
+
description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
146
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
141
147
|
__props__=None):
|
|
142
148
|
"""
|
|
143
|
-
|
|
149
|
+
The `Tag` resource can be used to create and manage tags, which allow
|
|
150
|
+
you to attach metadata to objects in the vSphere inventory to make these
|
|
151
|
+
objects more sortable and searchable.
|
|
152
|
+
|
|
153
|
+
For more information about tags, click [here][ext-tags-general].
|
|
154
|
+
|
|
155
|
+
[ext-tags-general]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-tags-and-attributes.html
|
|
156
|
+
|
|
157
|
+
## Example Usage
|
|
158
|
+
|
|
159
|
+
This example creates a tag named `test-tag`. This tag is assigned the
|
|
160
|
+
`test-category` category, which was created by the
|
|
161
|
+
`TagCategory` resource. The resulting
|
|
162
|
+
tag can be assigned to VMs and datastores only, and can be the only value in
|
|
163
|
+
the category that can be assigned, as per the restrictions defined by the
|
|
164
|
+
category.
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
import pulumi
|
|
168
|
+
import pulumi_vsphere as vsphere
|
|
169
|
+
|
|
170
|
+
category = vsphere.TagCategory("category",
|
|
171
|
+
name="test-category",
|
|
172
|
+
cardinality="SINGLE",
|
|
173
|
+
description="Managed by Pulumi",
|
|
174
|
+
associable_types=[
|
|
175
|
+
"VirtualMachine",
|
|
176
|
+
"Datastore",
|
|
177
|
+
])
|
|
178
|
+
tag = vsphere.Tag("tag",
|
|
179
|
+
name="test-tag",
|
|
180
|
+
category_id=category.id,
|
|
181
|
+
description="Managed by Pulumi")
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Using Tags in a Supported Resource
|
|
185
|
+
|
|
186
|
+
Tags can be applied to vSphere resources via the `tags` argument
|
|
187
|
+
in any supported resource.
|
|
188
|
+
|
|
189
|
+
The following example builds on the above example by creating a
|
|
190
|
+
`VirtualMachine` and applying the
|
|
191
|
+
created tag to it:
|
|
192
|
+
|
|
193
|
+
```python
|
|
194
|
+
import pulumi
|
|
195
|
+
import pulumi_vsphere as vsphere
|
|
196
|
+
|
|
197
|
+
category = vsphere.TagCategory("category",
|
|
198
|
+
name="test-category",
|
|
199
|
+
cardinality="SINGLE",
|
|
200
|
+
description="Managed by Pulumi",
|
|
201
|
+
associable_types=[
|
|
202
|
+
"VirtualMachine",
|
|
203
|
+
"Datastore",
|
|
204
|
+
])
|
|
205
|
+
tag = vsphere.Tag("tag",
|
|
206
|
+
name="test-tag",
|
|
207
|
+
category_id=category.id,
|
|
208
|
+
description="Managed by Pulumi")
|
|
209
|
+
web = vsphere.VirtualMachine("web", tags=[tag.id])
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Import
|
|
213
|
+
|
|
214
|
+
An existing tag can be imported into this resource by supplying
|
|
215
|
+
|
|
216
|
+
both the tag's category name and the name of the tag as a JSON string to
|
|
217
|
+
|
|
218
|
+
`pulumi import`, as per the example below:
|
|
219
|
+
|
|
220
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
221
|
+
|
|
222
|
+
```sh
|
|
223
|
+
$ pulumi import vsphere:index/tag:Tag tag \\
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
'{"category_name": "pulumi-test-category", "tag_name": "pulumi-test-tag"}'
|
|
227
|
+
|
|
144
228
|
:param str resource_name: The name of the resource.
|
|
145
229
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
146
|
-
:param pulumi.Input[str] category_id: The unique identifier of the parent category in
|
|
230
|
+
:param pulumi.Input[_builtins.str] category_id: The unique identifier of the parent category in
|
|
147
231
|
which this tag will be created. Forces a new resource if changed.
|
|
148
|
-
:param pulumi.Input[str] description: A description for the tag.
|
|
149
|
-
:param pulumi.Input[str] name: The display name of the tag. The name must be unique
|
|
232
|
+
:param pulumi.Input[_builtins.str] description: A description for the tag.
|
|
233
|
+
:param pulumi.Input[_builtins.str] name: The display name of the tag. The name must be unique
|
|
150
234
|
within its category.
|
|
151
235
|
"""
|
|
152
236
|
...
|
|
@@ -156,7 +240,85 @@ class Tag(pulumi.CustomResource):
|
|
|
156
240
|
args: TagArgs,
|
|
157
241
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
158
242
|
"""
|
|
159
|
-
|
|
243
|
+
The `Tag` resource can be used to create and manage tags, which allow
|
|
244
|
+
you to attach metadata to objects in the vSphere inventory to make these
|
|
245
|
+
objects more sortable and searchable.
|
|
246
|
+
|
|
247
|
+
For more information about tags, click [here][ext-tags-general].
|
|
248
|
+
|
|
249
|
+
[ext-tags-general]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-tags-and-attributes.html
|
|
250
|
+
|
|
251
|
+
## Example Usage
|
|
252
|
+
|
|
253
|
+
This example creates a tag named `test-tag`. This tag is assigned the
|
|
254
|
+
`test-category` category, which was created by the
|
|
255
|
+
`TagCategory` resource. The resulting
|
|
256
|
+
tag can be assigned to VMs and datastores only, and can be the only value in
|
|
257
|
+
the category that can be assigned, as per the restrictions defined by the
|
|
258
|
+
category.
|
|
259
|
+
|
|
260
|
+
```python
|
|
261
|
+
import pulumi
|
|
262
|
+
import pulumi_vsphere as vsphere
|
|
263
|
+
|
|
264
|
+
category = vsphere.TagCategory("category",
|
|
265
|
+
name="test-category",
|
|
266
|
+
cardinality="SINGLE",
|
|
267
|
+
description="Managed by Pulumi",
|
|
268
|
+
associable_types=[
|
|
269
|
+
"VirtualMachine",
|
|
270
|
+
"Datastore",
|
|
271
|
+
])
|
|
272
|
+
tag = vsphere.Tag("tag",
|
|
273
|
+
name="test-tag",
|
|
274
|
+
category_id=category.id,
|
|
275
|
+
description="Managed by Pulumi")
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Using Tags in a Supported Resource
|
|
279
|
+
|
|
280
|
+
Tags can be applied to vSphere resources via the `tags` argument
|
|
281
|
+
in any supported resource.
|
|
282
|
+
|
|
283
|
+
The following example builds on the above example by creating a
|
|
284
|
+
`VirtualMachine` and applying the
|
|
285
|
+
created tag to it:
|
|
286
|
+
|
|
287
|
+
```python
|
|
288
|
+
import pulumi
|
|
289
|
+
import pulumi_vsphere as vsphere
|
|
290
|
+
|
|
291
|
+
category = vsphere.TagCategory("category",
|
|
292
|
+
name="test-category",
|
|
293
|
+
cardinality="SINGLE",
|
|
294
|
+
description="Managed by Pulumi",
|
|
295
|
+
associable_types=[
|
|
296
|
+
"VirtualMachine",
|
|
297
|
+
"Datastore",
|
|
298
|
+
])
|
|
299
|
+
tag = vsphere.Tag("tag",
|
|
300
|
+
name="test-tag",
|
|
301
|
+
category_id=category.id,
|
|
302
|
+
description="Managed by Pulumi")
|
|
303
|
+
web = vsphere.VirtualMachine("web", tags=[tag.id])
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
## Import
|
|
307
|
+
|
|
308
|
+
An existing tag can be imported into this resource by supplying
|
|
309
|
+
|
|
310
|
+
both the tag's category name and the name of the tag as a JSON string to
|
|
311
|
+
|
|
312
|
+
`pulumi import`, as per the example below:
|
|
313
|
+
|
|
314
|
+
[docs-import]: https://developer.hashicorp.com/terraform/cli/import
|
|
315
|
+
|
|
316
|
+
```sh
|
|
317
|
+
$ pulumi import vsphere:index/tag:Tag tag \\
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
'{"category_name": "pulumi-test-category", "tag_name": "pulumi-test-tag"}'
|
|
321
|
+
|
|
160
322
|
:param str resource_name: The name of the resource.
|
|
161
323
|
:param TagArgs args: The arguments to use to populate this resource's properties.
|
|
162
324
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -172,9 +334,9 @@ class Tag(pulumi.CustomResource):
|
|
|
172
334
|
def _internal_init(__self__,
|
|
173
335
|
resource_name: str,
|
|
174
336
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
175
|
-
category_id: Optional[pulumi.Input[str]] = None,
|
|
176
|
-
description: Optional[pulumi.Input[str]] = None,
|
|
177
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
337
|
+
category_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
338
|
+
description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
339
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
178
340
|
__props__=None):
|
|
179
341
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
180
342
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -199,9 +361,9 @@ class Tag(pulumi.CustomResource):
|
|
|
199
361
|
def get(resource_name: str,
|
|
200
362
|
id: pulumi.Input[str],
|
|
201
363
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
202
|
-
category_id: Optional[pulumi.Input[str]] = None,
|
|
203
|
-
description: Optional[pulumi.Input[str]] = None,
|
|
204
|
-
name: Optional[pulumi.Input[str]] = None) -> 'Tag':
|
|
364
|
+
category_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
365
|
+
description: Optional[pulumi.Input[_builtins.str]] = None,
|
|
366
|
+
name: Optional[pulumi.Input[_builtins.str]] = None) -> 'Tag':
|
|
205
367
|
"""
|
|
206
368
|
Get an existing Tag resource's state with the given name, id, and optional extra
|
|
207
369
|
properties used to qualify the lookup.
|
|
@@ -209,10 +371,10 @@ class Tag(pulumi.CustomResource):
|
|
|
209
371
|
:param str resource_name: The unique name of the resulting resource.
|
|
210
372
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
211
373
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
212
|
-
:param pulumi.Input[str] category_id: The unique identifier of the parent category in
|
|
374
|
+
:param pulumi.Input[_builtins.str] category_id: The unique identifier of the parent category in
|
|
213
375
|
which this tag will be created. Forces a new resource if changed.
|
|
214
|
-
:param pulumi.Input[str] description: A description for the tag.
|
|
215
|
-
:param pulumi.Input[str] name: The display name of the tag. The name must be unique
|
|
376
|
+
:param pulumi.Input[_builtins.str] description: A description for the tag.
|
|
377
|
+
:param pulumi.Input[_builtins.str] name: The display name of the tag. The name must be unique
|
|
216
378
|
within its category.
|
|
217
379
|
"""
|
|
218
380
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
@@ -224,26 +386,26 @@ class Tag(pulumi.CustomResource):
|
|
|
224
386
|
__props__.__dict__["name"] = name
|
|
225
387
|
return Tag(resource_name, opts=opts, __props__=__props__)
|
|
226
388
|
|
|
227
|
-
@property
|
|
389
|
+
@_builtins.property
|
|
228
390
|
@pulumi.getter(name="categoryId")
|
|
229
|
-
def category_id(self) -> pulumi.Output[str]:
|
|
391
|
+
def category_id(self) -> pulumi.Output[_builtins.str]:
|
|
230
392
|
"""
|
|
231
393
|
The unique identifier of the parent category in
|
|
232
394
|
which this tag will be created. Forces a new resource if changed.
|
|
233
395
|
"""
|
|
234
396
|
return pulumi.get(self, "category_id")
|
|
235
397
|
|
|
236
|
-
@property
|
|
398
|
+
@_builtins.property
|
|
237
399
|
@pulumi.getter
|
|
238
|
-
def description(self) -> pulumi.Output[Optional[str]]:
|
|
400
|
+
def description(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
239
401
|
"""
|
|
240
402
|
A description for the tag.
|
|
241
403
|
"""
|
|
242
404
|
return pulumi.get(self, "description")
|
|
243
405
|
|
|
244
|
-
@property
|
|
406
|
+
@_builtins.property
|
|
245
407
|
@pulumi.getter
|
|
246
|
-
def name(self) -> pulumi.Output[str]:
|
|
408
|
+
def name(self) -> pulumi.Output[_builtins.str]:
|
|
247
409
|
"""
|
|
248
410
|
The display name of the tag. The name must be unique
|
|
249
411
|
within its category.
|