pulumi-vsphere 4.10.0a1710160860__py3-none-any.whl → 4.13.0a1736836157__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 (85) hide show
  1. pulumi_vsphere/__init__.py +30 -0
  2. pulumi_vsphere/_inputs.py +1816 -277
  3. pulumi_vsphere/_utilities.py +41 -5
  4. pulumi_vsphere/compute_cluster.py +937 -1488
  5. pulumi_vsphere/compute_cluster_host_group.py +67 -2
  6. pulumi_vsphere/compute_cluster_vm_affinity_rule.py +69 -34
  7. pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +41 -2
  8. pulumi_vsphere/compute_cluster_vm_dependency_rule.py +205 -2
  9. pulumi_vsphere/compute_cluster_vm_group.py +198 -2
  10. pulumi_vsphere/compute_cluster_vm_host_rule.py +73 -2
  11. pulumi_vsphere/config/__init__.pyi +5 -0
  12. pulumi_vsphere/config/vars.py +5 -0
  13. pulumi_vsphere/content_library.py +113 -12
  14. pulumi_vsphere/content_library_item.py +143 -2
  15. pulumi_vsphere/custom_attribute.py +77 -2
  16. pulumi_vsphere/datacenter.py +48 -40
  17. pulumi_vsphere/datastore_cluster.py +217 -366
  18. pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +159 -2
  19. pulumi_vsphere/distributed_port_group.py +416 -189
  20. pulumi_vsphere/distributed_virtual_switch.py +571 -830
  21. pulumi_vsphere/dpm_host_override.py +63 -2
  22. pulumi_vsphere/drs_vm_override.py +67 -2
  23. pulumi_vsphere/entity_permissions.py +64 -38
  24. pulumi_vsphere/file.py +21 -24
  25. pulumi_vsphere/folder.py +148 -30
  26. pulumi_vsphere/get_compute_cluster.py +16 -9
  27. pulumi_vsphere/get_compute_cluster_host_group.py +36 -25
  28. pulumi_vsphere/get_content_library.py +23 -15
  29. pulumi_vsphere/get_content_library_item.py +29 -13
  30. pulumi_vsphere/get_custom_attribute.py +14 -9
  31. pulumi_vsphere/get_datacenter.py +30 -12
  32. pulumi_vsphere/get_datastore.py +44 -12
  33. pulumi_vsphere/get_datastore_cluster.py +31 -10
  34. pulumi_vsphere/get_datastore_stats.py +208 -0
  35. pulumi_vsphere/get_distributed_virtual_switch.py +18 -9
  36. pulumi_vsphere/get_dynamic.py +35 -25
  37. pulumi_vsphere/get_folder.py +23 -11
  38. pulumi_vsphere/get_guest_os_customization.py +26 -52
  39. pulumi_vsphere/get_host.py +16 -9
  40. pulumi_vsphere/get_host_base_images.py +104 -0
  41. pulumi_vsphere/get_host_pci_device.py +28 -19
  42. pulumi_vsphere/get_host_thumbprint.py +41 -25
  43. pulumi_vsphere/get_host_vgpu_profile.py +195 -0
  44. pulumi_vsphere/get_license.py +20 -10
  45. pulumi_vsphere/get_network.py +80 -24
  46. pulumi_vsphere/get_ovf_vm_template.py +56 -5
  47. pulumi_vsphere/get_policy.py +13 -9
  48. pulumi_vsphere/get_resource_pool.py +29 -23
  49. pulumi_vsphere/get_role.py +23 -13
  50. pulumi_vsphere/get_tag.py +16 -9
  51. pulumi_vsphere/get_tag_category.py +16 -9
  52. pulumi_vsphere/get_vapp_container.py +15 -9
  53. pulumi_vsphere/get_virtual_machine.py +233 -48
  54. pulumi_vsphere/get_vmfs_disks.py +18 -9
  55. pulumi_vsphere/guest_os_customization.py +60 -5
  56. pulumi_vsphere/ha_vm_override.py +352 -380
  57. pulumi_vsphere/host.py +244 -64
  58. pulumi_vsphere/host_port_group.py +27 -24
  59. pulumi_vsphere/host_virtual_switch.py +209 -289
  60. pulumi_vsphere/license.py +5 -32
  61. pulumi_vsphere/nas_datastore.py +74 -9
  62. pulumi_vsphere/offline_software_depot.py +185 -0
  63. pulumi_vsphere/outputs.py +774 -256
  64. pulumi_vsphere/provider.py +7 -6
  65. pulumi_vsphere/pulumi-plugin.json +2 -1
  66. pulumi_vsphere/resource_pool.py +168 -411
  67. pulumi_vsphere/role.py +33 -2
  68. pulumi_vsphere/storage_drs_vm_override.py +133 -2
  69. pulumi_vsphere/supervisor.py +967 -0
  70. pulumi_vsphere/tag.py +159 -2
  71. pulumi_vsphere/tag_category.py +83 -2
  72. pulumi_vsphere/vapp_container.py +163 -2
  73. pulumi_vsphere/vapp_entity.py +147 -2
  74. pulumi_vsphere/virtual_disk.py +123 -36
  75. pulumi_vsphere/virtual_machine.py +759 -829
  76. pulumi_vsphere/virtual_machine_class.py +447 -0
  77. pulumi_vsphere/virtual_machine_snapshot.py +13 -12
  78. pulumi_vsphere/vm_storage_policy.py +120 -127
  79. pulumi_vsphere/vmfs_datastore.py +271 -2
  80. pulumi_vsphere/vnic.py +104 -105
  81. {pulumi_vsphere-4.10.0a1710160860.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/METADATA +7 -6
  82. pulumi_vsphere-4.13.0a1736836157.dist-info/RECORD +86 -0
  83. {pulumi_vsphere-4.10.0a1710160860.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/WHEEL +1 -1
  84. pulumi_vsphere-4.10.0a1710160860.dist-info/RECORD +0 -80
  85. {pulumi_vsphere-4.10.0a1710160860.dist-info → pulumi_vsphere-4.13.0a1736836157.dist-info}/top_level.txt +0 -0
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
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__ = [
@@ -76,14 +81,12 @@ def get_custom_attribute(name: Optional[str] = None,
76
81
 
77
82
  ## Example Usage
78
83
 
79
- <!--Start PulumiCodeChooser -->
80
84
  ```python
81
85
  import pulumi
82
86
  import pulumi_vsphere as vsphere
83
87
 
84
88
  attribute = vsphere.get_custom_attribute(name="test-attribute")
85
89
  ```
86
- <!--End PulumiCodeChooser -->
87
90
 
88
91
 
89
92
  :param str name: The name of the custom attribute.
@@ -97,11 +100,8 @@ def get_custom_attribute(name: Optional[str] = None,
97
100
  id=pulumi.get(__ret__, 'id'),
98
101
  managed_object_type=pulumi.get(__ret__, 'managed_object_type'),
99
102
  name=pulumi.get(__ret__, 'name'))
100
-
101
-
102
- @_utilities.lift_output_func(get_custom_attribute)
103
103
  def get_custom_attribute_output(name: Optional[pulumi.Input[str]] = None,
104
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetCustomAttributeResult]:
104
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetCustomAttributeResult]:
105
105
  """
106
106
  The `CustomAttribute` data source can be used to reference custom
107
107
  attributes that are not managed by this provider. Its attributes are exactly the
@@ -114,16 +114,21 @@ def get_custom_attribute_output(name: Optional[pulumi.Input[str]] = None,
114
114
 
115
115
  ## Example Usage
116
116
 
117
- <!--Start PulumiCodeChooser -->
118
117
  ```python
119
118
  import pulumi
120
119
  import pulumi_vsphere as vsphere
121
120
 
122
121
  attribute = vsphere.get_custom_attribute(name="test-attribute")
123
122
  ```
124
- <!--End PulumiCodeChooser -->
125
123
 
126
124
 
127
125
  :param str name: The name of the custom attribute.
128
126
  """
129
- ...
127
+ __args__ = dict()
128
+ __args__['name'] = name
129
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
130
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getCustomAttribute:getCustomAttribute', __args__, opts=opts, typ=GetCustomAttributeResult)
131
+ return __ret__.apply(lambda __response__: GetCustomAttributeResult(
132
+ id=pulumi.get(__response__, 'id'),
133
+ managed_object_type=pulumi.get(__response__, 'managed_object_type'),
134
+ name=pulumi.get(__response__, 'name')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
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__ = [
@@ -21,13 +26,16 @@ class GetDatacenterResult:
21
26
  """
22
27
  A collection of values returned by getDatacenter.
23
28
  """
24
- def __init__(__self__, id=None, name=None):
29
+ def __init__(__self__, id=None, name=None, virtual_machines=None):
25
30
  if id and not isinstance(id, str):
26
31
  raise TypeError("Expected argument 'id' to be a str")
27
32
  pulumi.set(__self__, "id", id)
28
33
  if name and not isinstance(name, str):
29
34
  raise TypeError("Expected argument 'name' to be a str")
30
35
  pulumi.set(__self__, "name", name)
36
+ if virtual_machines and not isinstance(virtual_machines, list):
37
+ raise TypeError("Expected argument 'virtual_machines' to be a list")
38
+ pulumi.set(__self__, "virtual_machines", virtual_machines)
31
39
 
32
40
  @property
33
41
  @pulumi.getter
@@ -42,6 +50,14 @@ class GetDatacenterResult:
42
50
  def name(self) -> Optional[str]:
43
51
  return pulumi.get(self, "name")
44
52
 
53
+ @property
54
+ @pulumi.getter(name="virtualMachines")
55
+ def virtual_machines(self) -> Sequence[str]:
56
+ """
57
+ List of all virtual machines included in the vSphere datacenter object.
58
+ """
59
+ return pulumi.get(self, "virtual_machines")
60
+
45
61
 
46
62
  class AwaitableGetDatacenterResult(GetDatacenterResult):
47
63
  # pylint: disable=using-constant-test
@@ -50,7 +66,8 @@ class AwaitableGetDatacenterResult(GetDatacenterResult):
50
66
  yield self
51
67
  return GetDatacenterResult(
52
68
  id=self.id,
53
- name=self.name)
69
+ name=self.name,
70
+ virtual_machines=self.virtual_machines)
54
71
 
55
72
 
56
73
  def get_datacenter(name: Optional[str] = None,
@@ -63,14 +80,12 @@ def get_datacenter(name: Optional[str] = None,
63
80
 
64
81
  ## Example Usage
65
82
 
66
- <!--Start PulumiCodeChooser -->
67
83
  ```python
68
84
  import pulumi
69
85
  import pulumi_vsphere as vsphere
70
86
 
71
87
  datacenter = vsphere.get_datacenter(name="dc-01")
72
88
  ```
73
- <!--End PulumiCodeChooser -->
74
89
 
75
90
 
76
91
  :param str name: The name of the datacenter. This can be a name or path.
@@ -88,12 +103,10 @@ def get_datacenter(name: Optional[str] = None,
88
103
 
89
104
  return AwaitableGetDatacenterResult(
90
105
  id=pulumi.get(__ret__, 'id'),
91
- name=pulumi.get(__ret__, 'name'))
92
-
93
-
94
- @_utilities.lift_output_func(get_datacenter)
106
+ name=pulumi.get(__ret__, 'name'),
107
+ virtual_machines=pulumi.get(__ret__, 'virtual_machines'))
95
108
  def get_datacenter_output(name: Optional[pulumi.Input[Optional[str]]] = None,
96
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDatacenterResult]:
109
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDatacenterResult]:
97
110
  """
98
111
  The `Datacenter` data source can be used to discover the ID of a
99
112
  vSphere datacenter object. This can then be used with resources or data sources
@@ -102,14 +115,12 @@ def get_datacenter_output(name: Optional[pulumi.Input[Optional[str]]] = None,
102
115
 
103
116
  ## Example Usage
104
117
 
105
- <!--Start PulumiCodeChooser -->
106
118
  ```python
107
119
  import pulumi
108
120
  import pulumi_vsphere as vsphere
109
121
 
110
122
  datacenter = vsphere.get_datacenter(name="dc-01")
111
123
  ```
112
- <!--End PulumiCodeChooser -->
113
124
 
114
125
 
115
126
  :param str name: The name of the datacenter. This can be a name or path.
@@ -120,4 +131,11 @@ def get_datacenter_output(name: Optional[pulumi.Input[Optional[str]]] = None,
120
131
  datacenters that exist in the vSphere inventory when managed by a vCenter Server
121
132
  instance. Hence, the `name` attribute is completely ignored.
122
133
  """
123
- ...
134
+ __args__ = dict()
135
+ __args__['name'] = name
136
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
137
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getDatacenter:getDatacenter', __args__, opts=opts, typ=GetDatacenterResult)
138
+ return __ret__.apply(lambda __response__: GetDatacenterResult(
139
+ id=pulumi.get(__response__, 'id'),
140
+ name=pulumi.get(__response__, 'name'),
141
+ virtual_machines=pulumi.get(__response__, 'virtual_machines')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
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__ = [
@@ -21,7 +26,7 @@ class GetDatastoreResult:
21
26
  """
22
27
  A collection of values returned by getDatastore.
23
28
  """
24
- def __init__(__self__, datacenter_id=None, id=None, name=None):
29
+ def __init__(__self__, datacenter_id=None, id=None, name=None, stats=None):
25
30
  if datacenter_id and not isinstance(datacenter_id, str):
26
31
  raise TypeError("Expected argument 'datacenter_id' to be a str")
27
32
  pulumi.set(__self__, "datacenter_id", datacenter_id)
@@ -31,6 +36,9 @@ class GetDatastoreResult:
31
36
  if name and not isinstance(name, str):
32
37
  raise TypeError("Expected argument 'name' to be a str")
33
38
  pulumi.set(__self__, "name", name)
39
+ if stats and not isinstance(stats, dict):
40
+ raise TypeError("Expected argument 'stats' to be a dict")
41
+ pulumi.set(__self__, "stats", stats)
34
42
 
35
43
  @property
36
44
  @pulumi.getter(name="datacenterId")
@@ -50,6 +58,16 @@ class GetDatastoreResult:
50
58
  def name(self) -> str:
51
59
  return pulumi.get(self, "name")
52
60
 
61
+ @property
62
+ @pulumi.getter
63
+ def stats(self) -> Optional[Mapping[str, str]]:
64
+ """
65
+ The disk space usage statistics for the specific datastore. The
66
+ total datastore capacity is represented as `capacity` and the free remaining
67
+ disk is represented as `free`.
68
+ """
69
+ return pulumi.get(self, "stats")
70
+
53
71
 
54
72
  class AwaitableGetDatastoreResult(GetDatastoreResult):
55
73
  # pylint: disable=using-constant-test
@@ -59,11 +77,13 @@ class AwaitableGetDatastoreResult(GetDatastoreResult):
59
77
  return GetDatastoreResult(
60
78
  datacenter_id=self.datacenter_id,
61
79
  id=self.id,
62
- name=self.name)
80
+ name=self.name,
81
+ stats=self.stats)
63
82
 
64
83
 
65
84
  def get_datastore(datacenter_id: Optional[str] = None,
66
85
  name: Optional[str] = None,
86
+ stats: Optional[Mapping[str, str]] = None,
67
87
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDatastoreResult:
68
88
  """
69
89
  The `get_datastore` data source can be used to discover the ID of a
@@ -73,7 +93,6 @@ def get_datastore(datacenter_id: Optional[str] = None,
73
93
 
74
94
  ## Example Usage
75
95
 
76
- <!--Start PulumiCodeChooser -->
77
96
  ```python
78
97
  import pulumi
79
98
  import pulumi_vsphere as vsphere
@@ -82,7 +101,6 @@ def get_datastore(datacenter_id: Optional[str] = None,
82
101
  datastore = vsphere.get_datastore(name="datastore-01",
83
102
  datacenter_id=datacenter.id)
84
103
  ```
85
- <!--End PulumiCodeChooser -->
86
104
 
87
105
 
88
106
  :param str datacenter_id: The managed object reference ID
@@ -90,23 +108,26 @@ def get_datastore(datacenter_id: Optional[str] = None,
90
108
  search path used in `name` is an absolute path. For default datacenters, use
91
109
  the `id` attribute from an empty `Datacenter` data source.
92
110
  :param str name: The name of the datastore. This can be a name or path.
111
+ :param Mapping[str, str] stats: The disk space usage statistics for the specific datastore. The
112
+ total datastore capacity is represented as `capacity` and the free remaining
113
+ disk is represented as `free`.
93
114
  """
94
115
  __args__ = dict()
95
116
  __args__['datacenterId'] = datacenter_id
96
117
  __args__['name'] = name
118
+ __args__['stats'] = stats
97
119
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
98
120
  __ret__ = pulumi.runtime.invoke('vsphere:index/getDatastore:getDatastore', __args__, opts=opts, typ=GetDatastoreResult).value
99
121
 
100
122
  return AwaitableGetDatastoreResult(
101
123
  datacenter_id=pulumi.get(__ret__, 'datacenter_id'),
102
124
  id=pulumi.get(__ret__, 'id'),
103
- name=pulumi.get(__ret__, 'name'))
104
-
105
-
106
- @_utilities.lift_output_func(get_datastore)
125
+ name=pulumi.get(__ret__, 'name'),
126
+ stats=pulumi.get(__ret__, 'stats'))
107
127
  def get_datastore_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = None,
108
128
  name: Optional[pulumi.Input[str]] = None,
109
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDatastoreResult]:
129
+ stats: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
130
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDatastoreResult]:
110
131
  """
111
132
  The `get_datastore` data source can be used to discover the ID of a
112
133
  vSphere datastore object. This can then be used with resources or data sources
@@ -115,7 +136,6 @@ def get_datastore_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] =
115
136
 
116
137
  ## Example Usage
117
138
 
118
- <!--Start PulumiCodeChooser -->
119
139
  ```python
120
140
  import pulumi
121
141
  import pulumi_vsphere as vsphere
@@ -124,7 +144,6 @@ def get_datastore_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] =
124
144
  datastore = vsphere.get_datastore(name="datastore-01",
125
145
  datacenter_id=datacenter.id)
126
146
  ```
127
- <!--End PulumiCodeChooser -->
128
147
 
129
148
 
130
149
  :param str datacenter_id: The managed object reference ID
@@ -132,5 +151,18 @@ def get_datastore_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] =
132
151
  search path used in `name` is an absolute path. For default datacenters, use
133
152
  the `id` attribute from an empty `Datacenter` data source.
134
153
  :param str name: The name of the datastore. This can be a name or path.
154
+ :param Mapping[str, str] stats: The disk space usage statistics for the specific datastore. The
155
+ total datastore capacity is represented as `capacity` and the free remaining
156
+ disk is represented as `free`.
135
157
  """
136
- ...
158
+ __args__ = dict()
159
+ __args__['datacenterId'] = datacenter_id
160
+ __args__['name'] = name
161
+ __args__['stats'] = stats
162
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
163
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getDatastore:getDatastore', __args__, opts=opts, typ=GetDatastoreResult)
164
+ return __ret__.apply(lambda __response__: GetDatastoreResult(
165
+ datacenter_id=pulumi.get(__response__, 'datacenter_id'),
166
+ id=pulumi.get(__response__, 'id'),
167
+ name=pulumi.get(__response__, 'name'),
168
+ stats=pulumi.get(__response__, 'stats')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
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__ = [
@@ -21,10 +26,13 @@ class GetDatastoreClusterResult:
21
26
  """
22
27
  A collection of values returned by getDatastoreCluster.
23
28
  """
24
- def __init__(__self__, datacenter_id=None, id=None, name=None):
29
+ def __init__(__self__, datacenter_id=None, datastores=None, id=None, name=None):
25
30
  if datacenter_id and not isinstance(datacenter_id, str):
26
31
  raise TypeError("Expected argument 'datacenter_id' to be a str")
27
32
  pulumi.set(__self__, "datacenter_id", datacenter_id)
33
+ if datastores and not isinstance(datastores, list):
34
+ raise TypeError("Expected argument 'datastores' to be a list")
35
+ pulumi.set(__self__, "datastores", datastores)
28
36
  if id and not isinstance(id, str):
29
37
  raise TypeError("Expected argument 'id' to be a str")
30
38
  pulumi.set(__self__, "id", id)
@@ -37,6 +45,15 @@ class GetDatastoreClusterResult:
37
45
  def datacenter_id(self) -> Optional[str]:
38
46
  return pulumi.get(self, "datacenter_id")
39
47
 
48
+ @property
49
+ @pulumi.getter
50
+ def datastores(self) -> Sequence[str]:
51
+ """
52
+ (Optional) The names of the datastores included in the specific
53
+ cluster.
54
+ """
55
+ return pulumi.get(self, "datastores")
56
+
40
57
  @property
41
58
  @pulumi.getter
42
59
  def id(self) -> str:
@@ -58,6 +75,7 @@ class AwaitableGetDatastoreClusterResult(GetDatastoreClusterResult):
58
75
  yield self
59
76
  return GetDatastoreClusterResult(
60
77
  datacenter_id=self.datacenter_id,
78
+ datastores=self.datastores,
61
79
  id=self.id,
62
80
  name=self.name)
63
81
 
@@ -73,7 +91,6 @@ def get_datastore_cluster(datacenter_id: Optional[str] = None,
73
91
 
74
92
  ## Example Usage
75
93
 
76
- <!--Start PulumiCodeChooser -->
77
94
  ```python
78
95
  import pulumi
79
96
  import pulumi_vsphere as vsphere
@@ -82,7 +99,6 @@ def get_datastore_cluster(datacenter_id: Optional[str] = None,
82
99
  datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster-01",
83
100
  datacenter_id=datacenter.id)
84
101
  ```
85
- <!--End PulumiCodeChooser -->
86
102
 
87
103
 
88
104
  :param str datacenter_id: The managed object reference
@@ -100,14 +116,12 @@ def get_datastore_cluster(datacenter_id: Optional[str] = None,
100
116
 
101
117
  return AwaitableGetDatastoreClusterResult(
102
118
  datacenter_id=pulumi.get(__ret__, 'datacenter_id'),
119
+ datastores=pulumi.get(__ret__, 'datastores'),
103
120
  id=pulumi.get(__ret__, 'id'),
104
121
  name=pulumi.get(__ret__, 'name'))
105
-
106
-
107
- @_utilities.lift_output_func(get_datastore_cluster)
108
122
  def get_datastore_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = None,
109
123
  name: Optional[pulumi.Input[str]] = None,
110
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDatastoreClusterResult]:
124
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDatastoreClusterResult]:
111
125
  """
112
126
  The `DatastoreCluster` data source can be used to discover the ID of a
113
127
  vSphere datastore cluster object. This can then be used with resources or data sources
@@ -116,7 +130,6 @@ def get_datastore_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[s
116
130
 
117
131
  ## Example Usage
118
132
 
119
- <!--Start PulumiCodeChooser -->
120
133
  ```python
121
134
  import pulumi
122
135
  import pulumi_vsphere as vsphere
@@ -125,7 +138,6 @@ def get_datastore_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[s
125
138
  datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster-01",
126
139
  datacenter_id=datacenter.id)
127
140
  ```
128
- <!--End PulumiCodeChooser -->
129
141
 
130
142
 
131
143
  :param str datacenter_id: The managed object reference
@@ -135,4 +147,13 @@ def get_datastore_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[s
135
147
  `Datacenter` data source.
136
148
  :param str name: The name or absolute path to the datastore cluster.
137
149
  """
138
- ...
150
+ __args__ = dict()
151
+ __args__['datacenterId'] = datacenter_id
152
+ __args__['name'] = name
153
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
154
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getDatastoreCluster:getDatastoreCluster', __args__, opts=opts, typ=GetDatastoreClusterResult)
155
+ return __ret__.apply(lambda __response__: GetDatastoreClusterResult(
156
+ datacenter_id=pulumi.get(__response__, 'datacenter_id'),
157
+ datastores=pulumi.get(__response__, 'datastores'),
158
+ id=pulumi.get(__response__, 'id'),
159
+ name=pulumi.get(__response__, 'name')))
@@ -0,0 +1,208 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from . import _utilities
16
+
17
+ __all__ = [
18
+ 'GetDatastoreStatsResult',
19
+ 'AwaitableGetDatastoreStatsResult',
20
+ 'get_datastore_stats',
21
+ 'get_datastore_stats_output',
22
+ ]
23
+
24
+ @pulumi.output_type
25
+ class GetDatastoreStatsResult:
26
+ """
27
+ A collection of values returned by getDatastoreStats.
28
+ """
29
+ def __init__(__self__, capacity=None, datacenter_id=None, free_space=None, id=None):
30
+ if capacity and not isinstance(capacity, dict):
31
+ raise TypeError("Expected argument 'capacity' to be a dict")
32
+ pulumi.set(__self__, "capacity", capacity)
33
+ if datacenter_id and not isinstance(datacenter_id, str):
34
+ raise TypeError("Expected argument 'datacenter_id' to be a str")
35
+ pulumi.set(__self__, "datacenter_id", datacenter_id)
36
+ if free_space and not isinstance(free_space, dict):
37
+ raise TypeError("Expected argument 'free_space' to be a dict")
38
+ pulumi.set(__self__, "free_space", free_space)
39
+ if id and not isinstance(id, str):
40
+ raise TypeError("Expected argument 'id' to be a str")
41
+ pulumi.set(__self__, "id", id)
42
+
43
+ @property
44
+ @pulumi.getter
45
+ def capacity(self) -> Optional[Mapping[str, str]]:
46
+ """
47
+ A mapping of the capacity for all datastore in the datacenter,
48
+ where the name of the datastore is used as key and the capacity as value.
49
+ """
50
+ return pulumi.get(self, "capacity")
51
+
52
+ @property
53
+ @pulumi.getter(name="datacenterId")
54
+ def datacenter_id(self) -> str:
55
+ """
56
+ The [managed object reference ID][docs-about-morefs] of the
57
+ datacenter the datastores are located in.
58
+ """
59
+ return pulumi.get(self, "datacenter_id")
60
+
61
+ @property
62
+ @pulumi.getter(name="freeSpace")
63
+ def free_space(self) -> Optional[Mapping[str, str]]:
64
+ """
65
+ A mapping of the free space for each datastore in the
66
+ datacenter, where the name of the datastore is used as key and the free space
67
+ as value.
68
+ """
69
+ return pulumi.get(self, "free_space")
70
+
71
+ @property
72
+ @pulumi.getter
73
+ def id(self) -> str:
74
+ """
75
+ The provider-assigned unique ID for this managed resource.
76
+ """
77
+ return pulumi.get(self, "id")
78
+
79
+
80
+ class AwaitableGetDatastoreStatsResult(GetDatastoreStatsResult):
81
+ # pylint: disable=using-constant-test
82
+ def __await__(self):
83
+ if False:
84
+ yield self
85
+ return GetDatastoreStatsResult(
86
+ capacity=self.capacity,
87
+ datacenter_id=self.datacenter_id,
88
+ free_space=self.free_space,
89
+ id=self.id)
90
+
91
+
92
+ def get_datastore_stats(capacity: Optional[Mapping[str, str]] = None,
93
+ datacenter_id: Optional[str] = None,
94
+ free_space: Optional[Mapping[str, str]] = None,
95
+ opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDatastoreStatsResult:
96
+ """
97
+ The `get_datastore_stats` data source can be used to retrieve the usage
98
+ stats of all vSphere datastore objects in a datacenter. This can then be used as
99
+ a standalone data source to get information required as input to other data
100
+ sources.
101
+
102
+ ## Example Usage
103
+
104
+ ```python
105
+ import pulumi
106
+ import pulumi_vsphere as vsphere
107
+
108
+ datacenter = vsphere.get_datacenter(name="dc-01")
109
+ datastore_stats = vsphere.get_datastore_stats(datacenter_id=datacenter.id)
110
+ ```
111
+
112
+ A useful example of this data source would be to determine the datastore with
113
+ the most free space. For example, in addition to the above:
114
+
115
+ Create an `outputs.tf` like that:
116
+
117
+ ```python
118
+ import pulumi
119
+
120
+ pulumi.export("maxFreeSpaceName", their_max_free_space_name)
121
+ pulumi.export("maxFreeSpace", their_max_free_space)
122
+ ```
123
+
124
+ and a `locals.tf` like that:
125
+
126
+
127
+ :param Mapping[str, str] capacity: A mapping of the capacity for all datastore in the datacenter,
128
+ where the name of the datastore is used as key and the capacity as value.
129
+ :param str datacenter_id: The
130
+ [managed object reference ID][docs-about-morefs] of the datacenter the
131
+ datastores are located in. For default datacenters, use the `id` attribute
132
+ from an empty `Datacenter` data source.
133
+
134
+ [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
135
+ :param Mapping[str, str] free_space: A mapping of the free space for each datastore in the
136
+ datacenter, where the name of the datastore is used as key and the free space
137
+ as value.
138
+ """
139
+ __args__ = dict()
140
+ __args__['capacity'] = capacity
141
+ __args__['datacenterId'] = datacenter_id
142
+ __args__['freeSpace'] = free_space
143
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
144
+ __ret__ = pulumi.runtime.invoke('vsphere:index/getDatastoreStats:getDatastoreStats', __args__, opts=opts, typ=GetDatastoreStatsResult).value
145
+
146
+ return AwaitableGetDatastoreStatsResult(
147
+ capacity=pulumi.get(__ret__, 'capacity'),
148
+ datacenter_id=pulumi.get(__ret__, 'datacenter_id'),
149
+ free_space=pulumi.get(__ret__, 'free_space'),
150
+ id=pulumi.get(__ret__, 'id'))
151
+ def get_datastore_stats_output(capacity: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
152
+ datacenter_id: Optional[pulumi.Input[str]] = None,
153
+ free_space: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
154
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDatastoreStatsResult]:
155
+ """
156
+ The `get_datastore_stats` data source can be used to retrieve the usage
157
+ stats of all vSphere datastore objects in a datacenter. This can then be used as
158
+ a standalone data source to get information required as input to other data
159
+ sources.
160
+
161
+ ## Example Usage
162
+
163
+ ```python
164
+ import pulumi
165
+ import pulumi_vsphere as vsphere
166
+
167
+ datacenter = vsphere.get_datacenter(name="dc-01")
168
+ datastore_stats = vsphere.get_datastore_stats(datacenter_id=datacenter.id)
169
+ ```
170
+
171
+ A useful example of this data source would be to determine the datastore with
172
+ the most free space. For example, in addition to the above:
173
+
174
+ Create an `outputs.tf` like that:
175
+
176
+ ```python
177
+ import pulumi
178
+
179
+ pulumi.export("maxFreeSpaceName", their_max_free_space_name)
180
+ pulumi.export("maxFreeSpace", their_max_free_space)
181
+ ```
182
+
183
+ and a `locals.tf` like that:
184
+
185
+
186
+ :param Mapping[str, str] capacity: A mapping of the capacity for all datastore in the datacenter,
187
+ where the name of the datastore is used as key and the capacity as value.
188
+ :param str datacenter_id: The
189
+ [managed object reference ID][docs-about-morefs] of the datacenter the
190
+ datastores are located in. For default datacenters, use the `id` attribute
191
+ from an empty `Datacenter` data source.
192
+
193
+ [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
194
+ :param Mapping[str, str] free_space: A mapping of the free space for each datastore in the
195
+ datacenter, where the name of the datastore is used as key and the free space
196
+ as value.
197
+ """
198
+ __args__ = dict()
199
+ __args__['capacity'] = capacity
200
+ __args__['datacenterId'] = datacenter_id
201
+ __args__['freeSpace'] = free_space
202
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
203
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getDatastoreStats:getDatastoreStats', __args__, opts=opts, typ=GetDatastoreStatsResult)
204
+ return __ret__.apply(lambda __response__: GetDatastoreStatsResult(
205
+ capacity=pulumi.get(__response__, 'capacity'),
206
+ datacenter_id=pulumi.get(__response__, 'datacenter_id'),
207
+ free_space=pulumi.get(__response__, 'free_space'),
208
+ id=pulumi.get(__response__, 'id')))