From f7c95e51e0663d3da55a41296fc0262f4cfa6f78 Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Mon, 6 Nov 2023 19:02:45 +0000 Subject: [PATCH] make build_sdks --- sdk/python/pulumi_vsphere/_inputs.py | 939 ++++++++++++-- sdk/python/pulumi_vsphere/compute_cluster.py | 800 ++++++++++-- .../compute_cluster_host_group.py | 58 +- .../compute_cluster_vm_affinity_rule.py | 76 +- .../compute_cluster_vm_anti_affinity_rule.py | 76 +- .../compute_cluster_vm_dependency_rule.py | 90 +- .../compute_cluster_vm_group.py | 58 +- .../compute_cluster_vm_host_rule.py | 100 +- sdk/python/pulumi_vsphere/config/__init__.pyi | 2 +- sdk/python/pulumi_vsphere/config/vars.py | 2 +- sdk/python/pulumi_vsphere/content_library.py | 80 +- .../pulumi_vsphere/content_library_item.py | 86 +- sdk/python/pulumi_vsphere/custom_attribute.py | 44 +- sdk/python/pulumi_vsphere/datacenter.py | 64 +- .../pulumi_vsphere/datastore_cluster.py | 314 ++++- ...datastore_cluster_vm_anti_affinity_rule.py | 76 +- .../pulumi_vsphere/distributed_port_group.py | 568 +++++++-- .../distributed_virtual_switch.py | 1128 ++++++++++++++--- .../pulumi_vsphere/dpm_host_override.py | 76 +- sdk/python/pulumi_vsphere/drs_vm_override.py | 76 +- .../pulumi_vsphere/entity_permissions.py | 62 +- sdk/python/pulumi_vsphere/file.py | 106 +- sdk/python/pulumi_vsphere/folder.py | 76 +- .../pulumi_vsphere/get_compute_cluster.py | 2 +- .../get_compute_cluster_host_group.py | 2 +- .../pulumi_vsphere/get_content_library.py | 2 +- .../get_content_library_item.py | 2 +- .../pulumi_vsphere/get_custom_attribute.py | 2 +- sdk/python/pulumi_vsphere/get_datacenter.py | 2 +- sdk/python/pulumi_vsphere/get_datastore.py | 2 +- .../pulumi_vsphere/get_datastore_cluster.py | 2 +- .../get_distributed_virtual_switch.py | 2 +- sdk/python/pulumi_vsphere/get_dynamic.py | 2 +- sdk/python/pulumi_vsphere/get_folder.py | 2 +- sdk/python/pulumi_vsphere/get_host.py | 2 +- .../pulumi_vsphere/get_host_pci_device.py | 2 +- .../pulumi_vsphere/get_host_thumbprint.py | 2 +- sdk/python/pulumi_vsphere/get_license.py | 2 +- sdk/python/pulumi_vsphere/get_network.py | 2 +- .../pulumi_vsphere/get_ovf_vm_template.py | 2 +- sdk/python/pulumi_vsphere/get_policy.py | 2 +- .../pulumi_vsphere/get_resource_pool.py | 2 +- sdk/python/pulumi_vsphere/get_role.py | 2 +- sdk/python/pulumi_vsphere/get_tag.py | 2 +- sdk/python/pulumi_vsphere/get_tag_category.py | 2 +- .../pulumi_vsphere/get_vapp_container.py | 2 +- .../pulumi_vsphere/get_virtual_machine.py | 2 +- sdk/python/pulumi_vsphere/get_vmfs_disks.py | 2 +- sdk/python/pulumi_vsphere/ha_vm_override.py | 208 ++- sdk/python/pulumi_vsphere/host.py | 150 ++- sdk/python/pulumi_vsphere/host_port_group.py | 238 +++- .../pulumi_vsphere/host_virtual_switch.py | 270 +++- sdk/python/pulumi_vsphere/license.py | 64 +- sdk/python/pulumi_vsphere/nas_datastore.py | 188 ++- sdk/python/pulumi_vsphere/outputs.py | 1043 +++++++++++++-- sdk/python/pulumi_vsphere/provider.py | 93 +- sdk/python/pulumi_vsphere/resource_pool.py | 198 ++- sdk/python/pulumi_vsphere/role.py | 48 +- .../pulumi_vsphere/storage_drs_vm_override.py | 88 +- sdk/python/pulumi_vsphere/tag.py | 54 +- sdk/python/pulumi_vsphere/tag_category.py | 64 +- sdk/python/pulumi_vsphere/vapp_container.py | 198 ++- sdk/python/pulumi_vsphere/vapp_entity.py | 144 ++- sdk/python/pulumi_vsphere/virtual_disk.py | 98 +- sdk/python/pulumi_vsphere/virtual_machine.py | 949 +++++++++++--- .../virtual_machine_snapshot.py | 102 +- .../pulumi_vsphere/vm_storage_policy.py | 54 +- sdk/python/pulumi_vsphere/vmfs_datastore.py | 132 +- sdk/python/pulumi_vsphere/vnic.py | 124 +- 69 files changed, 8035 insertions(+), 1479 deletions(-) diff --git a/sdk/python/pulumi_vsphere/_inputs.py b/sdk/python/pulumi_vsphere/_inputs.py index 88c2aa5b..350c2b1f 100644 --- a/sdk/python/pulumi_vsphere/_inputs.py +++ b/sdk/python/pulumi_vsphere/_inputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ @@ -72,10 +72,23 @@ def __init__(__self__, *, )]) ``` """ + ComputeClusterVsanDiskGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache=cache, + storages=storages, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache: Optional[pulumi.Input[str]] = None, + storages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache is not None: - pulumi.set(__self__, "cache", cache) + _setter("cache", cache) if storages is not None: - pulumi.set(__self__, "storages", storages) + _setter("storages", storages) @property @pulumi.getter @@ -145,16 +158,39 @@ def __init__(__self__, *, :param pulumi.Input[bool] published: Publish the content library. Default `false`. :param pulumi.Input[str] username: Username used for authentication. """ + ContentLibraryPublicationArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_method=authentication_method, + password=password, + publish_url=publish_url, + published=published, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_method: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + publish_url: Optional[pulumi.Input[str]] = None, + published: Optional[pulumi.Input[bool]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_method is None and 'authenticationMethod' in kwargs: + authentication_method = kwargs['authenticationMethod'] + if publish_url is None and 'publishUrl' in kwargs: + publish_url = kwargs['publishUrl'] + if authentication_method is not None: - pulumi.set(__self__, "authentication_method", authentication_method) + _setter("authentication_method", authentication_method) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if publish_url is not None: - pulumi.set(__self__, "publish_url", publish_url) + _setter("publish_url", publish_url) if published is not None: - pulumi.set(__self__, "published", published) + _setter("published", published) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="authenticationMethod") @@ -234,18 +270,47 @@ def __init__(__self__, *, :param pulumi.Input[str] subscription_url: URL of the published content library. :param pulumi.Input[str] username: Username used for authentication. """ + ContentLibrarySubscriptionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_method=authentication_method, + automatic_sync=automatic_sync, + on_demand=on_demand, + password=password, + subscription_url=subscription_url, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_method: Optional[pulumi.Input[str]] = None, + automatic_sync: Optional[pulumi.Input[bool]] = None, + on_demand: Optional[pulumi.Input[bool]] = None, + password: Optional[pulumi.Input[str]] = None, + subscription_url: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_method is None and 'authenticationMethod' in kwargs: + authentication_method = kwargs['authenticationMethod'] + if automatic_sync is None and 'automaticSync' in kwargs: + automatic_sync = kwargs['automaticSync'] + if on_demand is None and 'onDemand' in kwargs: + on_demand = kwargs['onDemand'] + if subscription_url is None and 'subscriptionUrl' in kwargs: + subscription_url = kwargs['subscriptionUrl'] + if authentication_method is not None: - pulumi.set(__self__, "authentication_method", authentication_method) + _setter("authentication_method", authentication_method) if automatic_sync is not None: - pulumi.set(__self__, "automatic_sync", automatic_sync) + _setter("automatic_sync", automatic_sync) if on_demand is not None: - pulumi.set(__self__, "on_demand", on_demand) + _setter("on_demand", on_demand) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if subscription_url is not None: - pulumi.set(__self__, "subscription_url", subscription_url) + _setter("subscription_url", subscription_url) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="authenticationMethod") @@ -325,8 +390,29 @@ class DistributedPortGroupVlanRangeArgs: def __init__(__self__, *, max_vlan: pulumi.Input[int], min_vlan: pulumi.Input[int]): - pulumi.set(__self__, "max_vlan", max_vlan) - pulumi.set(__self__, "min_vlan", min_vlan) + DistributedPortGroupVlanRangeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_vlan=max_vlan, + min_vlan=min_vlan, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_vlan: Optional[pulumi.Input[int]] = None, + min_vlan: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_vlan is None and 'maxVlan' in kwargs: + max_vlan = kwargs['maxVlan'] + if max_vlan is None: + raise TypeError("Missing 'max_vlan' argument") + if min_vlan is None and 'minVlan' in kwargs: + min_vlan = kwargs['minVlan'] + if min_vlan is None: + raise TypeError("Missing 'min_vlan' argument") + + _setter("max_vlan", max_vlan) + _setter("min_vlan", min_vlan) @property @pulumi.getter(name="maxVlan") @@ -358,9 +444,26 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] devices: The list of NIC devices to map to uplinks on the VDS, added in order they are specified. """ - pulumi.set(__self__, "host_system_id", host_system_id) + DistributedVirtualSwitchHostArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_system_id=host_system_id, + devices=devices, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_system_id: Optional[pulumi.Input[str]] = None, + devices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if host_system_id is None: + raise TypeError("Missing 'host_system_id' argument") + + _setter("host_system_id", host_system_id) if devices is not None: - pulumi.set(__self__, "devices", devices) + _setter("devices", devices) @property @pulumi.getter(name="hostSystemId") @@ -403,9 +506,36 @@ def __init__(__self__, *, :param pulumi.Input[int] secondary_vlan_id: The secondary VLAN ID. The VLAN IDs of 0 and 4095 are reserved and cannot be used in this property. """ - pulumi.set(__self__, "primary_vlan_id", primary_vlan_id) - pulumi.set(__self__, "pvlan_type", pvlan_type) - pulumi.set(__self__, "secondary_vlan_id", secondary_vlan_id) + DistributedVirtualSwitchPvlanMappingArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + primary_vlan_id=primary_vlan_id, + pvlan_type=pvlan_type, + secondary_vlan_id=secondary_vlan_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + primary_vlan_id: Optional[pulumi.Input[int]] = None, + pvlan_type: Optional[pulumi.Input[str]] = None, + secondary_vlan_id: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_vlan_id is None and 'primaryVlanId' in kwargs: + primary_vlan_id = kwargs['primaryVlanId'] + if primary_vlan_id is None: + raise TypeError("Missing 'primary_vlan_id' argument") + if pvlan_type is None and 'pvlanType' in kwargs: + pvlan_type = kwargs['pvlanType'] + if pvlan_type is None: + raise TypeError("Missing 'pvlan_type' argument") + if secondary_vlan_id is None and 'secondaryVlanId' in kwargs: + secondary_vlan_id = kwargs['secondaryVlanId'] + if secondary_vlan_id is None: + raise TypeError("Missing 'secondary_vlan_id' argument") + + _setter("primary_vlan_id", primary_vlan_id) + _setter("pvlan_type", pvlan_type) + _setter("secondary_vlan_id", secondary_vlan_id) @property @pulumi.getter(name="primaryVlanId") @@ -452,8 +582,29 @@ class DistributedVirtualSwitchVlanRangeArgs: def __init__(__self__, *, max_vlan: pulumi.Input[int], min_vlan: pulumi.Input[int]): - pulumi.set(__self__, "max_vlan", max_vlan) - pulumi.set(__self__, "min_vlan", min_vlan) + DistributedVirtualSwitchVlanRangeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_vlan=max_vlan, + min_vlan=min_vlan, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_vlan: Optional[pulumi.Input[int]] = None, + min_vlan: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_vlan is None and 'maxVlan' in kwargs: + max_vlan = kwargs['maxVlan'] + if max_vlan is None: + raise TypeError("Missing 'max_vlan' argument") + if min_vlan is None and 'minVlan' in kwargs: + min_vlan = kwargs['minVlan'] + if min_vlan is None: + raise TypeError("Missing 'min_vlan' argument") + + _setter("max_vlan", max_vlan) + _setter("min_vlan", min_vlan) @property @pulumi.getter(name="maxVlan") @@ -487,10 +638,41 @@ def __init__(__self__, *, :param pulumi.Input[str] role_id: The role id of the role to be given to the user on the specified entity. :param pulumi.Input[str] user_or_group: The user/group getting the permission. """ - pulumi.set(__self__, "is_group", is_group) - pulumi.set(__self__, "propagate", propagate) - pulumi.set(__self__, "role_id", role_id) - pulumi.set(__self__, "user_or_group", user_or_group) + EntityPermissionsPermissionArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_group=is_group, + propagate=propagate, + role_id=role_id, + user_or_group=user_or_group, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_group: Optional[pulumi.Input[bool]] = None, + propagate: Optional[pulumi.Input[bool]] = None, + role_id: Optional[pulumi.Input[str]] = None, + user_or_group: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_group is None and 'isGroup' in kwargs: + is_group = kwargs['isGroup'] + if is_group is None: + raise TypeError("Missing 'is_group' argument") + if propagate is None: + raise TypeError("Missing 'propagate' argument") + if role_id is None and 'roleId' in kwargs: + role_id = kwargs['roleId'] + if role_id is None: + raise TypeError("Missing 'role_id' argument") + if user_or_group is None and 'userOrGroup' in kwargs: + user_or_group = kwargs['userOrGroup'] + if user_or_group is None: + raise TypeError("Missing 'user_or_group' argument") + + _setter("is_group", is_group) + _setter("propagate", propagate) + _setter("role_id", role_id) + _setter("user_or_group", user_or_group) @property @pulumi.getter(name="isGroup") @@ -550,12 +732,29 @@ def __init__(__self__, *, """ :param pulumi.Input[str] key: The key for this port group as returned from the vSphere API. """ + HostPortGroupPortArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + mac_addresses=mac_addresses, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[pulumi.Input[str]] = None, + mac_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mac_addresses is None and 'macAddresses' in kwargs: + mac_addresses = kwargs['macAddresses'] + if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if mac_addresses is not None: - pulumi.set(__self__, "mac_addresses", mac_addresses) + _setter("mac_addresses", mac_addresses) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -606,16 +805,41 @@ def __init__(__self__, *, > **NOTE:** Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no `cdrom` block is present. """ + VirtualMachineCdromArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_device=client_device, + datastore_id=datastore_id, + device_address=device_address, + key=key, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_device: Optional[pulumi.Input[bool]] = None, + datastore_id: Optional[pulumi.Input[str]] = None, + device_address: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[int]] = None, + path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_device is None and 'clientDevice' in kwargs: + client_device = kwargs['clientDevice'] + if datastore_id is None and 'datastoreId' in kwargs: + datastore_id = kwargs['datastoreId'] + if device_address is None and 'deviceAddress' in kwargs: + device_address = kwargs['deviceAddress'] + if client_device is not None: - pulumi.set(__self__, "client_device", client_device) + _setter("client_device", client_device) if datastore_id is not None: - pulumi.set(__self__, "datastore_id", datastore_id) + _setter("datastore_id", datastore_id) if device_address is not None: - pulumi.set(__self__, "device_address", device_address) + _setter("device_address", device_address) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter(name="clientDevice") @@ -688,17 +912,48 @@ def __init__(__self__, *, ovf_network_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, ovf_storage_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, timeout: Optional[pulumi.Input[int]] = None): - pulumi.set(__self__, "template_uuid", template_uuid) + VirtualMachineCloneArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + template_uuid=template_uuid, + customize=customize, + linked_clone=linked_clone, + ovf_network_map=ovf_network_map, + ovf_storage_map=ovf_storage_map, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + template_uuid: Optional[pulumi.Input[str]] = None, + customize: Optional[pulumi.Input['VirtualMachineCloneCustomizeArgs']] = None, + linked_clone: Optional[pulumi.Input[bool]] = None, + ovf_network_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ovf_storage_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + timeout: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if template_uuid is None and 'templateUuid' in kwargs: + template_uuid = kwargs['templateUuid'] + if template_uuid is None: + raise TypeError("Missing 'template_uuid' argument") + if linked_clone is None and 'linkedClone' in kwargs: + linked_clone = kwargs['linkedClone'] + if ovf_network_map is None and 'ovfNetworkMap' in kwargs: + ovf_network_map = kwargs['ovfNetworkMap'] + if ovf_storage_map is None and 'ovfStorageMap' in kwargs: + ovf_storage_map = kwargs['ovfStorageMap'] + + _setter("template_uuid", template_uuid) if customize is not None: - pulumi.set(__self__, "customize", customize) + _setter("customize", customize) if linked_clone is not None: - pulumi.set(__self__, "linked_clone", linked_clone) + _setter("linked_clone", linked_clone) if ovf_network_map is not None: - pulumi.set(__self__, "ovf_network_map", ovf_network_map) + _setter("ovf_network_map", ovf_network_map) if ovf_storage_map is not None: - pulumi.set(__self__, "ovf_storage_map", ovf_storage_map) + _setter("ovf_storage_map", ovf_storage_map) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter(name="templateUuid") @@ -770,24 +1025,67 @@ def __init__(__self__, *, """ :param pulumi.Input[Sequence[pulumi.Input['VirtualMachineCloneCustomizeNetworkInterfaceArgs']]] network_interfaces: A specification for a virtual NIC on the virtual machine. See network interface options for more information. """ + VirtualMachineCloneCustomizeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_server_lists=dns_server_lists, + dns_suffix_lists=dns_suffix_lists, + ipv4_gateway=ipv4_gateway, + ipv6_gateway=ipv6_gateway, + linux_options=linux_options, + network_interfaces=network_interfaces, + timeout=timeout, + windows_options=windows_options, + windows_sysprep_text=windows_sysprep_text, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_server_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + dns_suffix_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ipv4_gateway: Optional[pulumi.Input[str]] = None, + ipv6_gateway: Optional[pulumi.Input[str]] = None, + linux_options: Optional[pulumi.Input['VirtualMachineCloneCustomizeLinuxOptionsArgs']] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineCloneCustomizeNetworkInterfaceArgs']]]] = None, + timeout: Optional[pulumi.Input[int]] = None, + windows_options: Optional[pulumi.Input['VirtualMachineCloneCustomizeWindowsOptionsArgs']] = None, + windows_sysprep_text: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_server_lists is None and 'dnsServerLists' in kwargs: + dns_server_lists = kwargs['dnsServerLists'] + if dns_suffix_lists is None and 'dnsSuffixLists' in kwargs: + dns_suffix_lists = kwargs['dnsSuffixLists'] + if ipv4_gateway is None and 'ipv4Gateway' in kwargs: + ipv4_gateway = kwargs['ipv4Gateway'] + if ipv6_gateway is None and 'ipv6Gateway' in kwargs: + ipv6_gateway = kwargs['ipv6Gateway'] + if linux_options is None and 'linuxOptions' in kwargs: + linux_options = kwargs['linuxOptions'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if windows_options is None and 'windowsOptions' in kwargs: + windows_options = kwargs['windowsOptions'] + if windows_sysprep_text is None and 'windowsSysprepText' in kwargs: + windows_sysprep_text = kwargs['windowsSysprepText'] + if dns_server_lists is not None: - pulumi.set(__self__, "dns_server_lists", dns_server_lists) + _setter("dns_server_lists", dns_server_lists) if dns_suffix_lists is not None: - pulumi.set(__self__, "dns_suffix_lists", dns_suffix_lists) + _setter("dns_suffix_lists", dns_suffix_lists) if ipv4_gateway is not None: - pulumi.set(__self__, "ipv4_gateway", ipv4_gateway) + _setter("ipv4_gateway", ipv4_gateway) if ipv6_gateway is not None: - pulumi.set(__self__, "ipv6_gateway", ipv6_gateway) + _setter("ipv6_gateway", ipv6_gateway) if linux_options is not None: - pulumi.set(__self__, "linux_options", linux_options) + _setter("linux_options", linux_options) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) if windows_options is not None: - pulumi.set(__self__, "windows_options", windows_options) + _setter("windows_options", windows_options) if windows_sysprep_text is not None: - pulumi.set(__self__, "windows_sysprep_text", windows_sysprep_text) + _setter("windows_sysprep_text", windows_sysprep_text) @property @pulumi.getter(name="dnsServerLists") @@ -882,14 +1180,45 @@ def __init__(__self__, *, hw_clock_utc: Optional[pulumi.Input[bool]] = None, script_text: Optional[pulumi.Input[str]] = None, time_zone: Optional[pulumi.Input[str]] = None): - pulumi.set(__self__, "domain", domain) - pulumi.set(__self__, "host_name", host_name) + VirtualMachineCloneCustomizeLinuxOptionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain=domain, + host_name=host_name, + hw_clock_utc=hw_clock_utc, + script_text=script_text, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain: Optional[pulumi.Input[str]] = None, + host_name: Optional[pulumi.Input[str]] = None, + hw_clock_utc: Optional[pulumi.Input[bool]] = None, + script_text: Optional[pulumi.Input[str]] = None, + time_zone: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain is None: + raise TypeError("Missing 'domain' argument") + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if hw_clock_utc is None and 'hwClockUtc' in kwargs: + hw_clock_utc = kwargs['hwClockUtc'] + if script_text is None and 'scriptText' in kwargs: + script_text = kwargs['scriptText'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + + _setter("domain", domain) + _setter("host_name", host_name) if hw_clock_utc is not None: - pulumi.set(__self__, "hw_clock_utc", hw_clock_utc) + _setter("hw_clock_utc", hw_clock_utc) if script_text is not None: - pulumi.set(__self__, "script_text", script_text) + _setter("script_text", script_text) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter @@ -946,18 +1275,51 @@ def __init__(__self__, *, ipv4_netmask: Optional[pulumi.Input[int]] = None, ipv6_address: Optional[pulumi.Input[str]] = None, ipv6_netmask: Optional[pulumi.Input[int]] = None): + VirtualMachineCloneCustomizeNetworkInterfaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_domain=dns_domain, + dns_server_lists=dns_server_lists, + ipv4_address=ipv4_address, + ipv4_netmask=ipv4_netmask, + ipv6_address=ipv6_address, + ipv6_netmask=ipv6_netmask, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_domain: Optional[pulumi.Input[str]] = None, + dns_server_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ipv4_address: Optional[pulumi.Input[str]] = None, + ipv4_netmask: Optional[pulumi.Input[int]] = None, + ipv6_address: Optional[pulumi.Input[str]] = None, + ipv6_netmask: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_domain is None and 'dnsDomain' in kwargs: + dns_domain = kwargs['dnsDomain'] + if dns_server_lists is None and 'dnsServerLists' in kwargs: + dns_server_lists = kwargs['dnsServerLists'] + if ipv4_address is None and 'ipv4Address' in kwargs: + ipv4_address = kwargs['ipv4Address'] + if ipv4_netmask is None and 'ipv4Netmask' in kwargs: + ipv4_netmask = kwargs['ipv4Netmask'] + if ipv6_address is None and 'ipv6Address' in kwargs: + ipv6_address = kwargs['ipv6Address'] + if ipv6_netmask is None and 'ipv6Netmask' in kwargs: + ipv6_netmask = kwargs['ipv6Netmask'] + if dns_domain is not None: - pulumi.set(__self__, "dns_domain", dns_domain) + _setter("dns_domain", dns_domain) if dns_server_lists is not None: - pulumi.set(__self__, "dns_server_lists", dns_server_lists) + _setter("dns_server_lists", dns_server_lists) if ipv4_address is not None: - pulumi.set(__self__, "ipv4_address", ipv4_address) + _setter("ipv4_address", ipv4_address) if ipv4_netmask is not None: - pulumi.set(__self__, "ipv4_netmask", ipv4_netmask) + _setter("ipv4_netmask", ipv4_netmask) if ipv6_address is not None: - pulumi.set(__self__, "ipv6_address", ipv6_address) + _setter("ipv6_address", ipv6_address) if ipv6_netmask is not None: - pulumi.set(__self__, "ipv6_netmask", ipv6_netmask) + _setter("ipv6_netmask", ipv6_netmask) @property @pulumi.getter(name="dnsDomain") @@ -1030,31 +1392,92 @@ def __init__(__self__, *, run_once_command_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, time_zone: Optional[pulumi.Input[int]] = None, workgroup: Optional[pulumi.Input[str]] = None): - pulumi.set(__self__, "computer_name", computer_name) + VirtualMachineCloneCustomizeWindowsOptionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + computer_name=computer_name, + admin_password=admin_password, + auto_logon=auto_logon, + auto_logon_count=auto_logon_count, + domain_admin_password=domain_admin_password, + domain_admin_user=domain_admin_user, + full_name=full_name, + join_domain=join_domain, + organization_name=organization_name, + product_key=product_key, + run_once_command_lists=run_once_command_lists, + time_zone=time_zone, + workgroup=workgroup, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + computer_name: Optional[pulumi.Input[str]] = None, + admin_password: Optional[pulumi.Input[str]] = None, + auto_logon: Optional[pulumi.Input[bool]] = None, + auto_logon_count: Optional[pulumi.Input[int]] = None, + domain_admin_password: Optional[pulumi.Input[str]] = None, + domain_admin_user: Optional[pulumi.Input[str]] = None, + full_name: Optional[pulumi.Input[str]] = None, + join_domain: Optional[pulumi.Input[str]] = None, + organization_name: Optional[pulumi.Input[str]] = None, + product_key: Optional[pulumi.Input[str]] = None, + run_once_command_lists: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + time_zone: Optional[pulumi.Input[int]] = None, + workgroup: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if computer_name is None and 'computerName' in kwargs: + computer_name = kwargs['computerName'] + if computer_name is None: + raise TypeError("Missing 'computer_name' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if auto_logon is None and 'autoLogon' in kwargs: + auto_logon = kwargs['autoLogon'] + if auto_logon_count is None and 'autoLogonCount' in kwargs: + auto_logon_count = kwargs['autoLogonCount'] + if domain_admin_password is None and 'domainAdminPassword' in kwargs: + domain_admin_password = kwargs['domainAdminPassword'] + if domain_admin_user is None and 'domainAdminUser' in kwargs: + domain_admin_user = kwargs['domainAdminUser'] + if full_name is None and 'fullName' in kwargs: + full_name = kwargs['fullName'] + if join_domain is None and 'joinDomain' in kwargs: + join_domain = kwargs['joinDomain'] + if organization_name is None and 'organizationName' in kwargs: + organization_name = kwargs['organizationName'] + if product_key is None and 'productKey' in kwargs: + product_key = kwargs['productKey'] + if run_once_command_lists is None and 'runOnceCommandLists' in kwargs: + run_once_command_lists = kwargs['runOnceCommandLists'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + + _setter("computer_name", computer_name) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if auto_logon is not None: - pulumi.set(__self__, "auto_logon", auto_logon) + _setter("auto_logon", auto_logon) if auto_logon_count is not None: - pulumi.set(__self__, "auto_logon_count", auto_logon_count) + _setter("auto_logon_count", auto_logon_count) if domain_admin_password is not None: - pulumi.set(__self__, "domain_admin_password", domain_admin_password) + _setter("domain_admin_password", domain_admin_password) if domain_admin_user is not None: - pulumi.set(__self__, "domain_admin_user", domain_admin_user) + _setter("domain_admin_user", domain_admin_user) if full_name is not None: - pulumi.set(__self__, "full_name", full_name) + _setter("full_name", full_name) if join_domain is not None: - pulumi.set(__self__, "join_domain", join_domain) + _setter("join_domain", join_domain) if organization_name is not None: - pulumi.set(__self__, "organization_name", organization_name) + _setter("organization_name", organization_name) if product_key is not None: - pulumi.set(__self__, "product_key", product_key) + _setter("product_key", product_key) if run_once_command_lists is not None: - pulumi.set(__self__, "run_once_command_lists", run_once_command_lists) + _setter("run_once_command_lists", run_once_command_lists) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) if workgroup is not None: - pulumi.set(__self__, "workgroup", workgroup) + _setter("workgroup", workgroup) @property @pulumi.getter(name="computerName") @@ -1229,47 +1652,130 @@ def __init__(__self__, *, :param pulumi.Input[str] uuid: The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine. :param pulumi.Input[bool] write_through: If `true`, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default: `false`. """ - pulumi.set(__self__, "label", label) + VirtualMachineDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + attach=attach, + controller_type=controller_type, + datastore_id=datastore_id, + device_address=device_address, + disk_mode=disk_mode, + disk_sharing=disk_sharing, + eagerly_scrub=eagerly_scrub, + io_limit=io_limit, + io_reservation=io_reservation, + io_share_count=io_share_count, + io_share_level=io_share_level, + keep_on_remove=keep_on_remove, + key=key, + path=path, + size=size, + storage_policy_id=storage_policy_id, + thin_provisioned=thin_provisioned, + unit_number=unit_number, + uuid=uuid, + write_through=write_through, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[pulumi.Input[str]] = None, + attach: Optional[pulumi.Input[bool]] = None, + controller_type: Optional[pulumi.Input[str]] = None, + datastore_id: Optional[pulumi.Input[str]] = None, + device_address: Optional[pulumi.Input[str]] = None, + disk_mode: Optional[pulumi.Input[str]] = None, + disk_sharing: Optional[pulumi.Input[str]] = None, + eagerly_scrub: Optional[pulumi.Input[bool]] = None, + io_limit: Optional[pulumi.Input[int]] = None, + io_reservation: Optional[pulumi.Input[int]] = None, + io_share_count: Optional[pulumi.Input[int]] = None, + io_share_level: Optional[pulumi.Input[str]] = None, + keep_on_remove: Optional[pulumi.Input[bool]] = None, + key: Optional[pulumi.Input[int]] = None, + path: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[int]] = None, + storage_policy_id: Optional[pulumi.Input[str]] = None, + thin_provisioned: Optional[pulumi.Input[bool]] = None, + unit_number: Optional[pulumi.Input[int]] = None, + uuid: Optional[pulumi.Input[str]] = None, + write_through: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is None: + raise TypeError("Missing 'label' argument") + if controller_type is None and 'controllerType' in kwargs: + controller_type = kwargs['controllerType'] + if datastore_id is None and 'datastoreId' in kwargs: + datastore_id = kwargs['datastoreId'] + if device_address is None and 'deviceAddress' in kwargs: + device_address = kwargs['deviceAddress'] + if disk_mode is None and 'diskMode' in kwargs: + disk_mode = kwargs['diskMode'] + if disk_sharing is None and 'diskSharing' in kwargs: + disk_sharing = kwargs['diskSharing'] + if eagerly_scrub is None and 'eagerlyScrub' in kwargs: + eagerly_scrub = kwargs['eagerlyScrub'] + if io_limit is None and 'ioLimit' in kwargs: + io_limit = kwargs['ioLimit'] + if io_reservation is None and 'ioReservation' in kwargs: + io_reservation = kwargs['ioReservation'] + if io_share_count is None and 'ioShareCount' in kwargs: + io_share_count = kwargs['ioShareCount'] + if io_share_level is None and 'ioShareLevel' in kwargs: + io_share_level = kwargs['ioShareLevel'] + if keep_on_remove is None and 'keepOnRemove' in kwargs: + keep_on_remove = kwargs['keepOnRemove'] + if storage_policy_id is None and 'storagePolicyId' in kwargs: + storage_policy_id = kwargs['storagePolicyId'] + if thin_provisioned is None and 'thinProvisioned' in kwargs: + thin_provisioned = kwargs['thinProvisioned'] + if unit_number is None and 'unitNumber' in kwargs: + unit_number = kwargs['unitNumber'] + if write_through is None and 'writeThrough' in kwargs: + write_through = kwargs['writeThrough'] + + _setter("label", label) if attach is not None: - pulumi.set(__self__, "attach", attach) + _setter("attach", attach) if controller_type is not None: - pulumi.set(__self__, "controller_type", controller_type) + _setter("controller_type", controller_type) if datastore_id is not None: - pulumi.set(__self__, "datastore_id", datastore_id) + _setter("datastore_id", datastore_id) if device_address is not None: - pulumi.set(__self__, "device_address", device_address) + _setter("device_address", device_address) if disk_mode is not None: - pulumi.set(__self__, "disk_mode", disk_mode) + _setter("disk_mode", disk_mode) if disk_sharing is not None: - pulumi.set(__self__, "disk_sharing", disk_sharing) + _setter("disk_sharing", disk_sharing) if eagerly_scrub is not None: - pulumi.set(__self__, "eagerly_scrub", eagerly_scrub) + _setter("eagerly_scrub", eagerly_scrub) if io_limit is not None: - pulumi.set(__self__, "io_limit", io_limit) + _setter("io_limit", io_limit) if io_reservation is not None: - pulumi.set(__self__, "io_reservation", io_reservation) + _setter("io_reservation", io_reservation) if io_share_count is not None: - pulumi.set(__self__, "io_share_count", io_share_count) + _setter("io_share_count", io_share_count) if io_share_level is not None: - pulumi.set(__self__, "io_share_level", io_share_level) + _setter("io_share_level", io_share_level) if keep_on_remove is not None: - pulumi.set(__self__, "keep_on_remove", keep_on_remove) + _setter("keep_on_remove", keep_on_remove) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if storage_policy_id is not None: - pulumi.set(__self__, "storage_policy_id", storage_policy_id) + _setter("storage_policy_id", storage_policy_id) if thin_provisioned is not None: - pulumi.set(__self__, "thin_provisioned", thin_provisioned) + _setter("thin_provisioned", thin_provisioned) if unit_number is not None: - pulumi.set(__self__, "unit_number", unit_number) + _setter("unit_number", unit_number) if uuid is not None: - pulumi.set(__self__, "uuid", uuid) + _setter("uuid", uuid) if write_through is not None: - pulumi.set(__self__, "write_through", write_through) + _setter("write_through", write_through) @property @pulumi.getter @@ -1554,27 +2060,80 @@ def __init__(__self__, *, :param pulumi.Input[str] ovf_mapping: Specifies which NIC in an OVF/OVA the `network_interface` should be associated. Only applies at creation when deploying from an OVF/OVA. :param pulumi.Input[bool] use_static_mac: If true, the `mac_address` field is treated as a static MAC address and set accordingly. Setting this to `true` requires `mac_address` to be set. Default: `false`. """ - pulumi.set(__self__, "network_id", network_id) + VirtualMachineNetworkInterfaceArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_id=network_id, + adapter_type=adapter_type, + bandwidth_limit=bandwidth_limit, + bandwidth_reservation=bandwidth_reservation, + bandwidth_share_count=bandwidth_share_count, + bandwidth_share_level=bandwidth_share_level, + device_address=device_address, + key=key, + mac_address=mac_address, + ovf_mapping=ovf_mapping, + use_static_mac=use_static_mac, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_id: Optional[pulumi.Input[str]] = None, + adapter_type: Optional[pulumi.Input[str]] = None, + bandwidth_limit: Optional[pulumi.Input[int]] = None, + bandwidth_reservation: Optional[pulumi.Input[int]] = None, + bandwidth_share_count: Optional[pulumi.Input[int]] = None, + bandwidth_share_level: Optional[pulumi.Input[str]] = None, + device_address: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[int]] = None, + mac_address: Optional[pulumi.Input[str]] = None, + ovf_mapping: Optional[pulumi.Input[str]] = None, + use_static_mac: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_id is None and 'networkId' in kwargs: + network_id = kwargs['networkId'] + if network_id is None: + raise TypeError("Missing 'network_id' argument") + if adapter_type is None and 'adapterType' in kwargs: + adapter_type = kwargs['adapterType'] + if bandwidth_limit is None and 'bandwidthLimit' in kwargs: + bandwidth_limit = kwargs['bandwidthLimit'] + if bandwidth_reservation is None and 'bandwidthReservation' in kwargs: + bandwidth_reservation = kwargs['bandwidthReservation'] + if bandwidth_share_count is None and 'bandwidthShareCount' in kwargs: + bandwidth_share_count = kwargs['bandwidthShareCount'] + if bandwidth_share_level is None and 'bandwidthShareLevel' in kwargs: + bandwidth_share_level = kwargs['bandwidthShareLevel'] + if device_address is None and 'deviceAddress' in kwargs: + device_address = kwargs['deviceAddress'] + if mac_address is None and 'macAddress' in kwargs: + mac_address = kwargs['macAddress'] + if ovf_mapping is None and 'ovfMapping' in kwargs: + ovf_mapping = kwargs['ovfMapping'] + if use_static_mac is None and 'useStaticMac' in kwargs: + use_static_mac = kwargs['useStaticMac'] + + _setter("network_id", network_id) if adapter_type is not None: - pulumi.set(__self__, "adapter_type", adapter_type) + _setter("adapter_type", adapter_type) if bandwidth_limit is not None: - pulumi.set(__self__, "bandwidth_limit", bandwidth_limit) + _setter("bandwidth_limit", bandwidth_limit) if bandwidth_reservation is not None: - pulumi.set(__self__, "bandwidth_reservation", bandwidth_reservation) + _setter("bandwidth_reservation", bandwidth_reservation) if bandwidth_share_count is not None: - pulumi.set(__self__, "bandwidth_share_count", bandwidth_share_count) + _setter("bandwidth_share_count", bandwidth_share_count) if bandwidth_share_level is not None: - pulumi.set(__self__, "bandwidth_share_level", bandwidth_share_level) + _setter("bandwidth_share_level", bandwidth_share_level) if device_address is not None: - pulumi.set(__self__, "device_address", device_address) + _setter("device_address", device_address) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if mac_address is not None: - pulumi.set(__self__, "mac_address", mac_address) + _setter("mac_address", mac_address) if ovf_mapping is not None: - pulumi.set(__self__, "ovf_mapping", ovf_mapping) + _setter("ovf_mapping", ovf_mapping) if use_static_mac is not None: - pulumi.set(__self__, "use_static_mac", use_static_mac) + _setter("use_static_mac", use_static_mac) @property @pulumi.getter(name="networkId") @@ -1718,24 +2277,69 @@ def __init__(__self__, *, local_ovf_path: Optional[pulumi.Input[str]] = None, ovf_network_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, remote_ovf_url: Optional[pulumi.Input[str]] = None): + VirtualMachineOvfDeployArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_unverified_ssl_cert=allow_unverified_ssl_cert, + deployment_option=deployment_option, + disk_provisioning=disk_provisioning, + enable_hidden_properties=enable_hidden_properties, + ip_allocation_policy=ip_allocation_policy, + ip_protocol=ip_protocol, + local_ovf_path=local_ovf_path, + ovf_network_map=ovf_network_map, + remote_ovf_url=remote_ovf_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_unverified_ssl_cert: Optional[pulumi.Input[bool]] = None, + deployment_option: Optional[pulumi.Input[str]] = None, + disk_provisioning: Optional[pulumi.Input[str]] = None, + enable_hidden_properties: Optional[pulumi.Input[bool]] = None, + ip_allocation_policy: Optional[pulumi.Input[str]] = None, + ip_protocol: Optional[pulumi.Input[str]] = None, + local_ovf_path: Optional[pulumi.Input[str]] = None, + ovf_network_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + remote_ovf_url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_unverified_ssl_cert is None and 'allowUnverifiedSslCert' in kwargs: + allow_unverified_ssl_cert = kwargs['allowUnverifiedSslCert'] + if deployment_option is None and 'deploymentOption' in kwargs: + deployment_option = kwargs['deploymentOption'] + if disk_provisioning is None and 'diskProvisioning' in kwargs: + disk_provisioning = kwargs['diskProvisioning'] + if enable_hidden_properties is None and 'enableHiddenProperties' in kwargs: + enable_hidden_properties = kwargs['enableHiddenProperties'] + if ip_allocation_policy is None and 'ipAllocationPolicy' in kwargs: + ip_allocation_policy = kwargs['ipAllocationPolicy'] + if ip_protocol is None and 'ipProtocol' in kwargs: + ip_protocol = kwargs['ipProtocol'] + if local_ovf_path is None and 'localOvfPath' in kwargs: + local_ovf_path = kwargs['localOvfPath'] + if ovf_network_map is None and 'ovfNetworkMap' in kwargs: + ovf_network_map = kwargs['ovfNetworkMap'] + if remote_ovf_url is None and 'remoteOvfUrl' in kwargs: + remote_ovf_url = kwargs['remoteOvfUrl'] + if allow_unverified_ssl_cert is not None: - pulumi.set(__self__, "allow_unverified_ssl_cert", allow_unverified_ssl_cert) + _setter("allow_unverified_ssl_cert", allow_unverified_ssl_cert) if deployment_option is not None: - pulumi.set(__self__, "deployment_option", deployment_option) + _setter("deployment_option", deployment_option) if disk_provisioning is not None: - pulumi.set(__self__, "disk_provisioning", disk_provisioning) + _setter("disk_provisioning", disk_provisioning) if enable_hidden_properties is not None: - pulumi.set(__self__, "enable_hidden_properties", enable_hidden_properties) + _setter("enable_hidden_properties", enable_hidden_properties) if ip_allocation_policy is not None: - pulumi.set(__self__, "ip_allocation_policy", ip_allocation_policy) + _setter("ip_allocation_policy", ip_allocation_policy) if ip_protocol is not None: - pulumi.set(__self__, "ip_protocol", ip_protocol) + _setter("ip_protocol", ip_protocol) if local_ovf_path is not None: - pulumi.set(__self__, "local_ovf_path", local_ovf_path) + _setter("local_ovf_path", local_ovf_path) if ovf_network_map is not None: - pulumi.set(__self__, "ovf_network_map", ovf_network_map) + _setter("ovf_network_map", ovf_network_map) if remote_ovf_url is not None: - pulumi.set(__self__, "remote_ovf_url", remote_ovf_url) + _setter("remote_ovf_url", remote_ovf_url) @property @pulumi.getter(name="allowUnverifiedSslCert") @@ -1823,8 +2427,19 @@ def remote_ovf_url(self, value: Optional[pulumi.Input[str]]): class VirtualMachineVappArgs: def __init__(__self__, *, properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None): + VirtualMachineVappArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + properties=properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) @property @pulumi.getter @@ -1847,10 +2462,33 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: List of Name of tags to select from the given category. :param pulumi.Input[bool] include_datastores_with_tags: Include datastores with the given tags or exclude. Default `true`. """ - pulumi.set(__self__, "tag_category", tag_category) - pulumi.set(__self__, "tags", tags) + VmStoragePolicyTagRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag_category=tag_category, + tags=tags, + include_datastores_with_tags=include_datastores_with_tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag_category: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + include_datastores_with_tags: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag_category is None and 'tagCategory' in kwargs: + tag_category = kwargs['tagCategory'] + if tag_category is None: + raise TypeError("Missing 'tag_category' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + if include_datastores_with_tags is None and 'includeDatastoresWithTags' in kwargs: + include_datastores_with_tags = kwargs['includeDatastoresWithTags'] + + _setter("tag_category", tag_category) + _setter("tags", tags) if include_datastores_with_tags is not None: - pulumi.set(__self__, "include_datastores_with_tags", include_datastores_with_tags) + _setter("include_datastores_with_tags", include_datastores_with_tags) @property @pulumi.getter(name="tagCategory") @@ -1902,14 +2540,31 @@ def __init__(__self__, *, :param pulumi.Input[str] ip: Address of the interface, if DHCP is not set. :param pulumi.Input[str] netmask: Netmask of the interface, if DHCP is not set. """ + VnicIpv4Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + dhcp=dhcp, + gw=gw, + ip=ip, + netmask=netmask, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dhcp: Optional[pulumi.Input[bool]] = None, + gw: Optional[pulumi.Input[str]] = None, + ip: Optional[pulumi.Input[str]] = None, + netmask: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dhcp is not None: - pulumi.set(__self__, "dhcp", dhcp) + _setter("dhcp", dhcp) if gw is not None: - pulumi.set(__self__, "gw", gw) + _setter("gw", gw) if ip is not None: - pulumi.set(__self__, "ip", ip) + _setter("ip", ip) if netmask is not None: - pulumi.set(__self__, "netmask", netmask) + _setter("netmask", netmask) @property @pulumi.getter @@ -1973,14 +2628,31 @@ def __init__(__self__, *, :param pulumi.Input[bool] dhcp: Use DHCP to configure the interface's IPv6 stack. :param pulumi.Input[str] gw: IP address of the default gateway, if DHCP or autoconfig is not set. """ + VnicIpv6Args._configure( + lambda key, value: pulumi.set(__self__, key, value), + addresses=addresses, + autoconfig=autoconfig, + dhcp=dhcp, + gw=gw, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + autoconfig: Optional[pulumi.Input[bool]] = None, + dhcp: Optional[pulumi.Input[bool]] = None, + gw: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if addresses is not None: - pulumi.set(__self__, "addresses", addresses) + _setter("addresses", addresses) if autoconfig is not None: - pulumi.set(__self__, "autoconfig", autoconfig) + _setter("autoconfig", autoconfig) if dhcp is not None: - pulumi.set(__self__, "dhcp", dhcp) + _setter("dhcp", dhcp) if gw is not None: - pulumi.set(__self__, "gw", gw) + _setter("gw", gw) @property @pulumi.getter @@ -2035,8 +2707,19 @@ def gw(self, value: Optional[pulumi.Input[str]]): class GetVirtualMachineVappArgs: def __init__(__self__, *, properties: Optional[Mapping[str, str]] = None): + GetVirtualMachineVappArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + properties=properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + properties: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) @property @pulumi.getter diff --git a/sdk/python/pulumi_vsphere/compute_cluster.py b/sdk/python/pulumi_vsphere/compute_cluster.py index e0551fd9..f2d0d8d7 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster.py +++ b/sdk/python/pulumi_vsphere/compute_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -306,135 +306,400 @@ def __init__(__self__, *, :param pulumi.Input[bool] vsan_verbose_mode_enabled: Enables verbose mode for vSAN performance service on the cluster. """ - pulumi.set(__self__, "datacenter_id", datacenter_id) + ComputeClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + datacenter_id=datacenter_id, + custom_attributes=custom_attributes, + dpm_automation_level=dpm_automation_level, + dpm_enabled=dpm_enabled, + dpm_threshold=dpm_threshold, + drs_advanced_options=drs_advanced_options, + drs_automation_level=drs_automation_level, + drs_enable_predictive_drs=drs_enable_predictive_drs, + drs_enable_vm_overrides=drs_enable_vm_overrides, + drs_enabled=drs_enabled, + drs_migration_threshold=drs_migration_threshold, + drs_scale_descendants_shares=drs_scale_descendants_shares, + folder=folder, + force_evacuate_on_destroy=force_evacuate_on_destroy, + ha_admission_control_failover_host_system_ids=ha_admission_control_failover_host_system_ids, + ha_admission_control_host_failure_tolerance=ha_admission_control_host_failure_tolerance, + ha_admission_control_performance_tolerance=ha_admission_control_performance_tolerance, + ha_admission_control_policy=ha_admission_control_policy, + ha_admission_control_resource_percentage_auto_compute=ha_admission_control_resource_percentage_auto_compute, + ha_admission_control_resource_percentage_cpu=ha_admission_control_resource_percentage_cpu, + ha_admission_control_resource_percentage_memory=ha_admission_control_resource_percentage_memory, + ha_admission_control_slot_policy_explicit_cpu=ha_admission_control_slot_policy_explicit_cpu, + ha_admission_control_slot_policy_explicit_memory=ha_admission_control_slot_policy_explicit_memory, + ha_admission_control_slot_policy_use_explicit_size=ha_admission_control_slot_policy_use_explicit_size, + ha_advanced_options=ha_advanced_options, + ha_datastore_apd_recovery_action=ha_datastore_apd_recovery_action, + ha_datastore_apd_response=ha_datastore_apd_response, + ha_datastore_apd_response_delay=ha_datastore_apd_response_delay, + ha_datastore_pdl_response=ha_datastore_pdl_response, + ha_enabled=ha_enabled, + ha_heartbeat_datastore_ids=ha_heartbeat_datastore_ids, + ha_heartbeat_datastore_policy=ha_heartbeat_datastore_policy, + ha_host_isolation_response=ha_host_isolation_response, + ha_host_monitoring=ha_host_monitoring, + ha_vm_component_protection=ha_vm_component_protection, + ha_vm_dependency_restart_condition=ha_vm_dependency_restart_condition, + ha_vm_failure_interval=ha_vm_failure_interval, + ha_vm_maximum_failure_window=ha_vm_maximum_failure_window, + ha_vm_maximum_resets=ha_vm_maximum_resets, + ha_vm_minimum_uptime=ha_vm_minimum_uptime, + ha_vm_monitoring=ha_vm_monitoring, + ha_vm_restart_additional_delay=ha_vm_restart_additional_delay, + ha_vm_restart_priority=ha_vm_restart_priority, + ha_vm_restart_timeout=ha_vm_restart_timeout, + host_cluster_exit_timeout=host_cluster_exit_timeout, + host_managed=host_managed, + host_system_ids=host_system_ids, + name=name, + proactive_ha_automation_level=proactive_ha_automation_level, + proactive_ha_enabled=proactive_ha_enabled, + proactive_ha_moderate_remediation=proactive_ha_moderate_remediation, + proactive_ha_provider_ids=proactive_ha_provider_ids, + proactive_ha_severe_remediation=proactive_ha_severe_remediation, + tags=tags, + vsan_compression_enabled=vsan_compression_enabled, + vsan_dedup_enabled=vsan_dedup_enabled, + vsan_disk_groups=vsan_disk_groups, + vsan_dit_encryption_enabled=vsan_dit_encryption_enabled, + vsan_dit_rekey_interval=vsan_dit_rekey_interval, + vsan_enabled=vsan_enabled, + vsan_network_diagnostic_mode_enabled=vsan_network_diagnostic_mode_enabled, + vsan_performance_enabled=vsan_performance_enabled, + vsan_remote_datastore_ids=vsan_remote_datastore_ids, + vsan_unmap_enabled=vsan_unmap_enabled, + vsan_verbose_mode_enabled=vsan_verbose_mode_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datacenter_id: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + dpm_automation_level: Optional[pulumi.Input[str]] = None, + dpm_enabled: Optional[pulumi.Input[bool]] = None, + dpm_threshold: Optional[pulumi.Input[int]] = None, + drs_advanced_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + drs_automation_level: Optional[pulumi.Input[str]] = None, + drs_enable_predictive_drs: Optional[pulumi.Input[bool]] = None, + drs_enable_vm_overrides: Optional[pulumi.Input[bool]] = None, + drs_enabled: Optional[pulumi.Input[bool]] = None, + drs_migration_threshold: Optional[pulumi.Input[int]] = None, + drs_scale_descendants_shares: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + force_evacuate_on_destroy: Optional[pulumi.Input[bool]] = None, + ha_admission_control_failover_host_system_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ha_admission_control_host_failure_tolerance: Optional[pulumi.Input[int]] = None, + ha_admission_control_performance_tolerance: Optional[pulumi.Input[int]] = None, + ha_admission_control_policy: Optional[pulumi.Input[str]] = None, + ha_admission_control_resource_percentage_auto_compute: Optional[pulumi.Input[bool]] = None, + ha_admission_control_resource_percentage_cpu: Optional[pulumi.Input[int]] = None, + ha_admission_control_resource_percentage_memory: Optional[pulumi.Input[int]] = None, + ha_admission_control_slot_policy_explicit_cpu: Optional[pulumi.Input[int]] = None, + ha_admission_control_slot_policy_explicit_memory: Optional[pulumi.Input[int]] = None, + ha_admission_control_slot_policy_use_explicit_size: Optional[pulumi.Input[bool]] = None, + ha_advanced_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ha_datastore_apd_recovery_action: Optional[pulumi.Input[str]] = None, + ha_datastore_apd_response: Optional[pulumi.Input[str]] = None, + ha_datastore_apd_response_delay: Optional[pulumi.Input[int]] = None, + ha_datastore_pdl_response: Optional[pulumi.Input[str]] = None, + ha_enabled: Optional[pulumi.Input[bool]] = None, + ha_heartbeat_datastore_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ha_heartbeat_datastore_policy: Optional[pulumi.Input[str]] = None, + ha_host_isolation_response: Optional[pulumi.Input[str]] = None, + ha_host_monitoring: Optional[pulumi.Input[str]] = None, + ha_vm_component_protection: Optional[pulumi.Input[str]] = None, + ha_vm_dependency_restart_condition: Optional[pulumi.Input[str]] = None, + ha_vm_failure_interval: Optional[pulumi.Input[int]] = None, + ha_vm_maximum_failure_window: Optional[pulumi.Input[int]] = None, + ha_vm_maximum_resets: Optional[pulumi.Input[int]] = None, + ha_vm_minimum_uptime: Optional[pulumi.Input[int]] = None, + ha_vm_monitoring: Optional[pulumi.Input[str]] = None, + ha_vm_restart_additional_delay: Optional[pulumi.Input[int]] = None, + ha_vm_restart_priority: Optional[pulumi.Input[str]] = None, + ha_vm_restart_timeout: Optional[pulumi.Input[int]] = None, + host_cluster_exit_timeout: Optional[pulumi.Input[int]] = None, + host_managed: Optional[pulumi.Input[bool]] = None, + host_system_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + proactive_ha_automation_level: Optional[pulumi.Input[str]] = None, + proactive_ha_enabled: Optional[pulumi.Input[bool]] = None, + proactive_ha_moderate_remediation: Optional[pulumi.Input[str]] = None, + proactive_ha_provider_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + proactive_ha_severe_remediation: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + vsan_compression_enabled: Optional[pulumi.Input[bool]] = None, + vsan_dedup_enabled: Optional[pulumi.Input[bool]] = None, + vsan_disk_groups: Optional[pulumi.Input[Sequence[pulumi.Input['ComputeClusterVsanDiskGroupArgs']]]] = None, + vsan_dit_encryption_enabled: Optional[pulumi.Input[bool]] = None, + vsan_dit_rekey_interval: Optional[pulumi.Input[int]] = None, + vsan_enabled: Optional[pulumi.Input[bool]] = None, + vsan_network_diagnostic_mode_enabled: Optional[pulumi.Input[bool]] = None, + vsan_performance_enabled: Optional[pulumi.Input[bool]] = None, + vsan_remote_datastore_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + vsan_unmap_enabled: Optional[pulumi.Input[bool]] = None, + vsan_verbose_mode_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datacenter_id is None and 'datacenterId' in kwargs: + datacenter_id = kwargs['datacenterId'] + if datacenter_id is None: + raise TypeError("Missing 'datacenter_id' argument") + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if dpm_automation_level is None and 'dpmAutomationLevel' in kwargs: + dpm_automation_level = kwargs['dpmAutomationLevel'] + if dpm_enabled is None and 'dpmEnabled' in kwargs: + dpm_enabled = kwargs['dpmEnabled'] + if dpm_threshold is None and 'dpmThreshold' in kwargs: + dpm_threshold = kwargs['dpmThreshold'] + if drs_advanced_options is None and 'drsAdvancedOptions' in kwargs: + drs_advanced_options = kwargs['drsAdvancedOptions'] + if drs_automation_level is None and 'drsAutomationLevel' in kwargs: + drs_automation_level = kwargs['drsAutomationLevel'] + if drs_enable_predictive_drs is None and 'drsEnablePredictiveDrs' in kwargs: + drs_enable_predictive_drs = kwargs['drsEnablePredictiveDrs'] + if drs_enable_vm_overrides is None and 'drsEnableVmOverrides' in kwargs: + drs_enable_vm_overrides = kwargs['drsEnableVmOverrides'] + if drs_enabled is None and 'drsEnabled' in kwargs: + drs_enabled = kwargs['drsEnabled'] + if drs_migration_threshold is None and 'drsMigrationThreshold' in kwargs: + drs_migration_threshold = kwargs['drsMigrationThreshold'] + if drs_scale_descendants_shares is None and 'drsScaleDescendantsShares' in kwargs: + drs_scale_descendants_shares = kwargs['drsScaleDescendantsShares'] + if force_evacuate_on_destroy is None and 'forceEvacuateOnDestroy' in kwargs: + force_evacuate_on_destroy = kwargs['forceEvacuateOnDestroy'] + if ha_admission_control_failover_host_system_ids is None and 'haAdmissionControlFailoverHostSystemIds' in kwargs: + ha_admission_control_failover_host_system_ids = kwargs['haAdmissionControlFailoverHostSystemIds'] + if ha_admission_control_host_failure_tolerance is None and 'haAdmissionControlHostFailureTolerance' in kwargs: + ha_admission_control_host_failure_tolerance = kwargs['haAdmissionControlHostFailureTolerance'] + if ha_admission_control_performance_tolerance is None and 'haAdmissionControlPerformanceTolerance' in kwargs: + ha_admission_control_performance_tolerance = kwargs['haAdmissionControlPerformanceTolerance'] + if ha_admission_control_policy is None and 'haAdmissionControlPolicy' in kwargs: + ha_admission_control_policy = kwargs['haAdmissionControlPolicy'] + if ha_admission_control_resource_percentage_auto_compute is None and 'haAdmissionControlResourcePercentageAutoCompute' in kwargs: + ha_admission_control_resource_percentage_auto_compute = kwargs['haAdmissionControlResourcePercentageAutoCompute'] + if ha_admission_control_resource_percentage_cpu is None and 'haAdmissionControlResourcePercentageCpu' in kwargs: + ha_admission_control_resource_percentage_cpu = kwargs['haAdmissionControlResourcePercentageCpu'] + if ha_admission_control_resource_percentage_memory is None and 'haAdmissionControlResourcePercentageMemory' in kwargs: + ha_admission_control_resource_percentage_memory = kwargs['haAdmissionControlResourcePercentageMemory'] + if ha_admission_control_slot_policy_explicit_cpu is None and 'haAdmissionControlSlotPolicyExplicitCpu' in kwargs: + ha_admission_control_slot_policy_explicit_cpu = kwargs['haAdmissionControlSlotPolicyExplicitCpu'] + if ha_admission_control_slot_policy_explicit_memory is None and 'haAdmissionControlSlotPolicyExplicitMemory' in kwargs: + ha_admission_control_slot_policy_explicit_memory = kwargs['haAdmissionControlSlotPolicyExplicitMemory'] + if ha_admission_control_slot_policy_use_explicit_size is None and 'haAdmissionControlSlotPolicyUseExplicitSize' in kwargs: + ha_admission_control_slot_policy_use_explicit_size = kwargs['haAdmissionControlSlotPolicyUseExplicitSize'] + if ha_advanced_options is None and 'haAdvancedOptions' in kwargs: + ha_advanced_options = kwargs['haAdvancedOptions'] + if ha_datastore_apd_recovery_action is None and 'haDatastoreApdRecoveryAction' in kwargs: + ha_datastore_apd_recovery_action = kwargs['haDatastoreApdRecoveryAction'] + if ha_datastore_apd_response is None and 'haDatastoreApdResponse' in kwargs: + ha_datastore_apd_response = kwargs['haDatastoreApdResponse'] + if ha_datastore_apd_response_delay is None and 'haDatastoreApdResponseDelay' in kwargs: + ha_datastore_apd_response_delay = kwargs['haDatastoreApdResponseDelay'] + if ha_datastore_pdl_response is None and 'haDatastorePdlResponse' in kwargs: + ha_datastore_pdl_response = kwargs['haDatastorePdlResponse'] + if ha_enabled is None and 'haEnabled' in kwargs: + ha_enabled = kwargs['haEnabled'] + if ha_heartbeat_datastore_ids is None and 'haHeartbeatDatastoreIds' in kwargs: + ha_heartbeat_datastore_ids = kwargs['haHeartbeatDatastoreIds'] + if ha_heartbeat_datastore_policy is None and 'haHeartbeatDatastorePolicy' in kwargs: + ha_heartbeat_datastore_policy = kwargs['haHeartbeatDatastorePolicy'] + if ha_host_isolation_response is None and 'haHostIsolationResponse' in kwargs: + ha_host_isolation_response = kwargs['haHostIsolationResponse'] + if ha_host_monitoring is None and 'haHostMonitoring' in kwargs: + ha_host_monitoring = kwargs['haHostMonitoring'] + if ha_vm_component_protection is None and 'haVmComponentProtection' in kwargs: + ha_vm_component_protection = kwargs['haVmComponentProtection'] + if ha_vm_dependency_restart_condition is None and 'haVmDependencyRestartCondition' in kwargs: + ha_vm_dependency_restart_condition = kwargs['haVmDependencyRestartCondition'] + if ha_vm_failure_interval is None and 'haVmFailureInterval' in kwargs: + ha_vm_failure_interval = kwargs['haVmFailureInterval'] + if ha_vm_maximum_failure_window is None and 'haVmMaximumFailureWindow' in kwargs: + ha_vm_maximum_failure_window = kwargs['haVmMaximumFailureWindow'] + if ha_vm_maximum_resets is None and 'haVmMaximumResets' in kwargs: + ha_vm_maximum_resets = kwargs['haVmMaximumResets'] + if ha_vm_minimum_uptime is None and 'haVmMinimumUptime' in kwargs: + ha_vm_minimum_uptime = kwargs['haVmMinimumUptime'] + if ha_vm_monitoring is None and 'haVmMonitoring' in kwargs: + ha_vm_monitoring = kwargs['haVmMonitoring'] + if ha_vm_restart_additional_delay is None and 'haVmRestartAdditionalDelay' in kwargs: + ha_vm_restart_additional_delay = kwargs['haVmRestartAdditionalDelay'] + if ha_vm_restart_priority is None and 'haVmRestartPriority' in kwargs: + ha_vm_restart_priority = kwargs['haVmRestartPriority'] + if ha_vm_restart_timeout is None and 'haVmRestartTimeout' in kwargs: + ha_vm_restart_timeout = kwargs['haVmRestartTimeout'] + if host_cluster_exit_timeout is None and 'hostClusterExitTimeout' in kwargs: + host_cluster_exit_timeout = kwargs['hostClusterExitTimeout'] + if host_managed is None and 'hostManaged' in kwargs: + host_managed = kwargs['hostManaged'] + if host_system_ids is None and 'hostSystemIds' in kwargs: + host_system_ids = kwargs['hostSystemIds'] + if proactive_ha_automation_level is None and 'proactiveHaAutomationLevel' in kwargs: + proactive_ha_automation_level = kwargs['proactiveHaAutomationLevel'] + if proactive_ha_enabled is None and 'proactiveHaEnabled' in kwargs: + proactive_ha_enabled = kwargs['proactiveHaEnabled'] + if proactive_ha_moderate_remediation is None and 'proactiveHaModerateRemediation' in kwargs: + proactive_ha_moderate_remediation = kwargs['proactiveHaModerateRemediation'] + if proactive_ha_provider_ids is None and 'proactiveHaProviderIds' in kwargs: + proactive_ha_provider_ids = kwargs['proactiveHaProviderIds'] + if proactive_ha_severe_remediation is None and 'proactiveHaSevereRemediation' in kwargs: + proactive_ha_severe_remediation = kwargs['proactiveHaSevereRemediation'] + if vsan_compression_enabled is None and 'vsanCompressionEnabled' in kwargs: + vsan_compression_enabled = kwargs['vsanCompressionEnabled'] + if vsan_dedup_enabled is None and 'vsanDedupEnabled' in kwargs: + vsan_dedup_enabled = kwargs['vsanDedupEnabled'] + if vsan_disk_groups is None and 'vsanDiskGroups' in kwargs: + vsan_disk_groups = kwargs['vsanDiskGroups'] + if vsan_dit_encryption_enabled is None and 'vsanDitEncryptionEnabled' in kwargs: + vsan_dit_encryption_enabled = kwargs['vsanDitEncryptionEnabled'] + if vsan_dit_rekey_interval is None and 'vsanDitRekeyInterval' in kwargs: + vsan_dit_rekey_interval = kwargs['vsanDitRekeyInterval'] + if vsan_enabled is None and 'vsanEnabled' in kwargs: + vsan_enabled = kwargs['vsanEnabled'] + if vsan_network_diagnostic_mode_enabled is None and 'vsanNetworkDiagnosticModeEnabled' in kwargs: + vsan_network_diagnostic_mode_enabled = kwargs['vsanNetworkDiagnosticModeEnabled'] + if vsan_performance_enabled is None and 'vsanPerformanceEnabled' in kwargs: + vsan_performance_enabled = kwargs['vsanPerformanceEnabled'] + if vsan_remote_datastore_ids is None and 'vsanRemoteDatastoreIds' in kwargs: + vsan_remote_datastore_ids = kwargs['vsanRemoteDatastoreIds'] + if vsan_unmap_enabled is None and 'vsanUnmapEnabled' in kwargs: + vsan_unmap_enabled = kwargs['vsanUnmapEnabled'] + if vsan_verbose_mode_enabled is None and 'vsanVerboseModeEnabled' in kwargs: + vsan_verbose_mode_enabled = kwargs['vsanVerboseModeEnabled'] + + _setter("datacenter_id", datacenter_id) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if dpm_automation_level is not None: - pulumi.set(__self__, "dpm_automation_level", dpm_automation_level) + _setter("dpm_automation_level", dpm_automation_level) if dpm_enabled is not None: - pulumi.set(__self__, "dpm_enabled", dpm_enabled) + _setter("dpm_enabled", dpm_enabled) if dpm_threshold is not None: - pulumi.set(__self__, "dpm_threshold", dpm_threshold) + _setter("dpm_threshold", dpm_threshold) if drs_advanced_options is not None: - pulumi.set(__self__, "drs_advanced_options", drs_advanced_options) + _setter("drs_advanced_options", drs_advanced_options) if drs_automation_level is not None: - pulumi.set(__self__, "drs_automation_level", drs_automation_level) + _setter("drs_automation_level", drs_automation_level) if drs_enable_predictive_drs is not None: - pulumi.set(__self__, "drs_enable_predictive_drs", drs_enable_predictive_drs) + _setter("drs_enable_predictive_drs", drs_enable_predictive_drs) if drs_enable_vm_overrides is not None: - pulumi.set(__self__, "drs_enable_vm_overrides", drs_enable_vm_overrides) + _setter("drs_enable_vm_overrides", drs_enable_vm_overrides) if drs_enabled is not None: - pulumi.set(__self__, "drs_enabled", drs_enabled) + _setter("drs_enabled", drs_enabled) if drs_migration_threshold is not None: - pulumi.set(__self__, "drs_migration_threshold", drs_migration_threshold) + _setter("drs_migration_threshold", drs_migration_threshold) if drs_scale_descendants_shares is not None: - pulumi.set(__self__, "drs_scale_descendants_shares", drs_scale_descendants_shares) + _setter("drs_scale_descendants_shares", drs_scale_descendants_shares) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if force_evacuate_on_destroy is not None: - pulumi.set(__self__, "force_evacuate_on_destroy", force_evacuate_on_destroy) + _setter("force_evacuate_on_destroy", force_evacuate_on_destroy) if ha_admission_control_failover_host_system_ids is not None: - pulumi.set(__self__, "ha_admission_control_failover_host_system_ids", ha_admission_control_failover_host_system_ids) + _setter("ha_admission_control_failover_host_system_ids", ha_admission_control_failover_host_system_ids) if ha_admission_control_host_failure_tolerance is not None: - pulumi.set(__self__, "ha_admission_control_host_failure_tolerance", ha_admission_control_host_failure_tolerance) + _setter("ha_admission_control_host_failure_tolerance", ha_admission_control_host_failure_tolerance) if ha_admission_control_performance_tolerance is not None: - pulumi.set(__self__, "ha_admission_control_performance_tolerance", ha_admission_control_performance_tolerance) + _setter("ha_admission_control_performance_tolerance", ha_admission_control_performance_tolerance) if ha_admission_control_policy is not None: - pulumi.set(__self__, "ha_admission_control_policy", ha_admission_control_policy) + _setter("ha_admission_control_policy", ha_admission_control_policy) if ha_admission_control_resource_percentage_auto_compute is not None: - pulumi.set(__self__, "ha_admission_control_resource_percentage_auto_compute", ha_admission_control_resource_percentage_auto_compute) + _setter("ha_admission_control_resource_percentage_auto_compute", ha_admission_control_resource_percentage_auto_compute) if ha_admission_control_resource_percentage_cpu is not None: - pulumi.set(__self__, "ha_admission_control_resource_percentage_cpu", ha_admission_control_resource_percentage_cpu) + _setter("ha_admission_control_resource_percentage_cpu", ha_admission_control_resource_percentage_cpu) if ha_admission_control_resource_percentage_memory is not None: - pulumi.set(__self__, "ha_admission_control_resource_percentage_memory", ha_admission_control_resource_percentage_memory) + _setter("ha_admission_control_resource_percentage_memory", ha_admission_control_resource_percentage_memory) if ha_admission_control_slot_policy_explicit_cpu is not None: - pulumi.set(__self__, "ha_admission_control_slot_policy_explicit_cpu", ha_admission_control_slot_policy_explicit_cpu) + _setter("ha_admission_control_slot_policy_explicit_cpu", ha_admission_control_slot_policy_explicit_cpu) if ha_admission_control_slot_policy_explicit_memory is not None: - pulumi.set(__self__, "ha_admission_control_slot_policy_explicit_memory", ha_admission_control_slot_policy_explicit_memory) + _setter("ha_admission_control_slot_policy_explicit_memory", ha_admission_control_slot_policy_explicit_memory) if ha_admission_control_slot_policy_use_explicit_size is not None: - pulumi.set(__self__, "ha_admission_control_slot_policy_use_explicit_size", ha_admission_control_slot_policy_use_explicit_size) + _setter("ha_admission_control_slot_policy_use_explicit_size", ha_admission_control_slot_policy_use_explicit_size) if ha_advanced_options is not None: - pulumi.set(__self__, "ha_advanced_options", ha_advanced_options) + _setter("ha_advanced_options", ha_advanced_options) if ha_datastore_apd_recovery_action is not None: - pulumi.set(__self__, "ha_datastore_apd_recovery_action", ha_datastore_apd_recovery_action) + _setter("ha_datastore_apd_recovery_action", ha_datastore_apd_recovery_action) if ha_datastore_apd_response is not None: - pulumi.set(__self__, "ha_datastore_apd_response", ha_datastore_apd_response) + _setter("ha_datastore_apd_response", ha_datastore_apd_response) if ha_datastore_apd_response_delay is not None: - pulumi.set(__self__, "ha_datastore_apd_response_delay", ha_datastore_apd_response_delay) + _setter("ha_datastore_apd_response_delay", ha_datastore_apd_response_delay) if ha_datastore_pdl_response is not None: - pulumi.set(__self__, "ha_datastore_pdl_response", ha_datastore_pdl_response) + _setter("ha_datastore_pdl_response", ha_datastore_pdl_response) if ha_enabled is not None: - pulumi.set(__self__, "ha_enabled", ha_enabled) + _setter("ha_enabled", ha_enabled) if ha_heartbeat_datastore_ids is not None: - pulumi.set(__self__, "ha_heartbeat_datastore_ids", ha_heartbeat_datastore_ids) + _setter("ha_heartbeat_datastore_ids", ha_heartbeat_datastore_ids) if ha_heartbeat_datastore_policy is not None: - pulumi.set(__self__, "ha_heartbeat_datastore_policy", ha_heartbeat_datastore_policy) + _setter("ha_heartbeat_datastore_policy", ha_heartbeat_datastore_policy) if ha_host_isolation_response is not None: - pulumi.set(__self__, "ha_host_isolation_response", ha_host_isolation_response) + _setter("ha_host_isolation_response", ha_host_isolation_response) if ha_host_monitoring is not None: - pulumi.set(__self__, "ha_host_monitoring", ha_host_monitoring) + _setter("ha_host_monitoring", ha_host_monitoring) if ha_vm_component_protection is not None: - pulumi.set(__self__, "ha_vm_component_protection", ha_vm_component_protection) + _setter("ha_vm_component_protection", ha_vm_component_protection) if ha_vm_dependency_restart_condition is not None: - pulumi.set(__self__, "ha_vm_dependency_restart_condition", ha_vm_dependency_restart_condition) + _setter("ha_vm_dependency_restart_condition", ha_vm_dependency_restart_condition) if ha_vm_failure_interval is not None: - pulumi.set(__self__, "ha_vm_failure_interval", ha_vm_failure_interval) + _setter("ha_vm_failure_interval", ha_vm_failure_interval) if ha_vm_maximum_failure_window is not None: - pulumi.set(__self__, "ha_vm_maximum_failure_window", ha_vm_maximum_failure_window) + _setter("ha_vm_maximum_failure_window", ha_vm_maximum_failure_window) if ha_vm_maximum_resets is not None: - pulumi.set(__self__, "ha_vm_maximum_resets", ha_vm_maximum_resets) + _setter("ha_vm_maximum_resets", ha_vm_maximum_resets) if ha_vm_minimum_uptime is not None: - pulumi.set(__self__, "ha_vm_minimum_uptime", ha_vm_minimum_uptime) + _setter("ha_vm_minimum_uptime", ha_vm_minimum_uptime) if ha_vm_monitoring is not None: - pulumi.set(__self__, "ha_vm_monitoring", ha_vm_monitoring) + _setter("ha_vm_monitoring", ha_vm_monitoring) if ha_vm_restart_additional_delay is not None: - pulumi.set(__self__, "ha_vm_restart_additional_delay", ha_vm_restart_additional_delay) + _setter("ha_vm_restart_additional_delay", ha_vm_restart_additional_delay) if ha_vm_restart_priority is not None: - pulumi.set(__self__, "ha_vm_restart_priority", ha_vm_restart_priority) + _setter("ha_vm_restart_priority", ha_vm_restart_priority) if ha_vm_restart_timeout is not None: - pulumi.set(__self__, "ha_vm_restart_timeout", ha_vm_restart_timeout) + _setter("ha_vm_restart_timeout", ha_vm_restart_timeout) if host_cluster_exit_timeout is not None: - pulumi.set(__self__, "host_cluster_exit_timeout", host_cluster_exit_timeout) + _setter("host_cluster_exit_timeout", host_cluster_exit_timeout) if host_managed is not None: - pulumi.set(__self__, "host_managed", host_managed) + _setter("host_managed", host_managed) if host_system_ids is not None: - pulumi.set(__self__, "host_system_ids", host_system_ids) + _setter("host_system_ids", host_system_ids) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if proactive_ha_automation_level is not None: - pulumi.set(__self__, "proactive_ha_automation_level", proactive_ha_automation_level) + _setter("proactive_ha_automation_level", proactive_ha_automation_level) if proactive_ha_enabled is not None: - pulumi.set(__self__, "proactive_ha_enabled", proactive_ha_enabled) + _setter("proactive_ha_enabled", proactive_ha_enabled) if proactive_ha_moderate_remediation is not None: - pulumi.set(__self__, "proactive_ha_moderate_remediation", proactive_ha_moderate_remediation) + _setter("proactive_ha_moderate_remediation", proactive_ha_moderate_remediation) if proactive_ha_provider_ids is not None: - pulumi.set(__self__, "proactive_ha_provider_ids", proactive_ha_provider_ids) + _setter("proactive_ha_provider_ids", proactive_ha_provider_ids) if proactive_ha_severe_remediation is not None: - pulumi.set(__self__, "proactive_ha_severe_remediation", proactive_ha_severe_remediation) + _setter("proactive_ha_severe_remediation", proactive_ha_severe_remediation) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vsan_compression_enabled is not None: - pulumi.set(__self__, "vsan_compression_enabled", vsan_compression_enabled) + _setter("vsan_compression_enabled", vsan_compression_enabled) if vsan_dedup_enabled is not None: - pulumi.set(__self__, "vsan_dedup_enabled", vsan_dedup_enabled) + _setter("vsan_dedup_enabled", vsan_dedup_enabled) if vsan_disk_groups is not None: - pulumi.set(__self__, "vsan_disk_groups", vsan_disk_groups) + _setter("vsan_disk_groups", vsan_disk_groups) if vsan_dit_encryption_enabled is not None: - pulumi.set(__self__, "vsan_dit_encryption_enabled", vsan_dit_encryption_enabled) + _setter("vsan_dit_encryption_enabled", vsan_dit_encryption_enabled) if vsan_dit_rekey_interval is not None: - pulumi.set(__self__, "vsan_dit_rekey_interval", vsan_dit_rekey_interval) + _setter("vsan_dit_rekey_interval", vsan_dit_rekey_interval) if vsan_enabled is not None: - pulumi.set(__self__, "vsan_enabled", vsan_enabled) + _setter("vsan_enabled", vsan_enabled) if vsan_network_diagnostic_mode_enabled is not None: - pulumi.set(__self__, "vsan_network_diagnostic_mode_enabled", vsan_network_diagnostic_mode_enabled) + _setter("vsan_network_diagnostic_mode_enabled", vsan_network_diagnostic_mode_enabled) if vsan_performance_enabled is not None: - pulumi.set(__self__, "vsan_performance_enabled", vsan_performance_enabled) + _setter("vsan_performance_enabled", vsan_performance_enabled) if vsan_remote_datastore_ids is not None: - pulumi.set(__self__, "vsan_remote_datastore_ids", vsan_remote_datastore_ids) + _setter("vsan_remote_datastore_ids", vsan_remote_datastore_ids) if vsan_unmap_enabled is not None: - pulumi.set(__self__, "vsan_unmap_enabled", vsan_unmap_enabled) + _setter("vsan_unmap_enabled", vsan_unmap_enabled) if vsan_verbose_mode_enabled is not None: - pulumi.set(__self__, "vsan_verbose_mode_enabled", vsan_verbose_mode_enabled) + _setter("vsan_verbose_mode_enabled", vsan_verbose_mode_enabled) @property @pulumi.getter(name="datacenterId") @@ -1673,138 +1938,405 @@ def __init__(__self__, *, :param pulumi.Input[bool] vsan_verbose_mode_enabled: Enables verbose mode for vSAN performance service on the cluster. """ + _ComputeClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_attributes=custom_attributes, + datacenter_id=datacenter_id, + dpm_automation_level=dpm_automation_level, + dpm_enabled=dpm_enabled, + dpm_threshold=dpm_threshold, + drs_advanced_options=drs_advanced_options, + drs_automation_level=drs_automation_level, + drs_enable_predictive_drs=drs_enable_predictive_drs, + drs_enable_vm_overrides=drs_enable_vm_overrides, + drs_enabled=drs_enabled, + drs_migration_threshold=drs_migration_threshold, + drs_scale_descendants_shares=drs_scale_descendants_shares, + folder=folder, + force_evacuate_on_destroy=force_evacuate_on_destroy, + ha_admission_control_failover_host_system_ids=ha_admission_control_failover_host_system_ids, + ha_admission_control_host_failure_tolerance=ha_admission_control_host_failure_tolerance, + ha_admission_control_performance_tolerance=ha_admission_control_performance_tolerance, + ha_admission_control_policy=ha_admission_control_policy, + ha_admission_control_resource_percentage_auto_compute=ha_admission_control_resource_percentage_auto_compute, + ha_admission_control_resource_percentage_cpu=ha_admission_control_resource_percentage_cpu, + ha_admission_control_resource_percentage_memory=ha_admission_control_resource_percentage_memory, + ha_admission_control_slot_policy_explicit_cpu=ha_admission_control_slot_policy_explicit_cpu, + ha_admission_control_slot_policy_explicit_memory=ha_admission_control_slot_policy_explicit_memory, + ha_admission_control_slot_policy_use_explicit_size=ha_admission_control_slot_policy_use_explicit_size, + ha_advanced_options=ha_advanced_options, + ha_datastore_apd_recovery_action=ha_datastore_apd_recovery_action, + ha_datastore_apd_response=ha_datastore_apd_response, + ha_datastore_apd_response_delay=ha_datastore_apd_response_delay, + ha_datastore_pdl_response=ha_datastore_pdl_response, + ha_enabled=ha_enabled, + ha_heartbeat_datastore_ids=ha_heartbeat_datastore_ids, + ha_heartbeat_datastore_policy=ha_heartbeat_datastore_policy, + ha_host_isolation_response=ha_host_isolation_response, + ha_host_monitoring=ha_host_monitoring, + ha_vm_component_protection=ha_vm_component_protection, + ha_vm_dependency_restart_condition=ha_vm_dependency_restart_condition, + ha_vm_failure_interval=ha_vm_failure_interval, + ha_vm_maximum_failure_window=ha_vm_maximum_failure_window, + ha_vm_maximum_resets=ha_vm_maximum_resets, + ha_vm_minimum_uptime=ha_vm_minimum_uptime, + ha_vm_monitoring=ha_vm_monitoring, + ha_vm_restart_additional_delay=ha_vm_restart_additional_delay, + ha_vm_restart_priority=ha_vm_restart_priority, + ha_vm_restart_timeout=ha_vm_restart_timeout, + host_cluster_exit_timeout=host_cluster_exit_timeout, + host_managed=host_managed, + host_system_ids=host_system_ids, + name=name, + proactive_ha_automation_level=proactive_ha_automation_level, + proactive_ha_enabled=proactive_ha_enabled, + proactive_ha_moderate_remediation=proactive_ha_moderate_remediation, + proactive_ha_provider_ids=proactive_ha_provider_ids, + proactive_ha_severe_remediation=proactive_ha_severe_remediation, + resource_pool_id=resource_pool_id, + tags=tags, + vsan_compression_enabled=vsan_compression_enabled, + vsan_dedup_enabled=vsan_dedup_enabled, + vsan_disk_groups=vsan_disk_groups, + vsan_dit_encryption_enabled=vsan_dit_encryption_enabled, + vsan_dit_rekey_interval=vsan_dit_rekey_interval, + vsan_enabled=vsan_enabled, + vsan_network_diagnostic_mode_enabled=vsan_network_diagnostic_mode_enabled, + vsan_performance_enabled=vsan_performance_enabled, + vsan_remote_datastore_ids=vsan_remote_datastore_ids, + vsan_unmap_enabled=vsan_unmap_enabled, + vsan_verbose_mode_enabled=vsan_verbose_mode_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datacenter_id: Optional[pulumi.Input[str]] = None, + dpm_automation_level: Optional[pulumi.Input[str]] = None, + dpm_enabled: Optional[pulumi.Input[bool]] = None, + dpm_threshold: Optional[pulumi.Input[int]] = None, + drs_advanced_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + drs_automation_level: Optional[pulumi.Input[str]] = None, + drs_enable_predictive_drs: Optional[pulumi.Input[bool]] = None, + drs_enable_vm_overrides: Optional[pulumi.Input[bool]] = None, + drs_enabled: Optional[pulumi.Input[bool]] = None, + drs_migration_threshold: Optional[pulumi.Input[int]] = None, + drs_scale_descendants_shares: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + force_evacuate_on_destroy: Optional[pulumi.Input[bool]] = None, + ha_admission_control_failover_host_system_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ha_admission_control_host_failure_tolerance: Optional[pulumi.Input[int]] = None, + ha_admission_control_performance_tolerance: Optional[pulumi.Input[int]] = None, + ha_admission_control_policy: Optional[pulumi.Input[str]] = None, + ha_admission_control_resource_percentage_auto_compute: Optional[pulumi.Input[bool]] = None, + ha_admission_control_resource_percentage_cpu: Optional[pulumi.Input[int]] = None, + ha_admission_control_resource_percentage_memory: Optional[pulumi.Input[int]] = None, + ha_admission_control_slot_policy_explicit_cpu: Optional[pulumi.Input[int]] = None, + ha_admission_control_slot_policy_explicit_memory: Optional[pulumi.Input[int]] = None, + ha_admission_control_slot_policy_use_explicit_size: Optional[pulumi.Input[bool]] = None, + ha_advanced_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ha_datastore_apd_recovery_action: Optional[pulumi.Input[str]] = None, + ha_datastore_apd_response: Optional[pulumi.Input[str]] = None, + ha_datastore_apd_response_delay: Optional[pulumi.Input[int]] = None, + ha_datastore_pdl_response: Optional[pulumi.Input[str]] = None, + ha_enabled: Optional[pulumi.Input[bool]] = None, + ha_heartbeat_datastore_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + ha_heartbeat_datastore_policy: Optional[pulumi.Input[str]] = None, + ha_host_isolation_response: Optional[pulumi.Input[str]] = None, + ha_host_monitoring: Optional[pulumi.Input[str]] = None, + ha_vm_component_protection: Optional[pulumi.Input[str]] = None, + ha_vm_dependency_restart_condition: Optional[pulumi.Input[str]] = None, + ha_vm_failure_interval: Optional[pulumi.Input[int]] = None, + ha_vm_maximum_failure_window: Optional[pulumi.Input[int]] = None, + ha_vm_maximum_resets: Optional[pulumi.Input[int]] = None, + ha_vm_minimum_uptime: Optional[pulumi.Input[int]] = None, + ha_vm_monitoring: Optional[pulumi.Input[str]] = None, + ha_vm_restart_additional_delay: Optional[pulumi.Input[int]] = None, + ha_vm_restart_priority: Optional[pulumi.Input[str]] = None, + ha_vm_restart_timeout: Optional[pulumi.Input[int]] = None, + host_cluster_exit_timeout: Optional[pulumi.Input[int]] = None, + host_managed: Optional[pulumi.Input[bool]] = None, + host_system_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + proactive_ha_automation_level: Optional[pulumi.Input[str]] = None, + proactive_ha_enabled: Optional[pulumi.Input[bool]] = None, + proactive_ha_moderate_remediation: Optional[pulumi.Input[str]] = None, + proactive_ha_provider_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + proactive_ha_severe_remediation: Optional[pulumi.Input[str]] = None, + resource_pool_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + vsan_compression_enabled: Optional[pulumi.Input[bool]] = None, + vsan_dedup_enabled: Optional[pulumi.Input[bool]] = None, + vsan_disk_groups: Optional[pulumi.Input[Sequence[pulumi.Input['ComputeClusterVsanDiskGroupArgs']]]] = None, + vsan_dit_encryption_enabled: Optional[pulumi.Input[bool]] = None, + vsan_dit_rekey_interval: Optional[pulumi.Input[int]] = None, + vsan_enabled: Optional[pulumi.Input[bool]] = None, + vsan_network_diagnostic_mode_enabled: Optional[pulumi.Input[bool]] = None, + vsan_performance_enabled: Optional[pulumi.Input[bool]] = None, + vsan_remote_datastore_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + vsan_unmap_enabled: Optional[pulumi.Input[bool]] = None, + vsan_verbose_mode_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if datacenter_id is None and 'datacenterId' in kwargs: + datacenter_id = kwargs['datacenterId'] + if dpm_automation_level is None and 'dpmAutomationLevel' in kwargs: + dpm_automation_level = kwargs['dpmAutomationLevel'] + if dpm_enabled is None and 'dpmEnabled' in kwargs: + dpm_enabled = kwargs['dpmEnabled'] + if dpm_threshold is None and 'dpmThreshold' in kwargs: + dpm_threshold = kwargs['dpmThreshold'] + if drs_advanced_options is None and 'drsAdvancedOptions' in kwargs: + drs_advanced_options = kwargs['drsAdvancedOptions'] + if drs_automation_level is None and 'drsAutomationLevel' in kwargs: + drs_automation_level = kwargs['drsAutomationLevel'] + if drs_enable_predictive_drs is None and 'drsEnablePredictiveDrs' in kwargs: + drs_enable_predictive_drs = kwargs['drsEnablePredictiveDrs'] + if drs_enable_vm_overrides is None and 'drsEnableVmOverrides' in kwargs: + drs_enable_vm_overrides = kwargs['drsEnableVmOverrides'] + if drs_enabled is None and 'drsEnabled' in kwargs: + drs_enabled = kwargs['drsEnabled'] + if drs_migration_threshold is None and 'drsMigrationThreshold' in kwargs: + drs_migration_threshold = kwargs['drsMigrationThreshold'] + if drs_scale_descendants_shares is None and 'drsScaleDescendantsShares' in kwargs: + drs_scale_descendants_shares = kwargs['drsScaleDescendantsShares'] + if force_evacuate_on_destroy is None and 'forceEvacuateOnDestroy' in kwargs: + force_evacuate_on_destroy = kwargs['forceEvacuateOnDestroy'] + if ha_admission_control_failover_host_system_ids is None and 'haAdmissionControlFailoverHostSystemIds' in kwargs: + ha_admission_control_failover_host_system_ids = kwargs['haAdmissionControlFailoverHostSystemIds'] + if ha_admission_control_host_failure_tolerance is None and 'haAdmissionControlHostFailureTolerance' in kwargs: + ha_admission_control_host_failure_tolerance = kwargs['haAdmissionControlHostFailureTolerance'] + if ha_admission_control_performance_tolerance is None and 'haAdmissionControlPerformanceTolerance' in kwargs: + ha_admission_control_performance_tolerance = kwargs['haAdmissionControlPerformanceTolerance'] + if ha_admission_control_policy is None and 'haAdmissionControlPolicy' in kwargs: + ha_admission_control_policy = kwargs['haAdmissionControlPolicy'] + if ha_admission_control_resource_percentage_auto_compute is None and 'haAdmissionControlResourcePercentageAutoCompute' in kwargs: + ha_admission_control_resource_percentage_auto_compute = kwargs['haAdmissionControlResourcePercentageAutoCompute'] + if ha_admission_control_resource_percentage_cpu is None and 'haAdmissionControlResourcePercentageCpu' in kwargs: + ha_admission_control_resource_percentage_cpu = kwargs['haAdmissionControlResourcePercentageCpu'] + if ha_admission_control_resource_percentage_memory is None and 'haAdmissionControlResourcePercentageMemory' in kwargs: + ha_admission_control_resource_percentage_memory = kwargs['haAdmissionControlResourcePercentageMemory'] + if ha_admission_control_slot_policy_explicit_cpu is None and 'haAdmissionControlSlotPolicyExplicitCpu' in kwargs: + ha_admission_control_slot_policy_explicit_cpu = kwargs['haAdmissionControlSlotPolicyExplicitCpu'] + if ha_admission_control_slot_policy_explicit_memory is None and 'haAdmissionControlSlotPolicyExplicitMemory' in kwargs: + ha_admission_control_slot_policy_explicit_memory = kwargs['haAdmissionControlSlotPolicyExplicitMemory'] + if ha_admission_control_slot_policy_use_explicit_size is None and 'haAdmissionControlSlotPolicyUseExplicitSize' in kwargs: + ha_admission_control_slot_policy_use_explicit_size = kwargs['haAdmissionControlSlotPolicyUseExplicitSize'] + if ha_advanced_options is None and 'haAdvancedOptions' in kwargs: + ha_advanced_options = kwargs['haAdvancedOptions'] + if ha_datastore_apd_recovery_action is None and 'haDatastoreApdRecoveryAction' in kwargs: + ha_datastore_apd_recovery_action = kwargs['haDatastoreApdRecoveryAction'] + if ha_datastore_apd_response is None and 'haDatastoreApdResponse' in kwargs: + ha_datastore_apd_response = kwargs['haDatastoreApdResponse'] + if ha_datastore_apd_response_delay is None and 'haDatastoreApdResponseDelay' in kwargs: + ha_datastore_apd_response_delay = kwargs['haDatastoreApdResponseDelay'] + if ha_datastore_pdl_response is None and 'haDatastorePdlResponse' in kwargs: + ha_datastore_pdl_response = kwargs['haDatastorePdlResponse'] + if ha_enabled is None and 'haEnabled' in kwargs: + ha_enabled = kwargs['haEnabled'] + if ha_heartbeat_datastore_ids is None and 'haHeartbeatDatastoreIds' in kwargs: + ha_heartbeat_datastore_ids = kwargs['haHeartbeatDatastoreIds'] + if ha_heartbeat_datastore_policy is None and 'haHeartbeatDatastorePolicy' in kwargs: + ha_heartbeat_datastore_policy = kwargs['haHeartbeatDatastorePolicy'] + if ha_host_isolation_response is None and 'haHostIsolationResponse' in kwargs: + ha_host_isolation_response = kwargs['haHostIsolationResponse'] + if ha_host_monitoring is None and 'haHostMonitoring' in kwargs: + ha_host_monitoring = kwargs['haHostMonitoring'] + if ha_vm_component_protection is None and 'haVmComponentProtection' in kwargs: + ha_vm_component_protection = kwargs['haVmComponentProtection'] + if ha_vm_dependency_restart_condition is None and 'haVmDependencyRestartCondition' in kwargs: + ha_vm_dependency_restart_condition = kwargs['haVmDependencyRestartCondition'] + if ha_vm_failure_interval is None and 'haVmFailureInterval' in kwargs: + ha_vm_failure_interval = kwargs['haVmFailureInterval'] + if ha_vm_maximum_failure_window is None and 'haVmMaximumFailureWindow' in kwargs: + ha_vm_maximum_failure_window = kwargs['haVmMaximumFailureWindow'] + if ha_vm_maximum_resets is None and 'haVmMaximumResets' in kwargs: + ha_vm_maximum_resets = kwargs['haVmMaximumResets'] + if ha_vm_minimum_uptime is None and 'haVmMinimumUptime' in kwargs: + ha_vm_minimum_uptime = kwargs['haVmMinimumUptime'] + if ha_vm_monitoring is None and 'haVmMonitoring' in kwargs: + ha_vm_monitoring = kwargs['haVmMonitoring'] + if ha_vm_restart_additional_delay is None and 'haVmRestartAdditionalDelay' in kwargs: + ha_vm_restart_additional_delay = kwargs['haVmRestartAdditionalDelay'] + if ha_vm_restart_priority is None and 'haVmRestartPriority' in kwargs: + ha_vm_restart_priority = kwargs['haVmRestartPriority'] + if ha_vm_restart_timeout is None and 'haVmRestartTimeout' in kwargs: + ha_vm_restart_timeout = kwargs['haVmRestartTimeout'] + if host_cluster_exit_timeout is None and 'hostClusterExitTimeout' in kwargs: + host_cluster_exit_timeout = kwargs['hostClusterExitTimeout'] + if host_managed is None and 'hostManaged' in kwargs: + host_managed = kwargs['hostManaged'] + if host_system_ids is None and 'hostSystemIds' in kwargs: + host_system_ids = kwargs['hostSystemIds'] + if proactive_ha_automation_level is None and 'proactiveHaAutomationLevel' in kwargs: + proactive_ha_automation_level = kwargs['proactiveHaAutomationLevel'] + if proactive_ha_enabled is None and 'proactiveHaEnabled' in kwargs: + proactive_ha_enabled = kwargs['proactiveHaEnabled'] + if proactive_ha_moderate_remediation is None and 'proactiveHaModerateRemediation' in kwargs: + proactive_ha_moderate_remediation = kwargs['proactiveHaModerateRemediation'] + if proactive_ha_provider_ids is None and 'proactiveHaProviderIds' in kwargs: + proactive_ha_provider_ids = kwargs['proactiveHaProviderIds'] + if proactive_ha_severe_remediation is None and 'proactiveHaSevereRemediation' in kwargs: + proactive_ha_severe_remediation = kwargs['proactiveHaSevereRemediation'] + if resource_pool_id is None and 'resourcePoolId' in kwargs: + resource_pool_id = kwargs['resourcePoolId'] + if vsan_compression_enabled is None and 'vsanCompressionEnabled' in kwargs: + vsan_compression_enabled = kwargs['vsanCompressionEnabled'] + if vsan_dedup_enabled is None and 'vsanDedupEnabled' in kwargs: + vsan_dedup_enabled = kwargs['vsanDedupEnabled'] + if vsan_disk_groups is None and 'vsanDiskGroups' in kwargs: + vsan_disk_groups = kwargs['vsanDiskGroups'] + if vsan_dit_encryption_enabled is None and 'vsanDitEncryptionEnabled' in kwargs: + vsan_dit_encryption_enabled = kwargs['vsanDitEncryptionEnabled'] + if vsan_dit_rekey_interval is None and 'vsanDitRekeyInterval' in kwargs: + vsan_dit_rekey_interval = kwargs['vsanDitRekeyInterval'] + if vsan_enabled is None and 'vsanEnabled' in kwargs: + vsan_enabled = kwargs['vsanEnabled'] + if vsan_network_diagnostic_mode_enabled is None and 'vsanNetworkDiagnosticModeEnabled' in kwargs: + vsan_network_diagnostic_mode_enabled = kwargs['vsanNetworkDiagnosticModeEnabled'] + if vsan_performance_enabled is None and 'vsanPerformanceEnabled' in kwargs: + vsan_performance_enabled = kwargs['vsanPerformanceEnabled'] + if vsan_remote_datastore_ids is None and 'vsanRemoteDatastoreIds' in kwargs: + vsan_remote_datastore_ids = kwargs['vsanRemoteDatastoreIds'] + if vsan_unmap_enabled is None and 'vsanUnmapEnabled' in kwargs: + vsan_unmap_enabled = kwargs['vsanUnmapEnabled'] + if vsan_verbose_mode_enabled is None and 'vsanVerboseModeEnabled' in kwargs: + vsan_verbose_mode_enabled = kwargs['vsanVerboseModeEnabled'] + if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datacenter_id is not None: - pulumi.set(__self__, "datacenter_id", datacenter_id) + _setter("datacenter_id", datacenter_id) if dpm_automation_level is not None: - pulumi.set(__self__, "dpm_automation_level", dpm_automation_level) + _setter("dpm_automation_level", dpm_automation_level) if dpm_enabled is not None: - pulumi.set(__self__, "dpm_enabled", dpm_enabled) + _setter("dpm_enabled", dpm_enabled) if dpm_threshold is not None: - pulumi.set(__self__, "dpm_threshold", dpm_threshold) + _setter("dpm_threshold", dpm_threshold) if drs_advanced_options is not None: - pulumi.set(__self__, "drs_advanced_options", drs_advanced_options) + _setter("drs_advanced_options", drs_advanced_options) if drs_automation_level is not None: - pulumi.set(__self__, "drs_automation_level", drs_automation_level) + _setter("drs_automation_level", drs_automation_level) if drs_enable_predictive_drs is not None: - pulumi.set(__self__, "drs_enable_predictive_drs", drs_enable_predictive_drs) + _setter("drs_enable_predictive_drs", drs_enable_predictive_drs) if drs_enable_vm_overrides is not None: - pulumi.set(__self__, "drs_enable_vm_overrides", drs_enable_vm_overrides) + _setter("drs_enable_vm_overrides", drs_enable_vm_overrides) if drs_enabled is not None: - pulumi.set(__self__, "drs_enabled", drs_enabled) + _setter("drs_enabled", drs_enabled) if drs_migration_threshold is not None: - pulumi.set(__self__, "drs_migration_threshold", drs_migration_threshold) + _setter("drs_migration_threshold", drs_migration_threshold) if drs_scale_descendants_shares is not None: - pulumi.set(__self__, "drs_scale_descendants_shares", drs_scale_descendants_shares) + _setter("drs_scale_descendants_shares", drs_scale_descendants_shares) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if force_evacuate_on_destroy is not None: - pulumi.set(__self__, "force_evacuate_on_destroy", force_evacuate_on_destroy) + _setter("force_evacuate_on_destroy", force_evacuate_on_destroy) if ha_admission_control_failover_host_system_ids is not None: - pulumi.set(__self__, "ha_admission_control_failover_host_system_ids", ha_admission_control_failover_host_system_ids) + _setter("ha_admission_control_failover_host_system_ids", ha_admission_control_failover_host_system_ids) if ha_admission_control_host_failure_tolerance is not None: - pulumi.set(__self__, "ha_admission_control_host_failure_tolerance", ha_admission_control_host_failure_tolerance) + _setter("ha_admission_control_host_failure_tolerance", ha_admission_control_host_failure_tolerance) if ha_admission_control_performance_tolerance is not None: - pulumi.set(__self__, "ha_admission_control_performance_tolerance", ha_admission_control_performance_tolerance) + _setter("ha_admission_control_performance_tolerance", ha_admission_control_performance_tolerance) if ha_admission_control_policy is not None: - pulumi.set(__self__, "ha_admission_control_policy", ha_admission_control_policy) + _setter("ha_admission_control_policy", ha_admission_control_policy) if ha_admission_control_resource_percentage_auto_compute is not None: - pulumi.set(__self__, "ha_admission_control_resource_percentage_auto_compute", ha_admission_control_resource_percentage_auto_compute) + _setter("ha_admission_control_resource_percentage_auto_compute", ha_admission_control_resource_percentage_auto_compute) if ha_admission_control_resource_percentage_cpu is not None: - pulumi.set(__self__, "ha_admission_control_resource_percentage_cpu", ha_admission_control_resource_percentage_cpu) + _setter("ha_admission_control_resource_percentage_cpu", ha_admission_control_resource_percentage_cpu) if ha_admission_control_resource_percentage_memory is not None: - pulumi.set(__self__, "ha_admission_control_resource_percentage_memory", ha_admission_control_resource_percentage_memory) + _setter("ha_admission_control_resource_percentage_memory", ha_admission_control_resource_percentage_memory) if ha_admission_control_slot_policy_explicit_cpu is not None: - pulumi.set(__self__, "ha_admission_control_slot_policy_explicit_cpu", ha_admission_control_slot_policy_explicit_cpu) + _setter("ha_admission_control_slot_policy_explicit_cpu", ha_admission_control_slot_policy_explicit_cpu) if ha_admission_control_slot_policy_explicit_memory is not None: - pulumi.set(__self__, "ha_admission_control_slot_policy_explicit_memory", ha_admission_control_slot_policy_explicit_memory) + _setter("ha_admission_control_slot_policy_explicit_memory", ha_admission_control_slot_policy_explicit_memory) if ha_admission_control_slot_policy_use_explicit_size is not None: - pulumi.set(__self__, "ha_admission_control_slot_policy_use_explicit_size", ha_admission_control_slot_policy_use_explicit_size) + _setter("ha_admission_control_slot_policy_use_explicit_size", ha_admission_control_slot_policy_use_explicit_size) if ha_advanced_options is not None: - pulumi.set(__self__, "ha_advanced_options", ha_advanced_options) + _setter("ha_advanced_options", ha_advanced_options) if ha_datastore_apd_recovery_action is not None: - pulumi.set(__self__, "ha_datastore_apd_recovery_action", ha_datastore_apd_recovery_action) + _setter("ha_datastore_apd_recovery_action", ha_datastore_apd_recovery_action) if ha_datastore_apd_response is not None: - pulumi.set(__self__, "ha_datastore_apd_response", ha_datastore_apd_response) + _setter("ha_datastore_apd_response", ha_datastore_apd_response) if ha_datastore_apd_response_delay is not None: - pulumi.set(__self__, "ha_datastore_apd_response_delay", ha_datastore_apd_response_delay) + _setter("ha_datastore_apd_response_delay", ha_datastore_apd_response_delay) if ha_datastore_pdl_response is not None: - pulumi.set(__self__, "ha_datastore_pdl_response", ha_datastore_pdl_response) + _setter("ha_datastore_pdl_response", ha_datastore_pdl_response) if ha_enabled is not None: - pulumi.set(__self__, "ha_enabled", ha_enabled) + _setter("ha_enabled", ha_enabled) if ha_heartbeat_datastore_ids is not None: - pulumi.set(__self__, "ha_heartbeat_datastore_ids", ha_heartbeat_datastore_ids) + _setter("ha_heartbeat_datastore_ids", ha_heartbeat_datastore_ids) if ha_heartbeat_datastore_policy is not None: - pulumi.set(__self__, "ha_heartbeat_datastore_policy", ha_heartbeat_datastore_policy) + _setter("ha_heartbeat_datastore_policy", ha_heartbeat_datastore_policy) if ha_host_isolation_response is not None: - pulumi.set(__self__, "ha_host_isolation_response", ha_host_isolation_response) + _setter("ha_host_isolation_response", ha_host_isolation_response) if ha_host_monitoring is not None: - pulumi.set(__self__, "ha_host_monitoring", ha_host_monitoring) + _setter("ha_host_monitoring", ha_host_monitoring) if ha_vm_component_protection is not None: - pulumi.set(__self__, "ha_vm_component_protection", ha_vm_component_protection) + _setter("ha_vm_component_protection", ha_vm_component_protection) if ha_vm_dependency_restart_condition is not None: - pulumi.set(__self__, "ha_vm_dependency_restart_condition", ha_vm_dependency_restart_condition) + _setter("ha_vm_dependency_restart_condition", ha_vm_dependency_restart_condition) if ha_vm_failure_interval is not None: - pulumi.set(__self__, "ha_vm_failure_interval", ha_vm_failure_interval) + _setter("ha_vm_failure_interval", ha_vm_failure_interval) if ha_vm_maximum_failure_window is not None: - pulumi.set(__self__, "ha_vm_maximum_failure_window", ha_vm_maximum_failure_window) + _setter("ha_vm_maximum_failure_window", ha_vm_maximum_failure_window) if ha_vm_maximum_resets is not None: - pulumi.set(__self__, "ha_vm_maximum_resets", ha_vm_maximum_resets) + _setter("ha_vm_maximum_resets", ha_vm_maximum_resets) if ha_vm_minimum_uptime is not None: - pulumi.set(__self__, "ha_vm_minimum_uptime", ha_vm_minimum_uptime) + _setter("ha_vm_minimum_uptime", ha_vm_minimum_uptime) if ha_vm_monitoring is not None: - pulumi.set(__self__, "ha_vm_monitoring", ha_vm_monitoring) + _setter("ha_vm_monitoring", ha_vm_monitoring) if ha_vm_restart_additional_delay is not None: - pulumi.set(__self__, "ha_vm_restart_additional_delay", ha_vm_restart_additional_delay) + _setter("ha_vm_restart_additional_delay", ha_vm_restart_additional_delay) if ha_vm_restart_priority is not None: - pulumi.set(__self__, "ha_vm_restart_priority", ha_vm_restart_priority) + _setter("ha_vm_restart_priority", ha_vm_restart_priority) if ha_vm_restart_timeout is not None: - pulumi.set(__self__, "ha_vm_restart_timeout", ha_vm_restart_timeout) + _setter("ha_vm_restart_timeout", ha_vm_restart_timeout) if host_cluster_exit_timeout is not None: - pulumi.set(__self__, "host_cluster_exit_timeout", host_cluster_exit_timeout) + _setter("host_cluster_exit_timeout", host_cluster_exit_timeout) if host_managed is not None: - pulumi.set(__self__, "host_managed", host_managed) + _setter("host_managed", host_managed) if host_system_ids is not None: - pulumi.set(__self__, "host_system_ids", host_system_ids) + _setter("host_system_ids", host_system_ids) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if proactive_ha_automation_level is not None: - pulumi.set(__self__, "proactive_ha_automation_level", proactive_ha_automation_level) + _setter("proactive_ha_automation_level", proactive_ha_automation_level) if proactive_ha_enabled is not None: - pulumi.set(__self__, "proactive_ha_enabled", proactive_ha_enabled) + _setter("proactive_ha_enabled", proactive_ha_enabled) if proactive_ha_moderate_remediation is not None: - pulumi.set(__self__, "proactive_ha_moderate_remediation", proactive_ha_moderate_remediation) + _setter("proactive_ha_moderate_remediation", proactive_ha_moderate_remediation) if proactive_ha_provider_ids is not None: - pulumi.set(__self__, "proactive_ha_provider_ids", proactive_ha_provider_ids) + _setter("proactive_ha_provider_ids", proactive_ha_provider_ids) if proactive_ha_severe_remediation is not None: - pulumi.set(__self__, "proactive_ha_severe_remediation", proactive_ha_severe_remediation) + _setter("proactive_ha_severe_remediation", proactive_ha_severe_remediation) if resource_pool_id is not None: - pulumi.set(__self__, "resource_pool_id", resource_pool_id) + _setter("resource_pool_id", resource_pool_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if vsan_compression_enabled is not None: - pulumi.set(__self__, "vsan_compression_enabled", vsan_compression_enabled) + _setter("vsan_compression_enabled", vsan_compression_enabled) if vsan_dedup_enabled is not None: - pulumi.set(__self__, "vsan_dedup_enabled", vsan_dedup_enabled) + _setter("vsan_dedup_enabled", vsan_dedup_enabled) if vsan_disk_groups is not None: - pulumi.set(__self__, "vsan_disk_groups", vsan_disk_groups) + _setter("vsan_disk_groups", vsan_disk_groups) if vsan_dit_encryption_enabled is not None: - pulumi.set(__self__, "vsan_dit_encryption_enabled", vsan_dit_encryption_enabled) + _setter("vsan_dit_encryption_enabled", vsan_dit_encryption_enabled) if vsan_dit_rekey_interval is not None: - pulumi.set(__self__, "vsan_dit_rekey_interval", vsan_dit_rekey_interval) + _setter("vsan_dit_rekey_interval", vsan_dit_rekey_interval) if vsan_enabled is not None: - pulumi.set(__self__, "vsan_enabled", vsan_enabled) + _setter("vsan_enabled", vsan_enabled) if vsan_network_diagnostic_mode_enabled is not None: - pulumi.set(__self__, "vsan_network_diagnostic_mode_enabled", vsan_network_diagnostic_mode_enabled) + _setter("vsan_network_diagnostic_mode_enabled", vsan_network_diagnostic_mode_enabled) if vsan_performance_enabled is not None: - pulumi.set(__self__, "vsan_performance_enabled", vsan_performance_enabled) + _setter("vsan_performance_enabled", vsan_performance_enabled) if vsan_remote_datastore_ids is not None: - pulumi.set(__self__, "vsan_remote_datastore_ids", vsan_remote_datastore_ids) + _setter("vsan_remote_datastore_ids", vsan_remote_datastore_ids) if vsan_unmap_enabled is not None: - pulumi.set(__self__, "vsan_unmap_enabled", vsan_unmap_enabled) + _setter("vsan_unmap_enabled", vsan_unmap_enabled) if vsan_verbose_mode_enabled is not None: - pulumi.set(__self__, "vsan_verbose_mode_enabled", vsan_verbose_mode_enabled) + _setter("vsan_verbose_mode_enabled", vsan_verbose_mode_enabled) @property @pulumi.getter(name="customAttributes") @@ -3076,6 +3608,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ComputeClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/compute_cluster_host_group.py b/sdk/python/pulumi_vsphere/compute_cluster_host_group.py index bfaf16f1..0aa000dc 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_host_group.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_host_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ComputeClusterHostGroupArgs', 'ComputeClusterHostGroup'] @@ -32,11 +32,32 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the host group. This must be unique in the cluster. Forces a new resource if changed. """ - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) + ComputeClusterHostGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + host_system_ids=host_system_ids, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + host_system_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if compute_cluster_id is None: + raise TypeError("Missing 'compute_cluster_id' argument") + if host_system_ids is None and 'hostSystemIds' in kwargs: + host_system_ids = kwargs['hostSystemIds'] + + _setter("compute_cluster_id", compute_cluster_id) if host_system_ids is not None: - pulumi.set(__self__, "host_system_ids", host_system_ids) + _setter("host_system_ids", host_system_ids) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="computeClusterId") @@ -105,12 +126,31 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the host group. This must be unique in the cluster. Forces a new resource if changed. """ + _ComputeClusterHostGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + host_system_ids=host_system_ids, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + host_system_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if host_system_ids is None and 'hostSystemIds' in kwargs: + host_system_ids = kwargs['hostSystemIds'] + if compute_cluster_id is not None: - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) + _setter("compute_cluster_id", compute_cluster_id) if host_system_ids is not None: - pulumi.set(__self__, "host_system_ids", host_system_ids) + _setter("host_system_ids", host_system_ids) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="computeClusterId") @@ -202,6 +242,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ComputeClusterHostGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/compute_cluster_vm_affinity_rule.py b/sdk/python/pulumi_vsphere/compute_cluster_vm_affinity_rule.py index 3d067826..d03d49d6 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_vm_affinity_rule.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_vm_affinity_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ComputeClusterVmAffinityRuleArgs', 'ComputeClusterVmAffinityRule'] @@ -35,14 +35,41 @@ def __init__(__self__, *, this when naming your rules. :param pulumi.Input[str] name: The name of the rule. This must be unique in the cluster. """ - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) - pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids) + ComputeClusterVmAffinityRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + virtual_machine_ids=virtual_machine_ids, + enabled=enabled, + mandatory=mandatory, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + mandatory: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if compute_cluster_id is None: + raise TypeError("Missing 'compute_cluster_id' argument") + if virtual_machine_ids is None and 'virtualMachineIds' in kwargs: + virtual_machine_ids = kwargs['virtualMachineIds'] + if virtual_machine_ids is None: + raise TypeError("Missing 'virtual_machine_ids' argument") + + _setter("compute_cluster_id", compute_cluster_id) + _setter("virtual_machine_ids", virtual_machine_ids) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="computeClusterId") @@ -137,16 +164,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_machine_ids: The UUIDs of the virtual machines to run on the same host together. """ + _ComputeClusterVmAffinityRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + enabled=enabled, + mandatory=mandatory, + name=name, + virtual_machine_ids=virtual_machine_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + mandatory: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if virtual_machine_ids is None and 'virtualMachineIds' in kwargs: + virtual_machine_ids = kwargs['virtualMachineIds'] + if compute_cluster_id is not None: - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) + _setter("compute_cluster_id", compute_cluster_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if virtual_machine_ids is not None: - pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids) + _setter("virtual_machine_ids", virtual_machine_ids) @property @pulumi.getter(name="computeClusterId") @@ -432,6 +482,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ComputeClusterVmAffinityRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py b/sdk/python/pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py index 126e2f91..9dd8a7d6 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_vm_anti_affinity_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ComputeClusterVmAntiAffinityRuleArgs', 'ComputeClusterVmAntiAffinityRule'] @@ -35,14 +35,41 @@ def __init__(__self__, *, this when naming your rules. :param pulumi.Input[str] name: The name of the rule. This must be unique in the cluster. """ - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) - pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids) + ComputeClusterVmAntiAffinityRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + virtual_machine_ids=virtual_machine_ids, + enabled=enabled, + mandatory=mandatory, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + mandatory: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if compute_cluster_id is None: + raise TypeError("Missing 'compute_cluster_id' argument") + if virtual_machine_ids is None and 'virtualMachineIds' in kwargs: + virtual_machine_ids = kwargs['virtualMachineIds'] + if virtual_machine_ids is None: + raise TypeError("Missing 'virtual_machine_ids' argument") + + _setter("compute_cluster_id", compute_cluster_id) + _setter("virtual_machine_ids", virtual_machine_ids) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="computeClusterId") @@ -137,16 +164,39 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] virtual_machine_ids: The UUIDs of the virtual machines to run on hosts different from each other. """ + _ComputeClusterVmAntiAffinityRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + enabled=enabled, + mandatory=mandatory, + name=name, + virtual_machine_ids=virtual_machine_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + mandatory: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if virtual_machine_ids is None and 'virtualMachineIds' in kwargs: + virtual_machine_ids = kwargs['virtualMachineIds'] + if compute_cluster_id is not None: - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) + _setter("compute_cluster_id", compute_cluster_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if virtual_machine_ids is not None: - pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids) + _setter("virtual_machine_ids", virtual_machine_ids) @property @pulumi.getter(name="computeClusterId") @@ -264,6 +314,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ComputeClusterVmAntiAffinityRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/compute_cluster_vm_dependency_rule.py b/sdk/python/pulumi_vsphere/compute_cluster_vm_dependency_rule.py index cabb231d..e6025fa7 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_vm_dependency_rule.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_vm_dependency_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ComputeClusterVmDependencyRuleArgs', 'ComputeClusterVmDependencyRule'] @@ -43,15 +43,48 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the rule. This must be unique in the cluster. """ - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) - pulumi.set(__self__, "dependency_vm_group_name", dependency_vm_group_name) - pulumi.set(__self__, "vm_group_name", vm_group_name) + ComputeClusterVmDependencyRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + dependency_vm_group_name=dependency_vm_group_name, + vm_group_name=vm_group_name, + enabled=enabled, + mandatory=mandatory, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + dependency_vm_group_name: Optional[pulumi.Input[str]] = None, + vm_group_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + mandatory: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if compute_cluster_id is None: + raise TypeError("Missing 'compute_cluster_id' argument") + if dependency_vm_group_name is None and 'dependencyVmGroupName' in kwargs: + dependency_vm_group_name = kwargs['dependencyVmGroupName'] + if dependency_vm_group_name is None: + raise TypeError("Missing 'dependency_vm_group_name' argument") + if vm_group_name is None and 'vmGroupName' in kwargs: + vm_group_name = kwargs['vmGroupName'] + if vm_group_name is None: + raise TypeError("Missing 'vm_group_name' argument") + + _setter("compute_cluster_id", compute_cluster_id) + _setter("dependency_vm_group_name", dependency_vm_group_name) + _setter("vm_group_name", vm_group_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="computeClusterId") @@ -172,18 +205,45 @@ def __init__(__self__, *, the group specified by `dependency_vm_group_name` are started. """ + _ComputeClusterVmDependencyRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + dependency_vm_group_name=dependency_vm_group_name, + enabled=enabled, + mandatory=mandatory, + name=name, + vm_group_name=vm_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + dependency_vm_group_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + mandatory: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + vm_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if dependency_vm_group_name is None and 'dependencyVmGroupName' in kwargs: + dependency_vm_group_name = kwargs['dependencyVmGroupName'] + if vm_group_name is None and 'vmGroupName' in kwargs: + vm_group_name = kwargs['vmGroupName'] + if compute_cluster_id is not None: - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) + _setter("compute_cluster_id", compute_cluster_id) if dependency_vm_group_name is not None: - pulumi.set(__self__, "dependency_vm_group_name", dependency_vm_group_name) + _setter("dependency_vm_group_name", dependency_vm_group_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if vm_group_name is not None: - pulumi.set(__self__, "vm_group_name", vm_group_name) + _setter("vm_group_name", vm_group_name) @property @pulumi.getter(name="computeClusterId") @@ -327,6 +387,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ComputeClusterVmDependencyRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/compute_cluster_vm_group.py b/sdk/python/pulumi_vsphere/compute_cluster_vm_group.py index a39984e1..da771316 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_vm_group.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_vm_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ComputeClusterVmGroupArgs', 'ComputeClusterVmGroup'] @@ -32,11 +32,32 @@ def __init__(__self__, *, `ComputeClusterHostGroup` resource. Make sure your names are unique across both resources. """ - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) + ComputeClusterVmGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + name=name, + virtual_machine_ids=virtual_machine_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if compute_cluster_id is None: + raise TypeError("Missing 'compute_cluster_id' argument") + if virtual_machine_ids is None and 'virtualMachineIds' in kwargs: + virtual_machine_ids = kwargs['virtualMachineIds'] + + _setter("compute_cluster_id", compute_cluster_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if virtual_machine_ids is not None: - pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids) + _setter("virtual_machine_ids", virtual_machine_ids) @property @pulumi.getter(name="computeClusterId") @@ -105,12 +126,31 @@ def __init__(__self__, *, `ComputeClusterHostGroup` resource. Make sure your names are unique across both resources. """ + _ComputeClusterVmGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + name=name, + virtual_machine_ids=virtual_machine_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if virtual_machine_ids is None and 'virtualMachineIds' in kwargs: + virtual_machine_ids = kwargs['virtualMachineIds'] + if compute_cluster_id is not None: - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) + _setter("compute_cluster_id", compute_cluster_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if virtual_machine_ids is not None: - pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids) + _setter("virtual_machine_ids", virtual_machine_ids) @property @pulumi.getter(name="computeClusterId") @@ -202,6 +242,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ComputeClusterVmGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/compute_cluster_vm_host_rule.py b/sdk/python/pulumi_vsphere/compute_cluster_vm_host_rule.py index fbb5a2c5..1c3b4553 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_vm_host_rule.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_vm_host_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ComputeClusterVmHostRuleArgs', 'ComputeClusterVmHostRule'] @@ -48,18 +48,53 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the rule. This must be unique in the cluster. """ - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) - pulumi.set(__self__, "vm_group_name", vm_group_name) + ComputeClusterVmHostRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + vm_group_name=vm_group_name, + affinity_host_group_name=affinity_host_group_name, + anti_affinity_host_group_name=anti_affinity_host_group_name, + enabled=enabled, + mandatory=mandatory, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + vm_group_name: Optional[pulumi.Input[str]] = None, + affinity_host_group_name: Optional[pulumi.Input[str]] = None, + anti_affinity_host_group_name: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + mandatory: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if compute_cluster_id is None: + raise TypeError("Missing 'compute_cluster_id' argument") + if vm_group_name is None and 'vmGroupName' in kwargs: + vm_group_name = kwargs['vmGroupName'] + if vm_group_name is None: + raise TypeError("Missing 'vm_group_name' argument") + if affinity_host_group_name is None and 'affinityHostGroupName' in kwargs: + affinity_host_group_name = kwargs['affinityHostGroupName'] + if anti_affinity_host_group_name is None and 'antiAffinityHostGroupName' in kwargs: + anti_affinity_host_group_name = kwargs['antiAffinityHostGroupName'] + + _setter("compute_cluster_id", compute_cluster_id) + _setter("vm_group_name", vm_group_name) if affinity_host_group_name is not None: - pulumi.set(__self__, "affinity_host_group_name", affinity_host_group_name) + _setter("affinity_host_group_name", affinity_host_group_name) if anti_affinity_host_group_name is not None: - pulumi.set(__self__, "anti_affinity_host_group_name", anti_affinity_host_group_name) + _setter("anti_affinity_host_group_name", anti_affinity_host_group_name) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="computeClusterId") @@ -200,20 +235,51 @@ def __init__(__self__, *, :param pulumi.Input[str] vm_group_name: The name of the virtual machine group to use with this rule. """ + _ComputeClusterVmHostRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + affinity_host_group_name=affinity_host_group_name, + anti_affinity_host_group_name=anti_affinity_host_group_name, + compute_cluster_id=compute_cluster_id, + enabled=enabled, + mandatory=mandatory, + name=name, + vm_group_name=vm_group_name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + affinity_host_group_name: Optional[pulumi.Input[str]] = None, + anti_affinity_host_group_name: Optional[pulumi.Input[str]] = None, + compute_cluster_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + mandatory: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + vm_group_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if affinity_host_group_name is None and 'affinityHostGroupName' in kwargs: + affinity_host_group_name = kwargs['affinityHostGroupName'] + if anti_affinity_host_group_name is None and 'antiAffinityHostGroupName' in kwargs: + anti_affinity_host_group_name = kwargs['antiAffinityHostGroupName'] + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if vm_group_name is None and 'vmGroupName' in kwargs: + vm_group_name = kwargs['vmGroupName'] + if affinity_host_group_name is not None: - pulumi.set(__self__, "affinity_host_group_name", affinity_host_group_name) + _setter("affinity_host_group_name", affinity_host_group_name) if anti_affinity_host_group_name is not None: - pulumi.set(__self__, "anti_affinity_host_group_name", anti_affinity_host_group_name) + _setter("anti_affinity_host_group_name", anti_affinity_host_group_name) if compute_cluster_id is not None: - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) + _setter("compute_cluster_id", compute_cluster_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if vm_group_name is not None: - pulumi.set(__self__, "vm_group_name", vm_group_name) + _setter("vm_group_name", vm_group_name) @property @pulumi.getter(name="affinityHostGroupName") @@ -377,6 +443,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ComputeClusterVmHostRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/config/__init__.pyi b/sdk/python/pulumi_vsphere/config/__init__.pyi index 0b58393c..df3ec1f7 100644 --- a/sdk/python/pulumi_vsphere/config/__init__.pyi +++ b/sdk/python/pulumi_vsphere/config/__init__.pyi @@ -6,7 +6,7 @@ import copy import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities allowUnverifiedSsl: Optional[bool] diff --git a/sdk/python/pulumi_vsphere/config/vars.py b/sdk/python/pulumi_vsphere/config/vars.py index 9ca9fbec..69913126 100644 --- a/sdk/python/pulumi_vsphere/config/vars.py +++ b/sdk/python/pulumi_vsphere/config/vars.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from .. import _utilities import types diff --git a/sdk/python/pulumi_vsphere/content_library.py b/sdk/python/pulumi_vsphere/content_library.py index 97bb6116..9da5b0b7 100644 --- a/sdk/python/pulumi_vsphere/content_library.py +++ b/sdk/python/pulumi_vsphere/content_library.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -29,15 +29,38 @@ def __init__(__self__, *, :param pulumi.Input['ContentLibraryPublicationArgs'] publication: Options to publish a local content library. :param pulumi.Input['ContentLibrarySubscriptionArgs'] subscription: Options subscribe to a published content library. """ - pulumi.set(__self__, "storage_backings", storage_backings) + ContentLibraryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + storage_backings=storage_backings, + description=description, + name=name, + publication=publication, + subscription=subscription, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + storage_backings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + publication: Optional[pulumi.Input['ContentLibraryPublicationArgs']] = None, + subscription: Optional[pulumi.Input['ContentLibrarySubscriptionArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_backings is None and 'storageBackings' in kwargs: + storage_backings = kwargs['storageBackings'] + if storage_backings is None: + raise TypeError("Missing 'storage_backings' argument") + + _setter("storage_backings", storage_backings) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if publication is not None: - pulumi.set(__self__, "publication", publication) + _setter("publication", publication) if subscription is not None: - pulumi.set(__self__, "subscription", subscription) + _setter("subscription", subscription) @property @pulumi.getter(name="storageBackings") @@ -116,16 +139,37 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input[str]]] storage_backings: The managed object reference ID of the datastore on which to store the content library items. :param pulumi.Input['ContentLibrarySubscriptionArgs'] subscription: Options subscribe to a published content library. """ + _ContentLibraryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + publication=publication, + storage_backings=storage_backings, + subscription=subscription, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + publication: Optional[pulumi.Input['ContentLibraryPublicationArgs']] = None, + storage_backings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + subscription: Optional[pulumi.Input['ContentLibrarySubscriptionArgs']] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if storage_backings is None and 'storageBackings' in kwargs: + storage_backings = kwargs['storageBackings'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if publication is not None: - pulumi.set(__self__, "publication", publication) + _setter("publication", publication) if storage_backings is not None: - pulumi.set(__self__, "storage_backings", storage_backings) + _setter("storage_backings", storage_backings) if subscription is not None: - pulumi.set(__self__, "subscription", subscription) + _setter("subscription", subscription) @property @pulumi.getter @@ -227,6 +271,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ContentLibraryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -248,10 +296,20 @@ def _internal_init(__self__, __props__.__dict__["description"] = description __props__.__dict__["name"] = name + if publication is not None and not isinstance(publication, ContentLibraryPublicationArgs): + publication = publication or {} + def _setter(key, value): + publication[key] = value + ContentLibraryPublicationArgs._configure(_setter, **publication) __props__.__dict__["publication"] = publication if storage_backings is None and not opts.urn: raise TypeError("Missing required property 'storage_backings'") __props__.__dict__["storage_backings"] = storage_backings + if subscription is not None and not isinstance(subscription, ContentLibrarySubscriptionArgs): + subscription = subscription or {} + def _setter(key, value): + subscription[key] = value + ContentLibrarySubscriptionArgs._configure(_setter, **subscription) __props__.__dict__["subscription"] = subscription super(ContentLibrary, __self__).__init__( 'vsphere:index/contentLibrary:ContentLibrary', diff --git a/sdk/python/pulumi_vsphere/content_library_item.py b/sdk/python/pulumi_vsphere/content_library_item.py index d37ebb49..838a1ef4 100644 --- a/sdk/python/pulumi_vsphere/content_library_item.py +++ b/sdk/python/pulumi_vsphere/content_library_item.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ContentLibraryItemArgs', 'ContentLibraryItem'] @@ -30,17 +30,46 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Type of content library item. One of "ovf", "iso", or "vm-template". Default: `ovf`. """ - pulumi.set(__self__, "library_id", library_id) + ContentLibraryItemArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + library_id=library_id, + description=description, + file_url=file_url, + name=name, + source_uuid=source_uuid, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + library_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + file_url: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + source_uuid: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if library_id is None and 'libraryId' in kwargs: + library_id = kwargs['libraryId'] + if library_id is None: + raise TypeError("Missing 'library_id' argument") + if file_url is None and 'fileUrl' in kwargs: + file_url = kwargs['fileUrl'] + if source_uuid is None and 'sourceUuid' in kwargs: + source_uuid = kwargs['sourceUuid'] + + _setter("library_id", library_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if file_url is not None: - pulumi.set(__self__, "file_url", file_url) + _setter("file_url", file_url) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if source_uuid is not None: - pulumi.set(__self__, "source_uuid", source_uuid) + _setter("source_uuid", source_uuid) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="libraryId") @@ -135,18 +164,45 @@ def __init__(__self__, *, :param pulumi.Input[str] type: Type of content library item. One of "ovf", "iso", or "vm-template". Default: `ovf`. """ + _ContentLibraryItemState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + file_url=file_url, + library_id=library_id, + name=name, + source_uuid=source_uuid, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + file_url: Optional[pulumi.Input[str]] = None, + library_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + source_uuid: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if file_url is None and 'fileUrl' in kwargs: + file_url = kwargs['fileUrl'] + if library_id is None and 'libraryId' in kwargs: + library_id = kwargs['libraryId'] + if source_uuid is None and 'sourceUuid' in kwargs: + source_uuid = kwargs['sourceUuid'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if file_url is not None: - pulumi.set(__self__, "file_url", file_url) + _setter("file_url", file_url) if library_id is not None: - pulumi.set(__self__, "library_id", library_id) + _setter("library_id", library_id) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if source_uuid is not None: - pulumi.set(__self__, "source_uuid", source_uuid) + _setter("source_uuid", source_uuid) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -264,6 +320,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ContentLibraryItemArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/custom_attribute.py b/sdk/python/pulumi_vsphere/custom_attribute.py index 49252d74..fb3496cd 100644 --- a/sdk/python/pulumi_vsphere/custom_attribute.py +++ b/sdk/python/pulumi_vsphere/custom_attribute.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['CustomAttributeArgs', 'CustomAttribute'] @@ -23,10 +23,25 @@ def __init__(__self__, *, type. For a full list, review the Managed Object Types. Forces a new resource if changed. :param pulumi.Input[str] name: The name of the custom attribute. """ + CustomAttributeArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_object_type=managed_object_type, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_object_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_object_type is None and 'managedObjectType' in kwargs: + managed_object_type = kwargs['managedObjectType'] + if managed_object_type is not None: - pulumi.set(__self__, "managed_object_type", managed_object_type) + _setter("managed_object_type", managed_object_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="managedObjectType") @@ -67,10 +82,25 @@ def __init__(__self__, *, type. For a full list, review the Managed Object Types. Forces a new resource if changed. :param pulumi.Input[str] name: The name of the custom attribute. """ + _CustomAttributeState._configure( + lambda key, value: pulumi.set(__self__, key, value), + managed_object_type=managed_object_type, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + managed_object_type: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if managed_object_type is None and 'managedObjectType' in kwargs: + managed_object_type = kwargs['managedObjectType'] + if managed_object_type is not None: - pulumi.set(__self__, "managed_object_type", managed_object_type) + _setter("managed_object_type", managed_object_type) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="managedObjectType") @@ -134,6 +164,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + CustomAttributeArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/datacenter.py b/sdk/python/pulumi_vsphere/datacenter.py index 7e6afb74..bf0949cd 100644 --- a/sdk/python/pulumi_vsphere/datacenter.py +++ b/sdk/python/pulumi_vsphere/datacenter.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['DatacenterArgs', 'Datacenter'] @@ -38,14 +38,33 @@ def __init__(__self__, *, > **NOTE:** Tagging support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher. """ + DatacenterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_attributes=custom_attributes, + folder=folder, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="customAttributes") @@ -138,16 +157,37 @@ def __init__(__self__, *, > **NOTE:** Tagging support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher. """ + _DatacenterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_attributes=custom_attributes, + folder=folder, + moid=moid, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + folder: Optional[pulumi.Input[str]] = None, + moid: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if moid is not None: - pulumi.set(__self__, "moid", moid) + _setter("moid", moid) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="customAttributes") @@ -313,6 +353,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatacenterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/datastore_cluster.py b/sdk/python/pulumi_vsphere/datastore_cluster.py index 9dc37aaf..eb4bbd43 100644 --- a/sdk/python/pulumi_vsphere/datastore_cluster.py +++ b/sdk/python/pulumi_vsphere/datastore_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['DatastoreClusterArgs', 'DatastoreCluster'] @@ -119,55 +119,160 @@ def __init__(__self__, *, > **NOTE:** Tagging support requires vCenter 6.0 or higher. """ - pulumi.set(__self__, "datacenter_id", datacenter_id) + DatastoreClusterArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + datacenter_id=datacenter_id, + custom_attributes=custom_attributes, + folder=folder, + name=name, + sdrs_advanced_options=sdrs_advanced_options, + sdrs_automation_level=sdrs_automation_level, + sdrs_default_intra_vm_affinity=sdrs_default_intra_vm_affinity, + sdrs_enabled=sdrs_enabled, + sdrs_free_space_threshold=sdrs_free_space_threshold, + sdrs_free_space_threshold_mode=sdrs_free_space_threshold_mode, + sdrs_free_space_utilization_difference=sdrs_free_space_utilization_difference, + sdrs_io_balance_automation_level=sdrs_io_balance_automation_level, + sdrs_io_latency_threshold=sdrs_io_latency_threshold, + sdrs_io_load_balance_enabled=sdrs_io_load_balance_enabled, + sdrs_io_load_imbalance_threshold=sdrs_io_load_imbalance_threshold, + sdrs_io_reservable_iops_threshold=sdrs_io_reservable_iops_threshold, + sdrs_io_reservable_percent_threshold=sdrs_io_reservable_percent_threshold, + sdrs_io_reservable_threshold_mode=sdrs_io_reservable_threshold_mode, + sdrs_load_balance_interval=sdrs_load_balance_interval, + sdrs_policy_enforcement_automation_level=sdrs_policy_enforcement_automation_level, + sdrs_rule_enforcement_automation_level=sdrs_rule_enforcement_automation_level, + sdrs_space_balance_automation_level=sdrs_space_balance_automation_level, + sdrs_space_utilization_threshold=sdrs_space_utilization_threshold, + sdrs_vm_evacuation_automation_level=sdrs_vm_evacuation_automation_level, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datacenter_id: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sdrs_advanced_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + sdrs_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_default_intra_vm_affinity: Optional[pulumi.Input[bool]] = None, + sdrs_enabled: Optional[pulumi.Input[bool]] = None, + sdrs_free_space_threshold: Optional[pulumi.Input[int]] = None, + sdrs_free_space_threshold_mode: Optional[pulumi.Input[str]] = None, + sdrs_free_space_utilization_difference: Optional[pulumi.Input[int]] = None, + sdrs_io_balance_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_io_latency_threshold: Optional[pulumi.Input[int]] = None, + sdrs_io_load_balance_enabled: Optional[pulumi.Input[bool]] = None, + sdrs_io_load_imbalance_threshold: Optional[pulumi.Input[int]] = None, + sdrs_io_reservable_iops_threshold: Optional[pulumi.Input[int]] = None, + sdrs_io_reservable_percent_threshold: Optional[pulumi.Input[int]] = None, + sdrs_io_reservable_threshold_mode: Optional[pulumi.Input[str]] = None, + sdrs_load_balance_interval: Optional[pulumi.Input[int]] = None, + sdrs_policy_enforcement_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_rule_enforcement_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_space_balance_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_space_utilization_threshold: Optional[pulumi.Input[int]] = None, + sdrs_vm_evacuation_automation_level: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datacenter_id is None and 'datacenterId' in kwargs: + datacenter_id = kwargs['datacenterId'] + if datacenter_id is None: + raise TypeError("Missing 'datacenter_id' argument") + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if sdrs_advanced_options is None and 'sdrsAdvancedOptions' in kwargs: + sdrs_advanced_options = kwargs['sdrsAdvancedOptions'] + if sdrs_automation_level is None and 'sdrsAutomationLevel' in kwargs: + sdrs_automation_level = kwargs['sdrsAutomationLevel'] + if sdrs_default_intra_vm_affinity is None and 'sdrsDefaultIntraVmAffinity' in kwargs: + sdrs_default_intra_vm_affinity = kwargs['sdrsDefaultIntraVmAffinity'] + if sdrs_enabled is None and 'sdrsEnabled' in kwargs: + sdrs_enabled = kwargs['sdrsEnabled'] + if sdrs_free_space_threshold is None and 'sdrsFreeSpaceThreshold' in kwargs: + sdrs_free_space_threshold = kwargs['sdrsFreeSpaceThreshold'] + if sdrs_free_space_threshold_mode is None and 'sdrsFreeSpaceThresholdMode' in kwargs: + sdrs_free_space_threshold_mode = kwargs['sdrsFreeSpaceThresholdMode'] + if sdrs_free_space_utilization_difference is None and 'sdrsFreeSpaceUtilizationDifference' in kwargs: + sdrs_free_space_utilization_difference = kwargs['sdrsFreeSpaceUtilizationDifference'] + if sdrs_io_balance_automation_level is None and 'sdrsIoBalanceAutomationLevel' in kwargs: + sdrs_io_balance_automation_level = kwargs['sdrsIoBalanceAutomationLevel'] + if sdrs_io_latency_threshold is None and 'sdrsIoLatencyThreshold' in kwargs: + sdrs_io_latency_threshold = kwargs['sdrsIoLatencyThreshold'] + if sdrs_io_load_balance_enabled is None and 'sdrsIoLoadBalanceEnabled' in kwargs: + sdrs_io_load_balance_enabled = kwargs['sdrsIoLoadBalanceEnabled'] + if sdrs_io_load_imbalance_threshold is None and 'sdrsIoLoadImbalanceThreshold' in kwargs: + sdrs_io_load_imbalance_threshold = kwargs['sdrsIoLoadImbalanceThreshold'] + if sdrs_io_reservable_iops_threshold is None and 'sdrsIoReservableIopsThreshold' in kwargs: + sdrs_io_reservable_iops_threshold = kwargs['sdrsIoReservableIopsThreshold'] + if sdrs_io_reservable_percent_threshold is None and 'sdrsIoReservablePercentThreshold' in kwargs: + sdrs_io_reservable_percent_threshold = kwargs['sdrsIoReservablePercentThreshold'] + if sdrs_io_reservable_threshold_mode is None and 'sdrsIoReservableThresholdMode' in kwargs: + sdrs_io_reservable_threshold_mode = kwargs['sdrsIoReservableThresholdMode'] + if sdrs_load_balance_interval is None and 'sdrsLoadBalanceInterval' in kwargs: + sdrs_load_balance_interval = kwargs['sdrsLoadBalanceInterval'] + if sdrs_policy_enforcement_automation_level is None and 'sdrsPolicyEnforcementAutomationLevel' in kwargs: + sdrs_policy_enforcement_automation_level = kwargs['sdrsPolicyEnforcementAutomationLevel'] + if sdrs_rule_enforcement_automation_level is None and 'sdrsRuleEnforcementAutomationLevel' in kwargs: + sdrs_rule_enforcement_automation_level = kwargs['sdrsRuleEnforcementAutomationLevel'] + if sdrs_space_balance_automation_level is None and 'sdrsSpaceBalanceAutomationLevel' in kwargs: + sdrs_space_balance_automation_level = kwargs['sdrsSpaceBalanceAutomationLevel'] + if sdrs_space_utilization_threshold is None and 'sdrsSpaceUtilizationThreshold' in kwargs: + sdrs_space_utilization_threshold = kwargs['sdrsSpaceUtilizationThreshold'] + if sdrs_vm_evacuation_automation_level is None and 'sdrsVmEvacuationAutomationLevel' in kwargs: + sdrs_vm_evacuation_automation_level = kwargs['sdrsVmEvacuationAutomationLevel'] + + _setter("datacenter_id", datacenter_id) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sdrs_advanced_options is not None: - pulumi.set(__self__, "sdrs_advanced_options", sdrs_advanced_options) + _setter("sdrs_advanced_options", sdrs_advanced_options) if sdrs_automation_level is not None: - pulumi.set(__self__, "sdrs_automation_level", sdrs_automation_level) + _setter("sdrs_automation_level", sdrs_automation_level) if sdrs_default_intra_vm_affinity is not None: - pulumi.set(__self__, "sdrs_default_intra_vm_affinity", sdrs_default_intra_vm_affinity) + _setter("sdrs_default_intra_vm_affinity", sdrs_default_intra_vm_affinity) if sdrs_enabled is not None: - pulumi.set(__self__, "sdrs_enabled", sdrs_enabled) + _setter("sdrs_enabled", sdrs_enabled) if sdrs_free_space_threshold is not None: - pulumi.set(__self__, "sdrs_free_space_threshold", sdrs_free_space_threshold) + _setter("sdrs_free_space_threshold", sdrs_free_space_threshold) if sdrs_free_space_threshold_mode is not None: - pulumi.set(__self__, "sdrs_free_space_threshold_mode", sdrs_free_space_threshold_mode) + _setter("sdrs_free_space_threshold_mode", sdrs_free_space_threshold_mode) if sdrs_free_space_utilization_difference is not None: - pulumi.set(__self__, "sdrs_free_space_utilization_difference", sdrs_free_space_utilization_difference) + _setter("sdrs_free_space_utilization_difference", sdrs_free_space_utilization_difference) if sdrs_io_balance_automation_level is not None: - pulumi.set(__self__, "sdrs_io_balance_automation_level", sdrs_io_balance_automation_level) + _setter("sdrs_io_balance_automation_level", sdrs_io_balance_automation_level) if sdrs_io_latency_threshold is not None: - pulumi.set(__self__, "sdrs_io_latency_threshold", sdrs_io_latency_threshold) + _setter("sdrs_io_latency_threshold", sdrs_io_latency_threshold) if sdrs_io_load_balance_enabled is not None: - pulumi.set(__self__, "sdrs_io_load_balance_enabled", sdrs_io_load_balance_enabled) + _setter("sdrs_io_load_balance_enabled", sdrs_io_load_balance_enabled) if sdrs_io_load_imbalance_threshold is not None: - pulumi.set(__self__, "sdrs_io_load_imbalance_threshold", sdrs_io_load_imbalance_threshold) + _setter("sdrs_io_load_imbalance_threshold", sdrs_io_load_imbalance_threshold) if sdrs_io_reservable_iops_threshold is not None: - pulumi.set(__self__, "sdrs_io_reservable_iops_threshold", sdrs_io_reservable_iops_threshold) + _setter("sdrs_io_reservable_iops_threshold", sdrs_io_reservable_iops_threshold) if sdrs_io_reservable_percent_threshold is not None: - pulumi.set(__self__, "sdrs_io_reservable_percent_threshold", sdrs_io_reservable_percent_threshold) + _setter("sdrs_io_reservable_percent_threshold", sdrs_io_reservable_percent_threshold) if sdrs_io_reservable_threshold_mode is not None: - pulumi.set(__self__, "sdrs_io_reservable_threshold_mode", sdrs_io_reservable_threshold_mode) + _setter("sdrs_io_reservable_threshold_mode", sdrs_io_reservable_threshold_mode) if sdrs_load_balance_interval is not None: - pulumi.set(__self__, "sdrs_load_balance_interval", sdrs_load_balance_interval) + _setter("sdrs_load_balance_interval", sdrs_load_balance_interval) if sdrs_policy_enforcement_automation_level is not None: - pulumi.set(__self__, "sdrs_policy_enforcement_automation_level", sdrs_policy_enforcement_automation_level) + _setter("sdrs_policy_enforcement_automation_level", sdrs_policy_enforcement_automation_level) if sdrs_rule_enforcement_automation_level is not None: - pulumi.set(__self__, "sdrs_rule_enforcement_automation_level", sdrs_rule_enforcement_automation_level) + _setter("sdrs_rule_enforcement_automation_level", sdrs_rule_enforcement_automation_level) if sdrs_space_balance_automation_level is not None: - pulumi.set(__self__, "sdrs_space_balance_automation_level", sdrs_space_balance_automation_level) + _setter("sdrs_space_balance_automation_level", sdrs_space_balance_automation_level) if sdrs_space_utilization_threshold is not None: - pulumi.set(__self__, "sdrs_space_utilization_threshold", sdrs_space_utilization_threshold) + _setter("sdrs_space_utilization_threshold", sdrs_space_utilization_threshold) if sdrs_vm_evacuation_automation_level is not None: - pulumi.set(__self__, "sdrs_vm_evacuation_automation_level", sdrs_vm_evacuation_automation_level) + _setter("sdrs_vm_evacuation_automation_level", sdrs_vm_evacuation_automation_level) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="datacenterId") @@ -630,56 +735,159 @@ def __init__(__self__, *, > **NOTE:** Tagging support requires vCenter 6.0 or higher. """ + _DatastoreClusterState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_attributes=custom_attributes, + datacenter_id=datacenter_id, + folder=folder, + name=name, + sdrs_advanced_options=sdrs_advanced_options, + sdrs_automation_level=sdrs_automation_level, + sdrs_default_intra_vm_affinity=sdrs_default_intra_vm_affinity, + sdrs_enabled=sdrs_enabled, + sdrs_free_space_threshold=sdrs_free_space_threshold, + sdrs_free_space_threshold_mode=sdrs_free_space_threshold_mode, + sdrs_free_space_utilization_difference=sdrs_free_space_utilization_difference, + sdrs_io_balance_automation_level=sdrs_io_balance_automation_level, + sdrs_io_latency_threshold=sdrs_io_latency_threshold, + sdrs_io_load_balance_enabled=sdrs_io_load_balance_enabled, + sdrs_io_load_imbalance_threshold=sdrs_io_load_imbalance_threshold, + sdrs_io_reservable_iops_threshold=sdrs_io_reservable_iops_threshold, + sdrs_io_reservable_percent_threshold=sdrs_io_reservable_percent_threshold, + sdrs_io_reservable_threshold_mode=sdrs_io_reservable_threshold_mode, + sdrs_load_balance_interval=sdrs_load_balance_interval, + sdrs_policy_enforcement_automation_level=sdrs_policy_enforcement_automation_level, + sdrs_rule_enforcement_automation_level=sdrs_rule_enforcement_automation_level, + sdrs_space_balance_automation_level=sdrs_space_balance_automation_level, + sdrs_space_utilization_threshold=sdrs_space_utilization_threshold, + sdrs_vm_evacuation_automation_level=sdrs_vm_evacuation_automation_level, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datacenter_id: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + sdrs_advanced_options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + sdrs_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_default_intra_vm_affinity: Optional[pulumi.Input[bool]] = None, + sdrs_enabled: Optional[pulumi.Input[bool]] = None, + sdrs_free_space_threshold: Optional[pulumi.Input[int]] = None, + sdrs_free_space_threshold_mode: Optional[pulumi.Input[str]] = None, + sdrs_free_space_utilization_difference: Optional[pulumi.Input[int]] = None, + sdrs_io_balance_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_io_latency_threshold: Optional[pulumi.Input[int]] = None, + sdrs_io_load_balance_enabled: Optional[pulumi.Input[bool]] = None, + sdrs_io_load_imbalance_threshold: Optional[pulumi.Input[int]] = None, + sdrs_io_reservable_iops_threshold: Optional[pulumi.Input[int]] = None, + sdrs_io_reservable_percent_threshold: Optional[pulumi.Input[int]] = None, + sdrs_io_reservable_threshold_mode: Optional[pulumi.Input[str]] = None, + sdrs_load_balance_interval: Optional[pulumi.Input[int]] = None, + sdrs_policy_enforcement_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_rule_enforcement_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_space_balance_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_space_utilization_threshold: Optional[pulumi.Input[int]] = None, + sdrs_vm_evacuation_automation_level: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if datacenter_id is None and 'datacenterId' in kwargs: + datacenter_id = kwargs['datacenterId'] + if sdrs_advanced_options is None and 'sdrsAdvancedOptions' in kwargs: + sdrs_advanced_options = kwargs['sdrsAdvancedOptions'] + if sdrs_automation_level is None and 'sdrsAutomationLevel' in kwargs: + sdrs_automation_level = kwargs['sdrsAutomationLevel'] + if sdrs_default_intra_vm_affinity is None and 'sdrsDefaultIntraVmAffinity' in kwargs: + sdrs_default_intra_vm_affinity = kwargs['sdrsDefaultIntraVmAffinity'] + if sdrs_enabled is None and 'sdrsEnabled' in kwargs: + sdrs_enabled = kwargs['sdrsEnabled'] + if sdrs_free_space_threshold is None and 'sdrsFreeSpaceThreshold' in kwargs: + sdrs_free_space_threshold = kwargs['sdrsFreeSpaceThreshold'] + if sdrs_free_space_threshold_mode is None and 'sdrsFreeSpaceThresholdMode' in kwargs: + sdrs_free_space_threshold_mode = kwargs['sdrsFreeSpaceThresholdMode'] + if sdrs_free_space_utilization_difference is None and 'sdrsFreeSpaceUtilizationDifference' in kwargs: + sdrs_free_space_utilization_difference = kwargs['sdrsFreeSpaceUtilizationDifference'] + if sdrs_io_balance_automation_level is None and 'sdrsIoBalanceAutomationLevel' in kwargs: + sdrs_io_balance_automation_level = kwargs['sdrsIoBalanceAutomationLevel'] + if sdrs_io_latency_threshold is None and 'sdrsIoLatencyThreshold' in kwargs: + sdrs_io_latency_threshold = kwargs['sdrsIoLatencyThreshold'] + if sdrs_io_load_balance_enabled is None and 'sdrsIoLoadBalanceEnabled' in kwargs: + sdrs_io_load_balance_enabled = kwargs['sdrsIoLoadBalanceEnabled'] + if sdrs_io_load_imbalance_threshold is None and 'sdrsIoLoadImbalanceThreshold' in kwargs: + sdrs_io_load_imbalance_threshold = kwargs['sdrsIoLoadImbalanceThreshold'] + if sdrs_io_reservable_iops_threshold is None and 'sdrsIoReservableIopsThreshold' in kwargs: + sdrs_io_reservable_iops_threshold = kwargs['sdrsIoReservableIopsThreshold'] + if sdrs_io_reservable_percent_threshold is None and 'sdrsIoReservablePercentThreshold' in kwargs: + sdrs_io_reservable_percent_threshold = kwargs['sdrsIoReservablePercentThreshold'] + if sdrs_io_reservable_threshold_mode is None and 'sdrsIoReservableThresholdMode' in kwargs: + sdrs_io_reservable_threshold_mode = kwargs['sdrsIoReservableThresholdMode'] + if sdrs_load_balance_interval is None and 'sdrsLoadBalanceInterval' in kwargs: + sdrs_load_balance_interval = kwargs['sdrsLoadBalanceInterval'] + if sdrs_policy_enforcement_automation_level is None and 'sdrsPolicyEnforcementAutomationLevel' in kwargs: + sdrs_policy_enforcement_automation_level = kwargs['sdrsPolicyEnforcementAutomationLevel'] + if sdrs_rule_enforcement_automation_level is None and 'sdrsRuleEnforcementAutomationLevel' in kwargs: + sdrs_rule_enforcement_automation_level = kwargs['sdrsRuleEnforcementAutomationLevel'] + if sdrs_space_balance_automation_level is None and 'sdrsSpaceBalanceAutomationLevel' in kwargs: + sdrs_space_balance_automation_level = kwargs['sdrsSpaceBalanceAutomationLevel'] + if sdrs_space_utilization_threshold is None and 'sdrsSpaceUtilizationThreshold' in kwargs: + sdrs_space_utilization_threshold = kwargs['sdrsSpaceUtilizationThreshold'] + if sdrs_vm_evacuation_automation_level is None and 'sdrsVmEvacuationAutomationLevel' in kwargs: + sdrs_vm_evacuation_automation_level = kwargs['sdrsVmEvacuationAutomationLevel'] + if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datacenter_id is not None: - pulumi.set(__self__, "datacenter_id", datacenter_id) + _setter("datacenter_id", datacenter_id) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if sdrs_advanced_options is not None: - pulumi.set(__self__, "sdrs_advanced_options", sdrs_advanced_options) + _setter("sdrs_advanced_options", sdrs_advanced_options) if sdrs_automation_level is not None: - pulumi.set(__self__, "sdrs_automation_level", sdrs_automation_level) + _setter("sdrs_automation_level", sdrs_automation_level) if sdrs_default_intra_vm_affinity is not None: - pulumi.set(__self__, "sdrs_default_intra_vm_affinity", sdrs_default_intra_vm_affinity) + _setter("sdrs_default_intra_vm_affinity", sdrs_default_intra_vm_affinity) if sdrs_enabled is not None: - pulumi.set(__self__, "sdrs_enabled", sdrs_enabled) + _setter("sdrs_enabled", sdrs_enabled) if sdrs_free_space_threshold is not None: - pulumi.set(__self__, "sdrs_free_space_threshold", sdrs_free_space_threshold) + _setter("sdrs_free_space_threshold", sdrs_free_space_threshold) if sdrs_free_space_threshold_mode is not None: - pulumi.set(__self__, "sdrs_free_space_threshold_mode", sdrs_free_space_threshold_mode) + _setter("sdrs_free_space_threshold_mode", sdrs_free_space_threshold_mode) if sdrs_free_space_utilization_difference is not None: - pulumi.set(__self__, "sdrs_free_space_utilization_difference", sdrs_free_space_utilization_difference) + _setter("sdrs_free_space_utilization_difference", sdrs_free_space_utilization_difference) if sdrs_io_balance_automation_level is not None: - pulumi.set(__self__, "sdrs_io_balance_automation_level", sdrs_io_balance_automation_level) + _setter("sdrs_io_balance_automation_level", sdrs_io_balance_automation_level) if sdrs_io_latency_threshold is not None: - pulumi.set(__self__, "sdrs_io_latency_threshold", sdrs_io_latency_threshold) + _setter("sdrs_io_latency_threshold", sdrs_io_latency_threshold) if sdrs_io_load_balance_enabled is not None: - pulumi.set(__self__, "sdrs_io_load_balance_enabled", sdrs_io_load_balance_enabled) + _setter("sdrs_io_load_balance_enabled", sdrs_io_load_balance_enabled) if sdrs_io_load_imbalance_threshold is not None: - pulumi.set(__self__, "sdrs_io_load_imbalance_threshold", sdrs_io_load_imbalance_threshold) + _setter("sdrs_io_load_imbalance_threshold", sdrs_io_load_imbalance_threshold) if sdrs_io_reservable_iops_threshold is not None: - pulumi.set(__self__, "sdrs_io_reservable_iops_threshold", sdrs_io_reservable_iops_threshold) + _setter("sdrs_io_reservable_iops_threshold", sdrs_io_reservable_iops_threshold) if sdrs_io_reservable_percent_threshold is not None: - pulumi.set(__self__, "sdrs_io_reservable_percent_threshold", sdrs_io_reservable_percent_threshold) + _setter("sdrs_io_reservable_percent_threshold", sdrs_io_reservable_percent_threshold) if sdrs_io_reservable_threshold_mode is not None: - pulumi.set(__self__, "sdrs_io_reservable_threshold_mode", sdrs_io_reservable_threshold_mode) + _setter("sdrs_io_reservable_threshold_mode", sdrs_io_reservable_threshold_mode) if sdrs_load_balance_interval is not None: - pulumi.set(__self__, "sdrs_load_balance_interval", sdrs_load_balance_interval) + _setter("sdrs_load_balance_interval", sdrs_load_balance_interval) if sdrs_policy_enforcement_automation_level is not None: - pulumi.set(__self__, "sdrs_policy_enforcement_automation_level", sdrs_policy_enforcement_automation_level) + _setter("sdrs_policy_enforcement_automation_level", sdrs_policy_enforcement_automation_level) if sdrs_rule_enforcement_automation_level is not None: - pulumi.set(__self__, "sdrs_rule_enforcement_automation_level", sdrs_rule_enforcement_automation_level) + _setter("sdrs_rule_enforcement_automation_level", sdrs_rule_enforcement_automation_level) if sdrs_space_balance_automation_level is not None: - pulumi.set(__self__, "sdrs_space_balance_automation_level", sdrs_space_balance_automation_level) + _setter("sdrs_space_balance_automation_level", sdrs_space_balance_automation_level) if sdrs_space_utilization_threshold is not None: - pulumi.set(__self__, "sdrs_space_utilization_threshold", sdrs_space_utilization_threshold) + _setter("sdrs_space_utilization_threshold", sdrs_space_utilization_threshold) if sdrs_vm_evacuation_automation_level is not None: - pulumi.set(__self__, "sdrs_vm_evacuation_automation_level", sdrs_vm_evacuation_automation_level) + _setter("sdrs_vm_evacuation_automation_level", sdrs_vm_evacuation_automation_level) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="customAttributes") @@ -1165,6 +1373,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatastoreClusterArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py b/sdk/python/pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py index 4fe75c8a..a9bd786f 100644 --- a/sdk/python/pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py +++ b/sdk/python/pulumi_vsphere/datastore_cluster_vm_anti_affinity_rule.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['DatastoreClusterVmAntiAffinityRuleArgs', 'DatastoreClusterVmAntiAffinityRule'] @@ -33,14 +33,41 @@ def __init__(__self__, *, machine operations that may violate this rule. Default: `false`. :param pulumi.Input[str] name: The name of the rule. This must be unique in the cluster. """ - pulumi.set(__self__, "datastore_cluster_id", datastore_cluster_id) - pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids) + DatastoreClusterVmAntiAffinityRuleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + datastore_cluster_id=datastore_cluster_id, + virtual_machine_ids=virtual_machine_ids, + enabled=enabled, + mandatory=mandatory, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datastore_cluster_id: Optional[pulumi.Input[str]] = None, + virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + mandatory: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datastore_cluster_id is None and 'datastoreClusterId' in kwargs: + datastore_cluster_id = kwargs['datastoreClusterId'] + if datastore_cluster_id is None: + raise TypeError("Missing 'datastore_cluster_id' argument") + if virtual_machine_ids is None and 'virtualMachineIds' in kwargs: + virtual_machine_ids = kwargs['virtualMachineIds'] + if virtual_machine_ids is None: + raise TypeError("Missing 'virtual_machine_ids' argument") + + _setter("datastore_cluster_id", datastore_cluster_id) + _setter("virtual_machine_ids", virtual_machine_ids) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="datastoreClusterId") @@ -131,16 +158,39 @@ def __init__(__self__, *, > **NOTE:** The minimum length of `virtual_machine_ids` is 2. """ + _DatastoreClusterVmAntiAffinityRuleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + datastore_cluster_id=datastore_cluster_id, + enabled=enabled, + mandatory=mandatory, + name=name, + virtual_machine_ids=virtual_machine_ids, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datastore_cluster_id: Optional[pulumi.Input[str]] = None, + enabled: Optional[pulumi.Input[bool]] = None, + mandatory: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + virtual_machine_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datastore_cluster_id is None and 'datastoreClusterId' in kwargs: + datastore_cluster_id = kwargs['datastoreClusterId'] + if virtual_machine_ids is None and 'virtualMachineIds' in kwargs: + virtual_machine_ids = kwargs['virtualMachineIds'] + if datastore_cluster_id is not None: - pulumi.set(__self__, "datastore_cluster_id", datastore_cluster_id) + _setter("datastore_cluster_id", datastore_cluster_id) if enabled is not None: - pulumi.set(__self__, "enabled", enabled) + _setter("enabled", enabled) if mandatory is not None: - pulumi.set(__self__, "mandatory", mandatory) + _setter("mandatory", mandatory) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if virtual_machine_ids is not None: - pulumi.set(__self__, "virtual_machine_ids", virtual_machine_ids) + _setter("virtual_machine_ids", virtual_machine_ids) @property @pulumi.getter(name="datastoreClusterId") @@ -254,6 +304,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DatastoreClusterVmAntiAffinityRuleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/distributed_port_group.py b/sdk/python/pulumi_vsphere/distributed_port_group.py index 27bb28a7..c47bf180 100644 --- a/sdk/python/pulumi_vsphere/distributed_port_group.py +++ b/sdk/python/pulumi_vsphere/distributed_port_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -147,97 +147,282 @@ def __init__(__self__, *, individual port. :param pulumi.Input[Sequence[pulumi.Input['DistributedPortGroupVlanRangeArgs']]] vlan_ranges: The VLAN ID for single VLAN mode. 0 denotes no VLAN. """ - pulumi.set(__self__, "distributed_virtual_switch_uuid", distributed_virtual_switch_uuid) + DistributedPortGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + distributed_virtual_switch_uuid=distributed_virtual_switch_uuid, + active_uplinks=active_uplinks, + allow_forged_transmits=allow_forged_transmits, + allow_mac_changes=allow_mac_changes, + allow_promiscuous=allow_promiscuous, + auto_expand=auto_expand, + block_all_ports=block_all_ports, + block_override_allowed=block_override_allowed, + check_beacon=check_beacon, + custom_attributes=custom_attributes, + description=description, + directpath_gen2_allowed=directpath_gen2_allowed, + egress_shaping_average_bandwidth=egress_shaping_average_bandwidth, + egress_shaping_burst_size=egress_shaping_burst_size, + egress_shaping_enabled=egress_shaping_enabled, + egress_shaping_peak_bandwidth=egress_shaping_peak_bandwidth, + failback=failback, + ingress_shaping_average_bandwidth=ingress_shaping_average_bandwidth, + ingress_shaping_burst_size=ingress_shaping_burst_size, + ingress_shaping_enabled=ingress_shaping_enabled, + ingress_shaping_peak_bandwidth=ingress_shaping_peak_bandwidth, + lacp_enabled=lacp_enabled, + lacp_mode=lacp_mode, + live_port_moving_allowed=live_port_moving_allowed, + name=name, + netflow_enabled=netflow_enabled, + netflow_override_allowed=netflow_override_allowed, + network_resource_pool_key=network_resource_pool_key, + network_resource_pool_override_allowed=network_resource_pool_override_allowed, + notify_switches=notify_switches, + number_of_ports=number_of_ports, + port_config_reset_at_disconnect=port_config_reset_at_disconnect, + port_name_format=port_name_format, + port_private_secondary_vlan_id=port_private_secondary_vlan_id, + security_policy_override_allowed=security_policy_override_allowed, + shaping_override_allowed=shaping_override_allowed, + standby_uplinks=standby_uplinks, + tags=tags, + teaming_policy=teaming_policy, + traffic_filter_override_allowed=traffic_filter_override_allowed, + tx_uplink=tx_uplink, + type=type, + uplink_teaming_override_allowed=uplink_teaming_override_allowed, + vlan_id=vlan_id, + vlan_override_allowed=vlan_override_allowed, + vlan_ranges=vlan_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + distributed_virtual_switch_uuid: Optional[pulumi.Input[str]] = None, + active_uplinks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allow_forged_transmits: Optional[pulumi.Input[bool]] = None, + allow_mac_changes: Optional[pulumi.Input[bool]] = None, + allow_promiscuous: Optional[pulumi.Input[bool]] = None, + auto_expand: Optional[pulumi.Input[bool]] = None, + block_all_ports: Optional[pulumi.Input[bool]] = None, + block_override_allowed: Optional[pulumi.Input[bool]] = None, + check_beacon: Optional[pulumi.Input[bool]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + directpath_gen2_allowed: Optional[pulumi.Input[bool]] = None, + egress_shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + egress_shaping_burst_size: Optional[pulumi.Input[int]] = None, + egress_shaping_enabled: Optional[pulumi.Input[bool]] = None, + egress_shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + failback: Optional[pulumi.Input[bool]] = None, + ingress_shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + ingress_shaping_burst_size: Optional[pulumi.Input[int]] = None, + ingress_shaping_enabled: Optional[pulumi.Input[bool]] = None, + ingress_shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + lacp_enabled: Optional[pulumi.Input[bool]] = None, + lacp_mode: Optional[pulumi.Input[str]] = None, + live_port_moving_allowed: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + netflow_enabled: Optional[pulumi.Input[bool]] = None, + netflow_override_allowed: Optional[pulumi.Input[bool]] = None, + network_resource_pool_key: Optional[pulumi.Input[str]] = None, + network_resource_pool_override_allowed: Optional[pulumi.Input[bool]] = None, + notify_switches: Optional[pulumi.Input[bool]] = None, + number_of_ports: Optional[pulumi.Input[int]] = None, + port_config_reset_at_disconnect: Optional[pulumi.Input[bool]] = None, + port_name_format: Optional[pulumi.Input[str]] = None, + port_private_secondary_vlan_id: Optional[pulumi.Input[int]] = None, + security_policy_override_allowed: Optional[pulumi.Input[bool]] = None, + shaping_override_allowed: Optional[pulumi.Input[bool]] = None, + standby_uplinks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + teaming_policy: Optional[pulumi.Input[str]] = None, + traffic_filter_override_allowed: Optional[pulumi.Input[bool]] = None, + tx_uplink: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None, + uplink_teaming_override_allowed: Optional[pulumi.Input[bool]] = None, + vlan_id: Optional[pulumi.Input[int]] = None, + vlan_override_allowed: Optional[pulumi.Input[bool]] = None, + vlan_ranges: Optional[pulumi.Input[Sequence[pulumi.Input['DistributedPortGroupVlanRangeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if distributed_virtual_switch_uuid is None and 'distributedVirtualSwitchUuid' in kwargs: + distributed_virtual_switch_uuid = kwargs['distributedVirtualSwitchUuid'] + if distributed_virtual_switch_uuid is None: + raise TypeError("Missing 'distributed_virtual_switch_uuid' argument") + if active_uplinks is None and 'activeUplinks' in kwargs: + active_uplinks = kwargs['activeUplinks'] + if allow_forged_transmits is None and 'allowForgedTransmits' in kwargs: + allow_forged_transmits = kwargs['allowForgedTransmits'] + if allow_mac_changes is None and 'allowMacChanges' in kwargs: + allow_mac_changes = kwargs['allowMacChanges'] + if allow_promiscuous is None and 'allowPromiscuous' in kwargs: + allow_promiscuous = kwargs['allowPromiscuous'] + if auto_expand is None and 'autoExpand' in kwargs: + auto_expand = kwargs['autoExpand'] + if block_all_ports is None and 'blockAllPorts' in kwargs: + block_all_ports = kwargs['blockAllPorts'] + if block_override_allowed is None and 'blockOverrideAllowed' in kwargs: + block_override_allowed = kwargs['blockOverrideAllowed'] + if check_beacon is None and 'checkBeacon' in kwargs: + check_beacon = kwargs['checkBeacon'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if directpath_gen2_allowed is None and 'directpathGen2Allowed' in kwargs: + directpath_gen2_allowed = kwargs['directpathGen2Allowed'] + if egress_shaping_average_bandwidth is None and 'egressShapingAverageBandwidth' in kwargs: + egress_shaping_average_bandwidth = kwargs['egressShapingAverageBandwidth'] + if egress_shaping_burst_size is None and 'egressShapingBurstSize' in kwargs: + egress_shaping_burst_size = kwargs['egressShapingBurstSize'] + if egress_shaping_enabled is None and 'egressShapingEnabled' in kwargs: + egress_shaping_enabled = kwargs['egressShapingEnabled'] + if egress_shaping_peak_bandwidth is None and 'egressShapingPeakBandwidth' in kwargs: + egress_shaping_peak_bandwidth = kwargs['egressShapingPeakBandwidth'] + if ingress_shaping_average_bandwidth is None and 'ingressShapingAverageBandwidth' in kwargs: + ingress_shaping_average_bandwidth = kwargs['ingressShapingAverageBandwidth'] + if ingress_shaping_burst_size is None and 'ingressShapingBurstSize' in kwargs: + ingress_shaping_burst_size = kwargs['ingressShapingBurstSize'] + if ingress_shaping_enabled is None and 'ingressShapingEnabled' in kwargs: + ingress_shaping_enabled = kwargs['ingressShapingEnabled'] + if ingress_shaping_peak_bandwidth is None and 'ingressShapingPeakBandwidth' in kwargs: + ingress_shaping_peak_bandwidth = kwargs['ingressShapingPeakBandwidth'] + if lacp_enabled is None and 'lacpEnabled' in kwargs: + lacp_enabled = kwargs['lacpEnabled'] + if lacp_mode is None and 'lacpMode' in kwargs: + lacp_mode = kwargs['lacpMode'] + if live_port_moving_allowed is None and 'livePortMovingAllowed' in kwargs: + live_port_moving_allowed = kwargs['livePortMovingAllowed'] + if netflow_enabled is None and 'netflowEnabled' in kwargs: + netflow_enabled = kwargs['netflowEnabled'] + if netflow_override_allowed is None and 'netflowOverrideAllowed' in kwargs: + netflow_override_allowed = kwargs['netflowOverrideAllowed'] + if network_resource_pool_key is None and 'networkResourcePoolKey' in kwargs: + network_resource_pool_key = kwargs['networkResourcePoolKey'] + if network_resource_pool_override_allowed is None and 'networkResourcePoolOverrideAllowed' in kwargs: + network_resource_pool_override_allowed = kwargs['networkResourcePoolOverrideAllowed'] + if notify_switches is None and 'notifySwitches' in kwargs: + notify_switches = kwargs['notifySwitches'] + if number_of_ports is None and 'numberOfPorts' in kwargs: + number_of_ports = kwargs['numberOfPorts'] + if port_config_reset_at_disconnect is None and 'portConfigResetAtDisconnect' in kwargs: + port_config_reset_at_disconnect = kwargs['portConfigResetAtDisconnect'] + if port_name_format is None and 'portNameFormat' in kwargs: + port_name_format = kwargs['portNameFormat'] + if port_private_secondary_vlan_id is None and 'portPrivateSecondaryVlanId' in kwargs: + port_private_secondary_vlan_id = kwargs['portPrivateSecondaryVlanId'] + if security_policy_override_allowed is None and 'securityPolicyOverrideAllowed' in kwargs: + security_policy_override_allowed = kwargs['securityPolicyOverrideAllowed'] + if shaping_override_allowed is None and 'shapingOverrideAllowed' in kwargs: + shaping_override_allowed = kwargs['shapingOverrideAllowed'] + if standby_uplinks is None and 'standbyUplinks' in kwargs: + standby_uplinks = kwargs['standbyUplinks'] + if teaming_policy is None and 'teamingPolicy' in kwargs: + teaming_policy = kwargs['teamingPolicy'] + if traffic_filter_override_allowed is None and 'trafficFilterOverrideAllowed' in kwargs: + traffic_filter_override_allowed = kwargs['trafficFilterOverrideAllowed'] + if tx_uplink is None and 'txUplink' in kwargs: + tx_uplink = kwargs['txUplink'] + if uplink_teaming_override_allowed is None and 'uplinkTeamingOverrideAllowed' in kwargs: + uplink_teaming_override_allowed = kwargs['uplinkTeamingOverrideAllowed'] + if vlan_id is None and 'vlanId' in kwargs: + vlan_id = kwargs['vlanId'] + if vlan_override_allowed is None and 'vlanOverrideAllowed' in kwargs: + vlan_override_allowed = kwargs['vlanOverrideAllowed'] + if vlan_ranges is None and 'vlanRanges' in kwargs: + vlan_ranges = kwargs['vlanRanges'] + + _setter("distributed_virtual_switch_uuid", distributed_virtual_switch_uuid) if active_uplinks is not None: - pulumi.set(__self__, "active_uplinks", active_uplinks) + _setter("active_uplinks", active_uplinks) if allow_forged_transmits is not None: - pulumi.set(__self__, "allow_forged_transmits", allow_forged_transmits) + _setter("allow_forged_transmits", allow_forged_transmits) if allow_mac_changes is not None: - pulumi.set(__self__, "allow_mac_changes", allow_mac_changes) + _setter("allow_mac_changes", allow_mac_changes) if allow_promiscuous is not None: - pulumi.set(__self__, "allow_promiscuous", allow_promiscuous) + _setter("allow_promiscuous", allow_promiscuous) if auto_expand is not None: - pulumi.set(__self__, "auto_expand", auto_expand) + _setter("auto_expand", auto_expand) if block_all_ports is not None: - pulumi.set(__self__, "block_all_ports", block_all_ports) + _setter("block_all_ports", block_all_ports) if block_override_allowed is not None: - pulumi.set(__self__, "block_override_allowed", block_override_allowed) + _setter("block_override_allowed", block_override_allowed) if check_beacon is not None: - pulumi.set(__self__, "check_beacon", check_beacon) + _setter("check_beacon", check_beacon) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if directpath_gen2_allowed is not None: - pulumi.set(__self__, "directpath_gen2_allowed", directpath_gen2_allowed) + _setter("directpath_gen2_allowed", directpath_gen2_allowed) if egress_shaping_average_bandwidth is not None: - pulumi.set(__self__, "egress_shaping_average_bandwidth", egress_shaping_average_bandwidth) + _setter("egress_shaping_average_bandwidth", egress_shaping_average_bandwidth) if egress_shaping_burst_size is not None: - pulumi.set(__self__, "egress_shaping_burst_size", egress_shaping_burst_size) + _setter("egress_shaping_burst_size", egress_shaping_burst_size) if egress_shaping_enabled is not None: - pulumi.set(__self__, "egress_shaping_enabled", egress_shaping_enabled) + _setter("egress_shaping_enabled", egress_shaping_enabled) if egress_shaping_peak_bandwidth is not None: - pulumi.set(__self__, "egress_shaping_peak_bandwidth", egress_shaping_peak_bandwidth) + _setter("egress_shaping_peak_bandwidth", egress_shaping_peak_bandwidth) if failback is not None: - pulumi.set(__self__, "failback", failback) + _setter("failback", failback) if ingress_shaping_average_bandwidth is not None: - pulumi.set(__self__, "ingress_shaping_average_bandwidth", ingress_shaping_average_bandwidth) + _setter("ingress_shaping_average_bandwidth", ingress_shaping_average_bandwidth) if ingress_shaping_burst_size is not None: - pulumi.set(__self__, "ingress_shaping_burst_size", ingress_shaping_burst_size) + _setter("ingress_shaping_burst_size", ingress_shaping_burst_size) if ingress_shaping_enabled is not None: - pulumi.set(__self__, "ingress_shaping_enabled", ingress_shaping_enabled) + _setter("ingress_shaping_enabled", ingress_shaping_enabled) if ingress_shaping_peak_bandwidth is not None: - pulumi.set(__self__, "ingress_shaping_peak_bandwidth", ingress_shaping_peak_bandwidth) + _setter("ingress_shaping_peak_bandwidth", ingress_shaping_peak_bandwidth) if lacp_enabled is not None: - pulumi.set(__self__, "lacp_enabled", lacp_enabled) + _setter("lacp_enabled", lacp_enabled) if lacp_mode is not None: - pulumi.set(__self__, "lacp_mode", lacp_mode) + _setter("lacp_mode", lacp_mode) if live_port_moving_allowed is not None: - pulumi.set(__self__, "live_port_moving_allowed", live_port_moving_allowed) + _setter("live_port_moving_allowed", live_port_moving_allowed) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if netflow_enabled is not None: - pulumi.set(__self__, "netflow_enabled", netflow_enabled) + _setter("netflow_enabled", netflow_enabled) if netflow_override_allowed is not None: - pulumi.set(__self__, "netflow_override_allowed", netflow_override_allowed) + _setter("netflow_override_allowed", netflow_override_allowed) if network_resource_pool_key is not None: - pulumi.set(__self__, "network_resource_pool_key", network_resource_pool_key) + _setter("network_resource_pool_key", network_resource_pool_key) if network_resource_pool_override_allowed is not None: - pulumi.set(__self__, "network_resource_pool_override_allowed", network_resource_pool_override_allowed) + _setter("network_resource_pool_override_allowed", network_resource_pool_override_allowed) if notify_switches is not None: - pulumi.set(__self__, "notify_switches", notify_switches) + _setter("notify_switches", notify_switches) if number_of_ports is not None: - pulumi.set(__self__, "number_of_ports", number_of_ports) + _setter("number_of_ports", number_of_ports) if port_config_reset_at_disconnect is not None: - pulumi.set(__self__, "port_config_reset_at_disconnect", port_config_reset_at_disconnect) + _setter("port_config_reset_at_disconnect", port_config_reset_at_disconnect) if port_name_format is not None: - pulumi.set(__self__, "port_name_format", port_name_format) + _setter("port_name_format", port_name_format) if port_private_secondary_vlan_id is not None: - pulumi.set(__self__, "port_private_secondary_vlan_id", port_private_secondary_vlan_id) + _setter("port_private_secondary_vlan_id", port_private_secondary_vlan_id) if security_policy_override_allowed is not None: - pulumi.set(__self__, "security_policy_override_allowed", security_policy_override_allowed) + _setter("security_policy_override_allowed", security_policy_override_allowed) if shaping_override_allowed is not None: - pulumi.set(__self__, "shaping_override_allowed", shaping_override_allowed) + _setter("shaping_override_allowed", shaping_override_allowed) if standby_uplinks is not None: - pulumi.set(__self__, "standby_uplinks", standby_uplinks) + _setter("standby_uplinks", standby_uplinks) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if teaming_policy is not None: - pulumi.set(__self__, "teaming_policy", teaming_policy) + _setter("teaming_policy", teaming_policy) if traffic_filter_override_allowed is not None: - pulumi.set(__self__, "traffic_filter_override_allowed", traffic_filter_override_allowed) + _setter("traffic_filter_override_allowed", traffic_filter_override_allowed) if tx_uplink is not None: - pulumi.set(__self__, "tx_uplink", tx_uplink) + _setter("tx_uplink", tx_uplink) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if uplink_teaming_override_allowed is not None: - pulumi.set(__self__, "uplink_teaming_override_allowed", uplink_teaming_override_allowed) + _setter("uplink_teaming_override_allowed", uplink_teaming_override_allowed) if vlan_id is not None: - pulumi.set(__self__, "vlan_id", vlan_id) + _setter("vlan_id", vlan_id) if vlan_override_allowed is not None: - pulumi.set(__self__, "vlan_override_allowed", vlan_override_allowed) + _setter("vlan_override_allowed", vlan_override_allowed) if vlan_ranges is not None: - pulumi.set(__self__, "vlan_ranges", vlan_ranges) + _setter("vlan_ranges", vlan_ranges) @property @pulumi.getter(name="distributedVirtualSwitchUuid") @@ -967,102 +1152,291 @@ def __init__(__self__, *, individual port. :param pulumi.Input[Sequence[pulumi.Input['DistributedPortGroupVlanRangeArgs']]] vlan_ranges: The VLAN ID for single VLAN mode. 0 denotes no VLAN. """ + _DistributedPortGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_uplinks=active_uplinks, + allow_forged_transmits=allow_forged_transmits, + allow_mac_changes=allow_mac_changes, + allow_promiscuous=allow_promiscuous, + auto_expand=auto_expand, + block_all_ports=block_all_ports, + block_override_allowed=block_override_allowed, + check_beacon=check_beacon, + config_version=config_version, + custom_attributes=custom_attributes, + description=description, + directpath_gen2_allowed=directpath_gen2_allowed, + distributed_virtual_switch_uuid=distributed_virtual_switch_uuid, + egress_shaping_average_bandwidth=egress_shaping_average_bandwidth, + egress_shaping_burst_size=egress_shaping_burst_size, + egress_shaping_enabled=egress_shaping_enabled, + egress_shaping_peak_bandwidth=egress_shaping_peak_bandwidth, + failback=failback, + ingress_shaping_average_bandwidth=ingress_shaping_average_bandwidth, + ingress_shaping_burst_size=ingress_shaping_burst_size, + ingress_shaping_enabled=ingress_shaping_enabled, + ingress_shaping_peak_bandwidth=ingress_shaping_peak_bandwidth, + key=key, + lacp_enabled=lacp_enabled, + lacp_mode=lacp_mode, + live_port_moving_allowed=live_port_moving_allowed, + name=name, + netflow_enabled=netflow_enabled, + netflow_override_allowed=netflow_override_allowed, + network_resource_pool_key=network_resource_pool_key, + network_resource_pool_override_allowed=network_resource_pool_override_allowed, + notify_switches=notify_switches, + number_of_ports=number_of_ports, + port_config_reset_at_disconnect=port_config_reset_at_disconnect, + port_name_format=port_name_format, + port_private_secondary_vlan_id=port_private_secondary_vlan_id, + security_policy_override_allowed=security_policy_override_allowed, + shaping_override_allowed=shaping_override_allowed, + standby_uplinks=standby_uplinks, + tags=tags, + teaming_policy=teaming_policy, + traffic_filter_override_allowed=traffic_filter_override_allowed, + tx_uplink=tx_uplink, + type=type, + uplink_teaming_override_allowed=uplink_teaming_override_allowed, + vlan_id=vlan_id, + vlan_override_allowed=vlan_override_allowed, + vlan_ranges=vlan_ranges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_uplinks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allow_forged_transmits: Optional[pulumi.Input[bool]] = None, + allow_mac_changes: Optional[pulumi.Input[bool]] = None, + allow_promiscuous: Optional[pulumi.Input[bool]] = None, + auto_expand: Optional[pulumi.Input[bool]] = None, + block_all_ports: Optional[pulumi.Input[bool]] = None, + block_override_allowed: Optional[pulumi.Input[bool]] = None, + check_beacon: Optional[pulumi.Input[bool]] = None, + config_version: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + directpath_gen2_allowed: Optional[pulumi.Input[bool]] = None, + distributed_virtual_switch_uuid: Optional[pulumi.Input[str]] = None, + egress_shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + egress_shaping_burst_size: Optional[pulumi.Input[int]] = None, + egress_shaping_enabled: Optional[pulumi.Input[bool]] = None, + egress_shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + failback: Optional[pulumi.Input[bool]] = None, + ingress_shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + ingress_shaping_burst_size: Optional[pulumi.Input[int]] = None, + ingress_shaping_enabled: Optional[pulumi.Input[bool]] = None, + ingress_shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + key: Optional[pulumi.Input[str]] = None, + lacp_enabled: Optional[pulumi.Input[bool]] = None, + lacp_mode: Optional[pulumi.Input[str]] = None, + live_port_moving_allowed: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + netflow_enabled: Optional[pulumi.Input[bool]] = None, + netflow_override_allowed: Optional[pulumi.Input[bool]] = None, + network_resource_pool_key: Optional[pulumi.Input[str]] = None, + network_resource_pool_override_allowed: Optional[pulumi.Input[bool]] = None, + notify_switches: Optional[pulumi.Input[bool]] = None, + number_of_ports: Optional[pulumi.Input[int]] = None, + port_config_reset_at_disconnect: Optional[pulumi.Input[bool]] = None, + port_name_format: Optional[pulumi.Input[str]] = None, + port_private_secondary_vlan_id: Optional[pulumi.Input[int]] = None, + security_policy_override_allowed: Optional[pulumi.Input[bool]] = None, + shaping_override_allowed: Optional[pulumi.Input[bool]] = None, + standby_uplinks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + teaming_policy: Optional[pulumi.Input[str]] = None, + traffic_filter_override_allowed: Optional[pulumi.Input[bool]] = None, + tx_uplink: Optional[pulumi.Input[bool]] = None, + type: Optional[pulumi.Input[str]] = None, + uplink_teaming_override_allowed: Optional[pulumi.Input[bool]] = None, + vlan_id: Optional[pulumi.Input[int]] = None, + vlan_override_allowed: Optional[pulumi.Input[bool]] = None, + vlan_ranges: Optional[pulumi.Input[Sequence[pulumi.Input['DistributedPortGroupVlanRangeArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_uplinks is None and 'activeUplinks' in kwargs: + active_uplinks = kwargs['activeUplinks'] + if allow_forged_transmits is None and 'allowForgedTransmits' in kwargs: + allow_forged_transmits = kwargs['allowForgedTransmits'] + if allow_mac_changes is None and 'allowMacChanges' in kwargs: + allow_mac_changes = kwargs['allowMacChanges'] + if allow_promiscuous is None and 'allowPromiscuous' in kwargs: + allow_promiscuous = kwargs['allowPromiscuous'] + if auto_expand is None and 'autoExpand' in kwargs: + auto_expand = kwargs['autoExpand'] + if block_all_ports is None and 'blockAllPorts' in kwargs: + block_all_ports = kwargs['blockAllPorts'] + if block_override_allowed is None and 'blockOverrideAllowed' in kwargs: + block_override_allowed = kwargs['blockOverrideAllowed'] + if check_beacon is None and 'checkBeacon' in kwargs: + check_beacon = kwargs['checkBeacon'] + if config_version is None and 'configVersion' in kwargs: + config_version = kwargs['configVersion'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if directpath_gen2_allowed is None and 'directpathGen2Allowed' in kwargs: + directpath_gen2_allowed = kwargs['directpathGen2Allowed'] + if distributed_virtual_switch_uuid is None and 'distributedVirtualSwitchUuid' in kwargs: + distributed_virtual_switch_uuid = kwargs['distributedVirtualSwitchUuid'] + if egress_shaping_average_bandwidth is None and 'egressShapingAverageBandwidth' in kwargs: + egress_shaping_average_bandwidth = kwargs['egressShapingAverageBandwidth'] + if egress_shaping_burst_size is None and 'egressShapingBurstSize' in kwargs: + egress_shaping_burst_size = kwargs['egressShapingBurstSize'] + if egress_shaping_enabled is None and 'egressShapingEnabled' in kwargs: + egress_shaping_enabled = kwargs['egressShapingEnabled'] + if egress_shaping_peak_bandwidth is None and 'egressShapingPeakBandwidth' in kwargs: + egress_shaping_peak_bandwidth = kwargs['egressShapingPeakBandwidth'] + if ingress_shaping_average_bandwidth is None and 'ingressShapingAverageBandwidth' in kwargs: + ingress_shaping_average_bandwidth = kwargs['ingressShapingAverageBandwidth'] + if ingress_shaping_burst_size is None and 'ingressShapingBurstSize' in kwargs: + ingress_shaping_burst_size = kwargs['ingressShapingBurstSize'] + if ingress_shaping_enabled is None and 'ingressShapingEnabled' in kwargs: + ingress_shaping_enabled = kwargs['ingressShapingEnabled'] + if ingress_shaping_peak_bandwidth is None and 'ingressShapingPeakBandwidth' in kwargs: + ingress_shaping_peak_bandwidth = kwargs['ingressShapingPeakBandwidth'] + if lacp_enabled is None and 'lacpEnabled' in kwargs: + lacp_enabled = kwargs['lacpEnabled'] + if lacp_mode is None and 'lacpMode' in kwargs: + lacp_mode = kwargs['lacpMode'] + if live_port_moving_allowed is None and 'livePortMovingAllowed' in kwargs: + live_port_moving_allowed = kwargs['livePortMovingAllowed'] + if netflow_enabled is None and 'netflowEnabled' in kwargs: + netflow_enabled = kwargs['netflowEnabled'] + if netflow_override_allowed is None and 'netflowOverrideAllowed' in kwargs: + netflow_override_allowed = kwargs['netflowOverrideAllowed'] + if network_resource_pool_key is None and 'networkResourcePoolKey' in kwargs: + network_resource_pool_key = kwargs['networkResourcePoolKey'] + if network_resource_pool_override_allowed is None and 'networkResourcePoolOverrideAllowed' in kwargs: + network_resource_pool_override_allowed = kwargs['networkResourcePoolOverrideAllowed'] + if notify_switches is None and 'notifySwitches' in kwargs: + notify_switches = kwargs['notifySwitches'] + if number_of_ports is None and 'numberOfPorts' in kwargs: + number_of_ports = kwargs['numberOfPorts'] + if port_config_reset_at_disconnect is None and 'portConfigResetAtDisconnect' in kwargs: + port_config_reset_at_disconnect = kwargs['portConfigResetAtDisconnect'] + if port_name_format is None and 'portNameFormat' in kwargs: + port_name_format = kwargs['portNameFormat'] + if port_private_secondary_vlan_id is None and 'portPrivateSecondaryVlanId' in kwargs: + port_private_secondary_vlan_id = kwargs['portPrivateSecondaryVlanId'] + if security_policy_override_allowed is None and 'securityPolicyOverrideAllowed' in kwargs: + security_policy_override_allowed = kwargs['securityPolicyOverrideAllowed'] + if shaping_override_allowed is None and 'shapingOverrideAllowed' in kwargs: + shaping_override_allowed = kwargs['shapingOverrideAllowed'] + if standby_uplinks is None and 'standbyUplinks' in kwargs: + standby_uplinks = kwargs['standbyUplinks'] + if teaming_policy is None and 'teamingPolicy' in kwargs: + teaming_policy = kwargs['teamingPolicy'] + if traffic_filter_override_allowed is None and 'trafficFilterOverrideAllowed' in kwargs: + traffic_filter_override_allowed = kwargs['trafficFilterOverrideAllowed'] + if tx_uplink is None and 'txUplink' in kwargs: + tx_uplink = kwargs['txUplink'] + if uplink_teaming_override_allowed is None and 'uplinkTeamingOverrideAllowed' in kwargs: + uplink_teaming_override_allowed = kwargs['uplinkTeamingOverrideAllowed'] + if vlan_id is None and 'vlanId' in kwargs: + vlan_id = kwargs['vlanId'] + if vlan_override_allowed is None and 'vlanOverrideAllowed' in kwargs: + vlan_override_allowed = kwargs['vlanOverrideAllowed'] + if vlan_ranges is None and 'vlanRanges' in kwargs: + vlan_ranges = kwargs['vlanRanges'] + if active_uplinks is not None: - pulumi.set(__self__, "active_uplinks", active_uplinks) + _setter("active_uplinks", active_uplinks) if allow_forged_transmits is not None: - pulumi.set(__self__, "allow_forged_transmits", allow_forged_transmits) + _setter("allow_forged_transmits", allow_forged_transmits) if allow_mac_changes is not None: - pulumi.set(__self__, "allow_mac_changes", allow_mac_changes) + _setter("allow_mac_changes", allow_mac_changes) if allow_promiscuous is not None: - pulumi.set(__self__, "allow_promiscuous", allow_promiscuous) + _setter("allow_promiscuous", allow_promiscuous) if auto_expand is not None: - pulumi.set(__self__, "auto_expand", auto_expand) + _setter("auto_expand", auto_expand) if block_all_ports is not None: - pulumi.set(__self__, "block_all_ports", block_all_ports) + _setter("block_all_ports", block_all_ports) if block_override_allowed is not None: - pulumi.set(__self__, "block_override_allowed", block_override_allowed) + _setter("block_override_allowed", block_override_allowed) if check_beacon is not None: - pulumi.set(__self__, "check_beacon", check_beacon) + _setter("check_beacon", check_beacon) if config_version is not None: - pulumi.set(__self__, "config_version", config_version) + _setter("config_version", config_version) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if directpath_gen2_allowed is not None: - pulumi.set(__self__, "directpath_gen2_allowed", directpath_gen2_allowed) + _setter("directpath_gen2_allowed", directpath_gen2_allowed) if distributed_virtual_switch_uuid is not None: - pulumi.set(__self__, "distributed_virtual_switch_uuid", distributed_virtual_switch_uuid) + _setter("distributed_virtual_switch_uuid", distributed_virtual_switch_uuid) if egress_shaping_average_bandwidth is not None: - pulumi.set(__self__, "egress_shaping_average_bandwidth", egress_shaping_average_bandwidth) + _setter("egress_shaping_average_bandwidth", egress_shaping_average_bandwidth) if egress_shaping_burst_size is not None: - pulumi.set(__self__, "egress_shaping_burst_size", egress_shaping_burst_size) + _setter("egress_shaping_burst_size", egress_shaping_burst_size) if egress_shaping_enabled is not None: - pulumi.set(__self__, "egress_shaping_enabled", egress_shaping_enabled) + _setter("egress_shaping_enabled", egress_shaping_enabled) if egress_shaping_peak_bandwidth is not None: - pulumi.set(__self__, "egress_shaping_peak_bandwidth", egress_shaping_peak_bandwidth) + _setter("egress_shaping_peak_bandwidth", egress_shaping_peak_bandwidth) if failback is not None: - pulumi.set(__self__, "failback", failback) + _setter("failback", failback) if ingress_shaping_average_bandwidth is not None: - pulumi.set(__self__, "ingress_shaping_average_bandwidth", ingress_shaping_average_bandwidth) + _setter("ingress_shaping_average_bandwidth", ingress_shaping_average_bandwidth) if ingress_shaping_burst_size is not None: - pulumi.set(__self__, "ingress_shaping_burst_size", ingress_shaping_burst_size) + _setter("ingress_shaping_burst_size", ingress_shaping_burst_size) if ingress_shaping_enabled is not None: - pulumi.set(__self__, "ingress_shaping_enabled", ingress_shaping_enabled) + _setter("ingress_shaping_enabled", ingress_shaping_enabled) if ingress_shaping_peak_bandwidth is not None: - pulumi.set(__self__, "ingress_shaping_peak_bandwidth", ingress_shaping_peak_bandwidth) + _setter("ingress_shaping_peak_bandwidth", ingress_shaping_peak_bandwidth) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if lacp_enabled is not None: - pulumi.set(__self__, "lacp_enabled", lacp_enabled) + _setter("lacp_enabled", lacp_enabled) if lacp_mode is not None: - pulumi.set(__self__, "lacp_mode", lacp_mode) + _setter("lacp_mode", lacp_mode) if live_port_moving_allowed is not None: - pulumi.set(__self__, "live_port_moving_allowed", live_port_moving_allowed) + _setter("live_port_moving_allowed", live_port_moving_allowed) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if netflow_enabled is not None: - pulumi.set(__self__, "netflow_enabled", netflow_enabled) + _setter("netflow_enabled", netflow_enabled) if netflow_override_allowed is not None: - pulumi.set(__self__, "netflow_override_allowed", netflow_override_allowed) + _setter("netflow_override_allowed", netflow_override_allowed) if network_resource_pool_key is not None: - pulumi.set(__self__, "network_resource_pool_key", network_resource_pool_key) + _setter("network_resource_pool_key", network_resource_pool_key) if network_resource_pool_override_allowed is not None: - pulumi.set(__self__, "network_resource_pool_override_allowed", network_resource_pool_override_allowed) + _setter("network_resource_pool_override_allowed", network_resource_pool_override_allowed) if notify_switches is not None: - pulumi.set(__self__, "notify_switches", notify_switches) + _setter("notify_switches", notify_switches) if number_of_ports is not None: - pulumi.set(__self__, "number_of_ports", number_of_ports) + _setter("number_of_ports", number_of_ports) if port_config_reset_at_disconnect is not None: - pulumi.set(__self__, "port_config_reset_at_disconnect", port_config_reset_at_disconnect) + _setter("port_config_reset_at_disconnect", port_config_reset_at_disconnect) if port_name_format is not None: - pulumi.set(__self__, "port_name_format", port_name_format) + _setter("port_name_format", port_name_format) if port_private_secondary_vlan_id is not None: - pulumi.set(__self__, "port_private_secondary_vlan_id", port_private_secondary_vlan_id) + _setter("port_private_secondary_vlan_id", port_private_secondary_vlan_id) if security_policy_override_allowed is not None: - pulumi.set(__self__, "security_policy_override_allowed", security_policy_override_allowed) + _setter("security_policy_override_allowed", security_policy_override_allowed) if shaping_override_allowed is not None: - pulumi.set(__self__, "shaping_override_allowed", shaping_override_allowed) + _setter("shaping_override_allowed", shaping_override_allowed) if standby_uplinks is not None: - pulumi.set(__self__, "standby_uplinks", standby_uplinks) + _setter("standby_uplinks", standby_uplinks) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if teaming_policy is not None: - pulumi.set(__self__, "teaming_policy", teaming_policy) + _setter("teaming_policy", teaming_policy) if traffic_filter_override_allowed is not None: - pulumi.set(__self__, "traffic_filter_override_allowed", traffic_filter_override_allowed) + _setter("traffic_filter_override_allowed", traffic_filter_override_allowed) if tx_uplink is not None: - pulumi.set(__self__, "tx_uplink", tx_uplink) + _setter("tx_uplink", tx_uplink) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if uplink_teaming_override_allowed is not None: - pulumi.set(__self__, "uplink_teaming_override_allowed", uplink_teaming_override_allowed) + _setter("uplink_teaming_override_allowed", uplink_teaming_override_allowed) if vlan_id is not None: - pulumi.set(__self__, "vlan_id", vlan_id) + _setter("vlan_id", vlan_id) if vlan_override_allowed is not None: - pulumi.set(__self__, "vlan_override_allowed", vlan_override_allowed) + _setter("vlan_override_allowed", vlan_override_allowed) if vlan_ranges is not None: - pulumi.set(__self__, "vlan_ranges", vlan_ranges) + _setter("vlan_ranges", vlan_ranges) @property @pulumi.getter(name="activeUplinks") @@ -1835,6 +2209,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DistributedPortGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/distributed_virtual_switch.py b/sdk/python/pulumi_vsphere/distributed_virtual_switch.py index 12b7d331..8e25b1aa 100644 --- a/sdk/python/pulumi_vsphere/distributed_virtual_switch.py +++ b/sdk/python/pulumi_vsphere/distributed_virtual_switch.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -299,193 +299,564 @@ def __init__(__self__, *, :param pulumi.Input[int] vsan_share_count: The amount of shares to allocate to the vsan traffic class for a custom share level. :param pulumi.Input[str] vsan_share_level: The allocation level for the vsan traffic class. Can be one of high, low, normal, or custom. """ - pulumi.set(__self__, "datacenter_id", datacenter_id) + DistributedVirtualSwitchArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + datacenter_id=datacenter_id, + active_uplinks=active_uplinks, + allow_forged_transmits=allow_forged_transmits, + allow_mac_changes=allow_mac_changes, + allow_promiscuous=allow_promiscuous, + backupnfc_maximum_mbit=backupnfc_maximum_mbit, + backupnfc_reservation_mbit=backupnfc_reservation_mbit, + backupnfc_share_count=backupnfc_share_count, + backupnfc_share_level=backupnfc_share_level, + block_all_ports=block_all_ports, + check_beacon=check_beacon, + contact_detail=contact_detail, + contact_name=contact_name, + custom_attributes=custom_attributes, + description=description, + directpath_gen2_allowed=directpath_gen2_allowed, + egress_shaping_average_bandwidth=egress_shaping_average_bandwidth, + egress_shaping_burst_size=egress_shaping_burst_size, + egress_shaping_enabled=egress_shaping_enabled, + egress_shaping_peak_bandwidth=egress_shaping_peak_bandwidth, + failback=failback, + faulttolerance_maximum_mbit=faulttolerance_maximum_mbit, + faulttolerance_reservation_mbit=faulttolerance_reservation_mbit, + faulttolerance_share_count=faulttolerance_share_count, + faulttolerance_share_level=faulttolerance_share_level, + folder=folder, + hbr_maximum_mbit=hbr_maximum_mbit, + hbr_reservation_mbit=hbr_reservation_mbit, + hbr_share_count=hbr_share_count, + hbr_share_level=hbr_share_level, + hosts=hosts, + ignore_other_pvlan_mappings=ignore_other_pvlan_mappings, + ingress_shaping_average_bandwidth=ingress_shaping_average_bandwidth, + ingress_shaping_burst_size=ingress_shaping_burst_size, + ingress_shaping_enabled=ingress_shaping_enabled, + ingress_shaping_peak_bandwidth=ingress_shaping_peak_bandwidth, + ipv4_address=ipv4_address, + iscsi_maximum_mbit=iscsi_maximum_mbit, + iscsi_reservation_mbit=iscsi_reservation_mbit, + iscsi_share_count=iscsi_share_count, + iscsi_share_level=iscsi_share_level, + lacp_api_version=lacp_api_version, + lacp_enabled=lacp_enabled, + lacp_mode=lacp_mode, + link_discovery_operation=link_discovery_operation, + link_discovery_protocol=link_discovery_protocol, + management_maximum_mbit=management_maximum_mbit, + management_reservation_mbit=management_reservation_mbit, + management_share_count=management_share_count, + management_share_level=management_share_level, + max_mtu=max_mtu, + multicast_filtering_mode=multicast_filtering_mode, + name=name, + netflow_active_flow_timeout=netflow_active_flow_timeout, + netflow_collector_ip_address=netflow_collector_ip_address, + netflow_collector_port=netflow_collector_port, + netflow_enabled=netflow_enabled, + netflow_idle_flow_timeout=netflow_idle_flow_timeout, + netflow_internal_flows_only=netflow_internal_flows_only, + netflow_observation_domain_id=netflow_observation_domain_id, + netflow_sampling_rate=netflow_sampling_rate, + network_resource_control_enabled=network_resource_control_enabled, + network_resource_control_version=network_resource_control_version, + nfs_maximum_mbit=nfs_maximum_mbit, + nfs_reservation_mbit=nfs_reservation_mbit, + nfs_share_count=nfs_share_count, + nfs_share_level=nfs_share_level, + notify_switches=notify_switches, + port_private_secondary_vlan_id=port_private_secondary_vlan_id, + pvlan_mappings=pvlan_mappings, + standby_uplinks=standby_uplinks, + tags=tags, + teaming_policy=teaming_policy, + tx_uplink=tx_uplink, + uplinks=uplinks, + vdp_maximum_mbit=vdp_maximum_mbit, + vdp_reservation_mbit=vdp_reservation_mbit, + vdp_share_count=vdp_share_count, + vdp_share_level=vdp_share_level, + version=version, + virtualmachine_maximum_mbit=virtualmachine_maximum_mbit, + virtualmachine_reservation_mbit=virtualmachine_reservation_mbit, + virtualmachine_share_count=virtualmachine_share_count, + virtualmachine_share_level=virtualmachine_share_level, + vlan_id=vlan_id, + vlan_ranges=vlan_ranges, + vmotion_maximum_mbit=vmotion_maximum_mbit, + vmotion_reservation_mbit=vmotion_reservation_mbit, + vmotion_share_count=vmotion_share_count, + vmotion_share_level=vmotion_share_level, + vsan_maximum_mbit=vsan_maximum_mbit, + vsan_reservation_mbit=vsan_reservation_mbit, + vsan_share_count=vsan_share_count, + vsan_share_level=vsan_share_level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datacenter_id: Optional[pulumi.Input[str]] = None, + active_uplinks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allow_forged_transmits: Optional[pulumi.Input[bool]] = None, + allow_mac_changes: Optional[pulumi.Input[bool]] = None, + allow_promiscuous: Optional[pulumi.Input[bool]] = None, + backupnfc_maximum_mbit: Optional[pulumi.Input[int]] = None, + backupnfc_reservation_mbit: Optional[pulumi.Input[int]] = None, + backupnfc_share_count: Optional[pulumi.Input[int]] = None, + backupnfc_share_level: Optional[pulumi.Input[str]] = None, + block_all_ports: Optional[pulumi.Input[bool]] = None, + check_beacon: Optional[pulumi.Input[bool]] = None, + contact_detail: Optional[pulumi.Input[str]] = None, + contact_name: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + description: Optional[pulumi.Input[str]] = None, + directpath_gen2_allowed: Optional[pulumi.Input[bool]] = None, + egress_shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + egress_shaping_burst_size: Optional[pulumi.Input[int]] = None, + egress_shaping_enabled: Optional[pulumi.Input[bool]] = None, + egress_shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + failback: Optional[pulumi.Input[bool]] = None, + faulttolerance_maximum_mbit: Optional[pulumi.Input[int]] = None, + faulttolerance_reservation_mbit: Optional[pulumi.Input[int]] = None, + faulttolerance_share_count: Optional[pulumi.Input[int]] = None, + faulttolerance_share_level: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + hbr_maximum_mbit: Optional[pulumi.Input[int]] = None, + hbr_reservation_mbit: Optional[pulumi.Input[int]] = None, + hbr_share_count: Optional[pulumi.Input[int]] = None, + hbr_share_level: Optional[pulumi.Input[str]] = None, + hosts: Optional[pulumi.Input[Sequence[pulumi.Input['DistributedVirtualSwitchHostArgs']]]] = None, + ignore_other_pvlan_mappings: Optional[pulumi.Input[bool]] = None, + ingress_shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + ingress_shaping_burst_size: Optional[pulumi.Input[int]] = None, + ingress_shaping_enabled: Optional[pulumi.Input[bool]] = None, + ingress_shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + ipv4_address: Optional[pulumi.Input[str]] = None, + iscsi_maximum_mbit: Optional[pulumi.Input[int]] = None, + iscsi_reservation_mbit: Optional[pulumi.Input[int]] = None, + iscsi_share_count: Optional[pulumi.Input[int]] = None, + iscsi_share_level: Optional[pulumi.Input[str]] = None, + lacp_api_version: Optional[pulumi.Input[str]] = None, + lacp_enabled: Optional[pulumi.Input[bool]] = None, + lacp_mode: Optional[pulumi.Input[str]] = None, + link_discovery_operation: Optional[pulumi.Input[str]] = None, + link_discovery_protocol: Optional[pulumi.Input[str]] = None, + management_maximum_mbit: Optional[pulumi.Input[int]] = None, + management_reservation_mbit: Optional[pulumi.Input[int]] = None, + management_share_count: Optional[pulumi.Input[int]] = None, + management_share_level: Optional[pulumi.Input[str]] = None, + max_mtu: Optional[pulumi.Input[int]] = None, + multicast_filtering_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + netflow_active_flow_timeout: Optional[pulumi.Input[int]] = None, + netflow_collector_ip_address: Optional[pulumi.Input[str]] = None, + netflow_collector_port: Optional[pulumi.Input[int]] = None, + netflow_enabled: Optional[pulumi.Input[bool]] = None, + netflow_idle_flow_timeout: Optional[pulumi.Input[int]] = None, + netflow_internal_flows_only: Optional[pulumi.Input[bool]] = None, + netflow_observation_domain_id: Optional[pulumi.Input[int]] = None, + netflow_sampling_rate: Optional[pulumi.Input[int]] = None, + network_resource_control_enabled: Optional[pulumi.Input[bool]] = None, + network_resource_control_version: Optional[pulumi.Input[str]] = None, + nfs_maximum_mbit: Optional[pulumi.Input[int]] = None, + nfs_reservation_mbit: Optional[pulumi.Input[int]] = None, + nfs_share_count: Optional[pulumi.Input[int]] = None, + nfs_share_level: Optional[pulumi.Input[str]] = None, + notify_switches: Optional[pulumi.Input[bool]] = None, + port_private_secondary_vlan_id: Optional[pulumi.Input[int]] = None, + pvlan_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['DistributedVirtualSwitchPvlanMappingArgs']]]] = None, + standby_uplinks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + teaming_policy: Optional[pulumi.Input[str]] = None, + tx_uplink: Optional[pulumi.Input[bool]] = None, + uplinks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + vdp_maximum_mbit: Optional[pulumi.Input[int]] = None, + vdp_reservation_mbit: Optional[pulumi.Input[int]] = None, + vdp_share_count: Optional[pulumi.Input[int]] = None, + vdp_share_level: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + virtualmachine_maximum_mbit: Optional[pulumi.Input[int]] = None, + virtualmachine_reservation_mbit: Optional[pulumi.Input[int]] = None, + virtualmachine_share_count: Optional[pulumi.Input[int]] = None, + virtualmachine_share_level: Optional[pulumi.Input[str]] = None, + vlan_id: Optional[pulumi.Input[int]] = None, + vlan_ranges: Optional[pulumi.Input[Sequence[pulumi.Input['DistributedVirtualSwitchVlanRangeArgs']]]] = None, + vmotion_maximum_mbit: Optional[pulumi.Input[int]] = None, + vmotion_reservation_mbit: Optional[pulumi.Input[int]] = None, + vmotion_share_count: Optional[pulumi.Input[int]] = None, + vmotion_share_level: Optional[pulumi.Input[str]] = None, + vsan_maximum_mbit: Optional[pulumi.Input[int]] = None, + vsan_reservation_mbit: Optional[pulumi.Input[int]] = None, + vsan_share_count: Optional[pulumi.Input[int]] = None, + vsan_share_level: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datacenter_id is None and 'datacenterId' in kwargs: + datacenter_id = kwargs['datacenterId'] + if datacenter_id is None: + raise TypeError("Missing 'datacenter_id' argument") + if active_uplinks is None and 'activeUplinks' in kwargs: + active_uplinks = kwargs['activeUplinks'] + if allow_forged_transmits is None and 'allowForgedTransmits' in kwargs: + allow_forged_transmits = kwargs['allowForgedTransmits'] + if allow_mac_changes is None and 'allowMacChanges' in kwargs: + allow_mac_changes = kwargs['allowMacChanges'] + if allow_promiscuous is None and 'allowPromiscuous' in kwargs: + allow_promiscuous = kwargs['allowPromiscuous'] + if backupnfc_maximum_mbit is None and 'backupnfcMaximumMbit' in kwargs: + backupnfc_maximum_mbit = kwargs['backupnfcMaximumMbit'] + if backupnfc_reservation_mbit is None and 'backupnfcReservationMbit' in kwargs: + backupnfc_reservation_mbit = kwargs['backupnfcReservationMbit'] + if backupnfc_share_count is None and 'backupnfcShareCount' in kwargs: + backupnfc_share_count = kwargs['backupnfcShareCount'] + if backupnfc_share_level is None and 'backupnfcShareLevel' in kwargs: + backupnfc_share_level = kwargs['backupnfcShareLevel'] + if block_all_ports is None and 'blockAllPorts' in kwargs: + block_all_ports = kwargs['blockAllPorts'] + if check_beacon is None and 'checkBeacon' in kwargs: + check_beacon = kwargs['checkBeacon'] + if contact_detail is None and 'contactDetail' in kwargs: + contact_detail = kwargs['contactDetail'] + if contact_name is None and 'contactName' in kwargs: + contact_name = kwargs['contactName'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if directpath_gen2_allowed is None and 'directpathGen2Allowed' in kwargs: + directpath_gen2_allowed = kwargs['directpathGen2Allowed'] + if egress_shaping_average_bandwidth is None and 'egressShapingAverageBandwidth' in kwargs: + egress_shaping_average_bandwidth = kwargs['egressShapingAverageBandwidth'] + if egress_shaping_burst_size is None and 'egressShapingBurstSize' in kwargs: + egress_shaping_burst_size = kwargs['egressShapingBurstSize'] + if egress_shaping_enabled is None and 'egressShapingEnabled' in kwargs: + egress_shaping_enabled = kwargs['egressShapingEnabled'] + if egress_shaping_peak_bandwidth is None and 'egressShapingPeakBandwidth' in kwargs: + egress_shaping_peak_bandwidth = kwargs['egressShapingPeakBandwidth'] + if faulttolerance_maximum_mbit is None and 'faulttoleranceMaximumMbit' in kwargs: + faulttolerance_maximum_mbit = kwargs['faulttoleranceMaximumMbit'] + if faulttolerance_reservation_mbit is None and 'faulttoleranceReservationMbit' in kwargs: + faulttolerance_reservation_mbit = kwargs['faulttoleranceReservationMbit'] + if faulttolerance_share_count is None and 'faulttoleranceShareCount' in kwargs: + faulttolerance_share_count = kwargs['faulttoleranceShareCount'] + if faulttolerance_share_level is None and 'faulttoleranceShareLevel' in kwargs: + faulttolerance_share_level = kwargs['faulttoleranceShareLevel'] + if hbr_maximum_mbit is None and 'hbrMaximumMbit' in kwargs: + hbr_maximum_mbit = kwargs['hbrMaximumMbit'] + if hbr_reservation_mbit is None and 'hbrReservationMbit' in kwargs: + hbr_reservation_mbit = kwargs['hbrReservationMbit'] + if hbr_share_count is None and 'hbrShareCount' in kwargs: + hbr_share_count = kwargs['hbrShareCount'] + if hbr_share_level is None and 'hbrShareLevel' in kwargs: + hbr_share_level = kwargs['hbrShareLevel'] + if ignore_other_pvlan_mappings is None and 'ignoreOtherPvlanMappings' in kwargs: + ignore_other_pvlan_mappings = kwargs['ignoreOtherPvlanMappings'] + if ingress_shaping_average_bandwidth is None and 'ingressShapingAverageBandwidth' in kwargs: + ingress_shaping_average_bandwidth = kwargs['ingressShapingAverageBandwidth'] + if ingress_shaping_burst_size is None and 'ingressShapingBurstSize' in kwargs: + ingress_shaping_burst_size = kwargs['ingressShapingBurstSize'] + if ingress_shaping_enabled is None and 'ingressShapingEnabled' in kwargs: + ingress_shaping_enabled = kwargs['ingressShapingEnabled'] + if ingress_shaping_peak_bandwidth is None and 'ingressShapingPeakBandwidth' in kwargs: + ingress_shaping_peak_bandwidth = kwargs['ingressShapingPeakBandwidth'] + if ipv4_address is None and 'ipv4Address' in kwargs: + ipv4_address = kwargs['ipv4Address'] + if iscsi_maximum_mbit is None and 'iscsiMaximumMbit' in kwargs: + iscsi_maximum_mbit = kwargs['iscsiMaximumMbit'] + if iscsi_reservation_mbit is None and 'iscsiReservationMbit' in kwargs: + iscsi_reservation_mbit = kwargs['iscsiReservationMbit'] + if iscsi_share_count is None and 'iscsiShareCount' in kwargs: + iscsi_share_count = kwargs['iscsiShareCount'] + if iscsi_share_level is None and 'iscsiShareLevel' in kwargs: + iscsi_share_level = kwargs['iscsiShareLevel'] + if lacp_api_version is None and 'lacpApiVersion' in kwargs: + lacp_api_version = kwargs['lacpApiVersion'] + if lacp_enabled is None and 'lacpEnabled' in kwargs: + lacp_enabled = kwargs['lacpEnabled'] + if lacp_mode is None and 'lacpMode' in kwargs: + lacp_mode = kwargs['lacpMode'] + if link_discovery_operation is None and 'linkDiscoveryOperation' in kwargs: + link_discovery_operation = kwargs['linkDiscoveryOperation'] + if link_discovery_protocol is None and 'linkDiscoveryProtocol' in kwargs: + link_discovery_protocol = kwargs['linkDiscoveryProtocol'] + if management_maximum_mbit is None and 'managementMaximumMbit' in kwargs: + management_maximum_mbit = kwargs['managementMaximumMbit'] + if management_reservation_mbit is None and 'managementReservationMbit' in kwargs: + management_reservation_mbit = kwargs['managementReservationMbit'] + if management_share_count is None and 'managementShareCount' in kwargs: + management_share_count = kwargs['managementShareCount'] + if management_share_level is None and 'managementShareLevel' in kwargs: + management_share_level = kwargs['managementShareLevel'] + if max_mtu is None and 'maxMtu' in kwargs: + max_mtu = kwargs['maxMtu'] + if multicast_filtering_mode is None and 'multicastFilteringMode' in kwargs: + multicast_filtering_mode = kwargs['multicastFilteringMode'] + if netflow_active_flow_timeout is None and 'netflowActiveFlowTimeout' in kwargs: + netflow_active_flow_timeout = kwargs['netflowActiveFlowTimeout'] + if netflow_collector_ip_address is None and 'netflowCollectorIpAddress' in kwargs: + netflow_collector_ip_address = kwargs['netflowCollectorIpAddress'] + if netflow_collector_port is None and 'netflowCollectorPort' in kwargs: + netflow_collector_port = kwargs['netflowCollectorPort'] + if netflow_enabled is None and 'netflowEnabled' in kwargs: + netflow_enabled = kwargs['netflowEnabled'] + if netflow_idle_flow_timeout is None and 'netflowIdleFlowTimeout' in kwargs: + netflow_idle_flow_timeout = kwargs['netflowIdleFlowTimeout'] + if netflow_internal_flows_only is None and 'netflowInternalFlowsOnly' in kwargs: + netflow_internal_flows_only = kwargs['netflowInternalFlowsOnly'] + if netflow_observation_domain_id is None and 'netflowObservationDomainId' in kwargs: + netflow_observation_domain_id = kwargs['netflowObservationDomainId'] + if netflow_sampling_rate is None and 'netflowSamplingRate' in kwargs: + netflow_sampling_rate = kwargs['netflowSamplingRate'] + if network_resource_control_enabled is None and 'networkResourceControlEnabled' in kwargs: + network_resource_control_enabled = kwargs['networkResourceControlEnabled'] + if network_resource_control_version is None and 'networkResourceControlVersion' in kwargs: + network_resource_control_version = kwargs['networkResourceControlVersion'] + if nfs_maximum_mbit is None and 'nfsMaximumMbit' in kwargs: + nfs_maximum_mbit = kwargs['nfsMaximumMbit'] + if nfs_reservation_mbit is None and 'nfsReservationMbit' in kwargs: + nfs_reservation_mbit = kwargs['nfsReservationMbit'] + if nfs_share_count is None and 'nfsShareCount' in kwargs: + nfs_share_count = kwargs['nfsShareCount'] + if nfs_share_level is None and 'nfsShareLevel' in kwargs: + nfs_share_level = kwargs['nfsShareLevel'] + if notify_switches is None and 'notifySwitches' in kwargs: + notify_switches = kwargs['notifySwitches'] + if port_private_secondary_vlan_id is None and 'portPrivateSecondaryVlanId' in kwargs: + port_private_secondary_vlan_id = kwargs['portPrivateSecondaryVlanId'] + if pvlan_mappings is None and 'pvlanMappings' in kwargs: + pvlan_mappings = kwargs['pvlanMappings'] + if standby_uplinks is None and 'standbyUplinks' in kwargs: + standby_uplinks = kwargs['standbyUplinks'] + if teaming_policy is None and 'teamingPolicy' in kwargs: + teaming_policy = kwargs['teamingPolicy'] + if tx_uplink is None and 'txUplink' in kwargs: + tx_uplink = kwargs['txUplink'] + if vdp_maximum_mbit is None and 'vdpMaximumMbit' in kwargs: + vdp_maximum_mbit = kwargs['vdpMaximumMbit'] + if vdp_reservation_mbit is None and 'vdpReservationMbit' in kwargs: + vdp_reservation_mbit = kwargs['vdpReservationMbit'] + if vdp_share_count is None and 'vdpShareCount' in kwargs: + vdp_share_count = kwargs['vdpShareCount'] + if vdp_share_level is None and 'vdpShareLevel' in kwargs: + vdp_share_level = kwargs['vdpShareLevel'] + if virtualmachine_maximum_mbit is None and 'virtualmachineMaximumMbit' in kwargs: + virtualmachine_maximum_mbit = kwargs['virtualmachineMaximumMbit'] + if virtualmachine_reservation_mbit is None and 'virtualmachineReservationMbit' in kwargs: + virtualmachine_reservation_mbit = kwargs['virtualmachineReservationMbit'] + if virtualmachine_share_count is None and 'virtualmachineShareCount' in kwargs: + virtualmachine_share_count = kwargs['virtualmachineShareCount'] + if virtualmachine_share_level is None and 'virtualmachineShareLevel' in kwargs: + virtualmachine_share_level = kwargs['virtualmachineShareLevel'] + if vlan_id is None and 'vlanId' in kwargs: + vlan_id = kwargs['vlanId'] + if vlan_ranges is None and 'vlanRanges' in kwargs: + vlan_ranges = kwargs['vlanRanges'] + if vmotion_maximum_mbit is None and 'vmotionMaximumMbit' in kwargs: + vmotion_maximum_mbit = kwargs['vmotionMaximumMbit'] + if vmotion_reservation_mbit is None and 'vmotionReservationMbit' in kwargs: + vmotion_reservation_mbit = kwargs['vmotionReservationMbit'] + if vmotion_share_count is None and 'vmotionShareCount' in kwargs: + vmotion_share_count = kwargs['vmotionShareCount'] + if vmotion_share_level is None and 'vmotionShareLevel' in kwargs: + vmotion_share_level = kwargs['vmotionShareLevel'] + if vsan_maximum_mbit is None and 'vsanMaximumMbit' in kwargs: + vsan_maximum_mbit = kwargs['vsanMaximumMbit'] + if vsan_reservation_mbit is None and 'vsanReservationMbit' in kwargs: + vsan_reservation_mbit = kwargs['vsanReservationMbit'] + if vsan_share_count is None and 'vsanShareCount' in kwargs: + vsan_share_count = kwargs['vsanShareCount'] + if vsan_share_level is None and 'vsanShareLevel' in kwargs: + vsan_share_level = kwargs['vsanShareLevel'] + + _setter("datacenter_id", datacenter_id) if active_uplinks is not None: - pulumi.set(__self__, "active_uplinks", active_uplinks) + _setter("active_uplinks", active_uplinks) if allow_forged_transmits is not None: - pulumi.set(__self__, "allow_forged_transmits", allow_forged_transmits) + _setter("allow_forged_transmits", allow_forged_transmits) if allow_mac_changes is not None: - pulumi.set(__self__, "allow_mac_changes", allow_mac_changes) + _setter("allow_mac_changes", allow_mac_changes) if allow_promiscuous is not None: - pulumi.set(__self__, "allow_promiscuous", allow_promiscuous) + _setter("allow_promiscuous", allow_promiscuous) if backupnfc_maximum_mbit is not None: - pulumi.set(__self__, "backupnfc_maximum_mbit", backupnfc_maximum_mbit) + _setter("backupnfc_maximum_mbit", backupnfc_maximum_mbit) if backupnfc_reservation_mbit is not None: - pulumi.set(__self__, "backupnfc_reservation_mbit", backupnfc_reservation_mbit) + _setter("backupnfc_reservation_mbit", backupnfc_reservation_mbit) if backupnfc_share_count is not None: - pulumi.set(__self__, "backupnfc_share_count", backupnfc_share_count) + _setter("backupnfc_share_count", backupnfc_share_count) if backupnfc_share_level is not None: - pulumi.set(__self__, "backupnfc_share_level", backupnfc_share_level) + _setter("backupnfc_share_level", backupnfc_share_level) if block_all_ports is not None: - pulumi.set(__self__, "block_all_ports", block_all_ports) + _setter("block_all_ports", block_all_ports) if check_beacon is not None: - pulumi.set(__self__, "check_beacon", check_beacon) + _setter("check_beacon", check_beacon) if contact_detail is not None: - pulumi.set(__self__, "contact_detail", contact_detail) + _setter("contact_detail", contact_detail) if contact_name is not None: - pulumi.set(__self__, "contact_name", contact_name) + _setter("contact_name", contact_name) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if directpath_gen2_allowed is not None: - pulumi.set(__self__, "directpath_gen2_allowed", directpath_gen2_allowed) + _setter("directpath_gen2_allowed", directpath_gen2_allowed) if egress_shaping_average_bandwidth is not None: - pulumi.set(__self__, "egress_shaping_average_bandwidth", egress_shaping_average_bandwidth) + _setter("egress_shaping_average_bandwidth", egress_shaping_average_bandwidth) if egress_shaping_burst_size is not None: - pulumi.set(__self__, "egress_shaping_burst_size", egress_shaping_burst_size) + _setter("egress_shaping_burst_size", egress_shaping_burst_size) if egress_shaping_enabled is not None: - pulumi.set(__self__, "egress_shaping_enabled", egress_shaping_enabled) + _setter("egress_shaping_enabled", egress_shaping_enabled) if egress_shaping_peak_bandwidth is not None: - pulumi.set(__self__, "egress_shaping_peak_bandwidth", egress_shaping_peak_bandwidth) + _setter("egress_shaping_peak_bandwidth", egress_shaping_peak_bandwidth) if failback is not None: - pulumi.set(__self__, "failback", failback) + _setter("failback", failback) if faulttolerance_maximum_mbit is not None: - pulumi.set(__self__, "faulttolerance_maximum_mbit", faulttolerance_maximum_mbit) + _setter("faulttolerance_maximum_mbit", faulttolerance_maximum_mbit) if faulttolerance_reservation_mbit is not None: - pulumi.set(__self__, "faulttolerance_reservation_mbit", faulttolerance_reservation_mbit) + _setter("faulttolerance_reservation_mbit", faulttolerance_reservation_mbit) if faulttolerance_share_count is not None: - pulumi.set(__self__, "faulttolerance_share_count", faulttolerance_share_count) + _setter("faulttolerance_share_count", faulttolerance_share_count) if faulttolerance_share_level is not None: - pulumi.set(__self__, "faulttolerance_share_level", faulttolerance_share_level) + _setter("faulttolerance_share_level", faulttolerance_share_level) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if hbr_maximum_mbit is not None: - pulumi.set(__self__, "hbr_maximum_mbit", hbr_maximum_mbit) + _setter("hbr_maximum_mbit", hbr_maximum_mbit) if hbr_reservation_mbit is not None: - pulumi.set(__self__, "hbr_reservation_mbit", hbr_reservation_mbit) + _setter("hbr_reservation_mbit", hbr_reservation_mbit) if hbr_share_count is not None: - pulumi.set(__self__, "hbr_share_count", hbr_share_count) + _setter("hbr_share_count", hbr_share_count) if hbr_share_level is not None: - pulumi.set(__self__, "hbr_share_level", hbr_share_level) + _setter("hbr_share_level", hbr_share_level) if hosts is not None: - pulumi.set(__self__, "hosts", hosts) + _setter("hosts", hosts) if ignore_other_pvlan_mappings is not None: - pulumi.set(__self__, "ignore_other_pvlan_mappings", ignore_other_pvlan_mappings) + _setter("ignore_other_pvlan_mappings", ignore_other_pvlan_mappings) if ingress_shaping_average_bandwidth is not None: - pulumi.set(__self__, "ingress_shaping_average_bandwidth", ingress_shaping_average_bandwidth) + _setter("ingress_shaping_average_bandwidth", ingress_shaping_average_bandwidth) if ingress_shaping_burst_size is not None: - pulumi.set(__self__, "ingress_shaping_burst_size", ingress_shaping_burst_size) + _setter("ingress_shaping_burst_size", ingress_shaping_burst_size) if ingress_shaping_enabled is not None: - pulumi.set(__self__, "ingress_shaping_enabled", ingress_shaping_enabled) + _setter("ingress_shaping_enabled", ingress_shaping_enabled) if ingress_shaping_peak_bandwidth is not None: - pulumi.set(__self__, "ingress_shaping_peak_bandwidth", ingress_shaping_peak_bandwidth) + _setter("ingress_shaping_peak_bandwidth", ingress_shaping_peak_bandwidth) if ipv4_address is not None: - pulumi.set(__self__, "ipv4_address", ipv4_address) + _setter("ipv4_address", ipv4_address) if iscsi_maximum_mbit is not None: - pulumi.set(__self__, "iscsi_maximum_mbit", iscsi_maximum_mbit) + _setter("iscsi_maximum_mbit", iscsi_maximum_mbit) if iscsi_reservation_mbit is not None: - pulumi.set(__self__, "iscsi_reservation_mbit", iscsi_reservation_mbit) + _setter("iscsi_reservation_mbit", iscsi_reservation_mbit) if iscsi_share_count is not None: - pulumi.set(__self__, "iscsi_share_count", iscsi_share_count) + _setter("iscsi_share_count", iscsi_share_count) if iscsi_share_level is not None: - pulumi.set(__self__, "iscsi_share_level", iscsi_share_level) + _setter("iscsi_share_level", iscsi_share_level) if lacp_api_version is not None: - pulumi.set(__self__, "lacp_api_version", lacp_api_version) + _setter("lacp_api_version", lacp_api_version) if lacp_enabled is not None: - pulumi.set(__self__, "lacp_enabled", lacp_enabled) + _setter("lacp_enabled", lacp_enabled) if lacp_mode is not None: - pulumi.set(__self__, "lacp_mode", lacp_mode) + _setter("lacp_mode", lacp_mode) if link_discovery_operation is not None: - pulumi.set(__self__, "link_discovery_operation", link_discovery_operation) + _setter("link_discovery_operation", link_discovery_operation) if link_discovery_protocol is not None: - pulumi.set(__self__, "link_discovery_protocol", link_discovery_protocol) + _setter("link_discovery_protocol", link_discovery_protocol) if management_maximum_mbit is not None: - pulumi.set(__self__, "management_maximum_mbit", management_maximum_mbit) + _setter("management_maximum_mbit", management_maximum_mbit) if management_reservation_mbit is not None: - pulumi.set(__self__, "management_reservation_mbit", management_reservation_mbit) + _setter("management_reservation_mbit", management_reservation_mbit) if management_share_count is not None: - pulumi.set(__self__, "management_share_count", management_share_count) + _setter("management_share_count", management_share_count) if management_share_level is not None: - pulumi.set(__self__, "management_share_level", management_share_level) + _setter("management_share_level", management_share_level) if max_mtu is not None: - pulumi.set(__self__, "max_mtu", max_mtu) + _setter("max_mtu", max_mtu) if multicast_filtering_mode is not None: - pulumi.set(__self__, "multicast_filtering_mode", multicast_filtering_mode) + _setter("multicast_filtering_mode", multicast_filtering_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if netflow_active_flow_timeout is not None: - pulumi.set(__self__, "netflow_active_flow_timeout", netflow_active_flow_timeout) + _setter("netflow_active_flow_timeout", netflow_active_flow_timeout) if netflow_collector_ip_address is not None: - pulumi.set(__self__, "netflow_collector_ip_address", netflow_collector_ip_address) + _setter("netflow_collector_ip_address", netflow_collector_ip_address) if netflow_collector_port is not None: - pulumi.set(__self__, "netflow_collector_port", netflow_collector_port) + _setter("netflow_collector_port", netflow_collector_port) if netflow_enabled is not None: - pulumi.set(__self__, "netflow_enabled", netflow_enabled) + _setter("netflow_enabled", netflow_enabled) if netflow_idle_flow_timeout is not None: - pulumi.set(__self__, "netflow_idle_flow_timeout", netflow_idle_flow_timeout) + _setter("netflow_idle_flow_timeout", netflow_idle_flow_timeout) if netflow_internal_flows_only is not None: - pulumi.set(__self__, "netflow_internal_flows_only", netflow_internal_flows_only) + _setter("netflow_internal_flows_only", netflow_internal_flows_only) if netflow_observation_domain_id is not None: - pulumi.set(__self__, "netflow_observation_domain_id", netflow_observation_domain_id) + _setter("netflow_observation_domain_id", netflow_observation_domain_id) if netflow_sampling_rate is not None: - pulumi.set(__self__, "netflow_sampling_rate", netflow_sampling_rate) + _setter("netflow_sampling_rate", netflow_sampling_rate) if network_resource_control_enabled is not None: - pulumi.set(__self__, "network_resource_control_enabled", network_resource_control_enabled) + _setter("network_resource_control_enabled", network_resource_control_enabled) if network_resource_control_version is not None: - pulumi.set(__self__, "network_resource_control_version", network_resource_control_version) + _setter("network_resource_control_version", network_resource_control_version) if nfs_maximum_mbit is not None: - pulumi.set(__self__, "nfs_maximum_mbit", nfs_maximum_mbit) + _setter("nfs_maximum_mbit", nfs_maximum_mbit) if nfs_reservation_mbit is not None: - pulumi.set(__self__, "nfs_reservation_mbit", nfs_reservation_mbit) + _setter("nfs_reservation_mbit", nfs_reservation_mbit) if nfs_share_count is not None: - pulumi.set(__self__, "nfs_share_count", nfs_share_count) + _setter("nfs_share_count", nfs_share_count) if nfs_share_level is not None: - pulumi.set(__self__, "nfs_share_level", nfs_share_level) + _setter("nfs_share_level", nfs_share_level) if notify_switches is not None: - pulumi.set(__self__, "notify_switches", notify_switches) + _setter("notify_switches", notify_switches) if port_private_secondary_vlan_id is not None: - pulumi.set(__self__, "port_private_secondary_vlan_id", port_private_secondary_vlan_id) + _setter("port_private_secondary_vlan_id", port_private_secondary_vlan_id) if pvlan_mappings is not None: - pulumi.set(__self__, "pvlan_mappings", pvlan_mappings) + _setter("pvlan_mappings", pvlan_mappings) if standby_uplinks is not None: - pulumi.set(__self__, "standby_uplinks", standby_uplinks) + _setter("standby_uplinks", standby_uplinks) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if teaming_policy is not None: - pulumi.set(__self__, "teaming_policy", teaming_policy) + _setter("teaming_policy", teaming_policy) if tx_uplink is not None: - pulumi.set(__self__, "tx_uplink", tx_uplink) + _setter("tx_uplink", tx_uplink) if uplinks is not None: - pulumi.set(__self__, "uplinks", uplinks) + _setter("uplinks", uplinks) if vdp_maximum_mbit is not None: - pulumi.set(__self__, "vdp_maximum_mbit", vdp_maximum_mbit) + _setter("vdp_maximum_mbit", vdp_maximum_mbit) if vdp_reservation_mbit is not None: - pulumi.set(__self__, "vdp_reservation_mbit", vdp_reservation_mbit) + _setter("vdp_reservation_mbit", vdp_reservation_mbit) if vdp_share_count is not None: - pulumi.set(__self__, "vdp_share_count", vdp_share_count) + _setter("vdp_share_count", vdp_share_count) if vdp_share_level is not None: - pulumi.set(__self__, "vdp_share_level", vdp_share_level) + _setter("vdp_share_level", vdp_share_level) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if virtualmachine_maximum_mbit is not None: - pulumi.set(__self__, "virtualmachine_maximum_mbit", virtualmachine_maximum_mbit) + _setter("virtualmachine_maximum_mbit", virtualmachine_maximum_mbit) if virtualmachine_reservation_mbit is not None: - pulumi.set(__self__, "virtualmachine_reservation_mbit", virtualmachine_reservation_mbit) + _setter("virtualmachine_reservation_mbit", virtualmachine_reservation_mbit) if virtualmachine_share_count is not None: - pulumi.set(__self__, "virtualmachine_share_count", virtualmachine_share_count) + _setter("virtualmachine_share_count", virtualmachine_share_count) if virtualmachine_share_level is not None: - pulumi.set(__self__, "virtualmachine_share_level", virtualmachine_share_level) + _setter("virtualmachine_share_level", virtualmachine_share_level) if vlan_id is not None: - pulumi.set(__self__, "vlan_id", vlan_id) + _setter("vlan_id", vlan_id) if vlan_ranges is not None: - pulumi.set(__self__, "vlan_ranges", vlan_ranges) + _setter("vlan_ranges", vlan_ranges) if vmotion_maximum_mbit is not None: - pulumi.set(__self__, "vmotion_maximum_mbit", vmotion_maximum_mbit) + _setter("vmotion_maximum_mbit", vmotion_maximum_mbit) if vmotion_reservation_mbit is not None: - pulumi.set(__self__, "vmotion_reservation_mbit", vmotion_reservation_mbit) + _setter("vmotion_reservation_mbit", vmotion_reservation_mbit) if vmotion_share_count is not None: - pulumi.set(__self__, "vmotion_share_count", vmotion_share_count) + _setter("vmotion_share_count", vmotion_share_count) if vmotion_share_level is not None: - pulumi.set(__self__, "vmotion_share_level", vmotion_share_level) + _setter("vmotion_share_level", vmotion_share_level) if vsan_maximum_mbit is not None: - pulumi.set(__self__, "vsan_maximum_mbit", vsan_maximum_mbit) + _setter("vsan_maximum_mbit", vsan_maximum_mbit) if vsan_reservation_mbit is not None: - pulumi.set(__self__, "vsan_reservation_mbit", vsan_reservation_mbit) + _setter("vsan_reservation_mbit", vsan_reservation_mbit) if vsan_share_count is not None: - pulumi.set(__self__, "vsan_share_count", vsan_share_count) + _setter("vsan_share_count", vsan_share_count) if vsan_share_level is not None: - pulumi.set(__self__, "vsan_share_level", vsan_share_level) + _setter("vsan_share_level", vsan_share_level) @property @pulumi.getter(name="datacenterId") @@ -1997,196 +2368,569 @@ def __init__(__self__, *, :param pulumi.Input[int] vsan_share_count: The amount of shares to allocate to the vsan traffic class for a custom share level. :param pulumi.Input[str] vsan_share_level: The allocation level for the vsan traffic class. Can be one of high, low, normal, or custom. """ + _DistributedVirtualSwitchState._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_uplinks=active_uplinks, + allow_forged_transmits=allow_forged_transmits, + allow_mac_changes=allow_mac_changes, + allow_promiscuous=allow_promiscuous, + backupnfc_maximum_mbit=backupnfc_maximum_mbit, + backupnfc_reservation_mbit=backupnfc_reservation_mbit, + backupnfc_share_count=backupnfc_share_count, + backupnfc_share_level=backupnfc_share_level, + block_all_ports=block_all_ports, + check_beacon=check_beacon, + config_version=config_version, + contact_detail=contact_detail, + contact_name=contact_name, + custom_attributes=custom_attributes, + datacenter_id=datacenter_id, + description=description, + directpath_gen2_allowed=directpath_gen2_allowed, + egress_shaping_average_bandwidth=egress_shaping_average_bandwidth, + egress_shaping_burst_size=egress_shaping_burst_size, + egress_shaping_enabled=egress_shaping_enabled, + egress_shaping_peak_bandwidth=egress_shaping_peak_bandwidth, + failback=failback, + faulttolerance_maximum_mbit=faulttolerance_maximum_mbit, + faulttolerance_reservation_mbit=faulttolerance_reservation_mbit, + faulttolerance_share_count=faulttolerance_share_count, + faulttolerance_share_level=faulttolerance_share_level, + folder=folder, + hbr_maximum_mbit=hbr_maximum_mbit, + hbr_reservation_mbit=hbr_reservation_mbit, + hbr_share_count=hbr_share_count, + hbr_share_level=hbr_share_level, + hosts=hosts, + ignore_other_pvlan_mappings=ignore_other_pvlan_mappings, + ingress_shaping_average_bandwidth=ingress_shaping_average_bandwidth, + ingress_shaping_burst_size=ingress_shaping_burst_size, + ingress_shaping_enabled=ingress_shaping_enabled, + ingress_shaping_peak_bandwidth=ingress_shaping_peak_bandwidth, + ipv4_address=ipv4_address, + iscsi_maximum_mbit=iscsi_maximum_mbit, + iscsi_reservation_mbit=iscsi_reservation_mbit, + iscsi_share_count=iscsi_share_count, + iscsi_share_level=iscsi_share_level, + lacp_api_version=lacp_api_version, + lacp_enabled=lacp_enabled, + lacp_mode=lacp_mode, + link_discovery_operation=link_discovery_operation, + link_discovery_protocol=link_discovery_protocol, + management_maximum_mbit=management_maximum_mbit, + management_reservation_mbit=management_reservation_mbit, + management_share_count=management_share_count, + management_share_level=management_share_level, + max_mtu=max_mtu, + multicast_filtering_mode=multicast_filtering_mode, + name=name, + netflow_active_flow_timeout=netflow_active_flow_timeout, + netflow_collector_ip_address=netflow_collector_ip_address, + netflow_collector_port=netflow_collector_port, + netflow_enabled=netflow_enabled, + netflow_idle_flow_timeout=netflow_idle_flow_timeout, + netflow_internal_flows_only=netflow_internal_flows_only, + netflow_observation_domain_id=netflow_observation_domain_id, + netflow_sampling_rate=netflow_sampling_rate, + network_resource_control_enabled=network_resource_control_enabled, + network_resource_control_version=network_resource_control_version, + nfs_maximum_mbit=nfs_maximum_mbit, + nfs_reservation_mbit=nfs_reservation_mbit, + nfs_share_count=nfs_share_count, + nfs_share_level=nfs_share_level, + notify_switches=notify_switches, + port_private_secondary_vlan_id=port_private_secondary_vlan_id, + pvlan_mappings=pvlan_mappings, + standby_uplinks=standby_uplinks, + tags=tags, + teaming_policy=teaming_policy, + tx_uplink=tx_uplink, + uplinks=uplinks, + vdp_maximum_mbit=vdp_maximum_mbit, + vdp_reservation_mbit=vdp_reservation_mbit, + vdp_share_count=vdp_share_count, + vdp_share_level=vdp_share_level, + version=version, + virtualmachine_maximum_mbit=virtualmachine_maximum_mbit, + virtualmachine_reservation_mbit=virtualmachine_reservation_mbit, + virtualmachine_share_count=virtualmachine_share_count, + virtualmachine_share_level=virtualmachine_share_level, + vlan_id=vlan_id, + vlan_ranges=vlan_ranges, + vmotion_maximum_mbit=vmotion_maximum_mbit, + vmotion_reservation_mbit=vmotion_reservation_mbit, + vmotion_share_count=vmotion_share_count, + vmotion_share_level=vmotion_share_level, + vsan_maximum_mbit=vsan_maximum_mbit, + vsan_reservation_mbit=vsan_reservation_mbit, + vsan_share_count=vsan_share_count, + vsan_share_level=vsan_share_level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_uplinks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allow_forged_transmits: Optional[pulumi.Input[bool]] = None, + allow_mac_changes: Optional[pulumi.Input[bool]] = None, + allow_promiscuous: Optional[pulumi.Input[bool]] = None, + backupnfc_maximum_mbit: Optional[pulumi.Input[int]] = None, + backupnfc_reservation_mbit: Optional[pulumi.Input[int]] = None, + backupnfc_share_count: Optional[pulumi.Input[int]] = None, + backupnfc_share_level: Optional[pulumi.Input[str]] = None, + block_all_ports: Optional[pulumi.Input[bool]] = None, + check_beacon: Optional[pulumi.Input[bool]] = None, + config_version: Optional[pulumi.Input[str]] = None, + contact_detail: Optional[pulumi.Input[str]] = None, + contact_name: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datacenter_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + directpath_gen2_allowed: Optional[pulumi.Input[bool]] = None, + egress_shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + egress_shaping_burst_size: Optional[pulumi.Input[int]] = None, + egress_shaping_enabled: Optional[pulumi.Input[bool]] = None, + egress_shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + failback: Optional[pulumi.Input[bool]] = None, + faulttolerance_maximum_mbit: Optional[pulumi.Input[int]] = None, + faulttolerance_reservation_mbit: Optional[pulumi.Input[int]] = None, + faulttolerance_share_count: Optional[pulumi.Input[int]] = None, + faulttolerance_share_level: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + hbr_maximum_mbit: Optional[pulumi.Input[int]] = None, + hbr_reservation_mbit: Optional[pulumi.Input[int]] = None, + hbr_share_count: Optional[pulumi.Input[int]] = None, + hbr_share_level: Optional[pulumi.Input[str]] = None, + hosts: Optional[pulumi.Input[Sequence[pulumi.Input['DistributedVirtualSwitchHostArgs']]]] = None, + ignore_other_pvlan_mappings: Optional[pulumi.Input[bool]] = None, + ingress_shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + ingress_shaping_burst_size: Optional[pulumi.Input[int]] = None, + ingress_shaping_enabled: Optional[pulumi.Input[bool]] = None, + ingress_shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + ipv4_address: Optional[pulumi.Input[str]] = None, + iscsi_maximum_mbit: Optional[pulumi.Input[int]] = None, + iscsi_reservation_mbit: Optional[pulumi.Input[int]] = None, + iscsi_share_count: Optional[pulumi.Input[int]] = None, + iscsi_share_level: Optional[pulumi.Input[str]] = None, + lacp_api_version: Optional[pulumi.Input[str]] = None, + lacp_enabled: Optional[pulumi.Input[bool]] = None, + lacp_mode: Optional[pulumi.Input[str]] = None, + link_discovery_operation: Optional[pulumi.Input[str]] = None, + link_discovery_protocol: Optional[pulumi.Input[str]] = None, + management_maximum_mbit: Optional[pulumi.Input[int]] = None, + management_reservation_mbit: Optional[pulumi.Input[int]] = None, + management_share_count: Optional[pulumi.Input[int]] = None, + management_share_level: Optional[pulumi.Input[str]] = None, + max_mtu: Optional[pulumi.Input[int]] = None, + multicast_filtering_mode: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + netflow_active_flow_timeout: Optional[pulumi.Input[int]] = None, + netflow_collector_ip_address: Optional[pulumi.Input[str]] = None, + netflow_collector_port: Optional[pulumi.Input[int]] = None, + netflow_enabled: Optional[pulumi.Input[bool]] = None, + netflow_idle_flow_timeout: Optional[pulumi.Input[int]] = None, + netflow_internal_flows_only: Optional[pulumi.Input[bool]] = None, + netflow_observation_domain_id: Optional[pulumi.Input[int]] = None, + netflow_sampling_rate: Optional[pulumi.Input[int]] = None, + network_resource_control_enabled: Optional[pulumi.Input[bool]] = None, + network_resource_control_version: Optional[pulumi.Input[str]] = None, + nfs_maximum_mbit: Optional[pulumi.Input[int]] = None, + nfs_reservation_mbit: Optional[pulumi.Input[int]] = None, + nfs_share_count: Optional[pulumi.Input[int]] = None, + nfs_share_level: Optional[pulumi.Input[str]] = None, + notify_switches: Optional[pulumi.Input[bool]] = None, + port_private_secondary_vlan_id: Optional[pulumi.Input[int]] = None, + pvlan_mappings: Optional[pulumi.Input[Sequence[pulumi.Input['DistributedVirtualSwitchPvlanMappingArgs']]]] = None, + standby_uplinks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + teaming_policy: Optional[pulumi.Input[str]] = None, + tx_uplink: Optional[pulumi.Input[bool]] = None, + uplinks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + vdp_maximum_mbit: Optional[pulumi.Input[int]] = None, + vdp_reservation_mbit: Optional[pulumi.Input[int]] = None, + vdp_share_count: Optional[pulumi.Input[int]] = None, + vdp_share_level: Optional[pulumi.Input[str]] = None, + version: Optional[pulumi.Input[str]] = None, + virtualmachine_maximum_mbit: Optional[pulumi.Input[int]] = None, + virtualmachine_reservation_mbit: Optional[pulumi.Input[int]] = None, + virtualmachine_share_count: Optional[pulumi.Input[int]] = None, + virtualmachine_share_level: Optional[pulumi.Input[str]] = None, + vlan_id: Optional[pulumi.Input[int]] = None, + vlan_ranges: Optional[pulumi.Input[Sequence[pulumi.Input['DistributedVirtualSwitchVlanRangeArgs']]]] = None, + vmotion_maximum_mbit: Optional[pulumi.Input[int]] = None, + vmotion_reservation_mbit: Optional[pulumi.Input[int]] = None, + vmotion_share_count: Optional[pulumi.Input[int]] = None, + vmotion_share_level: Optional[pulumi.Input[str]] = None, + vsan_maximum_mbit: Optional[pulumi.Input[int]] = None, + vsan_reservation_mbit: Optional[pulumi.Input[int]] = None, + vsan_share_count: Optional[pulumi.Input[int]] = None, + vsan_share_level: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_uplinks is None and 'activeUplinks' in kwargs: + active_uplinks = kwargs['activeUplinks'] + if allow_forged_transmits is None and 'allowForgedTransmits' in kwargs: + allow_forged_transmits = kwargs['allowForgedTransmits'] + if allow_mac_changes is None and 'allowMacChanges' in kwargs: + allow_mac_changes = kwargs['allowMacChanges'] + if allow_promiscuous is None and 'allowPromiscuous' in kwargs: + allow_promiscuous = kwargs['allowPromiscuous'] + if backupnfc_maximum_mbit is None and 'backupnfcMaximumMbit' in kwargs: + backupnfc_maximum_mbit = kwargs['backupnfcMaximumMbit'] + if backupnfc_reservation_mbit is None and 'backupnfcReservationMbit' in kwargs: + backupnfc_reservation_mbit = kwargs['backupnfcReservationMbit'] + if backupnfc_share_count is None and 'backupnfcShareCount' in kwargs: + backupnfc_share_count = kwargs['backupnfcShareCount'] + if backupnfc_share_level is None and 'backupnfcShareLevel' in kwargs: + backupnfc_share_level = kwargs['backupnfcShareLevel'] + if block_all_ports is None and 'blockAllPorts' in kwargs: + block_all_ports = kwargs['blockAllPorts'] + if check_beacon is None and 'checkBeacon' in kwargs: + check_beacon = kwargs['checkBeacon'] + if config_version is None and 'configVersion' in kwargs: + config_version = kwargs['configVersion'] + if contact_detail is None and 'contactDetail' in kwargs: + contact_detail = kwargs['contactDetail'] + if contact_name is None and 'contactName' in kwargs: + contact_name = kwargs['contactName'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if datacenter_id is None and 'datacenterId' in kwargs: + datacenter_id = kwargs['datacenterId'] + if directpath_gen2_allowed is None and 'directpathGen2Allowed' in kwargs: + directpath_gen2_allowed = kwargs['directpathGen2Allowed'] + if egress_shaping_average_bandwidth is None and 'egressShapingAverageBandwidth' in kwargs: + egress_shaping_average_bandwidth = kwargs['egressShapingAverageBandwidth'] + if egress_shaping_burst_size is None and 'egressShapingBurstSize' in kwargs: + egress_shaping_burst_size = kwargs['egressShapingBurstSize'] + if egress_shaping_enabled is None and 'egressShapingEnabled' in kwargs: + egress_shaping_enabled = kwargs['egressShapingEnabled'] + if egress_shaping_peak_bandwidth is None and 'egressShapingPeakBandwidth' in kwargs: + egress_shaping_peak_bandwidth = kwargs['egressShapingPeakBandwidth'] + if faulttolerance_maximum_mbit is None and 'faulttoleranceMaximumMbit' in kwargs: + faulttolerance_maximum_mbit = kwargs['faulttoleranceMaximumMbit'] + if faulttolerance_reservation_mbit is None and 'faulttoleranceReservationMbit' in kwargs: + faulttolerance_reservation_mbit = kwargs['faulttoleranceReservationMbit'] + if faulttolerance_share_count is None and 'faulttoleranceShareCount' in kwargs: + faulttolerance_share_count = kwargs['faulttoleranceShareCount'] + if faulttolerance_share_level is None and 'faulttoleranceShareLevel' in kwargs: + faulttolerance_share_level = kwargs['faulttoleranceShareLevel'] + if hbr_maximum_mbit is None and 'hbrMaximumMbit' in kwargs: + hbr_maximum_mbit = kwargs['hbrMaximumMbit'] + if hbr_reservation_mbit is None and 'hbrReservationMbit' in kwargs: + hbr_reservation_mbit = kwargs['hbrReservationMbit'] + if hbr_share_count is None and 'hbrShareCount' in kwargs: + hbr_share_count = kwargs['hbrShareCount'] + if hbr_share_level is None and 'hbrShareLevel' in kwargs: + hbr_share_level = kwargs['hbrShareLevel'] + if ignore_other_pvlan_mappings is None and 'ignoreOtherPvlanMappings' in kwargs: + ignore_other_pvlan_mappings = kwargs['ignoreOtherPvlanMappings'] + if ingress_shaping_average_bandwidth is None and 'ingressShapingAverageBandwidth' in kwargs: + ingress_shaping_average_bandwidth = kwargs['ingressShapingAverageBandwidth'] + if ingress_shaping_burst_size is None and 'ingressShapingBurstSize' in kwargs: + ingress_shaping_burst_size = kwargs['ingressShapingBurstSize'] + if ingress_shaping_enabled is None and 'ingressShapingEnabled' in kwargs: + ingress_shaping_enabled = kwargs['ingressShapingEnabled'] + if ingress_shaping_peak_bandwidth is None and 'ingressShapingPeakBandwidth' in kwargs: + ingress_shaping_peak_bandwidth = kwargs['ingressShapingPeakBandwidth'] + if ipv4_address is None and 'ipv4Address' in kwargs: + ipv4_address = kwargs['ipv4Address'] + if iscsi_maximum_mbit is None and 'iscsiMaximumMbit' in kwargs: + iscsi_maximum_mbit = kwargs['iscsiMaximumMbit'] + if iscsi_reservation_mbit is None and 'iscsiReservationMbit' in kwargs: + iscsi_reservation_mbit = kwargs['iscsiReservationMbit'] + if iscsi_share_count is None and 'iscsiShareCount' in kwargs: + iscsi_share_count = kwargs['iscsiShareCount'] + if iscsi_share_level is None and 'iscsiShareLevel' in kwargs: + iscsi_share_level = kwargs['iscsiShareLevel'] + if lacp_api_version is None and 'lacpApiVersion' in kwargs: + lacp_api_version = kwargs['lacpApiVersion'] + if lacp_enabled is None and 'lacpEnabled' in kwargs: + lacp_enabled = kwargs['lacpEnabled'] + if lacp_mode is None and 'lacpMode' in kwargs: + lacp_mode = kwargs['lacpMode'] + if link_discovery_operation is None and 'linkDiscoveryOperation' in kwargs: + link_discovery_operation = kwargs['linkDiscoveryOperation'] + if link_discovery_protocol is None and 'linkDiscoveryProtocol' in kwargs: + link_discovery_protocol = kwargs['linkDiscoveryProtocol'] + if management_maximum_mbit is None and 'managementMaximumMbit' in kwargs: + management_maximum_mbit = kwargs['managementMaximumMbit'] + if management_reservation_mbit is None and 'managementReservationMbit' in kwargs: + management_reservation_mbit = kwargs['managementReservationMbit'] + if management_share_count is None and 'managementShareCount' in kwargs: + management_share_count = kwargs['managementShareCount'] + if management_share_level is None and 'managementShareLevel' in kwargs: + management_share_level = kwargs['managementShareLevel'] + if max_mtu is None and 'maxMtu' in kwargs: + max_mtu = kwargs['maxMtu'] + if multicast_filtering_mode is None and 'multicastFilteringMode' in kwargs: + multicast_filtering_mode = kwargs['multicastFilteringMode'] + if netflow_active_flow_timeout is None and 'netflowActiveFlowTimeout' in kwargs: + netflow_active_flow_timeout = kwargs['netflowActiveFlowTimeout'] + if netflow_collector_ip_address is None and 'netflowCollectorIpAddress' in kwargs: + netflow_collector_ip_address = kwargs['netflowCollectorIpAddress'] + if netflow_collector_port is None and 'netflowCollectorPort' in kwargs: + netflow_collector_port = kwargs['netflowCollectorPort'] + if netflow_enabled is None and 'netflowEnabled' in kwargs: + netflow_enabled = kwargs['netflowEnabled'] + if netflow_idle_flow_timeout is None and 'netflowIdleFlowTimeout' in kwargs: + netflow_idle_flow_timeout = kwargs['netflowIdleFlowTimeout'] + if netflow_internal_flows_only is None and 'netflowInternalFlowsOnly' in kwargs: + netflow_internal_flows_only = kwargs['netflowInternalFlowsOnly'] + if netflow_observation_domain_id is None and 'netflowObservationDomainId' in kwargs: + netflow_observation_domain_id = kwargs['netflowObservationDomainId'] + if netflow_sampling_rate is None and 'netflowSamplingRate' in kwargs: + netflow_sampling_rate = kwargs['netflowSamplingRate'] + if network_resource_control_enabled is None and 'networkResourceControlEnabled' in kwargs: + network_resource_control_enabled = kwargs['networkResourceControlEnabled'] + if network_resource_control_version is None and 'networkResourceControlVersion' in kwargs: + network_resource_control_version = kwargs['networkResourceControlVersion'] + if nfs_maximum_mbit is None and 'nfsMaximumMbit' in kwargs: + nfs_maximum_mbit = kwargs['nfsMaximumMbit'] + if nfs_reservation_mbit is None and 'nfsReservationMbit' in kwargs: + nfs_reservation_mbit = kwargs['nfsReservationMbit'] + if nfs_share_count is None and 'nfsShareCount' in kwargs: + nfs_share_count = kwargs['nfsShareCount'] + if nfs_share_level is None and 'nfsShareLevel' in kwargs: + nfs_share_level = kwargs['nfsShareLevel'] + if notify_switches is None and 'notifySwitches' in kwargs: + notify_switches = kwargs['notifySwitches'] + if port_private_secondary_vlan_id is None and 'portPrivateSecondaryVlanId' in kwargs: + port_private_secondary_vlan_id = kwargs['portPrivateSecondaryVlanId'] + if pvlan_mappings is None and 'pvlanMappings' in kwargs: + pvlan_mappings = kwargs['pvlanMappings'] + if standby_uplinks is None and 'standbyUplinks' in kwargs: + standby_uplinks = kwargs['standbyUplinks'] + if teaming_policy is None and 'teamingPolicy' in kwargs: + teaming_policy = kwargs['teamingPolicy'] + if tx_uplink is None and 'txUplink' in kwargs: + tx_uplink = kwargs['txUplink'] + if vdp_maximum_mbit is None and 'vdpMaximumMbit' in kwargs: + vdp_maximum_mbit = kwargs['vdpMaximumMbit'] + if vdp_reservation_mbit is None and 'vdpReservationMbit' in kwargs: + vdp_reservation_mbit = kwargs['vdpReservationMbit'] + if vdp_share_count is None and 'vdpShareCount' in kwargs: + vdp_share_count = kwargs['vdpShareCount'] + if vdp_share_level is None and 'vdpShareLevel' in kwargs: + vdp_share_level = kwargs['vdpShareLevel'] + if virtualmachine_maximum_mbit is None and 'virtualmachineMaximumMbit' in kwargs: + virtualmachine_maximum_mbit = kwargs['virtualmachineMaximumMbit'] + if virtualmachine_reservation_mbit is None and 'virtualmachineReservationMbit' in kwargs: + virtualmachine_reservation_mbit = kwargs['virtualmachineReservationMbit'] + if virtualmachine_share_count is None and 'virtualmachineShareCount' in kwargs: + virtualmachine_share_count = kwargs['virtualmachineShareCount'] + if virtualmachine_share_level is None and 'virtualmachineShareLevel' in kwargs: + virtualmachine_share_level = kwargs['virtualmachineShareLevel'] + if vlan_id is None and 'vlanId' in kwargs: + vlan_id = kwargs['vlanId'] + if vlan_ranges is None and 'vlanRanges' in kwargs: + vlan_ranges = kwargs['vlanRanges'] + if vmotion_maximum_mbit is None and 'vmotionMaximumMbit' in kwargs: + vmotion_maximum_mbit = kwargs['vmotionMaximumMbit'] + if vmotion_reservation_mbit is None and 'vmotionReservationMbit' in kwargs: + vmotion_reservation_mbit = kwargs['vmotionReservationMbit'] + if vmotion_share_count is None and 'vmotionShareCount' in kwargs: + vmotion_share_count = kwargs['vmotionShareCount'] + if vmotion_share_level is None and 'vmotionShareLevel' in kwargs: + vmotion_share_level = kwargs['vmotionShareLevel'] + if vsan_maximum_mbit is None and 'vsanMaximumMbit' in kwargs: + vsan_maximum_mbit = kwargs['vsanMaximumMbit'] + if vsan_reservation_mbit is None and 'vsanReservationMbit' in kwargs: + vsan_reservation_mbit = kwargs['vsanReservationMbit'] + if vsan_share_count is None and 'vsanShareCount' in kwargs: + vsan_share_count = kwargs['vsanShareCount'] + if vsan_share_level is None and 'vsanShareLevel' in kwargs: + vsan_share_level = kwargs['vsanShareLevel'] + if active_uplinks is not None: - pulumi.set(__self__, "active_uplinks", active_uplinks) + _setter("active_uplinks", active_uplinks) if allow_forged_transmits is not None: - pulumi.set(__self__, "allow_forged_transmits", allow_forged_transmits) + _setter("allow_forged_transmits", allow_forged_transmits) if allow_mac_changes is not None: - pulumi.set(__self__, "allow_mac_changes", allow_mac_changes) + _setter("allow_mac_changes", allow_mac_changes) if allow_promiscuous is not None: - pulumi.set(__self__, "allow_promiscuous", allow_promiscuous) + _setter("allow_promiscuous", allow_promiscuous) if backupnfc_maximum_mbit is not None: - pulumi.set(__self__, "backupnfc_maximum_mbit", backupnfc_maximum_mbit) + _setter("backupnfc_maximum_mbit", backupnfc_maximum_mbit) if backupnfc_reservation_mbit is not None: - pulumi.set(__self__, "backupnfc_reservation_mbit", backupnfc_reservation_mbit) + _setter("backupnfc_reservation_mbit", backupnfc_reservation_mbit) if backupnfc_share_count is not None: - pulumi.set(__self__, "backupnfc_share_count", backupnfc_share_count) + _setter("backupnfc_share_count", backupnfc_share_count) if backupnfc_share_level is not None: - pulumi.set(__self__, "backupnfc_share_level", backupnfc_share_level) + _setter("backupnfc_share_level", backupnfc_share_level) if block_all_ports is not None: - pulumi.set(__self__, "block_all_ports", block_all_ports) + _setter("block_all_ports", block_all_ports) if check_beacon is not None: - pulumi.set(__self__, "check_beacon", check_beacon) + _setter("check_beacon", check_beacon) if config_version is not None: - pulumi.set(__self__, "config_version", config_version) + _setter("config_version", config_version) if contact_detail is not None: - pulumi.set(__self__, "contact_detail", contact_detail) + _setter("contact_detail", contact_detail) if contact_name is not None: - pulumi.set(__self__, "contact_name", contact_name) + _setter("contact_name", contact_name) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datacenter_id is not None: - pulumi.set(__self__, "datacenter_id", datacenter_id) + _setter("datacenter_id", datacenter_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if directpath_gen2_allowed is not None: - pulumi.set(__self__, "directpath_gen2_allowed", directpath_gen2_allowed) + _setter("directpath_gen2_allowed", directpath_gen2_allowed) if egress_shaping_average_bandwidth is not None: - pulumi.set(__self__, "egress_shaping_average_bandwidth", egress_shaping_average_bandwidth) + _setter("egress_shaping_average_bandwidth", egress_shaping_average_bandwidth) if egress_shaping_burst_size is not None: - pulumi.set(__self__, "egress_shaping_burst_size", egress_shaping_burst_size) + _setter("egress_shaping_burst_size", egress_shaping_burst_size) if egress_shaping_enabled is not None: - pulumi.set(__self__, "egress_shaping_enabled", egress_shaping_enabled) + _setter("egress_shaping_enabled", egress_shaping_enabled) if egress_shaping_peak_bandwidth is not None: - pulumi.set(__self__, "egress_shaping_peak_bandwidth", egress_shaping_peak_bandwidth) + _setter("egress_shaping_peak_bandwidth", egress_shaping_peak_bandwidth) if failback is not None: - pulumi.set(__self__, "failback", failback) + _setter("failback", failback) if faulttolerance_maximum_mbit is not None: - pulumi.set(__self__, "faulttolerance_maximum_mbit", faulttolerance_maximum_mbit) + _setter("faulttolerance_maximum_mbit", faulttolerance_maximum_mbit) if faulttolerance_reservation_mbit is not None: - pulumi.set(__self__, "faulttolerance_reservation_mbit", faulttolerance_reservation_mbit) + _setter("faulttolerance_reservation_mbit", faulttolerance_reservation_mbit) if faulttolerance_share_count is not None: - pulumi.set(__self__, "faulttolerance_share_count", faulttolerance_share_count) + _setter("faulttolerance_share_count", faulttolerance_share_count) if faulttolerance_share_level is not None: - pulumi.set(__self__, "faulttolerance_share_level", faulttolerance_share_level) + _setter("faulttolerance_share_level", faulttolerance_share_level) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if hbr_maximum_mbit is not None: - pulumi.set(__self__, "hbr_maximum_mbit", hbr_maximum_mbit) + _setter("hbr_maximum_mbit", hbr_maximum_mbit) if hbr_reservation_mbit is not None: - pulumi.set(__self__, "hbr_reservation_mbit", hbr_reservation_mbit) + _setter("hbr_reservation_mbit", hbr_reservation_mbit) if hbr_share_count is not None: - pulumi.set(__self__, "hbr_share_count", hbr_share_count) + _setter("hbr_share_count", hbr_share_count) if hbr_share_level is not None: - pulumi.set(__self__, "hbr_share_level", hbr_share_level) + _setter("hbr_share_level", hbr_share_level) if hosts is not None: - pulumi.set(__self__, "hosts", hosts) + _setter("hosts", hosts) if ignore_other_pvlan_mappings is not None: - pulumi.set(__self__, "ignore_other_pvlan_mappings", ignore_other_pvlan_mappings) + _setter("ignore_other_pvlan_mappings", ignore_other_pvlan_mappings) if ingress_shaping_average_bandwidth is not None: - pulumi.set(__self__, "ingress_shaping_average_bandwidth", ingress_shaping_average_bandwidth) + _setter("ingress_shaping_average_bandwidth", ingress_shaping_average_bandwidth) if ingress_shaping_burst_size is not None: - pulumi.set(__self__, "ingress_shaping_burst_size", ingress_shaping_burst_size) + _setter("ingress_shaping_burst_size", ingress_shaping_burst_size) if ingress_shaping_enabled is not None: - pulumi.set(__self__, "ingress_shaping_enabled", ingress_shaping_enabled) + _setter("ingress_shaping_enabled", ingress_shaping_enabled) if ingress_shaping_peak_bandwidth is not None: - pulumi.set(__self__, "ingress_shaping_peak_bandwidth", ingress_shaping_peak_bandwidth) + _setter("ingress_shaping_peak_bandwidth", ingress_shaping_peak_bandwidth) if ipv4_address is not None: - pulumi.set(__self__, "ipv4_address", ipv4_address) + _setter("ipv4_address", ipv4_address) if iscsi_maximum_mbit is not None: - pulumi.set(__self__, "iscsi_maximum_mbit", iscsi_maximum_mbit) + _setter("iscsi_maximum_mbit", iscsi_maximum_mbit) if iscsi_reservation_mbit is not None: - pulumi.set(__self__, "iscsi_reservation_mbit", iscsi_reservation_mbit) + _setter("iscsi_reservation_mbit", iscsi_reservation_mbit) if iscsi_share_count is not None: - pulumi.set(__self__, "iscsi_share_count", iscsi_share_count) + _setter("iscsi_share_count", iscsi_share_count) if iscsi_share_level is not None: - pulumi.set(__self__, "iscsi_share_level", iscsi_share_level) + _setter("iscsi_share_level", iscsi_share_level) if lacp_api_version is not None: - pulumi.set(__self__, "lacp_api_version", lacp_api_version) + _setter("lacp_api_version", lacp_api_version) if lacp_enabled is not None: - pulumi.set(__self__, "lacp_enabled", lacp_enabled) + _setter("lacp_enabled", lacp_enabled) if lacp_mode is not None: - pulumi.set(__self__, "lacp_mode", lacp_mode) + _setter("lacp_mode", lacp_mode) if link_discovery_operation is not None: - pulumi.set(__self__, "link_discovery_operation", link_discovery_operation) + _setter("link_discovery_operation", link_discovery_operation) if link_discovery_protocol is not None: - pulumi.set(__self__, "link_discovery_protocol", link_discovery_protocol) + _setter("link_discovery_protocol", link_discovery_protocol) if management_maximum_mbit is not None: - pulumi.set(__self__, "management_maximum_mbit", management_maximum_mbit) + _setter("management_maximum_mbit", management_maximum_mbit) if management_reservation_mbit is not None: - pulumi.set(__self__, "management_reservation_mbit", management_reservation_mbit) + _setter("management_reservation_mbit", management_reservation_mbit) if management_share_count is not None: - pulumi.set(__self__, "management_share_count", management_share_count) + _setter("management_share_count", management_share_count) if management_share_level is not None: - pulumi.set(__self__, "management_share_level", management_share_level) + _setter("management_share_level", management_share_level) if max_mtu is not None: - pulumi.set(__self__, "max_mtu", max_mtu) + _setter("max_mtu", max_mtu) if multicast_filtering_mode is not None: - pulumi.set(__self__, "multicast_filtering_mode", multicast_filtering_mode) + _setter("multicast_filtering_mode", multicast_filtering_mode) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if netflow_active_flow_timeout is not None: - pulumi.set(__self__, "netflow_active_flow_timeout", netflow_active_flow_timeout) + _setter("netflow_active_flow_timeout", netflow_active_flow_timeout) if netflow_collector_ip_address is not None: - pulumi.set(__self__, "netflow_collector_ip_address", netflow_collector_ip_address) + _setter("netflow_collector_ip_address", netflow_collector_ip_address) if netflow_collector_port is not None: - pulumi.set(__self__, "netflow_collector_port", netflow_collector_port) + _setter("netflow_collector_port", netflow_collector_port) if netflow_enabled is not None: - pulumi.set(__self__, "netflow_enabled", netflow_enabled) + _setter("netflow_enabled", netflow_enabled) if netflow_idle_flow_timeout is not None: - pulumi.set(__self__, "netflow_idle_flow_timeout", netflow_idle_flow_timeout) + _setter("netflow_idle_flow_timeout", netflow_idle_flow_timeout) if netflow_internal_flows_only is not None: - pulumi.set(__self__, "netflow_internal_flows_only", netflow_internal_flows_only) + _setter("netflow_internal_flows_only", netflow_internal_flows_only) if netflow_observation_domain_id is not None: - pulumi.set(__self__, "netflow_observation_domain_id", netflow_observation_domain_id) + _setter("netflow_observation_domain_id", netflow_observation_domain_id) if netflow_sampling_rate is not None: - pulumi.set(__self__, "netflow_sampling_rate", netflow_sampling_rate) + _setter("netflow_sampling_rate", netflow_sampling_rate) if network_resource_control_enabled is not None: - pulumi.set(__self__, "network_resource_control_enabled", network_resource_control_enabled) + _setter("network_resource_control_enabled", network_resource_control_enabled) if network_resource_control_version is not None: - pulumi.set(__self__, "network_resource_control_version", network_resource_control_version) + _setter("network_resource_control_version", network_resource_control_version) if nfs_maximum_mbit is not None: - pulumi.set(__self__, "nfs_maximum_mbit", nfs_maximum_mbit) + _setter("nfs_maximum_mbit", nfs_maximum_mbit) if nfs_reservation_mbit is not None: - pulumi.set(__self__, "nfs_reservation_mbit", nfs_reservation_mbit) + _setter("nfs_reservation_mbit", nfs_reservation_mbit) if nfs_share_count is not None: - pulumi.set(__self__, "nfs_share_count", nfs_share_count) + _setter("nfs_share_count", nfs_share_count) if nfs_share_level is not None: - pulumi.set(__self__, "nfs_share_level", nfs_share_level) + _setter("nfs_share_level", nfs_share_level) if notify_switches is not None: - pulumi.set(__self__, "notify_switches", notify_switches) + _setter("notify_switches", notify_switches) if port_private_secondary_vlan_id is not None: - pulumi.set(__self__, "port_private_secondary_vlan_id", port_private_secondary_vlan_id) + _setter("port_private_secondary_vlan_id", port_private_secondary_vlan_id) if pvlan_mappings is not None: - pulumi.set(__self__, "pvlan_mappings", pvlan_mappings) + _setter("pvlan_mappings", pvlan_mappings) if standby_uplinks is not None: - pulumi.set(__self__, "standby_uplinks", standby_uplinks) + _setter("standby_uplinks", standby_uplinks) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if teaming_policy is not None: - pulumi.set(__self__, "teaming_policy", teaming_policy) + _setter("teaming_policy", teaming_policy) if tx_uplink is not None: - pulumi.set(__self__, "tx_uplink", tx_uplink) + _setter("tx_uplink", tx_uplink) if uplinks is not None: - pulumi.set(__self__, "uplinks", uplinks) + _setter("uplinks", uplinks) if vdp_maximum_mbit is not None: - pulumi.set(__self__, "vdp_maximum_mbit", vdp_maximum_mbit) + _setter("vdp_maximum_mbit", vdp_maximum_mbit) if vdp_reservation_mbit is not None: - pulumi.set(__self__, "vdp_reservation_mbit", vdp_reservation_mbit) + _setter("vdp_reservation_mbit", vdp_reservation_mbit) if vdp_share_count is not None: - pulumi.set(__self__, "vdp_share_count", vdp_share_count) + _setter("vdp_share_count", vdp_share_count) if vdp_share_level is not None: - pulumi.set(__self__, "vdp_share_level", vdp_share_level) + _setter("vdp_share_level", vdp_share_level) if version is not None: - pulumi.set(__self__, "version", version) + _setter("version", version) if virtualmachine_maximum_mbit is not None: - pulumi.set(__self__, "virtualmachine_maximum_mbit", virtualmachine_maximum_mbit) + _setter("virtualmachine_maximum_mbit", virtualmachine_maximum_mbit) if virtualmachine_reservation_mbit is not None: - pulumi.set(__self__, "virtualmachine_reservation_mbit", virtualmachine_reservation_mbit) + _setter("virtualmachine_reservation_mbit", virtualmachine_reservation_mbit) if virtualmachine_share_count is not None: - pulumi.set(__self__, "virtualmachine_share_count", virtualmachine_share_count) + _setter("virtualmachine_share_count", virtualmachine_share_count) if virtualmachine_share_level is not None: - pulumi.set(__self__, "virtualmachine_share_level", virtualmachine_share_level) + _setter("virtualmachine_share_level", virtualmachine_share_level) if vlan_id is not None: - pulumi.set(__self__, "vlan_id", vlan_id) + _setter("vlan_id", vlan_id) if vlan_ranges is not None: - pulumi.set(__self__, "vlan_ranges", vlan_ranges) + _setter("vlan_ranges", vlan_ranges) if vmotion_maximum_mbit is not None: - pulumi.set(__self__, "vmotion_maximum_mbit", vmotion_maximum_mbit) + _setter("vmotion_maximum_mbit", vmotion_maximum_mbit) if vmotion_reservation_mbit is not None: - pulumi.set(__self__, "vmotion_reservation_mbit", vmotion_reservation_mbit) + _setter("vmotion_reservation_mbit", vmotion_reservation_mbit) if vmotion_share_count is not None: - pulumi.set(__self__, "vmotion_share_count", vmotion_share_count) + _setter("vmotion_share_count", vmotion_share_count) if vmotion_share_level is not None: - pulumi.set(__self__, "vmotion_share_level", vmotion_share_level) + _setter("vmotion_share_level", vmotion_share_level) if vsan_maximum_mbit is not None: - pulumi.set(__self__, "vsan_maximum_mbit", vsan_maximum_mbit) + _setter("vsan_maximum_mbit", vsan_maximum_mbit) if vsan_reservation_mbit is not None: - pulumi.set(__self__, "vsan_reservation_mbit", vsan_reservation_mbit) + _setter("vsan_reservation_mbit", vsan_reservation_mbit) if vsan_share_count is not None: - pulumi.set(__self__, "vsan_share_count", vsan_share_count) + _setter("vsan_share_count", vsan_share_count) if vsan_share_level is not None: - pulumi.set(__self__, "vsan_share_level", vsan_share_level) + _setter("vsan_share_level", vsan_share_level) @property @pulumi.getter(name="activeUplinks") @@ -3731,6 +4475,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DistributedVirtualSwitchArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/dpm_host_override.py b/sdk/python/pulumi_vsphere/dpm_host_override.py index 1e894678..814637a5 100644 --- a/sdk/python/pulumi_vsphere/dpm_host_override.py +++ b/sdk/python/pulumi_vsphere/dpm_host_override.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['DpmHostOverrideArgs', 'DpmHostOverride'] @@ -34,12 +34,41 @@ def __init__(__self__, *, :param pulumi.Input[bool] dpm_enabled: Enable DPM support for this host. Default: `false`. """ - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) - pulumi.set(__self__, "host_system_id", host_system_id) + DpmHostOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + host_system_id=host_system_id, + dpm_automation_level=dpm_automation_level, + dpm_enabled=dpm_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + host_system_id: Optional[pulumi.Input[str]] = None, + dpm_automation_level: Optional[pulumi.Input[str]] = None, + dpm_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if compute_cluster_id is None: + raise TypeError("Missing 'compute_cluster_id' argument") + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if host_system_id is None: + raise TypeError("Missing 'host_system_id' argument") + if dpm_automation_level is None and 'dpmAutomationLevel' in kwargs: + dpm_automation_level = kwargs['dpmAutomationLevel'] + if dpm_enabled is None and 'dpmEnabled' in kwargs: + dpm_enabled = kwargs['dpmEnabled'] + + _setter("compute_cluster_id", compute_cluster_id) + _setter("host_system_id", host_system_id) if dpm_automation_level is not None: - pulumi.set(__self__, "dpm_automation_level", dpm_automation_level) + _setter("dpm_automation_level", dpm_automation_level) if dpm_enabled is not None: - pulumi.set(__self__, "dpm_enabled", dpm_enabled) + _setter("dpm_enabled", dpm_enabled) @property @pulumi.getter(name="computeClusterId") @@ -122,14 +151,39 @@ def __init__(__self__, *, `false`. :param pulumi.Input[str] host_system_id: The managed object ID of the host. """ + _DpmHostOverrideState._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + dpm_automation_level=dpm_automation_level, + dpm_enabled=dpm_enabled, + host_system_id=host_system_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + dpm_automation_level: Optional[pulumi.Input[str]] = None, + dpm_enabled: Optional[pulumi.Input[bool]] = None, + host_system_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if dpm_automation_level is None and 'dpmAutomationLevel' in kwargs: + dpm_automation_level = kwargs['dpmAutomationLevel'] + if dpm_enabled is None and 'dpmEnabled' in kwargs: + dpm_enabled = kwargs['dpmEnabled'] + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if compute_cluster_id is not None: - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) + _setter("compute_cluster_id", compute_cluster_id) if dpm_automation_level is not None: - pulumi.set(__self__, "dpm_automation_level", dpm_automation_level) + _setter("dpm_automation_level", dpm_automation_level) if dpm_enabled is not None: - pulumi.set(__self__, "dpm_enabled", dpm_enabled) + _setter("dpm_enabled", dpm_enabled) if host_system_id is not None: - pulumi.set(__self__, "host_system_id", host_system_id) + _setter("host_system_id", host_system_id) @property @pulumi.getter(name="computeClusterId") @@ -235,6 +289,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DpmHostOverrideArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/drs_vm_override.py b/sdk/python/pulumi_vsphere/drs_vm_override.py index b4ea785b..71273f3c 100644 --- a/sdk/python/pulumi_vsphere/drs_vm_override.py +++ b/sdk/python/pulumi_vsphere/drs_vm_override.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['DrsVmOverrideArgs', 'DrsVmOverride'] @@ -35,12 +35,41 @@ def __init__(__self__, *, :param pulumi.Input[bool] drs_enabled: Overrides the default DRS setting for this virtual machine. Can be either `true` or `false`. Default: `false`. """ - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + DrsVmOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + virtual_machine_id=virtual_machine_id, + drs_automation_level=drs_automation_level, + drs_enabled=drs_enabled, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + drs_automation_level: Optional[pulumi.Input[str]] = None, + drs_enabled: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if compute_cluster_id is None: + raise TypeError("Missing 'compute_cluster_id' argument") + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + if drs_automation_level is None and 'drsAutomationLevel' in kwargs: + drs_automation_level = kwargs['drsAutomationLevel'] + if drs_enabled is None and 'drsEnabled' in kwargs: + drs_enabled = kwargs['drsEnabled'] + + _setter("compute_cluster_id", compute_cluster_id) + _setter("virtual_machine_id", virtual_machine_id) if drs_automation_level is not None: - pulumi.set(__self__, "drs_automation_level", drs_automation_level) + _setter("drs_automation_level", drs_automation_level) if drs_enabled is not None: - pulumi.set(__self__, "drs_enabled", drs_enabled) + _setter("drs_enabled", drs_enabled) @property @pulumi.getter(name="computeClusterId") @@ -125,14 +154,39 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_machine_id: The UUID of the virtual machine to create the override for. Forces a new resource if changed. """ + _DrsVmOverrideState._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + drs_automation_level=drs_automation_level, + drs_enabled=drs_enabled, + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + drs_automation_level: Optional[pulumi.Input[str]] = None, + drs_enabled: Optional[pulumi.Input[bool]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if drs_automation_level is None and 'drsAutomationLevel' in kwargs: + drs_automation_level = kwargs['drsAutomationLevel'] + if drs_enabled is None and 'drsEnabled' in kwargs: + drs_enabled = kwargs['drsEnabled'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if compute_cluster_id is not None: - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) + _setter("compute_cluster_id", compute_cluster_id) if drs_automation_level is not None: - pulumi.set(__self__, "drs_automation_level", drs_automation_level) + _setter("drs_automation_level", drs_automation_level) if drs_enabled is not None: - pulumi.set(__self__, "drs_enabled", drs_enabled) + _setter("drs_enabled", drs_enabled) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter(name="computeClusterId") @@ -240,6 +294,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + DrsVmOverrideArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/entity_permissions.py b/sdk/python/pulumi_vsphere/entity_permissions.py index 11b6732c..be657b90 100644 --- a/sdk/python/pulumi_vsphere/entity_permissions.py +++ b/sdk/python/pulumi_vsphere/entity_permissions.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -27,9 +27,34 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['EntityPermissionsPermissionArgs']]] permissions: The permissions to be given on this entity. Keep the permissions sorted alphabetically on `user_or_group` for a better user experience. """ - pulumi.set(__self__, "entity_id", entity_id) - pulumi.set(__self__, "entity_type", entity_type) - pulumi.set(__self__, "permissions", permissions) + EntityPermissionsArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + entity_id=entity_id, + entity_type=entity_type, + permissions=permissions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + entity_id: Optional[pulumi.Input[str]] = None, + entity_type: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input['EntityPermissionsPermissionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if entity_id is None and 'entityId' in kwargs: + entity_id = kwargs['entityId'] + if entity_id is None: + raise TypeError("Missing 'entity_id' argument") + if entity_type is None and 'entityType' in kwargs: + entity_type = kwargs['entityType'] + if entity_type is None: + raise TypeError("Missing 'entity_type' argument") + if permissions is None: + raise TypeError("Missing 'permissions' argument") + + _setter("entity_id", entity_id) + _setter("entity_type", entity_type) + _setter("permissions", permissions) @property @pulumi.getter(name="entityId") @@ -84,12 +109,31 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['EntityPermissionsPermissionArgs']]] permissions: The permissions to be given on this entity. Keep the permissions sorted alphabetically on `user_or_group` for a better user experience. """ + _EntityPermissionsState._configure( + lambda key, value: pulumi.set(__self__, key, value), + entity_id=entity_id, + entity_type=entity_type, + permissions=permissions, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + entity_id: Optional[pulumi.Input[str]] = None, + entity_type: Optional[pulumi.Input[str]] = None, + permissions: Optional[pulumi.Input[Sequence[pulumi.Input['EntityPermissionsPermissionArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if entity_id is None and 'entityId' in kwargs: + entity_id = kwargs['entityId'] + if entity_type is None and 'entityType' in kwargs: + entity_type = kwargs['entityType'] + if entity_id is not None: - pulumi.set(__self__, "entity_id", entity_id) + _setter("entity_id", entity_id) if entity_type is not None: - pulumi.set(__self__, "entity_type", entity_type) + _setter("entity_type", entity_type) if permissions is not None: - pulumi.set(__self__, "permissions", permissions) + _setter("permissions", permissions) @property @pulumi.getter(name="entityId") @@ -167,6 +211,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + EntityPermissionsArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/file.py b/sdk/python/pulumi_vsphere/file.py index 1339ac7f..d562074f 100644 --- a/sdk/python/pulumi_vsphere/file.py +++ b/sdk/python/pulumi_vsphere/file.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['FileArgs', 'File'] @@ -40,17 +40,56 @@ def __init__(__self__, *, :param pulumi.Input[str] source_datastore: The name of the datastore from which file will be copied. Forces a new resource if changed. """ - pulumi.set(__self__, "datastore", datastore) - pulumi.set(__self__, "destination_file", destination_file) - pulumi.set(__self__, "source_file", source_file) + FileArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + datastore=datastore, + destination_file=destination_file, + source_file=source_file, + create_directories=create_directories, + datacenter=datacenter, + source_datacenter=source_datacenter, + source_datastore=source_datastore, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datastore: Optional[pulumi.Input[str]] = None, + destination_file: Optional[pulumi.Input[str]] = None, + source_file: Optional[pulumi.Input[str]] = None, + create_directories: Optional[pulumi.Input[bool]] = None, + datacenter: Optional[pulumi.Input[str]] = None, + source_datacenter: Optional[pulumi.Input[str]] = None, + source_datastore: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datastore is None: + raise TypeError("Missing 'datastore' argument") + if destination_file is None and 'destinationFile' in kwargs: + destination_file = kwargs['destinationFile'] + if destination_file is None: + raise TypeError("Missing 'destination_file' argument") + if source_file is None and 'sourceFile' in kwargs: + source_file = kwargs['sourceFile'] + if source_file is None: + raise TypeError("Missing 'source_file' argument") + if create_directories is None and 'createDirectories' in kwargs: + create_directories = kwargs['createDirectories'] + if source_datacenter is None and 'sourceDatacenter' in kwargs: + source_datacenter = kwargs['sourceDatacenter'] + if source_datastore is None and 'sourceDatastore' in kwargs: + source_datastore = kwargs['sourceDatastore'] + + _setter("datastore", datastore) + _setter("destination_file", destination_file) + _setter("source_file", source_file) if create_directories is not None: - pulumi.set(__self__, "create_directories", create_directories) + _setter("create_directories", create_directories) if datacenter is not None: - pulumi.set(__self__, "datacenter", datacenter) + _setter("datacenter", datacenter) if source_datacenter is not None: - pulumi.set(__self__, "source_datacenter", source_datacenter) + _setter("source_datacenter", source_datacenter) if source_datastore is not None: - pulumi.set(__self__, "source_datastore", source_datastore) + _setter("source_datastore", source_datastore) @property @pulumi.getter @@ -173,20 +212,53 @@ def __init__(__self__, *, :param pulumi.Input[str] source_datastore: The name of the datastore from which file will be copied. Forces a new resource if changed. """ + _FileState._configure( + lambda key, value: pulumi.set(__self__, key, value), + create_directories=create_directories, + datacenter=datacenter, + datastore=datastore, + destination_file=destination_file, + source_datacenter=source_datacenter, + source_datastore=source_datastore, + source_file=source_file, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + create_directories: Optional[pulumi.Input[bool]] = None, + datacenter: Optional[pulumi.Input[str]] = None, + datastore: Optional[pulumi.Input[str]] = None, + destination_file: Optional[pulumi.Input[str]] = None, + source_datacenter: Optional[pulumi.Input[str]] = None, + source_datastore: Optional[pulumi.Input[str]] = None, + source_file: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if create_directories is None and 'createDirectories' in kwargs: + create_directories = kwargs['createDirectories'] + if destination_file is None and 'destinationFile' in kwargs: + destination_file = kwargs['destinationFile'] + if source_datacenter is None and 'sourceDatacenter' in kwargs: + source_datacenter = kwargs['sourceDatacenter'] + if source_datastore is None and 'sourceDatastore' in kwargs: + source_datastore = kwargs['sourceDatastore'] + if source_file is None and 'sourceFile' in kwargs: + source_file = kwargs['sourceFile'] + if create_directories is not None: - pulumi.set(__self__, "create_directories", create_directories) + _setter("create_directories", create_directories) if datacenter is not None: - pulumi.set(__self__, "datacenter", datacenter) + _setter("datacenter", datacenter) if datastore is not None: - pulumi.set(__self__, "datastore", datastore) + _setter("datastore", datastore) if destination_file is not None: - pulumi.set(__self__, "destination_file", destination_file) + _setter("destination_file", destination_file) if source_datacenter is not None: - pulumi.set(__self__, "source_datacenter", source_datacenter) + _setter("source_datacenter", source_datacenter) if source_datastore is not None: - pulumi.set(__self__, "source_datastore", source_datastore) + _setter("source_datastore", source_datastore) if source_file is not None: - pulumi.set(__self__, "source_file", source_file) + _setter("source_file", source_file) @property @pulumi.getter(name="createDirectories") @@ -390,6 +462,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FileArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/folder.py b/sdk/python/pulumi_vsphere/folder.py index 749a22a3..a6d614fa 100644 --- a/sdk/python/pulumi_vsphere/folder.py +++ b/sdk/python/pulumi_vsphere/folder.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['FolderArgs', 'Folder'] @@ -52,14 +52,41 @@ def __init__(__self__, *, > **NOTE:** Tagging support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher. """ - pulumi.set(__self__, "path", path) - pulumi.set(__self__, "type", type) + FolderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + path=path, + type=type, + custom_attributes=custom_attributes, + datacenter_id=datacenter_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + path: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datacenter_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if path is None: + raise TypeError("Missing 'path' argument") + if type is None: + raise TypeError("Missing 'type' argument") + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if datacenter_id is None and 'datacenterId' in kwargs: + datacenter_id = kwargs['datacenterId'] + + _setter("path", path) + _setter("type", type) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datacenter_id is not None: - pulumi.set(__self__, "datacenter_id", datacenter_id) + _setter("datacenter_id", datacenter_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -188,16 +215,39 @@ def __init__(__self__, *, `vm` for virtual machine folders, `datastore` for datastore folders, and `network` for network folders. Forces a new resource if changed. """ + _FolderState._configure( + lambda key, value: pulumi.set(__self__, key, value), + custom_attributes=custom_attributes, + datacenter_id=datacenter_id, + path=path, + tags=tags, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datacenter_id: Optional[pulumi.Input[str]] = None, + path: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if datacenter_id is None and 'datacenterId' in kwargs: + datacenter_id = kwargs['datacenterId'] + if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datacenter_id is not None: - pulumi.set(__self__, "datacenter_id", datacenter_id) + _setter("datacenter_id", datacenter_id) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="customAttributes") @@ -349,6 +399,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + FolderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/get_compute_cluster.py b/sdk/python/pulumi_vsphere/get_compute_cluster.py index 7add99a1..ab21e86c 100644 --- a/sdk/python/pulumi_vsphere/get_compute_cluster.py +++ b/sdk/python/pulumi_vsphere/get_compute_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_compute_cluster_host_group.py b/sdk/python/pulumi_vsphere/get_compute_cluster_host_group.py index 7002a08a..706a26f6 100644 --- a/sdk/python/pulumi_vsphere/get_compute_cluster_host_group.py +++ b/sdk/python/pulumi_vsphere/get_compute_cluster_host_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_content_library.py b/sdk/python/pulumi_vsphere/get_content_library.py index 697b9dff..12fd14ca 100644 --- a/sdk/python/pulumi_vsphere/get_content_library.py +++ b/sdk/python/pulumi_vsphere/get_content_library.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_content_library_item.py b/sdk/python/pulumi_vsphere/get_content_library_item.py index 9356e5f3..a52ed20f 100644 --- a/sdk/python/pulumi_vsphere/get_content_library_item.py +++ b/sdk/python/pulumi_vsphere/get_content_library_item.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_custom_attribute.py b/sdk/python/pulumi_vsphere/get_custom_attribute.py index eb738aaa..eb5f075e 100644 --- a/sdk/python/pulumi_vsphere/get_custom_attribute.py +++ b/sdk/python/pulumi_vsphere/get_custom_attribute.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_datacenter.py b/sdk/python/pulumi_vsphere/get_datacenter.py index 42e67534..1fb70cb7 100644 --- a/sdk/python/pulumi_vsphere/get_datacenter.py +++ b/sdk/python/pulumi_vsphere/get_datacenter.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_datastore.py b/sdk/python/pulumi_vsphere/get_datastore.py index 44a7afaf..6d63a307 100644 --- a/sdk/python/pulumi_vsphere/get_datastore.py +++ b/sdk/python/pulumi_vsphere/get_datastore.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_datastore_cluster.py b/sdk/python/pulumi_vsphere/get_datastore_cluster.py index 82bd9c81..dcac8e70 100644 --- a/sdk/python/pulumi_vsphere/get_datastore_cluster.py +++ b/sdk/python/pulumi_vsphere/get_datastore_cluster.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_distributed_virtual_switch.py b/sdk/python/pulumi_vsphere/get_distributed_virtual_switch.py index d67e206f..778397d3 100644 --- a/sdk/python/pulumi_vsphere/get_distributed_virtual_switch.py +++ b/sdk/python/pulumi_vsphere/get_distributed_virtual_switch.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_dynamic.py b/sdk/python/pulumi_vsphere/get_dynamic.py index e27048a9..098d83eb 100644 --- a/sdk/python/pulumi_vsphere/get_dynamic.py +++ b/sdk/python/pulumi_vsphere/get_dynamic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_folder.py b/sdk/python/pulumi_vsphere/get_folder.py index 70bd84c8..ab7fe73d 100644 --- a/sdk/python/pulumi_vsphere/get_folder.py +++ b/sdk/python/pulumi_vsphere/get_folder.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_host.py b/sdk/python/pulumi_vsphere/get_host.py index f2c28dac..81beea6e 100644 --- a/sdk/python/pulumi_vsphere/get_host.py +++ b/sdk/python/pulumi_vsphere/get_host.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_host_pci_device.py b/sdk/python/pulumi_vsphere/get_host_pci_device.py index 47350683..0a682c89 100644 --- a/sdk/python/pulumi_vsphere/get_host_pci_device.py +++ b/sdk/python/pulumi_vsphere/get_host_pci_device.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_host_thumbprint.py b/sdk/python/pulumi_vsphere/get_host_thumbprint.py index c066dced..0e206092 100644 --- a/sdk/python/pulumi_vsphere/get_host_thumbprint.py +++ b/sdk/python/pulumi_vsphere/get_host_thumbprint.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_license.py b/sdk/python/pulumi_vsphere/get_license.py index 0acb4dfe..4d7fe06e 100644 --- a/sdk/python/pulumi_vsphere/get_license.py +++ b/sdk/python/pulumi_vsphere/get_license.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_network.py b/sdk/python/pulumi_vsphere/get_network.py index d0016610..1b3a2a97 100644 --- a/sdk/python/pulumi_vsphere/get_network.py +++ b/sdk/python/pulumi_vsphere/get_network.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_ovf_vm_template.py b/sdk/python/pulumi_vsphere/get_ovf_vm_template.py index 51b880e9..2ad10dff 100644 --- a/sdk/python/pulumi_vsphere/get_ovf_vm_template.py +++ b/sdk/python/pulumi_vsphere/get_ovf_vm_template.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_policy.py b/sdk/python/pulumi_vsphere/get_policy.py index e666bc69..85f0641d 100644 --- a/sdk/python/pulumi_vsphere/get_policy.py +++ b/sdk/python/pulumi_vsphere/get_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_resource_pool.py b/sdk/python/pulumi_vsphere/get_resource_pool.py index a178fec5..d900773d 100644 --- a/sdk/python/pulumi_vsphere/get_resource_pool.py +++ b/sdk/python/pulumi_vsphere/get_resource_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_role.py b/sdk/python/pulumi_vsphere/get_role.py index 3ac9ffed..ade2852c 100644 --- a/sdk/python/pulumi_vsphere/get_role.py +++ b/sdk/python/pulumi_vsphere/get_role.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_tag.py b/sdk/python/pulumi_vsphere/get_tag.py index c0421c4b..14e64fd7 100644 --- a/sdk/python/pulumi_vsphere/get_tag.py +++ b/sdk/python/pulumi_vsphere/get_tag.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_tag_category.py b/sdk/python/pulumi_vsphere/get_tag_category.py index 5d97d3de..368dfb8d 100644 --- a/sdk/python/pulumi_vsphere/get_tag_category.py +++ b/sdk/python/pulumi_vsphere/get_tag_category.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_vapp_container.py b/sdk/python/pulumi_vsphere/get_vapp_container.py index e394ea9e..c78fa1d9 100644 --- a/sdk/python/pulumi_vsphere/get_vapp_container.py +++ b/sdk/python/pulumi_vsphere/get_vapp_container.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/get_virtual_machine.py b/sdk/python/pulumi_vsphere/get_virtual_machine.py index 6fa173e4..8b3878c7 100644 --- a/sdk/python/pulumi_vsphere/get_virtual_machine.py +++ b/sdk/python/pulumi_vsphere/get_virtual_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * diff --git a/sdk/python/pulumi_vsphere/get_vmfs_disks.py b/sdk/python/pulumi_vsphere/get_vmfs_disks.py index 8eec581c..e057cfe9 100644 --- a/sdk/python/pulumi_vsphere/get_vmfs_disks.py +++ b/sdk/python/pulumi_vsphere/get_vmfs_disks.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = [ diff --git a/sdk/python/pulumi_vsphere/ha_vm_override.py b/sdk/python/pulumi_vsphere/ha_vm_override.py index 1f795073..4c81959d 100644 --- a/sdk/python/pulumi_vsphere/ha_vm_override.py +++ b/sdk/python/pulumi_vsphere/ha_vm_override.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['HaVmOverrideArgs', 'HaVmOverride'] @@ -86,34 +86,107 @@ def __init__(__self__, *, vSphere HA will wait for this virtual machine to be ready. Use `-1` to specify the cluster default. Default: `-1`. """ - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + HaVmOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + virtual_machine_id=virtual_machine_id, + ha_datastore_apd_recovery_action=ha_datastore_apd_recovery_action, + ha_datastore_apd_response=ha_datastore_apd_response, + ha_datastore_apd_response_delay=ha_datastore_apd_response_delay, + ha_datastore_pdl_response=ha_datastore_pdl_response, + ha_host_isolation_response=ha_host_isolation_response, + ha_vm_failure_interval=ha_vm_failure_interval, + ha_vm_maximum_failure_window=ha_vm_maximum_failure_window, + ha_vm_maximum_resets=ha_vm_maximum_resets, + ha_vm_minimum_uptime=ha_vm_minimum_uptime, + ha_vm_monitoring=ha_vm_monitoring, + ha_vm_monitoring_use_cluster_defaults=ha_vm_monitoring_use_cluster_defaults, + ha_vm_restart_priority=ha_vm_restart_priority, + ha_vm_restart_timeout=ha_vm_restart_timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + ha_datastore_apd_recovery_action: Optional[pulumi.Input[str]] = None, + ha_datastore_apd_response: Optional[pulumi.Input[str]] = None, + ha_datastore_apd_response_delay: Optional[pulumi.Input[int]] = None, + ha_datastore_pdl_response: Optional[pulumi.Input[str]] = None, + ha_host_isolation_response: Optional[pulumi.Input[str]] = None, + ha_vm_failure_interval: Optional[pulumi.Input[int]] = None, + ha_vm_maximum_failure_window: Optional[pulumi.Input[int]] = None, + ha_vm_maximum_resets: Optional[pulumi.Input[int]] = None, + ha_vm_minimum_uptime: Optional[pulumi.Input[int]] = None, + ha_vm_monitoring: Optional[pulumi.Input[str]] = None, + ha_vm_monitoring_use_cluster_defaults: Optional[pulumi.Input[bool]] = None, + ha_vm_restart_priority: Optional[pulumi.Input[str]] = None, + ha_vm_restart_timeout: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if compute_cluster_id is None: + raise TypeError("Missing 'compute_cluster_id' argument") + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + if ha_datastore_apd_recovery_action is None and 'haDatastoreApdRecoveryAction' in kwargs: + ha_datastore_apd_recovery_action = kwargs['haDatastoreApdRecoveryAction'] + if ha_datastore_apd_response is None and 'haDatastoreApdResponse' in kwargs: + ha_datastore_apd_response = kwargs['haDatastoreApdResponse'] + if ha_datastore_apd_response_delay is None and 'haDatastoreApdResponseDelay' in kwargs: + ha_datastore_apd_response_delay = kwargs['haDatastoreApdResponseDelay'] + if ha_datastore_pdl_response is None and 'haDatastorePdlResponse' in kwargs: + ha_datastore_pdl_response = kwargs['haDatastorePdlResponse'] + if ha_host_isolation_response is None and 'haHostIsolationResponse' in kwargs: + ha_host_isolation_response = kwargs['haHostIsolationResponse'] + if ha_vm_failure_interval is None and 'haVmFailureInterval' in kwargs: + ha_vm_failure_interval = kwargs['haVmFailureInterval'] + if ha_vm_maximum_failure_window is None and 'haVmMaximumFailureWindow' in kwargs: + ha_vm_maximum_failure_window = kwargs['haVmMaximumFailureWindow'] + if ha_vm_maximum_resets is None and 'haVmMaximumResets' in kwargs: + ha_vm_maximum_resets = kwargs['haVmMaximumResets'] + if ha_vm_minimum_uptime is None and 'haVmMinimumUptime' in kwargs: + ha_vm_minimum_uptime = kwargs['haVmMinimumUptime'] + if ha_vm_monitoring is None and 'haVmMonitoring' in kwargs: + ha_vm_monitoring = kwargs['haVmMonitoring'] + if ha_vm_monitoring_use_cluster_defaults is None and 'haVmMonitoringUseClusterDefaults' in kwargs: + ha_vm_monitoring_use_cluster_defaults = kwargs['haVmMonitoringUseClusterDefaults'] + if ha_vm_restart_priority is None and 'haVmRestartPriority' in kwargs: + ha_vm_restart_priority = kwargs['haVmRestartPriority'] + if ha_vm_restart_timeout is None and 'haVmRestartTimeout' in kwargs: + ha_vm_restart_timeout = kwargs['haVmRestartTimeout'] + + _setter("compute_cluster_id", compute_cluster_id) + _setter("virtual_machine_id", virtual_machine_id) if ha_datastore_apd_recovery_action is not None: - pulumi.set(__self__, "ha_datastore_apd_recovery_action", ha_datastore_apd_recovery_action) + _setter("ha_datastore_apd_recovery_action", ha_datastore_apd_recovery_action) if ha_datastore_apd_response is not None: - pulumi.set(__self__, "ha_datastore_apd_response", ha_datastore_apd_response) + _setter("ha_datastore_apd_response", ha_datastore_apd_response) if ha_datastore_apd_response_delay is not None: - pulumi.set(__self__, "ha_datastore_apd_response_delay", ha_datastore_apd_response_delay) + _setter("ha_datastore_apd_response_delay", ha_datastore_apd_response_delay) if ha_datastore_pdl_response is not None: - pulumi.set(__self__, "ha_datastore_pdl_response", ha_datastore_pdl_response) + _setter("ha_datastore_pdl_response", ha_datastore_pdl_response) if ha_host_isolation_response is not None: - pulumi.set(__self__, "ha_host_isolation_response", ha_host_isolation_response) + _setter("ha_host_isolation_response", ha_host_isolation_response) if ha_vm_failure_interval is not None: - pulumi.set(__self__, "ha_vm_failure_interval", ha_vm_failure_interval) + _setter("ha_vm_failure_interval", ha_vm_failure_interval) if ha_vm_maximum_failure_window is not None: - pulumi.set(__self__, "ha_vm_maximum_failure_window", ha_vm_maximum_failure_window) + _setter("ha_vm_maximum_failure_window", ha_vm_maximum_failure_window) if ha_vm_maximum_resets is not None: - pulumi.set(__self__, "ha_vm_maximum_resets", ha_vm_maximum_resets) + _setter("ha_vm_maximum_resets", ha_vm_maximum_resets) if ha_vm_minimum_uptime is not None: - pulumi.set(__self__, "ha_vm_minimum_uptime", ha_vm_minimum_uptime) + _setter("ha_vm_minimum_uptime", ha_vm_minimum_uptime) if ha_vm_monitoring is not None: - pulumi.set(__self__, "ha_vm_monitoring", ha_vm_monitoring) + _setter("ha_vm_monitoring", ha_vm_monitoring) if ha_vm_monitoring_use_cluster_defaults is not None: - pulumi.set(__self__, "ha_vm_monitoring_use_cluster_defaults", ha_vm_monitoring_use_cluster_defaults) + _setter("ha_vm_monitoring_use_cluster_defaults", ha_vm_monitoring_use_cluster_defaults) if ha_vm_restart_priority is not None: - pulumi.set(__self__, "ha_vm_restart_priority", ha_vm_restart_priority) + _setter("ha_vm_restart_priority", ha_vm_restart_priority) if ha_vm_restart_timeout is not None: - pulumi.set(__self__, "ha_vm_restart_timeout", ha_vm_restart_timeout) + _setter("ha_vm_restart_timeout", ha_vm_restart_timeout) @property @pulumi.getter(name="computeClusterId") @@ -410,36 +483,105 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_machine_id: The UUID of the virtual machine to create the override for. Forces a new resource if changed. """ + _HaVmOverrideState._configure( + lambda key, value: pulumi.set(__self__, key, value), + compute_cluster_id=compute_cluster_id, + ha_datastore_apd_recovery_action=ha_datastore_apd_recovery_action, + ha_datastore_apd_response=ha_datastore_apd_response, + ha_datastore_apd_response_delay=ha_datastore_apd_response_delay, + ha_datastore_pdl_response=ha_datastore_pdl_response, + ha_host_isolation_response=ha_host_isolation_response, + ha_vm_failure_interval=ha_vm_failure_interval, + ha_vm_maximum_failure_window=ha_vm_maximum_failure_window, + ha_vm_maximum_resets=ha_vm_maximum_resets, + ha_vm_minimum_uptime=ha_vm_minimum_uptime, + ha_vm_monitoring=ha_vm_monitoring, + ha_vm_monitoring_use_cluster_defaults=ha_vm_monitoring_use_cluster_defaults, + ha_vm_restart_priority=ha_vm_restart_priority, + ha_vm_restart_timeout=ha_vm_restart_timeout, + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + compute_cluster_id: Optional[pulumi.Input[str]] = None, + ha_datastore_apd_recovery_action: Optional[pulumi.Input[str]] = None, + ha_datastore_apd_response: Optional[pulumi.Input[str]] = None, + ha_datastore_apd_response_delay: Optional[pulumi.Input[int]] = None, + ha_datastore_pdl_response: Optional[pulumi.Input[str]] = None, + ha_host_isolation_response: Optional[pulumi.Input[str]] = None, + ha_vm_failure_interval: Optional[pulumi.Input[int]] = None, + ha_vm_maximum_failure_window: Optional[pulumi.Input[int]] = None, + ha_vm_maximum_resets: Optional[pulumi.Input[int]] = None, + ha_vm_minimum_uptime: Optional[pulumi.Input[int]] = None, + ha_vm_monitoring: Optional[pulumi.Input[str]] = None, + ha_vm_monitoring_use_cluster_defaults: Optional[pulumi.Input[bool]] = None, + ha_vm_restart_priority: Optional[pulumi.Input[str]] = None, + ha_vm_restart_timeout: Optional[pulumi.Input[int]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if compute_cluster_id is None and 'computeClusterId' in kwargs: + compute_cluster_id = kwargs['computeClusterId'] + if ha_datastore_apd_recovery_action is None and 'haDatastoreApdRecoveryAction' in kwargs: + ha_datastore_apd_recovery_action = kwargs['haDatastoreApdRecoveryAction'] + if ha_datastore_apd_response is None and 'haDatastoreApdResponse' in kwargs: + ha_datastore_apd_response = kwargs['haDatastoreApdResponse'] + if ha_datastore_apd_response_delay is None and 'haDatastoreApdResponseDelay' in kwargs: + ha_datastore_apd_response_delay = kwargs['haDatastoreApdResponseDelay'] + if ha_datastore_pdl_response is None and 'haDatastorePdlResponse' in kwargs: + ha_datastore_pdl_response = kwargs['haDatastorePdlResponse'] + if ha_host_isolation_response is None and 'haHostIsolationResponse' in kwargs: + ha_host_isolation_response = kwargs['haHostIsolationResponse'] + if ha_vm_failure_interval is None and 'haVmFailureInterval' in kwargs: + ha_vm_failure_interval = kwargs['haVmFailureInterval'] + if ha_vm_maximum_failure_window is None and 'haVmMaximumFailureWindow' in kwargs: + ha_vm_maximum_failure_window = kwargs['haVmMaximumFailureWindow'] + if ha_vm_maximum_resets is None and 'haVmMaximumResets' in kwargs: + ha_vm_maximum_resets = kwargs['haVmMaximumResets'] + if ha_vm_minimum_uptime is None and 'haVmMinimumUptime' in kwargs: + ha_vm_minimum_uptime = kwargs['haVmMinimumUptime'] + if ha_vm_monitoring is None and 'haVmMonitoring' in kwargs: + ha_vm_monitoring = kwargs['haVmMonitoring'] + if ha_vm_monitoring_use_cluster_defaults is None and 'haVmMonitoringUseClusterDefaults' in kwargs: + ha_vm_monitoring_use_cluster_defaults = kwargs['haVmMonitoringUseClusterDefaults'] + if ha_vm_restart_priority is None and 'haVmRestartPriority' in kwargs: + ha_vm_restart_priority = kwargs['haVmRestartPriority'] + if ha_vm_restart_timeout is None and 'haVmRestartTimeout' in kwargs: + ha_vm_restart_timeout = kwargs['haVmRestartTimeout'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if compute_cluster_id is not None: - pulumi.set(__self__, "compute_cluster_id", compute_cluster_id) + _setter("compute_cluster_id", compute_cluster_id) if ha_datastore_apd_recovery_action is not None: - pulumi.set(__self__, "ha_datastore_apd_recovery_action", ha_datastore_apd_recovery_action) + _setter("ha_datastore_apd_recovery_action", ha_datastore_apd_recovery_action) if ha_datastore_apd_response is not None: - pulumi.set(__self__, "ha_datastore_apd_response", ha_datastore_apd_response) + _setter("ha_datastore_apd_response", ha_datastore_apd_response) if ha_datastore_apd_response_delay is not None: - pulumi.set(__self__, "ha_datastore_apd_response_delay", ha_datastore_apd_response_delay) + _setter("ha_datastore_apd_response_delay", ha_datastore_apd_response_delay) if ha_datastore_pdl_response is not None: - pulumi.set(__self__, "ha_datastore_pdl_response", ha_datastore_pdl_response) + _setter("ha_datastore_pdl_response", ha_datastore_pdl_response) if ha_host_isolation_response is not None: - pulumi.set(__self__, "ha_host_isolation_response", ha_host_isolation_response) + _setter("ha_host_isolation_response", ha_host_isolation_response) if ha_vm_failure_interval is not None: - pulumi.set(__self__, "ha_vm_failure_interval", ha_vm_failure_interval) + _setter("ha_vm_failure_interval", ha_vm_failure_interval) if ha_vm_maximum_failure_window is not None: - pulumi.set(__self__, "ha_vm_maximum_failure_window", ha_vm_maximum_failure_window) + _setter("ha_vm_maximum_failure_window", ha_vm_maximum_failure_window) if ha_vm_maximum_resets is not None: - pulumi.set(__self__, "ha_vm_maximum_resets", ha_vm_maximum_resets) + _setter("ha_vm_maximum_resets", ha_vm_maximum_resets) if ha_vm_minimum_uptime is not None: - pulumi.set(__self__, "ha_vm_minimum_uptime", ha_vm_minimum_uptime) + _setter("ha_vm_minimum_uptime", ha_vm_minimum_uptime) if ha_vm_monitoring is not None: - pulumi.set(__self__, "ha_vm_monitoring", ha_vm_monitoring) + _setter("ha_vm_monitoring", ha_vm_monitoring) if ha_vm_monitoring_use_cluster_defaults is not None: - pulumi.set(__self__, "ha_vm_monitoring_use_cluster_defaults", ha_vm_monitoring_use_cluster_defaults) + _setter("ha_vm_monitoring_use_cluster_defaults", ha_vm_monitoring_use_cluster_defaults) if ha_vm_restart_priority is not None: - pulumi.set(__self__, "ha_vm_restart_priority", ha_vm_restart_priority) + _setter("ha_vm_restart_priority", ha_vm_restart_priority) if ha_vm_restart_timeout is not None: - pulumi.set(__self__, "ha_vm_restart_timeout", ha_vm_restart_timeout) + _setter("ha_vm_restart_timeout", ha_vm_restart_timeout) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter(name="computeClusterId") @@ -759,6 +901,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HaVmOverrideArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/host.py b/sdk/python/pulumi_vsphere/host.py index 725ed8e6..42c2ff9a 100644 --- a/sdk/python/pulumi_vsphere/host.py +++ b/sdk/python/pulumi_vsphere/host.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['HostArgs', 'Host'] @@ -74,31 +74,78 @@ def __init__(__self__, *, trusted and no thumbprint is set then the operation will fail. See data source [`get_host_thumbprint`][docs-host-thumbprint-data-source]. """ - pulumi.set(__self__, "hostname", hostname) - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "username", username) + HostArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + hostname=hostname, + password=password, + username=username, + cluster=cluster, + cluster_managed=cluster_managed, + connected=connected, + custom_attributes=custom_attributes, + datacenter=datacenter, + force=force, + license=license, + lockdown=lockdown, + maintenance=maintenance, + tags=tags, + thumbprint=thumbprint, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + hostname: Optional[pulumi.Input[str]] = None, + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + cluster: Optional[pulumi.Input[str]] = None, + cluster_managed: Optional[pulumi.Input[bool]] = None, + connected: Optional[pulumi.Input[bool]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datacenter: Optional[pulumi.Input[str]] = None, + force: Optional[pulumi.Input[bool]] = None, + license: Optional[pulumi.Input[str]] = None, + lockdown: Optional[pulumi.Input[str]] = None, + maintenance: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if hostname is None: + raise TypeError("Missing 'hostname' argument") + if password is None: + raise TypeError("Missing 'password' argument") + if username is None: + raise TypeError("Missing 'username' argument") + if cluster_managed is None and 'clusterManaged' in kwargs: + cluster_managed = kwargs['clusterManaged'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + + _setter("hostname", hostname) + _setter("password", password) + _setter("username", username) if cluster is not None: - pulumi.set(__self__, "cluster", cluster) + _setter("cluster", cluster) if cluster_managed is not None: - pulumi.set(__self__, "cluster_managed", cluster_managed) + _setter("cluster_managed", cluster_managed) if connected is not None: - pulumi.set(__self__, "connected", connected) + _setter("connected", connected) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datacenter is not None: - pulumi.set(__self__, "datacenter", datacenter) + _setter("datacenter", datacenter) if force is not None: - pulumi.set(__self__, "force", force) + _setter("force", force) if license is not None: - pulumi.set(__self__, "license", license) + _setter("license", license) if lockdown is not None: - pulumi.set(__self__, "lockdown", lockdown) + _setter("lockdown", lockdown) if maintenance is not None: - pulumi.set(__self__, "maintenance", maintenance) + _setter("maintenance", maintenance) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) @property @pulumi.getter @@ -361,34 +408,75 @@ def __init__(__self__, *, :param pulumi.Input[str] username: Username that will be used by vSphere to authenticate to the host. """ + _HostState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cluster=cluster, + cluster_managed=cluster_managed, + connected=connected, + custom_attributes=custom_attributes, + datacenter=datacenter, + force=force, + hostname=hostname, + license=license, + lockdown=lockdown, + maintenance=maintenance, + password=password, + tags=tags, + thumbprint=thumbprint, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cluster: Optional[pulumi.Input[str]] = None, + cluster_managed: Optional[pulumi.Input[bool]] = None, + connected: Optional[pulumi.Input[bool]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datacenter: Optional[pulumi.Input[str]] = None, + force: Optional[pulumi.Input[bool]] = None, + hostname: Optional[pulumi.Input[str]] = None, + license: Optional[pulumi.Input[str]] = None, + lockdown: Optional[pulumi.Input[str]] = None, + maintenance: Optional[pulumi.Input[bool]] = None, + password: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + thumbprint: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cluster_managed is None and 'clusterManaged' in kwargs: + cluster_managed = kwargs['clusterManaged'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if cluster is not None: - pulumi.set(__self__, "cluster", cluster) + _setter("cluster", cluster) if cluster_managed is not None: - pulumi.set(__self__, "cluster_managed", cluster_managed) + _setter("cluster_managed", cluster_managed) if connected is not None: - pulumi.set(__self__, "connected", connected) + _setter("connected", connected) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datacenter is not None: - pulumi.set(__self__, "datacenter", datacenter) + _setter("datacenter", datacenter) if force is not None: - pulumi.set(__self__, "force", force) + _setter("force", force) if hostname is not None: - pulumi.set(__self__, "hostname", hostname) + _setter("hostname", hostname) if license is not None: - pulumi.set(__self__, "license", license) + _setter("license", license) if lockdown is not None: - pulumi.set(__self__, "lockdown", lockdown) + _setter("lockdown", lockdown) if maintenance is not None: - pulumi.set(__self__, "maintenance", maintenance) + _setter("maintenance", maintenance) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if thumbprint is not None: - pulumi.set(__self__, "thumbprint", thumbprint) + _setter("thumbprint", thumbprint) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter @@ -778,6 +866,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HostArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/host_port_group.py b/sdk/python/pulumi_vsphere/host_port_group.py index 1486aa94..d51d8979 100644 --- a/sdk/python/pulumi_vsphere/host_port_group.py +++ b/sdk/python/pulumi_vsphere/host_port_group.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -62,38 +62,115 @@ def __init__(__self__, *, ID of `4095` enables trunk mode, allowing the guest to manage its own tagging. Default: `0`. """ - pulumi.set(__self__, "host_system_id", host_system_id) - pulumi.set(__self__, "virtual_switch_name", virtual_switch_name) + HostPortGroupArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_system_id=host_system_id, + virtual_switch_name=virtual_switch_name, + active_nics=active_nics, + allow_forged_transmits=allow_forged_transmits, + allow_mac_changes=allow_mac_changes, + allow_promiscuous=allow_promiscuous, + check_beacon=check_beacon, + failback=failback, + name=name, + notify_switches=notify_switches, + shaping_average_bandwidth=shaping_average_bandwidth, + shaping_burst_size=shaping_burst_size, + shaping_enabled=shaping_enabled, + shaping_peak_bandwidth=shaping_peak_bandwidth, + standby_nics=standby_nics, + teaming_policy=teaming_policy, + vlan_id=vlan_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_system_id: Optional[pulumi.Input[str]] = None, + virtual_switch_name: Optional[pulumi.Input[str]] = None, + active_nics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allow_forged_transmits: Optional[pulumi.Input[bool]] = None, + allow_mac_changes: Optional[pulumi.Input[bool]] = None, + allow_promiscuous: Optional[pulumi.Input[bool]] = None, + check_beacon: Optional[pulumi.Input[bool]] = None, + failback: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + notify_switches: Optional[pulumi.Input[bool]] = None, + shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + shaping_burst_size: Optional[pulumi.Input[int]] = None, + shaping_enabled: Optional[pulumi.Input[bool]] = None, + shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + standby_nics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + teaming_policy: Optional[pulumi.Input[str]] = None, + vlan_id: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if host_system_id is None: + raise TypeError("Missing 'host_system_id' argument") + if virtual_switch_name is None and 'virtualSwitchName' in kwargs: + virtual_switch_name = kwargs['virtualSwitchName'] + if virtual_switch_name is None: + raise TypeError("Missing 'virtual_switch_name' argument") + if active_nics is None and 'activeNics' in kwargs: + active_nics = kwargs['activeNics'] + if allow_forged_transmits is None and 'allowForgedTransmits' in kwargs: + allow_forged_transmits = kwargs['allowForgedTransmits'] + if allow_mac_changes is None and 'allowMacChanges' in kwargs: + allow_mac_changes = kwargs['allowMacChanges'] + if allow_promiscuous is None and 'allowPromiscuous' in kwargs: + allow_promiscuous = kwargs['allowPromiscuous'] + if check_beacon is None and 'checkBeacon' in kwargs: + check_beacon = kwargs['checkBeacon'] + if notify_switches is None and 'notifySwitches' in kwargs: + notify_switches = kwargs['notifySwitches'] + if shaping_average_bandwidth is None and 'shapingAverageBandwidth' in kwargs: + shaping_average_bandwidth = kwargs['shapingAverageBandwidth'] + if shaping_burst_size is None and 'shapingBurstSize' in kwargs: + shaping_burst_size = kwargs['shapingBurstSize'] + if shaping_enabled is None and 'shapingEnabled' in kwargs: + shaping_enabled = kwargs['shapingEnabled'] + if shaping_peak_bandwidth is None and 'shapingPeakBandwidth' in kwargs: + shaping_peak_bandwidth = kwargs['shapingPeakBandwidth'] + if standby_nics is None and 'standbyNics' in kwargs: + standby_nics = kwargs['standbyNics'] + if teaming_policy is None and 'teamingPolicy' in kwargs: + teaming_policy = kwargs['teamingPolicy'] + if vlan_id is None and 'vlanId' in kwargs: + vlan_id = kwargs['vlanId'] + + _setter("host_system_id", host_system_id) + _setter("virtual_switch_name", virtual_switch_name) if active_nics is not None: - pulumi.set(__self__, "active_nics", active_nics) + _setter("active_nics", active_nics) if allow_forged_transmits is not None: - pulumi.set(__self__, "allow_forged_transmits", allow_forged_transmits) + _setter("allow_forged_transmits", allow_forged_transmits) if allow_mac_changes is not None: - pulumi.set(__self__, "allow_mac_changes", allow_mac_changes) + _setter("allow_mac_changes", allow_mac_changes) if allow_promiscuous is not None: - pulumi.set(__self__, "allow_promiscuous", allow_promiscuous) + _setter("allow_promiscuous", allow_promiscuous) if check_beacon is not None: - pulumi.set(__self__, "check_beacon", check_beacon) + _setter("check_beacon", check_beacon) if failback is not None: - pulumi.set(__self__, "failback", failback) + _setter("failback", failback) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notify_switches is not None: - pulumi.set(__self__, "notify_switches", notify_switches) + _setter("notify_switches", notify_switches) if shaping_average_bandwidth is not None: - pulumi.set(__self__, "shaping_average_bandwidth", shaping_average_bandwidth) + _setter("shaping_average_bandwidth", shaping_average_bandwidth) if shaping_burst_size is not None: - pulumi.set(__self__, "shaping_burst_size", shaping_burst_size) + _setter("shaping_burst_size", shaping_burst_size) if shaping_enabled is not None: - pulumi.set(__self__, "shaping_enabled", shaping_enabled) + _setter("shaping_enabled", shaping_enabled) if shaping_peak_bandwidth is not None: - pulumi.set(__self__, "shaping_peak_bandwidth", shaping_peak_bandwidth) + _setter("shaping_peak_bandwidth", shaping_peak_bandwidth) if standby_nics is not None: - pulumi.set(__self__, "standby_nics", standby_nics) + _setter("standby_nics", standby_nics) if teaming_policy is not None: - pulumi.set(__self__, "teaming_policy", teaming_policy) + _setter("teaming_policy", teaming_policy) if vlan_id is not None: - pulumi.set(__self__, "vlan_id", vlan_id) + _setter("vlan_id", vlan_id) @property @pulumi.getter(name="hostSystemId") @@ -366,46 +443,127 @@ def __init__(__self__, *, ID of `4095` enables trunk mode, allowing the guest to manage its own tagging. Default: `0`. """ + _HostPortGroupState._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_nics=active_nics, + allow_forged_transmits=allow_forged_transmits, + allow_mac_changes=allow_mac_changes, + allow_promiscuous=allow_promiscuous, + check_beacon=check_beacon, + computed_policy=computed_policy, + failback=failback, + host_system_id=host_system_id, + key=key, + name=name, + notify_switches=notify_switches, + ports=ports, + shaping_average_bandwidth=shaping_average_bandwidth, + shaping_burst_size=shaping_burst_size, + shaping_enabled=shaping_enabled, + shaping_peak_bandwidth=shaping_peak_bandwidth, + standby_nics=standby_nics, + teaming_policy=teaming_policy, + virtual_switch_name=virtual_switch_name, + vlan_id=vlan_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_nics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allow_forged_transmits: Optional[pulumi.Input[bool]] = None, + allow_mac_changes: Optional[pulumi.Input[bool]] = None, + allow_promiscuous: Optional[pulumi.Input[bool]] = None, + check_beacon: Optional[pulumi.Input[bool]] = None, + computed_policy: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + failback: Optional[pulumi.Input[bool]] = None, + host_system_id: Optional[pulumi.Input[str]] = None, + key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + notify_switches: Optional[pulumi.Input[bool]] = None, + ports: Optional[pulumi.Input[Sequence[pulumi.Input['HostPortGroupPortArgs']]]] = None, + shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + shaping_burst_size: Optional[pulumi.Input[int]] = None, + shaping_enabled: Optional[pulumi.Input[bool]] = None, + shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + standby_nics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + teaming_policy: Optional[pulumi.Input[str]] = None, + virtual_switch_name: Optional[pulumi.Input[str]] = None, + vlan_id: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_nics is None and 'activeNics' in kwargs: + active_nics = kwargs['activeNics'] + if allow_forged_transmits is None and 'allowForgedTransmits' in kwargs: + allow_forged_transmits = kwargs['allowForgedTransmits'] + if allow_mac_changes is None and 'allowMacChanges' in kwargs: + allow_mac_changes = kwargs['allowMacChanges'] + if allow_promiscuous is None and 'allowPromiscuous' in kwargs: + allow_promiscuous = kwargs['allowPromiscuous'] + if check_beacon is None and 'checkBeacon' in kwargs: + check_beacon = kwargs['checkBeacon'] + if computed_policy is None and 'computedPolicy' in kwargs: + computed_policy = kwargs['computedPolicy'] + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if notify_switches is None and 'notifySwitches' in kwargs: + notify_switches = kwargs['notifySwitches'] + if shaping_average_bandwidth is None and 'shapingAverageBandwidth' in kwargs: + shaping_average_bandwidth = kwargs['shapingAverageBandwidth'] + if shaping_burst_size is None and 'shapingBurstSize' in kwargs: + shaping_burst_size = kwargs['shapingBurstSize'] + if shaping_enabled is None and 'shapingEnabled' in kwargs: + shaping_enabled = kwargs['shapingEnabled'] + if shaping_peak_bandwidth is None and 'shapingPeakBandwidth' in kwargs: + shaping_peak_bandwidth = kwargs['shapingPeakBandwidth'] + if standby_nics is None and 'standbyNics' in kwargs: + standby_nics = kwargs['standbyNics'] + if teaming_policy is None and 'teamingPolicy' in kwargs: + teaming_policy = kwargs['teamingPolicy'] + if virtual_switch_name is None and 'virtualSwitchName' in kwargs: + virtual_switch_name = kwargs['virtualSwitchName'] + if vlan_id is None and 'vlanId' in kwargs: + vlan_id = kwargs['vlanId'] + if active_nics is not None: - pulumi.set(__self__, "active_nics", active_nics) + _setter("active_nics", active_nics) if allow_forged_transmits is not None: - pulumi.set(__self__, "allow_forged_transmits", allow_forged_transmits) + _setter("allow_forged_transmits", allow_forged_transmits) if allow_mac_changes is not None: - pulumi.set(__self__, "allow_mac_changes", allow_mac_changes) + _setter("allow_mac_changes", allow_mac_changes) if allow_promiscuous is not None: - pulumi.set(__self__, "allow_promiscuous", allow_promiscuous) + _setter("allow_promiscuous", allow_promiscuous) if check_beacon is not None: - pulumi.set(__self__, "check_beacon", check_beacon) + _setter("check_beacon", check_beacon) if computed_policy is not None: - pulumi.set(__self__, "computed_policy", computed_policy) + _setter("computed_policy", computed_policy) if failback is not None: - pulumi.set(__self__, "failback", failback) + _setter("failback", failback) if host_system_id is not None: - pulumi.set(__self__, "host_system_id", host_system_id) + _setter("host_system_id", host_system_id) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notify_switches is not None: - pulumi.set(__self__, "notify_switches", notify_switches) + _setter("notify_switches", notify_switches) if ports is not None: - pulumi.set(__self__, "ports", ports) + _setter("ports", ports) if shaping_average_bandwidth is not None: - pulumi.set(__self__, "shaping_average_bandwidth", shaping_average_bandwidth) + _setter("shaping_average_bandwidth", shaping_average_bandwidth) if shaping_burst_size is not None: - pulumi.set(__self__, "shaping_burst_size", shaping_burst_size) + _setter("shaping_burst_size", shaping_burst_size) if shaping_enabled is not None: - pulumi.set(__self__, "shaping_enabled", shaping_enabled) + _setter("shaping_enabled", shaping_enabled) if shaping_peak_bandwidth is not None: - pulumi.set(__self__, "shaping_peak_bandwidth", shaping_peak_bandwidth) + _setter("shaping_peak_bandwidth", shaping_peak_bandwidth) if standby_nics is not None: - pulumi.set(__self__, "standby_nics", standby_nics) + _setter("standby_nics", standby_nics) if teaming_policy is not None: - pulumi.set(__self__, "teaming_policy", teaming_policy) + _setter("teaming_policy", teaming_policy) if virtual_switch_name is not None: - pulumi.set(__self__, "virtual_switch_name", virtual_switch_name) + _setter("virtual_switch_name", virtual_switch_name) if vlan_id is not None: - pulumi.set(__self__, "vlan_id", vlan_id) + _setter("vlan_id", vlan_id) @property @pulumi.getter(name="activeNics") @@ -875,6 +1033,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HostPortGroupArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/host_virtual_switch.py b/sdk/python/pulumi_vsphere/host_virtual_switch.py index bfea4a3b..0fca8b8e 100644 --- a/sdk/python/pulumi_vsphere/host_virtual_switch.py +++ b/sdk/python/pulumi_vsphere/host_virtual_switch.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['HostVirtualSwitchArgs', 'HostVirtualSwitch'] @@ -90,45 +90,138 @@ def __init__(__self__, *, of `loadbalance_ip`, `loadbalance_srcmac`, `loadbalance_srcid`, or `failover_explicit`. Default: `loadbalance_srcid`. """ - pulumi.set(__self__, "active_nics", active_nics) - pulumi.set(__self__, "host_system_id", host_system_id) - pulumi.set(__self__, "network_adapters", network_adapters) + HostVirtualSwitchArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_nics=active_nics, + host_system_id=host_system_id, + network_adapters=network_adapters, + allow_forged_transmits=allow_forged_transmits, + allow_mac_changes=allow_mac_changes, + allow_promiscuous=allow_promiscuous, + beacon_interval=beacon_interval, + check_beacon=check_beacon, + failback=failback, + link_discovery_operation=link_discovery_operation, + link_discovery_protocol=link_discovery_protocol, + mtu=mtu, + name=name, + notify_switches=notify_switches, + number_of_ports=number_of_ports, + shaping_average_bandwidth=shaping_average_bandwidth, + shaping_burst_size=shaping_burst_size, + shaping_enabled=shaping_enabled, + shaping_peak_bandwidth=shaping_peak_bandwidth, + standby_nics=standby_nics, + teaming_policy=teaming_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_nics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + host_system_id: Optional[pulumi.Input[str]] = None, + network_adapters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allow_forged_transmits: Optional[pulumi.Input[bool]] = None, + allow_mac_changes: Optional[pulumi.Input[bool]] = None, + allow_promiscuous: Optional[pulumi.Input[bool]] = None, + beacon_interval: Optional[pulumi.Input[int]] = None, + check_beacon: Optional[pulumi.Input[bool]] = None, + failback: Optional[pulumi.Input[bool]] = None, + link_discovery_operation: Optional[pulumi.Input[str]] = None, + link_discovery_protocol: Optional[pulumi.Input[str]] = None, + mtu: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + notify_switches: Optional[pulumi.Input[bool]] = None, + number_of_ports: Optional[pulumi.Input[int]] = None, + shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + shaping_burst_size: Optional[pulumi.Input[int]] = None, + shaping_enabled: Optional[pulumi.Input[bool]] = None, + shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + standby_nics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + teaming_policy: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_nics is None and 'activeNics' in kwargs: + active_nics = kwargs['activeNics'] + if active_nics is None: + raise TypeError("Missing 'active_nics' argument") + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if host_system_id is None: + raise TypeError("Missing 'host_system_id' argument") + if network_adapters is None and 'networkAdapters' in kwargs: + network_adapters = kwargs['networkAdapters'] + if network_adapters is None: + raise TypeError("Missing 'network_adapters' argument") + if allow_forged_transmits is None and 'allowForgedTransmits' in kwargs: + allow_forged_transmits = kwargs['allowForgedTransmits'] + if allow_mac_changes is None and 'allowMacChanges' in kwargs: + allow_mac_changes = kwargs['allowMacChanges'] + if allow_promiscuous is None and 'allowPromiscuous' in kwargs: + allow_promiscuous = kwargs['allowPromiscuous'] + if beacon_interval is None and 'beaconInterval' in kwargs: + beacon_interval = kwargs['beaconInterval'] + if check_beacon is None and 'checkBeacon' in kwargs: + check_beacon = kwargs['checkBeacon'] + if link_discovery_operation is None and 'linkDiscoveryOperation' in kwargs: + link_discovery_operation = kwargs['linkDiscoveryOperation'] + if link_discovery_protocol is None and 'linkDiscoveryProtocol' in kwargs: + link_discovery_protocol = kwargs['linkDiscoveryProtocol'] + if notify_switches is None and 'notifySwitches' in kwargs: + notify_switches = kwargs['notifySwitches'] + if number_of_ports is None and 'numberOfPorts' in kwargs: + number_of_ports = kwargs['numberOfPorts'] + if shaping_average_bandwidth is None and 'shapingAverageBandwidth' in kwargs: + shaping_average_bandwidth = kwargs['shapingAverageBandwidth'] + if shaping_burst_size is None and 'shapingBurstSize' in kwargs: + shaping_burst_size = kwargs['shapingBurstSize'] + if shaping_enabled is None and 'shapingEnabled' in kwargs: + shaping_enabled = kwargs['shapingEnabled'] + if shaping_peak_bandwidth is None and 'shapingPeakBandwidth' in kwargs: + shaping_peak_bandwidth = kwargs['shapingPeakBandwidth'] + if standby_nics is None and 'standbyNics' in kwargs: + standby_nics = kwargs['standbyNics'] + if teaming_policy is None and 'teamingPolicy' in kwargs: + teaming_policy = kwargs['teamingPolicy'] + + _setter("active_nics", active_nics) + _setter("host_system_id", host_system_id) + _setter("network_adapters", network_adapters) if allow_forged_transmits is not None: - pulumi.set(__self__, "allow_forged_transmits", allow_forged_transmits) + _setter("allow_forged_transmits", allow_forged_transmits) if allow_mac_changes is not None: - pulumi.set(__self__, "allow_mac_changes", allow_mac_changes) + _setter("allow_mac_changes", allow_mac_changes) if allow_promiscuous is not None: - pulumi.set(__self__, "allow_promiscuous", allow_promiscuous) + _setter("allow_promiscuous", allow_promiscuous) if beacon_interval is not None: - pulumi.set(__self__, "beacon_interval", beacon_interval) + _setter("beacon_interval", beacon_interval) if check_beacon is not None: - pulumi.set(__self__, "check_beacon", check_beacon) + _setter("check_beacon", check_beacon) if failback is not None: - pulumi.set(__self__, "failback", failback) + _setter("failback", failback) if link_discovery_operation is not None: - pulumi.set(__self__, "link_discovery_operation", link_discovery_operation) + _setter("link_discovery_operation", link_discovery_operation) if link_discovery_protocol is not None: - pulumi.set(__self__, "link_discovery_protocol", link_discovery_protocol) + _setter("link_discovery_protocol", link_discovery_protocol) if mtu is not None: - pulumi.set(__self__, "mtu", mtu) + _setter("mtu", mtu) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if notify_switches is not None: - pulumi.set(__self__, "notify_switches", notify_switches) + _setter("notify_switches", notify_switches) if number_of_ports is not None: - pulumi.set(__self__, "number_of_ports", number_of_ports) + _setter("number_of_ports", number_of_ports) if shaping_average_bandwidth is not None: - pulumi.set(__self__, "shaping_average_bandwidth", shaping_average_bandwidth) + _setter("shaping_average_bandwidth", shaping_average_bandwidth) if shaping_burst_size is not None: - pulumi.set(__self__, "shaping_burst_size", shaping_burst_size) + _setter("shaping_burst_size", shaping_burst_size) if shaping_enabled is not None: - pulumi.set(__self__, "shaping_enabled", shaping_enabled) + _setter("shaping_enabled", shaping_enabled) if shaping_peak_bandwidth is not None: - pulumi.set(__self__, "shaping_peak_bandwidth", shaping_peak_bandwidth) + _setter("shaping_peak_bandwidth", shaping_peak_bandwidth) if standby_nics is not None: - pulumi.set(__self__, "standby_nics", standby_nics) + _setter("standby_nics", standby_nics) if teaming_policy is not None: - pulumi.set(__self__, "teaming_policy", teaming_policy) + _setter("teaming_policy", teaming_policy) @property @pulumi.getter(name="activeNics") @@ -493,48 +586,135 @@ def __init__(__self__, *, of `loadbalance_ip`, `loadbalance_srcmac`, `loadbalance_srcid`, or `failover_explicit`. Default: `loadbalance_srcid`. """ + _HostVirtualSwitchState._configure( + lambda key, value: pulumi.set(__self__, key, value), + active_nics=active_nics, + allow_forged_transmits=allow_forged_transmits, + allow_mac_changes=allow_mac_changes, + allow_promiscuous=allow_promiscuous, + beacon_interval=beacon_interval, + check_beacon=check_beacon, + failback=failback, + host_system_id=host_system_id, + link_discovery_operation=link_discovery_operation, + link_discovery_protocol=link_discovery_protocol, + mtu=mtu, + name=name, + network_adapters=network_adapters, + notify_switches=notify_switches, + number_of_ports=number_of_ports, + shaping_average_bandwidth=shaping_average_bandwidth, + shaping_burst_size=shaping_burst_size, + shaping_enabled=shaping_enabled, + shaping_peak_bandwidth=shaping_peak_bandwidth, + standby_nics=standby_nics, + teaming_policy=teaming_policy, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + active_nics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + allow_forged_transmits: Optional[pulumi.Input[bool]] = None, + allow_mac_changes: Optional[pulumi.Input[bool]] = None, + allow_promiscuous: Optional[pulumi.Input[bool]] = None, + beacon_interval: Optional[pulumi.Input[int]] = None, + check_beacon: Optional[pulumi.Input[bool]] = None, + failback: Optional[pulumi.Input[bool]] = None, + host_system_id: Optional[pulumi.Input[str]] = None, + link_discovery_operation: Optional[pulumi.Input[str]] = None, + link_discovery_protocol: Optional[pulumi.Input[str]] = None, + mtu: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + network_adapters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + notify_switches: Optional[pulumi.Input[bool]] = None, + number_of_ports: Optional[pulumi.Input[int]] = None, + shaping_average_bandwidth: Optional[pulumi.Input[int]] = None, + shaping_burst_size: Optional[pulumi.Input[int]] = None, + shaping_enabled: Optional[pulumi.Input[bool]] = None, + shaping_peak_bandwidth: Optional[pulumi.Input[int]] = None, + standby_nics: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + teaming_policy: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if active_nics is None and 'activeNics' in kwargs: + active_nics = kwargs['activeNics'] + if allow_forged_transmits is None and 'allowForgedTransmits' in kwargs: + allow_forged_transmits = kwargs['allowForgedTransmits'] + if allow_mac_changes is None and 'allowMacChanges' in kwargs: + allow_mac_changes = kwargs['allowMacChanges'] + if allow_promiscuous is None and 'allowPromiscuous' in kwargs: + allow_promiscuous = kwargs['allowPromiscuous'] + if beacon_interval is None and 'beaconInterval' in kwargs: + beacon_interval = kwargs['beaconInterval'] + if check_beacon is None and 'checkBeacon' in kwargs: + check_beacon = kwargs['checkBeacon'] + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if link_discovery_operation is None and 'linkDiscoveryOperation' in kwargs: + link_discovery_operation = kwargs['linkDiscoveryOperation'] + if link_discovery_protocol is None and 'linkDiscoveryProtocol' in kwargs: + link_discovery_protocol = kwargs['linkDiscoveryProtocol'] + if network_adapters is None and 'networkAdapters' in kwargs: + network_adapters = kwargs['networkAdapters'] + if notify_switches is None and 'notifySwitches' in kwargs: + notify_switches = kwargs['notifySwitches'] + if number_of_ports is None and 'numberOfPorts' in kwargs: + number_of_ports = kwargs['numberOfPorts'] + if shaping_average_bandwidth is None and 'shapingAverageBandwidth' in kwargs: + shaping_average_bandwidth = kwargs['shapingAverageBandwidth'] + if shaping_burst_size is None and 'shapingBurstSize' in kwargs: + shaping_burst_size = kwargs['shapingBurstSize'] + if shaping_enabled is None and 'shapingEnabled' in kwargs: + shaping_enabled = kwargs['shapingEnabled'] + if shaping_peak_bandwidth is None and 'shapingPeakBandwidth' in kwargs: + shaping_peak_bandwidth = kwargs['shapingPeakBandwidth'] + if standby_nics is None and 'standbyNics' in kwargs: + standby_nics = kwargs['standbyNics'] + if teaming_policy is None and 'teamingPolicy' in kwargs: + teaming_policy = kwargs['teamingPolicy'] + if active_nics is not None: - pulumi.set(__self__, "active_nics", active_nics) + _setter("active_nics", active_nics) if allow_forged_transmits is not None: - pulumi.set(__self__, "allow_forged_transmits", allow_forged_transmits) + _setter("allow_forged_transmits", allow_forged_transmits) if allow_mac_changes is not None: - pulumi.set(__self__, "allow_mac_changes", allow_mac_changes) + _setter("allow_mac_changes", allow_mac_changes) if allow_promiscuous is not None: - pulumi.set(__self__, "allow_promiscuous", allow_promiscuous) + _setter("allow_promiscuous", allow_promiscuous) if beacon_interval is not None: - pulumi.set(__self__, "beacon_interval", beacon_interval) + _setter("beacon_interval", beacon_interval) if check_beacon is not None: - pulumi.set(__self__, "check_beacon", check_beacon) + _setter("check_beacon", check_beacon) if failback is not None: - pulumi.set(__self__, "failback", failback) + _setter("failback", failback) if host_system_id is not None: - pulumi.set(__self__, "host_system_id", host_system_id) + _setter("host_system_id", host_system_id) if link_discovery_operation is not None: - pulumi.set(__self__, "link_discovery_operation", link_discovery_operation) + _setter("link_discovery_operation", link_discovery_operation) if link_discovery_protocol is not None: - pulumi.set(__self__, "link_discovery_protocol", link_discovery_protocol) + _setter("link_discovery_protocol", link_discovery_protocol) if mtu is not None: - pulumi.set(__self__, "mtu", mtu) + _setter("mtu", mtu) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if network_adapters is not None: - pulumi.set(__self__, "network_adapters", network_adapters) + _setter("network_adapters", network_adapters) if notify_switches is not None: - pulumi.set(__self__, "notify_switches", notify_switches) + _setter("notify_switches", notify_switches) if number_of_ports is not None: - pulumi.set(__self__, "number_of_ports", number_of_ports) + _setter("number_of_ports", number_of_ports) if shaping_average_bandwidth is not None: - pulumi.set(__self__, "shaping_average_bandwidth", shaping_average_bandwidth) + _setter("shaping_average_bandwidth", shaping_average_bandwidth) if shaping_burst_size is not None: - pulumi.set(__self__, "shaping_burst_size", shaping_burst_size) + _setter("shaping_burst_size", shaping_burst_size) if shaping_enabled is not None: - pulumi.set(__self__, "shaping_enabled", shaping_enabled) + _setter("shaping_enabled", shaping_enabled) if shaping_peak_bandwidth is not None: - pulumi.set(__self__, "shaping_peak_bandwidth", shaping_peak_bandwidth) + _setter("shaping_peak_bandwidth", shaping_peak_bandwidth) if standby_nics is not None: - pulumi.set(__self__, "standby_nics", standby_nics) + _setter("standby_nics", standby_nics) if teaming_policy is not None: - pulumi.set(__self__, "teaming_policy", teaming_policy) + _setter("teaming_policy", teaming_policy) @property @pulumi.getter(name="activeNics") @@ -922,6 +1102,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + HostVirtualSwitchArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/license.py b/sdk/python/pulumi_vsphere/license.py index 0c8e8ef4..d8ca492a 100644 --- a/sdk/python/pulumi_vsphere/license.py +++ b/sdk/python/pulumi_vsphere/license.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['LicenseArgs', 'License'] @@ -21,9 +21,26 @@ def __init__(__self__, *, :param pulumi.Input[str] license_key: The license key to add. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: A map of key/value pairs to be attached as labels (tags) to the license key. """ - pulumi.set(__self__, "license_key", license_key) + LicenseArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + license_key=license_key, + labels=labels, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + license_key: Optional[pulumi.Input[str]] = None, + labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if license_key is None and 'licenseKey' in kwargs: + license_key = kwargs['licenseKey'] + if license_key is None: + raise TypeError("Missing 'license_key' argument") + + _setter("license_key", license_key) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) @property @pulumi.getter(name="licenseKey") @@ -68,18 +85,43 @@ def __init__(__self__, *, :param pulumi.Input[int] total: Total number of units (example: CPUs) contained in the license. :param pulumi.Input[int] used: The number of units (example: CPUs) assigned to this license. """ + _LicenseState._configure( + lambda key, value: pulumi.set(__self__, key, value), + edition_key=edition_key, + labels=labels, + license_key=license_key, + name=name, + total=total, + used=used, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + edition_key: Optional[pulumi.Input[str]] = None, + labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + license_key: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + total: Optional[pulumi.Input[int]] = None, + used: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if edition_key is None and 'editionKey' in kwargs: + edition_key = kwargs['editionKey'] + if license_key is None and 'licenseKey' in kwargs: + license_key = kwargs['licenseKey'] + if edition_key is not None: - pulumi.set(__self__, "edition_key", edition_key) + _setter("edition_key", edition_key) if labels is not None: - pulumi.set(__self__, "labels", labels) + _setter("labels", labels) if license_key is not None: - pulumi.set(__self__, "license_key", license_key) + _setter("license_key", license_key) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if total is not None: - pulumi.set(__self__, "total", total) + _setter("total", total) if used is not None: - pulumi.set(__self__, "used", used) + _setter("used", used) @property @pulumi.getter(name="editionKey") @@ -217,6 +259,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + LicenseArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/nas_datastore.py b/sdk/python/pulumi_vsphere/nas_datastore.py index 76293c20..3666ceb4 100644 --- a/sdk/python/pulumi_vsphere/nas_datastore.py +++ b/sdk/python/pulumi_vsphere/nas_datastore.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['NasDatastoreArgs', 'NasDatastore'] @@ -66,25 +66,76 @@ def __init__(__self__, *, v3) or `NFS41` (to denote NFS v4.1). Default: `NFS`. Forces a new resource if changed. """ - pulumi.set(__self__, "host_system_ids", host_system_ids) - pulumi.set(__self__, "remote_hosts", remote_hosts) - pulumi.set(__self__, "remote_path", remote_path) + NasDatastoreArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_system_ids=host_system_ids, + remote_hosts=remote_hosts, + remote_path=remote_path, + access_mode=access_mode, + custom_attributes=custom_attributes, + datastore_cluster_id=datastore_cluster_id, + folder=folder, + name=name, + security_type=security_type, + tags=tags, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_system_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + remote_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + remote_path: Optional[pulumi.Input[str]] = None, + access_mode: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datastore_cluster_id: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + security_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_system_ids is None and 'hostSystemIds' in kwargs: + host_system_ids = kwargs['hostSystemIds'] + if host_system_ids is None: + raise TypeError("Missing 'host_system_ids' argument") + if remote_hosts is None and 'remoteHosts' in kwargs: + remote_hosts = kwargs['remoteHosts'] + if remote_hosts is None: + raise TypeError("Missing 'remote_hosts' argument") + if remote_path is None and 'remotePath' in kwargs: + remote_path = kwargs['remotePath'] + if remote_path is None: + raise TypeError("Missing 'remote_path' argument") + if access_mode is None and 'accessMode' in kwargs: + access_mode = kwargs['accessMode'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if datastore_cluster_id is None and 'datastoreClusterId' in kwargs: + datastore_cluster_id = kwargs['datastoreClusterId'] + if security_type is None and 'securityType' in kwargs: + security_type = kwargs['securityType'] + + _setter("host_system_ids", host_system_ids) + _setter("remote_hosts", remote_hosts) + _setter("remote_path", remote_path) if access_mode is not None: - pulumi.set(__self__, "access_mode", access_mode) + _setter("access_mode", access_mode) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datastore_cluster_id is not None: - pulumi.set(__self__, "datastore_cluster_id", datastore_cluster_id) + _setter("datastore_cluster_id", datastore_cluster_id) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if security_type is not None: - pulumi.set(__self__, "security_type", security_type) + _setter("security_type", security_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter(name="hostSystemIds") @@ -321,44 +372,115 @@ def __init__(__self__, *, potentially used by all virtual machines on this datastore. :param pulumi.Input[str] url: The unique locator for the datastore. """ + _NasDatastoreState._configure( + lambda key, value: pulumi.set(__self__, key, value), + access_mode=access_mode, + accessible=accessible, + capacity=capacity, + custom_attributes=custom_attributes, + datastore_cluster_id=datastore_cluster_id, + folder=folder, + free_space=free_space, + host_system_ids=host_system_ids, + maintenance_mode=maintenance_mode, + multiple_host_access=multiple_host_access, + name=name, + protocol_endpoint=protocol_endpoint, + remote_hosts=remote_hosts, + remote_path=remote_path, + security_type=security_type, + tags=tags, + type=type, + uncommitted_space=uncommitted_space, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + access_mode: Optional[pulumi.Input[str]] = None, + accessible: Optional[pulumi.Input[bool]] = None, + capacity: Optional[pulumi.Input[int]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datastore_cluster_id: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + free_space: Optional[pulumi.Input[int]] = None, + host_system_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + maintenance_mode: Optional[pulumi.Input[str]] = None, + multiple_host_access: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + protocol_endpoint: Optional[pulumi.Input[bool]] = None, + remote_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + remote_path: Optional[pulumi.Input[str]] = None, + security_type: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + type: Optional[pulumi.Input[str]] = None, + uncommitted_space: Optional[pulumi.Input[int]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if access_mode is None and 'accessMode' in kwargs: + access_mode = kwargs['accessMode'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if datastore_cluster_id is None and 'datastoreClusterId' in kwargs: + datastore_cluster_id = kwargs['datastoreClusterId'] + if free_space is None and 'freeSpace' in kwargs: + free_space = kwargs['freeSpace'] + if host_system_ids is None and 'hostSystemIds' in kwargs: + host_system_ids = kwargs['hostSystemIds'] + if maintenance_mode is None and 'maintenanceMode' in kwargs: + maintenance_mode = kwargs['maintenanceMode'] + if multiple_host_access is None and 'multipleHostAccess' in kwargs: + multiple_host_access = kwargs['multipleHostAccess'] + if protocol_endpoint is None and 'protocolEndpoint' in kwargs: + protocol_endpoint = kwargs['protocolEndpoint'] + if remote_hosts is None and 'remoteHosts' in kwargs: + remote_hosts = kwargs['remoteHosts'] + if remote_path is None and 'remotePath' in kwargs: + remote_path = kwargs['remotePath'] + if security_type is None and 'securityType' in kwargs: + security_type = kwargs['securityType'] + if uncommitted_space is None and 'uncommittedSpace' in kwargs: + uncommitted_space = kwargs['uncommittedSpace'] + if access_mode is not None: - pulumi.set(__self__, "access_mode", access_mode) + _setter("access_mode", access_mode) if accessible is not None: - pulumi.set(__self__, "accessible", accessible) + _setter("accessible", accessible) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datastore_cluster_id is not None: - pulumi.set(__self__, "datastore_cluster_id", datastore_cluster_id) + _setter("datastore_cluster_id", datastore_cluster_id) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if free_space is not None: - pulumi.set(__self__, "free_space", free_space) + _setter("free_space", free_space) if host_system_ids is not None: - pulumi.set(__self__, "host_system_ids", host_system_ids) + _setter("host_system_ids", host_system_ids) if maintenance_mode is not None: - pulumi.set(__self__, "maintenance_mode", maintenance_mode) + _setter("maintenance_mode", maintenance_mode) if multiple_host_access is not None: - pulumi.set(__self__, "multiple_host_access", multiple_host_access) + _setter("multiple_host_access", multiple_host_access) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if protocol_endpoint is not None: - pulumi.set(__self__, "protocol_endpoint", protocol_endpoint) + _setter("protocol_endpoint", protocol_endpoint) if remote_hosts is not None: - pulumi.set(__self__, "remote_hosts", remote_hosts) + _setter("remote_hosts", remote_hosts) if remote_path is not None: - pulumi.set(__self__, "remote_path", remote_path) + _setter("remote_path", remote_path) if security_type is not None: - pulumi.set(__self__, "security_type", security_type) + _setter("security_type", security_type) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if uncommitted_space is not None: - pulumi.set(__self__, "uncommitted_space", uncommitted_space) + _setter("uncommitted_space", uncommitted_space) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter(name="accessMode") @@ -698,6 +820,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + NasDatastoreArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/outputs.py b/sdk/python/pulumi_vsphere/outputs.py index e91481a9..b7ef5edf 100644 --- a/sdk/python/pulumi_vsphere/outputs.py +++ b/sdk/python/pulumi_vsphere/outputs.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs @@ -75,10 +75,23 @@ def __init__(__self__, *, )]) ``` """ + ComputeClusterVsanDiskGroup._configure( + lambda key, value: pulumi.set(__self__, key, value), + cache=cache, + storages=storages, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cache: Optional[str] = None, + storages: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cache is not None: - pulumi.set(__self__, "cache", cache) + _setter("cache", cache) if storages is not None: - pulumi.set(__self__, "storages", storages) + _setter("storages", storages) @property @pulumi.getter @@ -159,16 +172,39 @@ def __init__(__self__, *, :param bool published: Publish the content library. Default `false`. :param str username: Username used for authentication. """ + ContentLibraryPublication._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_method=authentication_method, + password=password, + publish_url=publish_url, + published=published, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_method: Optional[str] = None, + password: Optional[str] = None, + publish_url: Optional[str] = None, + published: Optional[bool] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_method is None and 'authenticationMethod' in kwargs: + authentication_method = kwargs['authenticationMethod'] + if publish_url is None and 'publishUrl' in kwargs: + publish_url = kwargs['publishUrl'] + if authentication_method is not None: - pulumi.set(__self__, "authentication_method", authentication_method) + _setter("authentication_method", authentication_method) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if publish_url is not None: - pulumi.set(__self__, "publish_url", publish_url) + _setter("publish_url", publish_url) if published is not None: - pulumi.set(__self__, "published", published) + _setter("published", published) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="authenticationMethod") @@ -251,18 +287,47 @@ def __init__(__self__, *, :param str subscription_url: URL of the published content library. :param str username: Username used for authentication. """ + ContentLibrarySubscription._configure( + lambda key, value: pulumi.set(__self__, key, value), + authentication_method=authentication_method, + automatic_sync=automatic_sync, + on_demand=on_demand, + password=password, + subscription_url=subscription_url, + username=username, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + authentication_method: Optional[str] = None, + automatic_sync: Optional[bool] = None, + on_demand: Optional[bool] = None, + password: Optional[str] = None, + subscription_url: Optional[str] = None, + username: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if authentication_method is None and 'authenticationMethod' in kwargs: + authentication_method = kwargs['authenticationMethod'] + if automatic_sync is None and 'automaticSync' in kwargs: + automatic_sync = kwargs['automaticSync'] + if on_demand is None and 'onDemand' in kwargs: + on_demand = kwargs['onDemand'] + if subscription_url is None and 'subscriptionUrl' in kwargs: + subscription_url = kwargs['subscriptionUrl'] + if authentication_method is not None: - pulumi.set(__self__, "authentication_method", authentication_method) + _setter("authentication_method", authentication_method) if automatic_sync is not None: - pulumi.set(__self__, "automatic_sync", automatic_sync) + _setter("automatic_sync", automatic_sync) if on_demand is not None: - pulumi.set(__self__, "on_demand", on_demand) + _setter("on_demand", on_demand) if password is not None: - pulumi.set(__self__, "password", password) + _setter("password", password) if subscription_url is not None: - pulumi.set(__self__, "subscription_url", subscription_url) + _setter("subscription_url", subscription_url) if username is not None: - pulumi.set(__self__, "username", username) + _setter("username", username) @property @pulumi.getter(name="authenticationMethod") @@ -337,8 +402,29 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, max_vlan: int, min_vlan: int): - pulumi.set(__self__, "max_vlan", max_vlan) - pulumi.set(__self__, "min_vlan", min_vlan) + DistributedPortGroupVlanRange._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_vlan=max_vlan, + min_vlan=min_vlan, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_vlan: Optional[int] = None, + min_vlan: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_vlan is None and 'maxVlan' in kwargs: + max_vlan = kwargs['maxVlan'] + if max_vlan is None: + raise TypeError("Missing 'max_vlan' argument") + if min_vlan is None and 'minVlan' in kwargs: + min_vlan = kwargs['minVlan'] + if min_vlan is None: + raise TypeError("Missing 'min_vlan' argument") + + _setter("max_vlan", max_vlan) + _setter("min_vlan", min_vlan) @property @pulumi.getter(name="maxVlan") @@ -379,9 +465,26 @@ def __init__(__self__, *, :param Sequence[str] devices: The list of NIC devices to map to uplinks on the VDS, added in order they are specified. """ - pulumi.set(__self__, "host_system_id", host_system_id) + DistributedVirtualSwitchHost._configure( + lambda key, value: pulumi.set(__self__, key, value), + host_system_id=host_system_id, + devices=devices, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host_system_id: Optional[str] = None, + devices: Optional[Sequence[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if host_system_id is None: + raise TypeError("Missing 'host_system_id' argument") + + _setter("host_system_id", host_system_id) if devices is not None: - pulumi.set(__self__, "devices", devices) + _setter("devices", devices) @property @pulumi.getter(name="hostSystemId") @@ -437,9 +540,36 @@ def __init__(__self__, *, :param int secondary_vlan_id: The secondary VLAN ID. The VLAN IDs of 0 and 4095 are reserved and cannot be used in this property. """ - pulumi.set(__self__, "primary_vlan_id", primary_vlan_id) - pulumi.set(__self__, "pvlan_type", pvlan_type) - pulumi.set(__self__, "secondary_vlan_id", secondary_vlan_id) + DistributedVirtualSwitchPvlanMapping._configure( + lambda key, value: pulumi.set(__self__, key, value), + primary_vlan_id=primary_vlan_id, + pvlan_type=pvlan_type, + secondary_vlan_id=secondary_vlan_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + primary_vlan_id: Optional[int] = None, + pvlan_type: Optional[str] = None, + secondary_vlan_id: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if primary_vlan_id is None and 'primaryVlanId' in kwargs: + primary_vlan_id = kwargs['primaryVlanId'] + if primary_vlan_id is None: + raise TypeError("Missing 'primary_vlan_id' argument") + if pvlan_type is None and 'pvlanType' in kwargs: + pvlan_type = kwargs['pvlanType'] + if pvlan_type is None: + raise TypeError("Missing 'pvlan_type' argument") + if secondary_vlan_id is None and 'secondaryVlanId' in kwargs: + secondary_vlan_id = kwargs['secondaryVlanId'] + if secondary_vlan_id is None: + raise TypeError("Missing 'secondary_vlan_id' argument") + + _setter("primary_vlan_id", primary_vlan_id) + _setter("pvlan_type", pvlan_type) + _setter("secondary_vlan_id", secondary_vlan_id) @property @pulumi.getter(name="primaryVlanId") @@ -493,8 +623,29 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, max_vlan: int, min_vlan: int): - pulumi.set(__self__, "max_vlan", max_vlan) - pulumi.set(__self__, "min_vlan", min_vlan) + DistributedVirtualSwitchVlanRange._configure( + lambda key, value: pulumi.set(__self__, key, value), + max_vlan=max_vlan, + min_vlan=min_vlan, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + max_vlan: Optional[int] = None, + min_vlan: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if max_vlan is None and 'maxVlan' in kwargs: + max_vlan = kwargs['maxVlan'] + if max_vlan is None: + raise TypeError("Missing 'max_vlan' argument") + if min_vlan is None and 'minVlan' in kwargs: + min_vlan = kwargs['minVlan'] + if min_vlan is None: + raise TypeError("Missing 'min_vlan' argument") + + _setter("max_vlan", max_vlan) + _setter("min_vlan", min_vlan) @property @pulumi.getter(name="maxVlan") @@ -541,10 +692,41 @@ def __init__(__self__, *, :param str role_id: The role id of the role to be given to the user on the specified entity. :param str user_or_group: The user/group getting the permission. """ - pulumi.set(__self__, "is_group", is_group) - pulumi.set(__self__, "propagate", propagate) - pulumi.set(__self__, "role_id", role_id) - pulumi.set(__self__, "user_or_group", user_or_group) + EntityPermissionsPermission._configure( + lambda key, value: pulumi.set(__self__, key, value), + is_group=is_group, + propagate=propagate, + role_id=role_id, + user_or_group=user_or_group, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + is_group: Optional[bool] = None, + propagate: Optional[bool] = None, + role_id: Optional[str] = None, + user_or_group: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if is_group is None and 'isGroup' in kwargs: + is_group = kwargs['isGroup'] + if is_group is None: + raise TypeError("Missing 'is_group' argument") + if propagate is None: + raise TypeError("Missing 'propagate' argument") + if role_id is None and 'roleId' in kwargs: + role_id = kwargs['roleId'] + if role_id is None: + raise TypeError("Missing 'role_id' argument") + if user_or_group is None and 'userOrGroup' in kwargs: + user_or_group = kwargs['userOrGroup'] + if user_or_group is None: + raise TypeError("Missing 'user_or_group' argument") + + _setter("is_group", is_group) + _setter("propagate", propagate) + _setter("role_id", role_id) + _setter("user_or_group", user_or_group) @property @pulumi.getter(name="isGroup") @@ -605,12 +787,29 @@ def __init__(__self__, *, """ :param str key: The key for this port group as returned from the vSphere API. """ + HostPortGroupPort._configure( + lambda key, value: pulumi.set(__self__, key, value), + key=key, + mac_addresses=mac_addresses, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + key: Optional[str] = None, + mac_addresses: Optional[Sequence[str]] = None, + type: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if mac_addresses is None and 'macAddresses' in kwargs: + mac_addresses = kwargs['macAddresses'] + if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if mac_addresses is not None: - pulumi.set(__self__, "mac_addresses", mac_addresses) + _setter("mac_addresses", mac_addresses) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -670,16 +869,41 @@ def __init__(__self__, *, > **NOTE:** Some CD-ROM drive types are not supported by this resource, such as pass-through devices. If these drives are present in a cloned template, or added outside of the provider, the desired state will be corrected to the defined device, or removed if no `cdrom` block is present. """ + VirtualMachineCdrom._configure( + lambda key, value: pulumi.set(__self__, key, value), + client_device=client_device, + datastore_id=datastore_id, + device_address=device_address, + key=key, + path=path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + client_device: Optional[bool] = None, + datastore_id: Optional[str] = None, + device_address: Optional[str] = None, + key: Optional[int] = None, + path: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if client_device is None and 'clientDevice' in kwargs: + client_device = kwargs['clientDevice'] + if datastore_id is None and 'datastoreId' in kwargs: + datastore_id = kwargs['datastoreId'] + if device_address is None and 'deviceAddress' in kwargs: + device_address = kwargs['deviceAddress'] + if client_device is not None: - pulumi.set(__self__, "client_device", client_device) + _setter("client_device", client_device) if datastore_id is not None: - pulumi.set(__self__, "datastore_id", datastore_id) + _setter("datastore_id", datastore_id) if device_address is not None: - pulumi.set(__self__, "device_address", device_address) + _setter("device_address", device_address) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) @property @pulumi.getter(name="clientDevice") @@ -755,17 +979,48 @@ def __init__(__self__, *, ovf_network_map: Optional[Mapping[str, str]] = None, ovf_storage_map: Optional[Mapping[str, str]] = None, timeout: Optional[int] = None): - pulumi.set(__self__, "template_uuid", template_uuid) + VirtualMachineClone._configure( + lambda key, value: pulumi.set(__self__, key, value), + template_uuid=template_uuid, + customize=customize, + linked_clone=linked_clone, + ovf_network_map=ovf_network_map, + ovf_storage_map=ovf_storage_map, + timeout=timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + template_uuid: Optional[str] = None, + customize: Optional['outputs.VirtualMachineCloneCustomize'] = None, + linked_clone: Optional[bool] = None, + ovf_network_map: Optional[Mapping[str, str]] = None, + ovf_storage_map: Optional[Mapping[str, str]] = None, + timeout: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if template_uuid is None and 'templateUuid' in kwargs: + template_uuid = kwargs['templateUuid'] + if template_uuid is None: + raise TypeError("Missing 'template_uuid' argument") + if linked_clone is None and 'linkedClone' in kwargs: + linked_clone = kwargs['linkedClone'] + if ovf_network_map is None and 'ovfNetworkMap' in kwargs: + ovf_network_map = kwargs['ovfNetworkMap'] + if ovf_storage_map is None and 'ovfStorageMap' in kwargs: + ovf_storage_map = kwargs['ovfStorageMap'] + + _setter("template_uuid", template_uuid) if customize is not None: - pulumi.set(__self__, "customize", customize) + _setter("customize", customize) if linked_clone is not None: - pulumi.set(__self__, "linked_clone", linked_clone) + _setter("linked_clone", linked_clone) if ovf_network_map is not None: - pulumi.set(__self__, "ovf_network_map", ovf_network_map) + _setter("ovf_network_map", ovf_network_map) if ovf_storage_map is not None: - pulumi.set(__self__, "ovf_storage_map", ovf_storage_map) + _setter("ovf_storage_map", ovf_storage_map) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) @property @pulumi.getter(name="templateUuid") @@ -844,24 +1099,67 @@ def __init__(__self__, *, """ :param Sequence['VirtualMachineCloneCustomizeNetworkInterfaceArgs'] network_interfaces: A specification for a virtual NIC on the virtual machine. See network interface options for more information. """ + VirtualMachineCloneCustomize._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_server_lists=dns_server_lists, + dns_suffix_lists=dns_suffix_lists, + ipv4_gateway=ipv4_gateway, + ipv6_gateway=ipv6_gateway, + linux_options=linux_options, + network_interfaces=network_interfaces, + timeout=timeout, + windows_options=windows_options, + windows_sysprep_text=windows_sysprep_text, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_server_lists: Optional[Sequence[str]] = None, + dns_suffix_lists: Optional[Sequence[str]] = None, + ipv4_gateway: Optional[str] = None, + ipv6_gateway: Optional[str] = None, + linux_options: Optional['outputs.VirtualMachineCloneCustomizeLinuxOptions'] = None, + network_interfaces: Optional[Sequence['outputs.VirtualMachineCloneCustomizeNetworkInterface']] = None, + timeout: Optional[int] = None, + windows_options: Optional['outputs.VirtualMachineCloneCustomizeWindowsOptions'] = None, + windows_sysprep_text: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_server_lists is None and 'dnsServerLists' in kwargs: + dns_server_lists = kwargs['dnsServerLists'] + if dns_suffix_lists is None and 'dnsSuffixLists' in kwargs: + dns_suffix_lists = kwargs['dnsSuffixLists'] + if ipv4_gateway is None and 'ipv4Gateway' in kwargs: + ipv4_gateway = kwargs['ipv4Gateway'] + if ipv6_gateway is None and 'ipv6Gateway' in kwargs: + ipv6_gateway = kwargs['ipv6Gateway'] + if linux_options is None and 'linuxOptions' in kwargs: + linux_options = kwargs['linuxOptions'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if windows_options is None and 'windowsOptions' in kwargs: + windows_options = kwargs['windowsOptions'] + if windows_sysprep_text is None and 'windowsSysprepText' in kwargs: + windows_sysprep_text = kwargs['windowsSysprepText'] + if dns_server_lists is not None: - pulumi.set(__self__, "dns_server_lists", dns_server_lists) + _setter("dns_server_lists", dns_server_lists) if dns_suffix_lists is not None: - pulumi.set(__self__, "dns_suffix_lists", dns_suffix_lists) + _setter("dns_suffix_lists", dns_suffix_lists) if ipv4_gateway is not None: - pulumi.set(__self__, "ipv4_gateway", ipv4_gateway) + _setter("ipv4_gateway", ipv4_gateway) if ipv6_gateway is not None: - pulumi.set(__self__, "ipv6_gateway", ipv6_gateway) + _setter("ipv6_gateway", ipv6_gateway) if linux_options is not None: - pulumi.set(__self__, "linux_options", linux_options) + _setter("linux_options", linux_options) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if timeout is not None: - pulumi.set(__self__, "timeout", timeout) + _setter("timeout", timeout) if windows_options is not None: - pulumi.set(__self__, "windows_options", windows_options) + _setter("windows_options", windows_options) if windows_sysprep_text is not None: - pulumi.set(__self__, "windows_sysprep_text", windows_sysprep_text) + _setter("windows_sysprep_text", windows_sysprep_text) @property @pulumi.getter(name="dnsServerLists") @@ -943,14 +1241,45 @@ def __init__(__self__, *, hw_clock_utc: Optional[bool] = None, script_text: Optional[str] = None, time_zone: Optional[str] = None): - pulumi.set(__self__, "domain", domain) - pulumi.set(__self__, "host_name", host_name) + VirtualMachineCloneCustomizeLinuxOptions._configure( + lambda key, value: pulumi.set(__self__, key, value), + domain=domain, + host_name=host_name, + hw_clock_utc=hw_clock_utc, + script_text=script_text, + time_zone=time_zone, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + domain: Optional[str] = None, + host_name: Optional[str] = None, + hw_clock_utc: Optional[bool] = None, + script_text: Optional[str] = None, + time_zone: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if domain is None: + raise TypeError("Missing 'domain' argument") + if host_name is None and 'hostName' in kwargs: + host_name = kwargs['hostName'] + if host_name is None: + raise TypeError("Missing 'host_name' argument") + if hw_clock_utc is None and 'hwClockUtc' in kwargs: + hw_clock_utc = kwargs['hwClockUtc'] + if script_text is None and 'scriptText' in kwargs: + script_text = kwargs['scriptText'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + + _setter("domain", domain) + _setter("host_name", host_name) if hw_clock_utc is not None: - pulumi.set(__self__, "hw_clock_utc", hw_clock_utc) + _setter("hw_clock_utc", hw_clock_utc) if script_text is not None: - pulumi.set(__self__, "script_text", script_text) + _setter("script_text", script_text) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) @property @pulumi.getter @@ -1014,18 +1343,51 @@ def __init__(__self__, *, ipv4_netmask: Optional[int] = None, ipv6_address: Optional[str] = None, ipv6_netmask: Optional[int] = None): + VirtualMachineCloneCustomizeNetworkInterface._configure( + lambda key, value: pulumi.set(__self__, key, value), + dns_domain=dns_domain, + dns_server_lists=dns_server_lists, + ipv4_address=ipv4_address, + ipv4_netmask=ipv4_netmask, + ipv6_address=ipv6_address, + ipv6_netmask=ipv6_netmask, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dns_domain: Optional[str] = None, + dns_server_lists: Optional[Sequence[str]] = None, + ipv4_address: Optional[str] = None, + ipv4_netmask: Optional[int] = None, + ipv6_address: Optional[str] = None, + ipv6_netmask: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dns_domain is None and 'dnsDomain' in kwargs: + dns_domain = kwargs['dnsDomain'] + if dns_server_lists is None and 'dnsServerLists' in kwargs: + dns_server_lists = kwargs['dnsServerLists'] + if ipv4_address is None and 'ipv4Address' in kwargs: + ipv4_address = kwargs['ipv4Address'] + if ipv4_netmask is None and 'ipv4Netmask' in kwargs: + ipv4_netmask = kwargs['ipv4Netmask'] + if ipv6_address is None and 'ipv6Address' in kwargs: + ipv6_address = kwargs['ipv6Address'] + if ipv6_netmask is None and 'ipv6Netmask' in kwargs: + ipv6_netmask = kwargs['ipv6Netmask'] + if dns_domain is not None: - pulumi.set(__self__, "dns_domain", dns_domain) + _setter("dns_domain", dns_domain) if dns_server_lists is not None: - pulumi.set(__self__, "dns_server_lists", dns_server_lists) + _setter("dns_server_lists", dns_server_lists) if ipv4_address is not None: - pulumi.set(__self__, "ipv4_address", ipv4_address) + _setter("ipv4_address", ipv4_address) if ipv4_netmask is not None: - pulumi.set(__self__, "ipv4_netmask", ipv4_netmask) + _setter("ipv4_netmask", ipv4_netmask) if ipv6_address is not None: - pulumi.set(__self__, "ipv6_address", ipv6_address) + _setter("ipv6_address", ipv6_address) if ipv6_netmask is not None: - pulumi.set(__self__, "ipv6_netmask", ipv6_netmask) + _setter("ipv6_netmask", ipv6_netmask) @property @pulumi.getter(name="dnsDomain") @@ -1113,31 +1475,92 @@ def __init__(__self__, *, run_once_command_lists: Optional[Sequence[str]] = None, time_zone: Optional[int] = None, workgroup: Optional[str] = None): - pulumi.set(__self__, "computer_name", computer_name) + VirtualMachineCloneCustomizeWindowsOptions._configure( + lambda key, value: pulumi.set(__self__, key, value), + computer_name=computer_name, + admin_password=admin_password, + auto_logon=auto_logon, + auto_logon_count=auto_logon_count, + domain_admin_password=domain_admin_password, + domain_admin_user=domain_admin_user, + full_name=full_name, + join_domain=join_domain, + organization_name=organization_name, + product_key=product_key, + run_once_command_lists=run_once_command_lists, + time_zone=time_zone, + workgroup=workgroup, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + computer_name: Optional[str] = None, + admin_password: Optional[str] = None, + auto_logon: Optional[bool] = None, + auto_logon_count: Optional[int] = None, + domain_admin_password: Optional[str] = None, + domain_admin_user: Optional[str] = None, + full_name: Optional[str] = None, + join_domain: Optional[str] = None, + organization_name: Optional[str] = None, + product_key: Optional[str] = None, + run_once_command_lists: Optional[Sequence[str]] = None, + time_zone: Optional[int] = None, + workgroup: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if computer_name is None and 'computerName' in kwargs: + computer_name = kwargs['computerName'] + if computer_name is None: + raise TypeError("Missing 'computer_name' argument") + if admin_password is None and 'adminPassword' in kwargs: + admin_password = kwargs['adminPassword'] + if auto_logon is None and 'autoLogon' in kwargs: + auto_logon = kwargs['autoLogon'] + if auto_logon_count is None and 'autoLogonCount' in kwargs: + auto_logon_count = kwargs['autoLogonCount'] + if domain_admin_password is None and 'domainAdminPassword' in kwargs: + domain_admin_password = kwargs['domainAdminPassword'] + if domain_admin_user is None and 'domainAdminUser' in kwargs: + domain_admin_user = kwargs['domainAdminUser'] + if full_name is None and 'fullName' in kwargs: + full_name = kwargs['fullName'] + if join_domain is None and 'joinDomain' in kwargs: + join_domain = kwargs['joinDomain'] + if organization_name is None and 'organizationName' in kwargs: + organization_name = kwargs['organizationName'] + if product_key is None and 'productKey' in kwargs: + product_key = kwargs['productKey'] + if run_once_command_lists is None and 'runOnceCommandLists' in kwargs: + run_once_command_lists = kwargs['runOnceCommandLists'] + if time_zone is None and 'timeZone' in kwargs: + time_zone = kwargs['timeZone'] + + _setter("computer_name", computer_name) if admin_password is not None: - pulumi.set(__self__, "admin_password", admin_password) + _setter("admin_password", admin_password) if auto_logon is not None: - pulumi.set(__self__, "auto_logon", auto_logon) + _setter("auto_logon", auto_logon) if auto_logon_count is not None: - pulumi.set(__self__, "auto_logon_count", auto_logon_count) + _setter("auto_logon_count", auto_logon_count) if domain_admin_password is not None: - pulumi.set(__self__, "domain_admin_password", domain_admin_password) + _setter("domain_admin_password", domain_admin_password) if domain_admin_user is not None: - pulumi.set(__self__, "domain_admin_user", domain_admin_user) + _setter("domain_admin_user", domain_admin_user) if full_name is not None: - pulumi.set(__self__, "full_name", full_name) + _setter("full_name", full_name) if join_domain is not None: - pulumi.set(__self__, "join_domain", join_domain) + _setter("join_domain", join_domain) if organization_name is not None: - pulumi.set(__self__, "organization_name", organization_name) + _setter("organization_name", organization_name) if product_key is not None: - pulumi.set(__self__, "product_key", product_key) + _setter("product_key", product_key) if run_once_command_lists is not None: - pulumi.set(__self__, "run_once_command_lists", run_once_command_lists) + _setter("run_once_command_lists", run_once_command_lists) if time_zone is not None: - pulumi.set(__self__, "time_zone", time_zone) + _setter("time_zone", time_zone) if workgroup is not None: - pulumi.set(__self__, "workgroup", workgroup) + _setter("workgroup", workgroup) @property @pulumi.getter(name="computerName") @@ -1305,47 +1728,130 @@ def __init__(__self__, *, :param str uuid: The UUID of the virtual disk VMDK file. This is used to track the virtual disk on the virtual machine. :param bool write_through: If `true`, writes for this disk are sent directly to the filesystem immediately instead of being buffered. Default: `false`. """ - pulumi.set(__self__, "label", label) + VirtualMachineDisk._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + attach=attach, + controller_type=controller_type, + datastore_id=datastore_id, + device_address=device_address, + disk_mode=disk_mode, + disk_sharing=disk_sharing, + eagerly_scrub=eagerly_scrub, + io_limit=io_limit, + io_reservation=io_reservation, + io_share_count=io_share_count, + io_share_level=io_share_level, + keep_on_remove=keep_on_remove, + key=key, + path=path, + size=size, + storage_policy_id=storage_policy_id, + thin_provisioned=thin_provisioned, + unit_number=unit_number, + uuid=uuid, + write_through=write_through, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[str] = None, + attach: Optional[bool] = None, + controller_type: Optional[str] = None, + datastore_id: Optional[str] = None, + device_address: Optional[str] = None, + disk_mode: Optional[str] = None, + disk_sharing: Optional[str] = None, + eagerly_scrub: Optional[bool] = None, + io_limit: Optional[int] = None, + io_reservation: Optional[int] = None, + io_share_count: Optional[int] = None, + io_share_level: Optional[str] = None, + keep_on_remove: Optional[bool] = None, + key: Optional[int] = None, + path: Optional[str] = None, + size: Optional[int] = None, + storage_policy_id: Optional[str] = None, + thin_provisioned: Optional[bool] = None, + unit_number: Optional[int] = None, + uuid: Optional[str] = None, + write_through: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if label is None: + raise TypeError("Missing 'label' argument") + if controller_type is None and 'controllerType' in kwargs: + controller_type = kwargs['controllerType'] + if datastore_id is None and 'datastoreId' in kwargs: + datastore_id = kwargs['datastoreId'] + if device_address is None and 'deviceAddress' in kwargs: + device_address = kwargs['deviceAddress'] + if disk_mode is None and 'diskMode' in kwargs: + disk_mode = kwargs['diskMode'] + if disk_sharing is None and 'diskSharing' in kwargs: + disk_sharing = kwargs['diskSharing'] + if eagerly_scrub is None and 'eagerlyScrub' in kwargs: + eagerly_scrub = kwargs['eagerlyScrub'] + if io_limit is None and 'ioLimit' in kwargs: + io_limit = kwargs['ioLimit'] + if io_reservation is None and 'ioReservation' in kwargs: + io_reservation = kwargs['ioReservation'] + if io_share_count is None and 'ioShareCount' in kwargs: + io_share_count = kwargs['ioShareCount'] + if io_share_level is None and 'ioShareLevel' in kwargs: + io_share_level = kwargs['ioShareLevel'] + if keep_on_remove is None and 'keepOnRemove' in kwargs: + keep_on_remove = kwargs['keepOnRemove'] + if storage_policy_id is None and 'storagePolicyId' in kwargs: + storage_policy_id = kwargs['storagePolicyId'] + if thin_provisioned is None and 'thinProvisioned' in kwargs: + thin_provisioned = kwargs['thinProvisioned'] + if unit_number is None and 'unitNumber' in kwargs: + unit_number = kwargs['unitNumber'] + if write_through is None and 'writeThrough' in kwargs: + write_through = kwargs['writeThrough'] + + _setter("label", label) if attach is not None: - pulumi.set(__self__, "attach", attach) + _setter("attach", attach) if controller_type is not None: - pulumi.set(__self__, "controller_type", controller_type) + _setter("controller_type", controller_type) if datastore_id is not None: - pulumi.set(__self__, "datastore_id", datastore_id) + _setter("datastore_id", datastore_id) if device_address is not None: - pulumi.set(__self__, "device_address", device_address) + _setter("device_address", device_address) if disk_mode is not None: - pulumi.set(__self__, "disk_mode", disk_mode) + _setter("disk_mode", disk_mode) if disk_sharing is not None: - pulumi.set(__self__, "disk_sharing", disk_sharing) + _setter("disk_sharing", disk_sharing) if eagerly_scrub is not None: - pulumi.set(__self__, "eagerly_scrub", eagerly_scrub) + _setter("eagerly_scrub", eagerly_scrub) if io_limit is not None: - pulumi.set(__self__, "io_limit", io_limit) + _setter("io_limit", io_limit) if io_reservation is not None: - pulumi.set(__self__, "io_reservation", io_reservation) + _setter("io_reservation", io_reservation) if io_share_count is not None: - pulumi.set(__self__, "io_share_count", io_share_count) + _setter("io_share_count", io_share_count) if io_share_level is not None: - pulumi.set(__self__, "io_share_level", io_share_level) + _setter("io_share_level", io_share_level) if keep_on_remove is not None: - pulumi.set(__self__, "keep_on_remove", keep_on_remove) + _setter("keep_on_remove", keep_on_remove) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if path is not None: - pulumi.set(__self__, "path", path) + _setter("path", path) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if storage_policy_id is not None: - pulumi.set(__self__, "storage_policy_id", storage_policy_id) + _setter("storage_policy_id", storage_policy_id) if thin_provisioned is not None: - pulumi.set(__self__, "thin_provisioned", thin_provisioned) + _setter("thin_provisioned", thin_provisioned) if unit_number is not None: - pulumi.set(__self__, "unit_number", unit_number) + _setter("unit_number", unit_number) if uuid is not None: - pulumi.set(__self__, "uuid", uuid) + _setter("uuid", uuid) if write_through is not None: - pulumi.set(__self__, "write_through", write_through) + _setter("write_through", write_through) @property @pulumi.getter @@ -1581,27 +2087,80 @@ def __init__(__self__, *, :param str ovf_mapping: Specifies which NIC in an OVF/OVA the `network_interface` should be associated. Only applies at creation when deploying from an OVF/OVA. :param bool use_static_mac: If true, the `mac_address` field is treated as a static MAC address and set accordingly. Setting this to `true` requires `mac_address` to be set. Default: `false`. """ - pulumi.set(__self__, "network_id", network_id) + VirtualMachineNetworkInterface._configure( + lambda key, value: pulumi.set(__self__, key, value), + network_id=network_id, + adapter_type=adapter_type, + bandwidth_limit=bandwidth_limit, + bandwidth_reservation=bandwidth_reservation, + bandwidth_share_count=bandwidth_share_count, + bandwidth_share_level=bandwidth_share_level, + device_address=device_address, + key=key, + mac_address=mac_address, + ovf_mapping=ovf_mapping, + use_static_mac=use_static_mac, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + network_id: Optional[str] = None, + adapter_type: Optional[str] = None, + bandwidth_limit: Optional[int] = None, + bandwidth_reservation: Optional[int] = None, + bandwidth_share_count: Optional[int] = None, + bandwidth_share_level: Optional[str] = None, + device_address: Optional[str] = None, + key: Optional[int] = None, + mac_address: Optional[str] = None, + ovf_mapping: Optional[str] = None, + use_static_mac: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if network_id is None and 'networkId' in kwargs: + network_id = kwargs['networkId'] + if network_id is None: + raise TypeError("Missing 'network_id' argument") + if adapter_type is None and 'adapterType' in kwargs: + adapter_type = kwargs['adapterType'] + if bandwidth_limit is None and 'bandwidthLimit' in kwargs: + bandwidth_limit = kwargs['bandwidthLimit'] + if bandwidth_reservation is None and 'bandwidthReservation' in kwargs: + bandwidth_reservation = kwargs['bandwidthReservation'] + if bandwidth_share_count is None and 'bandwidthShareCount' in kwargs: + bandwidth_share_count = kwargs['bandwidthShareCount'] + if bandwidth_share_level is None and 'bandwidthShareLevel' in kwargs: + bandwidth_share_level = kwargs['bandwidthShareLevel'] + if device_address is None and 'deviceAddress' in kwargs: + device_address = kwargs['deviceAddress'] + if mac_address is None and 'macAddress' in kwargs: + mac_address = kwargs['macAddress'] + if ovf_mapping is None and 'ovfMapping' in kwargs: + ovf_mapping = kwargs['ovfMapping'] + if use_static_mac is None and 'useStaticMac' in kwargs: + use_static_mac = kwargs['useStaticMac'] + + _setter("network_id", network_id) if adapter_type is not None: - pulumi.set(__self__, "adapter_type", adapter_type) + _setter("adapter_type", adapter_type) if bandwidth_limit is not None: - pulumi.set(__self__, "bandwidth_limit", bandwidth_limit) + _setter("bandwidth_limit", bandwidth_limit) if bandwidth_reservation is not None: - pulumi.set(__self__, "bandwidth_reservation", bandwidth_reservation) + _setter("bandwidth_reservation", bandwidth_reservation) if bandwidth_share_count is not None: - pulumi.set(__self__, "bandwidth_share_count", bandwidth_share_count) + _setter("bandwidth_share_count", bandwidth_share_count) if bandwidth_share_level is not None: - pulumi.set(__self__, "bandwidth_share_level", bandwidth_share_level) + _setter("bandwidth_share_level", bandwidth_share_level) if device_address is not None: - pulumi.set(__self__, "device_address", device_address) + _setter("device_address", device_address) if key is not None: - pulumi.set(__self__, "key", key) + _setter("key", key) if mac_address is not None: - pulumi.set(__self__, "mac_address", mac_address) + _setter("mac_address", mac_address) if ovf_mapping is not None: - pulumi.set(__self__, "ovf_mapping", ovf_mapping) + _setter("ovf_mapping", ovf_mapping) if use_static_mac is not None: - pulumi.set(__self__, "use_static_mac", use_static_mac) + _setter("use_static_mac", use_static_mac) @property @pulumi.getter(name="networkId") @@ -1734,24 +2293,69 @@ def __init__(__self__, *, local_ovf_path: Optional[str] = None, ovf_network_map: Optional[Mapping[str, str]] = None, remote_ovf_url: Optional[str] = None): + VirtualMachineOvfDeploy._configure( + lambda key, value: pulumi.set(__self__, key, value), + allow_unverified_ssl_cert=allow_unverified_ssl_cert, + deployment_option=deployment_option, + disk_provisioning=disk_provisioning, + enable_hidden_properties=enable_hidden_properties, + ip_allocation_policy=ip_allocation_policy, + ip_protocol=ip_protocol, + local_ovf_path=local_ovf_path, + ovf_network_map=ovf_network_map, + remote_ovf_url=remote_ovf_url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + allow_unverified_ssl_cert: Optional[bool] = None, + deployment_option: Optional[str] = None, + disk_provisioning: Optional[str] = None, + enable_hidden_properties: Optional[bool] = None, + ip_allocation_policy: Optional[str] = None, + ip_protocol: Optional[str] = None, + local_ovf_path: Optional[str] = None, + ovf_network_map: Optional[Mapping[str, str]] = None, + remote_ovf_url: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if allow_unverified_ssl_cert is None and 'allowUnverifiedSslCert' in kwargs: + allow_unverified_ssl_cert = kwargs['allowUnverifiedSslCert'] + if deployment_option is None and 'deploymentOption' in kwargs: + deployment_option = kwargs['deploymentOption'] + if disk_provisioning is None and 'diskProvisioning' in kwargs: + disk_provisioning = kwargs['diskProvisioning'] + if enable_hidden_properties is None and 'enableHiddenProperties' in kwargs: + enable_hidden_properties = kwargs['enableHiddenProperties'] + if ip_allocation_policy is None and 'ipAllocationPolicy' in kwargs: + ip_allocation_policy = kwargs['ipAllocationPolicy'] + if ip_protocol is None and 'ipProtocol' in kwargs: + ip_protocol = kwargs['ipProtocol'] + if local_ovf_path is None and 'localOvfPath' in kwargs: + local_ovf_path = kwargs['localOvfPath'] + if ovf_network_map is None and 'ovfNetworkMap' in kwargs: + ovf_network_map = kwargs['ovfNetworkMap'] + if remote_ovf_url is None and 'remoteOvfUrl' in kwargs: + remote_ovf_url = kwargs['remoteOvfUrl'] + if allow_unverified_ssl_cert is not None: - pulumi.set(__self__, "allow_unverified_ssl_cert", allow_unverified_ssl_cert) + _setter("allow_unverified_ssl_cert", allow_unverified_ssl_cert) if deployment_option is not None: - pulumi.set(__self__, "deployment_option", deployment_option) + _setter("deployment_option", deployment_option) if disk_provisioning is not None: - pulumi.set(__self__, "disk_provisioning", disk_provisioning) + _setter("disk_provisioning", disk_provisioning) if enable_hidden_properties is not None: - pulumi.set(__self__, "enable_hidden_properties", enable_hidden_properties) + _setter("enable_hidden_properties", enable_hidden_properties) if ip_allocation_policy is not None: - pulumi.set(__self__, "ip_allocation_policy", ip_allocation_policy) + _setter("ip_allocation_policy", ip_allocation_policy) if ip_protocol is not None: - pulumi.set(__self__, "ip_protocol", ip_protocol) + _setter("ip_protocol", ip_protocol) if local_ovf_path is not None: - pulumi.set(__self__, "local_ovf_path", local_ovf_path) + _setter("local_ovf_path", local_ovf_path) if ovf_network_map is not None: - pulumi.set(__self__, "ovf_network_map", ovf_network_map) + _setter("ovf_network_map", ovf_network_map) if remote_ovf_url is not None: - pulumi.set(__self__, "remote_ovf_url", remote_ovf_url) + _setter("remote_ovf_url", remote_ovf_url) @property @pulumi.getter(name="allowUnverifiedSslCert") @@ -1803,8 +2407,19 @@ def remote_ovf_url(self) -> Optional[str]: class VirtualMachineVapp(dict): def __init__(__self__, *, properties: Optional[Mapping[str, str]] = None): + VirtualMachineVapp._configure( + lambda key, value: pulumi.set(__self__, key, value), + properties=properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + properties: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) @property @pulumi.getter @@ -1842,10 +2457,33 @@ def __init__(__self__, *, :param Sequence[str] tags: List of Name of tags to select from the given category. :param bool include_datastores_with_tags: Include datastores with the given tags or exclude. Default `true`. """ - pulumi.set(__self__, "tag_category", tag_category) - pulumi.set(__self__, "tags", tags) + VmStoragePolicyTagRule._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag_category=tag_category, + tags=tags, + include_datastores_with_tags=include_datastores_with_tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag_category: Optional[str] = None, + tags: Optional[Sequence[str]] = None, + include_datastores_with_tags: Optional[bool] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag_category is None and 'tagCategory' in kwargs: + tag_category = kwargs['tagCategory'] + if tag_category is None: + raise TypeError("Missing 'tag_category' argument") + if tags is None: + raise TypeError("Missing 'tags' argument") + if include_datastores_with_tags is None and 'includeDatastoresWithTags' in kwargs: + include_datastores_with_tags = kwargs['includeDatastoresWithTags'] + + _setter("tag_category", tag_category) + _setter("tags", tags) if include_datastores_with_tags is not None: - pulumi.set(__self__, "include_datastores_with_tags", include_datastores_with_tags) + _setter("include_datastores_with_tags", include_datastores_with_tags) @property @pulumi.getter(name="tagCategory") @@ -1885,14 +2523,31 @@ def __init__(__self__, *, :param str ip: Address of the interface, if DHCP is not set. :param str netmask: Netmask of the interface, if DHCP is not set. """ + VnicIpv4._configure( + lambda key, value: pulumi.set(__self__, key, value), + dhcp=dhcp, + gw=gw, + ip=ip, + netmask=netmask, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + dhcp: Optional[bool] = None, + gw: Optional[str] = None, + ip: Optional[str] = None, + netmask: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if dhcp is not None: - pulumi.set(__self__, "dhcp", dhcp) + _setter("dhcp", dhcp) if gw is not None: - pulumi.set(__self__, "gw", gw) + _setter("gw", gw) if ip is not None: - pulumi.set(__self__, "ip", ip) + _setter("ip", ip) if netmask is not None: - pulumi.set(__self__, "netmask", netmask) + _setter("netmask", netmask) @property @pulumi.getter @@ -1940,14 +2595,31 @@ def __init__(__self__, *, :param bool dhcp: Use DHCP to configure the interface's IPv6 stack. :param str gw: IP address of the default gateway, if DHCP or autoconfig is not set. """ + VnicIpv6._configure( + lambda key, value: pulumi.set(__self__, key, value), + addresses=addresses, + autoconfig=autoconfig, + dhcp=dhcp, + gw=gw, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + addresses: Optional[Sequence[str]] = None, + autoconfig: Optional[bool] = None, + dhcp: Optional[bool] = None, + gw: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if addresses is not None: - pulumi.set(__self__, "addresses", addresses) + _setter("addresses", addresses) if autoconfig is not None: - pulumi.set(__self__, "autoconfig", autoconfig) + _setter("autoconfig", autoconfig) if dhcp is not None: - pulumi.set(__self__, "dhcp", dhcp) + _setter("dhcp", dhcp) if gw is not None: - pulumi.set(__self__, "gw", gw) + _setter("gw", gw) @property @pulumi.getter @@ -1997,11 +2669,46 @@ def __init__(__self__, *, :param bool thin_provisioned: Set to `true` if the disk has been thin provisioned. :param int unit_number: The disk number on the storage bus. """ - pulumi.set(__self__, "eagerly_scrub", eagerly_scrub) - pulumi.set(__self__, "label", label) - pulumi.set(__self__, "size", size) - pulumi.set(__self__, "thin_provisioned", thin_provisioned) - pulumi.set(__self__, "unit_number", unit_number) + GetVirtualMachineDiskResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + eagerly_scrub=eagerly_scrub, + label=label, + size=size, + thin_provisioned=thin_provisioned, + unit_number=unit_number, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + eagerly_scrub: Optional[bool] = None, + label: Optional[str] = None, + size: Optional[int] = None, + thin_provisioned: Optional[bool] = None, + unit_number: Optional[int] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if eagerly_scrub is None and 'eagerlyScrub' in kwargs: + eagerly_scrub = kwargs['eagerlyScrub'] + if eagerly_scrub is None: + raise TypeError("Missing 'eagerly_scrub' argument") + if label is None: + raise TypeError("Missing 'label' argument") + if size is None: + raise TypeError("Missing 'size' argument") + if thin_provisioned is None and 'thinProvisioned' in kwargs: + thin_provisioned = kwargs['thinProvisioned'] + if thin_provisioned is None: + raise TypeError("Missing 'thin_provisioned' argument") + if unit_number is None and 'unitNumber' in kwargs: + unit_number = kwargs['unitNumber'] + if unit_number is None: + raise TypeError("Missing 'unit_number' argument") + + _setter("eagerly_scrub", eagerly_scrub) + _setter("label", label) + _setter("size", size) + _setter("thin_provisioned", thin_provisioned) + _setter("unit_number", unit_number) @property @pulumi.getter(name="eagerlyScrub") @@ -2070,16 +2777,61 @@ def __init__(__self__, *, :param str bandwidth_share_level: The bandwidth share allocation level for this interface. Can be one of `low`, `normal`, `high`, or `custom`. """ - pulumi.set(__self__, "adapter_type", adapter_type) - pulumi.set(__self__, "bandwidth_share_count", bandwidth_share_count) - pulumi.set(__self__, "mac_address", mac_address) - pulumi.set(__self__, "network_id", network_id) + GetVirtualMachineNetworkInterfaceResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + adapter_type=adapter_type, + bandwidth_share_count=bandwidth_share_count, + mac_address=mac_address, + network_id=network_id, + bandwidth_limit=bandwidth_limit, + bandwidth_reservation=bandwidth_reservation, + bandwidth_share_level=bandwidth_share_level, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + adapter_type: Optional[str] = None, + bandwidth_share_count: Optional[int] = None, + mac_address: Optional[str] = None, + network_id: Optional[str] = None, + bandwidth_limit: Optional[int] = None, + bandwidth_reservation: Optional[int] = None, + bandwidth_share_level: Optional[str] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if adapter_type is None and 'adapterType' in kwargs: + adapter_type = kwargs['adapterType'] + if adapter_type is None: + raise TypeError("Missing 'adapter_type' argument") + if bandwidth_share_count is None and 'bandwidthShareCount' in kwargs: + bandwidth_share_count = kwargs['bandwidthShareCount'] + if bandwidth_share_count is None: + raise TypeError("Missing 'bandwidth_share_count' argument") + if mac_address is None and 'macAddress' in kwargs: + mac_address = kwargs['macAddress'] + if mac_address is None: + raise TypeError("Missing 'mac_address' argument") + if network_id is None and 'networkId' in kwargs: + network_id = kwargs['networkId'] + if network_id is None: + raise TypeError("Missing 'network_id' argument") + if bandwidth_limit is None and 'bandwidthLimit' in kwargs: + bandwidth_limit = kwargs['bandwidthLimit'] + if bandwidth_reservation is None and 'bandwidthReservation' in kwargs: + bandwidth_reservation = kwargs['bandwidthReservation'] + if bandwidth_share_level is None and 'bandwidthShareLevel' in kwargs: + bandwidth_share_level = kwargs['bandwidthShareLevel'] + + _setter("adapter_type", adapter_type) + _setter("bandwidth_share_count", bandwidth_share_count) + _setter("mac_address", mac_address) + _setter("network_id", network_id) if bandwidth_limit is not None: - pulumi.set(__self__, "bandwidth_limit", bandwidth_limit) + _setter("bandwidth_limit", bandwidth_limit) if bandwidth_reservation is not None: - pulumi.set(__self__, "bandwidth_reservation", bandwidth_reservation) + _setter("bandwidth_reservation", bandwidth_reservation) if bandwidth_share_level is not None: - pulumi.set(__self__, "bandwidth_share_level", bandwidth_share_level) + _setter("bandwidth_share_level", bandwidth_share_level) @property @pulumi.getter(name="adapterType") @@ -2149,8 +2901,19 @@ def bandwidth_share_level(self) -> Optional[str]: class GetVirtualMachineVappResult(dict): def __init__(__self__, *, properties: Optional[Mapping[str, str]] = None): + GetVirtualMachineVappResult._configure( + lambda key, value: pulumi.set(__self__, key, value), + properties=properties, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + properties: Optional[Mapping[str, str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if properties is not None: - pulumi.set(__self__, "properties", properties) + _setter("properties", properties) @property @pulumi.getter diff --git a/sdk/python/pulumi_vsphere/provider.py b/sdk/python/pulumi_vsphere/provider.py index 01bec18c..48a175df 100644 --- a/sdk/python/pulumi_vsphere/provider.py +++ b/sdk/python/pulumi_vsphere/provider.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ProviderArgs', 'Provider'] @@ -42,49 +42,110 @@ def __init__(__self__, *, :param pulumi.Input[str] vim_session_path: The directory to save vSphere SOAP API sessions to :param pulumi.Input[str] vsphere_server: The vSphere Server name for vSphere API operations. """ - pulumi.set(__self__, "password", password) - pulumi.set(__self__, "user", user) + ProviderArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + password=password, + user=user, + allow_unverified_ssl=allow_unverified_ssl, + api_timeout=api_timeout, + client_debug=client_debug, + client_debug_path=client_debug_path, + client_debug_path_run=client_debug_path_run, + persist_session=persist_session, + rest_session_path=rest_session_path, + vcenter_server=vcenter_server, + vim_keep_alive=vim_keep_alive, + vim_session_path=vim_session_path, + vsphere_server=vsphere_server, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + password: Optional[pulumi.Input[str]] = None, + user: Optional[pulumi.Input[str]] = None, + allow_unverified_ssl: Optional[pulumi.Input[bool]] = None, + api_timeout: Optional[pulumi.Input[int]] = None, + client_debug: Optional[pulumi.Input[bool]] = None, + client_debug_path: Optional[pulumi.Input[str]] = None, + client_debug_path_run: Optional[pulumi.Input[str]] = None, + persist_session: Optional[pulumi.Input[bool]] = None, + rest_session_path: Optional[pulumi.Input[str]] = None, + vcenter_server: Optional[pulumi.Input[str]] = None, + vim_keep_alive: Optional[pulumi.Input[int]] = None, + vim_session_path: Optional[pulumi.Input[str]] = None, + vsphere_server: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if password is None: + raise TypeError("Missing 'password' argument") + if user is None: + raise TypeError("Missing 'user' argument") + if allow_unverified_ssl is None and 'allowUnverifiedSsl' in kwargs: + allow_unverified_ssl = kwargs['allowUnverifiedSsl'] + if api_timeout is None and 'apiTimeout' in kwargs: + api_timeout = kwargs['apiTimeout'] + if client_debug is None and 'clientDebug' in kwargs: + client_debug = kwargs['clientDebug'] + if client_debug_path is None and 'clientDebugPath' in kwargs: + client_debug_path = kwargs['clientDebugPath'] + if client_debug_path_run is None and 'clientDebugPathRun' in kwargs: + client_debug_path_run = kwargs['clientDebugPathRun'] + if persist_session is None and 'persistSession' in kwargs: + persist_session = kwargs['persistSession'] + if rest_session_path is None and 'restSessionPath' in kwargs: + rest_session_path = kwargs['restSessionPath'] + if vcenter_server is None and 'vcenterServer' in kwargs: + vcenter_server = kwargs['vcenterServer'] + if vim_keep_alive is None and 'vimKeepAlive' in kwargs: + vim_keep_alive = kwargs['vimKeepAlive'] + if vim_session_path is None and 'vimSessionPath' in kwargs: + vim_session_path = kwargs['vimSessionPath'] + if vsphere_server is None and 'vsphereServer' in kwargs: + vsphere_server = kwargs['vsphereServer'] + + _setter("password", password) + _setter("user", user) if allow_unverified_ssl is None: allow_unverified_ssl = _utilities.get_env_bool('VSPHERE_ALLOW_UNVERIFIED_SSL') if allow_unverified_ssl is not None: - pulumi.set(__self__, "allow_unverified_ssl", allow_unverified_ssl) + _setter("allow_unverified_ssl", allow_unverified_ssl) if api_timeout is not None: - pulumi.set(__self__, "api_timeout", api_timeout) + _setter("api_timeout", api_timeout) if client_debug is None: client_debug = _utilities.get_env_bool('VSPHERE_CLIENT_DEBUG') if client_debug is not None: - pulumi.set(__self__, "client_debug", client_debug) + _setter("client_debug", client_debug) if client_debug_path is None: client_debug_path = _utilities.get_env('VSPHERE_CLIENT_DEBUG_PATH') if client_debug_path is not None: - pulumi.set(__self__, "client_debug_path", client_debug_path) + _setter("client_debug_path", client_debug_path) if client_debug_path_run is None: client_debug_path_run = _utilities.get_env('VSPHERE_CLIENT_DEBUG_PATH_RUN') if client_debug_path_run is not None: - pulumi.set(__self__, "client_debug_path_run", client_debug_path_run) + _setter("client_debug_path_run", client_debug_path_run) if persist_session is None: persist_session = _utilities.get_env_bool('VSPHERE_PERSIST_SESSION') if persist_session is not None: - pulumi.set(__self__, "persist_session", persist_session) + _setter("persist_session", persist_session) if rest_session_path is None: rest_session_path = _utilities.get_env('VSPHERE_REST_SESSION_PATH') if rest_session_path is not None: - pulumi.set(__self__, "rest_session_path", rest_session_path) + _setter("rest_session_path", rest_session_path) if vcenter_server is not None: warnings.warn("""This field has been renamed to vsphere_server.""", DeprecationWarning) pulumi.log.warn("""vcenter_server is deprecated: This field has been renamed to vsphere_server.""") if vcenter_server is not None: - pulumi.set(__self__, "vcenter_server", vcenter_server) + _setter("vcenter_server", vcenter_server) if vim_keep_alive is None: vim_keep_alive = _utilities.get_env_int('VSPHERE_VIM_KEEP_ALIVE') if vim_keep_alive is not None: - pulumi.set(__self__, "vim_keep_alive", vim_keep_alive) + _setter("vim_keep_alive", vim_keep_alive) if vim_session_path is None: vim_session_path = _utilities.get_env('VSPHERE_VIM_SESSION_PATH') if vim_session_path is not None: - pulumi.set(__self__, "vim_session_path", vim_session_path) + _setter("vim_session_path", vim_session_path) if vsphere_server is not None: - pulumi.set(__self__, "vsphere_server", vsphere_server) + _setter("vsphere_server", vsphere_server) @property @pulumi.getter @@ -305,6 +366,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ProviderArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/resource_pool.py b/sdk/python/pulumi_vsphere/resource_pool.py index ad93bc1e..09b02da8 100644 --- a/sdk/python/pulumi_vsphere/resource_pool.py +++ b/sdk/python/pulumi_vsphere/resource_pool.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['ResourcePoolArgs', 'ResourcePool'] @@ -76,35 +76,102 @@ def __init__(__self__, *, `scaleCpuAndMemoryShares`. Default: `disabled`. :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. """ - pulumi.set(__self__, "parent_resource_pool_id", parent_resource_pool_id) + ResourcePoolArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + parent_resource_pool_id=parent_resource_pool_id, + cpu_expandable=cpu_expandable, + cpu_limit=cpu_limit, + cpu_reservation=cpu_reservation, + cpu_share_level=cpu_share_level, + cpu_shares=cpu_shares, + custom_attributes=custom_attributes, + memory_expandable=memory_expandable, + memory_limit=memory_limit, + memory_reservation=memory_reservation, + memory_share_level=memory_share_level, + memory_shares=memory_shares, + name=name, + scale_descendants_shares=scale_descendants_shares, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parent_resource_pool_id: Optional[pulumi.Input[str]] = None, + cpu_expandable: Optional[pulumi.Input[bool]] = None, + cpu_limit: Optional[pulumi.Input[int]] = None, + cpu_reservation: Optional[pulumi.Input[int]] = None, + cpu_share_level: Optional[pulumi.Input[str]] = None, + cpu_shares: Optional[pulumi.Input[int]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + memory_expandable: Optional[pulumi.Input[bool]] = None, + memory_limit: Optional[pulumi.Input[int]] = None, + memory_reservation: Optional[pulumi.Input[int]] = None, + memory_share_level: Optional[pulumi.Input[str]] = None, + memory_shares: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + scale_descendants_shares: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parent_resource_pool_id is None and 'parentResourcePoolId' in kwargs: + parent_resource_pool_id = kwargs['parentResourcePoolId'] + if parent_resource_pool_id is None: + raise TypeError("Missing 'parent_resource_pool_id' argument") + if cpu_expandable is None and 'cpuExpandable' in kwargs: + cpu_expandable = kwargs['cpuExpandable'] + if cpu_limit is None and 'cpuLimit' in kwargs: + cpu_limit = kwargs['cpuLimit'] + if cpu_reservation is None and 'cpuReservation' in kwargs: + cpu_reservation = kwargs['cpuReservation'] + if cpu_share_level is None and 'cpuShareLevel' in kwargs: + cpu_share_level = kwargs['cpuShareLevel'] + if cpu_shares is None and 'cpuShares' in kwargs: + cpu_shares = kwargs['cpuShares'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if memory_expandable is None and 'memoryExpandable' in kwargs: + memory_expandable = kwargs['memoryExpandable'] + if memory_limit is None and 'memoryLimit' in kwargs: + memory_limit = kwargs['memoryLimit'] + if memory_reservation is None and 'memoryReservation' in kwargs: + memory_reservation = kwargs['memoryReservation'] + if memory_share_level is None and 'memoryShareLevel' in kwargs: + memory_share_level = kwargs['memoryShareLevel'] + if memory_shares is None and 'memoryShares' in kwargs: + memory_shares = kwargs['memoryShares'] + if scale_descendants_shares is None and 'scaleDescendantsShares' in kwargs: + scale_descendants_shares = kwargs['scaleDescendantsShares'] + + _setter("parent_resource_pool_id", parent_resource_pool_id) if cpu_expandable is not None: - pulumi.set(__self__, "cpu_expandable", cpu_expandable) + _setter("cpu_expandable", cpu_expandable) if cpu_limit is not None: - pulumi.set(__self__, "cpu_limit", cpu_limit) + _setter("cpu_limit", cpu_limit) if cpu_reservation is not None: - pulumi.set(__self__, "cpu_reservation", cpu_reservation) + _setter("cpu_reservation", cpu_reservation) if cpu_share_level is not None: - pulumi.set(__self__, "cpu_share_level", cpu_share_level) + _setter("cpu_share_level", cpu_share_level) if cpu_shares is not None: - pulumi.set(__self__, "cpu_shares", cpu_shares) + _setter("cpu_shares", cpu_shares) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if memory_expandable is not None: - pulumi.set(__self__, "memory_expandable", memory_expandable) + _setter("memory_expandable", memory_expandable) if memory_limit is not None: - pulumi.set(__self__, "memory_limit", memory_limit) + _setter("memory_limit", memory_limit) if memory_reservation is not None: - pulumi.set(__self__, "memory_reservation", memory_reservation) + _setter("memory_reservation", memory_reservation) if memory_share_level is not None: - pulumi.set(__self__, "memory_share_level", memory_share_level) + _setter("memory_share_level", memory_share_level) if memory_shares is not None: - pulumi.set(__self__, "memory_shares", memory_shares) + _setter("memory_shares", memory_shares) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if scale_descendants_shares is not None: - pulumi.set(__self__, "scale_descendants_shares", scale_descendants_shares) + _setter("scale_descendants_shares", scale_descendants_shares) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="parentResourcePoolId") @@ -381,36 +448,101 @@ def __init__(__self__, *, `scaleCpuAndMemoryShares`. Default: `disabled`. :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. """ + _ResourcePoolState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu_expandable=cpu_expandable, + cpu_limit=cpu_limit, + cpu_reservation=cpu_reservation, + cpu_share_level=cpu_share_level, + cpu_shares=cpu_shares, + custom_attributes=custom_attributes, + memory_expandable=memory_expandable, + memory_limit=memory_limit, + memory_reservation=memory_reservation, + memory_share_level=memory_share_level, + memory_shares=memory_shares, + name=name, + parent_resource_pool_id=parent_resource_pool_id, + scale_descendants_shares=scale_descendants_shares, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu_expandable: Optional[pulumi.Input[bool]] = None, + cpu_limit: Optional[pulumi.Input[int]] = None, + cpu_reservation: Optional[pulumi.Input[int]] = None, + cpu_share_level: Optional[pulumi.Input[str]] = None, + cpu_shares: Optional[pulumi.Input[int]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + memory_expandable: Optional[pulumi.Input[bool]] = None, + memory_limit: Optional[pulumi.Input[int]] = None, + memory_reservation: Optional[pulumi.Input[int]] = None, + memory_share_level: Optional[pulumi.Input[str]] = None, + memory_shares: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + parent_resource_pool_id: Optional[pulumi.Input[str]] = None, + scale_descendants_shares: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu_expandable is None and 'cpuExpandable' in kwargs: + cpu_expandable = kwargs['cpuExpandable'] + if cpu_limit is None and 'cpuLimit' in kwargs: + cpu_limit = kwargs['cpuLimit'] + if cpu_reservation is None and 'cpuReservation' in kwargs: + cpu_reservation = kwargs['cpuReservation'] + if cpu_share_level is None and 'cpuShareLevel' in kwargs: + cpu_share_level = kwargs['cpuShareLevel'] + if cpu_shares is None and 'cpuShares' in kwargs: + cpu_shares = kwargs['cpuShares'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if memory_expandable is None and 'memoryExpandable' in kwargs: + memory_expandable = kwargs['memoryExpandable'] + if memory_limit is None and 'memoryLimit' in kwargs: + memory_limit = kwargs['memoryLimit'] + if memory_reservation is None and 'memoryReservation' in kwargs: + memory_reservation = kwargs['memoryReservation'] + if memory_share_level is None and 'memoryShareLevel' in kwargs: + memory_share_level = kwargs['memoryShareLevel'] + if memory_shares is None and 'memoryShares' in kwargs: + memory_shares = kwargs['memoryShares'] + if parent_resource_pool_id is None and 'parentResourcePoolId' in kwargs: + parent_resource_pool_id = kwargs['parentResourcePoolId'] + if scale_descendants_shares is None and 'scaleDescendantsShares' in kwargs: + scale_descendants_shares = kwargs['scaleDescendantsShares'] + if cpu_expandable is not None: - pulumi.set(__self__, "cpu_expandable", cpu_expandable) + _setter("cpu_expandable", cpu_expandable) if cpu_limit is not None: - pulumi.set(__self__, "cpu_limit", cpu_limit) + _setter("cpu_limit", cpu_limit) if cpu_reservation is not None: - pulumi.set(__self__, "cpu_reservation", cpu_reservation) + _setter("cpu_reservation", cpu_reservation) if cpu_share_level is not None: - pulumi.set(__self__, "cpu_share_level", cpu_share_level) + _setter("cpu_share_level", cpu_share_level) if cpu_shares is not None: - pulumi.set(__self__, "cpu_shares", cpu_shares) + _setter("cpu_shares", cpu_shares) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if memory_expandable is not None: - pulumi.set(__self__, "memory_expandable", memory_expandable) + _setter("memory_expandable", memory_expandable) if memory_limit is not None: - pulumi.set(__self__, "memory_limit", memory_limit) + _setter("memory_limit", memory_limit) if memory_reservation is not None: - pulumi.set(__self__, "memory_reservation", memory_reservation) + _setter("memory_reservation", memory_reservation) if memory_share_level is not None: - pulumi.set(__self__, "memory_share_level", memory_share_level) + _setter("memory_share_level", memory_share_level) if memory_shares is not None: - pulumi.set(__self__, "memory_shares", memory_shares) + _setter("memory_shares", memory_shares) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parent_resource_pool_id is not None: - pulumi.set(__self__, "parent_resource_pool_id", parent_resource_pool_id) + _setter("parent_resource_pool_id", parent_resource_pool_id) if scale_descendants_shares is not None: - pulumi.set(__self__, "scale_descendants_shares", scale_descendants_shares) + _setter("scale_descendants_shares", scale_descendants_shares) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="cpuExpandable") @@ -818,6 +950,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + ResourcePoolArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/role.py b/sdk/python/pulumi_vsphere/role.py index e20b7223..e8d2f8fc 100644 --- a/sdk/python/pulumi_vsphere/role.py +++ b/sdk/python/pulumi_vsphere/role.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['RoleArgs', 'Role'] @@ -21,10 +21,25 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the role. :param pulumi.Input[Sequence[pulumi.Input[str]]] role_privileges: The privileges to be associated with this role. """ + RoleArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + name=name, + role_privileges=role_privileges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + name: Optional[pulumi.Input[str]] = None, + role_privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if role_privileges is None and 'rolePrivileges' in kwargs: + role_privileges = kwargs['rolePrivileges'] + if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if role_privileges is not None: - pulumi.set(__self__, "role_privileges", role_privileges) + _setter("role_privileges", role_privileges) @property @pulumi.getter @@ -63,12 +78,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the role. :param pulumi.Input[Sequence[pulumi.Input[str]]] role_privileges: The privileges to be associated with this role. """ + _RoleState._configure( + lambda key, value: pulumi.set(__self__, key, value), + label=label, + name=name, + role_privileges=role_privileges, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + label: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + role_privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if role_privileges is None and 'rolePrivileges' in kwargs: + role_privileges = kwargs['rolePrivileges'] + if label is not None: - pulumi.set(__self__, "label", label) + _setter("label", label) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if role_privileges is not None: - pulumi.set(__self__, "role_privileges", role_privileges) + _setter("role_privileges", role_privileges) @property @pulumi.getter @@ -140,6 +172,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + RoleArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/storage_drs_vm_override.py b/sdk/python/pulumi_vsphere/storage_drs_vm_override.py index 4d438bea..e7fa8ba9 100644 --- a/sdk/python/pulumi_vsphere/storage_drs_vm_override.py +++ b/sdk/python/pulumi_vsphere/storage_drs_vm_override.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['StorageDrsVmOverrideArgs', 'StorageDrsVmOverride'] @@ -39,14 +39,47 @@ def __init__(__self__, *, individual disks on different datastores if it helps satisfy cluster requirements. When not specified, the datastore cluster's settings are used. """ - pulumi.set(__self__, "datastore_cluster_id", datastore_cluster_id) - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + StorageDrsVmOverrideArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + datastore_cluster_id=datastore_cluster_id, + virtual_machine_id=virtual_machine_id, + sdrs_automation_level=sdrs_automation_level, + sdrs_enabled=sdrs_enabled, + sdrs_intra_vm_affinity=sdrs_intra_vm_affinity, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datastore_cluster_id: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + sdrs_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_enabled: Optional[pulumi.Input[str]] = None, + sdrs_intra_vm_affinity: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datastore_cluster_id is None and 'datastoreClusterId' in kwargs: + datastore_cluster_id = kwargs['datastoreClusterId'] + if datastore_cluster_id is None: + raise TypeError("Missing 'datastore_cluster_id' argument") + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if virtual_machine_id is None: + raise TypeError("Missing 'virtual_machine_id' argument") + if sdrs_automation_level is None and 'sdrsAutomationLevel' in kwargs: + sdrs_automation_level = kwargs['sdrsAutomationLevel'] + if sdrs_enabled is None and 'sdrsEnabled' in kwargs: + sdrs_enabled = kwargs['sdrsEnabled'] + if sdrs_intra_vm_affinity is None and 'sdrsIntraVmAffinity' in kwargs: + sdrs_intra_vm_affinity = kwargs['sdrsIntraVmAffinity'] + + _setter("datastore_cluster_id", datastore_cluster_id) + _setter("virtual_machine_id", virtual_machine_id) if sdrs_automation_level is not None: - pulumi.set(__self__, "sdrs_automation_level", sdrs_automation_level) + _setter("sdrs_automation_level", sdrs_automation_level) if sdrs_enabled is not None: - pulumi.set(__self__, "sdrs_enabled", sdrs_enabled) + _setter("sdrs_enabled", sdrs_enabled) if sdrs_intra_vm_affinity is not None: - pulumi.set(__self__, "sdrs_intra_vm_affinity", sdrs_intra_vm_affinity) + _setter("sdrs_intra_vm_affinity", sdrs_intra_vm_affinity) @property @pulumi.getter(name="datastoreClusterId") @@ -149,16 +182,45 @@ def __init__(__self__, *, :param pulumi.Input[str] virtual_machine_id: The UUID of the virtual machine to create the override for. Forces a new resource if changed. """ + _StorageDrsVmOverrideState._configure( + lambda key, value: pulumi.set(__self__, key, value), + datastore_cluster_id=datastore_cluster_id, + sdrs_automation_level=sdrs_automation_level, + sdrs_enabled=sdrs_enabled, + sdrs_intra_vm_affinity=sdrs_intra_vm_affinity, + virtual_machine_id=virtual_machine_id, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datastore_cluster_id: Optional[pulumi.Input[str]] = None, + sdrs_automation_level: Optional[pulumi.Input[str]] = None, + sdrs_enabled: Optional[pulumi.Input[str]] = None, + sdrs_intra_vm_affinity: Optional[pulumi.Input[str]] = None, + virtual_machine_id: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datastore_cluster_id is None and 'datastoreClusterId' in kwargs: + datastore_cluster_id = kwargs['datastoreClusterId'] + if sdrs_automation_level is None and 'sdrsAutomationLevel' in kwargs: + sdrs_automation_level = kwargs['sdrsAutomationLevel'] + if sdrs_enabled is None and 'sdrsEnabled' in kwargs: + sdrs_enabled = kwargs['sdrsEnabled'] + if sdrs_intra_vm_affinity is None and 'sdrsIntraVmAffinity' in kwargs: + sdrs_intra_vm_affinity = kwargs['sdrsIntraVmAffinity'] + if virtual_machine_id is None and 'virtualMachineId' in kwargs: + virtual_machine_id = kwargs['virtualMachineId'] + if datastore_cluster_id is not None: - pulumi.set(__self__, "datastore_cluster_id", datastore_cluster_id) + _setter("datastore_cluster_id", datastore_cluster_id) if sdrs_automation_level is not None: - pulumi.set(__self__, "sdrs_automation_level", sdrs_automation_level) + _setter("sdrs_automation_level", sdrs_automation_level) if sdrs_enabled is not None: - pulumi.set(__self__, "sdrs_enabled", sdrs_enabled) + _setter("sdrs_enabled", sdrs_enabled) if sdrs_intra_vm_affinity is not None: - pulumi.set(__self__, "sdrs_intra_vm_affinity", sdrs_intra_vm_affinity) + _setter("sdrs_intra_vm_affinity", sdrs_intra_vm_affinity) if virtual_machine_id is not None: - pulumi.set(__self__, "virtual_machine_id", virtual_machine_id) + _setter("virtual_machine_id", virtual_machine_id) @property @pulumi.getter(name="datastoreClusterId") @@ -284,6 +346,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + StorageDrsVmOverrideArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/tag.py b/sdk/python/pulumi_vsphere/tag.py index 5a793835..1f844648 100644 --- a/sdk/python/pulumi_vsphere/tag.py +++ b/sdk/python/pulumi_vsphere/tag.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['TagArgs', 'Tag'] @@ -25,11 +25,30 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The display name of the tag. The name must be unique within its category. """ - pulumi.set(__self__, "category_id", category_id) + TagArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + category_id=category_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category_id is None and 'categoryId' in kwargs: + category_id = kwargs['categoryId'] + if category_id is None: + raise TypeError("Missing 'category_id' argument") + + _setter("category_id", category_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="categoryId") @@ -84,12 +103,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The display name of the tag. The name must be unique within its category. """ + _TagState._configure( + lambda key, value: pulumi.set(__self__, key, value), + category_id=category_id, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + category_id: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if category_id is None and 'categoryId' in kwargs: + category_id = kwargs['categoryId'] + if category_id is not None: - pulumi.set(__self__, "category_id", category_id) + _setter("category_id", category_id) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="categoryId") @@ -167,6 +203,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TagArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/tag_category.py b/sdk/python/pulumi_vsphere/tag_category.py index a597986b..19753f0a 100644 --- a/sdk/python/pulumi_vsphere/tag_category.py +++ b/sdk/python/pulumi_vsphere/tag_category.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['TagCategoryArgs', 'TagCategory'] @@ -33,12 +33,35 @@ def __init__(__self__, *, them. Attempting to do so will result in an error. :param pulumi.Input[str] name: The name of the category. """ - pulumi.set(__self__, "associable_types", associable_types) - pulumi.set(__self__, "cardinality", cardinality) + TagCategoryArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + associable_types=associable_types, + cardinality=cardinality, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + associable_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cardinality: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if associable_types is None and 'associableTypes' in kwargs: + associable_types = kwargs['associableTypes'] + if associable_types is None: + raise TypeError("Missing 'associable_types' argument") + if cardinality is None: + raise TypeError("Missing 'cardinality' argument") + + _setter("associable_types", associable_types) + _setter("cardinality", cardinality) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="associableTypes") @@ -119,14 +142,33 @@ def __init__(__self__, *, them. Attempting to do so will result in an error. :param pulumi.Input[str] name: The name of the category. """ + _TagCategoryState._configure( + lambda key, value: pulumi.set(__self__, key, value), + associable_types=associable_types, + cardinality=cardinality, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + associable_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + cardinality: Optional[pulumi.Input[str]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if associable_types is None and 'associableTypes' in kwargs: + associable_types = kwargs['associableTypes'] + if associable_types is not None: - pulumi.set(__self__, "associable_types", associable_types) + _setter("associable_types", associable_types) if cardinality is not None: - pulumi.set(__self__, "cardinality", cardinality) + _setter("cardinality", cardinality) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="associableTypes") @@ -230,6 +272,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + TagCategoryArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/vapp_container.py b/sdk/python/pulumi_vsphere/vapp_container.py index f45b802b..93ad2b11 100644 --- a/sdk/python/pulumi_vsphere/vapp_container.py +++ b/sdk/python/pulumi_vsphere/vapp_container.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['VappContainerArgs', 'VappContainer'] @@ -75,35 +75,102 @@ def __init__(__self__, *, the vApp container's parent folder. :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. """ - pulumi.set(__self__, "parent_resource_pool_id", parent_resource_pool_id) + VappContainerArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + parent_resource_pool_id=parent_resource_pool_id, + cpu_expandable=cpu_expandable, + cpu_limit=cpu_limit, + cpu_reservation=cpu_reservation, + cpu_share_level=cpu_share_level, + cpu_shares=cpu_shares, + custom_attributes=custom_attributes, + memory_expandable=memory_expandable, + memory_limit=memory_limit, + memory_reservation=memory_reservation, + memory_share_level=memory_share_level, + memory_shares=memory_shares, + name=name, + parent_folder_id=parent_folder_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + parent_resource_pool_id: Optional[pulumi.Input[str]] = None, + cpu_expandable: Optional[pulumi.Input[bool]] = None, + cpu_limit: Optional[pulumi.Input[int]] = None, + cpu_reservation: Optional[pulumi.Input[int]] = None, + cpu_share_level: Optional[pulumi.Input[str]] = None, + cpu_shares: Optional[pulumi.Input[int]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + memory_expandable: Optional[pulumi.Input[bool]] = None, + memory_limit: Optional[pulumi.Input[int]] = None, + memory_reservation: Optional[pulumi.Input[int]] = None, + memory_share_level: Optional[pulumi.Input[str]] = None, + memory_shares: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + parent_folder_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if parent_resource_pool_id is None and 'parentResourcePoolId' in kwargs: + parent_resource_pool_id = kwargs['parentResourcePoolId'] + if parent_resource_pool_id is None: + raise TypeError("Missing 'parent_resource_pool_id' argument") + if cpu_expandable is None and 'cpuExpandable' in kwargs: + cpu_expandable = kwargs['cpuExpandable'] + if cpu_limit is None and 'cpuLimit' in kwargs: + cpu_limit = kwargs['cpuLimit'] + if cpu_reservation is None and 'cpuReservation' in kwargs: + cpu_reservation = kwargs['cpuReservation'] + if cpu_share_level is None and 'cpuShareLevel' in kwargs: + cpu_share_level = kwargs['cpuShareLevel'] + if cpu_shares is None and 'cpuShares' in kwargs: + cpu_shares = kwargs['cpuShares'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if memory_expandable is None and 'memoryExpandable' in kwargs: + memory_expandable = kwargs['memoryExpandable'] + if memory_limit is None and 'memoryLimit' in kwargs: + memory_limit = kwargs['memoryLimit'] + if memory_reservation is None and 'memoryReservation' in kwargs: + memory_reservation = kwargs['memoryReservation'] + if memory_share_level is None and 'memoryShareLevel' in kwargs: + memory_share_level = kwargs['memoryShareLevel'] + if memory_shares is None and 'memoryShares' in kwargs: + memory_shares = kwargs['memoryShares'] + if parent_folder_id is None and 'parentFolderId' in kwargs: + parent_folder_id = kwargs['parentFolderId'] + + _setter("parent_resource_pool_id", parent_resource_pool_id) if cpu_expandable is not None: - pulumi.set(__self__, "cpu_expandable", cpu_expandable) + _setter("cpu_expandable", cpu_expandable) if cpu_limit is not None: - pulumi.set(__self__, "cpu_limit", cpu_limit) + _setter("cpu_limit", cpu_limit) if cpu_reservation is not None: - pulumi.set(__self__, "cpu_reservation", cpu_reservation) + _setter("cpu_reservation", cpu_reservation) if cpu_share_level is not None: - pulumi.set(__self__, "cpu_share_level", cpu_share_level) + _setter("cpu_share_level", cpu_share_level) if cpu_shares is not None: - pulumi.set(__self__, "cpu_shares", cpu_shares) + _setter("cpu_shares", cpu_shares) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if memory_expandable is not None: - pulumi.set(__self__, "memory_expandable", memory_expandable) + _setter("memory_expandable", memory_expandable) if memory_limit is not None: - pulumi.set(__self__, "memory_limit", memory_limit) + _setter("memory_limit", memory_limit) if memory_reservation is not None: - pulumi.set(__self__, "memory_reservation", memory_reservation) + _setter("memory_reservation", memory_reservation) if memory_share_level is not None: - pulumi.set(__self__, "memory_share_level", memory_share_level) + _setter("memory_share_level", memory_share_level) if memory_shares is not None: - pulumi.set(__self__, "memory_shares", memory_shares) + _setter("memory_shares", memory_shares) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parent_folder_id is not None: - pulumi.set(__self__, "parent_folder_id", parent_folder_id) + _setter("parent_folder_id", parent_folder_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="parentResourcePoolId") @@ -378,36 +445,101 @@ def __init__(__self__, *, resource pool or the move will fail. :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: The IDs of any tags to attach to this resource. """ + _VappContainerState._configure( + lambda key, value: pulumi.set(__self__, key, value), + cpu_expandable=cpu_expandable, + cpu_limit=cpu_limit, + cpu_reservation=cpu_reservation, + cpu_share_level=cpu_share_level, + cpu_shares=cpu_shares, + custom_attributes=custom_attributes, + memory_expandable=memory_expandable, + memory_limit=memory_limit, + memory_reservation=memory_reservation, + memory_share_level=memory_share_level, + memory_shares=memory_shares, + name=name, + parent_folder_id=parent_folder_id, + parent_resource_pool_id=parent_resource_pool_id, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + cpu_expandable: Optional[pulumi.Input[bool]] = None, + cpu_limit: Optional[pulumi.Input[int]] = None, + cpu_reservation: Optional[pulumi.Input[int]] = None, + cpu_share_level: Optional[pulumi.Input[str]] = None, + cpu_shares: Optional[pulumi.Input[int]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + memory_expandable: Optional[pulumi.Input[bool]] = None, + memory_limit: Optional[pulumi.Input[int]] = None, + memory_reservation: Optional[pulumi.Input[int]] = None, + memory_share_level: Optional[pulumi.Input[str]] = None, + memory_shares: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + parent_folder_id: Optional[pulumi.Input[str]] = None, + parent_resource_pool_id: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if cpu_expandable is None and 'cpuExpandable' in kwargs: + cpu_expandable = kwargs['cpuExpandable'] + if cpu_limit is None and 'cpuLimit' in kwargs: + cpu_limit = kwargs['cpuLimit'] + if cpu_reservation is None and 'cpuReservation' in kwargs: + cpu_reservation = kwargs['cpuReservation'] + if cpu_share_level is None and 'cpuShareLevel' in kwargs: + cpu_share_level = kwargs['cpuShareLevel'] + if cpu_shares is None and 'cpuShares' in kwargs: + cpu_shares = kwargs['cpuShares'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if memory_expandable is None and 'memoryExpandable' in kwargs: + memory_expandable = kwargs['memoryExpandable'] + if memory_limit is None and 'memoryLimit' in kwargs: + memory_limit = kwargs['memoryLimit'] + if memory_reservation is None and 'memoryReservation' in kwargs: + memory_reservation = kwargs['memoryReservation'] + if memory_share_level is None and 'memoryShareLevel' in kwargs: + memory_share_level = kwargs['memoryShareLevel'] + if memory_shares is None and 'memoryShares' in kwargs: + memory_shares = kwargs['memoryShares'] + if parent_folder_id is None and 'parentFolderId' in kwargs: + parent_folder_id = kwargs['parentFolderId'] + if parent_resource_pool_id is None and 'parentResourcePoolId' in kwargs: + parent_resource_pool_id = kwargs['parentResourcePoolId'] + if cpu_expandable is not None: - pulumi.set(__self__, "cpu_expandable", cpu_expandable) + _setter("cpu_expandable", cpu_expandable) if cpu_limit is not None: - pulumi.set(__self__, "cpu_limit", cpu_limit) + _setter("cpu_limit", cpu_limit) if cpu_reservation is not None: - pulumi.set(__self__, "cpu_reservation", cpu_reservation) + _setter("cpu_reservation", cpu_reservation) if cpu_share_level is not None: - pulumi.set(__self__, "cpu_share_level", cpu_share_level) + _setter("cpu_share_level", cpu_share_level) if cpu_shares is not None: - pulumi.set(__self__, "cpu_shares", cpu_shares) + _setter("cpu_shares", cpu_shares) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if memory_expandable is not None: - pulumi.set(__self__, "memory_expandable", memory_expandable) + _setter("memory_expandable", memory_expandable) if memory_limit is not None: - pulumi.set(__self__, "memory_limit", memory_limit) + _setter("memory_limit", memory_limit) if memory_reservation is not None: - pulumi.set(__self__, "memory_reservation", memory_reservation) + _setter("memory_reservation", memory_reservation) if memory_share_level is not None: - pulumi.set(__self__, "memory_share_level", memory_share_level) + _setter("memory_share_level", memory_share_level) if memory_shares is not None: - pulumi.set(__self__, "memory_shares", memory_shares) + _setter("memory_shares", memory_shares) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if parent_folder_id is not None: - pulumi.set(__self__, "parent_folder_id", parent_folder_id) + _setter("parent_folder_id", parent_folder_id) if parent_resource_pool_id is not None: - pulumi.set(__self__, "parent_resource_pool_id", parent_resource_pool_id) + _setter("parent_resource_pool_id", parent_resource_pool_id) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter(name="cpuExpandable") @@ -705,6 +837,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VappContainerArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/vapp_entity.py b/sdk/python/pulumi_vsphere/vapp_entity.py index 7698b491..cca966ad 100644 --- a/sdk/python/pulumi_vsphere/vapp_entity.py +++ b/sdk/python/pulumi_vsphere/vapp_entity.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['VappEntityArgs', 'VappEntity'] @@ -48,24 +48,75 @@ def __init__(__self__, *, started when VMware Tools are ready instead of waiting for `start_delay`. This property has no effect for vApps. Default: false """ - pulumi.set(__self__, "container_id", container_id) - pulumi.set(__self__, "target_id", target_id) + VappEntityArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + target_id=target_id, + custom_attributes=custom_attributes, + start_action=start_action, + start_delay=start_delay, + start_order=start_order, + stop_action=stop_action, + stop_delay=stop_delay, + tags=tags, + wait_for_guest=wait_for_guest, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[pulumi.Input[str]] = None, + target_id: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + start_action: Optional[pulumi.Input[str]] = None, + start_delay: Optional[pulumi.Input[int]] = None, + start_order: Optional[pulumi.Input[int]] = None, + stop_action: Optional[pulumi.Input[str]] = None, + stop_delay: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + wait_for_guest: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if container_id is None: + raise TypeError("Missing 'container_id' argument") + if target_id is None and 'targetId' in kwargs: + target_id = kwargs['targetId'] + if target_id is None: + raise TypeError("Missing 'target_id' argument") + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if start_action is None and 'startAction' in kwargs: + start_action = kwargs['startAction'] + if start_delay is None and 'startDelay' in kwargs: + start_delay = kwargs['startDelay'] + if start_order is None and 'startOrder' in kwargs: + start_order = kwargs['startOrder'] + if stop_action is None and 'stopAction' in kwargs: + stop_action = kwargs['stopAction'] + if stop_delay is None and 'stopDelay' in kwargs: + stop_delay = kwargs['stopDelay'] + if wait_for_guest is None and 'waitForGuest' in kwargs: + wait_for_guest = kwargs['waitForGuest'] + + _setter("container_id", container_id) + _setter("target_id", target_id) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if start_action is not None: - pulumi.set(__self__, "start_action", start_action) + _setter("start_action", start_action) if start_delay is not None: - pulumi.set(__self__, "start_delay", start_delay) + _setter("start_delay", start_delay) if start_order is not None: - pulumi.set(__self__, "start_order", start_order) + _setter("start_order", start_order) if stop_action is not None: - pulumi.set(__self__, "stop_action", stop_action) + _setter("stop_action", stop_action) if stop_delay is not None: - pulumi.set(__self__, "stop_delay", stop_delay) + _setter("stop_delay", stop_delay) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if wait_for_guest is not None: - pulumi.set(__self__, "wait_for_guest", wait_for_guest) + _setter("wait_for_guest", wait_for_guest) @property @pulumi.getter(name="containerId") @@ -236,26 +287,73 @@ def __init__(__self__, *, started when VMware Tools are ready instead of waiting for `start_delay`. This property has no effect for vApps. Default: false """ + _VappEntityState._configure( + lambda key, value: pulumi.set(__self__, key, value), + container_id=container_id, + custom_attributes=custom_attributes, + start_action=start_action, + start_delay=start_delay, + start_order=start_order, + stop_action=stop_action, + stop_delay=stop_delay, + tags=tags, + target_id=target_id, + wait_for_guest=wait_for_guest, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + container_id: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + start_action: Optional[pulumi.Input[str]] = None, + start_delay: Optional[pulumi.Input[int]] = None, + start_order: Optional[pulumi.Input[int]] = None, + stop_action: Optional[pulumi.Input[str]] = None, + stop_delay: Optional[pulumi.Input[int]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target_id: Optional[pulumi.Input[str]] = None, + wait_for_guest: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if container_id is None and 'containerId' in kwargs: + container_id = kwargs['containerId'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if start_action is None and 'startAction' in kwargs: + start_action = kwargs['startAction'] + if start_delay is None and 'startDelay' in kwargs: + start_delay = kwargs['startDelay'] + if start_order is None and 'startOrder' in kwargs: + start_order = kwargs['startOrder'] + if stop_action is None and 'stopAction' in kwargs: + stop_action = kwargs['stopAction'] + if stop_delay is None and 'stopDelay' in kwargs: + stop_delay = kwargs['stopDelay'] + if target_id is None and 'targetId' in kwargs: + target_id = kwargs['targetId'] + if wait_for_guest is None and 'waitForGuest' in kwargs: + wait_for_guest = kwargs['waitForGuest'] + if container_id is not None: - pulumi.set(__self__, "container_id", container_id) + _setter("container_id", container_id) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if start_action is not None: - pulumi.set(__self__, "start_action", start_action) + _setter("start_action", start_action) if start_delay is not None: - pulumi.set(__self__, "start_delay", start_delay) + _setter("start_delay", start_delay) if start_order is not None: - pulumi.set(__self__, "start_order", start_order) + _setter("start_order", start_order) if stop_action is not None: - pulumi.set(__self__, "stop_action", stop_action) + _setter("stop_action", stop_action) if stop_delay is not None: - pulumi.set(__self__, "stop_delay", stop_delay) + _setter("stop_delay", stop_delay) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if target_id is not None: - pulumi.set(__self__, "target_id", target_id) + _setter("target_id", target_id) if wait_for_guest is not None: - pulumi.set(__self__, "wait_for_guest", wait_for_guest) + _setter("wait_for_guest", wait_for_guest) @property @pulumi.getter(name="containerId") @@ -449,6 +547,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VappEntityArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/virtual_disk.py b/sdk/python/pulumi_vsphere/virtual_disk.py index 12a98bd2..06beb233 100644 --- a/sdk/python/pulumi_vsphere/virtual_disk.py +++ b/sdk/python/pulumi_vsphere/virtual_disk.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['VirtualDiskArgs', 'VirtualDisk'] @@ -54,20 +54,55 @@ def __init__(__self__, *, [docs-vmware-vm-disk-provisioning]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-4C0F4D73-82F2-4B81-8AA7-1DD752A8A5AC.html """ - pulumi.set(__self__, "datastore", datastore) - pulumi.set(__self__, "size", size) - pulumi.set(__self__, "vmdk_path", vmdk_path) + VirtualDiskArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + datastore=datastore, + size=size, + vmdk_path=vmdk_path, + adapter_type=adapter_type, + create_directories=create_directories, + datacenter=datacenter, + type=type, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + datastore: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[int]] = None, + vmdk_path: Optional[pulumi.Input[str]] = None, + adapter_type: Optional[pulumi.Input[str]] = None, + create_directories: Optional[pulumi.Input[bool]] = None, + datacenter: Optional[pulumi.Input[str]] = None, + type: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if datastore is None: + raise TypeError("Missing 'datastore' argument") + if size is None: + raise TypeError("Missing 'size' argument") + if vmdk_path is None and 'vmdkPath' in kwargs: + vmdk_path = kwargs['vmdkPath'] + if vmdk_path is None: + raise TypeError("Missing 'vmdk_path' argument") + if adapter_type is None and 'adapterType' in kwargs: + adapter_type = kwargs['adapterType'] + if create_directories is None and 'createDirectories' in kwargs: + create_directories = kwargs['createDirectories'] + + _setter("datastore", datastore) + _setter("size", size) + _setter("vmdk_path", vmdk_path) if adapter_type is not None: warnings.warn("""this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""", DeprecationWarning) pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""") if adapter_type is not None: - pulumi.set(__self__, "adapter_type", adapter_type) + _setter("adapter_type", adapter_type) if create_directories is not None: - pulumi.set(__self__, "create_directories", create_directories) + _setter("create_directories", create_directories) if datacenter is not None: - pulumi.set(__self__, "datacenter", datacenter) + _setter("datacenter", datacenter) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) @property @pulumi.getter @@ -223,23 +258,52 @@ def __init__(__self__, *, :param pulumi.Input[str] vmdk_path: The path, including filename, of the virtual disk to be created. This needs to end in `.vmdk`. """ + _VirtualDiskState._configure( + lambda key, value: pulumi.set(__self__, key, value), + adapter_type=adapter_type, + create_directories=create_directories, + datacenter=datacenter, + datastore=datastore, + size=size, + type=type, + vmdk_path=vmdk_path, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + adapter_type: Optional[pulumi.Input[str]] = None, + create_directories: Optional[pulumi.Input[bool]] = None, + datacenter: Optional[pulumi.Input[str]] = None, + datastore: Optional[pulumi.Input[str]] = None, + size: Optional[pulumi.Input[int]] = None, + type: Optional[pulumi.Input[str]] = None, + vmdk_path: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if adapter_type is None and 'adapterType' in kwargs: + adapter_type = kwargs['adapterType'] + if create_directories is None and 'createDirectories' in kwargs: + create_directories = kwargs['createDirectories'] + if vmdk_path is None and 'vmdkPath' in kwargs: + vmdk_path = kwargs['vmdkPath'] + if adapter_type is not None: warnings.warn("""this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""", DeprecationWarning) pulumi.log.warn("""adapter_type is deprecated: this attribute has no effect on controller types - please use scsi_type in vsphere_virtual_machine instead""") if adapter_type is not None: - pulumi.set(__self__, "adapter_type", adapter_type) + _setter("adapter_type", adapter_type) if create_directories is not None: - pulumi.set(__self__, "create_directories", create_directories) + _setter("create_directories", create_directories) if datacenter is not None: - pulumi.set(__self__, "datacenter", datacenter) + _setter("datacenter", datacenter) if datastore is not None: - pulumi.set(__self__, "datastore", datastore) + _setter("datastore", datastore) if size is not None: - pulumi.set(__self__, "size", size) + _setter("size", size) if type is not None: - pulumi.set(__self__, "type", type) + _setter("type", type) if vmdk_path is not None: - pulumi.set(__self__, "vmdk_path", vmdk_path) + _setter("vmdk_path", vmdk_path) @property @pulumi.getter(name="adapterType") @@ -418,6 +482,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualDiskArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/virtual_machine.py b/sdk/python/pulumi_vsphere/virtual_machine.py index 6146d25c..84315e01 100644 --- a/sdk/python/pulumi_vsphere/virtual_machine.py +++ b/sdk/python/pulumi_vsphere/virtual_machine.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -206,153 +206,440 @@ def __init__(__self__, *, :param pulumi.Input[bool] wait_for_guest_net_routable: Controls whether or not the guest network waiter waits for a routable address. When `false`, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. This property is ignored if the `wait_for_guest_ip_timeout` waiter is used. Default: `true`. :param pulumi.Input[int] wait_for_guest_net_timeout: The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the `wait_for_guest_ip_timeout` waiter can be used instead. A value less than `1` disables the waiter. Default: `5` minutes. """ - pulumi.set(__self__, "resource_pool_id", resource_pool_id) + VirtualMachineArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + resource_pool_id=resource_pool_id, + alternate_guest_name=alternate_guest_name, + annotation=annotation, + boot_delay=boot_delay, + boot_retry_delay=boot_retry_delay, + boot_retry_enabled=boot_retry_enabled, + cdroms=cdroms, + clone=clone, + cpu_hot_add_enabled=cpu_hot_add_enabled, + cpu_hot_remove_enabled=cpu_hot_remove_enabled, + cpu_limit=cpu_limit, + cpu_performance_counters_enabled=cpu_performance_counters_enabled, + cpu_reservation=cpu_reservation, + cpu_share_count=cpu_share_count, + cpu_share_level=cpu_share_level, + custom_attributes=custom_attributes, + datacenter_id=datacenter_id, + datastore_cluster_id=datastore_cluster_id, + datastore_id=datastore_id, + disks=disks, + efi_secure_boot_enabled=efi_secure_boot_enabled, + enable_disk_uuid=enable_disk_uuid, + enable_logging=enable_logging, + ept_rvi_mode=ept_rvi_mode, + extra_config=extra_config, + extra_config_reboot_required=extra_config_reboot_required, + firmware=firmware, + folder=folder, + force_power_off=force_power_off, + guest_id=guest_id, + hardware_version=hardware_version, + host_system_id=host_system_id, + hv_mode=hv_mode, + ide_controller_count=ide_controller_count, + ignored_guest_ips=ignored_guest_ips, + latency_sensitivity=latency_sensitivity, + memory=memory, + memory_hot_add_enabled=memory_hot_add_enabled, + memory_limit=memory_limit, + memory_reservation=memory_reservation, + memory_share_count=memory_share_count, + memory_share_level=memory_share_level, + migrate_wait_timeout=migrate_wait_timeout, + name=name, + nested_hv_enabled=nested_hv_enabled, + network_interfaces=network_interfaces, + num_cores_per_socket=num_cores_per_socket, + num_cpus=num_cpus, + ovf_deploy=ovf_deploy, + pci_device_ids=pci_device_ids, + poweron_timeout=poweron_timeout, + replace_trigger=replace_trigger, + run_tools_scripts_after_power_on=run_tools_scripts_after_power_on, + run_tools_scripts_after_resume=run_tools_scripts_after_resume, + run_tools_scripts_before_guest_reboot=run_tools_scripts_before_guest_reboot, + run_tools_scripts_before_guest_shutdown=run_tools_scripts_before_guest_shutdown, + run_tools_scripts_before_guest_standby=run_tools_scripts_before_guest_standby, + sata_controller_count=sata_controller_count, + scsi_bus_sharing=scsi_bus_sharing, + scsi_controller_count=scsi_controller_count, + scsi_type=scsi_type, + shutdown_wait_timeout=shutdown_wait_timeout, + storage_policy_id=storage_policy_id, + swap_placement_policy=swap_placement_policy, + sync_time_with_host=sync_time_with_host, + sync_time_with_host_periodically=sync_time_with_host_periodically, + tags=tags, + tools_upgrade_policy=tools_upgrade_policy, + vapp=vapp, + vbs_enabled=vbs_enabled, + vvtd_enabled=vvtd_enabled, + wait_for_guest_ip_timeout=wait_for_guest_ip_timeout, + wait_for_guest_net_routable=wait_for_guest_net_routable, + wait_for_guest_net_timeout=wait_for_guest_net_timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + resource_pool_id: Optional[pulumi.Input[str]] = None, + alternate_guest_name: Optional[pulumi.Input[str]] = None, + annotation: Optional[pulumi.Input[str]] = None, + boot_delay: Optional[pulumi.Input[int]] = None, + boot_retry_delay: Optional[pulumi.Input[int]] = None, + boot_retry_enabled: Optional[pulumi.Input[bool]] = None, + cdroms: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineCdromArgs']]]] = None, + clone: Optional[pulumi.Input['VirtualMachineCloneArgs']] = None, + cpu_hot_add_enabled: Optional[pulumi.Input[bool]] = None, + cpu_hot_remove_enabled: Optional[pulumi.Input[bool]] = None, + cpu_limit: Optional[pulumi.Input[int]] = None, + cpu_performance_counters_enabled: Optional[pulumi.Input[bool]] = None, + cpu_reservation: Optional[pulumi.Input[int]] = None, + cpu_share_count: Optional[pulumi.Input[int]] = None, + cpu_share_level: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datacenter_id: Optional[pulumi.Input[str]] = None, + datastore_cluster_id: Optional[pulumi.Input[str]] = None, + datastore_id: Optional[pulumi.Input[str]] = None, + disks: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineDiskArgs']]]] = None, + efi_secure_boot_enabled: Optional[pulumi.Input[bool]] = None, + enable_disk_uuid: Optional[pulumi.Input[bool]] = None, + enable_logging: Optional[pulumi.Input[bool]] = None, + ept_rvi_mode: Optional[pulumi.Input[str]] = None, + extra_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + extra_config_reboot_required: Optional[pulumi.Input[bool]] = None, + firmware: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + force_power_off: Optional[pulumi.Input[bool]] = None, + guest_id: Optional[pulumi.Input[str]] = None, + hardware_version: Optional[pulumi.Input[int]] = None, + host_system_id: Optional[pulumi.Input[str]] = None, + hv_mode: Optional[pulumi.Input[str]] = None, + ide_controller_count: Optional[pulumi.Input[int]] = None, + ignored_guest_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + latency_sensitivity: Optional[pulumi.Input[str]] = None, + memory: Optional[pulumi.Input[int]] = None, + memory_hot_add_enabled: Optional[pulumi.Input[bool]] = None, + memory_limit: Optional[pulumi.Input[int]] = None, + memory_reservation: Optional[pulumi.Input[int]] = None, + memory_share_count: Optional[pulumi.Input[int]] = None, + memory_share_level: Optional[pulumi.Input[str]] = None, + migrate_wait_timeout: Optional[pulumi.Input[int]] = None, + name: Optional[pulumi.Input[str]] = None, + nested_hv_enabled: Optional[pulumi.Input[bool]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineNetworkInterfaceArgs']]]] = None, + num_cores_per_socket: Optional[pulumi.Input[int]] = None, + num_cpus: Optional[pulumi.Input[int]] = None, + ovf_deploy: Optional[pulumi.Input['VirtualMachineOvfDeployArgs']] = None, + pci_device_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + poweron_timeout: Optional[pulumi.Input[int]] = None, + replace_trigger: Optional[pulumi.Input[str]] = None, + run_tools_scripts_after_power_on: Optional[pulumi.Input[bool]] = None, + run_tools_scripts_after_resume: Optional[pulumi.Input[bool]] = None, + run_tools_scripts_before_guest_reboot: Optional[pulumi.Input[bool]] = None, + run_tools_scripts_before_guest_shutdown: Optional[pulumi.Input[bool]] = None, + run_tools_scripts_before_guest_standby: Optional[pulumi.Input[bool]] = None, + sata_controller_count: Optional[pulumi.Input[int]] = None, + scsi_bus_sharing: Optional[pulumi.Input[str]] = None, + scsi_controller_count: Optional[pulumi.Input[int]] = None, + scsi_type: Optional[pulumi.Input[str]] = None, + shutdown_wait_timeout: Optional[pulumi.Input[int]] = None, + storage_policy_id: Optional[pulumi.Input[str]] = None, + swap_placement_policy: Optional[pulumi.Input[str]] = None, + sync_time_with_host: Optional[pulumi.Input[bool]] = None, + sync_time_with_host_periodically: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tools_upgrade_policy: Optional[pulumi.Input[str]] = None, + vapp: Optional[pulumi.Input['VirtualMachineVappArgs']] = None, + vbs_enabled: Optional[pulumi.Input[bool]] = None, + vvtd_enabled: Optional[pulumi.Input[bool]] = None, + wait_for_guest_ip_timeout: Optional[pulumi.Input[int]] = None, + wait_for_guest_net_routable: Optional[pulumi.Input[bool]] = None, + wait_for_guest_net_timeout: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if resource_pool_id is None and 'resourcePoolId' in kwargs: + resource_pool_id = kwargs['resourcePoolId'] + if resource_pool_id is None: + raise TypeError("Missing 'resource_pool_id' argument") + if alternate_guest_name is None and 'alternateGuestName' in kwargs: + alternate_guest_name = kwargs['alternateGuestName'] + if boot_delay is None and 'bootDelay' in kwargs: + boot_delay = kwargs['bootDelay'] + if boot_retry_delay is None and 'bootRetryDelay' in kwargs: + boot_retry_delay = kwargs['bootRetryDelay'] + if boot_retry_enabled is None and 'bootRetryEnabled' in kwargs: + boot_retry_enabled = kwargs['bootRetryEnabled'] + if cpu_hot_add_enabled is None and 'cpuHotAddEnabled' in kwargs: + cpu_hot_add_enabled = kwargs['cpuHotAddEnabled'] + if cpu_hot_remove_enabled is None and 'cpuHotRemoveEnabled' in kwargs: + cpu_hot_remove_enabled = kwargs['cpuHotRemoveEnabled'] + if cpu_limit is None and 'cpuLimit' in kwargs: + cpu_limit = kwargs['cpuLimit'] + if cpu_performance_counters_enabled is None and 'cpuPerformanceCountersEnabled' in kwargs: + cpu_performance_counters_enabled = kwargs['cpuPerformanceCountersEnabled'] + if cpu_reservation is None and 'cpuReservation' in kwargs: + cpu_reservation = kwargs['cpuReservation'] + if cpu_share_count is None and 'cpuShareCount' in kwargs: + cpu_share_count = kwargs['cpuShareCount'] + if cpu_share_level is None and 'cpuShareLevel' in kwargs: + cpu_share_level = kwargs['cpuShareLevel'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if datacenter_id is None and 'datacenterId' in kwargs: + datacenter_id = kwargs['datacenterId'] + if datastore_cluster_id is None and 'datastoreClusterId' in kwargs: + datastore_cluster_id = kwargs['datastoreClusterId'] + if datastore_id is None and 'datastoreId' in kwargs: + datastore_id = kwargs['datastoreId'] + if efi_secure_boot_enabled is None and 'efiSecureBootEnabled' in kwargs: + efi_secure_boot_enabled = kwargs['efiSecureBootEnabled'] + if enable_disk_uuid is None and 'enableDiskUuid' in kwargs: + enable_disk_uuid = kwargs['enableDiskUuid'] + if enable_logging is None and 'enableLogging' in kwargs: + enable_logging = kwargs['enableLogging'] + if ept_rvi_mode is None and 'eptRviMode' in kwargs: + ept_rvi_mode = kwargs['eptRviMode'] + if extra_config is None and 'extraConfig' in kwargs: + extra_config = kwargs['extraConfig'] + if extra_config_reboot_required is None and 'extraConfigRebootRequired' in kwargs: + extra_config_reboot_required = kwargs['extraConfigRebootRequired'] + if force_power_off is None and 'forcePowerOff' in kwargs: + force_power_off = kwargs['forcePowerOff'] + if guest_id is None and 'guestId' in kwargs: + guest_id = kwargs['guestId'] + if hardware_version is None and 'hardwareVersion' in kwargs: + hardware_version = kwargs['hardwareVersion'] + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if hv_mode is None and 'hvMode' in kwargs: + hv_mode = kwargs['hvMode'] + if ide_controller_count is None and 'ideControllerCount' in kwargs: + ide_controller_count = kwargs['ideControllerCount'] + if ignored_guest_ips is None and 'ignoredGuestIps' in kwargs: + ignored_guest_ips = kwargs['ignoredGuestIps'] + if latency_sensitivity is None and 'latencySensitivity' in kwargs: + latency_sensitivity = kwargs['latencySensitivity'] + if memory_hot_add_enabled is None and 'memoryHotAddEnabled' in kwargs: + memory_hot_add_enabled = kwargs['memoryHotAddEnabled'] + if memory_limit is None and 'memoryLimit' in kwargs: + memory_limit = kwargs['memoryLimit'] + if memory_reservation is None and 'memoryReservation' in kwargs: + memory_reservation = kwargs['memoryReservation'] + if memory_share_count is None and 'memoryShareCount' in kwargs: + memory_share_count = kwargs['memoryShareCount'] + if memory_share_level is None and 'memoryShareLevel' in kwargs: + memory_share_level = kwargs['memoryShareLevel'] + if migrate_wait_timeout is None and 'migrateWaitTimeout' in kwargs: + migrate_wait_timeout = kwargs['migrateWaitTimeout'] + if nested_hv_enabled is None and 'nestedHvEnabled' in kwargs: + nested_hv_enabled = kwargs['nestedHvEnabled'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if num_cores_per_socket is None and 'numCoresPerSocket' in kwargs: + num_cores_per_socket = kwargs['numCoresPerSocket'] + if num_cpus is None and 'numCpus' in kwargs: + num_cpus = kwargs['numCpus'] + if ovf_deploy is None and 'ovfDeploy' in kwargs: + ovf_deploy = kwargs['ovfDeploy'] + if pci_device_ids is None and 'pciDeviceIds' in kwargs: + pci_device_ids = kwargs['pciDeviceIds'] + if poweron_timeout is None and 'poweronTimeout' in kwargs: + poweron_timeout = kwargs['poweronTimeout'] + if replace_trigger is None and 'replaceTrigger' in kwargs: + replace_trigger = kwargs['replaceTrigger'] + if run_tools_scripts_after_power_on is None and 'runToolsScriptsAfterPowerOn' in kwargs: + run_tools_scripts_after_power_on = kwargs['runToolsScriptsAfterPowerOn'] + if run_tools_scripts_after_resume is None and 'runToolsScriptsAfterResume' in kwargs: + run_tools_scripts_after_resume = kwargs['runToolsScriptsAfterResume'] + if run_tools_scripts_before_guest_reboot is None and 'runToolsScriptsBeforeGuestReboot' in kwargs: + run_tools_scripts_before_guest_reboot = kwargs['runToolsScriptsBeforeGuestReboot'] + if run_tools_scripts_before_guest_shutdown is None and 'runToolsScriptsBeforeGuestShutdown' in kwargs: + run_tools_scripts_before_guest_shutdown = kwargs['runToolsScriptsBeforeGuestShutdown'] + if run_tools_scripts_before_guest_standby is None and 'runToolsScriptsBeforeGuestStandby' in kwargs: + run_tools_scripts_before_guest_standby = kwargs['runToolsScriptsBeforeGuestStandby'] + if sata_controller_count is None and 'sataControllerCount' in kwargs: + sata_controller_count = kwargs['sataControllerCount'] + if scsi_bus_sharing is None and 'scsiBusSharing' in kwargs: + scsi_bus_sharing = kwargs['scsiBusSharing'] + if scsi_controller_count is None and 'scsiControllerCount' in kwargs: + scsi_controller_count = kwargs['scsiControllerCount'] + if scsi_type is None and 'scsiType' in kwargs: + scsi_type = kwargs['scsiType'] + if shutdown_wait_timeout is None and 'shutdownWaitTimeout' in kwargs: + shutdown_wait_timeout = kwargs['shutdownWaitTimeout'] + if storage_policy_id is None and 'storagePolicyId' in kwargs: + storage_policy_id = kwargs['storagePolicyId'] + if swap_placement_policy is None and 'swapPlacementPolicy' in kwargs: + swap_placement_policy = kwargs['swapPlacementPolicy'] + if sync_time_with_host is None and 'syncTimeWithHost' in kwargs: + sync_time_with_host = kwargs['syncTimeWithHost'] + if sync_time_with_host_periodically is None and 'syncTimeWithHostPeriodically' in kwargs: + sync_time_with_host_periodically = kwargs['syncTimeWithHostPeriodically'] + if tools_upgrade_policy is None and 'toolsUpgradePolicy' in kwargs: + tools_upgrade_policy = kwargs['toolsUpgradePolicy'] + if vbs_enabled is None and 'vbsEnabled' in kwargs: + vbs_enabled = kwargs['vbsEnabled'] + if vvtd_enabled is None and 'vvtdEnabled' in kwargs: + vvtd_enabled = kwargs['vvtdEnabled'] + if wait_for_guest_ip_timeout is None and 'waitForGuestIpTimeout' in kwargs: + wait_for_guest_ip_timeout = kwargs['waitForGuestIpTimeout'] + if wait_for_guest_net_routable is None and 'waitForGuestNetRoutable' in kwargs: + wait_for_guest_net_routable = kwargs['waitForGuestNetRoutable'] + if wait_for_guest_net_timeout is None and 'waitForGuestNetTimeout' in kwargs: + wait_for_guest_net_timeout = kwargs['waitForGuestNetTimeout'] + + _setter("resource_pool_id", resource_pool_id) if alternate_guest_name is not None: - pulumi.set(__self__, "alternate_guest_name", alternate_guest_name) + _setter("alternate_guest_name", alternate_guest_name) if annotation is not None: - pulumi.set(__self__, "annotation", annotation) + _setter("annotation", annotation) if boot_delay is not None: - pulumi.set(__self__, "boot_delay", boot_delay) + _setter("boot_delay", boot_delay) if boot_retry_delay is not None: - pulumi.set(__self__, "boot_retry_delay", boot_retry_delay) + _setter("boot_retry_delay", boot_retry_delay) if boot_retry_enabled is not None: - pulumi.set(__self__, "boot_retry_enabled", boot_retry_enabled) + _setter("boot_retry_enabled", boot_retry_enabled) if cdroms is not None: - pulumi.set(__self__, "cdroms", cdroms) + _setter("cdroms", cdroms) if clone is not None: - pulumi.set(__self__, "clone", clone) + _setter("clone", clone) if cpu_hot_add_enabled is not None: - pulumi.set(__self__, "cpu_hot_add_enabled", cpu_hot_add_enabled) + _setter("cpu_hot_add_enabled", cpu_hot_add_enabled) if cpu_hot_remove_enabled is not None: - pulumi.set(__self__, "cpu_hot_remove_enabled", cpu_hot_remove_enabled) + _setter("cpu_hot_remove_enabled", cpu_hot_remove_enabled) if cpu_limit is not None: - pulumi.set(__self__, "cpu_limit", cpu_limit) + _setter("cpu_limit", cpu_limit) if cpu_performance_counters_enabled is not None: - pulumi.set(__self__, "cpu_performance_counters_enabled", cpu_performance_counters_enabled) + _setter("cpu_performance_counters_enabled", cpu_performance_counters_enabled) if cpu_reservation is not None: - pulumi.set(__self__, "cpu_reservation", cpu_reservation) + _setter("cpu_reservation", cpu_reservation) if cpu_share_count is not None: - pulumi.set(__self__, "cpu_share_count", cpu_share_count) + _setter("cpu_share_count", cpu_share_count) if cpu_share_level is not None: - pulumi.set(__self__, "cpu_share_level", cpu_share_level) + _setter("cpu_share_level", cpu_share_level) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datacenter_id is not None: - pulumi.set(__self__, "datacenter_id", datacenter_id) + _setter("datacenter_id", datacenter_id) if datastore_cluster_id is not None: - pulumi.set(__self__, "datastore_cluster_id", datastore_cluster_id) + _setter("datastore_cluster_id", datastore_cluster_id) if datastore_id is not None: - pulumi.set(__self__, "datastore_id", datastore_id) + _setter("datastore_id", datastore_id) if disks is not None: - pulumi.set(__self__, "disks", disks) + _setter("disks", disks) if efi_secure_boot_enabled is not None: - pulumi.set(__self__, "efi_secure_boot_enabled", efi_secure_boot_enabled) + _setter("efi_secure_boot_enabled", efi_secure_boot_enabled) if enable_disk_uuid is not None: - pulumi.set(__self__, "enable_disk_uuid", enable_disk_uuid) + _setter("enable_disk_uuid", enable_disk_uuid) if enable_logging is not None: - pulumi.set(__self__, "enable_logging", enable_logging) + _setter("enable_logging", enable_logging) if ept_rvi_mode is not None: - pulumi.set(__self__, "ept_rvi_mode", ept_rvi_mode) + _setter("ept_rvi_mode", ept_rvi_mode) if extra_config is not None: - pulumi.set(__self__, "extra_config", extra_config) + _setter("extra_config", extra_config) if extra_config_reboot_required is not None: - pulumi.set(__self__, "extra_config_reboot_required", extra_config_reboot_required) + _setter("extra_config_reboot_required", extra_config_reboot_required) if firmware is not None: - pulumi.set(__self__, "firmware", firmware) + _setter("firmware", firmware) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if force_power_off is not None: - pulumi.set(__self__, "force_power_off", force_power_off) + _setter("force_power_off", force_power_off) if guest_id is not None: - pulumi.set(__self__, "guest_id", guest_id) + _setter("guest_id", guest_id) if hardware_version is not None: - pulumi.set(__self__, "hardware_version", hardware_version) + _setter("hardware_version", hardware_version) if host_system_id is not None: - pulumi.set(__self__, "host_system_id", host_system_id) + _setter("host_system_id", host_system_id) if hv_mode is not None: - pulumi.set(__self__, "hv_mode", hv_mode) + _setter("hv_mode", hv_mode) if ide_controller_count is not None: - pulumi.set(__self__, "ide_controller_count", ide_controller_count) + _setter("ide_controller_count", ide_controller_count) if ignored_guest_ips is not None: - pulumi.set(__self__, "ignored_guest_ips", ignored_guest_ips) + _setter("ignored_guest_ips", ignored_guest_ips) if latency_sensitivity is not None: - pulumi.set(__self__, "latency_sensitivity", latency_sensitivity) + _setter("latency_sensitivity", latency_sensitivity) if memory is not None: - pulumi.set(__self__, "memory", memory) + _setter("memory", memory) if memory_hot_add_enabled is not None: - pulumi.set(__self__, "memory_hot_add_enabled", memory_hot_add_enabled) + _setter("memory_hot_add_enabled", memory_hot_add_enabled) if memory_limit is not None: - pulumi.set(__self__, "memory_limit", memory_limit) + _setter("memory_limit", memory_limit) if memory_reservation is not None: - pulumi.set(__self__, "memory_reservation", memory_reservation) + _setter("memory_reservation", memory_reservation) if memory_share_count is not None: - pulumi.set(__self__, "memory_share_count", memory_share_count) + _setter("memory_share_count", memory_share_count) if memory_share_level is not None: - pulumi.set(__self__, "memory_share_level", memory_share_level) + _setter("memory_share_level", memory_share_level) if migrate_wait_timeout is not None: - pulumi.set(__self__, "migrate_wait_timeout", migrate_wait_timeout) + _setter("migrate_wait_timeout", migrate_wait_timeout) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if nested_hv_enabled is not None: - pulumi.set(__self__, "nested_hv_enabled", nested_hv_enabled) + _setter("nested_hv_enabled", nested_hv_enabled) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if num_cores_per_socket is not None: - pulumi.set(__self__, "num_cores_per_socket", num_cores_per_socket) + _setter("num_cores_per_socket", num_cores_per_socket) if num_cpus is not None: - pulumi.set(__self__, "num_cpus", num_cpus) + _setter("num_cpus", num_cpus) if ovf_deploy is not None: - pulumi.set(__self__, "ovf_deploy", ovf_deploy) + _setter("ovf_deploy", ovf_deploy) if pci_device_ids is not None: - pulumi.set(__self__, "pci_device_ids", pci_device_ids) + _setter("pci_device_ids", pci_device_ids) if poweron_timeout is not None: - pulumi.set(__self__, "poweron_timeout", poweron_timeout) + _setter("poweron_timeout", poweron_timeout) if replace_trigger is not None: - pulumi.set(__self__, "replace_trigger", replace_trigger) + _setter("replace_trigger", replace_trigger) if run_tools_scripts_after_power_on is not None: - pulumi.set(__self__, "run_tools_scripts_after_power_on", run_tools_scripts_after_power_on) + _setter("run_tools_scripts_after_power_on", run_tools_scripts_after_power_on) if run_tools_scripts_after_resume is not None: - pulumi.set(__self__, "run_tools_scripts_after_resume", run_tools_scripts_after_resume) + _setter("run_tools_scripts_after_resume", run_tools_scripts_after_resume) if run_tools_scripts_before_guest_reboot is not None: - pulumi.set(__self__, "run_tools_scripts_before_guest_reboot", run_tools_scripts_before_guest_reboot) + _setter("run_tools_scripts_before_guest_reboot", run_tools_scripts_before_guest_reboot) if run_tools_scripts_before_guest_shutdown is not None: - pulumi.set(__self__, "run_tools_scripts_before_guest_shutdown", run_tools_scripts_before_guest_shutdown) + _setter("run_tools_scripts_before_guest_shutdown", run_tools_scripts_before_guest_shutdown) if run_tools_scripts_before_guest_standby is not None: - pulumi.set(__self__, "run_tools_scripts_before_guest_standby", run_tools_scripts_before_guest_standby) + _setter("run_tools_scripts_before_guest_standby", run_tools_scripts_before_guest_standby) if sata_controller_count is not None: - pulumi.set(__self__, "sata_controller_count", sata_controller_count) + _setter("sata_controller_count", sata_controller_count) if scsi_bus_sharing is not None: - pulumi.set(__self__, "scsi_bus_sharing", scsi_bus_sharing) + _setter("scsi_bus_sharing", scsi_bus_sharing) if scsi_controller_count is not None: - pulumi.set(__self__, "scsi_controller_count", scsi_controller_count) + _setter("scsi_controller_count", scsi_controller_count) if scsi_type is not None: - pulumi.set(__self__, "scsi_type", scsi_type) + _setter("scsi_type", scsi_type) if shutdown_wait_timeout is not None: - pulumi.set(__self__, "shutdown_wait_timeout", shutdown_wait_timeout) + _setter("shutdown_wait_timeout", shutdown_wait_timeout) if storage_policy_id is not None: - pulumi.set(__self__, "storage_policy_id", storage_policy_id) + _setter("storage_policy_id", storage_policy_id) if swap_placement_policy is not None: - pulumi.set(__self__, "swap_placement_policy", swap_placement_policy) + _setter("swap_placement_policy", swap_placement_policy) if sync_time_with_host is not None: - pulumi.set(__self__, "sync_time_with_host", sync_time_with_host) + _setter("sync_time_with_host", sync_time_with_host) if sync_time_with_host_periodically is not None: - pulumi.set(__self__, "sync_time_with_host_periodically", sync_time_with_host_periodically) + _setter("sync_time_with_host_periodically", sync_time_with_host_periodically) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tools_upgrade_policy is not None: - pulumi.set(__self__, "tools_upgrade_policy", tools_upgrade_policy) + _setter("tools_upgrade_policy", tools_upgrade_policy) if vapp is not None: - pulumi.set(__self__, "vapp", vapp) + _setter("vapp", vapp) if vbs_enabled is not None: - pulumi.set(__self__, "vbs_enabled", vbs_enabled) + _setter("vbs_enabled", vbs_enabled) if vvtd_enabled is not None: - pulumi.set(__self__, "vvtd_enabled", vvtd_enabled) + _setter("vvtd_enabled", vvtd_enabled) if wait_for_guest_ip_timeout is not None: - pulumi.set(__self__, "wait_for_guest_ip_timeout", wait_for_guest_ip_timeout) + _setter("wait_for_guest_ip_timeout", wait_for_guest_ip_timeout) if wait_for_guest_net_routable is not None: - pulumi.set(__self__, "wait_for_guest_net_routable", wait_for_guest_net_routable) + _setter("wait_for_guest_net_routable", wait_for_guest_net_routable) if wait_for_guest_net_timeout is not None: - pulumi.set(__self__, "wait_for_guest_net_timeout", wait_for_guest_net_timeout) + _setter("wait_for_guest_net_timeout", wait_for_guest_net_timeout) @property @pulumi.getter(name="resourcePoolId") @@ -1497,176 +1784,499 @@ def __init__(__self__, *, :param pulumi.Input[bool] wait_for_guest_net_routable: Controls whether or not the guest network waiter waits for a routable address. When `false`, the waiter does not wait for a default gateway, nor are IP addresses checked against any discovered default gateways as part of its success criteria. This property is ignored if the `wait_for_guest_ip_timeout` waiter is used. Default: `true`. :param pulumi.Input[int] wait_for_guest_net_timeout: The amount of time, in minutes, to wait for an available guest IP address on the virtual machine. Older versions of VMware Tools do not populate this property. In those cases, this waiter can be disabled and the `wait_for_guest_ip_timeout` waiter can be used instead. A value less than `1` disables the waiter. Default: `5` minutes. """ + _VirtualMachineState._configure( + lambda key, value: pulumi.set(__self__, key, value), + alternate_guest_name=alternate_guest_name, + annotation=annotation, + boot_delay=boot_delay, + boot_retry_delay=boot_retry_delay, + boot_retry_enabled=boot_retry_enabled, + cdroms=cdroms, + change_version=change_version, + clone=clone, + cpu_hot_add_enabled=cpu_hot_add_enabled, + cpu_hot_remove_enabled=cpu_hot_remove_enabled, + cpu_limit=cpu_limit, + cpu_performance_counters_enabled=cpu_performance_counters_enabled, + cpu_reservation=cpu_reservation, + cpu_share_count=cpu_share_count, + cpu_share_level=cpu_share_level, + custom_attributes=custom_attributes, + datacenter_id=datacenter_id, + datastore_cluster_id=datastore_cluster_id, + datastore_id=datastore_id, + default_ip_address=default_ip_address, + disks=disks, + efi_secure_boot_enabled=efi_secure_boot_enabled, + enable_disk_uuid=enable_disk_uuid, + enable_logging=enable_logging, + ept_rvi_mode=ept_rvi_mode, + extra_config=extra_config, + extra_config_reboot_required=extra_config_reboot_required, + firmware=firmware, + folder=folder, + force_power_off=force_power_off, + guest_id=guest_id, + guest_ip_addresses=guest_ip_addresses, + hardware_version=hardware_version, + host_system_id=host_system_id, + hv_mode=hv_mode, + ide_controller_count=ide_controller_count, + ignored_guest_ips=ignored_guest_ips, + imported=imported, + latency_sensitivity=latency_sensitivity, + memory=memory, + memory_hot_add_enabled=memory_hot_add_enabled, + memory_limit=memory_limit, + memory_reservation=memory_reservation, + memory_share_count=memory_share_count, + memory_share_level=memory_share_level, + migrate_wait_timeout=migrate_wait_timeout, + moid=moid, + name=name, + nested_hv_enabled=nested_hv_enabled, + network_interfaces=network_interfaces, + num_cores_per_socket=num_cores_per_socket, + num_cpus=num_cpus, + ovf_deploy=ovf_deploy, + pci_device_ids=pci_device_ids, + power_state=power_state, + poweron_timeout=poweron_timeout, + reboot_required=reboot_required, + replace_trigger=replace_trigger, + resource_pool_id=resource_pool_id, + run_tools_scripts_after_power_on=run_tools_scripts_after_power_on, + run_tools_scripts_after_resume=run_tools_scripts_after_resume, + run_tools_scripts_before_guest_reboot=run_tools_scripts_before_guest_reboot, + run_tools_scripts_before_guest_shutdown=run_tools_scripts_before_guest_shutdown, + run_tools_scripts_before_guest_standby=run_tools_scripts_before_guest_standby, + sata_controller_count=sata_controller_count, + scsi_bus_sharing=scsi_bus_sharing, + scsi_controller_count=scsi_controller_count, + scsi_type=scsi_type, + shutdown_wait_timeout=shutdown_wait_timeout, + storage_policy_id=storage_policy_id, + swap_placement_policy=swap_placement_policy, + sync_time_with_host=sync_time_with_host, + sync_time_with_host_periodically=sync_time_with_host_periodically, + tags=tags, + tools_upgrade_policy=tools_upgrade_policy, + uuid=uuid, + vapp=vapp, + vapp_transports=vapp_transports, + vbs_enabled=vbs_enabled, + vmware_tools_status=vmware_tools_status, + vmx_path=vmx_path, + vvtd_enabled=vvtd_enabled, + wait_for_guest_ip_timeout=wait_for_guest_ip_timeout, + wait_for_guest_net_routable=wait_for_guest_net_routable, + wait_for_guest_net_timeout=wait_for_guest_net_timeout, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + alternate_guest_name: Optional[pulumi.Input[str]] = None, + annotation: Optional[pulumi.Input[str]] = None, + boot_delay: Optional[pulumi.Input[int]] = None, + boot_retry_delay: Optional[pulumi.Input[int]] = None, + boot_retry_enabled: Optional[pulumi.Input[bool]] = None, + cdroms: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineCdromArgs']]]] = None, + change_version: Optional[pulumi.Input[str]] = None, + clone: Optional[pulumi.Input['VirtualMachineCloneArgs']] = None, + cpu_hot_add_enabled: Optional[pulumi.Input[bool]] = None, + cpu_hot_remove_enabled: Optional[pulumi.Input[bool]] = None, + cpu_limit: Optional[pulumi.Input[int]] = None, + cpu_performance_counters_enabled: Optional[pulumi.Input[bool]] = None, + cpu_reservation: Optional[pulumi.Input[int]] = None, + cpu_share_count: Optional[pulumi.Input[int]] = None, + cpu_share_level: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datacenter_id: Optional[pulumi.Input[str]] = None, + datastore_cluster_id: Optional[pulumi.Input[str]] = None, + datastore_id: Optional[pulumi.Input[str]] = None, + default_ip_address: Optional[pulumi.Input[str]] = None, + disks: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineDiskArgs']]]] = None, + efi_secure_boot_enabled: Optional[pulumi.Input[bool]] = None, + enable_disk_uuid: Optional[pulumi.Input[bool]] = None, + enable_logging: Optional[pulumi.Input[bool]] = None, + ept_rvi_mode: Optional[pulumi.Input[str]] = None, + extra_config: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + extra_config_reboot_required: Optional[pulumi.Input[bool]] = None, + firmware: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + force_power_off: Optional[pulumi.Input[bool]] = None, + guest_id: Optional[pulumi.Input[str]] = None, + guest_ip_addresses: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + hardware_version: Optional[pulumi.Input[int]] = None, + host_system_id: Optional[pulumi.Input[str]] = None, + hv_mode: Optional[pulumi.Input[str]] = None, + ide_controller_count: Optional[pulumi.Input[int]] = None, + ignored_guest_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + imported: Optional[pulumi.Input[bool]] = None, + latency_sensitivity: Optional[pulumi.Input[str]] = None, + memory: Optional[pulumi.Input[int]] = None, + memory_hot_add_enabled: Optional[pulumi.Input[bool]] = None, + memory_limit: Optional[pulumi.Input[int]] = None, + memory_reservation: Optional[pulumi.Input[int]] = None, + memory_share_count: Optional[pulumi.Input[int]] = None, + memory_share_level: Optional[pulumi.Input[str]] = None, + migrate_wait_timeout: Optional[pulumi.Input[int]] = None, + moid: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + nested_hv_enabled: Optional[pulumi.Input[bool]] = None, + network_interfaces: Optional[pulumi.Input[Sequence[pulumi.Input['VirtualMachineNetworkInterfaceArgs']]]] = None, + num_cores_per_socket: Optional[pulumi.Input[int]] = None, + num_cpus: Optional[pulumi.Input[int]] = None, + ovf_deploy: Optional[pulumi.Input['VirtualMachineOvfDeployArgs']] = None, + pci_device_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + power_state: Optional[pulumi.Input[str]] = None, + poweron_timeout: Optional[pulumi.Input[int]] = None, + reboot_required: Optional[pulumi.Input[bool]] = None, + replace_trigger: Optional[pulumi.Input[str]] = None, + resource_pool_id: Optional[pulumi.Input[str]] = None, + run_tools_scripts_after_power_on: Optional[pulumi.Input[bool]] = None, + run_tools_scripts_after_resume: Optional[pulumi.Input[bool]] = None, + run_tools_scripts_before_guest_reboot: Optional[pulumi.Input[bool]] = None, + run_tools_scripts_before_guest_shutdown: Optional[pulumi.Input[bool]] = None, + run_tools_scripts_before_guest_standby: Optional[pulumi.Input[bool]] = None, + sata_controller_count: Optional[pulumi.Input[int]] = None, + scsi_bus_sharing: Optional[pulumi.Input[str]] = None, + scsi_controller_count: Optional[pulumi.Input[int]] = None, + scsi_type: Optional[pulumi.Input[str]] = None, + shutdown_wait_timeout: Optional[pulumi.Input[int]] = None, + storage_policy_id: Optional[pulumi.Input[str]] = None, + swap_placement_policy: Optional[pulumi.Input[str]] = None, + sync_time_with_host: Optional[pulumi.Input[bool]] = None, + sync_time_with_host_periodically: Optional[pulumi.Input[bool]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tools_upgrade_policy: Optional[pulumi.Input[str]] = None, + uuid: Optional[pulumi.Input[str]] = None, + vapp: Optional[pulumi.Input['VirtualMachineVappArgs']] = None, + vapp_transports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + vbs_enabled: Optional[pulumi.Input[bool]] = None, + vmware_tools_status: Optional[pulumi.Input[str]] = None, + vmx_path: Optional[pulumi.Input[str]] = None, + vvtd_enabled: Optional[pulumi.Input[bool]] = None, + wait_for_guest_ip_timeout: Optional[pulumi.Input[int]] = None, + wait_for_guest_net_routable: Optional[pulumi.Input[bool]] = None, + wait_for_guest_net_timeout: Optional[pulumi.Input[int]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if alternate_guest_name is None and 'alternateGuestName' in kwargs: + alternate_guest_name = kwargs['alternateGuestName'] + if boot_delay is None and 'bootDelay' in kwargs: + boot_delay = kwargs['bootDelay'] + if boot_retry_delay is None and 'bootRetryDelay' in kwargs: + boot_retry_delay = kwargs['bootRetryDelay'] + if boot_retry_enabled is None and 'bootRetryEnabled' in kwargs: + boot_retry_enabled = kwargs['bootRetryEnabled'] + if change_version is None and 'changeVersion' in kwargs: + change_version = kwargs['changeVersion'] + if cpu_hot_add_enabled is None and 'cpuHotAddEnabled' in kwargs: + cpu_hot_add_enabled = kwargs['cpuHotAddEnabled'] + if cpu_hot_remove_enabled is None and 'cpuHotRemoveEnabled' in kwargs: + cpu_hot_remove_enabled = kwargs['cpuHotRemoveEnabled'] + if cpu_limit is None and 'cpuLimit' in kwargs: + cpu_limit = kwargs['cpuLimit'] + if cpu_performance_counters_enabled is None and 'cpuPerformanceCountersEnabled' in kwargs: + cpu_performance_counters_enabled = kwargs['cpuPerformanceCountersEnabled'] + if cpu_reservation is None and 'cpuReservation' in kwargs: + cpu_reservation = kwargs['cpuReservation'] + if cpu_share_count is None and 'cpuShareCount' in kwargs: + cpu_share_count = kwargs['cpuShareCount'] + if cpu_share_level is None and 'cpuShareLevel' in kwargs: + cpu_share_level = kwargs['cpuShareLevel'] + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if datacenter_id is None and 'datacenterId' in kwargs: + datacenter_id = kwargs['datacenterId'] + if datastore_cluster_id is None and 'datastoreClusterId' in kwargs: + datastore_cluster_id = kwargs['datastoreClusterId'] + if datastore_id is None and 'datastoreId' in kwargs: + datastore_id = kwargs['datastoreId'] + if default_ip_address is None and 'defaultIpAddress' in kwargs: + default_ip_address = kwargs['defaultIpAddress'] + if efi_secure_boot_enabled is None and 'efiSecureBootEnabled' in kwargs: + efi_secure_boot_enabled = kwargs['efiSecureBootEnabled'] + if enable_disk_uuid is None and 'enableDiskUuid' in kwargs: + enable_disk_uuid = kwargs['enableDiskUuid'] + if enable_logging is None and 'enableLogging' in kwargs: + enable_logging = kwargs['enableLogging'] + if ept_rvi_mode is None and 'eptRviMode' in kwargs: + ept_rvi_mode = kwargs['eptRviMode'] + if extra_config is None and 'extraConfig' in kwargs: + extra_config = kwargs['extraConfig'] + if extra_config_reboot_required is None and 'extraConfigRebootRequired' in kwargs: + extra_config_reboot_required = kwargs['extraConfigRebootRequired'] + if force_power_off is None and 'forcePowerOff' in kwargs: + force_power_off = kwargs['forcePowerOff'] + if guest_id is None and 'guestId' in kwargs: + guest_id = kwargs['guestId'] + if guest_ip_addresses is None and 'guestIpAddresses' in kwargs: + guest_ip_addresses = kwargs['guestIpAddresses'] + if hardware_version is None and 'hardwareVersion' in kwargs: + hardware_version = kwargs['hardwareVersion'] + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if hv_mode is None and 'hvMode' in kwargs: + hv_mode = kwargs['hvMode'] + if ide_controller_count is None and 'ideControllerCount' in kwargs: + ide_controller_count = kwargs['ideControllerCount'] + if ignored_guest_ips is None and 'ignoredGuestIps' in kwargs: + ignored_guest_ips = kwargs['ignoredGuestIps'] + if latency_sensitivity is None and 'latencySensitivity' in kwargs: + latency_sensitivity = kwargs['latencySensitivity'] + if memory_hot_add_enabled is None and 'memoryHotAddEnabled' in kwargs: + memory_hot_add_enabled = kwargs['memoryHotAddEnabled'] + if memory_limit is None and 'memoryLimit' in kwargs: + memory_limit = kwargs['memoryLimit'] + if memory_reservation is None and 'memoryReservation' in kwargs: + memory_reservation = kwargs['memoryReservation'] + if memory_share_count is None and 'memoryShareCount' in kwargs: + memory_share_count = kwargs['memoryShareCount'] + if memory_share_level is None and 'memoryShareLevel' in kwargs: + memory_share_level = kwargs['memoryShareLevel'] + if migrate_wait_timeout is None and 'migrateWaitTimeout' in kwargs: + migrate_wait_timeout = kwargs['migrateWaitTimeout'] + if nested_hv_enabled is None and 'nestedHvEnabled' in kwargs: + nested_hv_enabled = kwargs['nestedHvEnabled'] + if network_interfaces is None and 'networkInterfaces' in kwargs: + network_interfaces = kwargs['networkInterfaces'] + if num_cores_per_socket is None and 'numCoresPerSocket' in kwargs: + num_cores_per_socket = kwargs['numCoresPerSocket'] + if num_cpus is None and 'numCpus' in kwargs: + num_cpus = kwargs['numCpus'] + if ovf_deploy is None and 'ovfDeploy' in kwargs: + ovf_deploy = kwargs['ovfDeploy'] + if pci_device_ids is None and 'pciDeviceIds' in kwargs: + pci_device_ids = kwargs['pciDeviceIds'] + if power_state is None and 'powerState' in kwargs: + power_state = kwargs['powerState'] + if poweron_timeout is None and 'poweronTimeout' in kwargs: + poweron_timeout = kwargs['poweronTimeout'] + if reboot_required is None and 'rebootRequired' in kwargs: + reboot_required = kwargs['rebootRequired'] + if replace_trigger is None and 'replaceTrigger' in kwargs: + replace_trigger = kwargs['replaceTrigger'] + if resource_pool_id is None and 'resourcePoolId' in kwargs: + resource_pool_id = kwargs['resourcePoolId'] + if run_tools_scripts_after_power_on is None and 'runToolsScriptsAfterPowerOn' in kwargs: + run_tools_scripts_after_power_on = kwargs['runToolsScriptsAfterPowerOn'] + if run_tools_scripts_after_resume is None and 'runToolsScriptsAfterResume' in kwargs: + run_tools_scripts_after_resume = kwargs['runToolsScriptsAfterResume'] + if run_tools_scripts_before_guest_reboot is None and 'runToolsScriptsBeforeGuestReboot' in kwargs: + run_tools_scripts_before_guest_reboot = kwargs['runToolsScriptsBeforeGuestReboot'] + if run_tools_scripts_before_guest_shutdown is None and 'runToolsScriptsBeforeGuestShutdown' in kwargs: + run_tools_scripts_before_guest_shutdown = kwargs['runToolsScriptsBeforeGuestShutdown'] + if run_tools_scripts_before_guest_standby is None and 'runToolsScriptsBeforeGuestStandby' in kwargs: + run_tools_scripts_before_guest_standby = kwargs['runToolsScriptsBeforeGuestStandby'] + if sata_controller_count is None and 'sataControllerCount' in kwargs: + sata_controller_count = kwargs['sataControllerCount'] + if scsi_bus_sharing is None and 'scsiBusSharing' in kwargs: + scsi_bus_sharing = kwargs['scsiBusSharing'] + if scsi_controller_count is None and 'scsiControllerCount' in kwargs: + scsi_controller_count = kwargs['scsiControllerCount'] + if scsi_type is None and 'scsiType' in kwargs: + scsi_type = kwargs['scsiType'] + if shutdown_wait_timeout is None and 'shutdownWaitTimeout' in kwargs: + shutdown_wait_timeout = kwargs['shutdownWaitTimeout'] + if storage_policy_id is None and 'storagePolicyId' in kwargs: + storage_policy_id = kwargs['storagePolicyId'] + if swap_placement_policy is None and 'swapPlacementPolicy' in kwargs: + swap_placement_policy = kwargs['swapPlacementPolicy'] + if sync_time_with_host is None and 'syncTimeWithHost' in kwargs: + sync_time_with_host = kwargs['syncTimeWithHost'] + if sync_time_with_host_periodically is None and 'syncTimeWithHostPeriodically' in kwargs: + sync_time_with_host_periodically = kwargs['syncTimeWithHostPeriodically'] + if tools_upgrade_policy is None and 'toolsUpgradePolicy' in kwargs: + tools_upgrade_policy = kwargs['toolsUpgradePolicy'] + if vapp_transports is None and 'vappTransports' in kwargs: + vapp_transports = kwargs['vappTransports'] + if vbs_enabled is None and 'vbsEnabled' in kwargs: + vbs_enabled = kwargs['vbsEnabled'] + if vmware_tools_status is None and 'vmwareToolsStatus' in kwargs: + vmware_tools_status = kwargs['vmwareToolsStatus'] + if vmx_path is None and 'vmxPath' in kwargs: + vmx_path = kwargs['vmxPath'] + if vvtd_enabled is None and 'vvtdEnabled' in kwargs: + vvtd_enabled = kwargs['vvtdEnabled'] + if wait_for_guest_ip_timeout is None and 'waitForGuestIpTimeout' in kwargs: + wait_for_guest_ip_timeout = kwargs['waitForGuestIpTimeout'] + if wait_for_guest_net_routable is None and 'waitForGuestNetRoutable' in kwargs: + wait_for_guest_net_routable = kwargs['waitForGuestNetRoutable'] + if wait_for_guest_net_timeout is None and 'waitForGuestNetTimeout' in kwargs: + wait_for_guest_net_timeout = kwargs['waitForGuestNetTimeout'] + if alternate_guest_name is not None: - pulumi.set(__self__, "alternate_guest_name", alternate_guest_name) + _setter("alternate_guest_name", alternate_guest_name) if annotation is not None: - pulumi.set(__self__, "annotation", annotation) + _setter("annotation", annotation) if boot_delay is not None: - pulumi.set(__self__, "boot_delay", boot_delay) + _setter("boot_delay", boot_delay) if boot_retry_delay is not None: - pulumi.set(__self__, "boot_retry_delay", boot_retry_delay) + _setter("boot_retry_delay", boot_retry_delay) if boot_retry_enabled is not None: - pulumi.set(__self__, "boot_retry_enabled", boot_retry_enabled) + _setter("boot_retry_enabled", boot_retry_enabled) if cdroms is not None: - pulumi.set(__self__, "cdroms", cdroms) + _setter("cdroms", cdroms) if change_version is not None: - pulumi.set(__self__, "change_version", change_version) + _setter("change_version", change_version) if clone is not None: - pulumi.set(__self__, "clone", clone) + _setter("clone", clone) if cpu_hot_add_enabled is not None: - pulumi.set(__self__, "cpu_hot_add_enabled", cpu_hot_add_enabled) + _setter("cpu_hot_add_enabled", cpu_hot_add_enabled) if cpu_hot_remove_enabled is not None: - pulumi.set(__self__, "cpu_hot_remove_enabled", cpu_hot_remove_enabled) + _setter("cpu_hot_remove_enabled", cpu_hot_remove_enabled) if cpu_limit is not None: - pulumi.set(__self__, "cpu_limit", cpu_limit) + _setter("cpu_limit", cpu_limit) if cpu_performance_counters_enabled is not None: - pulumi.set(__self__, "cpu_performance_counters_enabled", cpu_performance_counters_enabled) + _setter("cpu_performance_counters_enabled", cpu_performance_counters_enabled) if cpu_reservation is not None: - pulumi.set(__self__, "cpu_reservation", cpu_reservation) + _setter("cpu_reservation", cpu_reservation) if cpu_share_count is not None: - pulumi.set(__self__, "cpu_share_count", cpu_share_count) + _setter("cpu_share_count", cpu_share_count) if cpu_share_level is not None: - pulumi.set(__self__, "cpu_share_level", cpu_share_level) + _setter("cpu_share_level", cpu_share_level) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datacenter_id is not None: - pulumi.set(__self__, "datacenter_id", datacenter_id) + _setter("datacenter_id", datacenter_id) if datastore_cluster_id is not None: - pulumi.set(__self__, "datastore_cluster_id", datastore_cluster_id) + _setter("datastore_cluster_id", datastore_cluster_id) if datastore_id is not None: - pulumi.set(__self__, "datastore_id", datastore_id) + _setter("datastore_id", datastore_id) if default_ip_address is not None: - pulumi.set(__self__, "default_ip_address", default_ip_address) + _setter("default_ip_address", default_ip_address) if disks is not None: - pulumi.set(__self__, "disks", disks) + _setter("disks", disks) if efi_secure_boot_enabled is not None: - pulumi.set(__self__, "efi_secure_boot_enabled", efi_secure_boot_enabled) + _setter("efi_secure_boot_enabled", efi_secure_boot_enabled) if enable_disk_uuid is not None: - pulumi.set(__self__, "enable_disk_uuid", enable_disk_uuid) + _setter("enable_disk_uuid", enable_disk_uuid) if enable_logging is not None: - pulumi.set(__self__, "enable_logging", enable_logging) + _setter("enable_logging", enable_logging) if ept_rvi_mode is not None: - pulumi.set(__self__, "ept_rvi_mode", ept_rvi_mode) + _setter("ept_rvi_mode", ept_rvi_mode) if extra_config is not None: - pulumi.set(__self__, "extra_config", extra_config) + _setter("extra_config", extra_config) if extra_config_reboot_required is not None: - pulumi.set(__self__, "extra_config_reboot_required", extra_config_reboot_required) + _setter("extra_config_reboot_required", extra_config_reboot_required) if firmware is not None: - pulumi.set(__self__, "firmware", firmware) + _setter("firmware", firmware) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if force_power_off is not None: - pulumi.set(__self__, "force_power_off", force_power_off) + _setter("force_power_off", force_power_off) if guest_id is not None: - pulumi.set(__self__, "guest_id", guest_id) + _setter("guest_id", guest_id) if guest_ip_addresses is not None: - pulumi.set(__self__, "guest_ip_addresses", guest_ip_addresses) + _setter("guest_ip_addresses", guest_ip_addresses) if hardware_version is not None: - pulumi.set(__self__, "hardware_version", hardware_version) + _setter("hardware_version", hardware_version) if host_system_id is not None: - pulumi.set(__self__, "host_system_id", host_system_id) + _setter("host_system_id", host_system_id) if hv_mode is not None: - pulumi.set(__self__, "hv_mode", hv_mode) + _setter("hv_mode", hv_mode) if ide_controller_count is not None: - pulumi.set(__self__, "ide_controller_count", ide_controller_count) + _setter("ide_controller_count", ide_controller_count) if ignored_guest_ips is not None: - pulumi.set(__self__, "ignored_guest_ips", ignored_guest_ips) + _setter("ignored_guest_ips", ignored_guest_ips) if imported is not None: - pulumi.set(__self__, "imported", imported) + _setter("imported", imported) if latency_sensitivity is not None: - pulumi.set(__self__, "latency_sensitivity", latency_sensitivity) + _setter("latency_sensitivity", latency_sensitivity) if memory is not None: - pulumi.set(__self__, "memory", memory) + _setter("memory", memory) if memory_hot_add_enabled is not None: - pulumi.set(__self__, "memory_hot_add_enabled", memory_hot_add_enabled) + _setter("memory_hot_add_enabled", memory_hot_add_enabled) if memory_limit is not None: - pulumi.set(__self__, "memory_limit", memory_limit) + _setter("memory_limit", memory_limit) if memory_reservation is not None: - pulumi.set(__self__, "memory_reservation", memory_reservation) + _setter("memory_reservation", memory_reservation) if memory_share_count is not None: - pulumi.set(__self__, "memory_share_count", memory_share_count) + _setter("memory_share_count", memory_share_count) if memory_share_level is not None: - pulumi.set(__self__, "memory_share_level", memory_share_level) + _setter("memory_share_level", memory_share_level) if migrate_wait_timeout is not None: - pulumi.set(__self__, "migrate_wait_timeout", migrate_wait_timeout) + _setter("migrate_wait_timeout", migrate_wait_timeout) if moid is not None: - pulumi.set(__self__, "moid", moid) + _setter("moid", moid) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if nested_hv_enabled is not None: - pulumi.set(__self__, "nested_hv_enabled", nested_hv_enabled) + _setter("nested_hv_enabled", nested_hv_enabled) if network_interfaces is not None: - pulumi.set(__self__, "network_interfaces", network_interfaces) + _setter("network_interfaces", network_interfaces) if num_cores_per_socket is not None: - pulumi.set(__self__, "num_cores_per_socket", num_cores_per_socket) + _setter("num_cores_per_socket", num_cores_per_socket) if num_cpus is not None: - pulumi.set(__self__, "num_cpus", num_cpus) + _setter("num_cpus", num_cpus) if ovf_deploy is not None: - pulumi.set(__self__, "ovf_deploy", ovf_deploy) + _setter("ovf_deploy", ovf_deploy) if pci_device_ids is not None: - pulumi.set(__self__, "pci_device_ids", pci_device_ids) + _setter("pci_device_ids", pci_device_ids) if power_state is not None: - pulumi.set(__self__, "power_state", power_state) + _setter("power_state", power_state) if poweron_timeout is not None: - pulumi.set(__self__, "poweron_timeout", poweron_timeout) + _setter("poweron_timeout", poweron_timeout) if reboot_required is not None: - pulumi.set(__self__, "reboot_required", reboot_required) + _setter("reboot_required", reboot_required) if replace_trigger is not None: - pulumi.set(__self__, "replace_trigger", replace_trigger) + _setter("replace_trigger", replace_trigger) if resource_pool_id is not None: - pulumi.set(__self__, "resource_pool_id", resource_pool_id) + _setter("resource_pool_id", resource_pool_id) if run_tools_scripts_after_power_on is not None: - pulumi.set(__self__, "run_tools_scripts_after_power_on", run_tools_scripts_after_power_on) + _setter("run_tools_scripts_after_power_on", run_tools_scripts_after_power_on) if run_tools_scripts_after_resume is not None: - pulumi.set(__self__, "run_tools_scripts_after_resume", run_tools_scripts_after_resume) + _setter("run_tools_scripts_after_resume", run_tools_scripts_after_resume) if run_tools_scripts_before_guest_reboot is not None: - pulumi.set(__self__, "run_tools_scripts_before_guest_reboot", run_tools_scripts_before_guest_reboot) + _setter("run_tools_scripts_before_guest_reboot", run_tools_scripts_before_guest_reboot) if run_tools_scripts_before_guest_shutdown is not None: - pulumi.set(__self__, "run_tools_scripts_before_guest_shutdown", run_tools_scripts_before_guest_shutdown) + _setter("run_tools_scripts_before_guest_shutdown", run_tools_scripts_before_guest_shutdown) if run_tools_scripts_before_guest_standby is not None: - pulumi.set(__self__, "run_tools_scripts_before_guest_standby", run_tools_scripts_before_guest_standby) + _setter("run_tools_scripts_before_guest_standby", run_tools_scripts_before_guest_standby) if sata_controller_count is not None: - pulumi.set(__self__, "sata_controller_count", sata_controller_count) + _setter("sata_controller_count", sata_controller_count) if scsi_bus_sharing is not None: - pulumi.set(__self__, "scsi_bus_sharing", scsi_bus_sharing) + _setter("scsi_bus_sharing", scsi_bus_sharing) if scsi_controller_count is not None: - pulumi.set(__self__, "scsi_controller_count", scsi_controller_count) + _setter("scsi_controller_count", scsi_controller_count) if scsi_type is not None: - pulumi.set(__self__, "scsi_type", scsi_type) + _setter("scsi_type", scsi_type) if shutdown_wait_timeout is not None: - pulumi.set(__self__, "shutdown_wait_timeout", shutdown_wait_timeout) + _setter("shutdown_wait_timeout", shutdown_wait_timeout) if storage_policy_id is not None: - pulumi.set(__self__, "storage_policy_id", storage_policy_id) + _setter("storage_policy_id", storage_policy_id) if swap_placement_policy is not None: - pulumi.set(__self__, "swap_placement_policy", swap_placement_policy) + _setter("swap_placement_policy", swap_placement_policy) if sync_time_with_host is not None: - pulumi.set(__self__, "sync_time_with_host", sync_time_with_host) + _setter("sync_time_with_host", sync_time_with_host) if sync_time_with_host_periodically is not None: - pulumi.set(__self__, "sync_time_with_host_periodically", sync_time_with_host_periodically) + _setter("sync_time_with_host_periodically", sync_time_with_host_periodically) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if tools_upgrade_policy is not None: - pulumi.set(__self__, "tools_upgrade_policy", tools_upgrade_policy) + _setter("tools_upgrade_policy", tools_upgrade_policy) if uuid is not None: - pulumi.set(__self__, "uuid", uuid) + _setter("uuid", uuid) if vapp is not None: - pulumi.set(__self__, "vapp", vapp) + _setter("vapp", vapp) if vapp_transports is not None: - pulumi.set(__self__, "vapp_transports", vapp_transports) + _setter("vapp_transports", vapp_transports) if vbs_enabled is not None: - pulumi.set(__self__, "vbs_enabled", vbs_enabled) + _setter("vbs_enabled", vbs_enabled) if vmware_tools_status is not None: - pulumi.set(__self__, "vmware_tools_status", vmware_tools_status) + _setter("vmware_tools_status", vmware_tools_status) if vmx_path is not None: - pulumi.set(__self__, "vmx_path", vmx_path) + _setter("vmx_path", vmx_path) if vvtd_enabled is not None: - pulumi.set(__self__, "vvtd_enabled", vvtd_enabled) + _setter("vvtd_enabled", vvtd_enabled) if wait_for_guest_ip_timeout is not None: - pulumi.set(__self__, "wait_for_guest_ip_timeout", wait_for_guest_ip_timeout) + _setter("wait_for_guest_ip_timeout", wait_for_guest_ip_timeout) if wait_for_guest_net_routable is not None: - pulumi.set(__self__, "wait_for_guest_net_routable", wait_for_guest_net_routable) + _setter("wait_for_guest_net_routable", wait_for_guest_net_routable) if wait_for_guest_net_timeout is not None: - pulumi.set(__self__, "wait_for_guest_net_timeout", wait_for_guest_net_timeout) + _setter("wait_for_guest_net_timeout", wait_for_guest_net_timeout) @property @pulumi.getter(name="alternateGuestName") @@ -2944,6 +3554,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualMachineArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -3038,6 +3652,11 @@ def _internal_init(__self__, __props__.__dict__["boot_retry_delay"] = boot_retry_delay __props__.__dict__["boot_retry_enabled"] = boot_retry_enabled __props__.__dict__["cdroms"] = cdroms + if clone is not None and not isinstance(clone, VirtualMachineCloneArgs): + clone = clone or {} + def _setter(key, value): + clone[key] = value + VirtualMachineCloneArgs._configure(_setter, **clone) __props__.__dict__["clone"] = clone __props__.__dict__["cpu_hot_add_enabled"] = cpu_hot_add_enabled __props__.__dict__["cpu_hot_remove_enabled"] = cpu_hot_remove_enabled @@ -3079,6 +3698,11 @@ def _internal_init(__self__, __props__.__dict__["network_interfaces"] = network_interfaces __props__.__dict__["num_cores_per_socket"] = num_cores_per_socket __props__.__dict__["num_cpus"] = num_cpus + if ovf_deploy is not None and not isinstance(ovf_deploy, VirtualMachineOvfDeployArgs): + ovf_deploy = ovf_deploy or {} + def _setter(key, value): + ovf_deploy[key] = value + VirtualMachineOvfDeployArgs._configure(_setter, **ovf_deploy) __props__.__dict__["ovf_deploy"] = ovf_deploy __props__.__dict__["pci_device_ids"] = pci_device_ids __props__.__dict__["poweron_timeout"] = poweron_timeout @@ -3102,6 +3726,11 @@ def _internal_init(__self__, __props__.__dict__["sync_time_with_host_periodically"] = sync_time_with_host_periodically __props__.__dict__["tags"] = tags __props__.__dict__["tools_upgrade_policy"] = tools_upgrade_policy + if vapp is not None and not isinstance(vapp, VirtualMachineVappArgs): + vapp = vapp or {} + def _setter(key, value): + vapp[key] = value + VirtualMachineVappArgs._configure(_setter, **vapp) __props__.__dict__["vapp"] = vapp __props__.__dict__["vbs_enabled"] = vbs_enabled __props__.__dict__["vvtd_enabled"] = vvtd_enabled diff --git a/sdk/python/pulumi_vsphere/virtual_machine_snapshot.py b/sdk/python/pulumi_vsphere/virtual_machine_snapshot.py index a62cf948..63d4df6d 100644 --- a/sdk/python/pulumi_vsphere/virtual_machine_snapshot.py +++ b/sdk/python/pulumi_vsphere/virtual_machine_snapshot.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['VirtualMachineSnapshotArgs', 'VirtualMachineSnapshot'] @@ -37,15 +37,54 @@ def __init__(__self__, *, :param pulumi.Input[bool] remove_children: If set to `true`, the entire snapshot subtree is removed when this resource is destroyed. """ - pulumi.set(__self__, "description", description) - pulumi.set(__self__, "memory", memory) - pulumi.set(__self__, "quiesce", quiesce) - pulumi.set(__self__, "snapshot_name", snapshot_name) - pulumi.set(__self__, "virtual_machine_uuid", virtual_machine_uuid) + VirtualMachineSnapshotArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + memory=memory, + quiesce=quiesce, + snapshot_name=snapshot_name, + virtual_machine_uuid=virtual_machine_uuid, + consolidate=consolidate, + remove_children=remove_children, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + memory: Optional[pulumi.Input[bool]] = None, + quiesce: Optional[pulumi.Input[bool]] = None, + snapshot_name: Optional[pulumi.Input[str]] = None, + virtual_machine_uuid: Optional[pulumi.Input[str]] = None, + consolidate: Optional[pulumi.Input[bool]] = None, + remove_children: Optional[pulumi.Input[bool]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if description is None: + raise TypeError("Missing 'description' argument") + if memory is None: + raise TypeError("Missing 'memory' argument") + if quiesce is None: + raise TypeError("Missing 'quiesce' argument") + if snapshot_name is None and 'snapshotName' in kwargs: + snapshot_name = kwargs['snapshotName'] + if snapshot_name is None: + raise TypeError("Missing 'snapshot_name' argument") + if virtual_machine_uuid is None and 'virtualMachineUuid' in kwargs: + virtual_machine_uuid = kwargs['virtualMachineUuid'] + if virtual_machine_uuid is None: + raise TypeError("Missing 'virtual_machine_uuid' argument") + if remove_children is None and 'removeChildren' in kwargs: + remove_children = kwargs['removeChildren'] + + _setter("description", description) + _setter("memory", memory) + _setter("quiesce", quiesce) + _setter("snapshot_name", snapshot_name) + _setter("virtual_machine_uuid", virtual_machine_uuid) if consolidate is not None: - pulumi.set(__self__, "consolidate", consolidate) + _setter("consolidate", consolidate) if remove_children is not None: - pulumi.set(__self__, "remove_children", remove_children) + _setter("remove_children", remove_children) @property @pulumi.getter @@ -164,20 +203,49 @@ def __init__(__self__, *, :param pulumi.Input[str] snapshot_name: The name of the snapshot. :param pulumi.Input[str] virtual_machine_uuid: The virtual machine UUID. """ + _VirtualMachineSnapshotState._configure( + lambda key, value: pulumi.set(__self__, key, value), + consolidate=consolidate, + description=description, + memory=memory, + quiesce=quiesce, + remove_children=remove_children, + snapshot_name=snapshot_name, + virtual_machine_uuid=virtual_machine_uuid, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + consolidate: Optional[pulumi.Input[bool]] = None, + description: Optional[pulumi.Input[str]] = None, + memory: Optional[pulumi.Input[bool]] = None, + quiesce: Optional[pulumi.Input[bool]] = None, + remove_children: Optional[pulumi.Input[bool]] = None, + snapshot_name: Optional[pulumi.Input[str]] = None, + virtual_machine_uuid: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if remove_children is None and 'removeChildren' in kwargs: + remove_children = kwargs['removeChildren'] + if snapshot_name is None and 'snapshotName' in kwargs: + snapshot_name = kwargs['snapshotName'] + if virtual_machine_uuid is None and 'virtualMachineUuid' in kwargs: + virtual_machine_uuid = kwargs['virtualMachineUuid'] + if consolidate is not None: - pulumi.set(__self__, "consolidate", consolidate) + _setter("consolidate", consolidate) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if memory is not None: - pulumi.set(__self__, "memory", memory) + _setter("memory", memory) if quiesce is not None: - pulumi.set(__self__, "quiesce", quiesce) + _setter("quiesce", quiesce) if remove_children is not None: - pulumi.set(__self__, "remove_children", remove_children) + _setter("remove_children", remove_children) if snapshot_name is not None: - pulumi.set(__self__, "snapshot_name", snapshot_name) + _setter("snapshot_name", snapshot_name) if virtual_machine_uuid is not None: - pulumi.set(__self__, "virtual_machine_uuid", virtual_machine_uuid) + _setter("virtual_machine_uuid", virtual_machine_uuid) @property @pulumi.getter @@ -393,6 +461,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VirtualMachineSnapshotArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/vm_storage_policy.py b/sdk/python/pulumi_vsphere/vm_storage_policy.py index 787e5523..ee38007e 100644 --- a/sdk/python/pulumi_vsphere/vm_storage_policy.py +++ b/sdk/python/pulumi_vsphere/vm_storage_policy.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -25,11 +25,30 @@ def __init__(__self__, *, :param pulumi.Input[str] description: Description of the storage policy. :param pulumi.Input[str] name: The name of the storage policy. """ - pulumi.set(__self__, "tag_rules", tag_rules) + VmStoragePolicyArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + tag_rules=tag_rules, + description=description, + name=name, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input['VmStoragePolicyTagRuleArgs']]]] = None, + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag_rules is None and 'tagRules' in kwargs: + tag_rules = kwargs['tagRules'] + if tag_rules is None: + raise TypeError("Missing 'tag_rules' argument") + + _setter("tag_rules", tag_rules) if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) @property @pulumi.getter(name="tagRules") @@ -80,12 +99,29 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the storage policy. :param pulumi.Input[Sequence[pulumi.Input['VmStoragePolicyTagRuleArgs']]] tag_rules: List of tag rules. The tag category and tags to be associated to this storage policy. """ + _VmStoragePolicyState._configure( + lambda key, value: pulumi.set(__self__, key, value), + description=description, + name=name, + tag_rules=tag_rules, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + description: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tag_rules: Optional[pulumi.Input[Sequence[pulumi.Input['VmStoragePolicyTagRuleArgs']]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if tag_rules is None and 'tagRules' in kwargs: + tag_rules = kwargs['tagRules'] + if description is not None: - pulumi.set(__self__, "description", description) + _setter("description", description) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tag_rules is not None: - pulumi.set(__self__, "tag_rules", tag_rules) + _setter("tag_rules", tag_rules) @property @pulumi.getter @@ -367,6 +403,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VmStoragePolicyArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/vmfs_datastore.py b/sdk/python/pulumi_vsphere/vmfs_datastore.py index bb6a6c89..724bca53 100644 --- a/sdk/python/pulumi_vsphere/vmfs_datastore.py +++ b/sdk/python/pulumi_vsphere/vmfs_datastore.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities __all__ = ['VmfsDatastoreArgs', 'VmfsDatastore'] @@ -51,18 +51,51 @@ def __init__(__self__, *, > **NOTE:** Tagging support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher. """ - pulumi.set(__self__, "disks", disks) - pulumi.set(__self__, "host_system_id", host_system_id) + VmfsDatastoreArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + disks=disks, + host_system_id=host_system_id, + custom_attributes=custom_attributes, + datastore_cluster_id=datastore_cluster_id, + folder=folder, + name=name, + tags=tags, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + disks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + host_system_id: Optional[pulumi.Input[str]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datastore_cluster_id: Optional[pulumi.Input[str]] = None, + folder: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if disks is None: + raise TypeError("Missing 'disks' argument") + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if host_system_id is None: + raise TypeError("Missing 'host_system_id' argument") + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if datastore_cluster_id is None and 'datastoreClusterId' in kwargs: + datastore_cluster_id = kwargs['datastoreClusterId'] + + _setter("disks", disks) + _setter("host_system_id", host_system_id) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datastore_cluster_id is not None: - pulumi.set(__self__, "datastore_cluster_id", datastore_cluster_id) + _setter("datastore_cluster_id", datastore_cluster_id) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) @property @pulumi.getter @@ -226,34 +259,85 @@ def __init__(__self__, *, potentially used by all virtual machines on this datastore. :param pulumi.Input[str] url: The unique locator for the datastore. """ + _VmfsDatastoreState._configure( + lambda key, value: pulumi.set(__self__, key, value), + accessible=accessible, + capacity=capacity, + custom_attributes=custom_attributes, + datastore_cluster_id=datastore_cluster_id, + disks=disks, + folder=folder, + free_space=free_space, + host_system_id=host_system_id, + maintenance_mode=maintenance_mode, + multiple_host_access=multiple_host_access, + name=name, + tags=tags, + uncommitted_space=uncommitted_space, + url=url, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + accessible: Optional[pulumi.Input[bool]] = None, + capacity: Optional[pulumi.Input[int]] = None, + custom_attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + datastore_cluster_id: Optional[pulumi.Input[str]] = None, + disks: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + folder: Optional[pulumi.Input[str]] = None, + free_space: Optional[pulumi.Input[int]] = None, + host_system_id: Optional[pulumi.Input[str]] = None, + maintenance_mode: Optional[pulumi.Input[str]] = None, + multiple_host_access: Optional[pulumi.Input[bool]] = None, + name: Optional[pulumi.Input[str]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + uncommitted_space: Optional[pulumi.Input[int]] = None, + url: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if custom_attributes is None and 'customAttributes' in kwargs: + custom_attributes = kwargs['customAttributes'] + if datastore_cluster_id is None and 'datastoreClusterId' in kwargs: + datastore_cluster_id = kwargs['datastoreClusterId'] + if free_space is None and 'freeSpace' in kwargs: + free_space = kwargs['freeSpace'] + if host_system_id is None and 'hostSystemId' in kwargs: + host_system_id = kwargs['hostSystemId'] + if maintenance_mode is None and 'maintenanceMode' in kwargs: + maintenance_mode = kwargs['maintenanceMode'] + if multiple_host_access is None and 'multipleHostAccess' in kwargs: + multiple_host_access = kwargs['multipleHostAccess'] + if uncommitted_space is None and 'uncommittedSpace' in kwargs: + uncommitted_space = kwargs['uncommittedSpace'] + if accessible is not None: - pulumi.set(__self__, "accessible", accessible) + _setter("accessible", accessible) if capacity is not None: - pulumi.set(__self__, "capacity", capacity) + _setter("capacity", capacity) if custom_attributes is not None: - pulumi.set(__self__, "custom_attributes", custom_attributes) + _setter("custom_attributes", custom_attributes) if datastore_cluster_id is not None: - pulumi.set(__self__, "datastore_cluster_id", datastore_cluster_id) + _setter("datastore_cluster_id", datastore_cluster_id) if disks is not None: - pulumi.set(__self__, "disks", disks) + _setter("disks", disks) if folder is not None: - pulumi.set(__self__, "folder", folder) + _setter("folder", folder) if free_space is not None: - pulumi.set(__self__, "free_space", free_space) + _setter("free_space", free_space) if host_system_id is not None: - pulumi.set(__self__, "host_system_id", host_system_id) + _setter("host_system_id", host_system_id) if maintenance_mode is not None: - pulumi.set(__self__, "maintenance_mode", maintenance_mode) + _setter("maintenance_mode", maintenance_mode) if multiple_host_access is not None: - pulumi.set(__self__, "multiple_host_access", multiple_host_access) + _setter("multiple_host_access", multiple_host_access) if name is not None: - pulumi.set(__self__, "name", name) + _setter("name", name) if tags is not None: - pulumi.set(__self__, "tags", tags) + _setter("tags", tags) if uncommitted_space is not None: - pulumi.set(__self__, "uncommitted_space", uncommitted_space) + _setter("uncommitted_space", uncommitted_space) if url is not None: - pulumi.set(__self__, "url", url) + _setter("url", url) @property @pulumi.getter @@ -510,6 +594,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VmfsDatastoreArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, diff --git a/sdk/python/pulumi_vsphere/vnic.py b/sdk/python/pulumi_vsphere/vnic.py index a622bbe1..7a088620 100644 --- a/sdk/python/pulumi_vsphere/vnic.py +++ b/sdk/python/pulumi_vsphere/vnic.py @@ -6,7 +6,7 @@ import warnings import pulumi import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload +from typing import Any, Callable, Mapping, Optional, Sequence, Union, overload from . import _utilities from . import outputs from ._inputs import * @@ -39,25 +39,60 @@ def __init__(__self__, *, :param pulumi.Input[str] portgroup: Portgroup to attach the nic to. Do not set if you set distributed_switch_port. :param pulumi.Input[Sequence[pulumi.Input[str]]] services: Enabled services setting for this interface. Currently support values are `vmotion`, `management`, and `vsan`. """ - pulumi.set(__self__, "host", host) + VnicArgs._configure( + lambda key, value: pulumi.set(__self__, key, value), + host=host, + distributed_port_group=distributed_port_group, + distributed_switch_port=distributed_switch_port, + ipv4=ipv4, + ipv6=ipv6, + mac=mac, + mtu=mtu, + netstack=netstack, + portgroup=portgroup, + services=services, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + host: Optional[pulumi.Input[str]] = None, + distributed_port_group: Optional[pulumi.Input[str]] = None, + distributed_switch_port: Optional[pulumi.Input[str]] = None, + ipv4: Optional[pulumi.Input['VnicIpv4Args']] = None, + ipv6: Optional[pulumi.Input['VnicIpv6Args']] = None, + mac: Optional[pulumi.Input[str]] = None, + mtu: Optional[pulumi.Input[int]] = None, + netstack: Optional[pulumi.Input[str]] = None, + portgroup: Optional[pulumi.Input[str]] = None, + services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if host is None: + raise TypeError("Missing 'host' argument") + if distributed_port_group is None and 'distributedPortGroup' in kwargs: + distributed_port_group = kwargs['distributedPortGroup'] + if distributed_switch_port is None and 'distributedSwitchPort' in kwargs: + distributed_switch_port = kwargs['distributedSwitchPort'] + + _setter("host", host) if distributed_port_group is not None: - pulumi.set(__self__, "distributed_port_group", distributed_port_group) + _setter("distributed_port_group", distributed_port_group) if distributed_switch_port is not None: - pulumi.set(__self__, "distributed_switch_port", distributed_switch_port) + _setter("distributed_switch_port", distributed_switch_port) if ipv4 is not None: - pulumi.set(__self__, "ipv4", ipv4) + _setter("ipv4", ipv4) if ipv6 is not None: - pulumi.set(__self__, "ipv6", ipv6) + _setter("ipv6", ipv6) if mac is not None: - pulumi.set(__self__, "mac", mac) + _setter("mac", mac) if mtu is not None: - pulumi.set(__self__, "mtu", mtu) + _setter("mtu", mtu) if netstack is not None: - pulumi.set(__self__, "netstack", netstack) + _setter("netstack", netstack) if portgroup is not None: - pulumi.set(__self__, "portgroup", portgroup) + _setter("portgroup", portgroup) if services is not None: - pulumi.set(__self__, "services", services) + _setter("services", services) @property @pulumi.getter @@ -206,26 +241,59 @@ def __init__(__self__, *, :param pulumi.Input[str] portgroup: Portgroup to attach the nic to. Do not set if you set distributed_switch_port. :param pulumi.Input[Sequence[pulumi.Input[str]]] services: Enabled services setting for this interface. Currently support values are `vmotion`, `management`, and `vsan`. """ + _VnicState._configure( + lambda key, value: pulumi.set(__self__, key, value), + distributed_port_group=distributed_port_group, + distributed_switch_port=distributed_switch_port, + host=host, + ipv4=ipv4, + ipv6=ipv6, + mac=mac, + mtu=mtu, + netstack=netstack, + portgroup=portgroup, + services=services, + ) + @staticmethod + def _configure( + _setter: Callable[[Any, Any], None], + distributed_port_group: Optional[pulumi.Input[str]] = None, + distributed_switch_port: Optional[pulumi.Input[str]] = None, + host: Optional[pulumi.Input[str]] = None, + ipv4: Optional[pulumi.Input['VnicIpv4Args']] = None, + ipv6: Optional[pulumi.Input['VnicIpv6Args']] = None, + mac: Optional[pulumi.Input[str]] = None, + mtu: Optional[pulumi.Input[int]] = None, + netstack: Optional[pulumi.Input[str]] = None, + portgroup: Optional[pulumi.Input[str]] = None, + services: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + opts: Optional[pulumi.ResourceOptions]=None, + **kwargs): + if distributed_port_group is None and 'distributedPortGroup' in kwargs: + distributed_port_group = kwargs['distributedPortGroup'] + if distributed_switch_port is None and 'distributedSwitchPort' in kwargs: + distributed_switch_port = kwargs['distributedSwitchPort'] + if distributed_port_group is not None: - pulumi.set(__self__, "distributed_port_group", distributed_port_group) + _setter("distributed_port_group", distributed_port_group) if distributed_switch_port is not None: - pulumi.set(__self__, "distributed_switch_port", distributed_switch_port) + _setter("distributed_switch_port", distributed_switch_port) if host is not None: - pulumi.set(__self__, "host", host) + _setter("host", host) if ipv4 is not None: - pulumi.set(__self__, "ipv4", ipv4) + _setter("ipv4", ipv4) if ipv6 is not None: - pulumi.set(__self__, "ipv6", ipv6) + _setter("ipv6", ipv6) if mac is not None: - pulumi.set(__self__, "mac", mac) + _setter("mac", mac) if mtu is not None: - pulumi.set(__self__, "mtu", mtu) + _setter("mtu", mtu) if netstack is not None: - pulumi.set(__self__, "netstack", netstack) + _setter("netstack", netstack) if portgroup is not None: - pulumi.set(__self__, "portgroup", portgroup) + _setter("portgroup", portgroup) if services is not None: - pulumi.set(__self__, "services", services) + _setter("services", services) @property @pulumi.getter(name="distributedPortGroup") @@ -547,6 +615,10 @@ def __init__(__self__, resource_name: str, *args, **kwargs): if resource_args is not None: __self__._internal_init(resource_name, opts, **resource_args.__dict__) else: + kwargs = kwargs or {} + def _setter(key, value): + kwargs[key] = value + VnicArgs._configure(_setter, **kwargs) __self__._internal_init(resource_name, *args, **kwargs) def _internal_init(__self__, @@ -576,7 +648,17 @@ def _internal_init(__self__, if host is None and not opts.urn: raise TypeError("Missing required property 'host'") __props__.__dict__["host"] = host + if ipv4 is not None and not isinstance(ipv4, VnicIpv4Args): + ipv4 = ipv4 or {} + def _setter(key, value): + ipv4[key] = value + VnicIpv4Args._configure(_setter, **ipv4) __props__.__dict__["ipv4"] = ipv4 + if ipv6 is not None and not isinstance(ipv6, VnicIpv6Args): + ipv6 = ipv6 or {} + def _setter(key, value): + ipv6[key] = value + VnicIpv6Args._configure(_setter, **ipv6) __props__.__dict__["ipv6"] = ipv6 __props__.__dict__["mac"] = mac __props__.__dict__["mtu"] = mtu