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
@@ -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__ = ['DatacenterArgs', 'Datacenter']
@@ -14,13 +19,13 @@ __all__ = ['DatacenterArgs', 'Datacenter']
14
19
  @pulumi.input_type
15
20
  class DatacenterArgs:
16
21
  def __init__(__self__, *,
17
- custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
18
- folder: Optional[pulumi.Input[str]] = None,
19
- name: Optional[pulumi.Input[str]] = None,
20
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
22
+ custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
23
+ folder: Optional[pulumi.Input[_builtins.str]] = None,
24
+ name: Optional[pulumi.Input[_builtins.str]] = None,
25
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None):
21
26
  """
22
27
  The set of arguments for constructing a Datacenter resource.
23
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
28
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] custom_attributes: Map of custom attribute ids to value
24
29
  strings to set for datacenter resource. See
25
30
  [here][docs-setting-custom-attributes] for a reference on how to set values
26
31
  for custom attributes.
@@ -29,14 +34,11 @@ class DatacenterArgs:
29
34
 
30
35
  > **NOTE:** Custom attributes are unsupported on direct ESXi connections
31
36
  and require vCenter.
32
- :param pulumi.Input[str] folder: The folder where the datacenter should be created.
37
+ :param pulumi.Input[_builtins.str] folder: The folder where the datacenter should be created.
33
38
  Forces a new resource if changed.
34
- :param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
39
+ :param pulumi.Input[_builtins.str] name: The name of the datacenter. This name needs to be unique
35
40
  within the folder. Forces a new resource if changed.
36
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
37
-
38
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
39
- requires vCenter 6.0 or higher.
41
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The IDs of any tags to attach to this resource.
40
42
  """
41
43
  if custom_attributes is not None:
42
44
  pulumi.set(__self__, "custom_attributes", custom_attributes)
@@ -47,11 +49,11 @@ class DatacenterArgs:
47
49
  if tags is not None:
48
50
  pulumi.set(__self__, "tags", tags)
49
51
 
50
- @property
52
+ @_builtins.property
51
53
  @pulumi.getter(name="customAttributes")
52
- def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
54
+ def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
53
55
  """
54
- Map of custom attribute ids to value
56
+ Map of custom attribute ids to value
55
57
  strings to set for datacenter resource. See
56
58
  [here][docs-setting-custom-attributes] for a reference on how to set values
57
59
  for custom attributes.
@@ -64,12 +66,12 @@ class DatacenterArgs:
64
66
  return pulumi.get(self, "custom_attributes")
65
67
 
66
68
  @custom_attributes.setter
67
- def custom_attributes(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
69
+ def custom_attributes(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
68
70
  pulumi.set(self, "custom_attributes", value)
69
71
 
70
- @property
72
+ @_builtins.property
71
73
  @pulumi.getter
72
- def folder(self) -> Optional[pulumi.Input[str]]:
74
+ def folder(self) -> Optional[pulumi.Input[_builtins.str]]:
73
75
  """
74
76
  The folder where the datacenter should be created.
75
77
  Forces a new resource if changed.
@@ -77,12 +79,12 @@ class DatacenterArgs:
77
79
  return pulumi.get(self, "folder")
78
80
 
79
81
  @folder.setter
80
- def folder(self, value: Optional[pulumi.Input[str]]):
82
+ def folder(self, value: Optional[pulumi.Input[_builtins.str]]):
81
83
  pulumi.set(self, "folder", value)
82
84
 
83
- @property
85
+ @_builtins.property
84
86
  @pulumi.getter
85
- def name(self) -> Optional[pulumi.Input[str]]:
87
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
86
88
  """
87
89
  The name of the datacenter. This name needs to be unique
88
90
  within the folder. Forces a new resource if changed.
@@ -90,36 +92,33 @@ class DatacenterArgs:
90
92
  return pulumi.get(self, "name")
91
93
 
92
94
  @name.setter
93
- def name(self, value: Optional[pulumi.Input[str]]):
95
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
94
96
  pulumi.set(self, "name", value)
95
97
 
96
- @property
98
+ @_builtins.property
97
99
  @pulumi.getter
98
- def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
100
+ def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
99
101
  """
100
102
  The IDs of any tags to attach to this resource.
101
-
102
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
103
- requires vCenter 6.0 or higher.
104
103
  """
105
104
  return pulumi.get(self, "tags")
106
105
 
107
106
  @tags.setter
108
- def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
107
+ def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
109
108
  pulumi.set(self, "tags", value)
110
109
 
111
110
 
112
111
  @pulumi.input_type
113
112
  class _DatacenterState:
114
113
  def __init__(__self__, *,
115
- custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
116
- folder: Optional[pulumi.Input[str]] = None,
117
- moid: Optional[pulumi.Input[str]] = None,
118
- name: Optional[pulumi.Input[str]] = None,
119
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
114
+ custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
115
+ folder: Optional[pulumi.Input[_builtins.str]] = None,
116
+ moid: Optional[pulumi.Input[_builtins.str]] = None,
117
+ name: Optional[pulumi.Input[_builtins.str]] = None,
118
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None):
120
119
  """
121
120
  Input properties used for looking up and filtering Datacenter resources.
122
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
121
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] custom_attributes: Map of custom attribute ids to value
123
122
  strings to set for datacenter resource. See
124
123
  [here][docs-setting-custom-attributes] for a reference on how to set values
125
124
  for custom attributes.
@@ -128,15 +127,12 @@ class _DatacenterState:
128
127
 
129
128
  > **NOTE:** Custom attributes are unsupported on direct ESXi connections
130
129
  and require vCenter.
131
- :param pulumi.Input[str] folder: The folder where the datacenter should be created.
130
+ :param pulumi.Input[_builtins.str] folder: The folder where the datacenter should be created.
132
131
  Forces a new resource if changed.
133
- :param pulumi.Input[str] moid: Managed object ID of this datacenter.
134
- :param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
132
+ :param pulumi.Input[_builtins.str] moid: Managed object ID of this datacenter.
133
+ :param pulumi.Input[_builtins.str] name: The name of the datacenter. This name needs to be unique
135
134
  within the folder. Forces a new resource if changed.
136
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
137
-
138
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
139
- requires vCenter 6.0 or higher.
135
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The IDs of any tags to attach to this resource.
140
136
  """
141
137
  if custom_attributes is not None:
142
138
  pulumi.set(__self__, "custom_attributes", custom_attributes)
@@ -149,11 +145,11 @@ class _DatacenterState:
149
145
  if tags is not None:
150
146
  pulumi.set(__self__, "tags", tags)
151
147
 
152
- @property
148
+ @_builtins.property
153
149
  @pulumi.getter(name="customAttributes")
154
- def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
150
+ def custom_attributes(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]:
155
151
  """
156
- Map of custom attribute ids to value
152
+ Map of custom attribute ids to value
157
153
  strings to set for datacenter resource. See
158
154
  [here][docs-setting-custom-attributes] for a reference on how to set values
159
155
  for custom attributes.
@@ -166,12 +162,12 @@ class _DatacenterState:
166
162
  return pulumi.get(self, "custom_attributes")
167
163
 
168
164
  @custom_attributes.setter
169
- def custom_attributes(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
165
+ def custom_attributes(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]]):
170
166
  pulumi.set(self, "custom_attributes", value)
171
167
 
172
- @property
168
+ @_builtins.property
173
169
  @pulumi.getter
174
- def folder(self) -> Optional[pulumi.Input[str]]:
170
+ def folder(self) -> Optional[pulumi.Input[_builtins.str]]:
175
171
  """
176
172
  The folder where the datacenter should be created.
177
173
  Forces a new resource if changed.
@@ -179,24 +175,24 @@ class _DatacenterState:
179
175
  return pulumi.get(self, "folder")
180
176
 
181
177
  @folder.setter
182
- def folder(self, value: Optional[pulumi.Input[str]]):
178
+ def folder(self, value: Optional[pulumi.Input[_builtins.str]]):
183
179
  pulumi.set(self, "folder", value)
184
180
 
185
- @property
181
+ @_builtins.property
186
182
  @pulumi.getter
187
- def moid(self) -> Optional[pulumi.Input[str]]:
183
+ def moid(self) -> Optional[pulumi.Input[_builtins.str]]:
188
184
  """
189
185
  Managed object ID of this datacenter.
190
186
  """
191
187
  return pulumi.get(self, "moid")
192
188
 
193
189
  @moid.setter
194
- def moid(self, value: Optional[pulumi.Input[str]]):
190
+ def moid(self, value: Optional[pulumi.Input[_builtins.str]]):
195
191
  pulumi.set(self, "moid", value)
196
192
 
197
- @property
193
+ @_builtins.property
198
194
  @pulumi.getter
199
- def name(self) -> Optional[pulumi.Input[str]]:
195
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
200
196
  """
201
197
  The name of the datacenter. This name needs to be unique
202
198
  within the folder. Forces a new resource if changed.
@@ -204,60 +200,76 @@ class _DatacenterState:
204
200
  return pulumi.get(self, "name")
205
201
 
206
202
  @name.setter
207
- def name(self, value: Optional[pulumi.Input[str]]):
203
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
208
204
  pulumi.set(self, "name", value)
209
205
 
210
- @property
206
+ @_builtins.property
211
207
  @pulumi.getter
212
- def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
208
+ def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
213
209
  """
214
210
  The IDs of any tags to attach to this resource.
215
-
216
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
217
- requires vCenter 6.0 or higher.
218
211
  """
219
212
  return pulumi.get(self, "tags")
220
213
 
221
214
  @tags.setter
222
- def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
215
+ def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
223
216
  pulumi.set(self, "tags", value)
224
217
 
225
218
 
219
+ @pulumi.type_token("vsphere:index/datacenter:Datacenter")
226
220
  class Datacenter(pulumi.CustomResource):
227
221
  @overload
228
222
  def __init__(__self__,
229
223
  resource_name: str,
230
224
  opts: Optional[pulumi.ResourceOptions] = None,
231
- custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
232
- folder: Optional[pulumi.Input[str]] = None,
233
- name: Optional[pulumi.Input[str]] = None,
234
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
225
+ custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
226
+ folder: Optional[pulumi.Input[_builtins.str]] = None,
227
+ name: Optional[pulumi.Input[_builtins.str]] = None,
228
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
235
229
  __props__=None):
236
230
  """
237
231
  Provides a VMware vSphere datacenter resource. This can be used as the primary
238
232
  container of inventory objects such as hosts and virtual machines.
239
233
 
240
234
  ## Example Usage
235
+
241
236
  ### Create datacenter on the root folder
242
237
 
243
238
  ```python
244
239
  import pulumi
245
240
  import pulumi_vsphere as vsphere
246
241
 
247
- prod_datacenter = vsphere.Datacenter("prodDatacenter")
242
+ prod_datacenter = vsphere.Datacenter("prod_datacenter", name="my_prod_datacenter")
248
243
  ```
244
+
249
245
  ### Create datacenter on a subfolder
250
246
 
251
247
  ```python
252
248
  import pulumi
253
249
  import pulumi_vsphere as vsphere
254
250
 
255
- research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
251
+ research_datacenter = vsphere.Datacenter("research_datacenter",
252
+ name="my_research_datacenter",
253
+ folder="/research/")
256
254
  ```
257
255
 
256
+ ## Import
257
+
258
+ An existing datacenter can be imported into this resource
259
+
260
+ via supplying the full path to the datacenter. An example is below:
261
+
262
+ [docs-import]: /docs/import/index.html
263
+
264
+ ```sh
265
+ $ pulumi import vsphere:index/datacenter:Datacenter dc /dc1
266
+ ```
267
+
268
+ The above would import the datacenter named `dc1`.
269
+
258
270
  :param str resource_name: The name of the resource.
259
271
  :param pulumi.ResourceOptions opts: Options for the resource.
260
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
272
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] custom_attributes: Map of custom attribute ids to value
261
273
  strings to set for datacenter resource. See
262
274
  [here][docs-setting-custom-attributes] for a reference on how to set values
263
275
  for custom attributes.
@@ -266,14 +278,11 @@ class Datacenter(pulumi.CustomResource):
266
278
 
267
279
  > **NOTE:** Custom attributes are unsupported on direct ESXi connections
268
280
  and require vCenter.
269
- :param pulumi.Input[str] folder: The folder where the datacenter should be created.
281
+ :param pulumi.Input[_builtins.str] folder: The folder where the datacenter should be created.
270
282
  Forces a new resource if changed.
271
- :param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
283
+ :param pulumi.Input[_builtins.str] name: The name of the datacenter. This name needs to be unique
272
284
  within the folder. Forces a new resource if changed.
273
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
274
-
275
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
276
- requires vCenter 6.0 or higher.
285
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The IDs of any tags to attach to this resource.
277
286
  """
278
287
  ...
279
288
  @overload
@@ -286,23 +295,41 @@ class Datacenter(pulumi.CustomResource):
286
295
  container of inventory objects such as hosts and virtual machines.
287
296
 
288
297
  ## Example Usage
298
+
289
299
  ### Create datacenter on the root folder
290
300
 
291
301
  ```python
292
302
  import pulumi
293
303
  import pulumi_vsphere as vsphere
294
304
 
295
- prod_datacenter = vsphere.Datacenter("prodDatacenter")
305
+ prod_datacenter = vsphere.Datacenter("prod_datacenter", name="my_prod_datacenter")
296
306
  ```
307
+
297
308
  ### Create datacenter on a subfolder
298
309
 
299
310
  ```python
300
311
  import pulumi
301
312
  import pulumi_vsphere as vsphere
302
313
 
303
- research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
314
+ research_datacenter = vsphere.Datacenter("research_datacenter",
315
+ name="my_research_datacenter",
316
+ folder="/research/")
317
+ ```
318
+
319
+ ## Import
320
+
321
+ An existing datacenter can be imported into this resource
322
+
323
+ via supplying the full path to the datacenter. An example is below:
324
+
325
+ [docs-import]: /docs/import/index.html
326
+
327
+ ```sh
328
+ $ pulumi import vsphere:index/datacenter:Datacenter dc /dc1
304
329
  ```
305
330
 
331
+ The above would import the datacenter named `dc1`.
332
+
306
333
  :param str resource_name: The name of the resource.
307
334
  :param DatacenterArgs args: The arguments to use to populate this resource's properties.
308
335
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -318,10 +345,10 @@ class Datacenter(pulumi.CustomResource):
318
345
  def _internal_init(__self__,
319
346
  resource_name: str,
320
347
  opts: Optional[pulumi.ResourceOptions] = None,
321
- custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
322
- folder: Optional[pulumi.Input[str]] = None,
323
- name: Optional[pulumi.Input[str]] = None,
324
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
348
+ custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
349
+ folder: Optional[pulumi.Input[_builtins.str]] = None,
350
+ name: Optional[pulumi.Input[_builtins.str]] = None,
351
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
325
352
  __props__=None):
326
353
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
327
354
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -346,11 +373,11 @@ class Datacenter(pulumi.CustomResource):
346
373
  def get(resource_name: str,
347
374
  id: pulumi.Input[str],
348
375
  opts: Optional[pulumi.ResourceOptions] = None,
349
- custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
350
- folder: Optional[pulumi.Input[str]] = None,
351
- moid: Optional[pulumi.Input[str]] = None,
352
- name: Optional[pulumi.Input[str]] = None,
353
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'Datacenter':
376
+ custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
377
+ folder: Optional[pulumi.Input[_builtins.str]] = None,
378
+ moid: Optional[pulumi.Input[_builtins.str]] = None,
379
+ name: Optional[pulumi.Input[_builtins.str]] = None,
380
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None) -> 'Datacenter':
354
381
  """
355
382
  Get an existing Datacenter resource's state with the given name, id, and optional extra
356
383
  properties used to qualify the lookup.
@@ -358,7 +385,7 @@ class Datacenter(pulumi.CustomResource):
358
385
  :param str resource_name: The unique name of the resulting resource.
359
386
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
360
387
  :param pulumi.ResourceOptions opts: Options for the resource.
361
- :param pulumi.Input[Mapping[str, pulumi.Input[str]]] custom_attributes: Map of custom attribute ids to value
388
+ :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] custom_attributes: Map of custom attribute ids to value
362
389
  strings to set for datacenter resource. See
363
390
  [here][docs-setting-custom-attributes] for a reference on how to set values
364
391
  for custom attributes.
@@ -367,15 +394,12 @@ class Datacenter(pulumi.CustomResource):
367
394
 
368
395
  > **NOTE:** Custom attributes are unsupported on direct ESXi connections
369
396
  and require vCenter.
370
- :param pulumi.Input[str] folder: The folder where the datacenter should be created.
397
+ :param pulumi.Input[_builtins.str] folder: The folder where the datacenter should be created.
371
398
  Forces a new resource if changed.
372
- :param pulumi.Input[str] moid: Managed object ID of this datacenter.
373
- :param pulumi.Input[str] name: The name of the datacenter. This name needs to be unique
399
+ :param pulumi.Input[_builtins.str] moid: Managed object ID of this datacenter.
400
+ :param pulumi.Input[_builtins.str] name: The name of the datacenter. This name needs to be unique
374
401
  within the folder. Forces a new resource if changed.
375
- :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource.
376
-
377
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
378
- requires vCenter 6.0 or higher.
402
+ :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] tags: The IDs of any tags to attach to this resource.
379
403
  """
380
404
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
381
405
 
@@ -388,11 +412,11 @@ class Datacenter(pulumi.CustomResource):
388
412
  __props__.__dict__["tags"] = tags
389
413
  return Datacenter(resource_name, opts=opts, __props__=__props__)
390
414
 
391
- @property
415
+ @_builtins.property
392
416
  @pulumi.getter(name="customAttributes")
393
- def custom_attributes(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
417
+ def custom_attributes(self) -> pulumi.Output[Optional[Mapping[str, _builtins.str]]]:
394
418
  """
395
- Map of custom attribute ids to value
419
+ Map of custom attribute ids to value
396
420
  strings to set for datacenter resource. See
397
421
  [here][docs-setting-custom-attributes] for a reference on how to set values
398
422
  for custom attributes.
@@ -404,40 +428,37 @@ class Datacenter(pulumi.CustomResource):
404
428
  """
405
429
  return pulumi.get(self, "custom_attributes")
406
430
 
407
- @property
431
+ @_builtins.property
408
432
  @pulumi.getter
409
- def folder(self) -> pulumi.Output[Optional[str]]:
433
+ def folder(self) -> pulumi.Output[Optional[_builtins.str]]:
410
434
  """
411
435
  The folder where the datacenter should be created.
412
436
  Forces a new resource if changed.
413
437
  """
414
438
  return pulumi.get(self, "folder")
415
439
 
416
- @property
440
+ @_builtins.property
417
441
  @pulumi.getter
418
- def moid(self) -> pulumi.Output[str]:
442
+ def moid(self) -> pulumi.Output[_builtins.str]:
419
443
  """
420
444
  Managed object ID of this datacenter.
421
445
  """
422
446
  return pulumi.get(self, "moid")
423
447
 
424
- @property
448
+ @_builtins.property
425
449
  @pulumi.getter
426
- def name(self) -> pulumi.Output[str]:
450
+ def name(self) -> pulumi.Output[_builtins.str]:
427
451
  """
428
452
  The name of the datacenter. This name needs to be unique
429
453
  within the folder. Forces a new resource if changed.
430
454
  """
431
455
  return pulumi.get(self, "name")
432
456
 
433
- @property
457
+ @_builtins.property
434
458
  @pulumi.getter
435
- def tags(self) -> pulumi.Output[Optional[Sequence[str]]]:
459
+ def tags(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
436
460
  """
437
461
  The IDs of any tags to attach to this resource.
438
-
439
- > **NOTE:** Tagging support is unsupported on direct ESXi connections and
440
- requires vCenter 6.0 or higher.
441
462
  """
442
463
  return pulumi.get(self, "tags")
443
464