From 1485343a986239e3e37600a7a6b1dff1e1d44def Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Wed, 25 Oct 2023 01:22:17 +0000 Subject: [PATCH] make build_sdks --- sdk/dotnet/ComputeClusterVmAffinityRule.cs | 129 ----- sdk/dotnet/Datacenter.cs | 31 -- sdk/dotnet/DistributedVirtualSwitch.cs | 84 ---- sdk/dotnet/File.cs | 44 -- sdk/dotnet/GetComputeCluster.cs | 56 --- sdk/dotnet/GetComputeClusterHostGroup.cs | 82 --- sdk/dotnet/GetContentLibrary.cs | 44 -- sdk/dotnet/GetCustomAttribute.cs | 44 -- sdk/dotnet/GetDatacenter.cs | 44 -- sdk/dotnet/GetDatastore.cs | 58 --- sdk/dotnet/GetDatastoreCluster.cs | 56 --- sdk/dotnet/GetDistributedVirtualSwitch.cs | 92 ---- sdk/dotnet/GetDynamic.cs | 88 ---- sdk/dotnet/GetFolder.cs | 44 -- sdk/dotnet/GetHost.cs | 56 --- sdk/dotnet/GetHostPciDevice.cs | 62 --- sdk/dotnet/GetHostThumbprint.cs | 44 -- sdk/dotnet/GetLicense.cs | 44 -- sdk/dotnet/GetNetwork.cs | 56 --- sdk/dotnet/GetPolicy.cs | 54 -- sdk/dotnet/GetResourcePool.cs | 120 ----- sdk/dotnet/GetRole.cs | 46 -- sdk/dotnet/GetTag.cs | 56 --- sdk/dotnet/GetTagCategory.cs | 44 -- sdk/dotnet/GetVappContainer.cs | 56 --- sdk/dotnet/GetVirtualMachine.cs | 122 ----- sdk/dotnet/GetVmfsDisks.cs | 72 --- sdk/dotnet/Host.cs | 90 ---- sdk/dotnet/HostPortGroup.cs | 122 ----- .../Inputs/ComputeClusterVsanDiskGroupArgs.cs | 40 -- .../ComputeClusterVsanDiskGroupGetArgs.cs | 40 -- sdk/dotnet/License.cs | 23 - .../Outputs/ComputeClusterVsanDiskGroup.cs | 40 -- sdk/dotnet/ResourcePool.cs | 87 ---- sdk/dotnet/VirtualMachineSnapshot.cs | 24 - sdk/dotnet/VmStoragePolicy.cs | 218 -------- sdk/dotnet/Vnic.cs | 137 ----- .../vsphere/computeClusterVmAffinityRule.go | 140 ------ sdk/go/vsphere/datacenter.go | 48 -- sdk/go/vsphere/distributedVirtualSwitch.go | 183 ------- sdk/go/vsphere/file.go | 60 --- sdk/go/vsphere/getComputeCluster.go | 33 -- sdk/go/vsphere/getComputeClusterHostGroup.go | 48 -- sdk/go/vsphere/getContentLibrary.go | 26 - sdk/go/vsphere/getCustomAttribute.go | 26 - sdk/go/vsphere/getDatacenter.go | 26 - sdk/go/vsphere/getDatastore.go | 33 -- sdk/go/vsphere/getDatastoreCluster.go | 33 -- sdk/go/vsphere/getDistributedVirtualSwitch.go | 50 -- sdk/go/vsphere/getDynamic.go | 49 -- sdk/go/vsphere/getFolder.go | 26 - sdk/go/vsphere/getHost.go | 33 -- sdk/go/vsphere/getHostPciDevice.go | 39 -- sdk/go/vsphere/getHostThumbprint.go | 26 - sdk/go/vsphere/getLicense.go | 26 - sdk/go/vsphere/getNetwork.go | 33 -- sdk/go/vsphere/getPolicy.go | 32 -- sdk/go/vsphere/getResourcePool.go | 71 --- sdk/go/vsphere/getRole.go | 26 - sdk/go/vsphere/getTag.go | 33 -- sdk/go/vsphere/getTagCategory.go | 26 - sdk/go/vsphere/getVappContainer.go | 33 -- sdk/go/vsphere/getVirtualMachine.go | 76 --- sdk/go/vsphere/getVmfsDisks.go | 41 -- sdk/go/vsphere/host.go | 118 ----- sdk/go/vsphere/hostPortGroup.go | 145 ------ sdk/go/vsphere/license.go | 30 -- sdk/go/vsphere/pulumiTypes.go | 125 ----- sdk/go/vsphere/resourcePool.go | 115 ----- sdk/go/vsphere/virtualMachineSnapshot.go | 32 -- sdk/go/vsphere/vmStoragePolicy.go | 240 --------- sdk/go/vsphere/vnic.go | 159 ------ sdk/nodejs/computeClusterVmAffinityRule.ts | 81 --- sdk/nodejs/datacenter.ts | 16 - sdk/nodejs/distributedVirtualSwitch.ts | 48 -- sdk/nodejs/file.ts | 30 -- sdk/nodejs/getComputeCluster.ts | 30 -- sdk/nodejs/getComputeClusterHostGroup.ts | 48 -- sdk/nodejs/getContentLibrary.ts | 22 - sdk/nodejs/getCustomAttribute.ts | 22 - sdk/nodejs/getDatacenter.ts | 22 - sdk/nodejs/getDatastore.ts | 30 -- sdk/nodejs/getDatastoreCluster.ts | 30 -- sdk/nodejs/getDistributedVirtualSwitch.ts | 50 -- sdk/nodejs/getDynamic.ts | 54 -- sdk/nodejs/getFolder.ts | 22 - sdk/nodejs/getHost.ts | 30 -- sdk/nodejs/getHostPciDevice.ts | 36 -- sdk/nodejs/getHostThumbprint.ts | 22 - sdk/nodejs/getLicense.ts | 22 - sdk/nodejs/getNetwork.ts | 30 -- sdk/nodejs/getPolicy.ts | 28 -- sdk/nodejs/getResourcePool.ts | 76 --- sdk/nodejs/getRole.ts | 22 - sdk/nodejs/getTag.ts | 30 -- sdk/nodejs/getTagCategory.ts | 22 - sdk/nodejs/getVappContainer.ts | 30 -- sdk/nodejs/getVirtualMachine.ts | 74 --- sdk/nodejs/getVmfsDisks.ts | 40 -- sdk/nodejs/host.ts | 60 --- sdk/nodejs/hostPortGroup.ts | 76 --- sdk/nodejs/license.ts | 15 - sdk/nodejs/resourcePool.ts | 48 -- sdk/nodejs/types/input.ts | 26 - sdk/nodejs/types/output.ts | 26 - sdk/nodejs/virtualMachineSnapshot.ts | 17 - sdk/nodejs/vmStoragePolicy.ts | 129 ----- sdk/nodejs/vnic.ts | 84 ---- sdk/python/pulumi_vsphere/_inputs.py | 404 +++++++++++---- sdk/python/pulumi_vsphere/_utilities.py | 19 + sdk/python/pulumi_vsphere/compute_cluster.py | 262 +++++++++- .../compute_cluster_host_group.py | 20 +- .../compute_cluster_vm_affinity_rule.py | 150 +----- .../compute_cluster_vm_anti_affinity_rule.py | 24 +- .../compute_cluster_vm_dependency_rule.py | 32 +- .../compute_cluster_vm_group.py | 20 +- .../compute_cluster_vm_host_rule.py | 32 +- sdk/python/pulumi_vsphere/content_library.py | 28 +- .../pulumi_vsphere/content_library_item.py | 24 +- sdk/python/pulumi_vsphere/custom_attribute.py | 12 +- sdk/python/pulumi_vsphere/datacenter.py | 44 +- .../pulumi_vsphere/datastore_cluster.py | 100 +++- ...datastore_cluster_vm_anti_affinity_rule.py | 24 +- .../pulumi_vsphere/distributed_port_group.py | 178 ++++++- .../distributed_virtual_switch.py | 470 +++++++++++++----- .../pulumi_vsphere/dpm_host_override.py | 32 +- sdk/python/pulumi_vsphere/drs_vm_override.py | 32 +- .../pulumi_vsphere/entity_permissions.py | 28 +- sdk/python/pulumi_vsphere/file.py | 96 ++-- sdk/python/pulumi_vsphere/folder.py | 24 +- .../pulumi_vsphere/get_compute_cluster.py | 22 - .../get_compute_cluster_host_group.py | 34 -- .../pulumi_vsphere/get_content_library.py | 18 - .../pulumi_vsphere/get_custom_attribute.py | 18 - sdk/python/pulumi_vsphere/get_datacenter.py | 18 - sdk/python/pulumi_vsphere/get_datastore.py | 22 - .../pulumi_vsphere/get_datastore_cluster.py | 22 - .../get_distributed_virtual_switch.py | 40 -- sdk/python/pulumi_vsphere/get_dynamic.py | 38 -- sdk/python/pulumi_vsphere/get_folder.py | 18 - sdk/python/pulumi_vsphere/get_host.py | 22 - .../pulumi_vsphere/get_host_pci_device.py | 28 +- .../pulumi_vsphere/get_host_thumbprint.py | 18 - sdk/python/pulumi_vsphere/get_license.py | 18 - sdk/python/pulumi_vsphere/get_network.py | 22 - sdk/python/pulumi_vsphere/get_policy.py | 20 - .../pulumi_vsphere/get_resource_pool.py | 64 --- sdk/python/pulumi_vsphere/get_role.py | 18 - sdk/python/pulumi_vsphere/get_tag.py | 22 - sdk/python/pulumi_vsphere/get_tag_category.py | 18 - .../pulumi_vsphere/get_vapp_container.py | 22 - .../pulumi_vsphere/get_virtual_machine.py | 54 -- sdk/python/pulumi_vsphere/get_vmfs_disks.py | 28 -- sdk/python/pulumi_vsphere/ha_vm_override.py | 76 ++- sdk/python/pulumi_vsphere/host.py | 124 +---- sdk/python/pulumi_vsphere/host_port_group.py | 206 +++----- .../pulumi_vsphere/host_virtual_switch.py | 92 +++- sdk/python/pulumi_vsphere/license.py | 46 +- sdk/python/pulumi_vsphere/nas_datastore.py | 58 ++- sdk/python/pulumi_vsphere/outputs.py | 468 +++++++++++++---- sdk/python/pulumi_vsphere/provider.py | 34 +- sdk/python/pulumi_vsphere/resource_pool.py | 144 +++--- sdk/python/pulumi_vsphere/role.py | 12 +- .../pulumi_vsphere/storage_drs_vm_override.py | 36 +- sdk/python/pulumi_vsphere/tag.py | 16 +- sdk/python/pulumi_vsphere/tag_category.py | 20 +- sdk/python/pulumi_vsphere/vapp_container.py | 64 ++- sdk/python/pulumi_vsphere/vapp_entity.py | 52 +- sdk/python/pulumi_vsphere/virtual_disk.py | 32 +- sdk/python/pulumi_vsphere/virtual_machine.py | 302 ++++++++++- .../virtual_machine_snapshot.py | 72 ++- .../pulumi_vsphere/vm_storage_policy.py | 218 +------- sdk/python/pulumi_vsphere/vmfs_datastore.py | 36 +- sdk/python/pulumi_vsphere/vnic.py | 172 +------ 174 files changed, 2925 insertions(+), 8251 deletions(-) diff --git a/sdk/dotnet/ComputeClusterVmAffinityRule.cs b/sdk/dotnet/ComputeClusterVmAffinityRule.cs index d70be3b9..e67e6c0c 100644 --- a/sdk/dotnet/ComputeClusterVmAffinityRule.cs +++ b/sdk/dotnet/ComputeClusterVmAffinityRule.cs @@ -31,135 +31,6 @@ namespace Pulumi.VSphere /// direct ESXi host connections. /// /// > **NOTE:** vSphere DRS requires a vSphere Enterprise Plus license. - /// - /// ## Example Usage - /// - /// The following example creates two virtual machines in a cluster using the - /// `vsphere.VirtualMachine` resource, creating the - /// virtual machines in the cluster looked up by the - /// `vsphere.ComputeCluster` data source. It - /// then creates an affinity rule for these two virtual machines, ensuring they - /// will run on the same host whenever possible. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var datastore = VSphere.GetDatastore.Invoke(new() - /// { - /// Name = "datastore-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var cluster = VSphere.GetComputeCluster.Invoke(new() - /// { - /// Name = "cluster-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var network = VSphere.GetNetwork.Invoke(new() - /// { - /// Name = "VM Network", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var vm = new List<VSphere.VirtualMachine>(); - /// for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++) - /// { - /// var range = new { Value = rangeIndex }; - /// vm.Add(new VSphere.VirtualMachine($"vm-{range.Value}", new() - /// { - /// ResourcePoolId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.ResourcePoolId), - /// DatastoreId = datastore.Apply(getDatastoreResult => getDatastoreResult.Id), - /// NumCpus = 1, - /// Memory = 1024, - /// GuestId = "otherLinux64Guest", - /// NetworkInterfaces = new[] - /// { - /// new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs - /// { - /// NetworkId = network.Apply(getNetworkResult => getNetworkResult.Id), - /// }, - /// }, - /// Disks = new[] - /// { - /// new VSphere.Inputs.VirtualMachineDiskArgs - /// { - /// Label = "disk0", - /// Size = 20, - /// }, - /// }, - /// })); - /// } - /// var vmAffinityRule = new VSphere.ComputeClusterVmAffinityRule("vmAffinityRule", new() - /// { - /// ComputeClusterId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.Id), - /// VirtualMachineIds = vm.Select((value, i) => new { Key = i.ToString(), Value = pair.Value }).Select(v => - /// { - /// return v.Id; - /// }).ToList(), - /// }); - /// - /// }); - /// ``` - /// - /// The following example creates an affinity rule for a set of virtual machines - /// in the cluster by looking up the virtual machine UUIDs from the - /// `vsphere.VirtualMachine` data source. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var vms = new[] - /// { - /// "foo-0", - /// "foo-1", - /// }; - /// - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var cluster = VSphere.GetComputeCluster.Invoke(new() - /// { - /// Name = "cluster-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var vmsVirtualMachine = "TODO: Range range( length(vms) - /// ) false".Select(__index => - /// { - /// return VSphere.GetVirtualMachine.Invoke(new() - /// { - /// Name = vms[__index], - /// DatacenterId = _arg0_.Id, - /// }); - /// }).ToList(); - /// - /// var vmAffinityRule = new VSphere.ComputeClusterVmAffinityRule("vmAffinityRule", new() - /// { - /// Enabled = true, - /// ComputeClusterId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.Id), - /// VirtualMachineIds = vmsVirtualMachine.Select(__item => __item.Id).ToList(), - /// }); - /// - /// }); - /// ``` /// [VSphereResourceType("vsphere:index/computeClusterVmAffinityRule:ComputeClusterVmAffinityRule")] public partial class ComputeClusterVmAffinityRule : global::Pulumi.CustomResource diff --git a/sdk/dotnet/Datacenter.cs b/sdk/dotnet/Datacenter.cs index e52500e0..87f0834a 100644 --- a/sdk/dotnet/Datacenter.cs +++ b/sdk/dotnet/Datacenter.cs @@ -14,37 +14,6 @@ namespace Pulumi.VSphere /// container of inventory objects such as hosts and virtual machines. /// /// ## Example Usage - /// ### Create datacenter on the root folder - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var prodDatacenter = new VSphere.Datacenter("prodDatacenter"); - /// - /// }); - /// ``` - /// ### Create datacenter on a subfolder - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var researchDatacenter = new VSphere.Datacenter("researchDatacenter", new() - /// { - /// Folder = "/research/", - /// }); - /// - /// }); - /// ``` /// [VSphereResourceType("vsphere:index/datacenter:Datacenter")] public partial class Datacenter : global::Pulumi.CustomResource diff --git a/sdk/dotnet/DistributedVirtualSwitch.cs b/sdk/dotnet/DistributedVirtualSwitch.cs index e4a8cd23..36006f67 100644 --- a/sdk/dotnet/DistributedVirtualSwitch.cs +++ b/sdk/dotnet/DistributedVirtualSwitch.cs @@ -607,34 +607,6 @@ public partial class DistributedVirtualSwitch : global::Pulumi.CustomResource /// and `max_vlan` sub-arguments to define the tagged VLAN range. Multiple /// `vlan_range` definitions are allowed, but they must not overlap. Example /// below: - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var vds = new VSphere.DistributedVirtualSwitch("vds", new() - /// { - /// VlanRanges = new[] - /// { - /// new VSphere.Inputs.DistributedVirtualSwitchVlanRangeArgs - /// { - /// MaxVlan = 199, - /// MinVlan = 100, - /// }, - /// new VSphere.Inputs.DistributedVirtualSwitchVlanRangeArgs - /// { - /// MaxVlan = 399, - /// MinVlan = 300, - /// }, - /// }, - /// }); - /// - /// }); - /// ``` /// [Output("vlanRanges")] public Output> VlanRanges { get; private set; } = null!; @@ -1366,34 +1338,6 @@ public InputList Uplinks /// and `max_vlan` sub-arguments to define the tagged VLAN range. Multiple /// `vlan_range` definitions are allowed, but they must not overlap. Example /// below: - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var vds = new VSphere.DistributedVirtualSwitch("vds", new() - /// { - /// VlanRanges = new[] - /// { - /// new VSphere.Inputs.DistributedVirtualSwitchVlanRangeArgs - /// { - /// MaxVlan = 199, - /// MinVlan = 100, - /// }, - /// new VSphere.Inputs.DistributedVirtualSwitchVlanRangeArgs - /// { - /// MaxVlan = 399, - /// MinVlan = 300, - /// }, - /// }, - /// }); - /// - /// }); - /// ``` /// public InputList VlanRanges { @@ -2097,34 +2041,6 @@ public InputList Uplinks /// and `max_vlan` sub-arguments to define the tagged VLAN range. Multiple /// `vlan_range` definitions are allowed, but they must not overlap. Example /// below: - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var vds = new VSphere.DistributedVirtualSwitch("vds", new() - /// { - /// VlanRanges = new[] - /// { - /// new VSphere.Inputs.DistributedVirtualSwitchVlanRangeArgs - /// { - /// MaxVlan = 199, - /// MinVlan = 100, - /// }, - /// new VSphere.Inputs.DistributedVirtualSwitchVlanRangeArgs - /// { - /// MaxVlan = 399, - /// MinVlan = 300, - /// }, - /// }, - /// }); - /// - /// }); - /// ``` /// public InputList VlanRanges { diff --git a/sdk/dotnet/File.cs b/sdk/dotnet/File.cs index 8d6576ec..34f20304 100644 --- a/sdk/dotnet/File.cs +++ b/sdk/dotnet/File.cs @@ -11,50 +11,6 @@ namespace Pulumi.VSphere { /// /// ## Example Usage - /// ### Uploading a File - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var ubuntuVmdkUpload = new VSphere.File("ubuntuVmdkUpload", new() - /// { - /// CreateDirectories = true, - /// Datacenter = "dc-01", - /// Datastore = "datastore-01", - /// DestinationFile = "/my/dst/path/custom_ubuntu.vmdk", - /// SourceFile = "/my/src/path/custom_ubuntu.vmdk", - /// }); - /// - /// }); - /// ``` - /// ### Copying a File - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var ubuntuCopy = new VSphere.File("ubuntuCopy", new() - /// { - /// CreateDirectories = true, - /// Datacenter = "dc-01", - /// Datastore = "datastore-01", - /// DestinationFile = "/my/dst/path/custom_ubuntu.vmdk", - /// SourceDatacenter = "dc-01", - /// SourceDatastore = "datastore-01", - /// SourceFile = "/my/src/path/custom_ubuntu.vmdk", - /// }); - /// - /// }); - /// ``` /// [VSphereResourceType("vsphere:index/file:File")] public partial class File : global::Pulumi.CustomResource diff --git a/sdk/dotnet/GetComputeCluster.cs b/sdk/dotnet/GetComputeCluster.cs index 5f5864bb..821c18fb 100644 --- a/sdk/dotnet/GetComputeCluster.cs +++ b/sdk/dotnet/GetComputeCluster.cs @@ -21,34 +21,6 @@ public static class GetComputeCluster /// > You may also wish to see the `vsphere.ComputeCluster` /// resource for more information about clusters and how to managed the resource /// in this provider. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var computeCluster = VSphere.GetComputeCluster.Invoke(new() - /// { - /// Name = "cluster-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetComputeClusterArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getComputeCluster:getComputeCluster", args ?? new GetComputeClusterArgs(), options.WithDefaults()); @@ -63,34 +35,6 @@ public static Task InvokeAsync(GetComputeClusterArgs ar /// > You may also wish to see the `vsphere.ComputeCluster` /// resource for more information about clusters and how to managed the resource /// in this provider. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var computeCluster = VSphere.GetComputeCluster.Invoke(new() - /// { - /// Name = "cluster-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetComputeClusterInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getComputeCluster:getComputeCluster", args ?? new GetComputeClusterInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetComputeClusterHostGroup.cs b/sdk/dotnet/GetComputeClusterHostGroup.cs index 5b60aa35..51761a81 100644 --- a/sdk/dotnet/GetComputeClusterHostGroup.cs +++ b/sdk/dotnet/GetComputeClusterHostGroup.cs @@ -15,47 +15,6 @@ public static class GetComputeClusterHostGroup /// The `vsphere.ComputeClusterHostGroup` data source can be used to discover /// the IDs ESXi hosts in a host group and return host group attributes to other /// resources. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = @var.Vsphere_datacenter, - /// }); - /// - /// var cluster = VSphere.GetComputeCluster.Invoke(new() - /// { - /// Name = @var.Vsphere_cluster, - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var hostGroup1 = VSphere.GetComputeClusterHostGroup.Invoke(new() - /// { - /// Name = "host_group1", - /// ComputeClusterId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.Id), - /// }); - /// - /// var hostRule1 = new VSphere.ComputeClusterVmHostRule("hostRule1", new() - /// { - /// ComputeClusterId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.Id), - /// VmGroupName = "vm_group1", - /// AffinityHostGroupName = hostGroup1.Apply(getComputeClusterHostGroupResult => getComputeClusterHostGroupResult.Name), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetComputeClusterHostGroupArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getComputeClusterHostGroup:getComputeClusterHostGroup", args ?? new GetComputeClusterHostGroupArgs(), options.WithDefaults()); @@ -64,47 +23,6 @@ public static Task InvokeAsync(GetComputeClust /// The `vsphere.ComputeClusterHostGroup` data source can be used to discover /// the IDs ESXi hosts in a host group and return host group attributes to other /// resources. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = @var.Vsphere_datacenter, - /// }); - /// - /// var cluster = VSphere.GetComputeCluster.Invoke(new() - /// { - /// Name = @var.Vsphere_cluster, - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var hostGroup1 = VSphere.GetComputeClusterHostGroup.Invoke(new() - /// { - /// Name = "host_group1", - /// ComputeClusterId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.Id), - /// }); - /// - /// var hostRule1 = new VSphere.ComputeClusterVmHostRule("hostRule1", new() - /// { - /// ComputeClusterId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.Id), - /// VmGroupName = "vm_group1", - /// AffinityHostGroupName = hostGroup1.Apply(getComputeClusterHostGroupResult => getComputeClusterHostGroupResult.Name), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetComputeClusterHostGroupInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getComputeClusterHostGroup:getComputeClusterHostGroup", args ?? new GetComputeClusterHostGroupInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetContentLibrary.cs b/sdk/dotnet/GetContentLibrary.cs index a50d61a0..179cfe1b 100644 --- a/sdk/dotnet/GetContentLibrary.cs +++ b/sdk/dotnet/GetContentLibrary.cs @@ -15,28 +15,6 @@ public static class GetContentLibrary /// The `vsphere.ContentLibrary` data source can be used to discover the ID of a content library. /// /// > **NOTE:** This resource requires vCenter Server and is not available on direct ESXi host connections. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var library = VSphere.GetContentLibrary.Invoke(new() - /// { - /// Name = "Content Library", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetContentLibraryArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getContentLibrary:getContentLibrary", args ?? new GetContentLibraryArgs(), options.WithDefaults()); @@ -45,28 +23,6 @@ public static Task InvokeAsync(GetContentLibraryArgs ar /// The `vsphere.ContentLibrary` data source can be used to discover the ID of a content library. /// /// > **NOTE:** This resource requires vCenter Server and is not available on direct ESXi host connections. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var library = VSphere.GetContentLibrary.Invoke(new() - /// { - /// Name = "Content Library", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetContentLibraryInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getContentLibrary:getContentLibrary", args ?? new GetContentLibraryInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetCustomAttribute.cs b/sdk/dotnet/GetCustomAttribute.cs index 7c2901b4..bc5f70ad 100644 --- a/sdk/dotnet/GetCustomAttribute.cs +++ b/sdk/dotnet/GetCustomAttribute.cs @@ -20,28 +20,6 @@ public static class GetCustomAttribute /// /// > **NOTE:** Custom attributes are unsupported on direct ESXi host connections /// and require vCenter Server. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var attribute = VSphere.GetCustomAttribute.Invoke(new() - /// { - /// Name = "test-attribute", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetCustomAttributeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getCustomAttribute:getCustomAttribute", args ?? new GetCustomAttributeArgs(), options.WithDefaults()); @@ -55,28 +33,6 @@ public static Task InvokeAsync(GetCustomAttributeArgs /// /// > **NOTE:** Custom attributes are unsupported on direct ESXi host connections /// and require vCenter Server. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var attribute = VSphere.GetCustomAttribute.Invoke(new() - /// { - /// Name = "test-attribute", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetCustomAttributeInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getCustomAttribute:getCustomAttribute", args ?? new GetCustomAttributeInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetDatacenter.cs b/sdk/dotnet/GetDatacenter.cs index f49fdb44..b000be9f 100644 --- a/sdk/dotnet/GetDatacenter.cs +++ b/sdk/dotnet/GetDatacenter.cs @@ -16,28 +16,6 @@ public static class GetDatacenter /// vSphere datacenter object. This can then be used with resources or data sources /// that require a datacenter, such as the `vsphere.Host` /// data source. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetDatacenterArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getDatacenter:getDatacenter", args ?? new GetDatacenterArgs(), options.WithDefaults()); @@ -47,28 +25,6 @@ public static Task InvokeAsync(GetDatacenterArgs? args = nu /// vSphere datacenter object. This can then be used with resources or data sources /// that require a datacenter, such as the `vsphere.Host` /// data source. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetDatacenterInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDatacenter:getDatacenter", args ?? new GetDatacenterInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetDatastore.cs b/sdk/dotnet/GetDatastore.cs index 9e97767e..358a09a0 100644 --- a/sdk/dotnet/GetDatastore.cs +++ b/sdk/dotnet/GetDatastore.cs @@ -16,35 +16,6 @@ public static class GetDatastore /// vSphere datastore object. This can then be used with resources or data sources /// that require a datastore. For example, to create virtual machines in using the /// `vsphere.VirtualMachine` resource. - /// - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var datastore = VSphere.GetDatastore.Invoke(new() - /// { - /// Name = "datastore-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetDatastoreArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getDatastore:getDatastore", args ?? new GetDatastoreArgs(), options.WithDefaults()); @@ -54,35 +25,6 @@ public static Task InvokeAsync(GetDatastoreArgs args, Invoke /// vSphere datastore object. This can then be used with resources or data sources /// that require a datastore. For example, to create virtual machines in using the /// `vsphere.VirtualMachine` resource. - /// - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var datastore = VSphere.GetDatastore.Invoke(new() - /// { - /// Name = "datastore-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetDatastoreInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDatastore:getDatastore", args ?? new GetDatastoreInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetDatastoreCluster.cs b/sdk/dotnet/GetDatastoreCluster.cs index 0a82cab9..e393842c 100644 --- a/sdk/dotnet/GetDatastoreCluster.cs +++ b/sdk/dotnet/GetDatastoreCluster.cs @@ -16,34 +16,6 @@ public static class GetDatastoreCluster /// vSphere datastore cluster object. This can then be used with resources or data sources /// that require a datastore. For example, to assign datastores using the /// `vsphere.NasDatastore` or `vsphere.VmfsDatastore` resources, or to create virtual machines in using the `vsphere.VirtualMachine` resource. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var datastoreCluster = VSphere.GetDatastoreCluster.Invoke(new() - /// { - /// Name = "datastore-cluster-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetDatastoreClusterArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getDatastoreCluster:getDatastoreCluster", args ?? new GetDatastoreClusterArgs(), options.WithDefaults()); @@ -53,34 +25,6 @@ public static Task InvokeAsync(GetDatastoreClusterArg /// vSphere datastore cluster object. This can then be used with resources or data sources /// that require a datastore. For example, to assign datastores using the /// `vsphere.NasDatastore` or `vsphere.VmfsDatastore` resources, or to create virtual machines in using the `vsphere.VirtualMachine` resource. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var datastoreCluster = VSphere.GetDatastoreCluster.Invoke(new() - /// { - /// Name = "datastore-cluster-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetDatastoreClusterInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDatastoreCluster:getDatastoreCluster", args ?? new GetDatastoreClusterInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetDistributedVirtualSwitch.cs b/sdk/dotnet/GetDistributedVirtualSwitch.cs index 57326913..faa12dc3 100644 --- a/sdk/dotnet/GetDistributedVirtualSwitch.cs +++ b/sdk/dotnet/GetDistributedVirtualSwitch.cs @@ -20,52 +20,6 @@ public static class GetDistributedVirtualSwitch /// /// > **NOTE:** This data source requires vCenter Server and is not available on /// direct ESXi host connections. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// The following example locates a distributed switch named `vds-01`, in the - /// datacenter `dc-01`. It then uses this distributed switch to set up a - /// `vsphere.DistributedPortGroup` resource that uses the first uplink as a - /// primary uplink and the second uplink as a secondary. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var vds = VSphere.GetDistributedVirtualSwitch.Invoke(new() - /// { - /// Name = "vds-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var dvpg = new VSphere.DistributedPortGroup("dvpg", new() - /// { - /// DistributedVirtualSwitchUuid = vds.Apply(getDistributedVirtualSwitchResult => getDistributedVirtualSwitchResult.Id), - /// ActiveUplinks = new[] - /// { - /// vds.Apply(getDistributedVirtualSwitchResult => getDistributedVirtualSwitchResult.Uplinks[0]), - /// }, - /// StandbyUplinks = new[] - /// { - /// vds.Apply(getDistributedVirtualSwitchResult => getDistributedVirtualSwitchResult.Uplinks[1]), - /// }, - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetDistributedVirtualSwitchArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getDistributedVirtualSwitch:getDistributedVirtualSwitch", args ?? new GetDistributedVirtualSwitchArgs(), options.WithDefaults()); @@ -79,52 +33,6 @@ public static Task InvokeAsync(GetDistributed /// /// > **NOTE:** This data source requires vCenter Server and is not available on /// direct ESXi host connections. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// The following example locates a distributed switch named `vds-01`, in the - /// datacenter `dc-01`. It then uses this distributed switch to set up a - /// `vsphere.DistributedPortGroup` resource that uses the first uplink as a - /// primary uplink and the second uplink as a secondary. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var vds = VSphere.GetDistributedVirtualSwitch.Invoke(new() - /// { - /// Name = "vds-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var dvpg = new VSphere.DistributedPortGroup("dvpg", new() - /// { - /// DistributedVirtualSwitchUuid = vds.Apply(getDistributedVirtualSwitchResult => getDistributedVirtualSwitchResult.Id), - /// ActiveUplinks = new[] - /// { - /// vds.Apply(getDistributedVirtualSwitchResult => getDistributedVirtualSwitchResult.Uplinks[0]), - /// }, - /// StandbyUplinks = new[] - /// { - /// vds.Apply(getDistributedVirtualSwitchResult => getDistributedVirtualSwitchResult.Uplinks[1]), - /// }, - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetDistributedVirtualSwitchInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDistributedVirtualSwitch:getDistributedVirtualSwitch", args ?? new GetDistributedVirtualSwitchInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetDynamic.cs b/sdk/dotnet/GetDynamic.cs index b7fc08f7..d9ef93b8 100644 --- a/sdk/dotnet/GetDynamic.cs +++ b/sdk/dotnet/GetDynamic.cs @@ -18,50 +18,6 @@ public static class GetDynamic /// of any tagged managed object in vCenter Server by providing a list of tag IDs /// and an optional regular expression to filter objects by name. /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var category = VSphere.GetTagCategory.Invoke(new() - /// { - /// Name = "SomeCategory", - /// }); - /// - /// var tag1 = VSphere.GetTag.Invoke(new() - /// { - /// Name = "FirstTag", - /// CategoryId = data.Vsphere_tag_category.Cat.Id, - /// }); - /// - /// var tag2 = VSphere.GetTag.Invoke(new() - /// { - /// Name = "SecondTag", - /// CategoryId = data.Vsphere_tag_category.Cat.Id, - /// }); - /// - /// var dyn = VSphere.GetDynamic.Invoke(new() - /// { - /// Filters = new[] - /// { - /// tag1.Apply(getTagResult => getTagResult.Id), - /// tag1.Apply(getTagResult => getTagResult.Id), - /// }, - /// NameRegex = "ubuntu", - /// Type = "Datacenter", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetDynamicArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getDynamic:getDynamic", args ?? new GetDynamicArgs(), options.WithDefaults()); @@ -73,50 +29,6 @@ public static Task InvokeAsync(GetDynamicArgs args, InvokeOpti /// of any tagged managed object in vCenter Server by providing a list of tag IDs /// and an optional regular expression to filter objects by name. /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var category = VSphere.GetTagCategory.Invoke(new() - /// { - /// Name = "SomeCategory", - /// }); - /// - /// var tag1 = VSphere.GetTag.Invoke(new() - /// { - /// Name = "FirstTag", - /// CategoryId = data.Vsphere_tag_category.Cat.Id, - /// }); - /// - /// var tag2 = VSphere.GetTag.Invoke(new() - /// { - /// Name = "SecondTag", - /// CategoryId = data.Vsphere_tag_category.Cat.Id, - /// }); - /// - /// var dyn = VSphere.GetDynamic.Invoke(new() - /// { - /// Filters = new[] - /// { - /// tag1.Apply(getTagResult => getTagResult.Id), - /// tag1.Apply(getTagResult => getTagResult.Id), - /// }, - /// NameRegex = "ubuntu", - /// Type = "Datacenter", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetDynamicInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDynamic:getDynamic", args ?? new GetDynamicInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetFolder.cs b/sdk/dotnet/GetFolder.cs index 5aac10ed..fd436a01 100644 --- a/sdk/dotnet/GetFolder.cs +++ b/sdk/dotnet/GetFolder.cs @@ -14,28 +14,6 @@ public static class GetFolder /// /// The `vsphere.Folder` data source can be used to get the general attributes of a /// vSphere inventory folder. Paths are absolute and must include the datacenter. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var folder = VSphere.GetFolder.Invoke(new() - /// { - /// Path = "/dc-01/datastore-01/folder-01", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetFolderArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getFolder:getFolder", args ?? new GetFolderArgs(), options.WithDefaults()); @@ -43,28 +21,6 @@ public static Task InvokeAsync(GetFolderArgs args, InvokeOption /// /// The `vsphere.Folder` data source can be used to get the general attributes of a /// vSphere inventory folder. Paths are absolute and must include the datacenter. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var folder = VSphere.GetFolder.Invoke(new() - /// { - /// Path = "/dc-01/datastore-01/folder-01", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetFolderInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getFolder:getFolder", args ?? new GetFolderInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetHost.cs b/sdk/dotnet/GetHost.cs index 772d9048..79c87e23 100644 --- a/sdk/dotnet/GetHost.cs +++ b/sdk/dotnet/GetHost.cs @@ -15,34 +15,6 @@ public static class GetHost /// The `vsphere.Host` data source can be used to discover the ID of an ESXi host. /// This can then be used with resources or data sources that require an ESX /// host's managed object reference ID. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var host = VSphere.GetHost.Invoke(new() - /// { - /// Name = "esxi-01.example.com", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetHostArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getHost:getHost", args ?? new GetHostArgs(), options.WithDefaults()); @@ -51,34 +23,6 @@ public static Task InvokeAsync(GetHostArgs args, InvokeOptions? o /// The `vsphere.Host` data source can be used to discover the ID of an ESXi host. /// This can then be used with resources or data sources that require an ESX /// host's managed object reference ID. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var host = VSphere.GetHost.Invoke(new() - /// { - /// Name = "esxi-01.example.com", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetHostInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHost:getHost", args ?? new GetHostInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetHostPciDevice.cs b/sdk/dotnet/GetHostPciDevice.cs index b16004b7..14112ef5 100644 --- a/sdk/dotnet/GetHostPciDevice.cs +++ b/sdk/dotnet/GetHostPciDevice.cs @@ -18,38 +18,7 @@ public static class GetHostPciDevice /// /// {{% examples %}} /// ## Example Usage - /// {{% example %}} - /// ### With Vendor ID And Class ID /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var host = VSphere.GetHost.Invoke(new() - /// { - /// Name = "esxi-01.example.com", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var dev = VSphere.GetHostPciDevice.Invoke(new() - /// { - /// HostId = host.Apply(getHostResult => getHostResult.Id), - /// ClassId = "123", - /// VendorId = "456", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} /// ### With Name Regular Expression /// /// ```hcl @@ -79,38 +48,7 @@ public static Task InvokeAsync(GetHostPciDeviceArgs args /// /// {{% examples %}} /// ## Example Usage - /// {{% example %}} - /// ### With Vendor ID And Class ID - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var host = VSphere.GetHost.Invoke(new() - /// { - /// Name = "esxi-01.example.com", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var dev = VSphere.GetHostPciDevice.Invoke(new() - /// { - /// HostId = host.Apply(getHostResult => getHostResult.Id), - /// ClassId = "123", - /// VendorId = "456", - /// }); /// - /// }); - /// ``` - /// {{% /example %}} /// ### With Name Regular Expression /// /// ```hcl diff --git a/sdk/dotnet/GetHostThumbprint.cs b/sdk/dotnet/GetHostThumbprint.cs index bbc90998..845c0284 100644 --- a/sdk/dotnet/GetHostThumbprint.cs +++ b/sdk/dotnet/GetHostThumbprint.cs @@ -16,28 +16,6 @@ public static class GetHostThumbprint /// thumbprint of an ESXi host. This can be used when adding the `vsphere.Host` /// resource. If the ESXi host is using a certificate chain, the first one returned /// will be used to generate the thumbprint. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var thumbprint = VSphere.GetHostThumbprint.Invoke(new() - /// { - /// Address = "esxi-01.example.com", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetHostThumbprintArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getHostThumbprint:getHostThumbprint", args ?? new GetHostThumbprintArgs(), options.WithDefaults()); @@ -47,28 +25,6 @@ public static Task InvokeAsync(GetHostThumbprintArgs ar /// thumbprint of an ESXi host. This can be used when adding the `vsphere.Host` /// resource. If the ESXi host is using a certificate chain, the first one returned /// will be used to generate the thumbprint. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var thumbprint = VSphere.GetHostThumbprint.Invoke(new() - /// { - /// Address = "esxi-01.example.com", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetHostThumbprintInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHostThumbprint:getHostThumbprint", args ?? new GetHostThumbprintInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetLicense.cs b/sdk/dotnet/GetLicense.cs index a0d6fae2..e95efa9d 100644 --- a/sdk/dotnet/GetLicense.cs +++ b/sdk/dotnet/GetLicense.cs @@ -14,28 +14,6 @@ public static class GetLicense /// /// The `vsphere.License` data source can be used to get the general attributes of /// a license keys from a vCenter Server instance. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var license = VSphere.GetLicense.Invoke(new() - /// { - /// LicenseKey = "00000-00000-00000-00000-00000", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetLicenseArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getLicense:getLicense", args ?? new GetLicenseArgs(), options.WithDefaults()); @@ -43,28 +21,6 @@ public static Task InvokeAsync(GetLicenseArgs args, InvokeOpti /// /// The `vsphere.License` data source can be used to get the general attributes of /// a license keys from a vCenter Server instance. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var license = VSphere.GetLicense.Invoke(new() - /// { - /// LicenseKey = "00000-00000-00000-00000-00000", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetLicenseInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getLicense:getLicense", args ?? new GetLicenseInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetNetwork.cs b/sdk/dotnet/GetNetwork.cs index 0d23b74a..44e7716b 100644 --- a/sdk/dotnet/GetNetwork.cs +++ b/sdk/dotnet/GetNetwork.cs @@ -17,34 +17,6 @@ public static class GetNetwork /// network interface for `vsphere.VirtualMachine` or any other vSphere resource /// that requires a network. This includes standard (host-based) port groups, /// distributed port groups, or opaque networks such as those managed by NSX. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var network = VSphere.GetNetwork.Invoke(new() - /// { - /// Name = "VM Network", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetNetworkArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getNetwork:getNetwork", args ?? new GetNetworkArgs(), options.WithDefaults()); @@ -55,34 +27,6 @@ public static Task InvokeAsync(GetNetworkArgs args, InvokeOpti /// network interface for `vsphere.VirtualMachine` or any other vSphere resource /// that requires a network. This includes standard (host-based) port groups, /// distributed port groups, or opaque networks such as those managed by NSX. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var network = VSphere.GetNetwork.Invoke(new() - /// { - /// Name = "VM Network", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetNetworkInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getNetwork:getNetwork", args ?? new GetNetworkInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetPolicy.cs b/sdk/dotnet/GetPolicy.cs index e233057a..d492e6d9 100644 --- a/sdk/dotnet/GetPolicy.cs +++ b/sdk/dotnet/GetPolicy.cs @@ -18,33 +18,6 @@ public static class GetPolicy /// /// > **NOTE:** Storage policies are not supported on direct ESXi hosts and /// requires vCenter Server. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var prodPlatinumReplicated = VSphere.GetPolicy.Invoke(new() - /// { - /// Name = "prod_platinum_replicated", - /// }); - /// - /// var devSilverNonreplicated = VSphere.GetPolicy.Invoke(new() - /// { - /// Name = "dev_silver_nonreplicated", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetPolicyArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getPolicy:getPolicy", args ?? new GetPolicyArgs(), options.WithDefaults()); @@ -56,33 +29,6 @@ public static Task InvokeAsync(GetPolicyArgs args, InvokeOption /// /// > **NOTE:** Storage policies are not supported on direct ESXi hosts and /// requires vCenter Server. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var prodPlatinumReplicated = VSphere.GetPolicy.Invoke(new() - /// { - /// Name = "prod_platinum_replicated", - /// }); - /// - /// var devSilverNonreplicated = VSphere.GetPolicy.Invoke(new() - /// { - /// Name = "dev_silver_nonreplicated", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetPolicyInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getPolicy:getPolicy", args ?? new GetPolicyInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetResourcePool.cs b/sdk/dotnet/GetResourcePool.cs index 791f27e7..a89aaf6c 100644 --- a/sdk/dotnet/GetResourcePool.cs +++ b/sdk/dotnet/GetResourcePool.cs @@ -16,66 +16,6 @@ public static class GetResourcePool /// resource pool in vSphere. This is useful to return the ID of a resource pool /// that you want to use to create virtual machines in using the /// `vsphere.VirtualMachine` resource. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var pool = VSphere.GetResourcePool.Invoke(new() - /// { - /// Name = "resource-pool-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% example %}} - /// ### Specifying the Root Resource Pool for a Standalone ESXi Host - /// - /// > **NOTE:** Returning the root resource pool for a cluster can be done - /// directly via the `vsphere.ComputeCluster` - /// data source. - /// - /// All compute resources in vSphere have a resource pool, even if one has not been - /// explicitly created. This resource pool is referred to as the - /// _root resource pool_ and can be looked up by specifying the path. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var pool = VSphere.GetResourcePool.Invoke(new() - /// { - /// Name = "esxi-01.example.com/Resources", - /// DatacenterId = data.Vsphere_datacenter.Datacenter.Id, - /// }); - /// - /// }); - /// ``` - /// - /// For more information on the root resource pool, see [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere documentation. - /// - /// [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetResourcePoolArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getResourcePool:getResourcePool", args ?? new GetResourcePoolArgs(), options.WithDefaults()); @@ -85,66 +25,6 @@ public static Task InvokeAsync(GetResourcePoolArgs? args /// resource pool in vSphere. This is useful to return the ID of a resource pool /// that you want to use to create virtual machines in using the /// `vsphere.VirtualMachine` resource. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var pool = VSphere.GetResourcePool.Invoke(new() - /// { - /// Name = "resource-pool-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% example %}} - /// ### Specifying the Root Resource Pool for a Standalone ESXi Host - /// - /// > **NOTE:** Returning the root resource pool for a cluster can be done - /// directly via the `vsphere.ComputeCluster` - /// data source. - /// - /// All compute resources in vSphere have a resource pool, even if one has not been - /// explicitly created. This resource pool is referred to as the - /// _root resource pool_ and can be looked up by specifying the path. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var pool = VSphere.GetResourcePool.Invoke(new() - /// { - /// Name = "esxi-01.example.com/Resources", - /// DatacenterId = data.Vsphere_datacenter.Datacenter.Id, - /// }); - /// - /// }); - /// ``` - /// - /// For more information on the root resource pool, see [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere documentation. - /// - /// [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetResourcePoolInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getResourcePool:getResourcePool", args ?? new GetResourcePoolInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetRole.cs b/sdk/dotnet/GetRole.cs index 426ce921..c135e29f 100644 --- a/sdk/dotnet/GetRole.cs +++ b/sdk/dotnet/GetRole.cs @@ -14,29 +14,6 @@ public static class GetRole /// /// The `vsphere.Role` data source can be used to discover the `id` and privileges associated /// with a role given its name or display label. - /// - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var terraformRole = VSphere.GetRole.Invoke(new() - /// { - /// Label = "Terraform to vSphere Integration Role", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetRoleArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getRole:getRole", args ?? new GetRoleArgs(), options.WithDefaults()); @@ -44,29 +21,6 @@ public static Task InvokeAsync(GetRoleArgs args, InvokeOptions? o /// /// The `vsphere.Role` data source can be used to discover the `id` and privileges associated /// with a role given its name or display label. - /// - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var terraformRole = VSphere.GetRole.Invoke(new() - /// { - /// Label = "Terraform to vSphere Integration Role", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetRoleInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getRole:getRole", args ?? new GetRoleInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetTag.cs b/sdk/dotnet/GetTag.cs index c550fa77..76da4e0a 100644 --- a/sdk/dotnet/GetTag.cs +++ b/sdk/dotnet/GetTag.cs @@ -20,34 +20,6 @@ public static class GetTag /// /// > **NOTE:** Tagging is not supported on direct ESXi hosts connections and /// requires vCenter Server. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var category = VSphere.GetTagCategory.Invoke(new() - /// { - /// Name = "example-category", - /// }); - /// - /// var tag = VSphere.GetTag.Invoke(new() - /// { - /// Name = "example-tag", - /// CategoryId = category.Apply(getTagCategoryResult => getTagCategoryResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetTagArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getTag:getTag", args ?? new GetTagArgs(), options.WithDefaults()); @@ -61,34 +33,6 @@ public static Task InvokeAsync(GetTagArgs args, InvokeOptions? opt /// /// > **NOTE:** Tagging is not supported on direct ESXi hosts connections and /// requires vCenter Server. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var category = VSphere.GetTagCategory.Invoke(new() - /// { - /// Name = "example-category", - /// }); - /// - /// var tag = VSphere.GetTag.Invoke(new() - /// { - /// Name = "example-tag", - /// CategoryId = category.Apply(getTagCategoryResult => getTagCategoryResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetTagInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getTag:getTag", args ?? new GetTagInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetTagCategory.cs b/sdk/dotnet/GetTagCategory.cs index dc6f4395..612bafa7 100644 --- a/sdk/dotnet/GetTagCategory.cs +++ b/sdk/dotnet/GetTagCategory.cs @@ -20,28 +20,6 @@ public static class GetTagCategory /// /// > **NOTE:** Tagging is not supported on direct ESXi hosts connections and /// requires vCenter Server. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var category = VSphere.GetTagCategory.Invoke(new() - /// { - /// Name = "example-category", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetTagCategoryArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getTagCategory:getTagCategory", args ?? new GetTagCategoryArgs(), options.WithDefaults()); @@ -55,28 +33,6 @@ public static Task InvokeAsync(GetTagCategoryArgs args, In /// /// > **NOTE:** Tagging is not supported on direct ESXi hosts connections and /// requires vCenter Server. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var category = VSphere.GetTagCategory.Invoke(new() - /// { - /// Name = "example-category", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetTagCategoryInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getTagCategory:getTagCategory", args ?? new GetTagCategoryInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetVappContainer.cs b/sdk/dotnet/GetVappContainer.cs index 1df5fa71..8f8c782c 100644 --- a/sdk/dotnet/GetVappContainer.cs +++ b/sdk/dotnet/GetVappContainer.cs @@ -16,34 +16,6 @@ public static class GetVappContainer /// vApp container in vSphere. This is useful to return the ID of a vApp container /// that you want to use to create virtual machines in using the /// `vsphere.VirtualMachine` resource. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var pool = VSphere.GetVappContainer.Invoke(new() - /// { - /// Name = "vapp-container-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetVappContainerArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getVappContainer:getVappContainer", args ?? new GetVappContainerArgs(), options.WithDefaults()); @@ -53,34 +25,6 @@ public static Task InvokeAsync(GetVappContainerArgs args /// vApp container in vSphere. This is useful to return the ID of a vApp container /// that you want to use to create virtual machines in using the /// `vsphere.VirtualMachine` resource. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var pool = VSphere.GetVappContainer.Invoke(new() - /// { - /// Name = "vapp-container-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetVappContainerInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getVappContainer:getVappContainer", args ?? new GetVappContainerInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetVirtualMachine.cs b/sdk/dotnet/GetVirtualMachine.cs index 6bb90526..492f0215 100644 --- a/sdk/dotnet/GetVirtualMachine.cs +++ b/sdk/dotnet/GetVirtualMachine.cs @@ -17,67 +17,6 @@ public static class GetVirtualMachine /// the UUID of a template to be used as the source for cloning to a new /// `vsphere.VirtualMachine` resource. It also /// reads the guest ID so that can be supplied as well. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// In the following example, a virtual machine template is returned by its - /// unique name within the `vsphere.Datacenter`. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var template = VSphere.GetVirtualMachine.Invoke(new() - /// { - /// Name = "ubuntu-server-template", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// In the following example, each virtual machine template is returned by its - /// unique full path within the `vsphere.Datacenter`. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var productionTemplate = VSphere.GetVirtualMachine.Invoke(new() - /// { - /// Name = "production/templates/ubuntu-server-template", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var developmentTemplate = VSphere.GetVirtualMachine.Invoke(new() - /// { - /// Name = "development/templates/ubuntu-server-template", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetVirtualMachineArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getVirtualMachine:getVirtualMachine", args ?? new GetVirtualMachineArgs(), options.WithDefaults()); @@ -88,67 +27,6 @@ public static Task InvokeAsync(GetVirtualMachineArgs? a /// the UUID of a template to be used as the source for cloning to a new /// `vsphere.VirtualMachine` resource. It also /// reads the guest ID so that can be supplied as well. - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// In the following example, a virtual machine template is returned by its - /// unique name within the `vsphere.Datacenter`. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var template = VSphere.GetVirtualMachine.Invoke(new() - /// { - /// Name = "ubuntu-server-template", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// In the following example, each virtual machine template is returned by its - /// unique full path within the `vsphere.Datacenter`. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var productionTemplate = VSphere.GetVirtualMachine.Invoke(new() - /// { - /// Name = "production/templates/ubuntu-server-template", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var developmentTemplate = VSphere.GetVirtualMachine.Invoke(new() - /// { - /// Name = "development/templates/ubuntu-server-template", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetVirtualMachineInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getVirtualMachine:getVirtualMachine", args ?? new GetVirtualMachineInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetVmfsDisks.cs b/sdk/dotnet/GetVmfsDisks.cs index cd1934fa..5129130e 100644 --- a/sdk/dotnet/GetVmfsDisks.cs +++ b/sdk/dotnet/GetVmfsDisks.cs @@ -16,42 +16,6 @@ public static class GetVmfsDisks /// devices available on an ESXi host. This data source can be combined with the /// `vsphere.VmfsDatastore` resource to create VMFS /// datastores based off a set of discovered disks. - /// - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var host = VSphere.GetHost.Invoke(new() - /// { - /// Name = "esxi-01.example.com", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var vmfsDisks = VSphere.GetVmfsDisks.Invoke(new() - /// { - /// HostSystemId = host.Apply(getHostResult => getHostResult.Id), - /// Rescan = true, - /// Filter = "mpx.vmhba1:C0:T[12]:L0", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Task InvokeAsync(GetVmfsDisksArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("vsphere:index/getVmfsDisks:getVmfsDisks", args ?? new GetVmfsDisksArgs(), options.WithDefaults()); @@ -61,42 +25,6 @@ public static Task InvokeAsync(GetVmfsDisksArgs args, Invoke /// devices available on an ESXi host. This data source can be combined with the /// `vsphere.VmfsDatastore` resource to create VMFS /// datastores based off a set of discovered disks. - /// - /// - /// {{% examples %}} - /// ## Example Usage - /// {{% example %}} - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var host = VSphere.GetHost.Invoke(new() - /// { - /// Name = "esxi-01.example.com", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var vmfsDisks = VSphere.GetVmfsDisks.Invoke(new() - /// { - /// HostSystemId = host.Apply(getHostResult => getHostResult.Id), - /// Rescan = true, - /// Filter = "mpx.vmhba1:C0:T[12]:L0", - /// }); - /// - /// }); - /// ``` - /// {{% /example %}} - /// {{% /examples %}} /// public static Output Invoke(GetVmfsDisksInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getVmfsDisks:getVmfsDisks", args ?? new GetVmfsDisksInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/Host.cs b/sdk/dotnet/Host.cs index d11d2bb6..aec11895 100644 --- a/sdk/dotnet/Host.cs +++ b/sdk/dotnet/Host.cs @@ -14,96 +14,6 @@ namespace Pulumi.VSphere /// can be used either as a member of a cluster or as a standalone host. /// /// ## Example Usage - /// ### Create a standalone host - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var thumbprint = VSphere.GetHostThumbprint.Invoke(new() - /// { - /// Address = "esx-01.example.com", - /// Insecure = true, - /// }); - /// - /// var esx_01 = new VSphere.Host("esx-01", new() - /// { - /// Hostname = "esx-01.example.com", - /// Username = "root", - /// Password = "password", - /// License = "00000-00000-00000-00000-00000", - /// Thumbprint = thumbprint.Apply(getHostThumbprintResult => getHostThumbprintResult.Id), - /// Datacenter = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// }); - /// ``` - /// ### Create host in a compute cluster - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var cluster = VSphere.GetComputeCluster.Invoke(new() - /// { - /// Name = "cluster-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var thumbprint = VSphere.GetHostThumbprint.Invoke(new() - /// { - /// Address = "esx-01.example.com", - /// Insecure = true, - /// }); - /// - /// var esx_01 = new VSphere.Host("esx-01", new() - /// { - /// Hostname = "esx-01.example.com", - /// Username = "root", - /// Password = "password", - /// License = "00000-00000-00000-00000-00000", - /// Thumbprint = thumbprint.Apply(getHostThumbprintResult => getHostThumbprintResult.Id), - /// Cluster = cluster.Apply(getComputeClusterResult => getComputeClusterResult.Id), - /// }); - /// - /// }); - /// ``` - /// ## Importing - /// - /// An existing host can be [imported][docs-import] into this resource by supplying - /// the host's ID. An example is below: - /// - /// [docs-import]: /docs/import/index.html - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// - /// return await Deployment.RunAsync(() => - /// { - /// }); - /// ``` - /// - /// The above would import the host with ID `host-123`. /// [VSphereResourceType("vsphere:index/host:Host")] public partial class Host : global::Pulumi.CustomResource diff --git a/sdk/dotnet/HostPortGroup.cs b/sdk/dotnet/HostPortGroup.cs index 954cccaa..6a7e3416 100644 --- a/sdk/dotnet/HostPortGroup.cs +++ b/sdk/dotnet/HostPortGroup.cs @@ -18,128 +18,6 @@ namespace Pulumi.VSphere /// For an overview on vSphere networking concepts, see [the product documentation][ref-vsphere-net-concepts]. /// /// [ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html - /// - /// ## Example Usage - /// - /// **Create a Virtual Switch and Bind a Port Group:** - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var host = VSphere.GetHost.Invoke(new() - /// { - /// Name = "esxi-01.example.com", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var hostVirtualSwitch = new VSphere.HostVirtualSwitch("hostVirtualSwitch", new() - /// { - /// HostSystemId = host.Apply(getHostResult => getHostResult.Id), - /// NetworkAdapters = new[] - /// { - /// "vmnic0", - /// "vmnic1", - /// }, - /// ActiveNics = new[] - /// { - /// "vmnic0", - /// }, - /// StandbyNics = new[] - /// { - /// "vmnic1", - /// }, - /// }); - /// - /// var pg = new VSphere.HostPortGroup("pg", new() - /// { - /// HostSystemId = host.Apply(getHostResult => getHostResult.Id), - /// VirtualSwitchName = hostVirtualSwitch.Name, - /// }); - /// - /// }); - /// ``` - /// - /// **Create a Port Group with a VLAN and ab Override:** - /// - /// This example sets the trunk mode VLAN (`4095`, which passes through all tags) - /// and sets - /// `allow_promiscuous` - /// to ensure that all traffic is seen on the port. The setting overrides - /// the implicit default of `false` set on the standard switch. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var host = VSphere.GetHost.Invoke(new() - /// { - /// Name = "esxi-01.example.com", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var hostVirtualSwitch = new VSphere.HostVirtualSwitch("hostVirtualSwitch", new() - /// { - /// HostSystemId = host.Apply(getHostResult => getHostResult.Id), - /// NetworkAdapters = new[] - /// { - /// "vmnic0", - /// "vmnic1", - /// }, - /// ActiveNics = new[] - /// { - /// "vmnic0", - /// }, - /// StandbyNics = new[] - /// { - /// "vmnic1", - /// }, - /// }); - /// - /// var pg = new VSphere.HostPortGroup("pg", new() - /// { - /// HostSystemId = host.Apply(getHostResult => getHostResult.Id), - /// VirtualSwitchName = hostVirtualSwitch.Name, - /// VlanId = 4095, - /// AllowPromiscuous = true, - /// }); - /// - /// }); - /// ``` - /// ## Importing - /// - /// An existing host port group can be imported into this resource - /// using the host port group's ID. An example is below: - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// - /// return await Deployment.RunAsync(() => - /// { - /// }); - /// ``` - /// - /// The above would import the `management` host port group from host with ID `host-123`. /// [VSphereResourceType("vsphere:index/hostPortGroup:HostPortGroup")] public partial class HostPortGroup : global::Pulumi.CustomResource diff --git a/sdk/dotnet/Inputs/ComputeClusterVsanDiskGroupArgs.cs b/sdk/dotnet/Inputs/ComputeClusterVsanDiskGroupArgs.cs index 83576101..66704e1f 100644 --- a/sdk/dotnet/Inputs/ComputeClusterVsanDiskGroupArgs.cs +++ b/sdk/dotnet/Inputs/ComputeClusterVsanDiskGroupArgs.cs @@ -26,46 +26,6 @@ public sealed class ComputeClusterVsanDiskGroupArgs : global::Pulumi.ResourceArg /// /// > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. /// You can enable or re-enable vSphere HA after vSAN is configured. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var computeCluster = new VSphere.ComputeCluster("computeCluster", new() - /// { - /// DatacenterId = data.Vsphere_datacenter.Datacenter.Id, - /// HostSystemIds = new[] - /// { - /// data.Vsphere_host.Host.Select(__item => __item.Id).ToList(), - /// }, - /// DrsEnabled = true, - /// DrsAutomationLevel = "fullyAutomated", - /// HaEnabled = false, - /// VsanEnabled = true, - /// VsanDedupEnabled = true, - /// VsanCompressionEnabled = true, - /// VsanPerformanceEnabled = true, - /// VsanVerboseModeEnabled = true, - /// VsanNetworkDiagnosticModeEnabled = true, - /// VsanUnmapEnabled = true, - /// VsanDitEncryptionEnabled = true, - /// VsanDitRekeyInterval = 1800, - /// VsanDiskGroups = new[] - /// { - /// new VSphere.Inputs.ComputeClusterVsanDiskGroupArgs - /// { - /// Cache = data.Vsphere_vmfs_disks.Cache_disks[0], - /// Storages = data.Vsphere_vmfs_disks.Storage_disks, - /// }, - /// }, - /// }); - /// - /// }); - /// ``` /// public InputList Storages { diff --git a/sdk/dotnet/Inputs/ComputeClusterVsanDiskGroupGetArgs.cs b/sdk/dotnet/Inputs/ComputeClusterVsanDiskGroupGetArgs.cs index 7266cc80..fb4e8ac8 100644 --- a/sdk/dotnet/Inputs/ComputeClusterVsanDiskGroupGetArgs.cs +++ b/sdk/dotnet/Inputs/ComputeClusterVsanDiskGroupGetArgs.cs @@ -26,46 +26,6 @@ public sealed class ComputeClusterVsanDiskGroupGetArgs : global::Pulumi.Resource /// /// > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. /// You can enable or re-enable vSphere HA after vSAN is configured. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var computeCluster = new VSphere.ComputeCluster("computeCluster", new() - /// { - /// DatacenterId = data.Vsphere_datacenter.Datacenter.Id, - /// HostSystemIds = new[] - /// { - /// data.Vsphere_host.Host.Select(__item => __item.Id).ToList(), - /// }, - /// DrsEnabled = true, - /// DrsAutomationLevel = "fullyAutomated", - /// HaEnabled = false, - /// VsanEnabled = true, - /// VsanDedupEnabled = true, - /// VsanCompressionEnabled = true, - /// VsanPerformanceEnabled = true, - /// VsanVerboseModeEnabled = true, - /// VsanNetworkDiagnosticModeEnabled = true, - /// VsanUnmapEnabled = true, - /// VsanDitEncryptionEnabled = true, - /// VsanDitRekeyInterval = 1800, - /// VsanDiskGroups = new[] - /// { - /// new VSphere.Inputs.ComputeClusterVsanDiskGroupArgs - /// { - /// Cache = data.Vsphere_vmfs_disks.Cache_disks[0], - /// Storages = data.Vsphere_vmfs_disks.Storage_disks, - /// }, - /// }, - /// }); - /// - /// }); - /// ``` /// public InputList Storages { diff --git a/sdk/dotnet/License.cs b/sdk/dotnet/License.cs index b1cf80fd..292f65cb 100644 --- a/sdk/dotnet/License.cs +++ b/sdk/dotnet/License.cs @@ -11,29 +11,6 @@ namespace Pulumi.VSphere { /// /// Provides a VMware vSphere license resource. This can be used to add and remove license keys. - /// - /// ## Example Usage - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var licenseKey = new VSphere.License("licenseKey", new() - /// { - /// Labels = - /// { - /// { "VpxClientLicenseLabel", "Hello World" }, - /// { "Workflow", "Hello World" }, - /// }, - /// LicenseKey = "452CQ-2EK54-K8742-00000-00000", - /// }); - /// - /// }); - /// ``` /// [VSphereResourceType("vsphere:index/license:License")] public partial class License : global::Pulumi.CustomResource diff --git a/sdk/dotnet/Outputs/ComputeClusterVsanDiskGroup.cs b/sdk/dotnet/Outputs/ComputeClusterVsanDiskGroup.cs index 8a1e60cc..92c20c32 100644 --- a/sdk/dotnet/Outputs/ComputeClusterVsanDiskGroup.cs +++ b/sdk/dotnet/Outputs/ComputeClusterVsanDiskGroup.cs @@ -22,46 +22,6 @@ public sealed class ComputeClusterVsanDiskGroup /// /// > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. /// You can enable or re-enable vSphere HA after vSAN is configured. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var computeCluster = new VSphere.ComputeCluster("computeCluster", new() - /// { - /// DatacenterId = data.Vsphere_datacenter.Datacenter.Id, - /// HostSystemIds = new[] - /// { - /// data.Vsphere_host.Host.Select(__item => __item.Id).ToList(), - /// }, - /// DrsEnabled = true, - /// DrsAutomationLevel = "fullyAutomated", - /// HaEnabled = false, - /// VsanEnabled = true, - /// VsanDedupEnabled = true, - /// VsanCompressionEnabled = true, - /// VsanPerformanceEnabled = true, - /// VsanVerboseModeEnabled = true, - /// VsanNetworkDiagnosticModeEnabled = true, - /// VsanUnmapEnabled = true, - /// VsanDitEncryptionEnabled = true, - /// VsanDitRekeyInterval = 1800, - /// VsanDiskGroups = new[] - /// { - /// new VSphere.Inputs.ComputeClusterVsanDiskGroupArgs - /// { - /// Cache = data.Vsphere_vmfs_disks.Cache_disks[0], - /// Storages = data.Vsphere_vmfs_disks.Storage_disks, - /// }, - /// }, - /// }); - /// - /// }); - /// ``` /// public readonly ImmutableArray Storages; diff --git a/sdk/dotnet/ResourcePool.cs b/sdk/dotnet/ResourcePool.cs index 5d6093ad..c6ee887f 100644 --- a/sdk/dotnet/ResourcePool.cs +++ b/sdk/dotnet/ResourcePool.cs @@ -18,93 +18,6 @@ namespace Pulumi.VSphere /// /// [ref-vsphere-resource_pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html /// - /// ## Example Usage - /// - /// The following example sets up a resource pool in an existing compute cluster - /// with the default settings for CPU and memory reservations, shares, and limits. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var computeCluster = VSphere.GetComputeCluster.Invoke(new() - /// { - /// Name = "cluster-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var resourcePool = new VSphere.ResourcePool("resourcePool", new() - /// { - /// ParentResourcePoolId = computeCluster.Apply(getComputeClusterResult => getComputeClusterResult.ResourcePoolId), - /// }); - /// - /// }); - /// ``` - /// - /// A virtual machine resource could be targeted to use the default resource pool - /// of the cluster using the following: - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var vm = new VSphere.VirtualMachine("vm", new() - /// { - /// ResourcePoolId = data.Vsphere_compute_cluster.Cluster.Resource_pool_id, - /// }); - /// - /// // ... other configuration ... - /// }); - /// ``` - /// - /// The following example sets up a parent resource pool in an existing compute cluster - /// with a child resource pool nested below. Each resource pool is configured with - /// the default settings for CPU and memory reservations, shares, and limits. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var datacenter = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "dc-01", - /// }); - /// - /// var computeCluster = VSphere.GetComputeCluster.Invoke(new() - /// { - /// Name = "cluster-01", - /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var resourcePoolParent = new VSphere.ResourcePool("resourcePoolParent", new() - /// { - /// ParentResourcePoolId = computeCluster.Apply(getComputeClusterResult => getComputeClusterResult.ResourcePoolId), - /// }); - /// - /// var resourcePoolChild = new VSphere.ResourcePool("resourcePoolChild", new() - /// { - /// ParentResourcePoolId = resourcePoolParent.Id, - /// }); - /// - /// }); - /// ``` /// ## Importing /// ### Settings that Require vSphere 7.0 or higher /// diff --git a/sdk/dotnet/VirtualMachineSnapshot.cs b/sdk/dotnet/VirtualMachineSnapshot.cs index df9b0e23..18006ac5 100644 --- a/sdk/dotnet/VirtualMachineSnapshot.cs +++ b/sdk/dotnet/VirtualMachineSnapshot.cs @@ -31,30 +31,6 @@ namespace Pulumi.VSphere /// limitation of virtual machine snapshots, see [here][ext-vm-snap-limitations]. /// /// [ext-vm-snap-limitations]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-53F65726-A23B-4CF0-A7D5-48E584B88613.html - /// - /// ## Example Usage - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var demo1 = new VSphere.VirtualMachineSnapshot("demo1", new() - /// { - /// Consolidate = true, - /// Description = "This is Demo Snapshot", - /// Memory = true, - /// Quiesce = true, - /// RemoveChildren = false, - /// SnapshotName = "Snapshot Name", - /// VirtualMachineUuid = "9aac5551-a351-4158-8c5c-15a71e8ec5c9", - /// }); - /// - /// }); - /// ``` /// [VSphereResourceType("vsphere:index/virtualMachineSnapshot:VirtualMachineSnapshot")] public partial class VirtualMachineSnapshot : global::Pulumi.CustomResource diff --git a/sdk/dotnet/VmStoragePolicy.cs b/sdk/dotnet/VmStoragePolicy.cs index c7233f7d..f45f0850 100644 --- a/sdk/dotnet/VmStoragePolicy.cs +++ b/sdk/dotnet/VmStoragePolicy.cs @@ -13,224 +13,6 @@ namespace Pulumi.VSphere /// The `vsphere.VmStoragePolicy` resource can be used to create and manage storage /// policies. Using this resource, tag based placement rules can be created to /// place virtual machines on a datastore with matching tags. If storage requirements for the applications on the virtual machine change, you can modify the storage policy that was originally applied to the virtual machine. - /// - /// ## Example Usage - /// - /// The following example creates storage policies with `tag_rules` base on sets of environment, service level, and replication attributes. - /// - /// In this example, tags are first applied to datastores. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var environment = VSphere.GetTagCategory.Invoke(new() - /// { - /// Name = "environment", - /// }); - /// - /// var serviceLevel = VSphere.GetTagCategory.Invoke(new() - /// { - /// Name = "service_level", - /// }); - /// - /// var replication = VSphere.GetTagCategory.Invoke(new() - /// { - /// Name = "replication", - /// }); - /// - /// var production = VSphere.GetTag.Invoke(new() - /// { - /// CategoryId = "data.vsphere_tag_category.environment.id", - /// Name = "production", - /// }); - /// - /// var development = VSphere.GetTag.Invoke(new() - /// { - /// CategoryId = "data.vsphere_tag_category.environment.id", - /// Name = "development", - /// }); - /// - /// var platinum = VSphere.GetTag.Invoke(new() - /// { - /// CategoryId = "data.vsphere_tag_category.service_level.id", - /// Name = "platinum", - /// }); - /// - /// var gold = VSphere.GetTag.Invoke(new() - /// { - /// CategoryId = "data.vsphere_tag_category.service_level.id", - /// Name = "platinum", - /// }); - /// - /// var silver = VSphere.GetTag.Invoke(new() - /// { - /// CategoryId = "data.vsphere_tag_category.service_level.id", - /// Name = "silver", - /// }); - /// - /// var bronze = VSphere.GetTag.Invoke(new() - /// { - /// CategoryId = "data.vsphere_tag_category.service_level.id", - /// Name = "bronze", - /// }); - /// - /// var replicated = VSphere.GetTag.Invoke(new() - /// { - /// CategoryId = "data.vsphere_tag_category.replication.id", - /// Name = "replicated", - /// }); - /// - /// var nonReplicated = VSphere.GetTag.Invoke(new() - /// { - /// CategoryId = "data.vsphere_tag_category.replication.id", - /// Name = "non_replicated", - /// }); - /// - /// var prodDatastore = new VSphere.VmfsDatastore("prodDatastore", new() - /// { - /// Tags = new[] - /// { - /// "data.vsphere_tag.production.id", - /// "data.vsphere_tag.platinum.id", - /// "data.vsphere_tag.replicated.id", - /// }, - /// }); - /// - /// var devDatastore = new VSphere.NasDatastore("devDatastore", new() - /// { - /// Tags = new[] - /// { - /// "data.vsphere_tag.development.id", - /// "data.vsphere_tag.silver.id", - /// "data.vsphere_tag.non_replicated.id", - /// }, - /// }); - /// - /// }); - /// ``` - /// - /// Next, storage policies are created and `tag_rules` are applied. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var prodPlatinumReplicated = new VSphere.VmStoragePolicy("prodPlatinumReplicated", new() - /// { - /// Description = "prod_platinum_replicated", - /// TagRules = new[] - /// { - /// new VSphere.Inputs.VmStoragePolicyTagRuleArgs - /// { - /// TagCategory = data.Vsphere_tag_category.Environment.Name, - /// Tags = new[] - /// { - /// data.Vsphere_tag.Production.Name, - /// }, - /// IncludeDatastoresWithTags = true, - /// }, - /// new VSphere.Inputs.VmStoragePolicyTagRuleArgs - /// { - /// TagCategory = data.Vsphere_tag_category.Service_level.Name, - /// Tags = new[] - /// { - /// data.Vsphere_tag.Platinum.Name, - /// }, - /// IncludeDatastoresWithTags = true, - /// }, - /// new VSphere.Inputs.VmStoragePolicyTagRuleArgs - /// { - /// TagCategory = data.Vsphere_tag_category.Replication.Name, - /// Tags = new[] - /// { - /// data.Vsphere_tag.Replicated.Name, - /// }, - /// IncludeDatastoresWithTags = true, - /// }, - /// }, - /// }); - /// - /// var devSilverNonreplicated = new VSphere.VmStoragePolicy("devSilverNonreplicated", new() - /// { - /// Description = "dev_silver_nonreplicated", - /// TagRules = new[] - /// { - /// new VSphere.Inputs.VmStoragePolicyTagRuleArgs - /// { - /// TagCategory = data.Vsphere_tag_category.Environment.Name, - /// Tags = new[] - /// { - /// data.Vsphere_tag.Development.Name, - /// }, - /// IncludeDatastoresWithTags = true, - /// }, - /// new VSphere.Inputs.VmStoragePolicyTagRuleArgs - /// { - /// TagCategory = data.Vsphere_tag_category.Service_level.Name, - /// Tags = new[] - /// { - /// data.Vsphere_tag.Silver.Name, - /// }, - /// IncludeDatastoresWithTags = true, - /// }, - /// new VSphere.Inputs.VmStoragePolicyTagRuleArgs - /// { - /// TagCategory = data.Vsphere_tag_category.Replication.Name, - /// Tags = new[] - /// { - /// data.Vsphere_tag.Non_replicated.Name, - /// }, - /// IncludeDatastoresWithTags = true, - /// }, - /// }, - /// }); - /// - /// }); - /// ``` - /// - /// Lasttly, when creating a virtual machine resource, a storage policy can be specificed to direct virtual machine placement to a datastore which matches the policy's `tags_rules`. - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var prodPlatinumReplicated = VSphere.GetPolicy.Invoke(new() - /// { - /// Name = "prod_platinum_replicated", - /// }); - /// - /// var devSilverNonreplicated = VSphere.GetPolicy.Invoke(new() - /// { - /// Name = "dev_silver_nonreplicated", - /// }); - /// - /// var prodVm = new VSphere.VirtualMachine("prodVm", new() - /// { - /// StoragePolicyId = data.Vsphere_storage_policy.Storage_policy.Prod_platinum_replicated.Id, - /// }); - /// - /// // ... other configuration ... - /// var devVm = new VSphere.VirtualMachine("devVm", new() - /// { - /// StoragePolicyId = data.Vsphere_storage_policy.Storage_policy.Dev_silver_nonreplicated.Id, - /// }); - /// - /// // ... other configuration ... - /// }); - /// ``` /// [VSphereResourceType("vsphere:index/vmStoragePolicy:VmStoragePolicy")] public partial class VmStoragePolicy : global::Pulumi.CustomResource diff --git a/sdk/dotnet/Vnic.cs b/sdk/dotnet/Vnic.cs index 1dcdb3ca..8a5b82bb 100644 --- a/sdk/dotnet/Vnic.cs +++ b/sdk/dotnet/Vnic.cs @@ -15,143 +15,6 @@ namespace Pulumi.VSphere /// ## Example Usage /// /// ### S - /// ### Create a vnic attached to a distributed virtual switch using the vmotion TCP/IP stack - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var dc = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "mydc", - /// }); - /// - /// var h1 = VSphere.GetHost.Invoke(new() - /// { - /// Name = "esxi1.host.test", - /// DatacenterId = dc.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var d1 = new VSphere.DistributedVirtualSwitch("d1", new() - /// { - /// DatacenterId = dc.Apply(getDatacenterResult => getDatacenterResult.Id), - /// Hosts = new[] - /// { - /// new VSphere.Inputs.DistributedVirtualSwitchHostArgs - /// { - /// HostSystemId = h1.Apply(getHostResult => getHostResult.Id), - /// Devices = new[] - /// { - /// "vnic3", - /// }, - /// }, - /// }, - /// }); - /// - /// var p1 = new VSphere.DistributedPortGroup("p1", new() - /// { - /// VlanId = 1234, - /// DistributedVirtualSwitchUuid = d1.Id, - /// }); - /// - /// var v1 = new VSphere.Vnic("v1", new() - /// { - /// Host = h1.Apply(getHostResult => getHostResult.Id), - /// DistributedSwitchPort = d1.Id, - /// DistributedPortGroup = p1.Id, - /// Ipv4 = new VSphere.Inputs.VnicIpv4Args - /// { - /// Dhcp = true, - /// }, - /// Netstack = "vmotion", - /// }); - /// - /// }); - /// ``` - /// ### Create a vnic attached to a portgroup using the default TCP/IP stack - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using VSphere = Pulumi.VSphere; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var dc = VSphere.GetDatacenter.Invoke(new() - /// { - /// Name = "mydc", - /// }); - /// - /// var h1 = VSphere.GetHost.Invoke(new() - /// { - /// Name = "esxi1.host.test", - /// DatacenterId = dc.Apply(getDatacenterResult => getDatacenterResult.Id), - /// }); - /// - /// var hvs1 = new VSphere.HostVirtualSwitch("hvs1", new() - /// { - /// HostSystemId = h1.Apply(getHostResult => getHostResult.Id), - /// NetworkAdapters = new[] - /// { - /// "vmnic3", - /// "vmnic4", - /// }, - /// ActiveNics = new[] - /// { - /// "vmnic3", - /// }, - /// StandbyNics = new[] - /// { - /// "vmnic4", - /// }, - /// }); - /// - /// var p1 = new VSphere.HostPortGroup("p1", new() - /// { - /// VirtualSwitchName = hvs1.Name, - /// HostSystemId = h1.Apply(getHostResult => getHostResult.Id), - /// }); - /// - /// var v1 = new VSphere.Vnic("v1", new() - /// { - /// Host = h1.Apply(getHostResult => getHostResult.Id), - /// Portgroup = p1.Name, - /// Ipv4 = new VSphere.Inputs.VnicIpv4Args - /// { - /// Dhcp = true, - /// }, - /// Services = new[] - /// { - /// "vsan", - /// "management", - /// }, - /// }); - /// - /// }); - /// ``` - /// ## Importing - /// - /// An existing vNic can be [imported][docs-import] into this resource - /// via supplying the vNic's ID. An example is below: - /// - /// [docs-import]: /docs/import/index.html - /// - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// - /// return await Deployment.RunAsync(() => - /// { - /// }); - /// ``` - /// - /// The above would import the vnic `vmk2` from host with ID `host-123`. /// [VSphereResourceType("vsphere:index/vnic:Vnic")] public partial class Vnic : global::Pulumi.CustomResource diff --git a/sdk/go/vsphere/computeClusterVmAffinityRule.go b/sdk/go/vsphere/computeClusterVmAffinityRule.go index dbd06159..8c970b47 100644 --- a/sdk/go/vsphere/computeClusterVmAffinityRule.go +++ b/sdk/go/vsphere/computeClusterVmAffinityRule.go @@ -34,146 +34,6 @@ import ( // direct ESXi host connections. // // > **NOTE:** vSphere DRS requires a vSphere Enterprise Plus license. -// -// ## Example Usage -// -// The following example creates two virtual machines in a cluster using the -// `VirtualMachine` resource, creating the -// virtual machines in the cluster looked up by the -// `ComputeCluster` data source. It -// then creates an affinity rule for these two virtual machines, ensuring they -// will run on the same host whenever possible. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// datastore, err := vsphere.GetDatastore(ctx, &vsphere.GetDatastoreArgs{ -// Name: "datastore-01", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// cluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{ -// Name: "cluster-01", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// network, err := vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{ -// Name: "VM Network", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// var vm []*vsphere.VirtualMachine -// for index := 0; index < 2; index++ { -// key0 := index -// _ := index -// __res, err := vsphere.NewVirtualMachine(ctx, fmt.Sprintf("vm-%v", key0), &vsphere.VirtualMachineArgs{ -// ResourcePoolId: *pulumi.String(cluster.ResourcePoolId), -// DatastoreId: *pulumi.String(datastore.Id), -// NumCpus: pulumi.Int(1), -// Memory: pulumi.Int(1024), -// GuestId: pulumi.String("otherLinux64Guest"), -// NetworkInterfaces: vsphere.VirtualMachineNetworkInterfaceArray{ -// &vsphere.VirtualMachineNetworkInterfaceArgs{ -// NetworkId: *pulumi.String(network.Id), -// }, -// }, -// Disks: vsphere.VirtualMachineDiskArray{ -// &vsphere.VirtualMachineDiskArgs{ -// Label: pulumi.String("disk0"), -// Size: pulumi.Int(20), -// }, -// }, -// }) -// if err != nil { -// return err -// } -// vm = append(vm, __res) -// } -// _, err = vsphere.NewComputeClusterVmAffinityRule(ctx, "vmAffinityRule", &vsphere.ComputeClusterVmAffinityRuleArgs{ -// ComputeClusterId: *pulumi.String(cluster.Id), -// VirtualMachineIds: "TODO: For expression", -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// The following example creates an affinity rule for a set of virtual machines -// in the cluster by looking up the virtual machine UUIDs from the -// `VirtualMachine` data source. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// vms := []string{ -// "foo-0", -// "foo-1", -// } -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// cluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{ -// Name: "cluster-01", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// vmsVirtualMachine := "TODO: For expression" -// var splat0 []*string -// for _, val0 := range vmsVirtualMachine { -// splat0 = append(splat0, val0.Id) -// } -// _, err = vsphere.NewComputeClusterVmAffinityRule(ctx, "vmAffinityRule", &vsphere.ComputeClusterVmAffinityRuleArgs{ -// Enabled: pulumi.Bool(true), -// ComputeClusterId: *pulumi.String(cluster.Id), -// VirtualMachineIds: []*pulumi.String(splat0), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` type ComputeClusterVmAffinityRule struct { pulumi.CustomResourceState diff --git a/sdk/go/vsphere/datacenter.go b/sdk/go/vsphere/datacenter.go index e44f075b..660b8fcf 100644 --- a/sdk/go/vsphere/datacenter.go +++ b/sdk/go/vsphere/datacenter.go @@ -16,54 +16,6 @@ import ( // container of inventory objects such as hosts and virtual machines. // // ## Example Usage -// ### Create datacenter on the root folder -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.NewDatacenter(ctx, "prodDatacenter", nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// ### Create datacenter on a subfolder -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.NewDatacenter(ctx, "researchDatacenter", &vsphere.DatacenterArgs{ -// Folder: pulumi.String("/research/"), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` type Datacenter struct { pulumi.CustomResourceState diff --git a/sdk/go/vsphere/distributedVirtualSwitch.go b/sdk/go/vsphere/distributedVirtualSwitch.go index 28a1de46..6bf75657 100644 --- a/sdk/go/vsphere/distributedVirtualSwitch.go +++ b/sdk/go/vsphere/distributedVirtualSwitch.go @@ -266,36 +266,6 @@ type DistributedVirtualSwitch struct { // and `maxVlan` sub-arguments to define the tagged VLAN range. Multiple // `vlanRange` definitions are allowed, but they must not overlap. Example // below: - // - // ```go - // package main - // - // import ( - // "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" - // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - // ) - // - // func main() { - // pulumi.Run(func(ctx *pulumi.Context) error { - // _, err := vsphere.NewDistributedVirtualSwitch(ctx, "vds", &vsphere.DistributedVirtualSwitchArgs{ - // VlanRanges: vsphere.DistributedVirtualSwitchVlanRangeArray{ - // &vsphere.DistributedVirtualSwitchVlanRangeArgs{ - // MaxVlan: pulumi.Int(199), - // MinVlan: pulumi.Int(100), - // }, - // &vsphere.DistributedVirtualSwitchVlanRangeArgs{ - // MaxVlan: pulumi.Int(399), - // MinVlan: pulumi.Int(300), - // }, - // }, - // }) - // if err != nil { - // return err - // } - // return nil - // }) - // } - // ``` VlanRanges DistributedVirtualSwitchVlanRangeArrayOutput `pulumi:"vlanRanges"` // The maximum allowed usage for the vmotion traffic class, in Mbits/sec. VmotionMaximumMbit pulumi.IntOutput `pulumi:"vmotionMaximumMbit"` @@ -598,36 +568,6 @@ type distributedVirtualSwitchState struct { // and `maxVlan` sub-arguments to define the tagged VLAN range. Multiple // `vlanRange` definitions are allowed, but they must not overlap. Example // below: - // - // ```go - // package main - // - // import ( - // "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" - // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - // ) - // - // func main() { - // pulumi.Run(func(ctx *pulumi.Context) error { - // _, err := vsphere.NewDistributedVirtualSwitch(ctx, "vds", &vsphere.DistributedVirtualSwitchArgs{ - // VlanRanges: vsphere.DistributedVirtualSwitchVlanRangeArray{ - // &vsphere.DistributedVirtualSwitchVlanRangeArgs{ - // MaxVlan: pulumi.Int(199), - // MinVlan: pulumi.Int(100), - // }, - // &vsphere.DistributedVirtualSwitchVlanRangeArgs{ - // MaxVlan: pulumi.Int(399), - // MinVlan: pulumi.Int(300), - // }, - // }, - // }) - // if err != nil { - // return err - // } - // return nil - // }) - // } - // ``` VlanRanges []DistributedVirtualSwitchVlanRange `pulumi:"vlanRanges"` // The maximum allowed usage for the vmotion traffic class, in Mbits/sec. VmotionMaximumMbit *int `pulumi:"vmotionMaximumMbit"` @@ -898,36 +838,6 @@ type DistributedVirtualSwitchState struct { // and `maxVlan` sub-arguments to define the tagged VLAN range. Multiple // `vlanRange` definitions are allowed, but they must not overlap. Example // below: - // - // ```go - // package main - // - // import ( - // "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" - // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - // ) - // - // func main() { - // pulumi.Run(func(ctx *pulumi.Context) error { - // _, err := vsphere.NewDistributedVirtualSwitch(ctx, "vds", &vsphere.DistributedVirtualSwitchArgs{ - // VlanRanges: vsphere.DistributedVirtualSwitchVlanRangeArray{ - // &vsphere.DistributedVirtualSwitchVlanRangeArgs{ - // MaxVlan: pulumi.Int(199), - // MinVlan: pulumi.Int(100), - // }, - // &vsphere.DistributedVirtualSwitchVlanRangeArgs{ - // MaxVlan: pulumi.Int(399), - // MinVlan: pulumi.Int(300), - // }, - // }, - // }) - // if err != nil { - // return err - // } - // return nil - // }) - // } - // ``` VlanRanges DistributedVirtualSwitchVlanRangeArrayInput // The maximum allowed usage for the vmotion traffic class, in Mbits/sec. VmotionMaximumMbit pulumi.IntPtrInput @@ -1199,36 +1109,6 @@ type distributedVirtualSwitchArgs struct { // and `maxVlan` sub-arguments to define the tagged VLAN range. Multiple // `vlanRange` definitions are allowed, but they must not overlap. Example // below: - // - // ```go - // package main - // - // import ( - // "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" - // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - // ) - // - // func main() { - // pulumi.Run(func(ctx *pulumi.Context) error { - // _, err := vsphere.NewDistributedVirtualSwitch(ctx, "vds", &vsphere.DistributedVirtualSwitchArgs{ - // VlanRanges: vsphere.DistributedVirtualSwitchVlanRangeArray{ - // &vsphere.DistributedVirtualSwitchVlanRangeArgs{ - // MaxVlan: pulumi.Int(199), - // MinVlan: pulumi.Int(100), - // }, - // &vsphere.DistributedVirtualSwitchVlanRangeArgs{ - // MaxVlan: pulumi.Int(399), - // MinVlan: pulumi.Int(300), - // }, - // }, - // }) - // if err != nil { - // return err - // } - // return nil - // }) - // } - // ``` VlanRanges []DistributedVirtualSwitchVlanRange `pulumi:"vlanRanges"` // The maximum allowed usage for the vmotion traffic class, in Mbits/sec. VmotionMaximumMbit *int `pulumi:"vmotionMaximumMbit"` @@ -1497,36 +1377,6 @@ type DistributedVirtualSwitchArgs struct { // and `maxVlan` sub-arguments to define the tagged VLAN range. Multiple // `vlanRange` definitions are allowed, but they must not overlap. Example // below: - // - // ```go - // package main - // - // import ( - // "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" - // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - // ) - // - // func main() { - // pulumi.Run(func(ctx *pulumi.Context) error { - // _, err := vsphere.NewDistributedVirtualSwitch(ctx, "vds", &vsphere.DistributedVirtualSwitchArgs{ - // VlanRanges: vsphere.DistributedVirtualSwitchVlanRangeArray{ - // &vsphere.DistributedVirtualSwitchVlanRangeArgs{ - // MaxVlan: pulumi.Int(199), - // MinVlan: pulumi.Int(100), - // }, - // &vsphere.DistributedVirtualSwitchVlanRangeArgs{ - // MaxVlan: pulumi.Int(399), - // MinVlan: pulumi.Int(300), - // }, - // }, - // }) - // if err != nil { - // return err - // } - // return nil - // }) - // } - // ``` VlanRanges DistributedVirtualSwitchVlanRangeArrayInput // The maximum allowed usage for the vmotion traffic class, in Mbits/sec. VmotionMaximumMbit pulumi.IntPtrInput @@ -2167,39 +2017,6 @@ func (o DistributedVirtualSwitchOutput) VlanId() pulumi.IntOutput { // and `maxVlan` sub-arguments to define the tagged VLAN range. Multiple // `vlanRange` definitions are allowed, but they must not overlap. Example // below: -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.NewDistributedVirtualSwitch(ctx, "vds", &vsphere.DistributedVirtualSwitchArgs{ -// VlanRanges: vsphere.DistributedVirtualSwitchVlanRangeArray{ -// &vsphere.DistributedVirtualSwitchVlanRangeArgs{ -// MaxVlan: pulumi.Int(199), -// MinVlan: pulumi.Int(100), -// }, -// &vsphere.DistributedVirtualSwitchVlanRangeArgs{ -// MaxVlan: pulumi.Int(399), -// MinVlan: pulumi.Int(300), -// }, -// }, -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func (o DistributedVirtualSwitchOutput) VlanRanges() DistributedVirtualSwitchVlanRangeArrayOutput { return o.ApplyT(func(v *DistributedVirtualSwitch) DistributedVirtualSwitchVlanRangeArrayOutput { return v.VlanRanges }).(DistributedVirtualSwitchVlanRangeArrayOutput) } diff --git a/sdk/go/vsphere/file.go b/sdk/go/vsphere/file.go index 07c53636..6b4bd760 100644 --- a/sdk/go/vsphere/file.go +++ b/sdk/go/vsphere/file.go @@ -14,66 +14,6 @@ import ( ) // ## Example Usage -// ### Uploading a File -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.NewFile(ctx, "ubuntuVmdkUpload", &vsphere.FileArgs{ -// CreateDirectories: pulumi.Bool(true), -// Datacenter: pulumi.String("dc-01"), -// Datastore: pulumi.String("datastore-01"), -// DestinationFile: pulumi.String("/my/dst/path/custom_ubuntu.vmdk"), -// SourceFile: pulumi.String("/my/src/path/custom_ubuntu.vmdk"), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// ### Copying a File -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.NewFile(ctx, "ubuntuCopy", &vsphere.FileArgs{ -// CreateDirectories: pulumi.Bool(true), -// Datacenter: pulumi.String("dc-01"), -// Datastore: pulumi.String("datastore-01"), -// DestinationFile: pulumi.String("/my/dst/path/custom_ubuntu.vmdk"), -// SourceDatacenter: pulumi.String("dc-01"), -// SourceDatastore: pulumi.String("datastore-01"), -// SourceFile: pulumi.String("/my/src/path/custom_ubuntu.vmdk"), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` type File struct { pulumi.CustomResourceState diff --git a/sdk/go/vsphere/getComputeCluster.go b/sdk/go/vsphere/getComputeCluster.go index 772d7862..d8bba144 100644 --- a/sdk/go/vsphere/getComputeCluster.go +++ b/sdk/go/vsphere/getComputeCluster.go @@ -22,39 +22,6 @@ import ( // // resource for more information about clusters and how to managed the resource // in this provider. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{ -// Name: "cluster-01", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupComputeCluster(ctx *pulumi.Context, args *LookupComputeClusterArgs, opts ...pulumi.InvokeOption) (*LookupComputeClusterResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupComputeClusterResult diff --git a/sdk/go/vsphere/getComputeClusterHostGroup.go b/sdk/go/vsphere/getComputeClusterHostGroup.go index 0e618fd2..1171beea 100644 --- a/sdk/go/vsphere/getComputeClusterHostGroup.go +++ b/sdk/go/vsphere/getComputeClusterHostGroup.go @@ -15,54 +15,6 @@ import ( // The `ComputeClusterHostGroup` data source can be used to discover // the IDs ESXi hosts in a host group and return host group attributes to other // resources. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef(_var.Vsphere_datacenter), -// }, nil) -// if err != nil { -// return err -// } -// cluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{ -// Name: _var.Vsphere_cluster, -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// hostGroup1, err := vsphere.LookupComputeClusterHostGroup(ctx, &vsphere.LookupComputeClusterHostGroupArgs{ -// Name: "host_group1", -// ComputeClusterId: cluster.Id, -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.NewComputeClusterVmHostRule(ctx, "hostRule1", &vsphere.ComputeClusterVmHostRuleArgs{ -// ComputeClusterId: *pulumi.String(cluster.Id), -// VmGroupName: pulumi.String("vm_group1"), -// AffinityHostGroupName: *pulumi.String(hostGroup1.Name), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupComputeClusterHostGroup(ctx *pulumi.Context, args *LookupComputeClusterHostGroupArgs, opts ...pulumi.InvokeOption) (*LookupComputeClusterHostGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupComputeClusterHostGroupResult diff --git a/sdk/go/vsphere/getContentLibrary.go b/sdk/go/vsphere/getContentLibrary.go index fc84af3f..be126366 100644 --- a/sdk/go/vsphere/getContentLibrary.go +++ b/sdk/go/vsphere/getContentLibrary.go @@ -15,32 +15,6 @@ import ( // The `ContentLibrary` data source can be used to discover the ID of a content library. // // > **NOTE:** This resource requires vCenter Server and is not available on direct ESXi host connections. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.LookupContentLibrary(ctx, &vsphere.LookupContentLibraryArgs{ -// Name: "Content Library", -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupContentLibrary(ctx *pulumi.Context, args *LookupContentLibraryArgs, opts ...pulumi.InvokeOption) (*LookupContentLibraryResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupContentLibraryResult diff --git a/sdk/go/vsphere/getCustomAttribute.go b/sdk/go/vsphere/getCustomAttribute.go index 6d493437..98f1f685 100644 --- a/sdk/go/vsphere/getCustomAttribute.go +++ b/sdk/go/vsphere/getCustomAttribute.go @@ -20,32 +20,6 @@ import ( // // > **NOTE:** Custom attributes are unsupported on direct ESXi host connections // and require vCenter Server. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.LookupCustomAttribute(ctx, &vsphere.LookupCustomAttributeArgs{ -// Name: "test-attribute", -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupCustomAttribute(ctx *pulumi.Context, args *LookupCustomAttributeArgs, opts ...pulumi.InvokeOption) (*LookupCustomAttributeResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupCustomAttributeResult diff --git a/sdk/go/vsphere/getDatacenter.go b/sdk/go/vsphere/getDatacenter.go index c4595e55..c99a0e0a 100644 --- a/sdk/go/vsphere/getDatacenter.go +++ b/sdk/go/vsphere/getDatacenter.go @@ -16,32 +16,6 @@ import ( // vSphere datacenter object. This can then be used with resources or data sources // that require a datacenter, such as the `Host` // data source. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupDatacenter(ctx *pulumi.Context, args *LookupDatacenterArgs, opts ...pulumi.InvokeOption) (*LookupDatacenterResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDatacenterResult diff --git a/sdk/go/vsphere/getDatastore.go b/sdk/go/vsphere/getDatastore.go index 15f6ec37..8b64ccc0 100644 --- a/sdk/go/vsphere/getDatastore.go +++ b/sdk/go/vsphere/getDatastore.go @@ -16,39 +16,6 @@ import ( // vSphere datastore object. This can then be used with resources or data sources // that require a datastore. For example, to create virtual machines in using the // `VirtualMachine` resource. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.GetDatastore(ctx, &vsphere.GetDatastoreArgs{ -// Name: "datastore-01", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func GetDatastore(ctx *pulumi.Context, args *GetDatastoreArgs, opts ...pulumi.InvokeOption) (*GetDatastoreResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetDatastoreResult diff --git a/sdk/go/vsphere/getDatastoreCluster.go b/sdk/go/vsphere/getDatastoreCluster.go index d1610650..bcfcc9e2 100644 --- a/sdk/go/vsphere/getDatastoreCluster.go +++ b/sdk/go/vsphere/getDatastoreCluster.go @@ -16,39 +16,6 @@ import ( // vSphere datastore cluster object. This can then be used with resources or data sources // that require a datastore. For example, to assign datastores using the // `NasDatastore` or `VmfsDatastore` resources, or to create virtual machines in using the `VirtualMachine` resource. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupDatastoreCluster(ctx, &vsphere.LookupDatastoreClusterArgs{ -// Name: "datastore-cluster-01", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupDatastoreCluster(ctx *pulumi.Context, args *LookupDatastoreClusterArgs, opts ...pulumi.InvokeOption) (*LookupDatastoreClusterResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDatastoreClusterResult diff --git a/sdk/go/vsphere/getDistributedVirtualSwitch.go b/sdk/go/vsphere/getDistributedVirtualSwitch.go index 9531eaa9..2b1c0b9a 100644 --- a/sdk/go/vsphere/getDistributedVirtualSwitch.go +++ b/sdk/go/vsphere/getDistributedVirtualSwitch.go @@ -20,56 +20,6 @@ import ( // // > **NOTE:** This data source requires vCenter Server and is not available on // direct ESXi host connections. -// -// ## Example Usage -// -// The following example locates a distributed switch named `vds-01`, in the -// datacenter `dc-01`. It then uses this distributed switch to set up a -// `DistributedPortGroup` resource that uses the first uplink as a -// primary uplink and the second uplink as a secondary. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// vds, err := vsphere.LookupDistributedVirtualSwitch(ctx, &vsphere.LookupDistributedVirtualSwitchArgs{ -// Name: "vds-01", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.NewDistributedPortGroup(ctx, "dvpg", &vsphere.DistributedPortGroupArgs{ -// DistributedVirtualSwitchUuid: *pulumi.String(vds.Id), -// ActiveUplinks: pulumi.StringArray{ -// *pulumi.String(vds.Uplinks[0]), -// }, -// StandbyUplinks: pulumi.StringArray{ -// *pulumi.String(vds.Uplinks[1]), -// }, -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupDistributedVirtualSwitch(ctx *pulumi.Context, args *LookupDistributedVirtualSwitchArgs, opts ...pulumi.InvokeOption) (*LookupDistributedVirtualSwitchResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDistributedVirtualSwitchResult diff --git a/sdk/go/vsphere/getDynamic.go b/sdk/go/vsphere/getDynamic.go index 847cbc19..8e05a578 100644 --- a/sdk/go/vsphere/getDynamic.go +++ b/sdk/go/vsphere/getDynamic.go @@ -17,55 +17,6 @@ import ( // The `getDynamic` data source can be used to get the [managed object reference ID][docs-about-morefs] // of any tagged managed object in vCenter Server by providing a list of tag IDs // and an optional regular expression to filter objects by name. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.LookupTagCategory(ctx, &vsphere.LookupTagCategoryArgs{ -// Name: "SomeCategory", -// }, nil); -// if err != nil { -// return err -// } -// tag1, err := vsphere.LookupTag(ctx, &vsphere.LookupTagArgs{ -// Name: "FirstTag", -// CategoryId: data.Vsphere_tag_category.Cat.Id, -// }, nil); -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTag(ctx, &vsphere.LookupTagArgs{ -// Name: "SecondTag", -// CategoryId: data.Vsphere_tag_category.Cat.Id, -// }, nil); -// if err != nil { -// return err -// } -// _, err = vsphere.GetDynamic(ctx, &vsphere.GetDynamicArgs{ -// Filters: interface{}{ -// tag1.Id, -// tag1.Id, -// }, -// NameRegex: pulumi.StringRef("ubuntu"), -// Type: pulumi.StringRef("Datacenter"), -// }, nil); -// if err != nil { -// return err -// } -// return nil -// }) -// } -// ``` func GetDynamic(ctx *pulumi.Context, args *GetDynamicArgs, opts ...pulumi.InvokeOption) (*GetDynamicResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetDynamicResult diff --git a/sdk/go/vsphere/getFolder.go b/sdk/go/vsphere/getFolder.go index b494cbf1..27296e9f 100644 --- a/sdk/go/vsphere/getFolder.go +++ b/sdk/go/vsphere/getFolder.go @@ -14,32 +14,6 @@ import ( // The `Folder` data source can be used to get the general attributes of a // vSphere inventory folder. Paths are absolute and must include the datacenter. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.LookupFolder(ctx, &vsphere.LookupFolderArgs{ -// Path: "/dc-01/datastore-01/folder-01", -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupFolder(ctx *pulumi.Context, args *LookupFolderArgs, opts ...pulumi.InvokeOption) (*LookupFolderResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupFolderResult diff --git a/sdk/go/vsphere/getHost.go b/sdk/go/vsphere/getHost.go index 59d6d0d0..dee7a81f 100644 --- a/sdk/go/vsphere/getHost.go +++ b/sdk/go/vsphere/getHost.go @@ -15,39 +15,6 @@ import ( // The `Host` data source can be used to discover the ID of an ESXi host. // This can then be used with resources or data sources that require an ESX // host's managed object reference ID. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{ -// Name: pulumi.StringRef("esxi-01.example.com"), -// DatacenterId: datacenter.Id, -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupHost(ctx *pulumi.Context, args *LookupHostArgs, opts ...pulumi.InvokeOption) (*LookupHostResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupHostResult diff --git a/sdk/go/vsphere/getHostPciDevice.go b/sdk/go/vsphere/getHostPciDevice.go index 218d7ae2..fec34e47 100644 --- a/sdk/go/vsphere/getHostPciDevice.go +++ b/sdk/go/vsphere/getHostPciDevice.go @@ -17,46 +17,7 @@ import ( // `VirtualMachine`'s `pciDeviceId`. // // ## Example Usage -// ### With Vendor ID And Class ID // -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// host, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{ -// Name: pulumi.StringRef("esxi-01.example.com"), -// DatacenterId: datacenter.Id, -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.GetHostPciDevice(ctx, &vsphere.GetHostPciDeviceArgs{ -// HostId: host.Id, -// ClassId: pulumi.StringRef("123"), -// VendorId: pulumi.StringRef("456"), -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` // ### With Name Regular Expression func GetHostPciDevice(ctx *pulumi.Context, args *GetHostPciDeviceArgs, opts ...pulumi.InvokeOption) (*GetHostPciDeviceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) diff --git a/sdk/go/vsphere/getHostThumbprint.go b/sdk/go/vsphere/getHostThumbprint.go index befac967..e446a932 100644 --- a/sdk/go/vsphere/getHostThumbprint.go +++ b/sdk/go/vsphere/getHostThumbprint.go @@ -16,32 +16,6 @@ import ( // thumbprint of an ESXi host. This can be used when adding the `Host` // resource. If the ESXi host is using a certificate chain, the first one returned // will be used to generate the thumbprint. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.GetHostThumbprint(ctx, &vsphere.GetHostThumbprintArgs{ -// Address: "esxi-01.example.com", -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func GetHostThumbprint(ctx *pulumi.Context, args *GetHostThumbprintArgs, opts ...pulumi.InvokeOption) (*GetHostThumbprintResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetHostThumbprintResult diff --git a/sdk/go/vsphere/getLicense.go b/sdk/go/vsphere/getLicense.go index 5ba82da0..3157aac4 100644 --- a/sdk/go/vsphere/getLicense.go +++ b/sdk/go/vsphere/getLicense.go @@ -14,32 +14,6 @@ import ( // The `License` data source can be used to get the general attributes of // a license keys from a vCenter Server instance. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.LookupLicense(ctx, &vsphere.LookupLicenseArgs{ -// LicenseKey: "00000-00000-00000-00000-00000", -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupLicense(ctx *pulumi.Context, args *LookupLicenseArgs, opts ...pulumi.InvokeOption) (*LookupLicenseResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupLicenseResult diff --git a/sdk/go/vsphere/getNetwork.go b/sdk/go/vsphere/getNetwork.go index 362673d2..a713f599 100644 --- a/sdk/go/vsphere/getNetwork.go +++ b/sdk/go/vsphere/getNetwork.go @@ -17,39 +17,6 @@ import ( // network interface for `VirtualMachine` or any other vSphere resource // that requires a network. This includes standard (host-based) port groups, // distributed port groups, or opaque networks such as those managed by NSX. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.GetNetwork(ctx, &vsphere.GetNetworkArgs{ -// Name: "VM Network", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func GetNetwork(ctx *pulumi.Context, args *GetNetworkArgs, opts ...pulumi.InvokeOption) (*GetNetworkResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetNetworkResult diff --git a/sdk/go/vsphere/getPolicy.go b/sdk/go/vsphere/getPolicy.go index 5fa7be25..fc191cb1 100644 --- a/sdk/go/vsphere/getPolicy.go +++ b/sdk/go/vsphere/getPolicy.go @@ -18,38 +18,6 @@ import ( // // > **NOTE:** Storage policies are not supported on direct ESXi hosts and // requires vCenter Server. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.GetPolicy(ctx, &vsphere.GetPolicyArgs{ -// Name: "prod_platinum_replicated", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.GetPolicy(ctx, &vsphere.GetPolicyArgs{ -// Name: "dev_silver_nonreplicated", -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func GetPolicy(ctx *pulumi.Context, args *GetPolicyArgs, opts ...pulumi.InvokeOption) (*GetPolicyResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetPolicyResult diff --git a/sdk/go/vsphere/getResourcePool.go b/sdk/go/vsphere/getResourcePool.go index 7085d4cf..d5fcec58 100644 --- a/sdk/go/vsphere/getResourcePool.go +++ b/sdk/go/vsphere/getResourcePool.go @@ -16,77 +16,6 @@ import ( // resource pool in vSphere. This is useful to return the ID of a resource pool // that you want to use to create virtual machines in using the // `VirtualMachine` resource. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupResourcePool(ctx, &vsphere.LookupResourcePoolArgs{ -// Name: pulumi.StringRef("resource-pool-01"), -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// ### Specifying the Root Resource Pool for a Standalone ESXi Host -// -// > **NOTE:** Returning the root resource pool for a cluster can be done -// directly via the `ComputeCluster` -// data source. -// -// All compute resources in vSphere have a resource pool, even if one has not been -// explicitly created. This resource pool is referred to as the -// _root resource pool_ and can be looked up by specifying the path. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.LookupResourcePool(ctx, &vsphere.LookupResourcePoolArgs{ -// Name: pulumi.StringRef("esxi-01.example.com/Resources"), -// DatacenterId: pulumi.StringRef(data.Vsphere_datacenter.Datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// For more information on the root resource pool, see [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere documentation. -// -// [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html func LookupResourcePool(ctx *pulumi.Context, args *LookupResourcePoolArgs, opts ...pulumi.InvokeOption) (*LookupResourcePoolResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupResourcePoolResult diff --git a/sdk/go/vsphere/getRole.go b/sdk/go/vsphere/getRole.go index aadddf95..1777e306 100644 --- a/sdk/go/vsphere/getRole.go +++ b/sdk/go/vsphere/getRole.go @@ -14,32 +14,6 @@ import ( // The `Role` data source can be used to discover the `id` and privileges associated // with a role given its name or display label. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.LookupRole(ctx, &vsphere.LookupRoleArgs{ -// Label: "Terraform to vSphere Integration Role", -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupRole(ctx *pulumi.Context, args *LookupRoleArgs, opts ...pulumi.InvokeOption) (*LookupRoleResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupRoleResult diff --git a/sdk/go/vsphere/getTag.go b/sdk/go/vsphere/getTag.go index 600b14f7..76bde619 100644 --- a/sdk/go/vsphere/getTag.go +++ b/sdk/go/vsphere/getTag.go @@ -20,39 +20,6 @@ import ( // // > **NOTE:** Tagging is not supported on direct ESXi hosts connections and // requires vCenter Server. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// category, err := vsphere.LookupTagCategory(ctx, &vsphere.LookupTagCategoryArgs{ -// Name: "example-category", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTag(ctx, &vsphere.LookupTagArgs{ -// Name: "example-tag", -// CategoryId: category.Id, -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupTag(ctx *pulumi.Context, args *LookupTagArgs, opts ...pulumi.InvokeOption) (*LookupTagResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupTagResult diff --git a/sdk/go/vsphere/getTagCategory.go b/sdk/go/vsphere/getTagCategory.go index e5829c9a..a775d489 100644 --- a/sdk/go/vsphere/getTagCategory.go +++ b/sdk/go/vsphere/getTagCategory.go @@ -20,32 +20,6 @@ import ( // // > **NOTE:** Tagging is not supported on direct ESXi hosts connections and // requires vCenter Server. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.LookupTagCategory(ctx, &vsphere.LookupTagCategoryArgs{ -// Name: "example-category", -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupTagCategory(ctx *pulumi.Context, args *LookupTagCategoryArgs, opts ...pulumi.InvokeOption) (*LookupTagCategoryResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupTagCategoryResult diff --git a/sdk/go/vsphere/getVappContainer.go b/sdk/go/vsphere/getVappContainer.go index 389a5452..8c78a39b 100644 --- a/sdk/go/vsphere/getVappContainer.go +++ b/sdk/go/vsphere/getVappContainer.go @@ -16,39 +16,6 @@ import ( // vApp container in vSphere. This is useful to return the ID of a vApp container // that you want to use to create virtual machines in using the // `VirtualMachine` resource. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupVappContainer(ctx, &vsphere.LookupVappContainerArgs{ -// Name: "vapp-container-01", -// DatacenterId: datacenter.Id, -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupVappContainer(ctx *pulumi.Context, args *LookupVappContainerArgs, opts ...pulumi.InvokeOption) (*LookupVappContainerResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVappContainerResult diff --git a/sdk/go/vsphere/getVirtualMachine.go b/sdk/go/vsphere/getVirtualMachine.go index 88628370..f6f098c4 100644 --- a/sdk/go/vsphere/getVirtualMachine.go +++ b/sdk/go/vsphere/getVirtualMachine.go @@ -17,82 +17,6 @@ import ( // the UUID of a template to be used as the source for cloning to a new // `VirtualMachine` resource. It also // reads the guest ID so that can be supplied as well. -// -// ## Example Usage -// -// In the following example, a virtual machine template is returned by its -// unique name within the `Datacenter`. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupVirtualMachine(ctx, &vsphere.LookupVirtualMachineArgs{ -// Name: pulumi.StringRef("ubuntu-server-template"), -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// In the following example, each virtual machine template is returned by its -// unique full path within the `Datacenter`. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupVirtualMachine(ctx, &vsphere.LookupVirtualMachineArgs{ -// Name: pulumi.StringRef("production/templates/ubuntu-server-template"), -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupVirtualMachine(ctx, &vsphere.LookupVirtualMachineArgs{ -// Name: pulumi.StringRef("development/templates/ubuntu-server-template"), -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func LookupVirtualMachine(ctx *pulumi.Context, args *LookupVirtualMachineArgs, opts ...pulumi.InvokeOption) (*LookupVirtualMachineResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVirtualMachineResult diff --git a/sdk/go/vsphere/getVmfsDisks.go b/sdk/go/vsphere/getVmfsDisks.go index f1d5c031..2e1110d9 100644 --- a/sdk/go/vsphere/getVmfsDisks.go +++ b/sdk/go/vsphere/getVmfsDisks.go @@ -16,47 +16,6 @@ import ( // devices available on an ESXi host. This data source can be combined with the // `VmfsDatastore` resource to create VMFS // datastores based off a set of discovered disks. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// host, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{ -// Name: pulumi.StringRef("esxi-01.example.com"), -// DatacenterId: datacenter.Id, -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.GetVmfsDisks(ctx, &vsphere.GetVmfsDisksArgs{ -// HostSystemId: host.Id, -// Rescan: pulumi.BoolRef(true), -// Filter: pulumi.StringRef("mpx.vmhba1:C0:T[12]:L0"), -// }, nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` func GetVmfsDisks(ctx *pulumi.Context, args *GetVmfsDisksArgs, opts ...pulumi.InvokeOption) (*GetVmfsDisksResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetVmfsDisksResult diff --git a/sdk/go/vsphere/host.go b/sdk/go/vsphere/host.go index bff637d0..e084da40 100644 --- a/sdk/go/vsphere/host.go +++ b/sdk/go/vsphere/host.go @@ -17,124 +17,6 @@ import ( // can be used either as a member of a cluster or as a standalone host. // // ## Example Usage -// ### Create a standalone host -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// thumbprint, err := vsphere.GetHostThumbprint(ctx, &vsphere.GetHostThumbprintArgs{ -// Address: "esx-01.example.com", -// Insecure: pulumi.BoolRef(true), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.NewHost(ctx, "esx-01", &vsphere.HostArgs{ -// Hostname: pulumi.String("esx-01.example.com"), -// Username: pulumi.String("root"), -// Password: pulumi.String("password"), -// License: pulumi.String("00000-00000-00000-00000-00000"), -// Thumbprint: *pulumi.String(thumbprint.Id), -// Datacenter: *pulumi.String(datacenter.Id), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// ### Create host in a compute cluster -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// cluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{ -// Name: "cluster-01", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// thumbprint, err := vsphere.GetHostThumbprint(ctx, &vsphere.GetHostThumbprintArgs{ -// Address: "esx-01.example.com", -// Insecure: pulumi.BoolRef(true), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.NewHost(ctx, "esx-01", &vsphere.HostArgs{ -// Hostname: pulumi.String("esx-01.example.com"), -// Username: pulumi.String("root"), -// Password: pulumi.String("password"), -// License: pulumi.String("00000-00000-00000-00000-00000"), -// Thumbprint: *pulumi.String(thumbprint.Id), -// Cluster: *pulumi.String(cluster.Id), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// ## Importing -// -// An existing host can be [imported][docs-import] into this resource by supplying -// the host's ID. An example is below: -// -// [docs-import]: /docs/import/index.html -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// return nil -// }) -// } -// -// ``` -// -// The above would import the host with ID `host-123`. type Host struct { pulumi.CustomResourceState diff --git a/sdk/go/vsphere/hostPortGroup.go b/sdk/go/vsphere/hostPortGroup.go index e84c7817..96562285 100644 --- a/sdk/go/vsphere/hostPortGroup.go +++ b/sdk/go/vsphere/hostPortGroup.go @@ -20,151 +20,6 @@ import ( // // For an overview on vSphere networking concepts, see [the product documentation][ref-vsphere-net-concepts]. // -// ## Example Usage -// -// **Create a Virtual Switch and Bind a Port Group:** -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// host, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{ -// Name: pulumi.StringRef("esxi-01.example.com"), -// DatacenterId: datacenter.Id, -// }, nil) -// if err != nil { -// return err -// } -// hostVirtualSwitch, err := vsphere.NewHostVirtualSwitch(ctx, "hostVirtualSwitch", &vsphere.HostVirtualSwitchArgs{ -// HostSystemId: *pulumi.String(host.Id), -// NetworkAdapters: pulumi.StringArray{ -// pulumi.String("vmnic0"), -// pulumi.String("vmnic1"), -// }, -// ActiveNics: pulumi.StringArray{ -// pulumi.String("vmnic0"), -// }, -// StandbyNics: pulumi.StringArray{ -// pulumi.String("vmnic1"), -// }, -// }) -// if err != nil { -// return err -// } -// _, err = vsphere.NewHostPortGroup(ctx, "pg", &vsphere.HostPortGroupArgs{ -// HostSystemId: *pulumi.String(host.Id), -// VirtualSwitchName: hostVirtualSwitch.Name, -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// **Create a Port Group with a VLAN and ab Override:** -// -// This example sets the trunk mode VLAN (`4095`, which passes through all tags) -// and sets -// `allowPromiscuous` -// to ensure that all traffic is seen on the port. The setting overrides -// the implicit default of `false` set on the standard switch. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// host, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{ -// Name: pulumi.StringRef("esxi-01.example.com"), -// DatacenterId: datacenter.Id, -// }, nil) -// if err != nil { -// return err -// } -// hostVirtualSwitch, err := vsphere.NewHostVirtualSwitch(ctx, "hostVirtualSwitch", &vsphere.HostVirtualSwitchArgs{ -// HostSystemId: *pulumi.String(host.Id), -// NetworkAdapters: pulumi.StringArray{ -// pulumi.String("vmnic0"), -// pulumi.String("vmnic1"), -// }, -// ActiveNics: pulumi.StringArray{ -// pulumi.String("vmnic0"), -// }, -// StandbyNics: pulumi.StringArray{ -// pulumi.String("vmnic1"), -// }, -// }) -// if err != nil { -// return err -// } -// _, err = vsphere.NewHostPortGroup(ctx, "pg", &vsphere.HostPortGroupArgs{ -// HostSystemId: *pulumi.String(host.Id), -// VirtualSwitchName: hostVirtualSwitch.Name, -// VlanId: pulumi.Int(4095), -// AllowPromiscuous: pulumi.Bool(true), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// ## Importing -// -// An existing host port group can be imported into this resource -// using the host port group's ID. An example is below: -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// return nil -// }) -// } -// -// ``` -// -// The above would import the `management` host port group from host with ID `host-123`. -// // [ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html type HostPortGroup struct { pulumi.CustomResourceState diff --git a/sdk/go/vsphere/license.go b/sdk/go/vsphere/license.go index f3534c69..b50fa30c 100644 --- a/sdk/go/vsphere/license.go +++ b/sdk/go/vsphere/license.go @@ -14,36 +14,6 @@ import ( ) // Provides a VMware vSphere license resource. This can be used to add and remove license keys. -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.NewLicense(ctx, "licenseKey", &vsphere.LicenseArgs{ -// Labels: pulumi.StringMap{ -// "VpxClientLicenseLabel": pulumi.String("Hello World"), -// "Workflow": pulumi.String("Hello World"), -// }, -// LicenseKey: pulumi.String("452CQ-2EK54-K8742-00000-00000"), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` type License struct { pulumi.CustomResourceState diff --git a/sdk/go/vsphere/pulumiTypes.go b/sdk/go/vsphere/pulumiTypes.go index d8622b7d..f1449f2e 100644 --- a/sdk/go/vsphere/pulumiTypes.go +++ b/sdk/go/vsphere/pulumiTypes.go @@ -21,47 +21,6 @@ type ComputeClusterVsanDiskGroup struct { // // > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. // You can enable or re-enable vSphere HA after vSAN is configured. - // - // ```go - // package main - // - // import ( - // "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" - // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - // ) - // func main() { - // pulumi.Run(func(ctx *pulumi.Context) error { - // _, err := vsphere.NewComputeCluster(ctx, "computeCluster", &vsphere.ComputeClusterArgs{ - // DatacenterId: pulumi.Any(data.Vsphere_datacenter.Datacenter.Id), - // HostSystemIds: pulumi.StringArray{ - // %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-types-vsphere:index-ComputeClusterVsanDiskGroup:ComputeClusterVsanDiskGroup-storages.pp:2,18-45), - // }, - // DrsEnabled: pulumi.Bool(true), - // DrsAutomationLevel: pulumi.String("fullyAutomated"), - // HaEnabled: pulumi.Bool(false), - // VsanEnabled: pulumi.Bool(true), - // VsanDedupEnabled: pulumi.Bool(true), - // VsanCompressionEnabled: pulumi.Bool(true), - // VsanPerformanceEnabled: pulumi.Bool(true), - // VsanVerboseModeEnabled: pulumi.Bool(true), - // VsanNetworkDiagnosticModeEnabled: pulumi.Bool(true), - // VsanUnmapEnabled: pulumi.Bool(true), - // VsanDitEncryptionEnabled: pulumi.Bool(true), - // VsanDitRekeyInterval: pulumi.Int(1800), - // VsanDiskGroups: vsphere.ComputeClusterVsanDiskGroupArray{ - // &vsphere.ComputeClusterVsanDiskGroupArgs{ - // Cache: pulumi.Any(data.Vsphere_vmfs_disks.Cache_disks[0]), - // Storages: pulumi.Any(data.Vsphere_vmfs_disks.Storage_disks), - // }, - // }, - // }) - // if err != nil { - // return err - // } - // return nil - // }) - // } - // ``` Storages []string `pulumi:"storages"` } @@ -83,47 +42,6 @@ type ComputeClusterVsanDiskGroupArgs struct { // // > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. // You can enable or re-enable vSphere HA after vSAN is configured. - // - // ```go - // package main - // - // import ( - // "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" - // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - // ) - // func main() { - // pulumi.Run(func(ctx *pulumi.Context) error { - // _, err := vsphere.NewComputeCluster(ctx, "computeCluster", &vsphere.ComputeClusterArgs{ - // DatacenterId: pulumi.Any(data.Vsphere_datacenter.Datacenter.Id), - // HostSystemIds: pulumi.StringArray{ - // %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-types-vsphere:index-ComputeClusterVsanDiskGroup:ComputeClusterVsanDiskGroup-storages.pp:2,18-45), - // }, - // DrsEnabled: pulumi.Bool(true), - // DrsAutomationLevel: pulumi.String("fullyAutomated"), - // HaEnabled: pulumi.Bool(false), - // VsanEnabled: pulumi.Bool(true), - // VsanDedupEnabled: pulumi.Bool(true), - // VsanCompressionEnabled: pulumi.Bool(true), - // VsanPerformanceEnabled: pulumi.Bool(true), - // VsanVerboseModeEnabled: pulumi.Bool(true), - // VsanNetworkDiagnosticModeEnabled: pulumi.Bool(true), - // VsanUnmapEnabled: pulumi.Bool(true), - // VsanDitEncryptionEnabled: pulumi.Bool(true), - // VsanDitRekeyInterval: pulumi.Int(1800), - // VsanDiskGroups: vsphere.ComputeClusterVsanDiskGroupArray{ - // &vsphere.ComputeClusterVsanDiskGroupArgs{ - // Cache: pulumi.Any(data.Vsphere_vmfs_disks.Cache_disks[0]), - // Storages: pulumi.Any(data.Vsphere_vmfs_disks.Storage_disks), - // }, - // }, - // }) - // if err != nil { - // return err - // } - // return nil - // }) - // } - // ``` Storages pulumi.StringArrayInput `pulumi:"storages"` } @@ -205,49 +123,6 @@ func (o ComputeClusterVsanDiskGroupOutput) Cache() pulumi.StringPtrOutput { // // > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. // You can enable or re-enable vSphere HA after vSAN is configured. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.NewComputeCluster(ctx, "computeCluster", &vsphere.ComputeClusterArgs{ -// DatacenterId: pulumi.Any(data.Vsphere_datacenter.Datacenter.Id), -// HostSystemIds: pulumi.StringArray{ -// %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-types-vsphere:index-ComputeClusterVsanDiskGroup:ComputeClusterVsanDiskGroup-storages.pp:2,18-45), -// }, -// DrsEnabled: pulumi.Bool(true), -// DrsAutomationLevel: pulumi.String("fullyAutomated"), -// HaEnabled: pulumi.Bool(false), -// VsanEnabled: pulumi.Bool(true), -// VsanDedupEnabled: pulumi.Bool(true), -// VsanCompressionEnabled: pulumi.Bool(true), -// VsanPerformanceEnabled: pulumi.Bool(true), -// VsanVerboseModeEnabled: pulumi.Bool(true), -// VsanNetworkDiagnosticModeEnabled: pulumi.Bool(true), -// VsanUnmapEnabled: pulumi.Bool(true), -// VsanDitEncryptionEnabled: pulumi.Bool(true), -// VsanDitRekeyInterval: pulumi.Int(1800), -// VsanDiskGroups: vsphere.ComputeClusterVsanDiskGroupArray{ -// &vsphere.ComputeClusterVsanDiskGroupArgs{ -// Cache: pulumi.Any(data.Vsphere_vmfs_disks.Cache_disks[0]), -// Storages: pulumi.Any(data.Vsphere_vmfs_disks.Storage_disks), -// }, -// }, -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// ``` func (o ComputeClusterVsanDiskGroupOutput) Storages() pulumi.StringArrayOutput { return o.ApplyT(func(v ComputeClusterVsanDiskGroup) []string { return v.Storages }).(pulumi.StringArrayOutput) } diff --git a/sdk/go/vsphere/resourcePool.go b/sdk/go/vsphere/resourcePool.go index f7ca3a72..b7398004 100644 --- a/sdk/go/vsphere/resourcePool.go +++ b/sdk/go/vsphere/resourcePool.go @@ -19,121 +19,6 @@ import ( // For more information on vSphere resource pools, please refer to the // [product documentation][ref-vsphere-resource_pools]. // -// ## Example Usage -// -// The following example sets up a resource pool in an existing compute cluster -// with the default settings for CPU and memory reservations, shares, and limits. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// computeCluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{ -// Name: "cluster-01", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.NewResourcePool(ctx, "resourcePool", &vsphere.ResourcePoolArgs{ -// ParentResourcePoolId: *pulumi.String(computeCluster.ResourcePoolId), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// A virtual machine resource could be targeted to use the default resource pool -// of the cluster using the following: -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{ -// ResourcePoolId: pulumi.Any(data.Vsphere_compute_cluster.Cluster.Resource_pool_id), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// The following example sets up a parent resource pool in an existing compute cluster -// with a child resource pool nested below. Each resource pool is configured with -// the default settings for CPU and memory reservations, shares, and limits. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("dc-01"), -// }, nil) -// if err != nil { -// return err -// } -// computeCluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{ -// Name: "cluster-01", -// DatacenterId: pulumi.StringRef(datacenter.Id), -// }, nil) -// if err != nil { -// return err -// } -// resourcePoolParent, err := vsphere.NewResourcePool(ctx, "resourcePoolParent", &vsphere.ResourcePoolArgs{ -// ParentResourcePoolId: *pulumi.String(computeCluster.ResourcePoolId), -// }) -// if err != nil { -// return err -// } -// _, err = vsphere.NewResourcePool(ctx, "resourcePoolChild", &vsphere.ResourcePoolArgs{ -// ParentResourcePoolId: resourcePoolParent.ID(), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` // ## Importing // ### Settings that Require vSphere 7.0 or higher // diff --git a/sdk/go/vsphere/virtualMachineSnapshot.go b/sdk/go/vsphere/virtualMachineSnapshot.go index d86dcf79..a95ddbfc 100644 --- a/sdk/go/vsphere/virtualMachineSnapshot.go +++ b/sdk/go/vsphere/virtualMachineSnapshot.go @@ -31,38 +31,6 @@ import ( // NOT recommend using them as as backup feature. For more information on the // limitation of virtual machine snapshots, see [here][ext-vm-snap-limitations]. // -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.NewVirtualMachineSnapshot(ctx, "demo1", &vsphere.VirtualMachineSnapshotArgs{ -// Consolidate: pulumi.Bool(true), -// Description: pulumi.String("This is Demo Snapshot"), -// Memory: pulumi.Bool(true), -// Quiesce: pulumi.Bool(true), -// RemoveChildren: pulumi.Bool(false), -// SnapshotName: pulumi.String("Snapshot Name"), -// VirtualMachineUuid: pulumi.String("9aac5551-a351-4158-8c5c-15a71e8ec5c9"), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// // [ext-vm-snapshot-management]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-CA948C69-7F58-4519-AEB1-739545EA94E5.html // [ext-vm-snap-limitations]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-53F65726-A23B-4CF0-A7D5-48E584B88613.html type VirtualMachineSnapshot struct { diff --git a/sdk/go/vsphere/vmStoragePolicy.go b/sdk/go/vsphere/vmStoragePolicy.go index bdc877b2..276e162c 100644 --- a/sdk/go/vsphere/vmStoragePolicy.go +++ b/sdk/go/vsphere/vmStoragePolicy.go @@ -16,246 +16,6 @@ import ( // The `VmStoragePolicy` resource can be used to create and manage storage // policies. Using this resource, tag based placement rules can be created to // place virtual machines on a datastore with matching tags. If storage requirements for the applications on the virtual machine change, you can modify the storage policy that was originally applied to the virtual machine. -// -// ## Example Usage -// -// The following example creates storage policies with `tagRules` base on sets of environment, service level, and replication attributes. -// -// In this example, tags are first applied to datastores. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.LookupTagCategory(ctx, &vsphere.LookupTagCategoryArgs{ -// Name: "environment", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTagCategory(ctx, &vsphere.LookupTagCategoryArgs{ -// Name: "service_level", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTagCategory(ctx, &vsphere.LookupTagCategoryArgs{ -// Name: "replication", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTag(ctx, &vsphere.LookupTagArgs{ -// CategoryId: "data.vsphere_tag_category.environment.id", -// Name: "production", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTag(ctx, &vsphere.LookupTagArgs{ -// CategoryId: "data.vsphere_tag_category.environment.id", -// Name: "development", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTag(ctx, &vsphere.LookupTagArgs{ -// CategoryId: "data.vsphere_tag_category.service_level.id", -// Name: "platinum", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTag(ctx, &vsphere.LookupTagArgs{ -// CategoryId: "data.vsphere_tag_category.service_level.id", -// Name: "platinum", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTag(ctx, &vsphere.LookupTagArgs{ -// CategoryId: "data.vsphere_tag_category.service_level.id", -// Name: "silver", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTag(ctx, &vsphere.LookupTagArgs{ -// CategoryId: "data.vsphere_tag_category.service_level.id", -// Name: "bronze", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTag(ctx, &vsphere.LookupTagArgs{ -// CategoryId: "data.vsphere_tag_category.replication.id", -// Name: "replicated", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.LookupTag(ctx, &vsphere.LookupTagArgs{ -// CategoryId: "data.vsphere_tag_category.replication.id", -// Name: "non_replicated", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.NewVmfsDatastore(ctx, "prodDatastore", &vsphere.VmfsDatastoreArgs{ -// Tags: pulumi.StringArray{ -// pulumi.String("data.vsphere_tag.production.id"), -// pulumi.String("data.vsphere_tag.platinum.id"), -// pulumi.String("data.vsphere_tag.replicated.id"), -// }, -// }) -// if err != nil { -// return err -// } -// _, err = vsphere.NewNasDatastore(ctx, "devDatastore", &vsphere.NasDatastoreArgs{ -// Tags: pulumi.StringArray{ -// pulumi.String("data.vsphere_tag.development.id"), -// pulumi.String("data.vsphere_tag.silver.id"), -// pulumi.String("data.vsphere_tag.non_replicated.id"), -// }, -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// Next, storage policies are created and `tagRules` are applied. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.NewVmStoragePolicy(ctx, "prodPlatinumReplicated", &vsphere.VmStoragePolicyArgs{ -// Description: pulumi.String("prod_platinum_replicated"), -// TagRules: vsphere.VmStoragePolicyTagRuleArray{ -// &vsphere.VmStoragePolicyTagRuleArgs{ -// TagCategory: pulumi.Any(data.Vsphere_tag_category.Environment.Name), -// Tags: pulumi.StringArray{ -// data.Vsphere_tag.Production.Name, -// }, -// IncludeDatastoresWithTags: pulumi.Bool(true), -// }, -// &vsphere.VmStoragePolicyTagRuleArgs{ -// TagCategory: pulumi.Any(data.Vsphere_tag_category.Service_level.Name), -// Tags: pulumi.StringArray{ -// data.Vsphere_tag.Platinum.Name, -// }, -// IncludeDatastoresWithTags: pulumi.Bool(true), -// }, -// &vsphere.VmStoragePolicyTagRuleArgs{ -// TagCategory: pulumi.Any(data.Vsphere_tag_category.Replication.Name), -// Tags: pulumi.StringArray{ -// data.Vsphere_tag.Replicated.Name, -// }, -// IncludeDatastoresWithTags: pulumi.Bool(true), -// }, -// }, -// }) -// if err != nil { -// return err -// } -// _, err = vsphere.NewVmStoragePolicy(ctx, "devSilverNonreplicated", &vsphere.VmStoragePolicyArgs{ -// Description: pulumi.String("dev_silver_nonreplicated"), -// TagRules: vsphere.VmStoragePolicyTagRuleArray{ -// &vsphere.VmStoragePolicyTagRuleArgs{ -// TagCategory: pulumi.Any(data.Vsphere_tag_category.Environment.Name), -// Tags: pulumi.StringArray{ -// data.Vsphere_tag.Development.Name, -// }, -// IncludeDatastoresWithTags: pulumi.Bool(true), -// }, -// &vsphere.VmStoragePolicyTagRuleArgs{ -// TagCategory: pulumi.Any(data.Vsphere_tag_category.Service_level.Name), -// Tags: pulumi.StringArray{ -// data.Vsphere_tag.Silver.Name, -// }, -// IncludeDatastoresWithTags: pulumi.Bool(true), -// }, -// &vsphere.VmStoragePolicyTagRuleArgs{ -// TagCategory: pulumi.Any(data.Vsphere_tag_category.Replication.Name), -// Tags: pulumi.StringArray{ -// data.Vsphere_tag.Non_replicated.Name, -// }, -// IncludeDatastoresWithTags: pulumi.Bool(true), -// }, -// }, -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// Lasttly, when creating a virtual machine resource, a storage policy can be specificed to direct virtual machine placement to a datastore which matches the policy's `tagsRules`. -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vsphere.GetPolicy(ctx, &vsphere.GetPolicyArgs{ -// Name: "prod_platinum_replicated", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.GetPolicy(ctx, &vsphere.GetPolicyArgs{ -// Name: "dev_silver_nonreplicated", -// }, nil) -// if err != nil { -// return err -// } -// _, err = vsphere.NewVirtualMachine(ctx, "prodVm", &vsphere.VirtualMachineArgs{ -// StoragePolicyId: pulumi.Any(data.Vsphere_storage_policy.Storage_policy.Prod_platinum_replicated.Id), -// }) -// if err != nil { -// return err -// } -// _, err = vsphere.NewVirtualMachine(ctx, "devVm", &vsphere.VirtualMachineArgs{ -// StoragePolicyId: pulumi.Any(data.Vsphere_storage_policy.Storage_policy.Dev_silver_nonreplicated.Id), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` type VmStoragePolicy struct { pulumi.CustomResourceState diff --git a/sdk/go/vsphere/vnic.go b/sdk/go/vsphere/vnic.go index 7aacb319..6527dca4 100644 --- a/sdk/go/vsphere/vnic.go +++ b/sdk/go/vsphere/vnic.go @@ -18,165 +18,6 @@ import ( // ## Example Usage // // ### S -// ### Create a vnic attached to a distributed virtual switch using the vmotion TCP/IP stack -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// dc, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("mydc"), -// }, nil) -// if err != nil { -// return err -// } -// h1, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{ -// Name: pulumi.StringRef("esxi1.host.test"), -// DatacenterId: dc.Id, -// }, nil) -// if err != nil { -// return err -// } -// d1, err := vsphere.NewDistributedVirtualSwitch(ctx, "d1", &vsphere.DistributedVirtualSwitchArgs{ -// DatacenterId: *pulumi.String(dc.Id), -// Hosts: vsphere.DistributedVirtualSwitchHostArray{ -// &vsphere.DistributedVirtualSwitchHostArgs{ -// HostSystemId: *pulumi.String(h1.Id), -// Devices: pulumi.StringArray{ -// pulumi.String("vnic3"), -// }, -// }, -// }, -// }) -// if err != nil { -// return err -// } -// p1, err := vsphere.NewDistributedPortGroup(ctx, "p1", &vsphere.DistributedPortGroupArgs{ -// VlanId: pulumi.Int(1234), -// DistributedVirtualSwitchUuid: d1.ID(), -// }) -// if err != nil { -// return err -// } -// _, err = vsphere.NewVnic(ctx, "v1", &vsphere.VnicArgs{ -// Host: *pulumi.String(h1.Id), -// DistributedSwitchPort: d1.ID(), -// DistributedPortGroup: p1.ID(), -// Ipv4: &vsphere.VnicIpv4Args{ -// Dhcp: pulumi.Bool(true), -// }, -// Netstack: pulumi.String("vmotion"), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// ### Create a vnic attached to a portgroup using the default TCP/IP stack -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// dc, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{ -// Name: pulumi.StringRef("mydc"), -// }, nil) -// if err != nil { -// return err -// } -// h1, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{ -// Name: pulumi.StringRef("esxi1.host.test"), -// DatacenterId: dc.Id, -// }, nil) -// if err != nil { -// return err -// } -// hvs1, err := vsphere.NewHostVirtualSwitch(ctx, "hvs1", &vsphere.HostVirtualSwitchArgs{ -// HostSystemId: *pulumi.String(h1.Id), -// NetworkAdapters: pulumi.StringArray{ -// pulumi.String("vmnic3"), -// pulumi.String("vmnic4"), -// }, -// ActiveNics: pulumi.StringArray{ -// pulumi.String("vmnic3"), -// }, -// StandbyNics: pulumi.StringArray{ -// pulumi.String("vmnic4"), -// }, -// }) -// if err != nil { -// return err -// } -// p1, err := vsphere.NewHostPortGroup(ctx, "p1", &vsphere.HostPortGroupArgs{ -// VirtualSwitchName: hvs1.Name, -// HostSystemId: *pulumi.String(h1.Id), -// }) -// if err != nil { -// return err -// } -// _, err = vsphere.NewVnic(ctx, "v1", &vsphere.VnicArgs{ -// Host: *pulumi.String(h1.Id), -// Portgroup: p1.Name, -// Ipv4: &vsphere.VnicIpv4Args{ -// Dhcp: pulumi.Bool(true), -// }, -// Services: pulumi.StringArray{ -// pulumi.String("vsan"), -// pulumi.String("management"), -// }, -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// ## Importing -// -// An existing vNic can be [imported][docs-import] into this resource -// via supplying the vNic's ID. An example is below: -// -// [docs-import]: /docs/import/index.html -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// return nil -// }) -// } -// -// ``` -// -// The above would import the vnic `vmk2` from host with ID `host-123`. type Vnic struct { pulumi.CustomResourceState diff --git a/sdk/nodejs/computeClusterVmAffinityRule.ts b/sdk/nodejs/computeClusterVmAffinityRule.ts index a964066c..0b4a3783 100644 --- a/sdk/nodejs/computeClusterVmAffinityRule.ts +++ b/sdk/nodejs/computeClusterVmAffinityRule.ts @@ -26,87 +26,6 @@ import * as utilities from "./utilities"; * direct ESXi host connections. * * > **NOTE:** vSphere DRS requires a vSphere Enterprise Plus license. - * - * ## Example Usage - * - * The following example creates two virtual machines in a cluster using the - * `vsphere.VirtualMachine` resource, creating the - * virtual machines in the cluster looked up by the - * `vsphere.ComputeCluster` data source. It - * then creates an affinity rule for these two virtual machines, ensuring they - * will run on the same host whenever possible. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const datastore = datacenter.then(datacenter => vsphere.getDatastore({ - * name: "datastore-01", - * datacenterId: datacenter.id, - * })); - * const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({ - * name: "cluster-01", - * datacenterId: datacenter.id, - * })); - * const network = datacenter.then(datacenter => vsphere.getNetwork({ - * name: "VM Network", - * datacenterId: datacenter.id, - * })); - * const vm: vsphere.VirtualMachine[] = []; - * for (const range = {value: 0}; range.value < 2; range.value++) { - * vm.push(new vsphere.VirtualMachine(`vm-${range.value}`, { - * resourcePoolId: cluster.then(cluster => cluster.resourcePoolId), - * datastoreId: datastore.then(datastore => datastore.id), - * numCpus: 1, - * memory: 1024, - * guestId: "otherLinux64Guest", - * networkInterfaces: [{ - * networkId: network.then(network => network.id), - * }], - * disks: [{ - * label: "disk0", - * size: 20, - * }], - * })); - * } - * const vmAffinityRule = new vsphere.ComputeClusterVmAffinityRule("vmAffinityRule", { - * computeClusterId: cluster.then(cluster => cluster.id), - * virtualMachineIds: vm.map((v, k) => [k, v]).map(([, ]) => (v.id)), - * }); - * ``` - * - * The following example creates an affinity rule for a set of virtual machines - * in the cluster by looking up the virtual machine UUIDs from the - * `vsphere.VirtualMachine` data source. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const vms = [ - * "foo-0", - * "foo-1", - * ]; - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({ - * name: "cluster-01", - * datacenterId: datacenter.id, - * })); - * const vmsVirtualMachine = (new Array(vms.length)).map((_, i) => i).map(__index => (vsphere.getVirtualMachine({ - * name: vms[__index], - * datacenterId: _arg0_.id, - * }))); - * const vmAffinityRule = new vsphere.ComputeClusterVmAffinityRule("vmAffinityRule", { - * enabled: true, - * computeClusterId: cluster.then(cluster => cluster.id), - * virtualMachineIds: vmsVirtualMachine.map(__item => __item.id), - * }); - * ``` */ export class ComputeClusterVmAffinityRule extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/datacenter.ts b/sdk/nodejs/datacenter.ts index a318112c..688d952a 100644 --- a/sdk/nodejs/datacenter.ts +++ b/sdk/nodejs/datacenter.ts @@ -9,22 +9,6 @@ import * as utilities from "./utilities"; * container of inventory objects such as hosts and virtual machines. * * ## Example Usage - * ### Create datacenter on the root folder - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const prodDatacenter = new vsphere.Datacenter("prodDatacenter", {}); - * ``` - * ### Create datacenter on a subfolder - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const researchDatacenter = new vsphere.Datacenter("researchDatacenter", {folder: "/research/"}); - * ``` */ export class Datacenter extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/distributedVirtualSwitch.ts b/sdk/nodejs/distributedVirtualSwitch.ts index 16594119..ba596f07 100644 --- a/sdk/nodejs/distributedVirtualSwitch.ts +++ b/sdk/nodejs/distributedVirtualSwitch.ts @@ -457,22 +457,6 @@ export class DistributedVirtualSwitch extends pulumi.CustomResource { * and `maxVlan` sub-arguments to define the tagged VLAN range. Multiple * `vlanRange` definitions are allowed, but they must not overlap. Example * below: - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const vds = new vsphere.DistributedVirtualSwitch("vds", {vlanRanges: [ - * { - * maxVlan: 199, - * minVlan: 100, - * }, - * { - * maxVlan: 399, - * minVlan: 300, - * }, - * ]}); - * ``` */ public readonly vlanRanges!: pulumi.Output; /** @@ -1149,22 +1133,6 @@ export interface DistributedVirtualSwitchState { * and `maxVlan` sub-arguments to define the tagged VLAN range. Multiple * `vlanRange` definitions are allowed, but they must not overlap. Example * below: - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const vds = new vsphere.DistributedVirtualSwitch("vds", {vlanRanges: [ - * { - * maxVlan: 199, - * minVlan: 100, - * }, - * { - * maxVlan: 399, - * minVlan: 300, - * }, - * ]}); - * ``` */ vlanRanges?: pulumi.Input[]>; /** @@ -1623,22 +1591,6 @@ export interface DistributedVirtualSwitchArgs { * and `maxVlan` sub-arguments to define the tagged VLAN range. Multiple * `vlanRange` definitions are allowed, but they must not overlap. Example * below: - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const vds = new vsphere.DistributedVirtualSwitch("vds", {vlanRanges: [ - * { - * maxVlan: 199, - * minVlan: 100, - * }, - * { - * maxVlan: 399, - * minVlan: 300, - * }, - * ]}); - * ``` */ vlanRanges?: pulumi.Input[]>; /** diff --git a/sdk/nodejs/file.ts b/sdk/nodejs/file.ts index eb2ac734..cbce3014 100644 --- a/sdk/nodejs/file.ts +++ b/sdk/nodejs/file.ts @@ -6,36 +6,6 @@ import * as utilities from "./utilities"; /** * ## Example Usage - * ### Uploading a File - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const ubuntuVmdkUpload = new vsphere.File("ubuntuVmdkUpload", { - * createDirectories: true, - * datacenter: "dc-01", - * datastore: "datastore-01", - * destinationFile: "/my/dst/path/custom_ubuntu.vmdk", - * sourceFile: "/my/src/path/custom_ubuntu.vmdk", - * }); - * ``` - * ### Copying a File - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const ubuntuCopy = new vsphere.File("ubuntuCopy", { - * createDirectories: true, - * datacenter: "dc-01", - * datastore: "datastore-01", - * destinationFile: "/my/dst/path/custom_ubuntu.vmdk", - * sourceDatacenter: "dc-01", - * sourceDatastore: "datastore-01", - * sourceFile: "/my/src/path/custom_ubuntu.vmdk", - * }); - * ``` */ export class File extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/getComputeCluster.ts b/sdk/nodejs/getComputeCluster.ts index 531521da..8e66481e 100644 --- a/sdk/nodejs/getComputeCluster.ts +++ b/sdk/nodejs/getComputeCluster.ts @@ -14,21 +14,6 @@ import * as utilities from "./utilities"; * > You may also wish to see the `vsphere.ComputeCluster` * resource for more information about clusters and how to managed the resource * in this provider. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({ - * name: "cluster-01", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getComputeCluster(args: GetComputeClusterArgs, opts?: pulumi.InvokeOptions): Promise { @@ -82,21 +67,6 @@ export interface GetComputeClusterResult { * > You may also wish to see the `vsphere.ComputeCluster` * resource for more information about clusters and how to managed the resource * in this provider. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({ - * name: "cluster-01", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getComputeClusterOutput(args: GetComputeClusterOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getComputeCluster(a, opts)) diff --git a/sdk/nodejs/getComputeClusterHostGroup.ts b/sdk/nodejs/getComputeClusterHostGroup.ts index db797c21..19eb058d 100644 --- a/sdk/nodejs/getComputeClusterHostGroup.ts +++ b/sdk/nodejs/getComputeClusterHostGroup.ts @@ -8,30 +8,6 @@ import * as utilities from "./utilities"; * The `vsphere.ComputeClusterHostGroup` data source can be used to discover * the IDs ESXi hosts in a host group and return host group attributes to other * resources. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: _var.vsphere_datacenter, - * }); - * const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({ - * name: _var.vsphere_cluster, - * datacenterId: datacenter.id, - * })); - * const hostGroup1 = cluster.then(cluster => vsphere.getComputeClusterHostGroup({ - * name: "host_group1", - * computeClusterId: cluster.id, - * })); - * const hostRule1 = new vsphere.ComputeClusterVmHostRule("hostRule1", { - * computeClusterId: cluster.then(cluster => cluster.id), - * vmGroupName: "vm_group1", - * affinityHostGroupName: hostGroup1.then(hostGroup1 => hostGroup1.name), - * }); - * ``` */ export function getComputeClusterHostGroup(args: GetComputeClusterHostGroupArgs, opts?: pulumi.InvokeOptions): Promise { @@ -79,30 +55,6 @@ export interface GetComputeClusterHostGroupResult { * The `vsphere.ComputeClusterHostGroup` data source can be used to discover * the IDs ESXi hosts in a host group and return host group attributes to other * resources. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: _var.vsphere_datacenter, - * }); - * const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({ - * name: _var.vsphere_cluster, - * datacenterId: datacenter.id, - * })); - * const hostGroup1 = cluster.then(cluster => vsphere.getComputeClusterHostGroup({ - * name: "host_group1", - * computeClusterId: cluster.id, - * })); - * const hostRule1 = new vsphere.ComputeClusterVmHostRule("hostRule1", { - * computeClusterId: cluster.then(cluster => cluster.id), - * vmGroupName: "vm_group1", - * affinityHostGroupName: hostGroup1.then(hostGroup1 => hostGroup1.name), - * }); - * ``` */ export function getComputeClusterHostGroupOutput(args: GetComputeClusterHostGroupOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getComputeClusterHostGroup(a, opts)) diff --git a/sdk/nodejs/getContentLibrary.ts b/sdk/nodejs/getContentLibrary.ts index 53b4230b..dfb0c947 100644 --- a/sdk/nodejs/getContentLibrary.ts +++ b/sdk/nodejs/getContentLibrary.ts @@ -8,17 +8,6 @@ import * as utilities from "./utilities"; * The `vsphere.ContentLibrary` data source can be used to discover the ID of a content library. * * > **NOTE:** This resource requires vCenter Server and is not available on direct ESXi host connections. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const library = vsphere.getContentLibrary({ - * name: "Content Library", - * }); - * ``` */ export function getContentLibrary(args: GetContentLibraryArgs, opts?: pulumi.InvokeOptions): Promise { @@ -52,17 +41,6 @@ export interface GetContentLibraryResult { * The `vsphere.ContentLibrary` data source can be used to discover the ID of a content library. * * > **NOTE:** This resource requires vCenter Server and is not available on direct ESXi host connections. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const library = vsphere.getContentLibrary({ - * name: "Content Library", - * }); - * ``` */ export function getContentLibraryOutput(args: GetContentLibraryOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getContentLibrary(a, opts)) diff --git a/sdk/nodejs/getCustomAttribute.ts b/sdk/nodejs/getCustomAttribute.ts index abea3b10..6b405402 100644 --- a/sdk/nodejs/getCustomAttribute.ts +++ b/sdk/nodejs/getCustomAttribute.ts @@ -13,17 +13,6 @@ import * as utilities from "./utilities"; * * > **NOTE:** Custom attributes are unsupported on direct ESXi host connections * and require vCenter Server. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const attribute = vsphere.getCustomAttribute({ - * name: "test-attribute", - * }); - * ``` */ export function getCustomAttribute(args: GetCustomAttributeArgs, opts?: pulumi.InvokeOptions): Promise { @@ -63,17 +52,6 @@ export interface GetCustomAttributeResult { * * > **NOTE:** Custom attributes are unsupported on direct ESXi host connections * and require vCenter Server. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const attribute = vsphere.getCustomAttribute({ - * name: "test-attribute", - * }); - * ``` */ export function getCustomAttributeOutput(args: GetCustomAttributeOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getCustomAttribute(a, opts)) diff --git a/sdk/nodejs/getDatacenter.ts b/sdk/nodejs/getDatacenter.ts index 68523667..5ac35430 100644 --- a/sdk/nodejs/getDatacenter.ts +++ b/sdk/nodejs/getDatacenter.ts @@ -9,17 +9,6 @@ import * as utilities from "./utilities"; * vSphere datacenter object. This can then be used with resources or data sources * that require a datacenter, such as the `vsphere.Host` * data source. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * ``` */ export function getDatacenter(args?: GetDatacenterArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -61,17 +50,6 @@ export interface GetDatacenterResult { * vSphere datacenter object. This can then be used with resources or data sources * that require a datacenter, such as the `vsphere.Host` * data source. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * ``` */ export function getDatacenterOutput(args?: GetDatacenterOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getDatacenter(a, opts)) diff --git a/sdk/nodejs/getDatastore.ts b/sdk/nodejs/getDatastore.ts index d6bcb724..c68e3243 100644 --- a/sdk/nodejs/getDatastore.ts +++ b/sdk/nodejs/getDatastore.ts @@ -9,21 +9,6 @@ import * as utilities from "./utilities"; * vSphere datastore object. This can then be used with resources or data sources * that require a datastore. For example, to create virtual machines in using the * `vsphere.VirtualMachine` resource. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const datastore = datacenter.then(datacenter => vsphere.getDatastore({ - * name: "datastore-01", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getDatastore(args: GetDatastoreArgs, opts?: pulumi.InvokeOptions): Promise { @@ -67,21 +52,6 @@ export interface GetDatastoreResult { * vSphere datastore object. This can then be used with resources or data sources * that require a datastore. For example, to create virtual machines in using the * `vsphere.VirtualMachine` resource. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const datastore = datacenter.then(datacenter => vsphere.getDatastore({ - * name: "datastore-01", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getDatastoreOutput(args: GetDatastoreOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getDatastore(a, opts)) diff --git a/sdk/nodejs/getDatastoreCluster.ts b/sdk/nodejs/getDatastoreCluster.ts index e09b484d..759b2c4e 100644 --- a/sdk/nodejs/getDatastoreCluster.ts +++ b/sdk/nodejs/getDatastoreCluster.ts @@ -9,21 +9,6 @@ import * as utilities from "./utilities"; * vSphere datastore cluster object. This can then be used with resources or data sources * that require a datastore. For example, to assign datastores using the * `vsphere.NasDatastore` or `vsphere.VmfsDatastore` resources, or to create virtual machines in using the `vsphere.VirtualMachine` resource. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const datastoreCluster = datacenter.then(datacenter => vsphere.getDatastoreCluster({ - * name: "datastore-cluster-01", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getDatastoreCluster(args: GetDatastoreClusterArgs, opts?: pulumi.InvokeOptions): Promise { @@ -68,21 +53,6 @@ export interface GetDatastoreClusterResult { * vSphere datastore cluster object. This can then be used with resources or data sources * that require a datastore. For example, to assign datastores using the * `vsphere.NasDatastore` or `vsphere.VmfsDatastore` resources, or to create virtual machines in using the `vsphere.VirtualMachine` resource. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const datastoreCluster = datacenter.then(datacenter => vsphere.getDatastoreCluster({ - * name: "datastore-cluster-01", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getDatastoreClusterOutput(args: GetDatastoreClusterOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getDatastoreCluster(a, opts)) diff --git a/sdk/nodejs/getDistributedVirtualSwitch.ts b/sdk/nodejs/getDistributedVirtualSwitch.ts index 48b8b694..e24e41cd 100644 --- a/sdk/nodejs/getDistributedVirtualSwitch.ts +++ b/sdk/nodejs/getDistributedVirtualSwitch.ts @@ -13,31 +13,6 @@ import * as utilities from "./utilities"; * * > **NOTE:** This data source requires vCenter Server and is not available on * direct ESXi host connections. - * - * ## Example Usage - * - * The following example locates a distributed switch named `vds-01`, in the - * datacenter `dc-01`. It then uses this distributed switch to set up a - * `vsphere.DistributedPortGroup` resource that uses the first uplink as a - * primary uplink and the second uplink as a secondary. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const vds = datacenter.then(datacenter => vsphere.getDistributedVirtualSwitch({ - * name: "vds-01", - * datacenterId: datacenter.id, - * })); - * const dvpg = new vsphere.DistributedPortGroup("dvpg", { - * distributedVirtualSwitchUuid: vds.then(vds => vds.id), - * activeUplinks: [vds.then(vds => vds.uplinks?.[0])], - * standbyUplinks: [vds.then(vds => vds.uplinks?.[1])], - * }); - * ``` */ export function getDistributedVirtualSwitch(args: GetDistributedVirtualSwitchArgs, opts?: pulumi.InvokeOptions): Promise { @@ -92,31 +67,6 @@ export interface GetDistributedVirtualSwitchResult { * * > **NOTE:** This data source requires vCenter Server and is not available on * direct ESXi host connections. - * - * ## Example Usage - * - * The following example locates a distributed switch named `vds-01`, in the - * datacenter `dc-01`. It then uses this distributed switch to set up a - * `vsphere.DistributedPortGroup` resource that uses the first uplink as a - * primary uplink and the second uplink as a secondary. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const vds = datacenter.then(datacenter => vsphere.getDistributedVirtualSwitch({ - * name: "vds-01", - * datacenterId: datacenter.id, - * })); - * const dvpg = new vsphere.DistributedPortGroup("dvpg", { - * distributedVirtualSwitchUuid: vds.then(vds => vds.id), - * activeUplinks: [vds.then(vds => vds.uplinks?.[0])], - * standbyUplinks: [vds.then(vds => vds.uplinks?.[1])], - * }); - * ``` */ export function getDistributedVirtualSwitchOutput(args: GetDistributedVirtualSwitchOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getDistributedVirtualSwitch(a, opts)) diff --git a/sdk/nodejs/getDynamic.ts b/sdk/nodejs/getDynamic.ts index 4fadb1ca..9d8aac49 100644 --- a/sdk/nodejs/getDynamic.ts +++ b/sdk/nodejs/getDynamic.ts @@ -10,33 +10,6 @@ import * as utilities from "./utilities"; * The `vsphere.getDynamic` data source can be used to get the [managed object reference ID][docs-about-morefs] * of any tagged managed object in vCenter Server by providing a list of tag IDs * and an optional regular expression to filter objects by name. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const category = vsphere.getTagCategory({ - * name: "SomeCategory", - * }); - * const tag1 = vsphere.getTag({ - * name: "FirstTag", - * categoryId: data.vsphere_tag_category.cat.id, - * }); - * const tag2 = vsphere.getTag({ - * name: "SecondTag", - * categoryId: data.vsphere_tag_category.cat.id, - * }); - * const dyn = Promise.all([tag1, tag1]).then(([tag1, tag11]) => vsphere.getDynamic({ - * filters: [ - * tag1.id, - * tag11.id, - * ], - * nameRegex: "ubuntu", - * type: "Datacenter", - * })); - * ``` */ export function getDynamic(args: GetDynamicArgs, opts?: pulumi.InvokeOptions): Promise { @@ -88,33 +61,6 @@ export interface GetDynamicResult { * The `vsphere.getDynamic` data source can be used to get the [managed object reference ID][docs-about-morefs] * of any tagged managed object in vCenter Server by providing a list of tag IDs * and an optional regular expression to filter objects by name. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const category = vsphere.getTagCategory({ - * name: "SomeCategory", - * }); - * const tag1 = vsphere.getTag({ - * name: "FirstTag", - * categoryId: data.vsphere_tag_category.cat.id, - * }); - * const tag2 = vsphere.getTag({ - * name: "SecondTag", - * categoryId: data.vsphere_tag_category.cat.id, - * }); - * const dyn = Promise.all([tag1, tag1]).then(([tag1, tag11]) => vsphere.getDynamic({ - * filters: [ - * tag1.id, - * tag11.id, - * ], - * nameRegex: "ubuntu", - * type: "Datacenter", - * })); - * ``` */ export function getDynamicOutput(args: GetDynamicOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getDynamic(a, opts)) diff --git a/sdk/nodejs/getFolder.ts b/sdk/nodejs/getFolder.ts index b0a444c3..1a81d29e 100644 --- a/sdk/nodejs/getFolder.ts +++ b/sdk/nodejs/getFolder.ts @@ -7,17 +7,6 @@ import * as utilities from "./utilities"; /** * The `vsphere.Folder` data source can be used to get the general attributes of a * vSphere inventory folder. Paths are absolute and must include the datacenter. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const folder = vsphere.getFolder({ - * path: "/dc-01/datastore-01/folder-01", - * }); - * ``` */ export function getFolder(args: GetFolderArgs, opts?: pulumi.InvokeOptions): Promise { @@ -54,17 +43,6 @@ export interface GetFolderResult { /** * The `vsphere.Folder` data source can be used to get the general attributes of a * vSphere inventory folder. Paths are absolute and must include the datacenter. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const folder = vsphere.getFolder({ - * path: "/dc-01/datastore-01/folder-01", - * }); - * ``` */ export function getFolderOutput(args: GetFolderOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getFolder(a, opts)) diff --git a/sdk/nodejs/getHost.ts b/sdk/nodejs/getHost.ts index 297677d4..48da1040 100644 --- a/sdk/nodejs/getHost.ts +++ b/sdk/nodejs/getHost.ts @@ -8,21 +8,6 @@ import * as utilities from "./utilities"; * The `vsphere.Host` data source can be used to discover the ID of an ESXi host. * This can then be used with resources or data sources that require an ESX * host's managed object reference ID. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const host = datacenter.then(datacenter => vsphere.getHost({ - * name: "esxi-01.example.com", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getHost(args: GetHostArgs, opts?: pulumi.InvokeOptions): Promise { @@ -72,21 +57,6 @@ export interface GetHostResult { * The `vsphere.Host` data source can be used to discover the ID of an ESXi host. * This can then be used with resources or data sources that require an ESX * host's managed object reference ID. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const host = datacenter.then(datacenter => vsphere.getHost({ - * name: "esxi-01.example.com", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getHostOutput(args: GetHostOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getHost(a, opts)) diff --git a/sdk/nodejs/getHostPciDevice.ts b/sdk/nodejs/getHostPciDevice.ts index e4ca1a23..3c7a49b4 100644 --- a/sdk/nodejs/getHostPciDevice.ts +++ b/sdk/nodejs/getHostPciDevice.ts @@ -10,25 +10,7 @@ import * as utilities from "./utilities"; * `vsphere.VirtualMachine`'s `pciDeviceId`. * * ## Example Usage - * ### With Vendor ID And Class ID * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const host = datacenter.then(datacenter => vsphere.getHost({ - * name: "esxi-01.example.com", - * datacenterId: datacenter.id, - * })); - * const dev = host.then(host => vsphere.getHostPciDevice({ - * hostId: host.id, - * classId: "123", - * vendorId: "456", - * })); - * ``` * ### With Name Regular Expression */ export function getHostPciDevice(args: GetHostPciDeviceArgs, opts?: pulumi.InvokeOptions): Promise { @@ -92,25 +74,7 @@ export interface GetHostPciDeviceResult { * `vsphere.VirtualMachine`'s `pciDeviceId`. * * ## Example Usage - * ### With Vendor ID And Class ID - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const host = datacenter.then(datacenter => vsphere.getHost({ - * name: "esxi-01.example.com", - * datacenterId: datacenter.id, - * })); - * const dev = host.then(host => vsphere.getHostPciDevice({ - * hostId: host.id, - * classId: "123", - * vendorId: "456", - * })); - * ``` * ### With Name Regular Expression */ export function getHostPciDeviceOutput(args: GetHostPciDeviceOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { diff --git a/sdk/nodejs/getHostThumbprint.ts b/sdk/nodejs/getHostThumbprint.ts index 588813c6..0e9a2b7b 100644 --- a/sdk/nodejs/getHostThumbprint.ts +++ b/sdk/nodejs/getHostThumbprint.ts @@ -9,17 +9,6 @@ import * as utilities from "./utilities"; * thumbprint of an ESXi host. This can be used when adding the `vsphere.Host` * resource. If the ESXi host is using a certificate chain, the first one returned * will be used to generate the thumbprint. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const thumbprint = vsphere.getHostThumbprint({ - * address: "esxi-01.example.com", - * }); - * ``` */ export function getHostThumbprint(args: GetHostThumbprintArgs, opts?: pulumi.InvokeOptions): Promise { @@ -68,17 +57,6 @@ export interface GetHostThumbprintResult { * thumbprint of an ESXi host. This can be used when adding the `vsphere.Host` * resource. If the ESXi host is using a certificate chain, the first one returned * will be used to generate the thumbprint. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const thumbprint = vsphere.getHostThumbprint({ - * address: "esxi-01.example.com", - * }); - * ``` */ export function getHostThumbprintOutput(args: GetHostThumbprintOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getHostThumbprint(a, opts)) diff --git a/sdk/nodejs/getLicense.ts b/sdk/nodejs/getLicense.ts index fa862109..d8bbe950 100644 --- a/sdk/nodejs/getLicense.ts +++ b/sdk/nodejs/getLicense.ts @@ -7,17 +7,6 @@ import * as utilities from "./utilities"; /** * The `vsphere.License` data source can be used to get the general attributes of * a license keys from a vCenter Server instance. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const license = vsphere.getLicense({ - * licenseKey: "00000-00000-00000-00000-00000", - * }); - * ``` */ export function getLicense(args: GetLicenseArgs, opts?: pulumi.InvokeOptions): Promise { @@ -67,17 +56,6 @@ export interface GetLicenseResult { /** * The `vsphere.License` data source can be used to get the general attributes of * a license keys from a vCenter Server instance. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const license = vsphere.getLicense({ - * licenseKey: "00000-00000-00000-00000-00000", - * }); - * ``` */ export function getLicenseOutput(args: GetLicenseOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getLicense(a, opts)) diff --git a/sdk/nodejs/getNetwork.ts b/sdk/nodejs/getNetwork.ts index 72c3e48e..cf1a2bc5 100644 --- a/sdk/nodejs/getNetwork.ts +++ b/sdk/nodejs/getNetwork.ts @@ -10,21 +10,6 @@ import * as utilities from "./utilities"; * network interface for `vsphere.VirtualMachine` or any other vSphere resource * that requires a network. This includes standard (host-based) port groups, * distributed port groups, or opaque networks such as those managed by NSX. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const network = datacenter.then(datacenter => vsphere.getNetwork({ - * name: "VM Network", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getNetwork(args: GetNetworkArgs, opts?: pulumi.InvokeOptions): Promise { @@ -85,21 +70,6 @@ export interface GetNetworkResult { * network interface for `vsphere.VirtualMachine` or any other vSphere resource * that requires a network. This includes standard (host-based) port groups, * distributed port groups, or opaque networks such as those managed by NSX. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const network = datacenter.then(datacenter => vsphere.getNetwork({ - * name: "VM Network", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getNetworkOutput(args: GetNetworkOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getNetwork(a, opts)) diff --git a/sdk/nodejs/getPolicy.ts b/sdk/nodejs/getPolicy.ts index 80c3330b..a14dd4da 100644 --- a/sdk/nodejs/getPolicy.ts +++ b/sdk/nodejs/getPolicy.ts @@ -11,20 +11,6 @@ import * as utilities from "./utilities"; * * > **NOTE:** Storage policies are not supported on direct ESXi hosts and * requires vCenter Server. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const prodPlatinumReplicated = vsphere.getPolicy({ - * name: "prod_platinum_replicated", - * }); - * const devSilverNonreplicated = vsphere.getPolicy({ - * name: "dev_silver_nonreplicated", - * }); - * ``` */ export function getPolicy(args: GetPolicyArgs, opts?: pulumi.InvokeOptions): Promise { @@ -61,20 +47,6 @@ export interface GetPolicyResult { * * > **NOTE:** Storage policies are not supported on direct ESXi hosts and * requires vCenter Server. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const prodPlatinumReplicated = vsphere.getPolicy({ - * name: "prod_platinum_replicated", - * }); - * const devSilverNonreplicated = vsphere.getPolicy({ - * name: "dev_silver_nonreplicated", - * }); - * ``` */ export function getPolicyOutput(args: GetPolicyOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getPolicy(a, opts)) diff --git a/sdk/nodejs/getResourcePool.ts b/sdk/nodejs/getResourcePool.ts index 8ae929d5..4dac4fcb 100644 --- a/sdk/nodejs/getResourcePool.ts +++ b/sdk/nodejs/getResourcePool.ts @@ -9,44 +9,6 @@ import * as utilities from "./utilities"; * resource pool in vSphere. This is useful to return the ID of a resource pool * that you want to use to create virtual machines in using the * `vsphere.VirtualMachine` resource. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const pool = datacenter.then(datacenter => vsphere.getResourcePool({ - * name: "resource-pool-01", - * datacenterId: datacenter.id, - * })); - * ``` - * ### Specifying the Root Resource Pool for a Standalone ESXi Host - * - * > **NOTE:** Returning the root resource pool for a cluster can be done - * directly via the `vsphere.ComputeCluster` - * data source. - * - * All compute resources in vSphere have a resource pool, even if one has not been - * explicitly created. This resource pool is referred to as the - * _root resource pool_ and can be looked up by specifying the path. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const pool = vsphere.getResourcePool({ - * name: "esxi-01.example.com/Resources", - * datacenterId: data.vsphere_datacenter.datacenter.id, - * }); - * ``` - * - * For more information on the root resource pool, see [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere documentation. - * - * [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html */ export function getResourcePool(args?: GetResourcePoolArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -97,44 +59,6 @@ export interface GetResourcePoolResult { * resource pool in vSphere. This is useful to return the ID of a resource pool * that you want to use to create virtual machines in using the * `vsphere.VirtualMachine` resource. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const pool = datacenter.then(datacenter => vsphere.getResourcePool({ - * name: "resource-pool-01", - * datacenterId: datacenter.id, - * })); - * ``` - * ### Specifying the Root Resource Pool for a Standalone ESXi Host - * - * > **NOTE:** Returning the root resource pool for a cluster can be done - * directly via the `vsphere.ComputeCluster` - * data source. - * - * All compute resources in vSphere have a resource pool, even if one has not been - * explicitly created. This resource pool is referred to as the - * _root resource pool_ and can be looked up by specifying the path. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const pool = vsphere.getResourcePool({ - * name: "esxi-01.example.com/Resources", - * datacenterId: data.vsphere_datacenter.datacenter.id, - * }); - * ``` - * - * For more information on the root resource pool, see [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere documentation. - * - * [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html */ export function getResourcePoolOutput(args?: GetResourcePoolOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getResourcePool(a, opts)) diff --git a/sdk/nodejs/getRole.ts b/sdk/nodejs/getRole.ts index b300463f..50159bda 100644 --- a/sdk/nodejs/getRole.ts +++ b/sdk/nodejs/getRole.ts @@ -7,17 +7,6 @@ import * as utilities from "./utilities"; /** * The `vsphere.Role` data source can be used to discover the `id` and privileges associated * with a role given its name or display label. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const terraformRole = vsphere.getRole({ - * label: "Terraform to vSphere Integration Role", - * }); - * ``` */ export function getRole(args: GetRoleArgs, opts?: pulumi.InvokeOptions): Promise { @@ -74,17 +63,6 @@ export interface GetRoleResult { /** * The `vsphere.Role` data source can be used to discover the `id` and privileges associated * with a role given its name or display label. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const terraformRole = vsphere.getRole({ - * label: "Terraform to vSphere Integration Role", - * }); - * ``` */ export function getRoleOutput(args: GetRoleOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getRole(a, opts)) diff --git a/sdk/nodejs/getTag.ts b/sdk/nodejs/getTag.ts index 0a054df7..d48a69d1 100644 --- a/sdk/nodejs/getTag.ts +++ b/sdk/nodejs/getTag.ts @@ -13,21 +13,6 @@ import * as utilities from "./utilities"; * * > **NOTE:** Tagging is not supported on direct ESXi hosts connections and * requires vCenter Server. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const category = vsphere.getTagCategory({ - * name: "example-category", - * }); - * const tag = category.then(category => vsphere.getTag({ - * name: "example-tag", - * categoryId: category.id, - * })); - * ``` */ export function getTag(args: GetTagArgs, opts?: pulumi.InvokeOptions): Promise { @@ -74,21 +59,6 @@ export interface GetTagResult { * * > **NOTE:** Tagging is not supported on direct ESXi hosts connections and * requires vCenter Server. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const category = vsphere.getTagCategory({ - * name: "example-category", - * }); - * const tag = category.then(category => vsphere.getTag({ - * name: "example-tag", - * categoryId: category.id, - * })); - * ``` */ export function getTagOutput(args: GetTagOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getTag(a, opts)) diff --git a/sdk/nodejs/getTagCategory.ts b/sdk/nodejs/getTagCategory.ts index 47fbc3a8..df92167b 100644 --- a/sdk/nodejs/getTagCategory.ts +++ b/sdk/nodejs/getTagCategory.ts @@ -13,17 +13,6 @@ import * as utilities from "./utilities"; * * > **NOTE:** Tagging is not supported on direct ESXi hosts connections and * requires vCenter Server. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const category = vsphere.getTagCategory({ - * name: "example-category", - * }); - * ``` */ export function getTagCategory(args: GetTagCategoryArgs, opts?: pulumi.InvokeOptions): Promise { @@ -65,17 +54,6 @@ export interface GetTagCategoryResult { * * > **NOTE:** Tagging is not supported on direct ESXi hosts connections and * requires vCenter Server. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const category = vsphere.getTagCategory({ - * name: "example-category", - * }); - * ``` */ export function getTagCategoryOutput(args: GetTagCategoryOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getTagCategory(a, opts)) diff --git a/sdk/nodejs/getVappContainer.ts b/sdk/nodejs/getVappContainer.ts index 6a3f6309..7331f190 100644 --- a/sdk/nodejs/getVappContainer.ts +++ b/sdk/nodejs/getVappContainer.ts @@ -9,21 +9,6 @@ import * as utilities from "./utilities"; * vApp container in vSphere. This is useful to return the ID of a vApp container * that you want to use to create virtual machines in using the * `vsphere.VirtualMachine` resource. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const pool = datacenter.then(datacenter => vsphere.getVappContainer({ - * name: "vapp-container-01", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getVappContainer(args: GetVappContainerArgs, opts?: pulumi.InvokeOptions): Promise { @@ -66,21 +51,6 @@ export interface GetVappContainerResult { * vApp container in vSphere. This is useful to return the ID of a vApp container * that you want to use to create virtual machines in using the * `vsphere.VirtualMachine` resource. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const pool = datacenter.then(datacenter => vsphere.getVappContainer({ - * name: "vapp-container-01", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getVappContainerOutput(args: GetVappContainerOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getVappContainer(a, opts)) diff --git a/sdk/nodejs/getVirtualMachine.ts b/sdk/nodejs/getVirtualMachine.ts index bc38eae6..b9cbc22a 100644 --- a/sdk/nodejs/getVirtualMachine.ts +++ b/sdk/nodejs/getVirtualMachine.ts @@ -12,43 +12,6 @@ import * as utilities from "./utilities"; * the UUID of a template to be used as the source for cloning to a new * `vsphere.VirtualMachine` resource. It also * reads the guest ID so that can be supplied as well. - * - * ## Example Usage - * - * In the following example, a virtual machine template is returned by its - * unique name within the `vsphere.Datacenter`. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const template = datacenter.then(datacenter => vsphere.getVirtualMachine({ - * name: "ubuntu-server-template", - * datacenterId: datacenter.id, - * })); - * ``` - * In the following example, each virtual machine template is returned by its - * unique full path within the `vsphere.Datacenter`. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const productionTemplate = datacenter.then(datacenter => vsphere.getVirtualMachine({ - * name: "production/templates/ubuntu-server-template", - * datacenterId: datacenter.id, - * })); - * const developmentTemplate = datacenter.then(datacenter => vsphere.getVirtualMachine({ - * name: "development/templates/ubuntu-server-template", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getVirtualMachine(args?: GetVirtualMachineArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; @@ -371,43 +334,6 @@ export interface GetVirtualMachineResult { * the UUID of a template to be used as the source for cloning to a new * `vsphere.VirtualMachine` resource. It also * reads the guest ID so that can be supplied as well. - * - * ## Example Usage - * - * In the following example, a virtual machine template is returned by its - * unique name within the `vsphere.Datacenter`. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const template = datacenter.then(datacenter => vsphere.getVirtualMachine({ - * name: "ubuntu-server-template", - * datacenterId: datacenter.id, - * })); - * ``` - * In the following example, each virtual machine template is returned by its - * unique full path within the `vsphere.Datacenter`. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const productionTemplate = datacenter.then(datacenter => vsphere.getVirtualMachine({ - * name: "production/templates/ubuntu-server-template", - * datacenterId: datacenter.id, - * })); - * const developmentTemplate = datacenter.then(datacenter => vsphere.getVirtualMachine({ - * name: "development/templates/ubuntu-server-template", - * datacenterId: datacenter.id, - * })); - * ``` */ export function getVirtualMachineOutput(args?: GetVirtualMachineOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getVirtualMachine(a, opts)) diff --git a/sdk/nodejs/getVmfsDisks.ts b/sdk/nodejs/getVmfsDisks.ts index 9a3e53c5..cada3f9b 100644 --- a/sdk/nodejs/getVmfsDisks.ts +++ b/sdk/nodejs/getVmfsDisks.ts @@ -9,26 +9,6 @@ import * as utilities from "./utilities"; * devices available on an ESXi host. This data source can be combined with the * `vsphere.VmfsDatastore` resource to create VMFS * datastores based off a set of discovered disks. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const host = datacenter.then(datacenter => vsphere.getHost({ - * name: "esxi-01.example.com", - * datacenterId: datacenter.id, - * })); - * const vmfsDisks = host.then(host => vsphere.getVmfsDisks({ - * hostSystemId: host.id, - * rescan: true, - * filter: "mpx.vmhba1:C0:T[12]:L0", - * })); - * ``` */ export function getVmfsDisks(args: GetVmfsDisksArgs, opts?: pulumi.InvokeOptions): Promise { @@ -88,26 +68,6 @@ export interface GetVmfsDisksResult { * devices available on an ESXi host. This data source can be combined with the * `vsphere.VmfsDatastore` resource to create VMFS * datastores based off a set of discovered disks. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const host = datacenter.then(datacenter => vsphere.getHost({ - * name: "esxi-01.example.com", - * datacenterId: datacenter.id, - * })); - * const vmfsDisks = host.then(host => vsphere.getVmfsDisks({ - * hostSystemId: host.id, - * rescan: true, - * filter: "mpx.vmhba1:C0:T[12]:L0", - * })); - * ``` */ export function getVmfsDisksOutput(args: GetVmfsDisksOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply((a: any) => getVmfsDisks(a, opts)) diff --git a/sdk/nodejs/host.ts b/sdk/nodejs/host.ts index b201af82..35a76c3c 100644 --- a/sdk/nodejs/host.ts +++ b/sdk/nodejs/host.ts @@ -9,66 +9,6 @@ import * as utilities from "./utilities"; * can be used either as a member of a cluster or as a standalone host. * * ## Example Usage - * ### Create a standalone host - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const thumbprint = vsphere.getHostThumbprint({ - * address: "esx-01.example.com", - * insecure: true, - * }); - * const esx_01 = new vsphere.Host("esx-01", { - * hostname: "esx-01.example.com", - * username: "root", - * password: "password", - * license: "00000-00000-00000-00000-00000", - * thumbprint: thumbprint.then(thumbprint => thumbprint.id), - * datacenter: datacenter.then(datacenter => datacenter.id), - * }); - * ``` - * ### Create host in a compute cluster - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({ - * name: "cluster-01", - * datacenterId: datacenter.id, - * })); - * const thumbprint = vsphere.getHostThumbprint({ - * address: "esx-01.example.com", - * insecure: true, - * }); - * const esx_01 = new vsphere.Host("esx-01", { - * hostname: "esx-01.example.com", - * username: "root", - * password: "password", - * license: "00000-00000-00000-00000-00000", - * thumbprint: thumbprint.then(thumbprint => thumbprint.id), - * cluster: cluster.then(cluster => cluster.id), - * }); - * ``` - * ## Importing - * - * An existing host can be [imported][docs-import] into this resource by supplying - * the host's ID. An example is below: - * - * [docs-import]: /docs/import/index.html - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * ``` - * - * The above would import the host with ID `host-123`. */ export class Host extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/hostPortGroup.ts b/sdk/nodejs/hostPortGroup.ts index dd8ff58d..fcaffbd3 100644 --- a/sdk/nodejs/hostPortGroup.ts +++ b/sdk/nodejs/hostPortGroup.ts @@ -15,82 +15,6 @@ import * as utilities from "./utilities"; * For an overview on vSphere networking concepts, see [the product documentation][ref-vsphere-net-concepts]. * * [ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html - * - * ## Example Usage - * - * **Create a Virtual Switch and Bind a Port Group:** - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const host = datacenter.then(datacenter => vsphere.getHost({ - * name: "esxi-01.example.com", - * datacenterId: datacenter.id, - * })); - * const hostVirtualSwitch = new vsphere.HostVirtualSwitch("hostVirtualSwitch", { - * hostSystemId: host.then(host => host.id), - * networkAdapters: [ - * "vmnic0", - * "vmnic1", - * ], - * activeNics: ["vmnic0"], - * standbyNics: ["vmnic1"], - * }); - * const pg = new vsphere.HostPortGroup("pg", { - * hostSystemId: host.then(host => host.id), - * virtualSwitchName: hostVirtualSwitch.name, - * }); - * ``` - * - * **Create a Port Group with a VLAN and ab Override:** - * - * This example sets the trunk mode VLAN (`4095`, which passes through all tags) - * and sets - * `allowPromiscuous` - * to ensure that all traffic is seen on the port. The setting overrides - * the implicit default of `false` set on the standard switch. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const host = datacenter.then(datacenter => vsphere.getHost({ - * name: "esxi-01.example.com", - * datacenterId: datacenter.id, - * })); - * const hostVirtualSwitch = new vsphere.HostVirtualSwitch("hostVirtualSwitch", { - * hostSystemId: host.then(host => host.id), - * networkAdapters: [ - * "vmnic0", - * "vmnic1", - * ], - * activeNics: ["vmnic0"], - * standbyNics: ["vmnic1"], - * }); - * const pg = new vsphere.HostPortGroup("pg", { - * hostSystemId: host.then(host => host.id), - * virtualSwitchName: hostVirtualSwitch.name, - * vlanId: 4095, - * allowPromiscuous: true, - * }); - * ``` - * ## Importing - * - * An existing host port group can be imported into this resource - * using the host port group's ID. An example is below: - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * ``` - * - * The above would import the `management` host port group from host with ID `host-123`. */ export class HostPortGroup extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/license.ts b/sdk/nodejs/license.ts index 4d923a95..a3e5cff5 100644 --- a/sdk/nodejs/license.ts +++ b/sdk/nodejs/license.ts @@ -6,21 +6,6 @@ import * as utilities from "./utilities"; /** * Provides a VMware vSphere license resource. This can be used to add and remove license keys. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const licenseKey = new vsphere.License("licenseKey", { - * labels: { - * VpxClientLicenseLabel: "Hello World", - * Workflow: "Hello World", - * }, - * licenseKey: "452CQ-2EK54-K8742-00000-00000", - * }); - * ``` */ export class License extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/resourcePool.ts b/sdk/nodejs/resourcePool.ts index 61e9edf4..a671e0f6 100644 --- a/sdk/nodejs/resourcePool.ts +++ b/sdk/nodejs/resourcePool.ts @@ -13,54 +13,6 @@ import * as utilities from "./utilities"; * * [ref-vsphere-resource_pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html * - * ## Example Usage - * - * The following example sets up a resource pool in an existing compute cluster - * with the default settings for CPU and memory reservations, shares, and limits. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({ - * name: "cluster-01", - * datacenterId: datacenter.id, - * })); - * const resourcePool = new vsphere.ResourcePool("resourcePool", {parentResourcePoolId: computeCluster.then(computeCluster => computeCluster.resourcePoolId)}); - * ``` - * - * A virtual machine resource could be targeted to use the default resource pool - * of the cluster using the following: - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const vm = new vsphere.VirtualMachine("vm", {resourcePoolId: data.vsphere_compute_cluster.cluster.resource_pool_id}); - * // ... other configuration ... - * ``` - * - * The following example sets up a parent resource pool in an existing compute cluster - * with a child resource pool nested below. Each resource pool is configured with - * the default settings for CPU and memory reservations, shares, and limits. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const datacenter = vsphere.getDatacenter({ - * name: "dc-01", - * }); - * const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({ - * name: "cluster-01", - * datacenterId: datacenter.id, - * })); - * const resourcePoolParent = new vsphere.ResourcePool("resourcePoolParent", {parentResourcePoolId: computeCluster.then(computeCluster => computeCluster.resourcePoolId)}); - * const resourcePoolChild = new vsphere.ResourcePool("resourcePoolChild", {parentResourcePoolId: resourcePoolParent.id}); - * ``` * ## Importing * ### Settings that Require vSphere 7.0 or higher * diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 8d573719..28fbca1e 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -15,32 +15,6 @@ export interface ComputeClusterVsanDiskGroup { * * > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. * You can enable or re-enable vSphere HA after vSAN is configured. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const computeCluster = new vsphere.ComputeCluster("computeCluster", { - * datacenterId: data.vsphere_datacenter.datacenter.id, - * hostSystemIds: [data.vsphere_host.host.map(__item => __item.id)], - * drsEnabled: true, - * drsAutomationLevel: "fullyAutomated", - * haEnabled: false, - * vsanEnabled: true, - * vsanDedupEnabled: true, - * vsanCompressionEnabled: true, - * vsanPerformanceEnabled: true, - * vsanVerboseModeEnabled: true, - * vsanNetworkDiagnosticModeEnabled: true, - * vsanUnmapEnabled: true, - * vsanDitEncryptionEnabled: true, - * vsanDitRekeyInterval: 1800, - * vsanDiskGroups: [{ - * cache: data.vsphere_vmfs_disks.cache_disks[0], - * storages: data.vsphere_vmfs_disks.storage_disks, - * }], - * }); - * ``` */ storages?: pulumi.Input[]>; } diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index ad42bfb4..bcddea56 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -15,32 +15,6 @@ export interface ComputeClusterVsanDiskGroup { * * > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. * You can enable or re-enable vSphere HA after vSAN is configured. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const computeCluster = new vsphere.ComputeCluster("computeCluster", { - * datacenterId: data.vsphere_datacenter.datacenter.id, - * hostSystemIds: [data.vsphere_host.host.map(__item => __item.id)], - * drsEnabled: true, - * drsAutomationLevel: "fullyAutomated", - * haEnabled: false, - * vsanEnabled: true, - * vsanDedupEnabled: true, - * vsanCompressionEnabled: true, - * vsanPerformanceEnabled: true, - * vsanVerboseModeEnabled: true, - * vsanNetworkDiagnosticModeEnabled: true, - * vsanUnmapEnabled: true, - * vsanDitEncryptionEnabled: true, - * vsanDitRekeyInterval: 1800, - * vsanDiskGroups: [{ - * cache: data.vsphere_vmfs_disks.cache_disks[0], - * storages: data.vsphere_vmfs_disks.storage_disks, - * }], - * }); - * ``` */ storages?: string[]; } diff --git a/sdk/nodejs/virtualMachineSnapshot.ts b/sdk/nodejs/virtualMachineSnapshot.ts index 2935a118..fdfa18ec 100644 --- a/sdk/nodejs/virtualMachineSnapshot.ts +++ b/sdk/nodejs/virtualMachineSnapshot.ts @@ -26,23 +26,6 @@ import * as utilities from "./utilities"; * limitation of virtual machine snapshots, see [here][ext-vm-snap-limitations]. * * [ext-vm-snap-limitations]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-53F65726-A23B-4CF0-A7D5-48E584B88613.html - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const demo1 = new vsphere.VirtualMachineSnapshot("demo1", { - * consolidate: true, - * description: "This is Demo Snapshot", - * memory: true, - * quiesce: true, - * removeChildren: false, - * snapshotName: "Snapshot Name", - * virtualMachineUuid: "9aac5551-a351-4158-8c5c-15a71e8ec5c9", - * }); - * ``` */ export class VirtualMachineSnapshot extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/vmStoragePolicy.ts b/sdk/nodejs/vmStoragePolicy.ts index 0d5c4adf..fb1728e7 100644 --- a/sdk/nodejs/vmStoragePolicy.ts +++ b/sdk/nodejs/vmStoragePolicy.ts @@ -10,135 +10,6 @@ import * as utilities from "./utilities"; * The `vsphere.VmStoragePolicy` resource can be used to create and manage storage * policies. Using this resource, tag based placement rules can be created to * place virtual machines on a datastore with matching tags. If storage requirements for the applications on the virtual machine change, you can modify the storage policy that was originally applied to the virtual machine. - * - * ## Example Usage - * - * The following example creates storage policies with `tagRules` base on sets of environment, service level, and replication attributes. - * - * In this example, tags are first applied to datastores. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const environment = vsphere.getTagCategory({ - * name: "environment", - * }); - * const serviceLevel = vsphere.getTagCategory({ - * name: "service_level", - * }); - * const replication = vsphere.getTagCategory({ - * name: "replication", - * }); - * const production = vsphere.getTag({ - * categoryId: "data.vsphere_tag_category.environment.id", - * name: "production", - * }); - * const development = vsphere.getTag({ - * categoryId: "data.vsphere_tag_category.environment.id", - * name: "development", - * }); - * const platinum = vsphere.getTag({ - * categoryId: "data.vsphere_tag_category.service_level.id", - * name: "platinum", - * }); - * const gold = vsphere.getTag({ - * categoryId: "data.vsphere_tag_category.service_level.id", - * name: "platinum", - * }); - * const silver = vsphere.getTag({ - * categoryId: "data.vsphere_tag_category.service_level.id", - * name: "silver", - * }); - * const bronze = vsphere.getTag({ - * categoryId: "data.vsphere_tag_category.service_level.id", - * name: "bronze", - * }); - * const replicated = vsphere.getTag({ - * categoryId: "data.vsphere_tag_category.replication.id", - * name: "replicated", - * }); - * const nonReplicated = vsphere.getTag({ - * categoryId: "data.vsphere_tag_category.replication.id", - * name: "non_replicated", - * }); - * const prodDatastore = new vsphere.VmfsDatastore("prodDatastore", {tags: [ - * "data.vsphere_tag.production.id", - * "data.vsphere_tag.platinum.id", - * "data.vsphere_tag.replicated.id", - * ]}); - * const devDatastore = new vsphere.NasDatastore("devDatastore", {tags: [ - * "data.vsphere_tag.development.id", - * "data.vsphere_tag.silver.id", - * "data.vsphere_tag.non_replicated.id", - * ]}); - * ``` - * - * Next, storage policies are created and `tagRules` are applied. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const prodPlatinumReplicated = new vsphere.VmStoragePolicy("prodPlatinumReplicated", { - * description: "prod_platinum_replicated", - * tagRules: [ - * { - * tagCategory: data.vsphere_tag_category.environment.name, - * tags: [data.vsphere_tag.production.name], - * includeDatastoresWithTags: true, - * }, - * { - * tagCategory: data.vsphere_tag_category.service_level.name, - * tags: [data.vsphere_tag.platinum.name], - * includeDatastoresWithTags: true, - * }, - * { - * tagCategory: data.vsphere_tag_category.replication.name, - * tags: [data.vsphere_tag.replicated.name], - * includeDatastoresWithTags: true, - * }, - * ], - * }); - * const devSilverNonreplicated = new vsphere.VmStoragePolicy("devSilverNonreplicated", { - * description: "dev_silver_nonreplicated", - * tagRules: [ - * { - * tagCategory: data.vsphere_tag_category.environment.name, - * tags: [data.vsphere_tag.development.name], - * includeDatastoresWithTags: true, - * }, - * { - * tagCategory: data.vsphere_tag_category.service_level.name, - * tags: [data.vsphere_tag.silver.name], - * includeDatastoresWithTags: true, - * }, - * { - * tagCategory: data.vsphere_tag_category.replication.name, - * tags: [data.vsphere_tag.non_replicated.name], - * includeDatastoresWithTags: true, - * }, - * ], - * }); - * ``` - * - * Lasttly, when creating a virtual machine resource, a storage policy can be specificed to direct virtual machine placement to a datastore which matches the policy's `tagsRules`. - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const prodPlatinumReplicated = vsphere.getPolicy({ - * name: "prod_platinum_replicated", - * }); - * const devSilverNonreplicated = vsphere.getPolicy({ - * name: "dev_silver_nonreplicated", - * }); - * const prodVm = new vsphere.VirtualMachine("prodVm", {storagePolicyId: data.vsphere_storage_policy.storage_policy.prod_platinum_replicated.id}); - * // ... other configuration ... - * const devVm = new vsphere.VirtualMachine("devVm", {storagePolicyId: data.vsphere_storage_policy.storage_policy.dev_silver_nonreplicated.id}); - * // ... other configuration ... - * ``` */ export class VmStoragePolicy extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/vnic.ts b/sdk/nodejs/vnic.ts index fc32ffb5..80d890be 100644 --- a/sdk/nodejs/vnic.ts +++ b/sdk/nodejs/vnic.ts @@ -12,90 +12,6 @@ import * as utilities from "./utilities"; * ## Example Usage * * ### S - * ### Create a vnic attached to a distributed virtual switch using the vmotion TCP/IP stack - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const dc = vsphere.getDatacenter({ - * name: "mydc", - * }); - * const h1 = dc.then(dc => vsphere.getHost({ - * name: "esxi1.host.test", - * datacenterId: dc.id, - * })); - * const d1 = new vsphere.DistributedVirtualSwitch("d1", { - * datacenterId: dc.then(dc => dc.id), - * hosts: [{ - * hostSystemId: h1.then(h1 => h1.id), - * devices: ["vnic3"], - * }], - * }); - * const p1 = new vsphere.DistributedPortGroup("p1", { - * vlanId: 1234, - * distributedVirtualSwitchUuid: d1.id, - * }); - * const v1 = new vsphere.Vnic("v1", { - * host: h1.then(h1 => h1.id), - * distributedSwitchPort: d1.id, - * distributedPortGroup: p1.id, - * ipv4: { - * dhcp: true, - * }, - * netstack: "vmotion", - * }); - * ``` - * ### Create a vnic attached to a portgroup using the default TCP/IP stack - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as vsphere from "@pulumi/vsphere"; - * - * const dc = vsphere.getDatacenter({ - * name: "mydc", - * }); - * const h1 = dc.then(dc => vsphere.getHost({ - * name: "esxi1.host.test", - * datacenterId: dc.id, - * })); - * const hvs1 = new vsphere.HostVirtualSwitch("hvs1", { - * hostSystemId: h1.then(h1 => h1.id), - * networkAdapters: [ - * "vmnic3", - * "vmnic4", - * ], - * activeNics: ["vmnic3"], - * standbyNics: ["vmnic4"], - * }); - * const p1 = new vsphere.HostPortGroup("p1", { - * virtualSwitchName: hvs1.name, - * hostSystemId: h1.then(h1 => h1.id), - * }); - * const v1 = new vsphere.Vnic("v1", { - * host: h1.then(h1 => h1.id), - * portgroup: p1.name, - * ipv4: { - * dhcp: true, - * }, - * services: [ - * "vsan", - * "management", - * ], - * }); - * ``` - * ## Importing - * - * An existing vNic can be [imported][docs-import] into this resource - * via supplying the vNic's ID. An example is below: - * - * [docs-import]: /docs/import/index.html - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * ``` - * - * The above would import the vnic `vmk2` from host with ID `host-123`. */ export class Vnic extends pulumi.CustomResource { /** diff --git a/sdk/python/pulumi_vsphere/_inputs.py b/sdk/python/pulumi_vsphere/_inputs.py index 1412a975..46500e22 100644 --- a/sdk/python/pulumi_vsphere/_inputs.py +++ b/sdk/python/pulumi_vsphere/_inputs.py @@ -46,31 +46,6 @@ def __init__(__self__, *, > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. You can enable or re-enable vSphere HA after vSAN is configured. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - compute_cluster = vsphere.ComputeCluster("computeCluster", - datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"], - host_system_ids=[[__item["id"] for __item in data["vsphere_host"]["host"]]], - drs_enabled=True, - drs_automation_level="fullyAutomated", - ha_enabled=False, - vsan_enabled=True, - vsan_dedup_enabled=True, - vsan_compression_enabled=True, - vsan_performance_enabled=True, - vsan_verbose_mode_enabled=True, - vsan_network_diagnostic_mode_enabled=True, - vsan_unmap_enabled=True, - vsan_dit_encryption_enabled=True, - vsan_dit_rekey_interval=1800, - vsan_disk_groups=[vsphere.ComputeClusterVsanDiskGroupArgs( - cache=data["vsphere_vmfs_disks"]["cache_disks"], - storages=data["vsphere_vmfs_disks"]["storage_disks"], - )]) - ``` """ ComputeClusterVsanDiskGroupArgs._configure( lambda key, value: pulumi.set(__self__, key, value), @@ -82,7 +57,9 @@ 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): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if cache is not None: _setter("cache", cache) if storages is not None: @@ -108,31 +85,6 @@ def storages(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. You can enable or re-enable vSphere HA after vSAN is configured. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - compute_cluster = vsphere.ComputeCluster("computeCluster", - datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"], - host_system_ids=[[__item["id"] for __item in data["vsphere_host"]["host"]]], - drs_enabled=True, - drs_automation_level="fullyAutomated", - ha_enabled=False, - vsan_enabled=True, - vsan_dedup_enabled=True, - vsan_compression_enabled=True, - vsan_performance_enabled=True, - vsan_verbose_mode_enabled=True, - vsan_network_diagnostic_mode_enabled=True, - vsan_unmap_enabled=True, - vsan_dit_encryption_enabled=True, - vsan_dit_rekey_interval=1800, - vsan_disk_groups=[vsphere.ComputeClusterVsanDiskGroupArgs( - cache=data["vsphere_vmfs_disks"]["cache_disks"], - storages=data["vsphere_vmfs_disks"]["storage_disks"], - )]) - ``` """ return pulumi.get(self, "storages") @@ -172,7 +124,13 @@ def _configure( publish_url: Optional[pulumi.Input[str]] = None, published: Optional[pulumi.Input[bool]] = None, username: Optional[pulumi.Input[str]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("authentication_method", authentication_method) if password is not None: @@ -280,7 +238,17 @@ def _configure( password: Optional[pulumi.Input[str]] = None, subscription_url: Optional[pulumi.Input[str]] = None, username: Optional[pulumi.Input[str]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("authentication_method", authentication_method) if automatic_sync is not None: @@ -380,9 +348,19 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - max_vlan: pulumi.Input[int], - min_vlan: pulumi.Input[int], - opts: Optional[pulumi.ResourceOptions]=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) @@ -424,9 +402,15 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - host_system_id: pulumi.Input[str], + host_system_id: Optional[pulumi.Input[str]] = None, devices: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("devices", devices) @@ -481,10 +465,24 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - primary_vlan_id: pulumi.Input[int], - pvlan_type: pulumi.Input[str], - secondary_vlan_id: pulumi.Input[int], - opts: Optional[pulumi.ResourceOptions]=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) @@ -542,9 +540,19 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - max_vlan: pulumi.Input[int], - min_vlan: pulumi.Input[int], - opts: Optional[pulumi.ResourceOptions]=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) @@ -590,11 +598,27 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - is_group: pulumi.Input[bool], - propagate: pulumi.Input[bool], - role_id: pulumi.Input[str], - user_or_group: pulumi.Input[str], - opts: Optional[pulumi.ResourceOptions]=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) @@ -670,7 +694,11 @@ def _configure( 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): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if mac_addresses is None and 'macAddresses' in kwargs: + mac_addresses = kwargs['macAddresses'] + if key is not None: _setter("key", key) if mac_addresses is not None: @@ -743,7 +771,15 @@ def _configure( device_address: Optional[pulumi.Input[str]] = None, key: Optional[pulumi.Input[int]] = None, path: Optional[pulumi.Input[str]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("client_device", client_device) if datastore_id is not None: @@ -838,13 +874,25 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - template_uuid: pulumi.Input[str], + 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): + 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: _setter("customize", customize) @@ -951,7 +999,25 @@ def _configure( 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): + 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: _setter("dns_server_lists", dns_server_lists) if dns_suffix_lists is not None: @@ -1075,12 +1141,26 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - domain: pulumi.Input[str], - host_name: pulumi.Input[str], + 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): + 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: @@ -1163,7 +1243,21 @@ def _configure( 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): + 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: _setter("dns_domain", dns_domain) if dns_server_lists is not None: @@ -1267,7 +1361,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - computer_name: pulumi.Input[str], + 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, @@ -1280,7 +1374,35 @@ def _configure( 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): + 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: _setter("admin_password", admin_password) @@ -1507,7 +1629,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - label: pulumi.Input[str], + 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, @@ -1528,7 +1650,41 @@ def _configure( 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): + 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: _setter("attach", attach) @@ -1871,7 +2027,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - network_id: pulumi.Input[str], + 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, @@ -1882,7 +2038,31 @@ def _configure( 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): + 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: _setter("adapter_type", adapter_type) @@ -2071,7 +2251,27 @@ def _configure( 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): + 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: _setter("allow_unverified_ssl_cert", allow_unverified_ssl_cert) if deployment_option is not None: @@ -2185,7 +2385,9 @@ def __init__(__self__, *, def _configure( _setter: Callable[[Any, Any], None], properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, - opts: Optional[pulumi.ResourceOptions]=None): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if properties is not None: _setter("properties", properties) @@ -2219,10 +2421,20 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - tag_category: pulumi.Input[str], - tags: pulumi.Input[Sequence[pulumi.Input[str]]], + 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): + 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: @@ -2292,7 +2504,9 @@ def _configure( gw: Optional[pulumi.Input[str]] = None, ip: Optional[pulumi.Input[str]] = None, netmask: Optional[pulumi.Input[str]] = None, - opts: Optional[pulumi.ResourceOptions]=None): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if dhcp is not None: _setter("dhcp", dhcp) if gw is not None: @@ -2378,7 +2592,9 @@ def _configure( autoconfig: Optional[pulumi.Input[bool]] = None, dhcp: Optional[pulumi.Input[bool]] = None, gw: Optional[pulumi.Input[str]] = None, - opts: Optional[pulumi.ResourceOptions]=None): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if addresses is not None: _setter("addresses", addresses) if autoconfig is not None: @@ -2449,7 +2665,9 @@ def __init__(__self__, *, def _configure( _setter: Callable[[Any, Any], None], properties: Optional[Mapping[str, str]] = None, - opts: Optional[pulumi.ResourceOptions]=None): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if properties is not None: _setter("properties", properties) diff --git a/sdk/python/pulumi_vsphere/_utilities.py b/sdk/python/pulumi_vsphere/_utilities.py index 2d9a3c84..2936b65a 100644 --- a/sdk/python/pulumi_vsphere/_utilities.py +++ b/sdk/python/pulumi_vsphere/_utilities.py @@ -246,5 +246,24 @@ def lifted_func(*args, opts=None, **kwargs): return (lambda _: lifted_func) + +def configure(val, cls: type, input: bool): + def _apply(v): + if isinstance(v, typing.Mapping): + def _setter(key, value): + v[key] = value + cls._configure(_setter, **v) + return v + + # Check that cls has a static _configure method. External classes may + # not have it if it was generated with older codegen. + if hasattr(cls, "_configure"): + if isinstance(val, typing.Mapping): + return _apply(val) + elif input and val is not None and not isinstance(val, cls): + return pulumi.Output.from_input(val).apply(_apply) + + return val + def get_plugin_download_url(): return None diff --git a/sdk/python/pulumi_vsphere/compute_cluster.py b/sdk/python/pulumi_vsphere/compute_cluster.py index 5aa59a46..80c28594 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster.py +++ b/sdk/python/pulumi_vsphere/compute_cluster.py @@ -377,7 +377,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - datacenter_id: pulumi.Input[str], + 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, @@ -442,7 +442,135 @@ def _configure( 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): + 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: _setter("custom_attributes", custom_attributes) @@ -1948,7 +2076,135 @@ def _configure( 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): + 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: _setter("custom_attributes", custom_attributes) if datacenter_id is not None: diff --git a/sdk/python/pulumi_vsphere/compute_cluster_host_group.py b/sdk/python/pulumi_vsphere/compute_cluster_host_group.py index 67b0cb11..4145070f 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_host_group.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_host_group.py @@ -41,10 +41,18 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - compute_cluster_id: pulumi.Input[str], + 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): + 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: _setter("host_system_ids", host_system_ids) @@ -130,7 +138,13 @@ def _configure( 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): + 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: _setter("compute_cluster_id", compute_cluster_id) if host_system_ids is not None: 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 14e230b4..1344862e 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_vm_affinity_rule.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_vm_affinity_rule.py @@ -46,12 +46,22 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - compute_cluster_id: pulumi.Input[str], - virtual_machine_ids: pulumi.Input[Sequence[pulumi.Input[str]]], + 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): + 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: @@ -170,7 +180,13 @@ def _configure( 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): + 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: _setter("compute_cluster_id", compute_cluster_id) if enabled is not None: @@ -285,69 +301,6 @@ def __init__(__self__, > **NOTE:** vSphere DRS requires a vSphere Enterprise Plus license. - ## Example Usage - - The following example creates two virtual machines in a cluster using the - `VirtualMachine` resource, creating the - virtual machines in the cluster looked up by the - `ComputeCluster` data source. It - then creates an affinity rule for these two virtual machines, ensuring they - will run on the same host whenever possible. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - datastore = vsphere.get_datastore(name="datastore-01", - datacenter_id=datacenter.id) - cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - network = vsphere.get_network(name="VM Network", - datacenter_id=datacenter.id) - vm = [] - for range in [{"value": i} for i in range(0, 2)]: - vm.append(vsphere.VirtualMachine(f"vm-{range['value']}", - resource_pool_id=cluster.resource_pool_id, - datastore_id=datastore.id, - num_cpus=1, - memory=1024, - guest_id="otherLinux64Guest", - network_interfaces=[vsphere.VirtualMachineNetworkInterfaceArgs( - network_id=network.id, - )], - disks=[vsphere.VirtualMachineDiskArgs( - label="disk0", - size=20, - )])) - vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule", - compute_cluster_id=cluster.id, - virtual_machine_ids=[v.id for k, v in vm]) - ``` - - The following example creates an affinity rule for a set of virtual machines - in the cluster by looking up the virtual machine UUIDs from the - `VirtualMachine` data source. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - vms = [ - "foo-0", - "foo-1", - ] - datacenter = vsphere.get_datacenter(name="dc-01") - cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - vms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index], - datacenter_id=datacenter.id) for __index in range(len(vms))] - vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule", - enabled=True, - compute_cluster_id=cluster.id, - virtual_machine_ids=[__item.id for __item in vms_virtual_machine]) - ``` - :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] compute_cluster_id: The managed object reference @@ -393,69 +346,6 @@ def __init__(__self__, > **NOTE:** vSphere DRS requires a vSphere Enterprise Plus license. - ## Example Usage - - The following example creates two virtual machines in a cluster using the - `VirtualMachine` resource, creating the - virtual machines in the cluster looked up by the - `ComputeCluster` data source. It - then creates an affinity rule for these two virtual machines, ensuring they - will run on the same host whenever possible. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - datastore = vsphere.get_datastore(name="datastore-01", - datacenter_id=datacenter.id) - cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - network = vsphere.get_network(name="VM Network", - datacenter_id=datacenter.id) - vm = [] - for range in [{"value": i} for i in range(0, 2)]: - vm.append(vsphere.VirtualMachine(f"vm-{range['value']}", - resource_pool_id=cluster.resource_pool_id, - datastore_id=datastore.id, - num_cpus=1, - memory=1024, - guest_id="otherLinux64Guest", - network_interfaces=[vsphere.VirtualMachineNetworkInterfaceArgs( - network_id=network.id, - )], - disks=[vsphere.VirtualMachineDiskArgs( - label="disk0", - size=20, - )])) - vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule", - compute_cluster_id=cluster.id, - virtual_machine_ids=[v.id for k, v in vm]) - ``` - - The following example creates an affinity rule for a set of virtual machines - in the cluster by looking up the virtual machine UUIDs from the - `VirtualMachine` data source. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - vms = [ - "foo-0", - "foo-1", - ] - datacenter = vsphere.get_datacenter(name="dc-01") - cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - vms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index], - datacenter_id=datacenter.id) for __index in range(len(vms))] - vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule", - enabled=True, - compute_cluster_id=cluster.id, - virtual_machine_ids=[__item.id for __item in vms_virtual_machine]) - ``` - :param str resource_name: The name of the resource. :param ComputeClusterVmAffinityRuleArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. 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 28717e6e..a9233a69 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 @@ -46,12 +46,22 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - compute_cluster_id: pulumi.Input[str], - virtual_machine_ids: pulumi.Input[Sequence[pulumi.Input[str]]], + 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): + 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: @@ -170,7 +180,13 @@ def _configure( 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): + 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: _setter("compute_cluster_id", compute_cluster_id) if enabled is not None: 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 35b4e5e1..0454e3c5 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_vm_dependency_rule.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_vm_dependency_rule.py @@ -55,13 +55,27 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - compute_cluster_id: pulumi.Input[str], - dependency_vm_group_name: pulumi.Input[str], - vm_group_name: pulumi.Input[str], + 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): + 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) @@ -209,7 +223,15 @@ def _configure( 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): + 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: _setter("compute_cluster_id", compute_cluster_id) if dependency_vm_group_name is not None: diff --git a/sdk/python/pulumi_vsphere/compute_cluster_vm_group.py b/sdk/python/pulumi_vsphere/compute_cluster_vm_group.py index 649ac775..0460cfc3 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_vm_group.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_vm_group.py @@ -41,10 +41,18 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - compute_cluster_id: pulumi.Input[str], + 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): + 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: _setter("name", name) @@ -130,7 +138,13 @@ def _configure( 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): + 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: _setter("compute_cluster_id", compute_cluster_id) if name is not None: 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 4ab43046..6ab589e1 100644 --- a/sdk/python/pulumi_vsphere/compute_cluster_vm_host_rule.py +++ b/sdk/python/pulumi_vsphere/compute_cluster_vm_host_rule.py @@ -61,14 +61,28 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - compute_cluster_id: pulumi.Input[str], - vm_group_name: pulumi.Input[str], + 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): + 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: @@ -241,7 +255,17 @@ def _configure( 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): + 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: _setter("affinity_host_group_name", affinity_host_group_name) if anti_affinity_host_group_name is not None: diff --git a/sdk/python/pulumi_vsphere/content_library.py b/sdk/python/pulumi_vsphere/content_library.py index b9de6707..d9bc33d6 100644 --- a/sdk/python/pulumi_vsphere/content_library.py +++ b/sdk/python/pulumi_vsphere/content_library.py @@ -40,12 +40,18 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - storage_backings: pulumi.Input[Sequence[pulumi.Input[str]]], + 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): + 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: _setter("description", description) @@ -149,7 +155,11 @@ def _configure( 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): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if storage_backings is None and 'storageBackings' in kwargs: + storage_backings = kwargs['storageBackings'] + if description is not None: _setter("description", description) if name is not None: @@ -286,20 +296,12 @@ 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) + publication = _utilities.configure(publication, ContentLibraryPublicationArgs, True) __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) + subscription = _utilities.configure(subscription, ContentLibrarySubscriptionArgs, True) __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 dd854b49..1b72e5f5 100644 --- a/sdk/python/pulumi_vsphere/content_library_item.py +++ b/sdk/python/pulumi_vsphere/content_library_item.py @@ -42,13 +42,23 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - library_id: pulumi.Input[str], + 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): + 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: _setter("description", description) @@ -172,7 +182,15 @@ def _configure( name: Optional[pulumi.Input[str]] = None, source_uuid: Optional[pulumi.Input[str]] = None, type: Optional[pulumi.Input[str]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("description", description) if file_url is not None: diff --git a/sdk/python/pulumi_vsphere/custom_attribute.py b/sdk/python/pulumi_vsphere/custom_attribute.py index f7844f80..3377b8d9 100644 --- a/sdk/python/pulumi_vsphere/custom_attribute.py +++ b/sdk/python/pulumi_vsphere/custom_attribute.py @@ -33,7 +33,11 @@ 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): + 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: _setter("managed_object_type", managed_object_type) if name is not None: @@ -88,7 +92,11 @@ 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): + 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: _setter("managed_object_type", managed_object_type) if name is not None: diff --git a/sdk/python/pulumi_vsphere/datacenter.py b/sdk/python/pulumi_vsphere/datacenter.py index bafdf762..a8568a6a 100644 --- a/sdk/python/pulumi_vsphere/datacenter.py +++ b/sdk/python/pulumi_vsphere/datacenter.py @@ -52,7 +52,11 @@ def _configure( 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): + 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: _setter("custom_attributes", custom_attributes) if folder is not None: @@ -169,7 +173,11 @@ def _configure( 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): + 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: _setter("custom_attributes", custom_attributes) if folder is not None: @@ -270,22 +278,6 @@ def __init__(__self__, container of inventory objects such as hosts and virtual machines. ## Example Usage - ### Create datacenter on the root folder - - ```python - import pulumi - import pulumi_vsphere as vsphere - - prod_datacenter = vsphere.Datacenter("prodDatacenter") - ``` - ### Create datacenter on a subfolder - - ```python - import pulumi - import pulumi_vsphere as vsphere - - research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/") - ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. @@ -318,22 +310,6 @@ def __init__(__self__, container of inventory objects such as hosts and virtual machines. ## Example Usage - ### Create datacenter on the root folder - - ```python - import pulumi - import pulumi_vsphere as vsphere - - prod_datacenter = vsphere.Datacenter("prodDatacenter") - ``` - ### Create datacenter on a subfolder - - ```python - import pulumi - import pulumi_vsphere as vsphere - - research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/") - ``` :param str resource_name: The name of the resource. :param DatacenterArgs args: The arguments to use to populate this resource's properties. diff --git a/sdk/python/pulumi_vsphere/datastore_cluster.py b/sdk/python/pulumi_vsphere/datastore_cluster.py index 9da42a5f..dc80fe74 100644 --- a/sdk/python/pulumi_vsphere/datastore_cluster.py +++ b/sdk/python/pulumi_vsphere/datastore_cluster.py @@ -150,7 +150,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - datacenter_id: pulumi.Input[str], + 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, @@ -175,7 +175,55 @@ def _configure( 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): + 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: _setter("custom_attributes", custom_attributes) @@ -743,7 +791,53 @@ def _configure( 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): + 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: _setter("custom_attributes", custom_attributes) if datacenter_id is not None: 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 c532d2f3..14e4a444 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 @@ -44,12 +44,22 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - datastore_cluster_id: pulumi.Input[str], - virtual_machine_ids: pulumi.Input[Sequence[pulumi.Input[str]]], + 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): + 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: @@ -164,7 +174,13 @@ def _configure( 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): + 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: _setter("datastore_cluster_id", datastore_cluster_id) if enabled is not None: diff --git a/sdk/python/pulumi_vsphere/distributed_port_group.py b/sdk/python/pulumi_vsphere/distributed_port_group.py index 68ea1a4e..5c553438 100644 --- a/sdk/python/pulumi_vsphere/distributed_port_group.py +++ b/sdk/python/pulumi_vsphere/distributed_port_group.py @@ -199,7 +199,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - distributed_virtual_switch_uuid: pulumi.Input[str], + 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, @@ -245,7 +245,93 @@ def _configure( 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): + 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: _setter("active_uplinks", active_uplinks) @@ -1168,7 +1254,93 @@ def _configure( 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): + 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: _setter("active_uplinks", active_uplinks) if allow_forged_transmits is not None: diff --git a/sdk/python/pulumi_vsphere/distributed_virtual_switch.py b/sdk/python/pulumi_vsphere/distributed_virtual_switch.py index 9a612e8c..ca317098 100644 --- a/sdk/python/pulumi_vsphere/distributed_virtual_switch.py +++ b/sdk/python/pulumi_vsphere/distributed_virtual_switch.py @@ -274,22 +274,6 @@ def __init__(__self__, *, and `max_vlan` sub-arguments to define the tagged VLAN range. Multiple `vlan_range` definitions are allowed, but they must not overlap. Example below: - - ```python - import pulumi - import pulumi_vsphere as vsphere - - vds = vsphere.DistributedVirtualSwitch("vds", vlan_ranges=[ - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=199, - min_vlan=100, - ), - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=399, - min_vlan=300, - ), - ]) - ``` :param pulumi.Input[int] vmotion_maximum_mbit: The maximum allowed usage for the vmotion traffic class, in Mbits/sec. :param pulumi.Input[int] vmotion_reservation_mbit: The amount of guaranteed bandwidth for the vmotion traffic class, in Mbits/sec. :param pulumi.Input[int] vmotion_share_count: The amount of shares to allocate to the vmotion traffic class for a custom share level. @@ -399,7 +383,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - datacenter_id: pulumi.Input[str], + 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, @@ -493,7 +477,183 @@ def _configure( 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): + 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: _setter("active_uplinks", active_uplinks) @@ -1783,22 +1943,6 @@ def vlan_ranges(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['Distribute and `max_vlan` sub-arguments to define the tagged VLAN range. Multiple `vlan_range` definitions are allowed, but they must not overlap. Example below: - - ```python - import pulumi - import pulumi_vsphere as vsphere - - vds = vsphere.DistributedVirtualSwitch("vds", vlan_ranges=[ - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=199, - min_vlan=100, - ), - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=399, - min_vlan=300, - ), - ]) - ``` """ return pulumi.get(self, "vlan_ranges") @@ -2167,22 +2311,6 @@ def __init__(__self__, *, and `max_vlan` sub-arguments to define the tagged VLAN range. Multiple `vlan_range` definitions are allowed, but they must not overlap. Example below: - - ```python - import pulumi - import pulumi_vsphere as vsphere - - vds = vsphere.DistributedVirtualSwitch("vds", vlan_ranges=[ - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=199, - min_vlan=100, - ), - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=399, - min_vlan=300, - ), - ]) - ``` :param pulumi.Input[int] vmotion_maximum_mbit: The maximum allowed usage for the vmotion traffic class, in Mbits/sec. :param pulumi.Input[int] vmotion_reservation_mbit: The amount of guaranteed bandwidth for the vmotion traffic class, in Mbits/sec. :param pulumi.Input[int] vmotion_share_count: The amount of shares to allocate to the vmotion traffic class for a custom share level. @@ -2388,7 +2516,183 @@ def _configure( 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): + 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: _setter("active_uplinks", active_uplinks) if allow_forged_transmits is not None: @@ -3694,22 +3998,6 @@ def vlan_ranges(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['Distribute and `max_vlan` sub-arguments to define the tagged VLAN range. Multiple `vlan_range` definitions are allowed, but they must not overlap. Example below: - - ```python - import pulumi - import pulumi_vsphere as vsphere - - vds = vsphere.DistributedVirtualSwitch("vds", vlan_ranges=[ - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=199, - min_vlan=100, - ), - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=399, - min_vlan=300, - ), - ]) - ``` """ return pulumi.get(self, "vlan_ranges") @@ -4080,22 +4368,6 @@ def __init__(__self__, and `max_vlan` sub-arguments to define the tagged VLAN range. Multiple `vlan_range` definitions are allowed, but they must not overlap. Example below: - - ```python - import pulumi - import pulumi_vsphere as vsphere - - vds = vsphere.DistributedVirtualSwitch("vds", vlan_ranges=[ - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=199, - min_vlan=100, - ), - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=399, - min_vlan=300, - ), - ]) - ``` :param pulumi.Input[int] vmotion_maximum_mbit: The maximum allowed usage for the vmotion traffic class, in Mbits/sec. :param pulumi.Input[int] vmotion_reservation_mbit: The amount of guaranteed bandwidth for the vmotion traffic class, in Mbits/sec. :param pulumi.Input[int] vmotion_share_count: The amount of shares to allocate to the vmotion traffic class for a custom share level. @@ -4608,22 +4880,6 @@ def get(resource_name: str, and `max_vlan` sub-arguments to define the tagged VLAN range. Multiple `vlan_range` definitions are allowed, but they must not overlap. Example below: - - ```python - import pulumi - import pulumi_vsphere as vsphere - - vds = vsphere.DistributedVirtualSwitch("vds", vlan_ranges=[ - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=199, - min_vlan=100, - ), - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=399, - min_vlan=300, - ), - ]) - ``` :param pulumi.Input[int] vmotion_maximum_mbit: The maximum allowed usage for the vmotion traffic class, in Mbits/sec. :param pulumi.Input[int] vmotion_reservation_mbit: The amount of guaranteed bandwidth for the vmotion traffic class, in Mbits/sec. :param pulumi.Input[int] vmotion_share_count: The amount of shares to allocate to the vmotion traffic class for a custom share level. @@ -5504,22 +5760,6 @@ def vlan_ranges(self) -> pulumi.Output[Sequence['outputs.DistributedVirtualSwitc and `max_vlan` sub-arguments to define the tagged VLAN range. Multiple `vlan_range` definitions are allowed, but they must not overlap. Example below: - - ```python - import pulumi - import pulumi_vsphere as vsphere - - vds = vsphere.DistributedVirtualSwitch("vds", vlan_ranges=[ - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=199, - min_vlan=100, - ), - vsphere.DistributedVirtualSwitchVlanRangeArgs( - max_vlan=399, - min_vlan=300, - ), - ]) - ``` """ return pulumi.get(self, "vlan_ranges") diff --git a/sdk/python/pulumi_vsphere/dpm_host_override.py b/sdk/python/pulumi_vsphere/dpm_host_override.py index 5681e9ad..da44b1b4 100644 --- a/sdk/python/pulumi_vsphere/dpm_host_override.py +++ b/sdk/python/pulumi_vsphere/dpm_host_override.py @@ -44,11 +44,25 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - compute_cluster_id: pulumi.Input[str], - host_system_id: pulumi.Input[str], + 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): + 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: @@ -151,7 +165,17 @@ def _configure( 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): + 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: _setter("compute_cluster_id", compute_cluster_id) if dpm_automation_level is not None: diff --git a/sdk/python/pulumi_vsphere/drs_vm_override.py b/sdk/python/pulumi_vsphere/drs_vm_override.py index 05d1903b..7f257001 100644 --- a/sdk/python/pulumi_vsphere/drs_vm_override.py +++ b/sdk/python/pulumi_vsphere/drs_vm_override.py @@ -45,11 +45,25 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - compute_cluster_id: pulumi.Input[str], - virtual_machine_id: pulumi.Input[str], + 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): + 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: @@ -154,7 +168,17 @@ def _configure( 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): + 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: _setter("compute_cluster_id", compute_cluster_id) if drs_automation_level is not None: diff --git a/sdk/python/pulumi_vsphere/entity_permissions.py b/sdk/python/pulumi_vsphere/entity_permissions.py index 51d41d02..0258b432 100644 --- a/sdk/python/pulumi_vsphere/entity_permissions.py +++ b/sdk/python/pulumi_vsphere/entity_permissions.py @@ -36,10 +36,22 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - entity_id: pulumi.Input[str], - entity_type: pulumi.Input[str], - permissions: pulumi.Input[Sequence[pulumi.Input['EntityPermissionsPermissionArgs']]], - opts: Optional[pulumi.ResourceOptions]=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) @@ -109,7 +121,13 @@ def _configure( 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): + 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: _setter("entity_id", entity_id) if entity_type is not None: diff --git a/sdk/python/pulumi_vsphere/file.py b/sdk/python/pulumi_vsphere/file.py index 2c3d3363..86436554 100644 --- a/sdk/python/pulumi_vsphere/file.py +++ b/sdk/python/pulumi_vsphere/file.py @@ -53,14 +53,32 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - datastore: pulumi.Input[str], - destination_file: pulumi.Input[str], - source_file: pulumi.Input[str], + 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): + 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) @@ -214,7 +232,19 @@ def _configure( 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): + 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: _setter("create_directories", create_directories) if datacenter is not None: @@ -337,34 +367,6 @@ def __init__(__self__, __props__=None): """ ## Example Usage - ### Uploading a File - - ```python - import pulumi - import pulumi_vsphere as vsphere - - ubuntu_vmdk_upload = vsphere.File("ubuntuVmdkUpload", - create_directories=True, - datacenter="dc-01", - datastore="datastore-01", - destination_file="/my/dst/path/custom_ubuntu.vmdk", - source_file="/my/src/path/custom_ubuntu.vmdk") - ``` - ### Copying a File - - ```python - import pulumi - import pulumi_vsphere as vsphere - - ubuntu_copy = vsphere.File("ubuntuCopy", - create_directories=True, - datacenter="dc-01", - datastore="datastore-01", - destination_file="/my/dst/path/custom_ubuntu.vmdk", - source_datacenter="dc-01", - source_datastore="datastore-01", - source_file="/my/src/path/custom_ubuntu.vmdk") - ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. @@ -393,34 +395,6 @@ def __init__(__self__, opts: Optional[pulumi.ResourceOptions] = None): """ ## Example Usage - ### Uploading a File - - ```python - import pulumi - import pulumi_vsphere as vsphere - - ubuntu_vmdk_upload = vsphere.File("ubuntuVmdkUpload", - create_directories=True, - datacenter="dc-01", - datastore="datastore-01", - destination_file="/my/dst/path/custom_ubuntu.vmdk", - source_file="/my/src/path/custom_ubuntu.vmdk") - ``` - ### Copying a File - - ```python - import pulumi - import pulumi_vsphere as vsphere - - ubuntu_copy = vsphere.File("ubuntuCopy", - create_directories=True, - datacenter="dc-01", - datastore="datastore-01", - destination_file="/my/dst/path/custom_ubuntu.vmdk", - source_datacenter="dc-01", - source_datastore="datastore-01", - source_file="/my/src/path/custom_ubuntu.vmdk") - ``` :param str resource_name: The name of the resource. :param FileArgs args: The arguments to use to populate this resource's properties. diff --git a/sdk/python/pulumi_vsphere/folder.py b/sdk/python/pulumi_vsphere/folder.py index 6057f097..0a502ab4 100644 --- a/sdk/python/pulumi_vsphere/folder.py +++ b/sdk/python/pulumi_vsphere/folder.py @@ -63,12 +63,22 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - path: pulumi.Input[str], - type: pulumi.Input[str], + 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): + 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: @@ -221,7 +231,13 @@ def _configure( 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): + 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: _setter("custom_attributes", custom_attributes) if datacenter_id is not None: diff --git a/sdk/python/pulumi_vsphere/get_compute_cluster.py b/sdk/python/pulumi_vsphere/get_compute_cluster.py index ab21e86c..7c3d72fa 100644 --- a/sdk/python/pulumi_vsphere/get_compute_cluster.py +++ b/sdk/python/pulumi_vsphere/get_compute_cluster.py @@ -89,17 +89,6 @@ def get_compute_cluster(datacenter_id: Optional[str] = None, resource for more information about clusters and how to managed the resource in this provider. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - compute_cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter the cluster is located in. This can be omitted if the @@ -135,17 +124,6 @@ def get_compute_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[str resource for more information about clusters and how to managed the resource in this provider. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - compute_cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter the cluster is located in. This can be omitted if the 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 706a26f6..b09d2653 100644 --- a/sdk/python/pulumi_vsphere/get_compute_cluster_host_group.py +++ b/sdk/python/pulumi_vsphere/get_compute_cluster_host_group.py @@ -83,23 +83,6 @@ def get_compute_cluster_host_group(compute_cluster_id: Optional[str] = None, the IDs ESXi hosts in a host group and return host group attributes to other resources. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name=var["vsphere_datacenter"]) - cluster = vsphere.get_compute_cluster(name=var["vsphere_cluster"], - datacenter_id=datacenter.id) - host_group1 = vsphere.get_compute_cluster_host_group(name="host_group1", - compute_cluster_id=cluster.id) - host_rule1 = vsphere.ComputeClusterVmHostRule("hostRule1", - compute_cluster_id=cluster.id, - vm_group_name="vm_group1", - affinity_host_group_name=host_group1.name) - ``` - :param str compute_cluster_id: The [managed object reference ID][docs-about-morefs] of the compute cluster for the host group. @@ -129,23 +112,6 @@ def get_compute_cluster_host_group_output(compute_cluster_id: Optional[pulumi.In the IDs ESXi hosts in a host group and return host group attributes to other resources. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name=var["vsphere_datacenter"]) - cluster = vsphere.get_compute_cluster(name=var["vsphere_cluster"], - datacenter_id=datacenter.id) - host_group1 = vsphere.get_compute_cluster_host_group(name="host_group1", - compute_cluster_id=cluster.id) - host_rule1 = vsphere.ComputeClusterVmHostRule("hostRule1", - compute_cluster_id=cluster.id, - vm_group_name="vm_group1", - affinity_host_group_name=host_group1.name) - ``` - :param str compute_cluster_id: The [managed object reference ID][docs-about-morefs] of the compute cluster for the host group. diff --git a/sdk/python/pulumi_vsphere/get_content_library.py b/sdk/python/pulumi_vsphere/get_content_library.py index 12fd14ca..829c075a 100644 --- a/sdk/python/pulumi_vsphere/get_content_library.py +++ b/sdk/python/pulumi_vsphere/get_content_library.py @@ -60,15 +60,6 @@ def get_content_library(name: Optional[str] = None, > **NOTE:** This resource requires vCenter Server and is not available on direct ESXi host connections. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - library = vsphere.get_content_library(name="Content Library") - ``` - :param str name: The name of the content library. """ @@ -90,15 +81,6 @@ def get_content_library_output(name: Optional[pulumi.Input[str]] = None, > **NOTE:** This resource requires vCenter Server and is not available on direct ESXi host connections. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - library = vsphere.get_content_library(name="Content Library") - ``` - :param str name: The name of the content library. """ diff --git a/sdk/python/pulumi_vsphere/get_custom_attribute.py b/sdk/python/pulumi_vsphere/get_custom_attribute.py index eb5f075e..c4cefd73 100644 --- a/sdk/python/pulumi_vsphere/get_custom_attribute.py +++ b/sdk/python/pulumi_vsphere/get_custom_attribute.py @@ -74,15 +74,6 @@ def get_custom_attribute(name: Optional[str] = None, > **NOTE:** Custom attributes are unsupported on direct ESXi host connections and require vCenter Server. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - attribute = vsphere.get_custom_attribute(name="test-attribute") - ``` - :param str name: The name of the custom attribute. """ @@ -110,15 +101,6 @@ def get_custom_attribute_output(name: Optional[pulumi.Input[str]] = None, > **NOTE:** Custom attributes are unsupported on direct ESXi host connections and require vCenter Server. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - attribute = vsphere.get_custom_attribute(name="test-attribute") - ``` - :param str name: The name of the custom attribute. """ diff --git a/sdk/python/pulumi_vsphere/get_datacenter.py b/sdk/python/pulumi_vsphere/get_datacenter.py index 1fb70cb7..2116bbe7 100644 --- a/sdk/python/pulumi_vsphere/get_datacenter.py +++ b/sdk/python/pulumi_vsphere/get_datacenter.py @@ -61,15 +61,6 @@ def get_datacenter(name: Optional[str] = None, that require a datacenter, such as the `Host` data source. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - ``` - :param str name: The name of the datacenter. This can be a name or path. Can be omitted if there is only one datacenter in the inventory. @@ -98,15 +89,6 @@ def get_datacenter_output(name: Optional[pulumi.Input[Optional[str]]] = None, that require a datacenter, such as the `Host` data source. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - ``` - :param str name: The name of the datacenter. This can be a name or path. Can be omitted if there is only one datacenter in the inventory. diff --git a/sdk/python/pulumi_vsphere/get_datastore.py b/sdk/python/pulumi_vsphere/get_datastore.py index 6d63a307..e75b59c0 100644 --- a/sdk/python/pulumi_vsphere/get_datastore.py +++ b/sdk/python/pulumi_vsphere/get_datastore.py @@ -71,17 +71,6 @@ def get_datastore(datacenter_id: Optional[str] = None, that require a datastore. For example, to create virtual machines in using the `VirtualMachine` resource. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - datastore = vsphere.get_datastore(name="datastore-01", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter the datastore is located in. This can be omitted if the @@ -111,17 +100,6 @@ def get_datastore_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = that require a datastore. For example, to create virtual machines in using the `VirtualMachine` resource. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - datastore = vsphere.get_datastore(name="datastore-01", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter the datastore is located in. This can be omitted if the diff --git a/sdk/python/pulumi_vsphere/get_datastore_cluster.py b/sdk/python/pulumi_vsphere/get_datastore_cluster.py index dcac8e70..35eecd17 100644 --- a/sdk/python/pulumi_vsphere/get_datastore_cluster.py +++ b/sdk/python/pulumi_vsphere/get_datastore_cluster.py @@ -71,17 +71,6 @@ def get_datastore_cluster(datacenter_id: Optional[str] = None, that require a datastore. For example, to assign datastores using the `NasDatastore` or `VmfsDatastore` resources, or to create virtual machines in using the `VirtualMachine` resource. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster-01", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter the datastore cluster is located in. @@ -112,17 +101,6 @@ def get_datastore_cluster_output(datacenter_id: Optional[pulumi.Input[Optional[s that require a datastore. For example, to assign datastores using the `NasDatastore` or `VmfsDatastore` resources, or to create virtual machines in using the `VirtualMachine` resource. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - datastore_cluster = vsphere.get_datastore_cluster(name="datastore-cluster-01", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter the datastore cluster is located in. diff --git a/sdk/python/pulumi_vsphere/get_distributed_virtual_switch.py b/sdk/python/pulumi_vsphere/get_distributed_virtual_switch.py index 778397d3..2b72a137 100644 --- a/sdk/python/pulumi_vsphere/get_distributed_virtual_switch.py +++ b/sdk/python/pulumi_vsphere/get_distributed_virtual_switch.py @@ -90,26 +90,6 @@ def get_distributed_virtual_switch(datacenter_id: Optional[str] = None, > **NOTE:** This data source requires vCenter Server and is not available on direct ESXi host connections. - ## Example Usage - - The following example locates a distributed switch named `vds-01`, in the - datacenter `dc-01`. It then uses this distributed switch to set up a - `DistributedPortGroup` resource that uses the first uplink as a - primary uplink and the second uplink as a secondary. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - vds = vsphere.get_distributed_virtual_switch(name="vds-01", - datacenter_id=datacenter.id) - dvpg = vsphere.DistributedPortGroup("dvpg", - distributed_virtual_switch_uuid=vds.id, - active_uplinks=[vds.uplinks[0]], - standby_uplinks=[vds.uplinks[1]]) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter the VDS is located in. This can be omitted if the search @@ -144,26 +124,6 @@ def get_distributed_virtual_switch_output(datacenter_id: Optional[pulumi.Input[O > **NOTE:** This data source requires vCenter Server and is not available on direct ESXi host connections. - ## Example Usage - - The following example locates a distributed switch named `vds-01`, in the - datacenter `dc-01`. It then uses this distributed switch to set up a - `DistributedPortGroup` resource that uses the first uplink as a - primary uplink and the second uplink as a secondary. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - vds = vsphere.get_distributed_virtual_switch(name="vds-01", - datacenter_id=datacenter.id) - dvpg = vsphere.DistributedPortGroup("dvpg", - distributed_virtual_switch_uuid=vds.id, - active_uplinks=[vds.uplinks[0]], - standby_uplinks=[vds.uplinks[1]]) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter the VDS is located in. This can be omitted if the search diff --git a/sdk/python/pulumi_vsphere/get_dynamic.py b/sdk/python/pulumi_vsphere/get_dynamic.py index 098d83eb..6380bb93 100644 --- a/sdk/python/pulumi_vsphere/get_dynamic.py +++ b/sdk/python/pulumi_vsphere/get_dynamic.py @@ -82,25 +82,6 @@ def get_dynamic(filters: Optional[Sequence[str]] = None, of any tagged managed object in vCenter Server by providing a list of tag IDs and an optional regular expression to filter objects by name. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - category = vsphere.get_tag_category(name="SomeCategory") - tag1 = vsphere.get_tag(name="FirstTag", - category_id=data["vsphere_tag_category"]["cat"]["id"]) - tag2 = vsphere.get_tag(name="SecondTag", - category_id=data["vsphere_tag_category"]["cat"]["id"]) - dyn = vsphere.get_dynamic(filters=[ - tag1.id, - tag1.id, - ], - name_regex="ubuntu", - type="Datacenter") - ``` - :param Sequence[str] filters: A list of tag IDs that must be present on an object to be a match. @@ -136,25 +117,6 @@ def get_dynamic_output(filters: Optional[pulumi.Input[Sequence[str]]] = None, of any tagged managed object in vCenter Server by providing a list of tag IDs and an optional regular expression to filter objects by name. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - category = vsphere.get_tag_category(name="SomeCategory") - tag1 = vsphere.get_tag(name="FirstTag", - category_id=data["vsphere_tag_category"]["cat"]["id"]) - tag2 = vsphere.get_tag(name="SecondTag", - category_id=data["vsphere_tag_category"]["cat"]["id"]) - dyn = vsphere.get_dynamic(filters=[ - tag1.id, - tag1.id, - ], - name_regex="ubuntu", - type="Datacenter") - ``` - :param Sequence[str] filters: A list of tag IDs that must be present on an object to be a match. diff --git a/sdk/python/pulumi_vsphere/get_folder.py b/sdk/python/pulumi_vsphere/get_folder.py index ab7fe73d..0a6f292d 100644 --- a/sdk/python/pulumi_vsphere/get_folder.py +++ b/sdk/python/pulumi_vsphere/get_folder.py @@ -59,15 +59,6 @@ def get_folder(path: Optional[str] = None, The `Folder` data source can be used to get the general attributes of a vSphere inventory folder. Paths are absolute and must include the datacenter. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - folder = vsphere.get_folder(path="/dc-01/datastore-01/folder-01") - ``` - :param str path: The absolute path of the folder. For example, given a default datacenter of `default-dc`, a folder of type `vm`, and a folder name @@ -92,15 +83,6 @@ def get_folder_output(path: Optional[pulumi.Input[str]] = None, The `Folder` data source can be used to get the general attributes of a vSphere inventory folder. Paths are absolute and must include the datacenter. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - folder = vsphere.get_folder(path="/dc-01/datastore-01/folder-01") - ``` - :param str path: The absolute path of the folder. For example, given a default datacenter of `default-dc`, a folder of type `vm`, and a folder name diff --git a/sdk/python/pulumi_vsphere/get_host.py b/sdk/python/pulumi_vsphere/get_host.py index 81beea6e..3bb33454 100644 --- a/sdk/python/pulumi_vsphere/get_host.py +++ b/sdk/python/pulumi_vsphere/get_host.py @@ -83,17 +83,6 @@ def get_host(datacenter_id: Optional[str] = None, This can then be used with resources or data sources that require an ESX host's managed object reference ID. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - host = vsphere.get_host(name="esxi-01.example.com", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of a vSphere datacenter object. @@ -125,17 +114,6 @@ def get_host_output(datacenter_id: Optional[pulumi.Input[str]] = None, This can then be used with resources or data sources that require an ESX host's managed object reference ID. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - host = vsphere.get_host(name="esxi-01.example.com", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of a vSphere datacenter object. diff --git a/sdk/python/pulumi_vsphere/get_host_pci_device.py b/sdk/python/pulumi_vsphere/get_host_pci_device.py index 0a682c89..b68c09b8 100644 --- a/sdk/python/pulumi_vsphere/get_host_pci_device.py +++ b/sdk/python/pulumi_vsphere/get_host_pci_device.py @@ -103,19 +103,7 @@ def get_host_pci_device(class_id: Optional[str] = None, `VirtualMachine`'s `pci_device_id`. ## Example Usage - ### With Vendor ID And Class ID - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - host = vsphere.get_host(name="esxi-01.example.com", - datacenter_id=datacenter.id) - dev = vsphere.get_host_pci_device(host_id=host.id, - class_id="123", - vendor_id="456") - ``` + ### With Name Regular Expression @@ -158,19 +146,7 @@ def get_host_pci_device_output(class_id: Optional[pulumi.Input[Optional[str]]] = `VirtualMachine`'s `pci_device_id`. ## Example Usage - ### With Vendor ID And Class ID - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - host = vsphere.get_host(name="esxi-01.example.com", - datacenter_id=datacenter.id) - dev = vsphere.get_host_pci_device(host_id=host.id, - class_id="123", - vendor_id="456") - ``` + ### With Name Regular Expression diff --git a/sdk/python/pulumi_vsphere/get_host_thumbprint.py b/sdk/python/pulumi_vsphere/get_host_thumbprint.py index 0e206092..8ddf1aab 100644 --- a/sdk/python/pulumi_vsphere/get_host_thumbprint.py +++ b/sdk/python/pulumi_vsphere/get_host_thumbprint.py @@ -81,15 +81,6 @@ def get_host_thumbprint(address: Optional[str] = None, resource. If the ESXi host is using a certificate chain, the first one returned will be used to generate the thumbprint. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - thumbprint = vsphere.get_host_thumbprint(address="esxi-01.example.com") - ``` - :param str address: The address of the ESXi host to retrieve the thumbprint from. @@ -122,15 +113,6 @@ def get_host_thumbprint_output(address: Optional[pulumi.Input[str]] = None, resource. If the ESXi host is using a certificate chain, the first one returned will be used to generate the thumbprint. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - thumbprint = vsphere.get_host_thumbprint(address="esxi-01.example.com") - ``` - :param str address: The address of the ESXi host to retrieve the thumbprint from. diff --git a/sdk/python/pulumi_vsphere/get_license.py b/sdk/python/pulumi_vsphere/get_license.py index 4d7fe06e..c2465345 100644 --- a/sdk/python/pulumi_vsphere/get_license.py +++ b/sdk/python/pulumi_vsphere/get_license.py @@ -116,15 +116,6 @@ def get_license(license_key: Optional[str] = None, The `License` data source can be used to get the general attributes of a license keys from a vCenter Server instance. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - license = vsphere.get_license(license_key="00000-00000-00000-00000-00000") - ``` - :param str license_key: The license key. """ @@ -150,15 +141,6 @@ def get_license_output(license_key: Optional[pulumi.Input[str]] = None, The `License` data source can be used to get the general attributes of a license keys from a vCenter Server instance. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - license = vsphere.get_license(license_key="00000-00000-00000-00000-00000") - ``` - :param str license_key: The license key. """ diff --git a/sdk/python/pulumi_vsphere/get_network.py b/sdk/python/pulumi_vsphere/get_network.py index 1b3a2a97..f48d7edb 100644 --- a/sdk/python/pulumi_vsphere/get_network.py +++ b/sdk/python/pulumi_vsphere/get_network.py @@ -97,17 +97,6 @@ def get_network(datacenter_id: Optional[str] = None, that requires a network. This includes standard (host-based) port groups, distributed port groups, or opaque networks such as those managed by NSX. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - network = vsphere.get_network(name="VM Network", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter the network is located in. This can be omitted if the @@ -146,17 +135,6 @@ def get_network_output(datacenter_id: Optional[pulumi.Input[Optional[str]]] = No that requires a network. This includes standard (host-based) port groups, distributed port groups, or opaque networks such as those managed by NSX. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - network = vsphere.get_network(name="VM Network", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter the network is located in. This can be omitted if the diff --git a/sdk/python/pulumi_vsphere/get_policy.py b/sdk/python/pulumi_vsphere/get_policy.py index 85f0641d..69ef212f 100644 --- a/sdk/python/pulumi_vsphere/get_policy.py +++ b/sdk/python/pulumi_vsphere/get_policy.py @@ -63,16 +63,6 @@ def get_policy(name: Optional[str] = None, > **NOTE:** Storage policies are not supported on direct ESXi hosts and requires vCenter Server. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - prod_platinum_replicated = vsphere.get_policy(name="prod_platinum_replicated") - dev_silver_nonreplicated = vsphere.get_policy(name="dev_silver_nonreplicated") - ``` - :param str name: The name of the storage policy. """ @@ -97,16 +87,6 @@ def get_policy_output(name: Optional[pulumi.Input[str]] = None, > **NOTE:** Storage policies are not supported on direct ESXi hosts and requires vCenter Server. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - prod_platinum_replicated = vsphere.get_policy(name="prod_platinum_replicated") - dev_silver_nonreplicated = vsphere.get_policy(name="dev_silver_nonreplicated") - ``` - :param str name: The name of the storage policy. """ diff --git a/sdk/python/pulumi_vsphere/get_resource_pool.py b/sdk/python/pulumi_vsphere/get_resource_pool.py index d900773d..7f8f3d03 100644 --- a/sdk/python/pulumi_vsphere/get_resource_pool.py +++ b/sdk/python/pulumi_vsphere/get_resource_pool.py @@ -71,38 +71,6 @@ def get_resource_pool(datacenter_id: Optional[str] = None, that you want to use to create virtual machines in using the `VirtualMachine` resource. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - pool = vsphere.get_resource_pool(name="resource-pool-01", - datacenter_id=datacenter.id) - ``` - ### Specifying the Root Resource Pool for a Standalone ESXi Host - - > **NOTE:** Returning the root resource pool for a cluster can be done - directly via the `ComputeCluster` - data source. - - All compute resources in vSphere have a resource pool, even if one has not been - explicitly created. This resource pool is referred to as the - _root resource pool_ and can be looked up by specifying the path. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - pool = vsphere.get_resource_pool(name="esxi-01.example.com/Resources", - datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"]) - ``` - - For more information on the root resource pool, see [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere documentation. - - [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html - :param str datacenter_id: The managed object reference ID of the datacenter in which the resource pool is located. This can be omitted @@ -138,38 +106,6 @@ def get_resource_pool_output(datacenter_id: Optional[pulumi.Input[Optional[str]] that you want to use to create virtual machines in using the `VirtualMachine` resource. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - pool = vsphere.get_resource_pool(name="resource-pool-01", - datacenter_id=datacenter.id) - ``` - ### Specifying the Root Resource Pool for a Standalone ESXi Host - - > **NOTE:** Returning the root resource pool for a cluster can be done - directly via the `ComputeCluster` - data source. - - All compute resources in vSphere have a resource pool, even if one has not been - explicitly created. This resource pool is referred to as the - _root resource pool_ and can be looked up by specifying the path. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - pool = vsphere.get_resource_pool(name="esxi-01.example.com/Resources", - datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"]) - ``` - - For more information on the root resource pool, see [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere documentation. - - [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html - :param str datacenter_id: The managed object reference ID of the datacenter in which the resource pool is located. This can be omitted diff --git a/sdk/python/pulumi_vsphere/get_role.py b/sdk/python/pulumi_vsphere/get_role.py index ade2852c..32b3c023 100644 --- a/sdk/python/pulumi_vsphere/get_role.py +++ b/sdk/python/pulumi_vsphere/get_role.py @@ -98,15 +98,6 @@ def get_role(description: Optional[str] = None, The `Role` data source can be used to discover the `id` and privileges associated with a role given its name or display label. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - terraform_role = vsphere.get_role(label="Terraform to vSphere Integration Role") - ``` - :param str description: The description of the role. :param str label: The label of the role. @@ -138,15 +129,6 @@ def get_role_output(description: Optional[pulumi.Input[Optional[str]]] = None, The `Role` data source can be used to discover the `id` and privileges associated with a role given its name or display label. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - terraform_role = vsphere.get_role(label="Terraform to vSphere Integration Role") - ``` - :param str description: The description of the role. :param str label: The label of the role. diff --git a/sdk/python/pulumi_vsphere/get_tag.py b/sdk/python/pulumi_vsphere/get_tag.py index 14e64fd7..5c5b8f42 100644 --- a/sdk/python/pulumi_vsphere/get_tag.py +++ b/sdk/python/pulumi_vsphere/get_tag.py @@ -84,17 +84,6 @@ def get_tag(category_id: Optional[str] = None, > **NOTE:** Tagging is not supported on direct ESXi hosts connections and requires vCenter Server. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - category = vsphere.get_tag_category(name="example-category") - tag = vsphere.get_tag(name="example-tag", - category_id=category.id) - ``` - :param str category_id: The ID of the tag category in which the tag is located. @@ -127,17 +116,6 @@ def get_tag_output(category_id: Optional[pulumi.Input[str]] = None, > **NOTE:** Tagging is not supported on direct ESXi hosts connections and requires vCenter Server. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - category = vsphere.get_tag_category(name="example-category") - tag = vsphere.get_tag(name="example-tag", - category_id=category.id) - ``` - :param str category_id: The ID of the tag category in which the tag is located. diff --git a/sdk/python/pulumi_vsphere/get_tag_category.py b/sdk/python/pulumi_vsphere/get_tag_category.py index 368dfb8d..4ba15bfc 100644 --- a/sdk/python/pulumi_vsphere/get_tag_category.py +++ b/sdk/python/pulumi_vsphere/get_tag_category.py @@ -92,15 +92,6 @@ def get_tag_category(name: Optional[str] = None, > **NOTE:** Tagging is not supported on direct ESXi hosts connections and requires vCenter Server. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - category = vsphere.get_tag_category(name="example-category") - ``` - :param str name: The name of the tag category. """ @@ -130,15 +121,6 @@ def get_tag_category_output(name: Optional[pulumi.Input[str]] = None, > **NOTE:** Tagging is not supported on direct ESXi hosts connections and requires vCenter Server. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - category = vsphere.get_tag_category(name="example-category") - ``` - :param str name: The name of the tag category. """ diff --git a/sdk/python/pulumi_vsphere/get_vapp_container.py b/sdk/python/pulumi_vsphere/get_vapp_container.py index c78fa1d9..717bfefe 100644 --- a/sdk/python/pulumi_vsphere/get_vapp_container.py +++ b/sdk/python/pulumi_vsphere/get_vapp_container.py @@ -71,17 +71,6 @@ def get_vapp_container(datacenter_id: Optional[str] = None, that you want to use to create virtual machines in using the `VirtualMachine` resource. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - pool = vsphere.get_vapp_container(name="vapp-container-01", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter in which the vApp container is located. @@ -110,17 +99,6 @@ def get_vapp_container_output(datacenter_id: Optional[pulumi.Input[str]] = None, that you want to use to create virtual machines in using the `VirtualMachine` resource. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - pool = vsphere.get_vapp_container(name="vapp-container-01", - datacenter_id=datacenter.id) - ``` - :param str datacenter_id: The managed object reference ID of the datacenter in which the vApp container is located. diff --git a/sdk/python/pulumi_vsphere/get_virtual_machine.py b/sdk/python/pulumi_vsphere/get_virtual_machine.py index 8b3878c7..f615121b 100644 --- a/sdk/python/pulumi_vsphere/get_virtual_machine.py +++ b/sdk/python/pulumi_vsphere/get_virtual_machine.py @@ -737,33 +737,6 @@ def get_virtual_machine(alternate_guest_name: Optional[str] = None, `VirtualMachine` resource. It also reads the guest ID so that can be supplied as well. - ## Example Usage - - In the following example, a virtual machine template is returned by its - unique name within the `Datacenter`. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - template = vsphere.get_virtual_machine(name="ubuntu-server-template", - datacenter_id=datacenter.id) - ``` - In the following example, each virtual machine template is returned by its - unique full path within the `Datacenter`. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - production_template = vsphere.get_virtual_machine(name="production/templates/ubuntu-server-template", - datacenter_id=datacenter.id) - development_template = vsphere.get_virtual_machine(name="development/templates/ubuntu-server-template", - datacenter_id=datacenter.id) - ``` - :param str alternate_guest_name: The alternate guest name of the virtual machine when `guest_id` is a non-specific operating system, like `otherGuest` or `otherGuest64`. @@ -979,33 +952,6 @@ def get_virtual_machine_output(alternate_guest_name: Optional[pulumi.Input[Optio `VirtualMachine` resource. It also reads the guest ID so that can be supplied as well. - ## Example Usage - - In the following example, a virtual machine template is returned by its - unique name within the `Datacenter`. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - template = vsphere.get_virtual_machine(name="ubuntu-server-template", - datacenter_id=datacenter.id) - ``` - In the following example, each virtual machine template is returned by its - unique full path within the `Datacenter`. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - production_template = vsphere.get_virtual_machine(name="production/templates/ubuntu-server-template", - datacenter_id=datacenter.id) - development_template = vsphere.get_virtual_machine(name="development/templates/ubuntu-server-template", - datacenter_id=datacenter.id) - ``` - :param str alternate_guest_name: The alternate guest name of the virtual machine when `guest_id` is a non-specific operating system, like `otherGuest` or `otherGuest64`. diff --git a/sdk/python/pulumi_vsphere/get_vmfs_disks.py b/sdk/python/pulumi_vsphere/get_vmfs_disks.py index e057cfe9..9932a175 100644 --- a/sdk/python/pulumi_vsphere/get_vmfs_disks.py +++ b/sdk/python/pulumi_vsphere/get_vmfs_disks.py @@ -94,20 +94,6 @@ def get_vmfs_disks(filter: Optional[str] = None, `VmfsDatastore` resource to create VMFS datastores based off a set of discovered disks. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - host = vsphere.get_host(name="esxi-01.example.com", - datacenter_id=datacenter.id) - vmfs_disks = vsphere.get_vmfs_disks(host_system_id=host.id, - rescan=True, - filter="mpx.vmhba1:C0:T[12]:L0") - ``` - :param str filter: A regular expression to filter the disks against. Only disks with canonical names that match will be included. @@ -147,20 +133,6 @@ def get_vmfs_disks_output(filter: Optional[pulumi.Input[Optional[str]]] = None, `VmfsDatastore` resource to create VMFS datastores based off a set of discovered disks. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - host = vsphere.get_host(name="esxi-01.example.com", - datacenter_id=datacenter.id) - vmfs_disks = vsphere.get_vmfs_disks(host_system_id=host.id, - rescan=True, - filter="mpx.vmhba1:C0:T[12]:L0") - ``` - :param str filter: A regular expression to filter the disks against. Only disks with canonical names that match will be included. diff --git a/sdk/python/pulumi_vsphere/ha_vm_override.py b/sdk/python/pulumi_vsphere/ha_vm_override.py index 490d9bdb..d2f58ce3 100644 --- a/sdk/python/pulumi_vsphere/ha_vm_override.py +++ b/sdk/python/pulumi_vsphere/ha_vm_override.py @@ -107,8 +107,8 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - compute_cluster_id: pulumi.Input[str], - virtual_machine_id: pulumi.Input[str], + 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, @@ -122,7 +122,43 @@ def _configure( 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): + 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: @@ -483,7 +519,39 @@ def _configure( 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): + 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: _setter("compute_cluster_id", compute_cluster_id) if ha_datastore_apd_recovery_action is not None: diff --git a/sdk/python/pulumi_vsphere/host.py b/sdk/python/pulumi_vsphere/host.py index 5bf9cb2f..98fef612 100644 --- a/sdk/python/pulumi_vsphere/host.py +++ b/sdk/python/pulumi_vsphere/host.py @@ -94,9 +94,9 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - hostname: pulumi.Input[str], - password: pulumi.Input[str], - username: pulumi.Input[str], + 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, @@ -108,7 +108,19 @@ def _configure( 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): + 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) @@ -430,7 +442,13 @@ def _configure( 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): + 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: _setter("cluster", cluster) if cluster_managed is not None: @@ -683,54 +701,6 @@ def __init__(__self__, can be used either as a member of a cluster or as a standalone host. ## Example Usage - ### Create a standalone host - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com", - insecure=True) - esx_01 = vsphere.Host("esx-01", - hostname="esx-01.example.com", - username="root", - password="password", - license="00000-00000-00000-00000-00000", - thumbprint=thumbprint.id, - datacenter=datacenter.id) - ``` - ### Create host in a compute cluster - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com", - insecure=True) - esx_01 = vsphere.Host("esx-01", - hostname="esx-01.example.com", - username="root", - password="password", - license="00000-00000-00000-00000-00000", - thumbprint=thumbprint.id, - cluster=cluster.id) - ``` - ## Importing - - An existing host can be [imported][docs-import] into this resource by supplying - the host's ID. An example is below: - - [docs-import]: /docs/import/index.html - - ```python - import pulumi - ``` - - The above would import the host with ID `host-123`. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. @@ -789,54 +759,6 @@ def __init__(__self__, can be used either as a member of a cluster or as a standalone host. ## Example Usage - ### Create a standalone host - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com", - insecure=True) - esx_01 = vsphere.Host("esx-01", - hostname="esx-01.example.com", - username="root", - password="password", - license="00000-00000-00000-00000-00000", - thumbprint=thumbprint.id, - datacenter=datacenter.id) - ``` - ### Create host in a compute cluster - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - thumbprint = vsphere.get_host_thumbprint(address="esx-01.example.com", - insecure=True) - esx_01 = vsphere.Host("esx-01", - hostname="esx-01.example.com", - username="root", - password="password", - license="00000-00000-00000-00000-00000", - thumbprint=thumbprint.id, - cluster=cluster.id) - ``` - ## Importing - - An existing host can be [imported][docs-import] into this resource by supplying - the host's ID. An example is below: - - [docs-import]: /docs/import/index.html - - ```python - import pulumi - ``` - - The above would import the host with ID `host-123`. :param str resource_name: The name of the resource. :param HostArgs args: The arguments to use to populate this resource's properties. diff --git a/sdk/python/pulumi_vsphere/host_port_group.py b/sdk/python/pulumi_vsphere/host_port_group.py index de45d50b..d67e41b5 100644 --- a/sdk/python/pulumi_vsphere/host_port_group.py +++ b/sdk/python/pulumi_vsphere/host_port_group.py @@ -85,8 +85,8 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - host_system_id: pulumi.Input[str], - virtual_switch_name: pulumi.Input[str], + 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, @@ -102,7 +102,43 @@ def _configure( 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): + 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: @@ -453,7 +489,41 @@ def _configure( 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): + 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: _setter("active_nics", active_nics) if allow_forged_transmits is not None: @@ -780,70 +850,6 @@ def __init__(__self__, [ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html - ## Example Usage - - **Create a Virtual Switch and Bind a Port Group:** - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - host = vsphere.get_host(name="esxi-01.example.com", - datacenter_id=datacenter.id) - host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch", - host_system_id=host.id, - network_adapters=[ - "vmnic0", - "vmnic1", - ], - active_nics=["vmnic0"], - standby_nics=["vmnic1"]) - pg = vsphere.HostPortGroup("pg", - host_system_id=host.id, - virtual_switch_name=host_virtual_switch.name) - ``` - - **Create a Port Group with a VLAN and ab Override:** - - This example sets the trunk mode VLAN (`4095`, which passes through all tags) - and sets - `allow_promiscuous` - to ensure that all traffic is seen on the port. The setting overrides - the implicit default of `false` set on the standard switch. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - host = vsphere.get_host(name="esxi-01.example.com", - datacenter_id=datacenter.id) - host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch", - host_system_id=host.id, - network_adapters=[ - "vmnic0", - "vmnic1", - ], - active_nics=["vmnic0"], - standby_nics=["vmnic1"]) - pg = vsphere.HostPortGroup("pg", - host_system_id=host.id, - virtual_switch_name=host_virtual_switch.name, - vlan_id=4095, - allow_promiscuous=True) - ``` - ## Importing - - An existing host port group can be imported into this resource - using the host port group's ID. An example is below: - - ```python - import pulumi - ``` - - The above would import the `management` host port group from host with ID `host-123`. - :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] active_nics: List of active network adapters used for load balancing. @@ -889,70 +895,6 @@ def __init__(__self__, [ref-vsphere-net-concepts]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.networking.doc/GUID-2B11DBB8-CB3C-4AFF-8885-EFEA0FC562F4.html - ## Example Usage - - **Create a Virtual Switch and Bind a Port Group:** - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - host = vsphere.get_host(name="esxi-01.example.com", - datacenter_id=datacenter.id) - host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch", - host_system_id=host.id, - network_adapters=[ - "vmnic0", - "vmnic1", - ], - active_nics=["vmnic0"], - standby_nics=["vmnic1"]) - pg = vsphere.HostPortGroup("pg", - host_system_id=host.id, - virtual_switch_name=host_virtual_switch.name) - ``` - - **Create a Port Group with a VLAN and ab Override:** - - This example sets the trunk mode VLAN (`4095`, which passes through all tags) - and sets - `allow_promiscuous` - to ensure that all traffic is seen on the port. The setting overrides - the implicit default of `false` set on the standard switch. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - host = vsphere.get_host(name="esxi-01.example.com", - datacenter_id=datacenter.id) - host_virtual_switch = vsphere.HostVirtualSwitch("hostVirtualSwitch", - host_system_id=host.id, - network_adapters=[ - "vmnic0", - "vmnic1", - ], - active_nics=["vmnic0"], - standby_nics=["vmnic1"]) - pg = vsphere.HostPortGroup("pg", - host_system_id=host.id, - virtual_switch_name=host_virtual_switch.name, - vlan_id=4095, - allow_promiscuous=True) - ``` - ## Importing - - An existing host port group can be imported into this resource - using the host port group's ID. An example is below: - - ```python - import pulumi - ``` - - The above would import the `management` host port group from host with ID `host-123`. - :param str resource_name: The name of the resource. :param HostPortGroupArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumi_vsphere/host_virtual_switch.py b/sdk/python/pulumi_vsphere/host_virtual_switch.py index 144922fe..4688d826 100644 --- a/sdk/python/pulumi_vsphere/host_virtual_switch.py +++ b/sdk/python/pulumi_vsphere/host_virtual_switch.py @@ -117,9 +117,9 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - active_nics: pulumi.Input[Sequence[pulumi.Input[str]]], - host_system_id: pulumi.Input[str], - network_adapters: pulumi.Input[Sequence[pulumi.Input[str]]], + 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, @@ -138,7 +138,51 @@ def _configure( 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): + 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) @@ -590,7 +634,45 @@ def _configure( 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): + 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: _setter("active_nics", active_nics) if allow_forged_transmits is not None: diff --git a/sdk/python/pulumi_vsphere/license.py b/sdk/python/pulumi_vsphere/license.py index 66776bf8..21fd6745 100644 --- a/sdk/python/pulumi_vsphere/license.py +++ b/sdk/python/pulumi_vsphere/license.py @@ -29,9 +29,15 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - license_key: pulumi.Input[str], + license_key: Optional[pulumi.Input[str]] = None, labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("labels", labels) @@ -97,7 +103,13 @@ def _configure( name: Optional[pulumi.Input[str]] = None, total: Optional[pulumi.Input[int]] = None, used: Optional[pulumi.Input[int]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("edition_key", edition_key) if labels is not None: @@ -195,20 +207,6 @@ def __init__(__self__, """ Provides a VMware vSphere license resource. This can be used to add and remove license keys. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - license_key = vsphere.License("licenseKey", - labels={ - "VpxClientLicenseLabel": "Hello World", - "Workflow": "Hello World", - }, - license_key="452CQ-2EK54-K8742-00000-00000") - ``` - :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :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. @@ -223,20 +221,6 @@ def __init__(__self__, """ Provides a VMware vSphere license resource. This can be used to add and remove license keys. - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - license_key = vsphere.License("licenseKey", - labels={ - "VpxClientLicenseLabel": "Hello World", - "Workflow": "Hello World", - }, - license_key="452CQ-2EK54-K8742-00000-00000") - ``` - :param str resource_name: The name of the resource. :param LicenseArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumi_vsphere/nas_datastore.py b/sdk/python/pulumi_vsphere/nas_datastore.py index ede06c15..984677a3 100644 --- a/sdk/python/pulumi_vsphere/nas_datastore.py +++ b/sdk/python/pulumi_vsphere/nas_datastore.py @@ -83,9 +83,9 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - host_system_ids: pulumi.Input[Sequence[pulumi.Input[str]]], - remote_hosts: pulumi.Input[Sequence[pulumi.Input[str]]], - remote_path: pulumi.Input[str], + 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, @@ -94,7 +94,29 @@ def _configure( 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): + 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) @@ -394,7 +416,33 @@ def _configure( type: Optional[pulumi.Input[str]] = None, uncommitted_space: Optional[pulumi.Input[int]] = None, url: Optional[pulumi.Input[str]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("access_mode", access_mode) if accessible is not None: diff --git a/sdk/python/pulumi_vsphere/outputs.py b/sdk/python/pulumi_vsphere/outputs.py index 6f3f8baa..1d32b6ac 100644 --- a/sdk/python/pulumi_vsphere/outputs.py +++ b/sdk/python/pulumi_vsphere/outputs.py @@ -49,31 +49,6 @@ def __init__(__self__, *, > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. You can enable or re-enable vSphere HA after vSAN is configured. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - compute_cluster = vsphere.ComputeCluster("computeCluster", - datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"], - host_system_ids=[[__item["id"] for __item in data["vsphere_host"]["host"]]], - drs_enabled=True, - drs_automation_level="fullyAutomated", - ha_enabled=False, - vsan_enabled=True, - vsan_dedup_enabled=True, - vsan_compression_enabled=True, - vsan_performance_enabled=True, - vsan_verbose_mode_enabled=True, - vsan_network_diagnostic_mode_enabled=True, - vsan_unmap_enabled=True, - vsan_dit_encryption_enabled=True, - vsan_dit_rekey_interval=1800, - vsan_disk_groups=[vsphere.ComputeClusterVsanDiskGroupArgs( - cache=data["vsphere_vmfs_disks"]["cache_disks"], - storages=data["vsphere_vmfs_disks"]["storage_disks"], - )]) - ``` """ ComputeClusterVsanDiskGroup._configure( lambda key, value: pulumi.set(__self__, key, value), @@ -85,7 +60,9 @@ def _configure( _setter: Callable[[Any, Any], None], cache: Optional[str] = None, storages: Optional[Sequence[str]] = None, - opts: Optional[pulumi.ResourceOptions]=None): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if cache is not None: _setter("cache", cache) if storages is not None: @@ -107,31 +84,6 @@ def storages(self) -> Optional[Sequence[str]]: > **NOTE:** You must disable vSphere HA before you enable vSAN on the cluster. You can enable or re-enable vSphere HA after vSAN is configured. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - compute_cluster = vsphere.ComputeCluster("computeCluster", - datacenter_id=data["vsphere_datacenter"]["datacenter"]["id"], - host_system_ids=[[__item["id"] for __item in data["vsphere_host"]["host"]]], - drs_enabled=True, - drs_automation_level="fullyAutomated", - ha_enabled=False, - vsan_enabled=True, - vsan_dedup_enabled=True, - vsan_compression_enabled=True, - vsan_performance_enabled=True, - vsan_verbose_mode_enabled=True, - vsan_network_diagnostic_mode_enabled=True, - vsan_unmap_enabled=True, - vsan_dit_encryption_enabled=True, - vsan_dit_rekey_interval=1800, - vsan_disk_groups=[vsphere.ComputeClusterVsanDiskGroupArgs( - cache=data["vsphere_vmfs_disks"]["cache_disks"], - storages=data["vsphere_vmfs_disks"]["storage_disks"], - )]) - ``` """ return pulumi.get(self, "storages") @@ -186,7 +138,13 @@ def _configure( publish_url: Optional[str] = None, published: Optional[bool] = None, username: Optional[str] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("authentication_method", authentication_method) if password is not None: @@ -297,7 +255,17 @@ def _configure( password: Optional[str] = None, subscription_url: Optional[str] = None, username: Optional[str] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("authentication_method", authentication_method) if automatic_sync is not None: @@ -392,9 +360,19 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - max_vlan: int, - min_vlan: int, - opts: Optional[pulumi.ResourceOptions]=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) @@ -445,9 +423,15 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - host_system_id: str, + host_system_id: Optional[str] = None, devices: Optional[Sequence[str]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("devices", devices) @@ -515,10 +499,24 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - primary_vlan_id: int, - pvlan_type: str, - secondary_vlan_id: int, - opts: Optional[pulumi.ResourceOptions]=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) @@ -583,9 +581,19 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - max_vlan: int, - min_vlan: int, - opts: Optional[pulumi.ResourceOptions]=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) @@ -644,11 +652,27 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - is_group: bool, - propagate: bool, - role_id: str, - user_or_group: str, - opts: Optional[pulumi.ResourceOptions]=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) @@ -725,7 +749,11 @@ def _configure( key: Optional[str] = None, mac_addresses: Optional[Sequence[str]] = None, type: Optional[str] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("key", key) if mac_addresses is not None: @@ -807,7 +835,15 @@ def _configure( device_address: Optional[str] = None, key: Optional[int] = None, path: Optional[str] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("client_device", client_device) if datastore_id is not None: @@ -905,13 +941,25 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - template_uuid: str, + 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): + 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: _setter("customize", customize) @@ -1025,7 +1073,25 @@ def _configure( timeout: Optional[int] = None, windows_options: Optional['outputs.VirtualMachineCloneCustomizeWindowsOptions'] = None, windows_sysprep_text: Optional[str] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("dns_server_lists", dns_server_lists) if dns_suffix_lists is not None: @@ -1136,12 +1202,26 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - domain: str, - host_name: str, + 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): + 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: @@ -1231,7 +1311,21 @@ def _configure( ipv4_netmask: Optional[int] = None, ipv6_address: Optional[str] = None, ipv6_netmask: Optional[int] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("dns_domain", dns_domain) if dns_server_lists is not None: @@ -1350,7 +1444,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - computer_name: str, + computer_name: Optional[str] = None, admin_password: Optional[str] = None, auto_logon: Optional[bool] = None, auto_logon_count: Optional[int] = None, @@ -1363,7 +1457,35 @@ def _configure( run_once_command_lists: Optional[Sequence[str]] = None, time_zone: Optional[int] = None, workgroup: Optional[str] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("admin_password", admin_password) @@ -1583,7 +1705,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - label: str, + label: Optional[str] = None, attach: Optional[bool] = None, controller_type: Optional[str] = None, datastore_id: Optional[str] = None, @@ -1604,7 +1726,41 @@ def _configure( unit_number: Optional[int] = None, uuid: Optional[str] = None, write_through: Optional[bool] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("attach", attach) @@ -1898,7 +2054,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - network_id: str, + network_id: Optional[str] = None, adapter_type: Optional[str] = None, bandwidth_limit: Optional[int] = None, bandwidth_reservation: Optional[int] = None, @@ -1909,7 +2065,31 @@ def _configure( mac_address: Optional[str] = None, ovf_mapping: Optional[str] = None, use_static_mac: Optional[bool] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("adapter_type", adapter_type) @@ -2087,7 +2267,27 @@ def _configure( 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): + 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: _setter("allow_unverified_ssl_cert", allow_unverified_ssl_cert) if deployment_option is not None: @@ -2165,7 +2365,9 @@ def __init__(__self__, *, def _configure( _setter: Callable[[Any, Any], None], properties: Optional[Mapping[str, str]] = None, - opts: Optional[pulumi.ResourceOptions]=None): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if properties is not None: _setter("properties", properties) @@ -2214,10 +2416,20 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - tag_category: str, - tags: Sequence[str], + tag_category: Optional[str] = None, + tags: Optional[Sequence[str]] = None, include_datastores_with_tags: Optional[bool] = None, - opts: Optional[pulumi.ResourceOptions]=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: @@ -2275,7 +2487,9 @@ def _configure( gw: Optional[str] = None, ip: Optional[str] = None, netmask: Optional[str] = None, - opts: Optional[pulumi.ResourceOptions]=None): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if dhcp is not None: _setter("dhcp", dhcp) if gw is not None: @@ -2345,7 +2559,9 @@ def _configure( autoconfig: Optional[bool] = None, dhcp: Optional[bool] = None, gw: Optional[str] = None, - opts: Optional[pulumi.ResourceOptions]=None): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if addresses is not None: _setter("addresses", addresses) if autoconfig is not None: @@ -2414,12 +2630,30 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - eagerly_scrub: bool, - label: str, - size: int, - thin_provisioned: bool, - unit_number: int, - opts: Optional[pulumi.ResourceOptions]=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) @@ -2506,14 +2740,38 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - adapter_type: str, - bandwidth_share_count: int, - mac_address: str, - network_id: str, + 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): + 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) @@ -2601,7 +2859,9 @@ def __init__(__self__, *, def _configure( _setter: Callable[[Any, Any], None], properties: Optional[Mapping[str, str]] = None, - opts: Optional[pulumi.ResourceOptions]=None): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if properties is not None: _setter("properties", properties) diff --git a/sdk/python/pulumi_vsphere/provider.py b/sdk/python/pulumi_vsphere/provider.py index eb7488a0..927fd2b0 100644 --- a/sdk/python/pulumi_vsphere/provider.py +++ b/sdk/python/pulumi_vsphere/provider.py @@ -61,8 +61,8 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - password: pulumi.Input[str], - user: pulumi.Input[str], + 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, @@ -74,7 +74,35 @@ def _configure( 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): + 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: diff --git a/sdk/python/pulumi_vsphere/resource_pool.py b/sdk/python/pulumi_vsphere/resource_pool.py index 8cc1146d..b06e6793 100644 --- a/sdk/python/pulumi_vsphere/resource_pool.py +++ b/sdk/python/pulumi_vsphere/resource_pool.py @@ -97,7 +97,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - parent_resource_pool_id: pulumi.Input[str], + 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, @@ -112,7 +112,37 @@ def _configure( 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): + 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: _setter("cpu_expandable", cpu_expandable) @@ -454,7 +484,35 @@ def _configure( 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): + 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: _setter("cpu_expandable", cpu_expandable) if cpu_limit is not None: @@ -726,46 +784,6 @@ def __init__(__self__, [ref-vsphere-resource_pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html - ## Example Usage - - The following example sets up a resource pool in an existing compute cluster - with the default settings for CPU and memory reservations, shares, and limits. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - compute_cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - resource_pool = vsphere.ResourcePool("resourcePool", parent_resource_pool_id=compute_cluster.resource_pool_id) - ``` - - A virtual machine resource could be targeted to use the default resource pool - of the cluster using the following: - - ```python - import pulumi - import pulumi_vsphere as vsphere - - vm = vsphere.VirtualMachine("vm", resource_pool_id=data["vsphere_compute_cluster"]["cluster"]["resource_pool_id"]) - # ... other configuration ... - ``` - - The following example sets up a parent resource pool in an existing compute cluster - with a child resource pool nested below. Each resource pool is configured with - the default settings for CPU and memory reservations, shares, and limits. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - compute_cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - resource_pool_parent = vsphere.ResourcePool("resourcePoolParent", parent_resource_pool_id=compute_cluster.resource_pool_id) - resource_pool_child = vsphere.ResourcePool("resourcePoolChild", parent_resource_pool_id=resource_pool_parent.id) - ``` ## Importing ### Settings that Require vSphere 7.0 or higher @@ -835,46 +853,6 @@ def __init__(__self__, [ref-vsphere-resource_pools]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.resmgmt.doc/GUID-60077B40-66FF-4625-934A-641703ED7601.html - ## Example Usage - - The following example sets up a resource pool in an existing compute cluster - with the default settings for CPU and memory reservations, shares, and limits. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - compute_cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - resource_pool = vsphere.ResourcePool("resourcePool", parent_resource_pool_id=compute_cluster.resource_pool_id) - ``` - - A virtual machine resource could be targeted to use the default resource pool - of the cluster using the following: - - ```python - import pulumi - import pulumi_vsphere as vsphere - - vm = vsphere.VirtualMachine("vm", resource_pool_id=data["vsphere_compute_cluster"]["cluster"]["resource_pool_id"]) - # ... other configuration ... - ``` - - The following example sets up a parent resource pool in an existing compute cluster - with a child resource pool nested below. Each resource pool is configured with - the default settings for CPU and memory reservations, shares, and limits. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - datacenter = vsphere.get_datacenter(name="dc-01") - compute_cluster = vsphere.get_compute_cluster(name="cluster-01", - datacenter_id=datacenter.id) - resource_pool_parent = vsphere.ResourcePool("resourcePoolParent", parent_resource_pool_id=compute_cluster.resource_pool_id) - resource_pool_child = vsphere.ResourcePool("resourcePoolChild", parent_resource_pool_id=resource_pool_parent.id) - ``` ## Importing ### Settings that Require vSphere 7.0 or higher diff --git a/sdk/python/pulumi_vsphere/role.py b/sdk/python/pulumi_vsphere/role.py index 4265053d..2433cadc 100644 --- a/sdk/python/pulumi_vsphere/role.py +++ b/sdk/python/pulumi_vsphere/role.py @@ -31,7 +31,11 @@ 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): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if role_privileges is None and 'rolePrivileges' in kwargs: + role_privileges = kwargs['rolePrivileges'] + if name is not None: _setter("name", name) if role_privileges is not None: @@ -86,7 +90,11 @@ def _configure( 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): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if role_privileges is None and 'rolePrivileges' in kwargs: + role_privileges = kwargs['rolePrivileges'] + if label is not None: _setter("label", label) if name is not None: diff --git a/sdk/python/pulumi_vsphere/storage_drs_vm_override.py b/sdk/python/pulumi_vsphere/storage_drs_vm_override.py index 18f35f8b..42c55fe2 100644 --- a/sdk/python/pulumi_vsphere/storage_drs_vm_override.py +++ b/sdk/python/pulumi_vsphere/storage_drs_vm_override.py @@ -50,12 +50,28 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - datastore_cluster_id: pulumi.Input[str], - virtual_machine_id: pulumi.Input[str], + 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): + 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: @@ -182,7 +198,19 @@ def _configure( 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): + 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: _setter("datastore_cluster_id", datastore_cluster_id) if sdrs_automation_level is not None: diff --git a/sdk/python/pulumi_vsphere/tag.py b/sdk/python/pulumi_vsphere/tag.py index 032cad68..08f29b3b 100644 --- a/sdk/python/pulumi_vsphere/tag.py +++ b/sdk/python/pulumi_vsphere/tag.py @@ -34,10 +34,16 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - category_id: pulumi.Input[str], + category_id: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("description", description) @@ -109,7 +115,11 @@ def _configure( category_id: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("category_id", category_id) if description is not None: diff --git a/sdk/python/pulumi_vsphere/tag_category.py b/sdk/python/pulumi_vsphere/tag_category.py index 76ed5155..af3616ed 100644 --- a/sdk/python/pulumi_vsphere/tag_category.py +++ b/sdk/python/pulumi_vsphere/tag_category.py @@ -43,11 +43,19 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - associable_types: pulumi.Input[Sequence[pulumi.Input[str]]], - cardinality: pulumi.Input[str], + 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): + 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: @@ -148,7 +156,11 @@ def _configure( cardinality: Optional[pulumi.Input[str]] = None, description: Optional[pulumi.Input[str]] = None, name: Optional[pulumi.Input[str]] = None, - opts: Optional[pulumi.ResourceOptions]=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: _setter("associable_types", associable_types) if cardinality is not None: diff --git a/sdk/python/pulumi_vsphere/vapp_container.py b/sdk/python/pulumi_vsphere/vapp_container.py index a17e7106..c82b397f 100644 --- a/sdk/python/pulumi_vsphere/vapp_container.py +++ b/sdk/python/pulumi_vsphere/vapp_container.py @@ -96,7 +96,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - parent_resource_pool_id: pulumi.Input[str], + 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, @@ -111,7 +111,37 @@ def _configure( 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): + 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: _setter("cpu_expandable", cpu_expandable) @@ -451,7 +481,35 @@ def _configure( 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): + 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: _setter("cpu_expandable", cpu_expandable) if cpu_limit is not None: diff --git a/sdk/python/pulumi_vsphere/vapp_entity.py b/sdk/python/pulumi_vsphere/vapp_entity.py index 6ccc7162..15aa9985 100644 --- a/sdk/python/pulumi_vsphere/vapp_entity.py +++ b/sdk/python/pulumi_vsphere/vapp_entity.py @@ -64,8 +64,8 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - container_id: pulumi.Input[str], - target_id: pulumi.Input[str], + 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, @@ -74,7 +74,31 @@ def _configure( 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): + 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: @@ -289,7 +313,27 @@ def _configure( 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): + 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: _setter("container_id", container_id) if custom_attributes is not None: diff --git a/sdk/python/pulumi_vsphere/virtual_disk.py b/sdk/python/pulumi_vsphere/virtual_disk.py index cf946437..872cc567 100644 --- a/sdk/python/pulumi_vsphere/virtual_disk.py +++ b/sdk/python/pulumi_vsphere/virtual_disk.py @@ -67,14 +67,28 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - datastore: pulumi.Input[str], - size: pulumi.Input[int], - vmdk_path: pulumi.Input[str], + 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): + 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) @@ -264,7 +278,15 @@ def _configure( size: Optional[pulumi.Input[int]] = None, type: Optional[pulumi.Input[str]] = None, vmdk_path: Optional[pulumi.Input[str]] = None, - opts: Optional[pulumi.ResourceOptions]=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""") diff --git a/sdk/python/pulumi_vsphere/virtual_machine.py b/sdk/python/pulumi_vsphere/virtual_machine.py index bfd05ba8..cc9f02c4 100644 --- a/sdk/python/pulumi_vsphere/virtual_machine.py +++ b/sdk/python/pulumi_vsphere/virtual_machine.py @@ -286,7 +286,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - resource_pool_id: pulumi.Input[str], + 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, @@ -360,7 +360,139 @@ def _configure( 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): + 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: _setter("alternate_guest_name", alternate_guest_name) @@ -1828,7 +1960,153 @@ def _configure( 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): + 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: _setter("alternate_guest_name", alternate_guest_name) if annotation is not None: @@ -3374,11 +3652,7 @@ 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) + clone = _utilities.configure(clone, VirtualMachineCloneArgs, True) __props__.__dict__["clone"] = clone __props__.__dict__["cpu_hot_add_enabled"] = cpu_hot_add_enabled __props__.__dict__["cpu_hot_remove_enabled"] = cpu_hot_remove_enabled @@ -3420,11 +3694,7 @@ def _setter(key, value): __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) + ovf_deploy = _utilities.configure(ovf_deploy, VirtualMachineOvfDeployArgs, True) __props__.__dict__["ovf_deploy"] = ovf_deploy __props__.__dict__["pci_device_ids"] = pci_device_ids __props__.__dict__["poweron_timeout"] = poweron_timeout @@ -3448,11 +3718,7 @@ def _setter(key, value): __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) + vapp = _utilities.configure(vapp, VirtualMachineVappArgs, True) __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 ff24e7a8..dab62f64 100644 --- a/sdk/python/pulumi_vsphere/virtual_machine_snapshot.py +++ b/sdk/python/pulumi_vsphere/virtual_machine_snapshot.py @@ -50,14 +50,32 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - description: pulumi.Input[str], - memory: pulumi.Input[bool], - quiesce: pulumi.Input[bool], - snapshot_name: pulumi.Input[str], - virtual_machine_uuid: pulumi.Input[str], + 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): + 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) @@ -205,7 +223,15 @@ def _configure( 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): + 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: _setter("consolidate", consolidate) if description is not None: @@ -348,22 +374,6 @@ def __init__(__self__, [ext-vm-snap-limitations]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-53F65726-A23B-4CF0-A7D5-48E584B88613.html - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - demo1 = vsphere.VirtualMachineSnapshot("demo1", - consolidate=True, - description="This is Demo Snapshot", - memory=True, - quiesce=True, - remove_children=False, - snapshot_name="Snapshot Name", - virtual_machine_uuid="9aac5551-a351-4158-8c5c-15a71e8ec5c9") - ``` - :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] consolidate: If set to `true`, the delta disks involved in this @@ -409,22 +419,6 @@ def __init__(__self__, [ext-vm-snap-limitations]: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-53F65726-A23B-4CF0-A7D5-48E584B88613.html - ## Example Usage - - ```python - import pulumi - import pulumi_vsphere as vsphere - - demo1 = vsphere.VirtualMachineSnapshot("demo1", - consolidate=True, - description="This is Demo Snapshot", - memory=True, - quiesce=True, - remove_children=False, - snapshot_name="Snapshot Name", - virtual_machine_uuid="9aac5551-a351-4158-8c5c-15a71e8ec5c9") - ``` - :param str resource_name: The name of the resource. :param VirtualMachineSnapshotArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumi_vsphere/vm_storage_policy.py b/sdk/python/pulumi_vsphere/vm_storage_policy.py index 72800e6b..5abd306b 100644 --- a/sdk/python/pulumi_vsphere/vm_storage_policy.py +++ b/sdk/python/pulumi_vsphere/vm_storage_policy.py @@ -34,10 +34,16 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - tag_rules: pulumi.Input[Sequence[pulumi.Input['VmStoragePolicyTagRuleArgs']]], + 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): + 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: _setter("description", description) @@ -105,7 +111,11 @@ def _configure( 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): + opts: Optional[pulumi.ResourceOptions] = None, + **kwargs): + if tag_rules is None and 'tagRules' in kwargs: + tag_rules = kwargs['tagRules'] + if description is not None: _setter("description", description) if name is not None: @@ -164,107 +174,6 @@ def __init__(__self__, policies. Using this resource, tag based placement rules can be created to place virtual machines on a datastore with matching tags. If storage requirements for the applications on the virtual machine change, you can modify the storage policy that was originally applied to the virtual machine. - ## Example Usage - - The following example creates storage policies with `tag_rules` base on sets of environment, service level, and replication attributes. - - In this example, tags are first applied to datastores. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - environment = vsphere.get_tag_category(name="environment") - service_level = vsphere.get_tag_category(name="service_level") - replication = vsphere.get_tag_category(name="replication") - production = vsphere.get_tag(category_id="data.vsphere_tag_category.environment.id", - name="production") - development = vsphere.get_tag(category_id="data.vsphere_tag_category.environment.id", - name="development") - platinum = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id", - name="platinum") - gold = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id", - name="platinum") - silver = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id", - name="silver") - bronze = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id", - name="bronze") - replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id", - name="replicated") - non_replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id", - name="non_replicated") - prod_datastore = vsphere.VmfsDatastore("prodDatastore", tags=[ - "data.vsphere_tag.production.id", - "data.vsphere_tag.platinum.id", - "data.vsphere_tag.replicated.id", - ]) - dev_datastore = vsphere.NasDatastore("devDatastore", tags=[ - "data.vsphere_tag.development.id", - "data.vsphere_tag.silver.id", - "data.vsphere_tag.non_replicated.id", - ]) - ``` - - Next, storage policies are created and `tag_rules` are applied. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - prod_platinum_replicated = vsphere.VmStoragePolicy("prodPlatinumReplicated", - description="prod_platinum_replicated", - tag_rules=[ - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["environment"]["name"], - tags=[data["vsphere_tag"]["production"]["name"]], - include_datastores_with_tags=True, - ), - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["service_level"]["name"], - tags=[data["vsphere_tag"]["platinum"]["name"]], - include_datastores_with_tags=True, - ), - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["replication"]["name"], - tags=[data["vsphere_tag"]["replicated"]["name"]], - include_datastores_with_tags=True, - ), - ]) - dev_silver_nonreplicated = vsphere.VmStoragePolicy("devSilverNonreplicated", - description="dev_silver_nonreplicated", - tag_rules=[ - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["environment"]["name"], - tags=[data["vsphere_tag"]["development"]["name"]], - include_datastores_with_tags=True, - ), - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["service_level"]["name"], - tags=[data["vsphere_tag"]["silver"]["name"]], - include_datastores_with_tags=True, - ), - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["replication"]["name"], - tags=[data["vsphere_tag"]["non_replicated"]["name"]], - include_datastores_with_tags=True, - ), - ]) - ``` - - Lasttly, when creating a virtual machine resource, a storage policy can be specificed to direct virtual machine placement to a datastore which matches the policy's `tags_rules`. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - prod_platinum_replicated = vsphere.get_policy(name="prod_platinum_replicated") - dev_silver_nonreplicated = vsphere.get_policy(name="dev_silver_nonreplicated") - prod_vm = vsphere.VirtualMachine("prodVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["prod_platinum_replicated"]["id"]) - # ... other configuration ... - dev_vm = vsphere.VirtualMachine("devVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["dev_silver_nonreplicated"]["id"]) - # ... other configuration ... - ``` - :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] description: Description of the storage policy. @@ -282,107 +191,6 @@ def __init__(__self__, policies. Using this resource, tag based placement rules can be created to place virtual machines on a datastore with matching tags. If storage requirements for the applications on the virtual machine change, you can modify the storage policy that was originally applied to the virtual machine. - ## Example Usage - - The following example creates storage policies with `tag_rules` base on sets of environment, service level, and replication attributes. - - In this example, tags are first applied to datastores. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - environment = vsphere.get_tag_category(name="environment") - service_level = vsphere.get_tag_category(name="service_level") - replication = vsphere.get_tag_category(name="replication") - production = vsphere.get_tag(category_id="data.vsphere_tag_category.environment.id", - name="production") - development = vsphere.get_tag(category_id="data.vsphere_tag_category.environment.id", - name="development") - platinum = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id", - name="platinum") - gold = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id", - name="platinum") - silver = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id", - name="silver") - bronze = vsphere.get_tag(category_id="data.vsphere_tag_category.service_level.id", - name="bronze") - replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id", - name="replicated") - non_replicated = vsphere.get_tag(category_id="data.vsphere_tag_category.replication.id", - name="non_replicated") - prod_datastore = vsphere.VmfsDatastore("prodDatastore", tags=[ - "data.vsphere_tag.production.id", - "data.vsphere_tag.platinum.id", - "data.vsphere_tag.replicated.id", - ]) - dev_datastore = vsphere.NasDatastore("devDatastore", tags=[ - "data.vsphere_tag.development.id", - "data.vsphere_tag.silver.id", - "data.vsphere_tag.non_replicated.id", - ]) - ``` - - Next, storage policies are created and `tag_rules` are applied. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - prod_platinum_replicated = vsphere.VmStoragePolicy("prodPlatinumReplicated", - description="prod_platinum_replicated", - tag_rules=[ - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["environment"]["name"], - tags=[data["vsphere_tag"]["production"]["name"]], - include_datastores_with_tags=True, - ), - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["service_level"]["name"], - tags=[data["vsphere_tag"]["platinum"]["name"]], - include_datastores_with_tags=True, - ), - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["replication"]["name"], - tags=[data["vsphere_tag"]["replicated"]["name"]], - include_datastores_with_tags=True, - ), - ]) - dev_silver_nonreplicated = vsphere.VmStoragePolicy("devSilverNonreplicated", - description="dev_silver_nonreplicated", - tag_rules=[ - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["environment"]["name"], - tags=[data["vsphere_tag"]["development"]["name"]], - include_datastores_with_tags=True, - ), - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["service_level"]["name"], - tags=[data["vsphere_tag"]["silver"]["name"]], - include_datastores_with_tags=True, - ), - vsphere.VmStoragePolicyTagRuleArgs( - tag_category=data["vsphere_tag_category"]["replication"]["name"], - tags=[data["vsphere_tag"]["non_replicated"]["name"]], - include_datastores_with_tags=True, - ), - ]) - ``` - - Lasttly, when creating a virtual machine resource, a storage policy can be specificed to direct virtual machine placement to a datastore which matches the policy's `tags_rules`. - - ```python - import pulumi - import pulumi_vsphere as vsphere - - prod_platinum_replicated = vsphere.get_policy(name="prod_platinum_replicated") - dev_silver_nonreplicated = vsphere.get_policy(name="dev_silver_nonreplicated") - prod_vm = vsphere.VirtualMachine("prodVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["prod_platinum_replicated"]["id"]) - # ... other configuration ... - dev_vm = vsphere.VirtualMachine("devVm", storage_policy_id=data["vsphere_storage_policy"]["storage_policy"]["dev_silver_nonreplicated"]["id"]) - # ... other configuration ... - ``` - :param str resource_name: The name of the resource. :param VmStoragePolicyArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumi_vsphere/vmfs_datastore.py b/sdk/python/pulumi_vsphere/vmfs_datastore.py index 996bead0..7985fc4d 100644 --- a/sdk/python/pulumi_vsphere/vmfs_datastore.py +++ b/sdk/python/pulumi_vsphere/vmfs_datastore.py @@ -64,14 +64,26 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - disks: pulumi.Input[Sequence[pulumi.Input[str]]], - host_system_id: pulumi.Input[str], + 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): + 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: @@ -281,7 +293,23 @@ def _configure( 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): + 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: _setter("accessible", accessible) if capacity is not None: diff --git a/sdk/python/pulumi_vsphere/vnic.py b/sdk/python/pulumi_vsphere/vnic.py index b3d2f25b..65134868 100644 --- a/sdk/python/pulumi_vsphere/vnic.py +++ b/sdk/python/pulumi_vsphere/vnic.py @@ -55,7 +55,7 @@ def __init__(__self__, *, @staticmethod def _configure( _setter: Callable[[Any, Any], None], - host: pulumi.Input[str], + 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, @@ -65,7 +65,15 @@ def _configure( 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): + 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: _setter("distributed_port_group", distributed_port_group) @@ -259,7 +267,13 @@ def _configure( 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): + 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: _setter("distributed_port_group", distributed_port_group) if distributed_switch_port is not None: @@ -424,76 +438,6 @@ def __init__(__self__, ## Example Usage ### S - ### Create a vnic attached to a distributed virtual switch using the vmotion TCP/IP stack - - ```python - import pulumi - import pulumi_vsphere as vsphere - - dc = vsphere.get_datacenter(name="mydc") - h1 = vsphere.get_host(name="esxi1.host.test", - datacenter_id=dc.id) - d1 = vsphere.DistributedVirtualSwitch("d1", - datacenter_id=dc.id, - hosts=[vsphere.DistributedVirtualSwitchHostArgs( - host_system_id=h1.id, - devices=["vnic3"], - )]) - p1 = vsphere.DistributedPortGroup("p1", - vlan_id=1234, - distributed_virtual_switch_uuid=d1.id) - v1 = vsphere.Vnic("v1", - host=h1.id, - distributed_switch_port=d1.id, - distributed_port_group=p1.id, - ipv4=vsphere.VnicIpv4Args( - dhcp=True, - ), - netstack="vmotion") - ``` - ### Create a vnic attached to a portgroup using the default TCP/IP stack - - ```python - import pulumi - import pulumi_vsphere as vsphere - - dc = vsphere.get_datacenter(name="mydc") - h1 = vsphere.get_host(name="esxi1.host.test", - datacenter_id=dc.id) - hvs1 = vsphere.HostVirtualSwitch("hvs1", - host_system_id=h1.id, - network_adapters=[ - "vmnic3", - "vmnic4", - ], - active_nics=["vmnic3"], - standby_nics=["vmnic4"]) - p1 = vsphere.HostPortGroup("p1", - virtual_switch_name=hvs1.name, - host_system_id=h1.id) - v1 = vsphere.Vnic("v1", - host=h1.id, - portgroup=p1.name, - ipv4=vsphere.VnicIpv4Args( - dhcp=True, - ), - services=[ - "vsan", - "management", - ]) - ``` - ## Importing - - An existing vNic can be [imported][docs-import] into this resource - via supplying the vNic's ID. An example is below: - - [docs-import]: /docs/import/index.html - - ```python - import pulumi - ``` - - The above would import the vnic `vmk2` from host with ID `host-123`. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. @@ -520,76 +464,6 @@ def __init__(__self__, ## Example Usage ### S - ### Create a vnic attached to a distributed virtual switch using the vmotion TCP/IP stack - - ```python - import pulumi - import pulumi_vsphere as vsphere - - dc = vsphere.get_datacenter(name="mydc") - h1 = vsphere.get_host(name="esxi1.host.test", - datacenter_id=dc.id) - d1 = vsphere.DistributedVirtualSwitch("d1", - datacenter_id=dc.id, - hosts=[vsphere.DistributedVirtualSwitchHostArgs( - host_system_id=h1.id, - devices=["vnic3"], - )]) - p1 = vsphere.DistributedPortGroup("p1", - vlan_id=1234, - distributed_virtual_switch_uuid=d1.id) - v1 = vsphere.Vnic("v1", - host=h1.id, - distributed_switch_port=d1.id, - distributed_port_group=p1.id, - ipv4=vsphere.VnicIpv4Args( - dhcp=True, - ), - netstack="vmotion") - ``` - ### Create a vnic attached to a portgroup using the default TCP/IP stack - - ```python - import pulumi - import pulumi_vsphere as vsphere - - dc = vsphere.get_datacenter(name="mydc") - h1 = vsphere.get_host(name="esxi1.host.test", - datacenter_id=dc.id) - hvs1 = vsphere.HostVirtualSwitch("hvs1", - host_system_id=h1.id, - network_adapters=[ - "vmnic3", - "vmnic4", - ], - active_nics=["vmnic3"], - standby_nics=["vmnic4"]) - p1 = vsphere.HostPortGroup("p1", - virtual_switch_name=hvs1.name, - host_system_id=h1.id) - v1 = vsphere.Vnic("v1", - host=h1.id, - portgroup=p1.name, - ipv4=vsphere.VnicIpv4Args( - dhcp=True, - ), - services=[ - "vsan", - "management", - ]) - ``` - ## Importing - - An existing vNic can be [imported][docs-import] into this resource - via supplying the vNic's ID. An example is below: - - [docs-import]: /docs/import/index.html - - ```python - import pulumi - ``` - - The above would import the vnic `vmk2` from host with ID `host-123`. :param str resource_name: The name of the resource. :param VnicArgs args: The arguments to use to populate this resource's properties. @@ -634,17 +508,9 @@ 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) + ipv4 = _utilities.configure(ipv4, VnicIpv4Args, True) __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) + ipv6 = _utilities.configure(ipv6, VnicIpv6Args, True) __props__.__dict__["ipv6"] = ipv6 __props__.__dict__["mac"] = mac __props__.__dict__["mtu"] = mtu