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,10 +4,17 @@
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
16
+ from . import outputs
17
+ from ._inputs import *
11
18
 
12
19
  __all__ = [
13
20
  'GetNetworkResult',
@@ -21,13 +28,16 @@ class GetNetworkResult:
21
28
  """
22
29
  A collection of values returned by getNetwork.
23
30
  """
24
- def __init__(__self__, datacenter_id=None, distributed_virtual_switch_uuid=None, id=None, name=None, type=None):
31
+ def __init__(__self__, datacenter_id=None, distributed_virtual_switch_uuid=None, filters=None, id=None, name=None, type=None):
25
32
  if datacenter_id and not isinstance(datacenter_id, str):
26
33
  raise TypeError("Expected argument 'datacenter_id' to be a str")
27
34
  pulumi.set(__self__, "datacenter_id", datacenter_id)
28
35
  if distributed_virtual_switch_uuid and not isinstance(distributed_virtual_switch_uuid, str):
29
36
  raise TypeError("Expected argument 'distributed_virtual_switch_uuid' to be a str")
30
37
  pulumi.set(__self__, "distributed_virtual_switch_uuid", distributed_virtual_switch_uuid)
38
+ if filters and not isinstance(filters, list):
39
+ raise TypeError("Expected argument 'filters' to be a list")
40
+ pulumi.set(__self__, "filters", filters)
31
41
  if id and not isinstance(id, str):
32
42
  raise TypeError("Expected argument 'id' to be a str")
33
43
  pulumi.set(__self__, "id", id)
@@ -48,6 +58,11 @@ class GetNetworkResult:
48
58
  def distributed_virtual_switch_uuid(self) -> Optional[str]:
49
59
  return pulumi.get(self, "distributed_virtual_switch_uuid")
50
60
 
61
+ @property
62
+ @pulumi.getter
63
+ def filters(self) -> Optional[Sequence['outputs.GetNetworkFilterResult']]:
64
+ return pulumi.get(self, "filters")
65
+
51
66
  @property
52
67
  @pulumi.getter
53
68
  def id(self) -> str:
@@ -81,6 +96,7 @@ class AwaitableGetNetworkResult(GetNetworkResult):
81
96
  return GetNetworkResult(
82
97
  datacenter_id=self.datacenter_id,
83
98
  distributed_virtual_switch_uuid=self.distributed_virtual_switch_uuid,
99
+ filters=self.filters,
84
100
  id=self.id,
85
101
  name=self.name,
86
102
  type=self.type)
@@ -88,18 +104,18 @@ class AwaitableGetNetworkResult(GetNetworkResult):
88
104
 
89
105
  def get_network(datacenter_id: Optional[str] = None,
90
106
  distributed_virtual_switch_uuid: Optional[str] = None,
107
+ filters: Optional[Sequence[Union['GetNetworkFilterArgs', 'GetNetworkFilterArgsDict']]] = None,
91
108
  name: Optional[str] = None,
92
109
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNetworkResult:
93
110
  """
94
- The `get_network` data source can be used to discover the ID of a network
95
- in vSphere. This can be any network that can be used as the backing for a
96
- network interface for `VirtualMachine` or any other vSphere resource
97
- that requires a network. This includes standard (host-based) port groups,
98
- distributed port groups, or opaque networks such as those managed by NSX.
111
+ The `get_network` data source can be used to discover the ID of a network in
112
+ vSphere. This can be any network that can be used as the backing for a network
113
+ interface for `VirtualMachine` or any other vSphere resource that
114
+ requires a network. This includes standard (host-based) port groups, distributed
115
+ port groups, or opaque networks such as those managed by NSX.
99
116
 
100
117
  ## Example Usage
101
118
 
102
- <!--Start PulumiCodeChooser -->
103
119
  ```python
104
120
  import pulumi
105
121
  import pulumi_vsphere as vsphere
@@ -108,7 +124,20 @@ def get_network(datacenter_id: Optional[str] = None,
108
124
  network = vsphere.get_network(name="VM Network",
109
125
  datacenter_id=datacenter.id)
110
126
  ```
111
- <!--End PulumiCodeChooser -->
127
+
128
+ ### Additional Examples
129
+
130
+ ```python
131
+ import pulumi
132
+ import pulumi_vsphere as vsphere
133
+
134
+ datacenter = vsphere.get_datacenter(name="dc-01")
135
+ my_port_group = vsphere.get_network(datacenter_id=datacenter.id,
136
+ name="VM Network",
137
+ filters=[{
138
+ "network_type": "Network",
139
+ }])
140
+ ```
112
141
 
113
142
 
114
143
  :param str datacenter_id: The managed object reference ID
@@ -117,13 +146,15 @@ def get_network(datacenter_id: Optional[str] = None,
117
146
  use the `id` attribute from an empty `Datacenter` data source.
118
147
  :param str distributed_virtual_switch_uuid: For distributed port group type
119
148
  network objects, the ID of the distributed virtual switch for which the port
120
- group belongs. It is useful to differentiate port groups with same name
121
- using the distributed virtual switch ID.
149
+ group belongs. It is useful to differentiate port groups with same name using
150
+ the distributed virtual switch ID.
151
+ :param Sequence[Union['GetNetworkFilterArgs', 'GetNetworkFilterArgsDict']] filters: Apply a filter for the discovered network.
122
152
  :param str name: The name of the network. This can be a name or path.
123
153
  """
124
154
  __args__ = dict()
125
155
  __args__['datacenterId'] = datacenter_id
126
156
  __args__['distributedVirtualSwitchUuid'] = distributed_virtual_switch_uuid
157
+ __args__['filters'] = filters
127
158
  __args__['name'] = name
128
159
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
129
160
  __ret__ = pulumi.runtime.invoke('vsphere:index/getNetwork:getNetwork', __args__, opts=opts, typ=GetNetworkResult).value
@@ -131,26 +162,24 @@ def get_network(datacenter_id: Optional[str] = None,
131
162
  return AwaitableGetNetworkResult(
132
163
  datacenter_id=pulumi.get(__ret__, 'datacenter_id'),
133
164
  distributed_virtual_switch_uuid=pulumi.get(__ret__, 'distributed_virtual_switch_uuid'),
165
+ filters=pulumi.get(__ret__, 'filters'),
134
166
  id=pulumi.get(__ret__, 'id'),
135
167
  name=pulumi.get(__ret__, 'name'),
136
168
  type=pulumi.get(__ret__, 'type'))
137
-
138
-
139
- @_utilities.lift_output_func(get_network)
140
169
  def get_network_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = None,
141
170
  distributed_virtual_switch_uuid: Optional[pulumi.Input[Optional[str]]] = None,
171
+ filters: Optional[pulumi.Input[Optional[Sequence[Union['GetNetworkFilterArgs', 'GetNetworkFilterArgsDict']]]]] = None,
142
172
  name: Optional[pulumi.Input[str]] = None,
143
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNetworkResult]:
173
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNetworkResult]:
144
174
  """
145
- The `get_network` data source can be used to discover the ID of a network
146
- in vSphere. This can be any network that can be used as the backing for a
147
- network interface for `VirtualMachine` or any other vSphere resource
148
- that requires a network. This includes standard (host-based) port groups,
149
- distributed port groups, or opaque networks such as those managed by NSX.
175
+ The `get_network` data source can be used to discover the ID of a network in
176
+ vSphere. This can be any network that can be used as the backing for a network
177
+ interface for `VirtualMachine` or any other vSphere resource that
178
+ requires a network. This includes standard (host-based) port groups, distributed
179
+ port groups, or opaque networks such as those managed by NSX.
150
180
 
151
181
  ## Example Usage
152
182
 
153
- <!--Start PulumiCodeChooser -->
154
183
  ```python
155
184
  import pulumi
156
185
  import pulumi_vsphere as vsphere
@@ -159,7 +188,20 @@ def get_network_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = No
159
188
  network = vsphere.get_network(name="VM Network",
160
189
  datacenter_id=datacenter.id)
161
190
  ```
162
- <!--End PulumiCodeChooser -->
191
+
192
+ ### Additional Examples
193
+
194
+ ```python
195
+ import pulumi
196
+ import pulumi_vsphere as vsphere
197
+
198
+ datacenter = vsphere.get_datacenter(name="dc-01")
199
+ my_port_group = vsphere.get_network(datacenter_id=datacenter.id,
200
+ name="VM Network",
201
+ filters=[{
202
+ "network_type": "Network",
203
+ }])
204
+ ```
163
205
 
164
206
 
165
207
  :param str datacenter_id: The managed object reference ID
@@ -168,8 +210,22 @@ def get_network_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = No
168
210
  use the `id` attribute from an empty `Datacenter` data source.
169
211
  :param str distributed_virtual_switch_uuid: For distributed port group type
170
212
  network objects, the ID of the distributed virtual switch for which the port
171
- group belongs. It is useful to differentiate port groups with same name
172
- using the distributed virtual switch ID.
213
+ group belongs. It is useful to differentiate port groups with same name using
214
+ the distributed virtual switch ID.
215
+ :param Sequence[Union['GetNetworkFilterArgs', 'GetNetworkFilterArgsDict']] filters: Apply a filter for the discovered network.
173
216
  :param str name: The name of the network. This can be a name or path.
174
217
  """
175
- ...
218
+ __args__ = dict()
219
+ __args__['datacenterId'] = datacenter_id
220
+ __args__['distributedVirtualSwitchUuid'] = distributed_virtual_switch_uuid
221
+ __args__['filters'] = filters
222
+ __args__['name'] = name
223
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
224
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getNetwork:getNetwork', __args__, opts=opts, typ=GetNetworkResult)
225
+ return __ret__.apply(lambda __response__: GetNetworkResult(
226
+ datacenter_id=pulumi.get(__response__, 'datacenter_id'),
227
+ distributed_virtual_switch_uuid=pulumi.get(__response__, 'distributed_virtual_switch_uuid'),
228
+ filters=pulumi.get(__response__, 'filters'),
229
+ id=pulumi.get(__response__, 'id'),
230
+ name=pulumi.get(__response__, 'name'),
231
+ type=pulumi.get(__response__, 'type')))
@@ -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__ = [
@@ -468,9 +473,6 @@ def get_ovf_vm_template(allow_unverified_ssl_cert: Optional[bool] = None,
468
473
  scsi_controller_count=pulumi.get(__ret__, 'scsi_controller_count'),
469
474
  scsi_type=pulumi.get(__ret__, 'scsi_type'),
470
475
  swap_placement_policy=pulumi.get(__ret__, 'swap_placement_policy'))
471
-
472
-
473
- @_utilities.lift_output_func(get_ovf_vm_template)
474
476
  def get_ovf_vm_template_output(allow_unverified_ssl_cert: Optional[pulumi.Input[Optional[bool]]] = None,
475
477
  datastore_id: Optional[pulumi.Input[Optional[str]]] = None,
476
478
  deployment_option: Optional[pulumi.Input[Optional[str]]] = None,
@@ -485,7 +487,7 @@ def get_ovf_vm_template_output(allow_unverified_ssl_cert: Optional[pulumi.Input[
485
487
  ovf_network_map: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
486
488
  remote_ovf_url: Optional[pulumi.Input[Optional[str]]] = None,
487
489
  resource_pool_id: Optional[pulumi.Input[str]] = None,
488
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetOvfVmTemplateResult]:
490
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetOvfVmTemplateResult]:
489
491
  """
490
492
  The `get_ovf_vm_template` data source can be used to submit an OVF to
491
493
  vSphere and extract its hardware settings in a form that can be then used as
@@ -523,4 +525,53 @@ def get_ovf_vm_template_output(allow_unverified_ssl_cert: Optional[pulumi.Input[
523
525
  :param str resource_pool_id: The ID of a resource pool in which to place
524
526
  the virtual machine.
525
527
  """
526
- ...
528
+ __args__ = dict()
529
+ __args__['allowUnverifiedSslCert'] = allow_unverified_ssl_cert
530
+ __args__['datastoreId'] = datastore_id
531
+ __args__['deploymentOption'] = deployment_option
532
+ __args__['diskProvisioning'] = disk_provisioning
533
+ __args__['enableHiddenProperties'] = enable_hidden_properties
534
+ __args__['folder'] = folder
535
+ __args__['hostSystemId'] = host_system_id
536
+ __args__['ipAllocationPolicy'] = ip_allocation_policy
537
+ __args__['ipProtocol'] = ip_protocol
538
+ __args__['localOvfPath'] = local_ovf_path
539
+ __args__['name'] = name
540
+ __args__['ovfNetworkMap'] = ovf_network_map
541
+ __args__['remoteOvfUrl'] = remote_ovf_url
542
+ __args__['resourcePoolId'] = resource_pool_id
543
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
544
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getOvfVmTemplate:getOvfVmTemplate', __args__, opts=opts, typ=GetOvfVmTemplateResult)
545
+ return __ret__.apply(lambda __response__: GetOvfVmTemplateResult(
546
+ allow_unverified_ssl_cert=pulumi.get(__response__, 'allow_unverified_ssl_cert'),
547
+ alternate_guest_name=pulumi.get(__response__, 'alternate_guest_name'),
548
+ annotation=pulumi.get(__response__, 'annotation'),
549
+ cpu_hot_add_enabled=pulumi.get(__response__, 'cpu_hot_add_enabled'),
550
+ cpu_hot_remove_enabled=pulumi.get(__response__, 'cpu_hot_remove_enabled'),
551
+ cpu_performance_counters_enabled=pulumi.get(__response__, 'cpu_performance_counters_enabled'),
552
+ datastore_id=pulumi.get(__response__, 'datastore_id'),
553
+ deployment_option=pulumi.get(__response__, 'deployment_option'),
554
+ disk_provisioning=pulumi.get(__response__, 'disk_provisioning'),
555
+ enable_hidden_properties=pulumi.get(__response__, 'enable_hidden_properties'),
556
+ firmware=pulumi.get(__response__, 'firmware'),
557
+ folder=pulumi.get(__response__, 'folder'),
558
+ guest_id=pulumi.get(__response__, 'guest_id'),
559
+ host_system_id=pulumi.get(__response__, 'host_system_id'),
560
+ id=pulumi.get(__response__, 'id'),
561
+ ide_controller_count=pulumi.get(__response__, 'ide_controller_count'),
562
+ ip_allocation_policy=pulumi.get(__response__, 'ip_allocation_policy'),
563
+ ip_protocol=pulumi.get(__response__, 'ip_protocol'),
564
+ local_ovf_path=pulumi.get(__response__, 'local_ovf_path'),
565
+ memory=pulumi.get(__response__, 'memory'),
566
+ memory_hot_add_enabled=pulumi.get(__response__, 'memory_hot_add_enabled'),
567
+ name=pulumi.get(__response__, 'name'),
568
+ nested_hv_enabled=pulumi.get(__response__, 'nested_hv_enabled'),
569
+ num_cores_per_socket=pulumi.get(__response__, 'num_cores_per_socket'),
570
+ num_cpus=pulumi.get(__response__, 'num_cpus'),
571
+ ovf_network_map=pulumi.get(__response__, 'ovf_network_map'),
572
+ remote_ovf_url=pulumi.get(__response__, 'remote_ovf_url'),
573
+ resource_pool_id=pulumi.get(__response__, 'resource_pool_id'),
574
+ sata_controller_count=pulumi.get(__response__, 'sata_controller_count'),
575
+ scsi_controller_count=pulumi.get(__response__, 'scsi_controller_count'),
576
+ scsi_type=pulumi.get(__response__, 'scsi_type'),
577
+ swap_placement_policy=pulumi.get(__response__, 'swap_placement_policy')))
@@ -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__ = [
@@ -65,7 +70,6 @@ def get_policy(name: Optional[str] = None,
65
70
 
66
71
  ## Example Usage
67
72
 
68
- <!--Start PulumiCodeChooser -->
69
73
  ```python
70
74
  import pulumi
71
75
  import pulumi_vsphere as vsphere
@@ -73,7 +77,6 @@ def get_policy(name: Optional[str] = None,
73
77
  prod_platinum_replicated = vsphere.get_policy(name="prod_platinum_replicated")
74
78
  dev_silver_nonreplicated = vsphere.get_policy(name="dev_silver_nonreplicated")
75
79
  ```
76
- <!--End PulumiCodeChooser -->
77
80
 
78
81
 
79
82
  :param str name: The name of the storage policy.
@@ -86,11 +89,8 @@ def get_policy(name: Optional[str] = None,
86
89
  return AwaitableGetPolicyResult(
87
90
  id=pulumi.get(__ret__, 'id'),
88
91
  name=pulumi.get(__ret__, 'name'))
89
-
90
-
91
- @_utilities.lift_output_func(get_policy)
92
92
  def get_policy_output(name: Optional[pulumi.Input[str]] = None,
93
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPolicyResult]:
93
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPolicyResult]:
94
94
  """
95
95
  The `get_policy` data source can be used to discover the UUID of a
96
96
  storage policy. This can then be used with other resources or data sources that
@@ -101,7 +101,6 @@ def get_policy_output(name: Optional[pulumi.Input[str]] = None,
101
101
 
102
102
  ## Example Usage
103
103
 
104
- <!--Start PulumiCodeChooser -->
105
104
  ```python
106
105
  import pulumi
107
106
  import pulumi_vsphere as vsphere
@@ -109,9 +108,14 @@ def get_policy_output(name: Optional[pulumi.Input[str]] = None,
109
108
  prod_platinum_replicated = vsphere.get_policy(name="prod_platinum_replicated")
110
109
  dev_silver_nonreplicated = vsphere.get_policy(name="dev_silver_nonreplicated")
111
110
  ```
112
- <!--End PulumiCodeChooser -->
113
111
 
114
112
 
115
113
  :param str name: The name of the storage policy.
116
114
  """
117
- ...
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')))
@@ -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__ = [
@@ -73,7 +78,6 @@ def get_resource_pool(datacenter_id: Optional[str] = None,
73
78
 
74
79
  ## Example Usage
75
80
 
76
- <!--Start PulumiCodeChooser -->
77
81
  ```python
78
82
  import pulumi
79
83
  import pulumi_vsphere as vsphere
@@ -82,7 +86,6 @@ def get_resource_pool(datacenter_id: Optional[str] = None,
82
86
  pool = vsphere.get_resource_pool(name="resource-pool-01",
83
87
  datacenter_id=datacenter.id)
84
88
  ```
85
- <!--End PulumiCodeChooser -->
86
89
 
87
90
  ### Specifying the Root Resource Pool for a Standalone ESXi Host
88
91
 
@@ -91,22 +94,22 @@ def get_resource_pool(datacenter_id: Optional[str] = None,
91
94
  data source.
92
95
 
93
96
  All compute resources in vSphere have a resource pool, even if one has not been
94
- explicitly created. This resource pool is referred to as the
95
- _root resource pool_ and can be looked up by specifying the path.
97
+ explicitly created. This resource pool is referred to as the _root resource
98
+ pool_ and can be looked up by specifying the path.
96
99
 
97
- <!--Start PulumiCodeChooser -->
98
100
  ```python
99
101
  import pulumi
100
102
  import pulumi_vsphere as vsphere
101
103
 
102
104
  pool = vsphere.get_resource_pool(name="esxi-01.example.com/Resources",
103
- datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"])
105
+ datacenter_id=datacenter["id"])
104
106
  ```
105
- <!--End PulumiCodeChooser -->
106
107
 
107
- For more information on the root resource pool, see [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere documentation.
108
+ For more information on the root resource pool, see
109
+ [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere
110
+ documentation.
108
111
 
109
- [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html
112
+ [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-60077B40-66FF-4625-934A-641703ED7601.html
110
113
 
111
114
 
112
115
  :param str datacenter_id: The managed object reference ID
@@ -131,12 +134,9 @@ def get_resource_pool(datacenter_id: Optional[str] = None,
131
134
  datacenter_id=pulumi.get(__ret__, 'datacenter_id'),
132
135
  id=pulumi.get(__ret__, 'id'),
133
136
  name=pulumi.get(__ret__, 'name'))
134
-
135
-
136
- @_utilities.lift_output_func(get_resource_pool)
137
137
  def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = None,
138
138
  name: Optional[pulumi.Input[Optional[str]]] = None,
139
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetResourcePoolResult]:
139
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetResourcePoolResult]:
140
140
  """
141
141
  The `ResourcePool` data source can be used to discover the ID of a
142
142
  resource pool in vSphere. This is useful to return the ID of a resource pool
@@ -145,7 +145,6 @@ def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[str]]
145
145
 
146
146
  ## Example Usage
147
147
 
148
- <!--Start PulumiCodeChooser -->
149
148
  ```python
150
149
  import pulumi
151
150
  import pulumi_vsphere as vsphere
@@ -154,7 +153,6 @@ def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[str]]
154
153
  pool = vsphere.get_resource_pool(name="resource-pool-01",
155
154
  datacenter_id=datacenter.id)
156
155
  ```
157
- <!--End PulumiCodeChooser -->
158
156
 
159
157
  ### Specifying the Root Resource Pool for a Standalone ESXi Host
160
158
 
@@ -163,22 +161,22 @@ def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[str]]
163
161
  data source.
164
162
 
165
163
  All compute resources in vSphere have a resource pool, even if one has not been
166
- explicitly created. This resource pool is referred to as the
167
- _root resource pool_ and can be looked up by specifying the path.
164
+ explicitly created. This resource pool is referred to as the _root resource
165
+ pool_ and can be looked up by specifying the path.
168
166
 
169
- <!--Start PulumiCodeChooser -->
170
167
  ```python
171
168
  import pulumi
172
169
  import pulumi_vsphere as vsphere
173
170
 
174
171
  pool = vsphere.get_resource_pool(name="esxi-01.example.com/Resources",
175
- datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"])
172
+ datacenter_id=datacenter["id"])
176
173
  ```
177
- <!--End PulumiCodeChooser -->
178
174
 
179
- For more information on the root resource pool, see [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere documentation.
175
+ For more information on the root resource pool, see
176
+ [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere
177
+ documentation.
180
178
 
181
- [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html
179
+ [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-60077B40-66FF-4625-934A-641703ED7601.html
182
180
 
183
181
 
184
182
  :param str datacenter_id: The managed object reference ID
@@ -193,4 +191,12 @@ def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[str]]
193
191
  :param str name: The name of the resource pool. This can be a name or
194
192
  path. This is required when using vCenter.
195
193
  """
196
- ...
194
+ __args__ = dict()
195
+ __args__['datacenterId'] = datacenter_id
196
+ __args__['name'] = name
197
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
198
+ __ret__ = pulumi.runtime.invoke_output('vsphere:index/getResourcePool:getResourcePool', __args__, opts=opts, typ=GetResourcePoolResult)
199
+ return __ret__.apply(lambda __response__: GetResourcePoolResult(
200
+ datacenter_id=pulumi.get(__response__, 'datacenter_id'),
201
+ id=pulumi.get(__response__, 'id'),
202
+ 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__ = [
@@ -95,19 +100,17 @@ def get_role(description: Optional[str] = None,
95
100
  role_privileges: Optional[Sequence[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 associated
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
 
103
- <!--Start PulumiCodeChooser -->
104
108
  ```python
105
109
  import pulumi
106
110
  import pulumi_vsphere as vsphere
107
111
 
108
112
  terraform_role = vsphere.get_role(label="Terraform to vSphere Integration Role")
109
113
  ```
110
- <!--End PulumiCodeChooser -->
111
114
 
112
115
 
113
116
  :param str description: The description of the role.
@@ -128,32 +131,39 @@ def get_role(description: Optional[str] = None,
128
131
  label=pulumi.get(__ret__, 'label'),
129
132
  name=pulumi.get(__ret__, 'name'),
130
133
  role_privileges=pulumi.get(__ret__, 'role_privileges'))
131
-
132
-
133
- @_utilities.lift_output_func(get_role)
134
134
  def get_role_output(description: Optional[pulumi.Input[Optional[str]]] = None,
135
135
  label: Optional[pulumi.Input[str]] = None,
136
136
  name: Optional[pulumi.Input[Optional[str]]] = None,
137
137
  role_privileges: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
138
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRoleResult]:
138
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetRoleResult]:
139
139
  """
140
- The `Role` data source can be used to discover the `id` and privileges associated
141
- 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.
142
142
 
143
143
  ## Example Usage
144
144
 
145
- <!--Start PulumiCodeChooser -->
146
145
  ```python
147
146
  import pulumi
148
147
  import pulumi_vsphere as vsphere
149
148
 
150
149
  terraform_role = vsphere.get_role(label="Terraform to vSphere Integration Role")
151
150
  ```
152
- <!--End PulumiCodeChooser -->
153
151
 
154
152
 
155
153
  :param str description: The description of the role.
156
154
  :param str label: The label of the role.
157
155
  :param Sequence[str] role_privileges: The privileges associated with the role.
158
156
  """
159
- ...
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
@@ -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__ = [
@@ -86,7 +91,6 @@ def get_tag(category_id: Optional[str] = None,
86
91
 
87
92
  ## Example Usage
88
93
 
89
- <!--Start PulumiCodeChooser -->
90
94
  ```python
91
95
  import pulumi
92
96
  import pulumi_vsphere as vsphere
@@ -95,7 +99,6 @@ def get_tag(category_id: Optional[str] = None,
95
99
  tag = vsphere.get_tag(name="example-tag",
96
100
  category_id=category.id)
97
101
  ```
98
- <!--End PulumiCodeChooser -->
99
102
 
100
103
 
101
104
  :param str category_id: The ID of the tag category in which the tag is
@@ -113,12 +116,9 @@ def get_tag(category_id: Optional[str] = None,
113
116
  description=pulumi.get(__ret__, 'description'),
114
117
  id=pulumi.get(__ret__, 'id'),
115
118
  name=pulumi.get(__ret__, 'name'))
116
-
117
-
118
- @_utilities.lift_output_func(get_tag)
119
119
  def get_tag_output(category_id: Optional[pulumi.Input[str]] = None,
120
120
  name: Optional[pulumi.Input[str]] = None,
121
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetTagResult]:
121
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetTagResult]:
122
122
  """
123
123
  The `Tag` data source can be used to reference tags that are not
124
124
  managed by this provider. Its attributes are exactly the same as the `Tag`
@@ -131,7 +131,6 @@ def get_tag_output(category_id: Optional[pulumi.Input[str]] = None,
131
131
 
132
132
  ## Example Usage
133
133
 
134
- <!--Start PulumiCodeChooser -->
135
134
  ```python
136
135
  import pulumi
137
136
  import pulumi_vsphere as vsphere
@@ -140,11 +139,19 @@ def get_tag_output(category_id: Optional[pulumi.Input[str]] = None,
140
139
  tag = vsphere.get_tag(name="example-tag",
141
140
  category_id=category.id)
142
141
  ```
143
- <!--End PulumiCodeChooser -->
144
142
 
145
143
 
146
144
  :param str category_id: The ID of the tag category in which the tag is
147
145
  located.
148
146
  :param str name: The name of the tag.
149
147
  """
150
- ...
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')))