pulumi-vsphere 4.10.0a1710245029__py3-none-any.whl → 4.13.0a1736849827__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.
- pulumi_vsphere/__init__.py +28 -0
- pulumi_vsphere/_inputs.py +1816 -277
- pulumi_vsphere/_utilities.py +41 -5
- pulumi_vsphere/compute_cluster.py +937 -1488
- pulumi_vsphere/compute_cluster_host_group.py +67 -2
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +69 -34
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +41 -2
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +205 -2
- pulumi_vsphere/compute_cluster_vm_group.py +198 -2
- pulumi_vsphere/compute_cluster_vm_host_rule.py +73 -2
- pulumi_vsphere/config/__init__.pyi +5 -0
- pulumi_vsphere/config/vars.py +5 -0
- pulumi_vsphere/content_library.py +113 -12
- pulumi_vsphere/content_library_item.py +143 -2
- pulumi_vsphere/custom_attribute.py +77 -2
- pulumi_vsphere/datacenter.py +48 -40
- pulumi_vsphere/datastore_cluster.py +217 -366
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +159 -2
- pulumi_vsphere/distributed_port_group.py +416 -189
- pulumi_vsphere/distributed_virtual_switch.py +571 -830
- pulumi_vsphere/dpm_host_override.py +63 -2
- pulumi_vsphere/drs_vm_override.py +67 -2
- pulumi_vsphere/entity_permissions.py +64 -38
- pulumi_vsphere/file.py +21 -24
- pulumi_vsphere/folder.py +148 -30
- pulumi_vsphere/get_compute_cluster.py +16 -9
- pulumi_vsphere/get_compute_cluster_host_group.py +36 -25
- pulumi_vsphere/get_content_library.py +23 -15
- pulumi_vsphere/get_content_library_item.py +29 -13
- pulumi_vsphere/get_custom_attribute.py +14 -9
- pulumi_vsphere/get_datacenter.py +30 -12
- pulumi_vsphere/get_datastore.py +29 -21
- pulumi_vsphere/get_datastore_cluster.py +31 -10
- pulumi_vsphere/get_datastore_stats.py +63 -57
- pulumi_vsphere/get_distributed_virtual_switch.py +18 -9
- pulumi_vsphere/get_dynamic.py +35 -25
- pulumi_vsphere/get_folder.py +23 -11
- pulumi_vsphere/get_guest_os_customization.py +26 -52
- pulumi_vsphere/get_host.py +16 -9
- pulumi_vsphere/get_host_base_images.py +104 -0
- pulumi_vsphere/get_host_pci_device.py +28 -19
- pulumi_vsphere/get_host_thumbprint.py +41 -25
- pulumi_vsphere/get_host_vgpu_profile.py +20 -15
- pulumi_vsphere/get_license.py +20 -10
- pulumi_vsphere/get_network.py +80 -24
- pulumi_vsphere/get_ovf_vm_template.py +56 -5
- pulumi_vsphere/get_policy.py +13 -9
- pulumi_vsphere/get_resource_pool.py +29 -23
- pulumi_vsphere/get_role.py +23 -13
- pulumi_vsphere/get_tag.py +16 -9
- pulumi_vsphere/get_tag_category.py +16 -9
- pulumi_vsphere/get_vapp_container.py +15 -9
- pulumi_vsphere/get_virtual_machine.py +205 -48
- pulumi_vsphere/get_vmfs_disks.py +18 -9
- pulumi_vsphere/guest_os_customization.py +60 -5
- pulumi_vsphere/ha_vm_override.py +352 -380
- pulumi_vsphere/host.py +244 -64
- pulumi_vsphere/host_port_group.py +27 -24
- pulumi_vsphere/host_virtual_switch.py +209 -289
- pulumi_vsphere/license.py +5 -32
- pulumi_vsphere/nas_datastore.py +74 -9
- pulumi_vsphere/offline_software_depot.py +185 -0
- pulumi_vsphere/outputs.py +717 -270
- pulumi_vsphere/provider.py +7 -6
- pulumi_vsphere/pulumi-plugin.json +2 -1
- pulumi_vsphere/resource_pool.py +168 -411
- pulumi_vsphere/role.py +33 -2
- pulumi_vsphere/storage_drs_vm_override.py +133 -2
- pulumi_vsphere/supervisor.py +967 -0
- pulumi_vsphere/tag.py +159 -2
- pulumi_vsphere/tag_category.py +83 -2
- pulumi_vsphere/vapp_container.py +163 -2
- pulumi_vsphere/vapp_entity.py +147 -2
- pulumi_vsphere/virtual_disk.py +123 -36
- pulumi_vsphere/virtual_machine.py +698 -829
- pulumi_vsphere/virtual_machine_class.py +447 -0
- pulumi_vsphere/virtual_machine_snapshot.py +13 -12
- pulumi_vsphere/vm_storage_policy.py +120 -127
- pulumi_vsphere/vmfs_datastore.py +271 -2
- pulumi_vsphere/vnic.py +104 -105
- {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736849827.dist-info}/METADATA +7 -6
- pulumi_vsphere-4.13.0a1736849827.dist-info/RECORD +86 -0
- {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736849827.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.10.0a1710245029.dist-info/RECORD +0 -82
- {pulumi_vsphere-4.10.0a1710245029.dist-info → pulumi_vsphere-4.13.0a1736849827.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')))
|
pulumi_vsphere/get_datacenter.py
CHANGED
|
@@ -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')))
|
pulumi_vsphere/get_datastore.py
CHANGED
|
@@ -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__ = [
|
|
@@ -55,11 +60,11 @@ class GetDatastoreResult:
|
|
|
55
60
|
|
|
56
61
|
@property
|
|
57
62
|
@pulumi.getter
|
|
58
|
-
def stats(self) -> Optional[Mapping[str,
|
|
63
|
+
def stats(self) -> Optional[Mapping[str, str]]:
|
|
59
64
|
"""
|
|
60
|
-
The disk space usage statistics for the specific datastore. The
|
|
61
|
-
datastore capacity is represented as `capacity` and the free remaining
|
|
62
|
-
represented as `free`.
|
|
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`.
|
|
63
68
|
"""
|
|
64
69
|
return pulumi.get(self, "stats")
|
|
65
70
|
|
|
@@ -78,7 +83,7 @@ class AwaitableGetDatastoreResult(GetDatastoreResult):
|
|
|
78
83
|
|
|
79
84
|
def get_datastore(datacenter_id: Optional[str] = None,
|
|
80
85
|
name: Optional[str] = None,
|
|
81
|
-
stats: Optional[Mapping[str,
|
|
86
|
+
stats: Optional[Mapping[str, str]] = None,
|
|
82
87
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDatastoreResult:
|
|
83
88
|
"""
|
|
84
89
|
The `get_datastore` data source can be used to discover the ID of a
|
|
@@ -88,7 +93,6 @@ def get_datastore(datacenter_id: Optional[str] = None,
|
|
|
88
93
|
|
|
89
94
|
## Example Usage
|
|
90
95
|
|
|
91
|
-
<!--Start PulumiCodeChooser -->
|
|
92
96
|
```python
|
|
93
97
|
import pulumi
|
|
94
98
|
import pulumi_vsphere as vsphere
|
|
@@ -97,7 +101,6 @@ def get_datastore(datacenter_id: Optional[str] = None,
|
|
|
97
101
|
datastore = vsphere.get_datastore(name="datastore-01",
|
|
98
102
|
datacenter_id=datacenter.id)
|
|
99
103
|
```
|
|
100
|
-
<!--End PulumiCodeChooser -->
|
|
101
104
|
|
|
102
105
|
|
|
103
106
|
:param str datacenter_id: The managed object reference ID
|
|
@@ -105,9 +108,9 @@ def get_datastore(datacenter_id: Optional[str] = None,
|
|
|
105
108
|
search path used in `name` is an absolute path. For default datacenters, use
|
|
106
109
|
the `id` attribute from an empty `Datacenter` data source.
|
|
107
110
|
:param str name: The name of the datastore. This can be a name or path.
|
|
108
|
-
:param Mapping[str,
|
|
109
|
-
datastore capacity is represented as `capacity` and the free remaining
|
|
110
|
-
represented as `free`.
|
|
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`.
|
|
111
114
|
"""
|
|
112
115
|
__args__ = dict()
|
|
113
116
|
__args__['datacenterId'] = datacenter_id
|
|
@@ -121,13 +124,10 @@ def get_datastore(datacenter_id: Optional[str] = None,
|
|
|
121
124
|
id=pulumi.get(__ret__, 'id'),
|
|
122
125
|
name=pulumi.get(__ret__, 'name'),
|
|
123
126
|
stats=pulumi.get(__ret__, 'stats'))
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
@_utilities.lift_output_func(get_datastore)
|
|
127
127
|
def get_datastore_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = None,
|
|
128
128
|
name: Optional[pulumi.Input[str]] = None,
|
|
129
|
-
stats: Optional[pulumi.Input[Optional[Mapping[str,
|
|
130
|
-
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]:
|
|
131
131
|
"""
|
|
132
132
|
The `get_datastore` data source can be used to discover the ID of a
|
|
133
133
|
vSphere datastore object. This can then be used with resources or data sources
|
|
@@ -136,7 +136,6 @@ def get_datastore_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] =
|
|
|
136
136
|
|
|
137
137
|
## Example Usage
|
|
138
138
|
|
|
139
|
-
<!--Start PulumiCodeChooser -->
|
|
140
139
|
```python
|
|
141
140
|
import pulumi
|
|
142
141
|
import pulumi_vsphere as vsphere
|
|
@@ -145,7 +144,6 @@ def get_datastore_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] =
|
|
|
145
144
|
datastore = vsphere.get_datastore(name="datastore-01",
|
|
146
145
|
datacenter_id=datacenter.id)
|
|
147
146
|
```
|
|
148
|
-
<!--End PulumiCodeChooser -->
|
|
149
147
|
|
|
150
148
|
|
|
151
149
|
:param str datacenter_id: The managed object reference ID
|
|
@@ -153,8 +151,18 @@ def get_datastore_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] =
|
|
|
153
151
|
search path used in `name` is an absolute path. For default datacenters, use
|
|
154
152
|
the `id` attribute from an empty `Datacenter` data source.
|
|
155
153
|
:param str name: The name of the datastore. This can be a name or path.
|
|
156
|
-
:param Mapping[str,
|
|
157
|
-
datastore capacity is represented as `capacity` and the free remaining
|
|
158
|
-
represented as `free`.
|
|
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`.
|
|
159
157
|
"""
|
|
160
|
-
|
|
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')))
|
|
@@ -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__ = [
|
|
@@ -37,10 +42,10 @@ class GetDatastoreStatsResult:
|
|
|
37
42
|
|
|
38
43
|
@property
|
|
39
44
|
@pulumi.getter
|
|
40
|
-
def capacity(self) -> Optional[Mapping[str,
|
|
45
|
+
def capacity(self) -> Optional[Mapping[str, str]]:
|
|
41
46
|
"""
|
|
42
|
-
A mapping of the capacity for all datastore in the datacenter
|
|
43
|
-
|
|
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.
|
|
44
49
|
"""
|
|
45
50
|
return pulumi.get(self, "capacity")
|
|
46
51
|
|
|
@@ -48,18 +53,18 @@ class GetDatastoreStatsResult:
|
|
|
48
53
|
@pulumi.getter(name="datacenterId")
|
|
49
54
|
def datacenter_id(self) -> str:
|
|
50
55
|
"""
|
|
51
|
-
The [managed object reference ID][docs-about-morefs]
|
|
52
|
-
|
|
56
|
+
The [managed object reference ID][docs-about-morefs] of the
|
|
57
|
+
datacenter the datastores are located in.
|
|
53
58
|
"""
|
|
54
59
|
return pulumi.get(self, "datacenter_id")
|
|
55
60
|
|
|
56
61
|
@property
|
|
57
62
|
@pulumi.getter(name="freeSpace")
|
|
58
|
-
def free_space(self) -> Optional[Mapping[str,
|
|
63
|
+
def free_space(self) -> Optional[Mapping[str, str]]:
|
|
59
64
|
"""
|
|
60
65
|
A mapping of the free space for each datastore in the
|
|
61
|
-
datacenter, where the name of the datastore is used as key and the free
|
|
62
|
-
|
|
66
|
+
datacenter, where the name of the datastore is used as key and the free space
|
|
67
|
+
as value.
|
|
63
68
|
"""
|
|
64
69
|
return pulumi.get(self, "free_space")
|
|
65
70
|
|
|
@@ -84,18 +89,18 @@ class AwaitableGetDatastoreStatsResult(GetDatastoreStatsResult):
|
|
|
84
89
|
id=self.id)
|
|
85
90
|
|
|
86
91
|
|
|
87
|
-
def get_datastore_stats(capacity: Optional[Mapping[str,
|
|
92
|
+
def get_datastore_stats(capacity: Optional[Mapping[str, str]] = None,
|
|
88
93
|
datacenter_id: Optional[str] = None,
|
|
89
|
-
free_space: Optional[Mapping[str,
|
|
94
|
+
free_space: Optional[Mapping[str, str]] = None,
|
|
90
95
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDatastoreStatsResult:
|
|
91
96
|
"""
|
|
92
|
-
The `get_datastore_stats` data source can be used to retrieve the usage
|
|
93
|
-
of all vSphere datastore objects in a datacenter. This can then be used as
|
|
94
|
-
standalone
|
|
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.
|
|
95
101
|
|
|
96
102
|
## Example Usage
|
|
97
103
|
|
|
98
|
-
<!--Start PulumiCodeChooser -->
|
|
99
104
|
```python
|
|
100
105
|
import pulumi
|
|
101
106
|
import pulumi_vsphere as vsphere
|
|
@@ -103,36 +108,33 @@ def get_datastore_stats(capacity: Optional[Mapping[str, Any]] = None,
|
|
|
103
108
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
104
109
|
datastore_stats = vsphere.get_datastore_stats(datacenter_id=datacenter.id)
|
|
105
110
|
```
|
|
106
|
-
<!--End PulumiCodeChooser -->
|
|
107
111
|
|
|
108
|
-
A
|
|
109
|
-
|
|
110
|
-
the above:
|
|
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:
|
|
111
114
|
|
|
112
115
|
Create an `outputs.tf` like that:
|
|
113
116
|
|
|
114
|
-
<!--Start PulumiCodeChooser -->
|
|
115
117
|
```python
|
|
116
118
|
import pulumi
|
|
117
119
|
|
|
118
|
-
pulumi.export("maxFreeSpaceName",
|
|
119
|
-
pulumi.export("maxFreeSpace",
|
|
120
|
+
pulumi.export("maxFreeSpaceName", their_max_free_space_name)
|
|
121
|
+
pulumi.export("maxFreeSpace", their_max_free_space)
|
|
120
122
|
```
|
|
121
|
-
<!--End PulumiCodeChooser -->
|
|
122
123
|
|
|
123
124
|
and a `locals.tf` like that:
|
|
124
125
|
|
|
125
126
|
|
|
126
|
-
:param Mapping[str,
|
|
127
|
-
|
|
128
|
-
:param str datacenter_id: The
|
|
129
|
-
of the datacenter the
|
|
130
|
-
|
|
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.
|
|
131
133
|
|
|
132
134
|
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
133
|
-
:param Mapping[str,
|
|
134
|
-
datacenter, where the name of the datastore is used as key and the free
|
|
135
|
-
|
|
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.
|
|
136
138
|
"""
|
|
137
139
|
__args__ = dict()
|
|
138
140
|
__args__['capacity'] = capacity
|
|
@@ -146,21 +148,18 @@ def get_datastore_stats(capacity: Optional[Mapping[str, Any]] = None,
|
|
|
146
148
|
datacenter_id=pulumi.get(__ret__, 'datacenter_id'),
|
|
147
149
|
free_space=pulumi.get(__ret__, 'free_space'),
|
|
148
150
|
id=pulumi.get(__ret__, 'id'))
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
@_utilities.lift_output_func(get_datastore_stats)
|
|
152
|
-
def get_datastore_stats_output(capacity: Optional[pulumi.Input[Optional[Mapping[str, Any]]]] = None,
|
|
151
|
+
def get_datastore_stats_output(capacity: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
|
|
153
152
|
datacenter_id: Optional[pulumi.Input[str]] = None,
|
|
154
|
-
free_space: Optional[pulumi.Input[Optional[Mapping[str,
|
|
155
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDatastoreStatsResult]:
|
|
153
|
+
free_space: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
|
|
154
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDatastoreStatsResult]:
|
|
156
155
|
"""
|
|
157
|
-
The `get_datastore_stats` data source can be used to retrieve the usage
|
|
158
|
-
of all vSphere datastore objects in a datacenter. This can then be used as
|
|
159
|
-
standalone
|
|
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
160
|
|
|
161
161
|
## Example Usage
|
|
162
162
|
|
|
163
|
-
<!--Start PulumiCodeChooser -->
|
|
164
163
|
```python
|
|
165
164
|
import pulumi
|
|
166
165
|
import pulumi_vsphere as vsphere
|
|
@@ -168,35 +167,42 @@ def get_datastore_stats_output(capacity: Optional[pulumi.Input[Optional[Mapping[
|
|
|
168
167
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
169
168
|
datastore_stats = vsphere.get_datastore_stats(datacenter_id=datacenter.id)
|
|
170
169
|
```
|
|
171
|
-
<!--End PulumiCodeChooser -->
|
|
172
170
|
|
|
173
|
-
A
|
|
174
|
-
|
|
175
|
-
the above:
|
|
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:
|
|
176
173
|
|
|
177
174
|
Create an `outputs.tf` like that:
|
|
178
175
|
|
|
179
|
-
<!--Start PulumiCodeChooser -->
|
|
180
176
|
```python
|
|
181
177
|
import pulumi
|
|
182
178
|
|
|
183
|
-
pulumi.export("maxFreeSpaceName",
|
|
184
|
-
pulumi.export("maxFreeSpace",
|
|
179
|
+
pulumi.export("maxFreeSpaceName", their_max_free_space_name)
|
|
180
|
+
pulumi.export("maxFreeSpace", their_max_free_space)
|
|
185
181
|
```
|
|
186
|
-
<!--End PulumiCodeChooser -->
|
|
187
182
|
|
|
188
183
|
and a `locals.tf` like that:
|
|
189
184
|
|
|
190
185
|
|
|
191
|
-
:param Mapping[str,
|
|
192
|
-
|
|
193
|
-
:param str datacenter_id: The
|
|
194
|
-
of the datacenter the
|
|
195
|
-
|
|
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.
|
|
196
192
|
|
|
197
193
|
[docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
|
|
198
|
-
:param Mapping[str,
|
|
199
|
-
datacenter, where the name of the datastore is used as key and the free
|
|
200
|
-
|
|
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.
|
|
201
197
|
"""
|
|
202
|
-
|
|
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')))
|