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.

Files changed (89) hide show
  1. pulumi_vsphere/__init__.py +51 -1
  2. pulumi_vsphere/_inputs.py +2568 -1025
  3. pulumi_vsphere/_utilities.py +50 -10
  4. pulumi_vsphere/compute_cluster.py +1564 -2373
  5. pulumi_vsphere/compute_cluster_host_group.py +191 -55
  6. pulumi_vsphere/compute_cluster_vm_affinity_rule.py +157 -113
  7. pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +133 -89
  8. pulumi_vsphere/compute_cluster_vm_dependency_rule.py +314 -106
  9. pulumi_vsphere/compute_cluster_vm_group.py +256 -55
  10. pulumi_vsphere/compute_cluster_vm_host_rule.py +323 -123
  11. pulumi_vsphere/config/__init__.py +2 -1
  12. pulumi_vsphere/config/__init__.pyi +7 -2
  13. pulumi_vsphere/config/vars.py +20 -15
  14. pulumi_vsphere/configuration_profile.py +286 -0
  15. pulumi_vsphere/content_library.py +177 -71
  16. pulumi_vsphere/content_library_item.py +252 -106
  17. pulumi_vsphere/custom_attribute.py +118 -38
  18. pulumi_vsphere/datacenter.py +128 -107
  19. pulumi_vsphere/datastore_cluster.py +636 -731
  20. pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +251 -89
  21. pulumi_vsphere/distributed_port_group.py +1129 -967
  22. pulumi_vsphere/distributed_virtual_switch.py +1971 -2239
  23. pulumi_vsphere/distributed_virtual_switch_pvlan_mapping.py +294 -0
  24. pulumi_vsphere/dpm_host_override.py +222 -72
  25. pulumi_vsphere/drs_vm_override.py +236 -72
  26. pulumi_vsphere/entity_permissions.py +96 -69
  27. pulumi_vsphere/file.py +173 -178
  28. pulumi_vsphere/folder.py +236 -113
  29. pulumi_vsphere/get_compute_cluster.py +34 -23
  30. pulumi_vsphere/get_compute_cluster_host_group.py +52 -41
  31. pulumi_vsphere/get_configuration_profile.py +145 -0
  32. pulumi_vsphere/get_content_library.py +33 -21
  33. pulumi_vsphere/get_content_library_item.py +47 -31
  34. pulumi_vsphere/get_custom_attribute.py +26 -17
  35. pulumi_vsphere/get_datacenter.py +40 -18
  36. pulumi_vsphere/get_datastore.py +60 -24
  37. pulumi_vsphere/get_datastore_cluster.py +47 -22
  38. pulumi_vsphere/get_datastore_stats.py +204 -0
  39. pulumi_vsphere/get_distributed_virtual_switch.py +36 -23
  40. pulumi_vsphere/get_dynamic.py +55 -45
  41. pulumi_vsphere/get_folder.py +163 -25
  42. pulumi_vsphere/get_guest_os_customization.py +68 -37
  43. pulumi_vsphere/get_host.py +34 -23
  44. pulumi_vsphere/get_host_base_images.py +104 -0
  45. pulumi_vsphere/get_host_pci_device.py +78 -35
  46. pulumi_vsphere/get_host_thumbprint.py +58 -38
  47. pulumi_vsphere/get_host_vgpu_profile.py +195 -0
  48. pulumi_vsphere/get_license.py +44 -28
  49. pulumi_vsphere/get_network.py +157 -46
  50. pulumi_vsphere/get_ovf_vm_template.py +184 -301
  51. pulumi_vsphere/get_policy.py +23 -15
  52. pulumi_vsphere/get_resource_pool.py +107 -40
  53. pulumi_vsphere/get_role.py +49 -35
  54. pulumi_vsphere/get_tag.py +34 -23
  55. pulumi_vsphere/get_tag_category.py +32 -21
  56. pulumi_vsphere/get_vapp_container.py +31 -21
  57. pulumi_vsphere/get_virtual_machine.py +499 -287
  58. pulumi_vsphere/get_vmfs_disks.py +42 -29
  59. pulumi_vsphere/guest_os_customization.py +135 -79
  60. pulumi_vsphere/ha_vm_override.py +470 -577
  61. pulumi_vsphere/host.py +515 -262
  62. pulumi_vsphere/host_port_group.py +352 -355
  63. pulumi_vsphere/host_virtual_switch.py +580 -580
  64. pulumi_vsphere/license.py +110 -92
  65. pulumi_vsphere/nas_datastore.py +398 -270
  66. pulumi_vsphere/offline_software_depot.py +190 -0
  67. pulumi_vsphere/outputs.py +1582 -1027
  68. pulumi_vsphere/provider.py +172 -152
  69. pulumi_vsphere/pulumi-plugin.json +2 -1
  70. pulumi_vsphere/resource_pool.py +357 -273
  71. pulumi_vsphere/role.py +79 -47
  72. pulumi_vsphere/storage_drs_vm_override.py +225 -89
  73. pulumi_vsphere/supervisor.py +1064 -0
  74. pulumi_vsphere/tag.py +217 -55
  75. pulumi_vsphere/tag_category.py +158 -72
  76. pulumi_vsphere/vapp_container.py +425 -259
  77. pulumi_vsphere/vapp_entity.py +324 -174
  78. pulumi_vsphere/virtual_disk.py +245 -153
  79. pulumi_vsphere/virtual_machine.py +1696 -1836
  80. pulumi_vsphere/virtual_machine_class.py +448 -0
  81. pulumi_vsphere/virtual_machine_snapshot.py +137 -131
  82. pulumi_vsphere/vm_storage_policy.py +160 -154
  83. pulumi_vsphere/vmfs_datastore.py +460 -186
  84. pulumi_vsphere/vnic.py +249 -231
  85. {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/METADATA +7 -6
  86. pulumi_vsphere-4.17.0a1763710194.dist-info/RECORD +89 -0
  87. {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/WHEEL +1 -1
  88. pulumi_vsphere-4.10.0a1709017641.dist-info/RECORD +0 -80
  89. {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/top_level.txt +0 -0
pulumi_vsphere/folder.py CHANGED
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
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 copy
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__ = ['FolderArgs', 'Folder']
@@ -14,14 +19,14 @@ __all__ = ['FolderArgs', 'Folder']
14
19
  @pulumi.input_type
15
20
  class FolderArgs:
16
21
  def __init__(__self__, *,
17
- path: pulumi.Input[str],
18
- type: pulumi.Input[str],
19
- custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
20
- datacenter_id: Optional[pulumi.Input[str]] = None,
21
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
22
+ path: pulumi.Input[_builtins.str],
23
+ type: pulumi.Input[_builtins.str],
24
+ custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
25
+ datacenter_id: Optional[pulumi.Input[_builtins.str]] = None,
26
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None):
22
27
  """
23
28
  The set of arguments for constructing a Folder resource.
24
- :param pulumi.Input[str] path: The path of the folder to be created. This is relative to
29
+ :param pulumi.Input[_builtins.str] path: The path of the folder to be created. This is relative to
25
30
  the root of the type of folder you are creating, and the supplied datacenter.
26
31
  For example, given a default datacenter of `default-dc`, a folder of type
27
32
  `vm` (denoting a virtual machine folder), and a supplied folder of
@@ -32,11 +37,11 @@ class FolderArgs:
32
37
  what section of `path` you are modifying. If you are modifying the parent (so
33
38
  any part before the last `/`), your folder will be moved to that new parent. If
34
39
  modifying the name (the part after the last `/`), your folder will be renamed.
35
- :param pulumi.Input[str] type: The type of folder to create. Allowed options are
40
+ :param pulumi.Input[_builtins.str] type: The type of folder to create. Allowed options are
36
41
  `datacenter` for datacenter folders, `host` for host and cluster folders,
37
42
  `vm` for virtual machine folders, `datastore` for datastore folders, and
38
43
  `network` for network folders. Forces a new resource if changed.
39
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
44
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] custom_attributes: Map of custom attribute ids to attribute
40
45
  value strings to set for folder. See [here][docs-setting-custom-attributes]
41
46
  for a reference on how to set values for custom attributes.
42
47
 
@@ -44,13 +49,10 @@ class FolderArgs:
44
49
 
45
50
  > **NOTE:** Custom attributes are unsupported on direct ESXi connections
46
51
  and require vCenter.
47
- :param pulumi.Input[str] datacenter_id: The ID of the datacenter the folder will be created in.
52
+ :param pulumi.Input[_builtins.str] datacenter_id: The ID of the datacenter the folder will be created in.
48
53
  Required for all folder types except for datacenter folders. Forces a new
49
54
  resource if changed.
50
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
51
-
52
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
53
- requires vCenter 6.0 or higher.
55
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The IDs of any tags to attach to this resource.
54
56
  """
55
57
  pulumi.set(__self__, "path", path)
56
58
  pulumi.set(__self__, "type", type)
@@ -61,9 +63,9 @@ class FolderArgs:
61
63
  if tags is not None:
62
64
  pulumi.set(__self__, "tags", tags)
63
65
 
64
- @property
66
+ @_builtins.property
65
67
  @pulumi.getter
66
- def path(self) -> pulumi.Input[str]:
68
+ def path(self) -> pulumi.Input[_builtins.str]:
67
69
  """
68
70
  The path of the folder to be created. This is relative to
69
71
  the root of the type of folder you are creating, and the supplied datacenter.
@@ -80,12 +82,12 @@ class FolderArgs:
80
82
  return pulumi.get(self, "path")
81
83
 
82
84
  @path.setter
83
- def path(self, value: pulumi.Input[str]):
85
+ def path(self, value: pulumi.Input[_builtins.str]):
84
86
  pulumi.set(self, "path", value)
85
87
 
86
- @property
88
+ @_builtins.property
87
89
  @pulumi.getter
88
- def type(self) -> pulumi.Input[str]:
90
+ def type(self) -> pulumi.Input[_builtins.str]:
89
91
  """
90
92
  The type of folder to create. Allowed options are
91
93
  `datacenter` for datacenter folders, `host` for host and cluster folders,
@@ -95,14 +97,14 @@ class FolderArgs:
95
97
  return pulumi.get(self, "type")
96
98
 
97
99
  @type.setter
98
- def type(self, value: pulumi.Input[str]):
100
+ def type(self, value: pulumi.Input[_builtins.str]):
99
101
  pulumi.set(self, "type", value)
100
102
 
101
- @property
103
+ @_builtins.property
102
104
  @pulumi.getter(name="customAttributes")
103
- def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
105
+ def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
104
106
  """
105
- Map of custom attribute ids to attribute
107
+ Map of custom attribute ids to attribute
106
108
  value strings to set for folder. See [here][docs-setting-custom-attributes]
107
109
  for a reference on how to set values for custom attributes.
108
110
 
@@ -114,12 +116,12 @@ class FolderArgs:
114
116
  return pulumi.get(self, "custom_attributes")
115
117
 
116
118
  @custom_attributes.setter
117
- def custom_attributes(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
119
+ def custom_attributes(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
118
120
  pulumi.set(self, "custom_attributes", value)
119
121
 
120
- @property
122
+ @_builtins.property
121
123
  @pulumi.getter(name="datacenterId")
122
- def datacenter_id(self) -> Optional[pulumi.Input[str]]:
124
+ def datacenter_id(self) -> Optional[pulumi.Input[_builtins.str]]:
123
125
  """
124
126
  The ID of the datacenter the folder will be created in.
125
127
  Required for all folder types except for datacenter folders. Forces a new
@@ -128,36 +130,33 @@ class FolderArgs:
128
130
  return pulumi.get(self, "datacenter_id")
129
131
 
130
132
  @datacenter_id.setter
131
- def datacenter_id(self, value: Optional[pulumi.Input[str]]):
133
+ def datacenter_id(self, value: Optional[pulumi.Input[_builtins.str]]):
132
134
  pulumi.set(self, "datacenter_id", value)
133
135
 
134
- @property
136
+ @_builtins.property
135
137
  @pulumi.getter
136
- def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
138
+ def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
137
139
  """
138
140
  The IDs of any tags to attach to this resource.
139
-
140
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
141
- requires vCenter 6.0 or higher.
142
141
  """
143
142
  return pulumi.get(self, "tags")
144
143
 
145
144
  @tags.setter
146
- def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
145
+ def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
147
146
  pulumi.set(self, "tags", value)
148
147
 
149
148
 
150
149
  @pulumi.input_type
151
150
  class _FolderState:
152
151
  def __init__(__self__, *,
153
- custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
154
- datacenter_id: Optional[pulumi.Input[str]] = None,
155
- path: Optional[pulumi.Input[str]] = None,
156
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
157
- type: Optional[pulumi.Input[str]] = None):
152
+ custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
153
+ datacenter_id: Optional[pulumi.Input[_builtins.str]] = None,
154
+ path: Optional[pulumi.Input[_builtins.str]] = None,
155
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
156
+ type: Optional[pulumi.Input[_builtins.str]] = None):
158
157
  """
159
158
  Input properties used for looking up and filtering Folder resources.
160
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
159
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] custom_attributes: Map of custom attribute ids to attribute
161
160
  value strings to set for folder. See [here][docs-setting-custom-attributes]
162
161
  for a reference on how to set values for custom attributes.
163
162
 
@@ -165,10 +164,10 @@ class _FolderState:
165
164
 
166
165
  > **NOTE:** Custom attributes are unsupported on direct ESXi connections
167
166
  and require vCenter.
168
- :param pulumi.Input[str] datacenter_id: The ID of the datacenter the folder will be created in.
167
+ :param pulumi.Input[_builtins.str] datacenter_id: The ID of the datacenter the folder will be created in.
169
168
  Required for all folder types except for datacenter folders. Forces a new
170
169
  resource if changed.
171
- :param pulumi.Input[str] path: The path of the folder to be created. This is relative to
170
+ :param pulumi.Input[_builtins.str] path: The path of the folder to be created. This is relative to
172
171
  the root of the type of folder you are creating, and the supplied datacenter.
173
172
  For example, given a default datacenter of `default-dc`, a folder of type
174
173
  `vm` (denoting a virtual machine folder), and a supplied folder of
@@ -179,11 +178,8 @@ class _FolderState:
179
178
  what section of `path` you are modifying. If you are modifying the parent (so
180
179
  any part before the last `/`), your folder will be moved to that new parent. If
181
180
  modifying the name (the part after the last `/`), your folder will be renamed.
182
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
183
-
184
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
185
- requires vCenter 6.0 or higher.
186
- :param pulumi.Input[str] type: The type of folder to create. Allowed options are
181
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The IDs of any tags to attach to this resource.
182
+ :param pulumi.Input[_builtins.str] type: The type of folder to create. Allowed options are
187
183
  `datacenter` for datacenter folders, `host` for host and cluster folders,
188
184
  `vm` for virtual machine folders, `datastore` for datastore folders, and
189
185
  `network` for network folders. Forces a new resource if changed.
@@ -199,11 +195,11 @@ class _FolderState:
199
195
  if type is not None:
200
196
  pulumi.set(__self__, "type", type)
201
197
 
202
- @property
198
+ @_builtins.property
203
199
  @pulumi.getter(name="customAttributes")
204
- def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
200
+ def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
205
201
  """
206
- Map of custom attribute ids to attribute
202
+ Map of custom attribute ids to attribute
207
203
  value strings to set for folder. See [here][docs-setting-custom-attributes]
208
204
  for a reference on how to set values for custom attributes.
209
205
 
@@ -215,12 +211,12 @@ class _FolderState:
215
211
  return pulumi.get(self, "custom_attributes")
216
212
 
217
213
  @custom_attributes.setter
218
- def custom_attributes(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
214
+ def custom_attributes(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
219
215
  pulumi.set(self, "custom_attributes", value)
220
216
 
221
- @property
217
+ @_builtins.property
222
218
  @pulumi.getter(name="datacenterId")
223
- def datacenter_id(self) -> Optional[pulumi.Input[str]]:
219
+ def datacenter_id(self) -> Optional[pulumi.Input[_builtins.str]]:
224
220
  """
225
221
  The ID of the datacenter the folder will be created in.
226
222
  Required for all folder types except for datacenter folders. Forces a new
@@ -229,12 +225,12 @@ class _FolderState:
229
225
  return pulumi.get(self, "datacenter_id")
230
226
 
231
227
  @datacenter_id.setter
232
- def datacenter_id(self, value: Optional[pulumi.Input[str]]):
228
+ def datacenter_id(self, value: Optional[pulumi.Input[_builtins.str]]):
233
229
  pulumi.set(self, "datacenter_id", value)
234
230
 
235
- @property
231
+ @_builtins.property
236
232
  @pulumi.getter
237
- def path(self) -> Optional[pulumi.Input[str]]:
233
+ def path(self) -> Optional[pulumi.Input[_builtins.str]]:
238
234
  """
239
235
  The path of the folder to be created. This is relative to
240
236
  the root of the type of folder you are creating, and the supplied datacenter.
@@ -251,27 +247,24 @@ class _FolderState:
251
247
  return pulumi.get(self, "path")
252
248
 
253
249
  @path.setter
254
- def path(self, value: Optional[pulumi.Input[str]]):
250
+ def path(self, value: Optional[pulumi.Input[_builtins.str]]):
255
251
  pulumi.set(self, "path", value)
256
252
 
257
- @property
253
+ @_builtins.property
258
254
  @pulumi.getter
259
- def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
255
+ def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
260
256
  """
261
257
  The IDs of any tags to attach to this resource.
262
-
263
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
264
- requires vCenter 6.0 or higher.
265
258
  """
266
259
  return pulumi.get(self, "tags")
267
260
 
268
261
  @tags.setter
269
- def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
262
+ def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
270
263
  pulumi.set(self, "tags", value)
271
264
 
272
- @property
265
+ @_builtins.property
273
266
  @pulumi.getter
274
- def type(self) -> Optional[pulumi.Input[str]]:
267
+ def type(self) -> Optional[pulumi.Input[_builtins.str]]:
275
268
  """
276
269
  The type of folder to create. Allowed options are
277
270
  `datacenter` for datacenter folders, `host` for host and cluster folders,
@@ -281,26 +274,96 @@ class _FolderState:
281
274
  return pulumi.get(self, "type")
282
275
 
283
276
  @type.setter
284
- def type(self, value: Optional[pulumi.Input[str]]):
277
+ def type(self, value: Optional[pulumi.Input[_builtins.str]]):
285
278
  pulumi.set(self, "type", value)
286
279
 
287
280
 
281
+ @pulumi.type_token("vsphere:index/folder:Folder")
288
282
  class Folder(pulumi.CustomResource):
289
283
  @overload
290
284
  def __init__(__self__,
291
285
  resource_name: str,
292
286
  opts: Optional[pulumi.ResourceOptions] = None,
293
- custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
294
- datacenter_id: Optional[pulumi.Input[str]] = None,
295
- path: Optional[pulumi.Input[str]] = None,
296
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
297
- type: Optional[pulumi.Input[str]] = None,
287
+ custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
288
+ datacenter_id: Optional[pulumi.Input[_builtins.str]] = None,
289
+ path: Optional[pulumi.Input[_builtins.str]] = None,
290
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
291
+ type: Optional[pulumi.Input[_builtins.str]] = None,
298
292
  __props__=None):
299
293
  """
300
- Create a Folder resource with the given unique name, props, and options.
294
+ The `Folder` resource can be used to manage vSphere inventory folders.
295
+ The resource supports creating folders of the 5 major types - datacenter
296
+ folders, host and cluster folders, virtual machine folders, storage folders,
297
+ and network folders.
298
+
299
+ Paths are always relative to the specific type of folder you are creating.
300
+ A subfolder is discovered by parsing the relative path specified in `path`, so
301
+ `foo/bar` will create a folder named `bar` in the parent folder `foo`, as long
302
+ as the folder `foo` exists.
303
+
304
+ ## Example Usage
305
+
306
+ The basic example below creates a virtual machine folder named
307
+ `test-folder` in the default datacenter's VM hierarchy.
308
+
309
+ ```python
310
+ import pulumi
311
+ import pulumi_vsphere as vsphere
312
+
313
+ datacenter = vsphere.get_datacenter(name=vsphere_datacenter)
314
+ folder = vsphere.Folder("folder",
315
+ path="test-folder",
316
+ type="vm",
317
+ datacenter_id=datacenter.id)
318
+ ```
319
+
320
+ ### Example with Sub-folders
321
+
322
+ The below example builds off of the above by first creating a folder named
323
+ `test-parent`, and then locating `test-folder` in that
324
+ folder. To ensure the parent is created first, we create an interpolation
325
+ dependency off the parent's `path` attribute.
326
+
327
+ Note that if you change parents (for example, went from the above basic
328
+ configuration to this one), your folder will be moved to be under the correct
329
+ parent.
330
+
331
+ ```python
332
+ import pulumi
333
+ import pulumi_vsphere as vsphere
334
+
335
+ datacenter = vsphere.get_datacenter(name=vsphere_datacenter)
336
+ parent = vsphere.Folder("parent",
337
+ path="test-parent",
338
+ type="vm",
339
+ datacenter_id=datacenter.id)
340
+ folder = vsphere.Folder("folder",
341
+ path=parent.path.apply(lambda path: f"{path}/test-folder"),
342
+ type="vm",
343
+ datacenter_id=datacenter.id)
344
+ ```
345
+
346
+ ## Import
347
+
348
+ An existing folder can be imported into this resource via
349
+
350
+ its full path, via the following command:
351
+
352
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
353
+
354
+ ```sh
355
+ $ pulumi import vsphere:index/folder:Folder folder /default-dc/vm/example-vm-folder
356
+ ```
357
+
358
+ The above command would import the folder from our examples above, the VM
359
+
360
+ folder named `example-vm-folder` located in the datacenter named
361
+
362
+ `default-dc`.
363
+
301
364
  :param str resource_name: The name of the resource.
302
365
  :param pulumi.ResourceOptions opts: Options for the resource.
303
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
366
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] custom_attributes: Map of custom attribute ids to attribute
304
367
  value strings to set for folder. See [here][docs-setting-custom-attributes]
305
368
  for a reference on how to set values for custom attributes.
306
369
 
@@ -308,10 +371,10 @@ class Folder(pulumi.CustomResource):
308
371
 
309
372
  > **NOTE:** Custom attributes are unsupported on direct ESXi connections
310
373
  and require vCenter.
311
- :param pulumi.Input[str] datacenter_id: The ID of the datacenter the folder will be created in.
374
+ :param pulumi.Input[_builtins.str] datacenter_id: The ID of the datacenter the folder will be created in.
312
375
  Required for all folder types except for datacenter folders. Forces a new
313
376
  resource if changed.
314
- :param pulumi.Input[str] path: The path of the folder to be created. This is relative to
377
+ :param pulumi.Input[_builtins.str] path: The path of the folder to be created. This is relative to
315
378
  the root of the type of folder you are creating, and the supplied datacenter.
316
379
  For example, given a default datacenter of `default-dc`, a folder of type
317
380
  `vm` (denoting a virtual machine folder), and a supplied folder of
@@ -322,11 +385,8 @@ class Folder(pulumi.CustomResource):
322
385
  what section of `path` you are modifying. If you are modifying the parent (so
323
386
  any part before the last `/`), your folder will be moved to that new parent. If
324
387
  modifying the name (the part after the last `/`), your folder will be renamed.
325
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
326
-
327
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
328
- requires vCenter 6.0 or higher.
329
- :param pulumi.Input[str] type: The type of folder to create. Allowed options are
388
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The IDs of any tags to attach to this resource.
389
+ :param pulumi.Input[_builtins.str] type: The type of folder to create. Allowed options are
330
390
  `datacenter` for datacenter folders, `host` for host and cluster folders,
331
391
  `vm` for virtual machine folders, `datastore` for datastore folders, and
332
392
  `network` for network folders. Forces a new resource if changed.
@@ -338,7 +398,76 @@ class Folder(pulumi.CustomResource):
338
398
  args: FolderArgs,
339
399
  opts: Optional[pulumi.ResourceOptions] = None):
340
400
  """
341
- Create a Folder resource with the given unique name, props, and options.
401
+ The `Folder` resource can be used to manage vSphere inventory folders.
402
+ The resource supports creating folders of the 5 major types - datacenter
403
+ folders, host and cluster folders, virtual machine folders, storage folders,
404
+ and network folders.
405
+
406
+ Paths are always relative to the specific type of folder you are creating.
407
+ A subfolder is discovered by parsing the relative path specified in `path`, so
408
+ `foo/bar` will create a folder named `bar` in the parent folder `foo`, as long
409
+ as the folder `foo` exists.
410
+
411
+ ## Example Usage
412
+
413
+ The basic example below creates a virtual machine folder named
414
+ `test-folder` in the default datacenter's VM hierarchy.
415
+
416
+ ```python
417
+ import pulumi
418
+ import pulumi_vsphere as vsphere
419
+
420
+ datacenter = vsphere.get_datacenter(name=vsphere_datacenter)
421
+ folder = vsphere.Folder("folder",
422
+ path="test-folder",
423
+ type="vm",
424
+ datacenter_id=datacenter.id)
425
+ ```
426
+
427
+ ### Example with Sub-folders
428
+
429
+ The below example builds off of the above by first creating a folder named
430
+ `test-parent`, and then locating `test-folder` in that
431
+ folder. To ensure the parent is created first, we create an interpolation
432
+ dependency off the parent's `path` attribute.
433
+
434
+ Note that if you change parents (for example, went from the above basic
435
+ configuration to this one), your folder will be moved to be under the correct
436
+ parent.
437
+
438
+ ```python
439
+ import pulumi
440
+ import pulumi_vsphere as vsphere
441
+
442
+ datacenter = vsphere.get_datacenter(name=vsphere_datacenter)
443
+ parent = vsphere.Folder("parent",
444
+ path="test-parent",
445
+ type="vm",
446
+ datacenter_id=datacenter.id)
447
+ folder = vsphere.Folder("folder",
448
+ path=parent.path.apply(lambda path: f"{path}/test-folder"),
449
+ type="vm",
450
+ datacenter_id=datacenter.id)
451
+ ```
452
+
453
+ ## Import
454
+
455
+ An existing folder can be imported into this resource via
456
+
457
+ its full path, via the following command:
458
+
459
+ [docs-import]: https://developer.hashicorp.com/terraform/cli/import
460
+
461
+ ```sh
462
+ $ pulumi import vsphere:index/folder:Folder folder /default-dc/vm/example-vm-folder
463
+ ```
464
+
465
+ The above command would import the folder from our examples above, the VM
466
+
467
+ folder named `example-vm-folder` located in the datacenter named
468
+
469
+ `default-dc`.
470
+
342
471
  :param str resource_name: The name of the resource.
343
472
  :param FolderArgs args: The arguments to use to populate this resource's properties.
344
473
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -354,11 +483,11 @@ class Folder(pulumi.CustomResource):
354
483
  def _internal_init(__self__,
355
484
  resource_name: str,
356
485
  opts: Optional[pulumi.ResourceOptions] = None,
357
- custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
358
- datacenter_id: Optional[pulumi.Input[str]] = None,
359
- path: Optional[pulumi.Input[str]] = None,
360
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
361
- type: Optional[pulumi.Input[str]] = None,
486
+ custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
487
+ datacenter_id: Optional[pulumi.Input[_builtins.str]] = None,
488
+ path: Optional[pulumi.Input[_builtins.str]] = None,
489
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
490
+ type: Optional[pulumi.Input[_builtins.str]] = None,
362
491
  __props__=None):
363
492
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
364
493
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -387,11 +516,11 @@ class Folder(pulumi.CustomResource):
387
516
  def get(resource_name: str,
388
517
  id: pulumi.Input[str],
389
518
  opts: Optional[pulumi.ResourceOptions] = None,
390
- custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
391
- datacenter_id: Optional[pulumi.Input[str]] = None,
392
- path: Optional[pulumi.Input[str]] = None,
393
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
394
- type: Optional[pulumi.Input[str]] = None) -> 'Folder':
519
+ custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
520
+ datacenter_id: Optional[pulumi.Input[_builtins.str]] = None,
521
+ path: Optional[pulumi.Input[_builtins.str]] = None,
522
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
523
+ type: Optional[pulumi.Input[_builtins.str]] = None) -> 'Folder':
395
524
  """
396
525
  Get an existing Folder resource's state with the given name, id, and optional extra
397
526
  properties used to qualify the lookup.
@@ -399,7 +528,7 @@ class Folder(pulumi.CustomResource):
399
528
  :param str resource_name: The unique name of the resulting resource.
400
529
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
401
530
  :param pulumi.ResourceOptions opts: Options for the resource.
402
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to attribute
531
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] custom_attributes: Map of custom attribute ids to attribute
403
532
  value strings to set for folder. See [here][docs-setting-custom-attributes]
404
533
  for a reference on how to set values for custom attributes.
405
534
 
@@ -407,10 +536,10 @@ class Folder(pulumi.CustomResource):
407
536
 
408
537
  > **NOTE:** Custom attributes are unsupported on direct ESXi connections
409
538
  and require vCenter.
410
- :param pulumi.Input[str] datacenter_id: The ID of the datacenter the folder will be created in.
539
+ :param pulumi.Input[_builtins.str] datacenter_id: The ID of the datacenter the folder will be created in.
411
540
  Required for all folder types except for datacenter folders. Forces a new
412
541
  resource if changed.
413
- :param pulumi.Input[str] path: The path of the folder to be created. This is relative to
542
+ :param pulumi.Input[_builtins.str] path: The path of the folder to be created. This is relative to
414
543
  the root of the type of folder you are creating, and the supplied datacenter.
415
544
  For example, given a default datacenter of `default-dc`, a folder of type
416
545
  `vm` (denoting a virtual machine folder), and a supplied folder of
@@ -421,11 +550,8 @@ class Folder(pulumi.CustomResource):
421
550
  what section of `path` you are modifying. If you are modifying the parent (so
422
551
  any part before the last `/`), your folder will be moved to that new parent. If
423
552
  modifying the name (the part after the last `/`), your folder will be renamed.
424
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
425
-
426
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
427
- requires vCenter 6.0 or higher.
428
- :param pulumi.Input[str] type: The type of folder to create. Allowed options are
553
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The IDs of any tags to attach to this resource.
554
+ :param pulumi.Input[_builtins.str] type: The type of folder to create. Allowed options are
429
555
  `datacenter` for datacenter folders, `host` for host and cluster folders,
430
556
  `vm` for virtual machine folders, `datastore` for datastore folders, and
431
557
  `network` for network folders. Forces a new resource if changed.
@@ -441,11 +567,11 @@ class Folder(pulumi.CustomResource):
441
567
  __props__.__dict__["type"] = type
442
568
  return Folder(resource_name, opts=opts, __props__=__props__)
443
569
 
444
- @property
570
+ @_builtins.property
445
571
  @pulumi.getter(name="customAttributes")
446
- def custom_attributes(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
572
+ def custom_attributes(self) -> pulumi.Output[Optional[Mapping[str, _builtins.str]]]:
447
573
  """
448
- Map of custom attribute ids to attribute
574
+ Map of custom attribute ids to attribute
449
575
  value strings to set for folder. See [here][docs-setting-custom-attributes]
450
576
  for a reference on how to set values for custom attributes.
451
577
 
@@ -456,9 +582,9 @@ class Folder(pulumi.CustomResource):
456
582
  """
457
583
  return pulumi.get(self, "custom_attributes")
458
584
 
459
- @property
585
+ @_builtins.property
460
586
  @pulumi.getter(name="datacenterId")
461
- def datacenter_id(self) -> pulumi.Output[Optional[str]]:
587
+ def datacenter_id(self) -> pulumi.Output[Optional[_builtins.str]]:
462
588
  """
463
589
  The ID of the datacenter the folder will be created in.
464
590
  Required for all folder types except for datacenter folders. Forces a new
@@ -466,9 +592,9 @@ class Folder(pulumi.CustomResource):
466
592
  """
467
593
  return pulumi.get(self, "datacenter_id")
468
594
 
469
- @property
595
+ @_builtins.property
470
596
  @pulumi.getter
471
- def path(self) -> pulumi.Output[str]:
597
+ def path(self) -> pulumi.Output[_builtins.str]:
472
598
  """
473
599
  The path of the folder to be created. This is relative to
474
600
  the root of the type of folder you are creating, and the supplied datacenter.
@@ -484,20 +610,17 @@ class Folder(pulumi.CustomResource):
484
610
  """
485
611
  return pulumi.get(self, "path")
486
612
 
487
- @property
613
+ @_builtins.property
488
614
  @pulumi.getter
489
- def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
615
+ def tags(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
490
616
  """
491
617
  The IDs of any tags to attach to this resource.
492
-
493
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
494
- requires vCenter 6.0 or higher.
495
618
  """
496
619
  return pulumi.get(self, "tags")
497
620
 
498
- @property
621
+ @_builtins.property
499
622
  @pulumi.getter
500
- def type(self) -> pulumi.Output[str]:
623
+ def type(self) -> pulumi.Output[_builtins.str]:
501
624
  """
502
625
  The type of folder to create. Allowed options are
503
626
  `datacenter` for datacenter folders, `host` for host and cluster folders,