pulumi-vsphere 4.10.0a1709017641__py3-none-any.whl → 4.17.0a1763710194__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-vsphere might be problematic. Click here for more details.
- pulumi_vsphere/__init__.py +51 -1
- pulumi_vsphere/_inputs.py +2568 -1025
- pulumi_vsphere/_utilities.py +50 -10
- pulumi_vsphere/compute_cluster.py +1564 -2373
- pulumi_vsphere/compute_cluster_host_group.py +191 -55
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +157 -113
- pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +133 -89
- pulumi_vsphere/compute_cluster_vm_dependency_rule.py +314 -106
- pulumi_vsphere/compute_cluster_vm_group.py +256 -55
- pulumi_vsphere/compute_cluster_vm_host_rule.py +323 -123
- pulumi_vsphere/config/__init__.py +2 -1
- pulumi_vsphere/config/__init__.pyi +7 -2
- pulumi_vsphere/config/vars.py +20 -15
- pulumi_vsphere/configuration_profile.py +286 -0
- pulumi_vsphere/content_library.py +177 -71
- pulumi_vsphere/content_library_item.py +252 -106
- pulumi_vsphere/custom_attribute.py +118 -38
- pulumi_vsphere/datacenter.py +128 -107
- pulumi_vsphere/datastore_cluster.py +636 -731
- pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +251 -89
- pulumi_vsphere/distributed_port_group.py +1129 -967
- pulumi_vsphere/distributed_virtual_switch.py +1971 -2239
- pulumi_vsphere/distributed_virtual_switch_pvlan_mapping.py +294 -0
- pulumi_vsphere/dpm_host_override.py +222 -72
- pulumi_vsphere/drs_vm_override.py +236 -72
- pulumi_vsphere/entity_permissions.py +96 -69
- pulumi_vsphere/file.py +173 -178
- pulumi_vsphere/folder.py +236 -113
- pulumi_vsphere/get_compute_cluster.py +34 -23
- pulumi_vsphere/get_compute_cluster_host_group.py +52 -41
- pulumi_vsphere/get_configuration_profile.py +145 -0
- pulumi_vsphere/get_content_library.py +33 -21
- pulumi_vsphere/get_content_library_item.py +47 -31
- pulumi_vsphere/get_custom_attribute.py +26 -17
- pulumi_vsphere/get_datacenter.py +40 -18
- pulumi_vsphere/get_datastore.py +60 -24
- pulumi_vsphere/get_datastore_cluster.py +47 -22
- pulumi_vsphere/get_datastore_stats.py +204 -0
- pulumi_vsphere/get_distributed_virtual_switch.py +36 -23
- pulumi_vsphere/get_dynamic.py +55 -45
- pulumi_vsphere/get_folder.py +163 -25
- pulumi_vsphere/get_guest_os_customization.py +68 -37
- pulumi_vsphere/get_host.py +34 -23
- pulumi_vsphere/get_host_base_images.py +104 -0
- pulumi_vsphere/get_host_pci_device.py +78 -35
- pulumi_vsphere/get_host_thumbprint.py +58 -38
- pulumi_vsphere/get_host_vgpu_profile.py +195 -0
- pulumi_vsphere/get_license.py +44 -28
- pulumi_vsphere/get_network.py +157 -46
- pulumi_vsphere/get_ovf_vm_template.py +184 -301
- pulumi_vsphere/get_policy.py +23 -15
- pulumi_vsphere/get_resource_pool.py +107 -40
- pulumi_vsphere/get_role.py +49 -35
- pulumi_vsphere/get_tag.py +34 -23
- pulumi_vsphere/get_tag_category.py +32 -21
- pulumi_vsphere/get_vapp_container.py +31 -21
- pulumi_vsphere/get_virtual_machine.py +499 -287
- pulumi_vsphere/get_vmfs_disks.py +42 -29
- pulumi_vsphere/guest_os_customization.py +135 -79
- pulumi_vsphere/ha_vm_override.py +470 -577
- pulumi_vsphere/host.py +515 -262
- pulumi_vsphere/host_port_group.py +352 -355
- pulumi_vsphere/host_virtual_switch.py +580 -580
- pulumi_vsphere/license.py +110 -92
- pulumi_vsphere/nas_datastore.py +398 -270
- pulumi_vsphere/offline_software_depot.py +190 -0
- pulumi_vsphere/outputs.py +1582 -1027
- pulumi_vsphere/provider.py +172 -152
- pulumi_vsphere/pulumi-plugin.json +2 -1
- pulumi_vsphere/resource_pool.py +357 -273
- pulumi_vsphere/role.py +79 -47
- pulumi_vsphere/storage_drs_vm_override.py +225 -89
- pulumi_vsphere/supervisor.py +1064 -0
- pulumi_vsphere/tag.py +217 -55
- pulumi_vsphere/tag_category.py +158 -72
- pulumi_vsphere/vapp_container.py +425 -259
- pulumi_vsphere/vapp_entity.py +324 -174
- pulumi_vsphere/virtual_disk.py +245 -153
- pulumi_vsphere/virtual_machine.py +1696 -1836
- pulumi_vsphere/virtual_machine_class.py +448 -0
- pulumi_vsphere/virtual_machine_snapshot.py +137 -131
- pulumi_vsphere/vm_storage_policy.py +160 -154
- pulumi_vsphere/vmfs_datastore.py +460 -186
- pulumi_vsphere/vnic.py +249 -231
- {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/METADATA +7 -6
- pulumi_vsphere-4.17.0a1763710194.dist-info/RECORD +89 -0
- {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/WHEEL +1 -1
- pulumi_vsphere-4.10.0a1709017641.dist-info/RECORD +0 -80
- {pulumi_vsphere-4.10.0a1709017641.dist-info → pulumi_vsphere-4.17.0a1763710194.dist-info}/top_level.txt +0 -0
pulumi_vsphere/get_policy.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = [
|
|
@@ -29,17 +34,17 @@ class GetPolicyResult:
|
|
|
29
34
|
raise TypeError("Expected argument 'name' to be a str")
|
|
30
35
|
pulumi.set(__self__, "name", name)
|
|
31
36
|
|
|
32
|
-
@property
|
|
37
|
+
@_builtins.property
|
|
33
38
|
@pulumi.getter
|
|
34
|
-
def id(self) -> str:
|
|
39
|
+
def id(self) -> _builtins.str:
|
|
35
40
|
"""
|
|
36
41
|
The provider-assigned unique ID for this managed resource.
|
|
37
42
|
"""
|
|
38
43
|
return pulumi.get(self, "id")
|
|
39
44
|
|
|
40
|
-
@property
|
|
45
|
+
@_builtins.property
|
|
41
46
|
@pulumi.getter
|
|
42
|
-
def name(self) -> str:
|
|
47
|
+
def name(self) -> _builtins.str:
|
|
43
48
|
return pulumi.get(self, "name")
|
|
44
49
|
|
|
45
50
|
|
|
@@ -53,7 +58,7 @@ class AwaitableGetPolicyResult(GetPolicyResult):
|
|
|
53
58
|
name=self.name)
|
|
54
59
|
|
|
55
60
|
|
|
56
|
-
def get_policy(name: Optional[str] = None,
|
|
61
|
+
def get_policy(name: Optional[_builtins.str] = None,
|
|
57
62
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPolicyResult:
|
|
58
63
|
"""
|
|
59
64
|
The `get_policy` data source can be used to discover the UUID of a
|
|
@@ -74,7 +79,7 @@ def get_policy(name: Optional[str] = None,
|
|
|
74
79
|
```
|
|
75
80
|
|
|
76
81
|
|
|
77
|
-
:param str name: The name of the storage policy.
|
|
82
|
+
:param _builtins.str name: The name of the storage policy.
|
|
78
83
|
"""
|
|
79
84
|
__args__ = dict()
|
|
80
85
|
__args__['name'] = name
|
|
@@ -84,11 +89,8 @@ def get_policy(name: Optional[str] = None,
|
|
|
84
89
|
return AwaitableGetPolicyResult(
|
|
85
90
|
id=pulumi.get(__ret__, 'id'),
|
|
86
91
|
name=pulumi.get(__ret__, 'name'))
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
@_utilities.lift_output_func(get_policy)
|
|
90
|
-
def get_policy_output(name: Optional[pulumi.Input[str]] = None,
|
|
91
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPolicyResult]:
|
|
92
|
+
def get_policy_output(name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
93
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPolicyResult]:
|
|
92
94
|
"""
|
|
93
95
|
The `get_policy` data source can be used to discover the UUID of a
|
|
94
96
|
storage policy. This can then be used with other resources or data sources that
|
|
@@ -108,6 +110,12 @@ def get_policy_output(name: Optional[pulumi.Input[str]] = None,
|
|
|
108
110
|
```
|
|
109
111
|
|
|
110
112
|
|
|
111
|
-
:param str name: The name of the storage policy.
|
|
113
|
+
:param _builtins.str name: The name of the storage policy.
|
|
112
114
|
"""
|
|
113
|
-
|
|
115
|
+
__args__ = dict()
|
|
116
|
+
__args__['name'] = name
|
|
117
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
118
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getPolicy:getPolicy', __args__, opts=opts, typ=GetPolicyResult)
|
|
119
|
+
return __ret__.apply(lambda __response__: GetPolicyResult(
|
|
120
|
+
id=pulumi.get(__response__, 'id'),
|
|
121
|
+
name=pulumi.get(__response__, 'name')))
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = [
|
|
@@ -21,7 +26,7 @@ class GetResourcePoolResult:
|
|
|
21
26
|
"""
|
|
22
27
|
A collection of values returned by getResourcePool.
|
|
23
28
|
"""
|
|
24
|
-
def __init__(__self__, datacenter_id=None, id=None, name=None):
|
|
29
|
+
def __init__(__self__, datacenter_id=None, id=None, name=None, parent_resource_pool_id=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,25 +36,33 @@ class GetResourcePoolResult:
|
|
|
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 parent_resource_pool_id and not isinstance(parent_resource_pool_id, str):
|
|
40
|
+
raise TypeError("Expected argument 'parent_resource_pool_id' to be a str")
|
|
41
|
+
pulumi.set(__self__, "parent_resource_pool_id", parent_resource_pool_id)
|
|
34
42
|
|
|
35
|
-
@property
|
|
43
|
+
@_builtins.property
|
|
36
44
|
@pulumi.getter(name="datacenterId")
|
|
37
|
-
def datacenter_id(self) -> Optional[str]:
|
|
45
|
+
def datacenter_id(self) -> Optional[_builtins.str]:
|
|
38
46
|
return pulumi.get(self, "datacenter_id")
|
|
39
47
|
|
|
40
|
-
@property
|
|
48
|
+
@_builtins.property
|
|
41
49
|
@pulumi.getter
|
|
42
|
-
def id(self) -> str:
|
|
50
|
+
def id(self) -> _builtins.str:
|
|
43
51
|
"""
|
|
44
52
|
The provider-assigned unique ID for this managed resource.
|
|
45
53
|
"""
|
|
46
54
|
return pulumi.get(self, "id")
|
|
47
55
|
|
|
48
|
-
@property
|
|
56
|
+
@_builtins.property
|
|
49
57
|
@pulumi.getter
|
|
50
|
-
def name(self) -> Optional[str]:
|
|
58
|
+
def name(self) -> Optional[_builtins.str]:
|
|
51
59
|
return pulumi.get(self, "name")
|
|
52
60
|
|
|
61
|
+
@_builtins.property
|
|
62
|
+
@pulumi.getter(name="parentResourcePoolId")
|
|
63
|
+
def parent_resource_pool_id(self) -> Optional[_builtins.str]:
|
|
64
|
+
return pulumi.get(self, "parent_resource_pool_id")
|
|
65
|
+
|
|
53
66
|
|
|
54
67
|
class AwaitableGetResourcePoolResult(GetResourcePoolResult):
|
|
55
68
|
# pylint: disable=using-constant-test
|
|
@@ -59,11 +72,13 @@ class AwaitableGetResourcePoolResult(GetResourcePoolResult):
|
|
|
59
72
|
return GetResourcePoolResult(
|
|
60
73
|
datacenter_id=self.datacenter_id,
|
|
61
74
|
id=self.id,
|
|
62
|
-
name=self.name
|
|
75
|
+
name=self.name,
|
|
76
|
+
parent_resource_pool_id=self.parent_resource_pool_id)
|
|
63
77
|
|
|
64
78
|
|
|
65
|
-
def get_resource_pool(datacenter_id: Optional[str] = None,
|
|
66
|
-
name: Optional[str] = None,
|
|
79
|
+
def get_resource_pool(datacenter_id: Optional[_builtins.str] = None,
|
|
80
|
+
name: Optional[_builtins.str] = None,
|
|
81
|
+
parent_resource_pool_id: Optional[_builtins.str] = None,
|
|
67
82
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetResourcePoolResult:
|
|
68
83
|
"""
|
|
69
84
|
The `ResourcePool` data source can be used to discover the ID of a
|
|
@@ -73,14 +88,30 @@ def get_resource_pool(datacenter_id: Optional[str] = None,
|
|
|
73
88
|
|
|
74
89
|
## Example Usage
|
|
75
90
|
|
|
91
|
+
### Find a Resource Pool by Path
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
import pulumi
|
|
95
|
+
import pulumi_vsphere as vsphere
|
|
96
|
+
|
|
97
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
98
|
+
pool = vsphere.get_resource_pool(name="cluster-01/Resources",
|
|
99
|
+
datacenter_id=datacenter.id)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Find a Child Resource Pool Using the Parent ID
|
|
103
|
+
|
|
76
104
|
```python
|
|
77
105
|
import pulumi
|
|
78
106
|
import pulumi_vsphere as vsphere
|
|
79
107
|
|
|
80
108
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
81
|
-
|
|
109
|
+
parent_pool = vsphere.get_resource_pool(name="cluster-01/Resources",
|
|
82
110
|
datacenter_id=datacenter.id)
|
|
111
|
+
child_pool = vsphere.get_resource_pool(name="example",
|
|
112
|
+
parent_resource_pool_id=parent_pool.id)
|
|
83
113
|
```
|
|
114
|
+
|
|
84
115
|
### Specifying the Root Resource Pool for a Standalone ESXi Host
|
|
85
116
|
|
|
86
117
|
> **NOTE:** Returning the root resource pool for a cluster can be done
|
|
@@ -88,50 +119,55 @@ def get_resource_pool(datacenter_id: Optional[str] = None,
|
|
|
88
119
|
data source.
|
|
89
120
|
|
|
90
121
|
All compute resources in vSphere have a resource pool, even if one has not been
|
|
91
|
-
explicitly created. This resource pool is referred to as the
|
|
92
|
-
|
|
122
|
+
explicitly created. This resource pool is referred to as the _root resource
|
|
123
|
+
pool_ and can be looked up by specifying the path.
|
|
93
124
|
|
|
94
125
|
```python
|
|
95
126
|
import pulumi
|
|
96
127
|
import pulumi_vsphere as vsphere
|
|
97
128
|
|
|
98
129
|
pool = vsphere.get_resource_pool(name="esxi-01.example.com/Resources",
|
|
99
|
-
datacenter_id=
|
|
130
|
+
datacenter_id=datacenter["id"])
|
|
100
131
|
```
|
|
101
132
|
|
|
102
|
-
For more information on the root resource pool, see
|
|
133
|
+
For more information on the root resource pool, see
|
|
134
|
+
[Managing Resource Pools][vmware-docs-resource-pools] in the vSphere
|
|
135
|
+
documentation.
|
|
103
136
|
|
|
104
|
-
[vmware-docs-resource-pools]: https://
|
|
137
|
+
[vmware-docs-resource-pools]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-resource-management-8-0/managing-resource-pools.html
|
|
105
138
|
|
|
106
139
|
|
|
107
|
-
:param str datacenter_id: The managed object reference ID
|
|
140
|
+
:param _builtins.str datacenter_id: The managed object reference ID
|
|
108
141
|
of the datacenter in which the resource pool is located. This can be omitted
|
|
109
142
|
if the search path used in `name` is an absolute path. For default
|
|
110
143
|
datacenters, use the id attribute from an empty `Datacenter` data
|
|
111
|
-
source
|
|
144
|
+
source..
|
|
145
|
+
:param _builtins.str name: The name of the resource pool. This can be a name or
|
|
146
|
+
path. This is required when using vCenter.
|
|
147
|
+
:param _builtins.str parent_resource_pool_id: The managed object ID
|
|
148
|
+
of the parent resource pool. When specified, the `name` parameter is used to find
|
|
149
|
+
a child resource pool with the given name under this parent resource pool.
|
|
112
150
|
|
|
113
151
|
> **Note:** When using ESXi without a vCenter Server instance, you do not
|
|
114
152
|
need to specify either attribute to use this data source. An empty declaration
|
|
115
153
|
will load the ESXi host's root resource pool.
|
|
116
|
-
:param str name: The name of the resource pool. This can be a name or
|
|
117
|
-
path. This is required when using vCenter.
|
|
118
154
|
"""
|
|
119
155
|
__args__ = dict()
|
|
120
156
|
__args__['datacenterId'] = datacenter_id
|
|
121
157
|
__args__['name'] = name
|
|
158
|
+
__args__['parentResourcePoolId'] = parent_resource_pool_id
|
|
122
159
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
123
160
|
__ret__ = pulumi.runtime.invoke('vsphere:index/getResourcePool:getResourcePool', __args__, opts=opts, typ=GetResourcePoolResult).value
|
|
124
161
|
|
|
125
162
|
return AwaitableGetResourcePoolResult(
|
|
126
163
|
datacenter_id=pulumi.get(__ret__, 'datacenter_id'),
|
|
127
164
|
id=pulumi.get(__ret__, 'id'),
|
|
128
|
-
name=pulumi.get(__ret__, 'name')
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetResourcePoolResult]:
|
|
165
|
+
name=pulumi.get(__ret__, 'name'),
|
|
166
|
+
parent_resource_pool_id=pulumi.get(__ret__, 'parent_resource_pool_id'))
|
|
167
|
+
def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
168
|
+
name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
169
|
+
parent_resource_pool_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
170
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetResourcePoolResult]:
|
|
135
171
|
"""
|
|
136
172
|
The `ResourcePool` data source can be used to discover the ID of a
|
|
137
173
|
resource pool in vSphere. This is useful to return the ID of a resource pool
|
|
@@ -140,14 +176,30 @@ def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[str]]
|
|
|
140
176
|
|
|
141
177
|
## Example Usage
|
|
142
178
|
|
|
179
|
+
### Find a Resource Pool by Path
|
|
180
|
+
|
|
181
|
+
```python
|
|
182
|
+
import pulumi
|
|
183
|
+
import pulumi_vsphere as vsphere
|
|
184
|
+
|
|
185
|
+
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
186
|
+
pool = vsphere.get_resource_pool(name="cluster-01/Resources",
|
|
187
|
+
datacenter_id=datacenter.id)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Find a Child Resource Pool Using the Parent ID
|
|
191
|
+
|
|
143
192
|
```python
|
|
144
193
|
import pulumi
|
|
145
194
|
import pulumi_vsphere as vsphere
|
|
146
195
|
|
|
147
196
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
148
|
-
|
|
197
|
+
parent_pool = vsphere.get_resource_pool(name="cluster-01/Resources",
|
|
149
198
|
datacenter_id=datacenter.id)
|
|
199
|
+
child_pool = vsphere.get_resource_pool(name="example",
|
|
200
|
+
parent_resource_pool_id=parent_pool.id)
|
|
150
201
|
```
|
|
202
|
+
|
|
151
203
|
### Specifying the Root Resource Pool for a Standalone ESXi Host
|
|
152
204
|
|
|
153
205
|
> **NOTE:** Returning the root resource pool for a cluster can be done
|
|
@@ -155,32 +207,47 @@ def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[str]]
|
|
|
155
207
|
data source.
|
|
156
208
|
|
|
157
209
|
All compute resources in vSphere have a resource pool, even if one has not been
|
|
158
|
-
explicitly created. This resource pool is referred to as the
|
|
159
|
-
|
|
210
|
+
explicitly created. This resource pool is referred to as the _root resource
|
|
211
|
+
pool_ and can be looked up by specifying the path.
|
|
160
212
|
|
|
161
213
|
```python
|
|
162
214
|
import pulumi
|
|
163
215
|
import pulumi_vsphere as vsphere
|
|
164
216
|
|
|
165
217
|
pool = vsphere.get_resource_pool(name="esxi-01.example.com/Resources",
|
|
166
|
-
datacenter_id=
|
|
218
|
+
datacenter_id=datacenter["id"])
|
|
167
219
|
```
|
|
168
220
|
|
|
169
|
-
For more information on the root resource pool, see
|
|
221
|
+
For more information on the root resource pool, see
|
|
222
|
+
[Managing Resource Pools][vmware-docs-resource-pools] in the vSphere
|
|
223
|
+
documentation.
|
|
170
224
|
|
|
171
|
-
[vmware-docs-resource-pools]: https://
|
|
225
|
+
[vmware-docs-resource-pools]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-resource-management-8-0/managing-resource-pools.html
|
|
172
226
|
|
|
173
227
|
|
|
174
|
-
:param str datacenter_id: The managed object reference ID
|
|
228
|
+
:param _builtins.str datacenter_id: The managed object reference ID
|
|
175
229
|
of the datacenter in which the resource pool is located. This can be omitted
|
|
176
230
|
if the search path used in `name` is an absolute path. For default
|
|
177
231
|
datacenters, use the id attribute from an empty `Datacenter` data
|
|
178
|
-
source
|
|
232
|
+
source..
|
|
233
|
+
:param _builtins.str name: The name of the resource pool. This can be a name or
|
|
234
|
+
path. This is required when using vCenter.
|
|
235
|
+
:param _builtins.str parent_resource_pool_id: The managed object ID
|
|
236
|
+
of the parent resource pool. When specified, the `name` parameter is used to find
|
|
237
|
+
a child resource pool with the given name under this parent resource pool.
|
|
179
238
|
|
|
180
239
|
> **Note:** When using ESXi without a vCenter Server instance, you do not
|
|
181
240
|
need to specify either attribute to use this data source. An empty declaration
|
|
182
241
|
will load the ESXi host's root resource pool.
|
|
183
|
-
:param str name: The name of the resource pool. This can be a name or
|
|
184
|
-
path. This is required when using vCenter.
|
|
185
242
|
"""
|
|
186
|
-
|
|
243
|
+
__args__ = dict()
|
|
244
|
+
__args__['datacenterId'] = datacenter_id
|
|
245
|
+
__args__['name'] = name
|
|
246
|
+
__args__['parentResourcePoolId'] = parent_resource_pool_id
|
|
247
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
248
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getResourcePool:getResourcePool', __args__, opts=opts, typ=GetResourcePoolResult)
|
|
249
|
+
return __ret__.apply(lambda __response__: GetResourcePoolResult(
|
|
250
|
+
datacenter_id=pulumi.get(__response__, 'datacenter_id'),
|
|
251
|
+
id=pulumi.get(__response__, 'id'),
|
|
252
|
+
name=pulumi.get(__response__, 'name'),
|
|
253
|
+
parent_resource_pool_id=pulumi.get(__response__, 'parent_resource_pool_id')))
|
pulumi_vsphere/get_role.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = [
|
|
@@ -38,38 +43,38 @@ class GetRoleResult:
|
|
|
38
43
|
raise TypeError("Expected argument 'role_privileges' to be a list")
|
|
39
44
|
pulumi.set(__self__, "role_privileges", role_privileges)
|
|
40
45
|
|
|
41
|
-
@property
|
|
46
|
+
@_builtins.property
|
|
42
47
|
@pulumi.getter
|
|
43
|
-
def description(self) -> Optional[str]:
|
|
48
|
+
def description(self) -> Optional[_builtins.str]:
|
|
44
49
|
"""
|
|
45
50
|
The description of the role.
|
|
46
51
|
"""
|
|
47
52
|
return pulumi.get(self, "description")
|
|
48
53
|
|
|
49
|
-
@property
|
|
54
|
+
@_builtins.property
|
|
50
55
|
@pulumi.getter
|
|
51
|
-
def id(self) -> str:
|
|
56
|
+
def id(self) -> _builtins.str:
|
|
52
57
|
"""
|
|
53
58
|
The provider-assigned unique ID for this managed resource.
|
|
54
59
|
"""
|
|
55
60
|
return pulumi.get(self, "id")
|
|
56
61
|
|
|
57
|
-
@property
|
|
62
|
+
@_builtins.property
|
|
58
63
|
@pulumi.getter
|
|
59
|
-
def label(self) -> str:
|
|
64
|
+
def label(self) -> _builtins.str:
|
|
60
65
|
"""
|
|
61
66
|
The display label of the role.
|
|
62
67
|
"""
|
|
63
68
|
return pulumi.get(self, "label")
|
|
64
69
|
|
|
65
|
-
@property
|
|
70
|
+
@_builtins.property
|
|
66
71
|
@pulumi.getter
|
|
67
|
-
def name(self) -> Optional[str]:
|
|
72
|
+
def name(self) -> Optional[_builtins.str]:
|
|
68
73
|
return pulumi.get(self, "name")
|
|
69
74
|
|
|
70
|
-
@property
|
|
75
|
+
@_builtins.property
|
|
71
76
|
@pulumi.getter(name="rolePrivileges")
|
|
72
|
-
def role_privileges(self) -> Optional[Sequence[str]]:
|
|
77
|
+
def role_privileges(self) -> Optional[Sequence[_builtins.str]]:
|
|
73
78
|
"""
|
|
74
79
|
The privileges associated with the role.
|
|
75
80
|
"""
|
|
@@ -89,14 +94,14 @@ class AwaitableGetRoleResult(GetRoleResult):
|
|
|
89
94
|
role_privileges=self.role_privileges)
|
|
90
95
|
|
|
91
96
|
|
|
92
|
-
def get_role(description: Optional[str] = None,
|
|
93
|
-
label: Optional[str] = None,
|
|
94
|
-
name: Optional[str] = None,
|
|
95
|
-
role_privileges: Optional[Sequence[str]] = None,
|
|
97
|
+
def get_role(description: Optional[_builtins.str] = None,
|
|
98
|
+
label: Optional[_builtins.str] = None,
|
|
99
|
+
name: Optional[_builtins.str] = None,
|
|
100
|
+
role_privileges: Optional[Sequence[_builtins.str]] = None,
|
|
96
101
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRoleResult:
|
|
97
102
|
"""
|
|
98
|
-
The `Role` data source can be used to discover the `id` and privileges
|
|
99
|
-
with a role given its name or display label.
|
|
103
|
+
The `Role` data source can be used to discover the `id` and privileges
|
|
104
|
+
associated with a role given its name or display label.
|
|
100
105
|
|
|
101
106
|
## Example Usage
|
|
102
107
|
|
|
@@ -108,9 +113,9 @@ def get_role(description: Optional[str] = None,
|
|
|
108
113
|
```
|
|
109
114
|
|
|
110
115
|
|
|
111
|
-
:param str description: The description of the role.
|
|
112
|
-
:param str label: The label of the role.
|
|
113
|
-
:param Sequence[str] role_privileges: The privileges associated with the role.
|
|
116
|
+
:param _builtins.str description: The description of the role.
|
|
117
|
+
:param _builtins.str label: The label of the role.
|
|
118
|
+
:param Sequence[_builtins.str] role_privileges: The privileges associated with the role.
|
|
114
119
|
"""
|
|
115
120
|
__args__ = dict()
|
|
116
121
|
__args__['description'] = description
|
|
@@ -126,17 +131,14 @@ def get_role(description: Optional[str] = None,
|
|
|
126
131
|
label=pulumi.get(__ret__, 'label'),
|
|
127
132
|
name=pulumi.get(__ret__, 'name'),
|
|
128
133
|
role_privileges=pulumi.get(__ret__, 'role_privileges'))
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
name: Optional[pulumi.Input[Optional[str]]] = None,
|
|
135
|
-
role_privileges: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
|
|
136
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRoleResult]:
|
|
134
|
+
def get_role_output(description: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
135
|
+
label: Optional[pulumi.Input[_builtins.str]] = None,
|
|
136
|
+
name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
137
|
+
role_privileges: Optional[pulumi.Input[Optional[Sequence[_builtins.str]]]] = None,
|
|
138
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetRoleResult]:
|
|
137
139
|
"""
|
|
138
|
-
The `Role` data source can be used to discover the `id` and privileges
|
|
139
|
-
with a role given its name or display label.
|
|
140
|
+
The `Role` data source can be used to discover the `id` and privileges
|
|
141
|
+
associated with a role given its name or display label.
|
|
140
142
|
|
|
141
143
|
## Example Usage
|
|
142
144
|
|
|
@@ -148,8 +150,20 @@ def get_role_output(description: Optional[pulumi.Input[Optional[str]]] = None,
|
|
|
148
150
|
```
|
|
149
151
|
|
|
150
152
|
|
|
151
|
-
:param str description: The description of the role.
|
|
152
|
-
:param str label: The label of the role.
|
|
153
|
-
:param Sequence[str] role_privileges: The privileges associated with the role.
|
|
153
|
+
:param _builtins.str description: The description of the role.
|
|
154
|
+
:param _builtins.str label: The label of the role.
|
|
155
|
+
:param Sequence[_builtins.str] role_privileges: The privileges associated with the role.
|
|
154
156
|
"""
|
|
155
|
-
|
|
157
|
+
__args__ = dict()
|
|
158
|
+
__args__['description'] = description
|
|
159
|
+
__args__['label'] = label
|
|
160
|
+
__args__['name'] = name
|
|
161
|
+
__args__['rolePrivileges'] = role_privileges
|
|
162
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
163
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getRole:getRole', __args__, opts=opts, typ=GetRoleResult)
|
|
164
|
+
return __ret__.apply(lambda __response__: GetRoleResult(
|
|
165
|
+
description=pulumi.get(__response__, 'description'),
|
|
166
|
+
id=pulumi.get(__response__, 'id'),
|
|
167
|
+
label=pulumi.get(__response__, 'label'),
|
|
168
|
+
name=pulumi.get(__response__, 'name'),
|
|
169
|
+
role_privileges=pulumi.get(__response__, 'role_privileges')))
|
pulumi_vsphere/get_tag.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
|
|
12
17
|
__all__ = [
|
|
@@ -35,27 +40,27 @@ class GetTagResult:
|
|
|
35
40
|
raise TypeError("Expected argument 'name' to be a str")
|
|
36
41
|
pulumi.set(__self__, "name", name)
|
|
37
42
|
|
|
38
|
-
@property
|
|
43
|
+
@_builtins.property
|
|
39
44
|
@pulumi.getter(name="categoryId")
|
|
40
|
-
def category_id(self) -> str:
|
|
45
|
+
def category_id(self) -> _builtins.str:
|
|
41
46
|
return pulumi.get(self, "category_id")
|
|
42
47
|
|
|
43
|
-
@property
|
|
48
|
+
@_builtins.property
|
|
44
49
|
@pulumi.getter
|
|
45
|
-
def description(self) -> str:
|
|
50
|
+
def description(self) -> _builtins.str:
|
|
46
51
|
return pulumi.get(self, "description")
|
|
47
52
|
|
|
48
|
-
@property
|
|
53
|
+
@_builtins.property
|
|
49
54
|
@pulumi.getter
|
|
50
|
-
def id(self) -> str:
|
|
55
|
+
def id(self) -> _builtins.str:
|
|
51
56
|
"""
|
|
52
57
|
The provider-assigned unique ID for this managed resource.
|
|
53
58
|
"""
|
|
54
59
|
return pulumi.get(self, "id")
|
|
55
60
|
|
|
56
|
-
@property
|
|
61
|
+
@_builtins.property
|
|
57
62
|
@pulumi.getter
|
|
58
|
-
def name(self) -> str:
|
|
63
|
+
def name(self) -> _builtins.str:
|
|
59
64
|
return pulumi.get(self, "name")
|
|
60
65
|
|
|
61
66
|
|
|
@@ -71,8 +76,8 @@ class AwaitableGetTagResult(GetTagResult):
|
|
|
71
76
|
name=self.name)
|
|
72
77
|
|
|
73
78
|
|
|
74
|
-
def get_tag(category_id: Optional[str] = None,
|
|
75
|
-
name: Optional[str] = None,
|
|
79
|
+
def get_tag(category_id: Optional[_builtins.str] = None,
|
|
80
|
+
name: Optional[_builtins.str] = None,
|
|
76
81
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetTagResult:
|
|
77
82
|
"""
|
|
78
83
|
The `Tag` data source can be used to reference tags that are not
|
|
@@ -96,9 +101,9 @@ def get_tag(category_id: Optional[str] = None,
|
|
|
96
101
|
```
|
|
97
102
|
|
|
98
103
|
|
|
99
|
-
:param str category_id: The ID of the tag category in which the tag is
|
|
104
|
+
:param _builtins.str category_id: The ID of the tag category in which the tag is
|
|
100
105
|
located.
|
|
101
|
-
:param str name: The name of the tag.
|
|
106
|
+
:param _builtins.str name: The name of the tag.
|
|
102
107
|
"""
|
|
103
108
|
__args__ = dict()
|
|
104
109
|
__args__['categoryId'] = category_id
|
|
@@ -111,12 +116,9 @@ def get_tag(category_id: Optional[str] = None,
|
|
|
111
116
|
description=pulumi.get(__ret__, 'description'),
|
|
112
117
|
id=pulumi.get(__ret__, 'id'),
|
|
113
118
|
name=pulumi.get(__ret__, 'name'))
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
def get_tag_output(category_id: Optional[pulumi.Input[str]] = None,
|
|
118
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
119
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetTagResult]:
|
|
119
|
+
def get_tag_output(category_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
120
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
121
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetTagResult]:
|
|
120
122
|
"""
|
|
121
123
|
The `Tag` data source can be used to reference tags that are not
|
|
122
124
|
managed by this provider. Its attributes are exactly the same as the `Tag`
|
|
@@ -139,8 +141,17 @@ def get_tag_output(category_id: Optional[pulumi.Input[str]] = None,
|
|
|
139
141
|
```
|
|
140
142
|
|
|
141
143
|
|
|
142
|
-
:param str category_id: The ID of the tag category in which the tag is
|
|
144
|
+
:param _builtins.str category_id: The ID of the tag category in which the tag is
|
|
143
145
|
located.
|
|
144
|
-
:param str name: The name of the tag.
|
|
146
|
+
:param _builtins.str name: The name of the tag.
|
|
145
147
|
"""
|
|
146
|
-
|
|
148
|
+
__args__ = dict()
|
|
149
|
+
__args__['categoryId'] = category_id
|
|
150
|
+
__args__['name'] = name
|
|
151
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
152
|
+
__ret__ = pulumi.runtime.invoke_output('vsphere:index/getTag:getTag', __args__, opts=opts, typ=GetTagResult)
|
|
153
|
+
return __ret__.apply(lambda __response__: GetTagResult(
|
|
154
|
+
category_id=pulumi.get(__response__, 'category_id'),
|
|
155
|
+
description=pulumi.get(__response__, 'description'),
|
|
156
|
+
id=pulumi.get(__response__, 'id'),
|
|
157
|
+
name=pulumi.get(__response__, 'name')))
|