diff --git a/sdk/dotnet/GetComputeCluster.cs b/sdk/dotnet/GetComputeCluster.cs index b9679c84..b8c4fe71 100644 --- a/sdk/dotnet/GetComputeCluster.cs +++ b/sdk/dotnet/GetComputeCluster.cs @@ -86,6 +86,44 @@ public static Task InvokeAsync(GetComputeClusterArgs ar /// public static Output Invoke(GetComputeClusterInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getComputeCluster:getComputeCluster", args ?? new GetComputeClusterInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.ComputeCluster` data source can be used to discover the ID of a + /// cluster in vSphere. This is useful to fetch the ID of a cluster that you want + /// to use for virtual machine placement via the `vsphere.VirtualMachine` resource, allowing to specify the cluster's root resource pool directly versus + /// using the alias available through the `vsphere.ResourcePool` + /// data source. + /// + /// > 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 + /// + /// ```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), + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetComputeClusterInvokeArgs args, InvokeOutputOptions options) + => 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 22f1dcbf..245fd944 100644 --- a/sdk/dotnet/GetComputeClusterHostGroup.cs +++ b/sdk/dotnet/GetComputeClusterHostGroup.cs @@ -102,6 +102,52 @@ public static Task InvokeAsync(GetComputeClust /// public static Output Invoke(GetComputeClusterHostGroupInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getComputeClusterHostGroup:getComputeClusterHostGroup", args ?? new GetComputeClusterHostGroupInvokeArgs(), options.WithDefaults()); + + /// + /// 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 + /// + /// ```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 hostGroup = VSphere.GetComputeClusterHostGroup.Invoke(new() + /// { + /// Name = "hostgroup-01", + /// ComputeClusterId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.Id), + /// }); + /// + /// var hostRule = new VSphere.ComputeClusterVmHostRule("host_rule", new() + /// { + /// ComputeClusterId = cluster.Apply(getComputeClusterResult => getComputeClusterResult.Id), + /// Name = "pulumi-host-rule1", + /// VmGroupName = "vmgroup-01", + /// AffinityHostGroupName = hostGroup.Apply(getComputeClusterHostGroupResult => getComputeClusterHostGroupResult.Name), + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetComputeClusterHostGroupInvokeArgs args, InvokeOutputOptions options) + => 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 0fbb7c7d..32e947d2 100644 --- a/sdk/dotnet/GetContentLibrary.cs +++ b/sdk/dotnet/GetContentLibrary.cs @@ -66,6 +66,34 @@ public static Task InvokeAsync(GetContentLibraryArgs ar /// public static Output Invoke(GetContentLibraryInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getContentLibrary:getContentLibrary", args ?? new GetContentLibraryInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.ContentLibrary` data source can be used to discover the ID of a + /// content library. + /// + /// > **NOTE:** This resource requires vCenter and is not available on direct ESXi + /// host connections. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using VSphere = Pulumi.VSphere; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var contentLibrary = VSphere.GetContentLibrary.Invoke(new() + /// { + /// Name = "Content Library", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetContentLibraryInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getContentLibrary:getContentLibrary", args ?? new GetContentLibraryInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetContentLibraryItem.cs b/sdk/dotnet/GetContentLibraryItem.cs index a4bf9f0c..e5a77265 100644 --- a/sdk/dotnet/GetContentLibraryItem.cs +++ b/sdk/dotnet/GetContentLibraryItem.cs @@ -30,6 +30,16 @@ public static Task InvokeAsync(GetContentLibraryIte /// public static Output Invoke(GetContentLibraryItemInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getContentLibraryItem:getContentLibraryItem", args ?? new GetContentLibraryItemInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.ContentLibraryItem` data source can be used to discover the ID + /// of a content library item. + /// + /// > **NOTE:** This resource requires vCenter and is not available on direct ESXi + /// host connections. + /// + public static Output Invoke(GetContentLibraryItemInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getContentLibraryItem:getContentLibraryItem", args ?? new GetContentLibraryItemInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetCustomAttribute.cs b/sdk/dotnet/GetCustomAttribute.cs index c3883ee7..6cff0ce8 100644 --- a/sdk/dotnet/GetCustomAttribute.cs +++ b/sdk/dotnet/GetCustomAttribute.cs @@ -72,6 +72,37 @@ public static Task InvokeAsync(GetCustomAttributeArgs /// public static Output Invoke(GetCustomAttributeInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getCustomAttribute:getCustomAttribute", args ?? new GetCustomAttributeInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.CustomAttribute` data source can be used to reference custom + /// attributes that are not managed by this provider. Its attributes are exactly the + /// same as the `vsphere.CustomAttribute` resource, + /// and, like importing, the data source takes a name argument for the search. The + /// `id` and other attributes are then populated with the data found by the search. + /// + /// > **NOTE:** Custom attributes are unsupported on direct ESXi host connections + /// and require vCenter Server. + /// + /// ## Example Usage + /// + /// ```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", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetCustomAttributeInvokeArgs args, InvokeOutputOptions options) + => 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 58cff292..288b73f9 100644 --- a/sdk/dotnet/GetDatacenter.cs +++ b/sdk/dotnet/GetDatacenter.cs @@ -64,6 +64,33 @@ public static Task InvokeAsync(GetDatacenterArgs? args = nu /// public static Output Invoke(GetDatacenterInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDatacenter:getDatacenter", args ?? new GetDatacenterInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.Datacenter` data source can be used to discover the ID of a + /// 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 + /// + /// ```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", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetDatacenterInvokeArgs args, InvokeOutputOptions options) + => 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 2a745bc9..2a982f01 100644 --- a/sdk/dotnet/GetDatastore.cs +++ b/sdk/dotnet/GetDatastore.cs @@ -78,6 +78,40 @@ public static Task InvokeAsync(GetDatastoreArgs args, Invoke /// public static Output Invoke(GetDatastoreInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDatastore:getDatastore", args ?? new GetDatastoreInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.getDatastore` data source can be used to discover the ID of a + /// 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 + /// + /// ```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), + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetDatastoreInvokeArgs args, InvokeOutputOptions options) + => 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 35a9597f..cda6e840 100644 --- a/sdk/dotnet/GetDatastoreCluster.cs +++ b/sdk/dotnet/GetDatastoreCluster.cs @@ -76,6 +76,39 @@ public static Task InvokeAsync(GetDatastoreClusterArg /// public static Output Invoke(GetDatastoreClusterInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDatastoreCluster:getDatastoreCluster", args ?? new GetDatastoreClusterInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.DatastoreCluster` data source can be used to discover the ID of a + /// 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 + /// + /// ```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), + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetDatastoreClusterInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDatastoreCluster:getDatastoreCluster", args ?? new GetDatastoreClusterInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetDatastoreStats.cs b/sdk/dotnet/GetDatastoreStats.cs index 6d449fd6..fb41d100 100644 --- a/sdk/dotnet/GetDatastoreStats.cs +++ b/sdk/dotnet/GetDatastoreStats.cs @@ -118,6 +118,60 @@ public static Task InvokeAsync(GetDatastoreStatsArgs ar /// public static Output Invoke(GetDatastoreStatsInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDatastoreStats:getDatastoreStats", args ?? new GetDatastoreStatsInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.getDatastoreStats` data source can be used to retrieve the usage + /// stats of all vSphere datastore objects in a datacenter. This can then be used as + /// a standalone data source to get information required as input to other data + /// sources. + /// + /// ## Example Usage + /// + /// ```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 datastoreStats = VSphere.GetDatastoreStats.Invoke(new() + /// { + /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), + /// }); + /// + /// }); + /// ``` + /// + /// A useful example of this data source would be to determine the datastore with + /// the most free space. For example, in addition to the above: + /// + /// Create an `outputs.tf` like that: + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// + /// return await Deployment.RunAsync(() => + /// { + /// return new Dictionary<string, object?> + /// { + /// ["maxFreeSpaceName"] = theirMaxFreeSpaceName, + /// ["maxFreeSpace"] = theirMaxFreeSpace, + /// }; + /// }); + /// ``` + /// + /// and a `locals.tf` like that: + /// + public static Output Invoke(GetDatastoreStatsInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDatastoreStats:getDatastoreStats", args ?? new GetDatastoreStatsInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetDistributedVirtualSwitch.cs b/sdk/dotnet/GetDistributedVirtualSwitch.cs index 68a902f2..aa66365f 100644 --- a/sdk/dotnet/GetDistributedVirtualSwitch.cs +++ b/sdk/dotnet/GetDistributedVirtualSwitch.cs @@ -122,6 +122,62 @@ public static Task InvokeAsync(GetDistributed /// public static Output Invoke(GetDistributedVirtualSwitchInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDistributedVirtualSwitch:getDistributedVirtualSwitch", args ?? new GetDistributedVirtualSwitchInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.DistributedVirtualSwitch` data source can be used to discover + /// the ID and uplink data of a of a vSphere distributed switch (VDS). This + /// can then be used with resources or data sources that require a VDS, such as the + /// `vsphere.DistributedPortGroup` resource, for which + /// an example is shown below. + /// + /// > **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. + /// + /// ```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() + /// { + /// Name = "dvpg-01", + /// DistributedVirtualSwitchUuid = vds.Apply(getDistributedVirtualSwitchResult => getDistributedVirtualSwitchResult.Id), + /// ActiveUplinks = new[] + /// { + /// vds.Apply(getDistributedVirtualSwitchResult => getDistributedVirtualSwitchResult.Uplinks[0]), + /// }, + /// StandbyUplinks = new[] + /// { + /// vds.Apply(getDistributedVirtualSwitchResult => getDistributedVirtualSwitchResult.Uplinks[1]), + /// }, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetDistributedVirtualSwitchInvokeArgs args, InvokeOutputOptions options) + => 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 a70d885c..e354514d 100644 --- a/sdk/dotnet/GetDynamic.cs +++ b/sdk/dotnet/GetDynamic.cs @@ -114,6 +114,58 @@ public static Task InvokeAsync(GetDynamicArgs args, InvokeOpti /// public static Output Invoke(GetDynamicInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getDynamic:getDynamic", args ?? new GetDynamicInvokeArgs(), options.WithDefaults()); + + /// + /// [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider + /// + /// 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 + /// + /// ```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 = cat.Id, + /// }); + /// + /// var tag2 = VSphere.GetTag.Invoke(new() + /// { + /// Name = "SecondTag", + /// CategoryId = cat.Id, + /// }); + /// + /// var dyn = VSphere.GetDynamic.Invoke(new() + /// { + /// Filters = new[] + /// { + /// tag1.Apply(getTagResult => getTagResult.Id), + /// tag1.Apply(getTagResult => getTagResult.Id), + /// }, + /// NameRegex = "ubuntu", + /// Type = "Datacenter", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetDynamicInvokeArgs args, InvokeOutputOptions options) + => 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 9b386aea..9f1d3d45 100644 --- a/sdk/dotnet/GetFolder.cs +++ b/sdk/dotnet/GetFolder.cs @@ -68,6 +68,35 @@ public static Task InvokeAsync(GetFolderArgs args, InvokeOption /// public static Output Invoke(GetFolderInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getFolder:getFolder", args ?? new GetFolderInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.Folder` data source can be used to get the general attributes of a + /// vSphere inventory folder. The data source supports creating folders of the 5 + /// major types - datacenter folders, host and cluster folders, virtual machine + /// folders, storage folders, and network folders. + /// + /// Paths are absolute and must include the datacenter. + /// + /// ## Example Usage + /// + /// ```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", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetFolderInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getFolder:getFolder", args ?? new GetFolderInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetGuestOsCustomization.cs b/sdk/dotnet/GetGuestOsCustomization.cs index 16203b43..552caf58 100644 --- a/sdk/dotnet/GetGuestOsCustomization.cs +++ b/sdk/dotnet/GetGuestOsCustomization.cs @@ -24,6 +24,13 @@ public static Task InvokeAsync(GetGuestOsCustomiz /// public static Output Invoke(GetGuestOsCustomizationInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getGuestOsCustomization:getGuestOsCustomization", args ?? new GetGuestOsCustomizationInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.GuestOsCustomization` data source can be used to discover the + /// details about a customization specification for a guest operating system. + /// + public static Output Invoke(GetGuestOsCustomizationInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getGuestOsCustomization:getGuestOsCustomization", args ?? new GetGuestOsCustomizationInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetHost.cs b/sdk/dotnet/GetHost.cs index c5194eef..f6a33e98 100644 --- a/sdk/dotnet/GetHost.cs +++ b/sdk/dotnet/GetHost.cs @@ -74,6 +74,38 @@ public static Task InvokeAsync(GetHostArgs args, InvokeOptions? o /// public static Output Invoke(GetHostInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHost:getHost", args ?? new GetHostInvokeArgs(), options.WithDefaults()); + + /// + /// 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 + /// + /// ```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), + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetHostInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHost:getHost", args ?? new GetHostInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetHostBaseImages.cs b/sdk/dotnet/GetHostBaseImages.cs index fe865f4a..0cea4a0a 100644 --- a/sdk/dotnet/GetHostBaseImages.cs +++ b/sdk/dotnet/GetHostBaseImages.cs @@ -54,6 +54,28 @@ public static Task InvokeAsync(InvokeOptions? options = /// public static Output Invoke(InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHostBaseImages:getHostBaseImages", InvokeArgs.Empty, options.WithDefaults()); + + /// + /// The `vsphere.getHostBaseImages` data source can be used to get the list of ESXi + /// base images available for cluster software management. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using VSphere = Pulumi.VSphere; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var baseImages = VSphere.GetHostBaseImages.Invoke(); + /// + /// }); + /// ``` + /// + public static Output Invoke(InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHostBaseImages:getHostBaseImages", InvokeArgs.Empty, options.WithDefaults()); } diff --git a/sdk/dotnet/GetHostPciDevice.cs b/sdk/dotnet/GetHostPciDevice.cs index 223cd674..4399caff 100644 --- a/sdk/dotnet/GetHostPciDevice.cs +++ b/sdk/dotnet/GetHostPciDevice.cs @@ -154,6 +154,78 @@ public static Task InvokeAsync(GetHostPciDeviceArgs args /// public static Output Invoke(GetHostPciDeviceInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHostPciDevice:getHostPciDevice", args ?? new GetHostPciDeviceInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.getHostPciDevice` data source can be used to discover the device ID + /// of a vSphere host's PCI device. This can then be used with + /// `vsphere.VirtualMachine`'s `pci_device_id`. + /// + /// ## Example Usage + /// + /// ### 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", + /// }); + /// + /// }); + /// ``` + /// + /// + /// ### With Name Regular Expression + /// + /// ```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), + /// NameRegex = "MMC", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetHostPciDeviceInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHostPciDevice:getHostPciDevice", args ?? new GetHostPciDeviceInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetHostThumbprint.cs b/sdk/dotnet/GetHostThumbprint.cs index d55ff386..6da651ac 100644 --- a/sdk/dotnet/GetHostThumbprint.cs +++ b/sdk/dotnet/GetHostThumbprint.cs @@ -74,6 +74,38 @@ public static Task InvokeAsync(GetHostThumbprintArgs ar /// public static Output Invoke(GetHostThumbprintInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHostThumbprint:getHostThumbprint", args ?? new GetHostThumbprintInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere_thumbprint` data source can be used to discover the host thumbprint + /// of an ESXi host. This can be used when adding the `vsphere.Host` resource to a + /// cluster or a vCenter Server instance. + /// + /// * If the ESXi host is using a certificate chain, the first one returned will be + /// used to generate the thumbprint. + /// + /// * If the ESXi host has a certificate issued by a certificate authority, ensure + /// that the the certificate authority is trusted on the system running the plan. + /// + /// ## Example Usage + /// + /// ```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", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetHostThumbprintInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHostThumbprint:getHostThumbprint", args ?? new GetHostThumbprintInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetHostVgpuProfile.cs b/sdk/dotnet/GetHostVgpuProfile.cs index 6c448318..76fcebbd 100644 --- a/sdk/dotnet/GetHostVgpuProfile.cs +++ b/sdk/dotnet/GetHostVgpuProfile.cs @@ -148,6 +148,75 @@ public static Task InvokeAsync(GetHostVgpuProfileArgs /// public static Output Invoke(GetHostVgpuProfileInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHostVgpuProfile:getHostVgpuProfile", args ?? new GetHostVgpuProfileInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.getHostVgpuProfile` data source can be used to discover the + /// available vGPU profiles of a vSphere host. + /// + /// ## Example Usage + /// + /// ### To Return All VGPU Profiles + /// + /// ```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 vgpuProfile = VSphere.GetHostVgpuProfile.Invoke(new() + /// { + /// HostId = host.Apply(getHostResult => getHostResult.Id), + /// }); + /// + /// }); + /// ``` + /// + /// + /// ### With VGPU Profile Name_regex + /// + /// ```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 vgpuProfile = VSphere.GetHostVgpuProfile.Invoke(new() + /// { + /// HostId = host.Apply(getHostResult => getHostResult.Id), + /// NameRegex = "a100", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetHostVgpuProfileInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getHostVgpuProfile:getHostVgpuProfile", args ?? new GetHostVgpuProfileInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetLicense.cs b/sdk/dotnet/GetLicense.cs index 86bba08f..c78edfe2 100644 --- a/sdk/dotnet/GetLicense.cs +++ b/sdk/dotnet/GetLicense.cs @@ -60,6 +60,31 @@ public static Task InvokeAsync(GetLicenseArgs args, InvokeOpti /// public static Output Invoke(GetLicenseInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getLicense:getLicense", args ?? new GetLicenseInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.License` data source can be used to get the general attributes of + /// a license keys from a vCenter Server instance. + /// + /// ## Example Usage + /// + /// ```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", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetLicenseInvokeArgs args, InvokeOutputOptions options) + => 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 3d25bde4..4d18db05 100644 --- a/sdk/dotnet/GetNetwork.cs +++ b/sdk/dotnet/GetNetwork.cs @@ -142,6 +142,72 @@ public static Task InvokeAsync(GetNetworkArgs args, InvokeOpti /// public static Output Invoke(GetNetworkInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getNetwork:getNetwork", args ?? new GetNetworkInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.getNetwork` data source can be used to discover the ID of a network in + /// vSphere. This can be any network that can be used as the backing for a 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 + /// + /// ```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), + /// }); + /// + /// }); + /// ``` + /// + /// + /// ### Additional Examples + /// + /// ```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 myPortGroup = VSphere.GetNetwork.Invoke(new() + /// { + /// DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id), + /// Name = "VM Network", + /// Filters = new[] + /// { + /// new VSphere.Inputs.GetNetworkFilterInputArgs + /// { + /// NetworkType = "Network", + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetNetworkInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getNetwork:getNetwork", args ?? new GetNetworkInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetOvfVmTemplate.cs b/sdk/dotnet/GetOvfVmTemplate.cs index e2b2764b..c038c77d 100644 --- a/sdk/dotnet/GetOvfVmTemplate.cs +++ b/sdk/dotnet/GetOvfVmTemplate.cs @@ -26,6 +26,14 @@ public static Task InvokeAsync(GetOvfVmTemplateArgs args /// public static Output Invoke(GetOvfVmTemplateInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getOvfVmTemplate:getOvfVmTemplate", args ?? new GetOvfVmTemplateInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.getOvfVmTemplate` data source can be used to submit an OVF to + /// vSphere and extract its hardware settings in a form that can be then used as + /// inputs for a `vsphere.VirtualMachine` resource. + /// + public static Output Invoke(GetOvfVmTemplateInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getOvfVmTemplate:getOvfVmTemplate", args ?? new GetOvfVmTemplateInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/GetPolicy.cs b/sdk/dotnet/GetPolicy.cs index 41125931..31739df6 100644 --- a/sdk/dotnet/GetPolicy.cs +++ b/sdk/dotnet/GetPolicy.cs @@ -78,6 +78,40 @@ public static Task InvokeAsync(GetPolicyArgs args, InvokeOption /// public static Output Invoke(GetPolicyInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getPolicy:getPolicy", args ?? new GetPolicyInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.getPolicy` data source can be used to discover the UUID of a + /// storage policy. This can then be used with other resources or data sources that + /// use a storage policy. + /// + /// > **NOTE:** Storage policies are not supported on direct ESXi hosts and + /// requires vCenter Server. + /// + /// ## Example Usage + /// + /// ```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", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetPolicyInvokeArgs args, InvokeOutputOptions options) + => 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 4c78f09b..f452456c 100644 --- a/sdk/dotnet/GetResourcePool.cs +++ b/sdk/dotnet/GetResourcePool.cs @@ -142,6 +142,72 @@ public static Task InvokeAsync(GetResourcePoolArgs? args /// public static Output Invoke(GetResourcePoolInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getResourcePool:getResourcePool", args ?? new GetResourcePoolInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.ResourcePool` data source can be used to discover the ID of a + /// 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 + /// + /// ```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), + /// }); + /// + /// }); + /// ``` + /// + /// ### 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 = 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/8.0/vsphere-resource-management/GUID-60077B40-66FF-4625-934A-641703ED7601.html + /// + public static Output Invoke(GetResourcePoolInvokeArgs args, InvokeOutputOptions options) + => 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 bc56a359..99e39838 100644 --- a/sdk/dotnet/GetRole.cs +++ b/sdk/dotnet/GetRole.cs @@ -60,6 +60,31 @@ public static Task InvokeAsync(GetRoleArgs args, InvokeOptions? o /// public static Output Invoke(GetRoleInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getRole:getRole", args ?? new GetRoleInvokeArgs(), options.WithDefaults()); + + /// + /// 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 + /// + /// ```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", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetRoleInvokeArgs args, InvokeOutputOptions options) + => 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 a5211527..03ee3dfd 100644 --- a/sdk/dotnet/GetTag.cs +++ b/sdk/dotnet/GetTag.cs @@ -84,6 +84,43 @@ public static Task InvokeAsync(GetTagArgs args, InvokeOptions? opt /// public static Output Invoke(GetTagInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getTag:getTag", args ?? new GetTagInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.Tag` data source can be used to reference tags that are not + /// managed by this provider. Its attributes are exactly the same as the `vsphere.Tag` + /// resource, and, like importing, the data source takes a name and + /// category to search on. The `id` and other attributes are then populated with + /// the data found by the search. + /// + /// > **NOTE:** Tagging is not supported on direct ESXi hosts connections and + /// requires vCenter Server. + /// + /// ## Example Usage + /// + /// ```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), + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetTagInvokeArgs args, InvokeOutputOptions options) + => 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 a8b10547..730255a5 100644 --- a/sdk/dotnet/GetTagCategory.cs +++ b/sdk/dotnet/GetTagCategory.cs @@ -72,6 +72,37 @@ public static Task InvokeAsync(GetTagCategoryArgs args, In /// public static Output Invoke(GetTagCategoryInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getTagCategory:getTagCategory", args ?? new GetTagCategoryInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.TagCategory` data source can be used to reference tag categories + /// that are not managed by this provider. Its attributes are the same as the + /// `vsphere.TagCategory` resource, and, like importing, + /// the data source uses a name and category as search criteria. The `id` and other + /// attributes are populated with the data found by the search. + /// + /// > **NOTE:** Tagging is not supported on direct ESXi hosts connections and + /// requires vCenter Server. + /// + /// ## Example Usage + /// + /// ```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", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetTagCategoryInvokeArgs args, InvokeOutputOptions options) + => 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 536975f4..555c1358 100644 --- a/sdk/dotnet/GetVappContainer.cs +++ b/sdk/dotnet/GetVappContainer.cs @@ -76,6 +76,39 @@ public static Task InvokeAsync(GetVappContainerArgs args /// public static Output Invoke(GetVappContainerInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getVappContainer:getVappContainer", args ?? new GetVappContainerInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.VappContainer` data source can be used to discover the ID of a + /// 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 + /// + /// ```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), + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetVappContainerInvokeArgs args, InvokeOutputOptions options) + => 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 18b75402..67efdc99 100644 --- a/sdk/dotnet/GetVirtualMachine.cs +++ b/sdk/dotnet/GetVirtualMachine.cs @@ -146,6 +146,74 @@ public static Task InvokeAsync(GetVirtualMachineArgs? a /// public static Output Invoke(GetVirtualMachineInvokeArgs? args = null, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getVirtualMachine:getVirtualMachine", args ?? new GetVirtualMachineInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.VirtualMachine` data source can be used to find the UUID of an + /// existing virtual machine or template. The most common purpose is for finding + /// 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`. + /// + /// ```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), + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetVirtualMachineInvokeArgs args, InvokeOutputOptions options) + => 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 6e927a83..89618287 100644 --- a/sdk/dotnet/GetVmfsDisks.cs +++ b/sdk/dotnet/GetVmfsDisks.cs @@ -92,6 +92,47 @@ public static Task InvokeAsync(GetVmfsDisksArgs args, Invoke /// public static Output Invoke(GetVmfsDisksInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getVmfsDisks:getVmfsDisks", args ?? new GetVmfsDisksInvokeArgs(), options.WithDefaults()); + + /// + /// The `vsphere.getVmfsDisks` data source can be used to discover the storage + /// 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 + /// + /// ```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", + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetVmfsDisksInvokeArgs args, InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("vsphere:index/getVmfsDisks:getVmfsDisks", args ?? new GetVmfsDisksInvokeArgs(), options.WithDefaults()); } diff --git a/sdk/dotnet/Utilities.cs b/sdk/dotnet/Utilities.cs index 174a2a8f..94db1ac0 100644 --- a/sdk/dotnet/Utilities.cs +++ b/sdk/dotnet/Utilities.cs @@ -56,6 +56,13 @@ static class Utilities return dst; } + public static global::Pulumi.InvokeOutputOptions WithDefaults(this global::Pulumi.InvokeOutputOptions? src) + { + var dst = src ?? new global::Pulumi.InvokeOutputOptions{}; + dst.Version = src?.Version ?? Version; + return dst; + } + private readonly static string version; public static string Version => version; diff --git a/sdk/go/vsphere/getComputeCluster.go b/sdk/go/vsphere/getComputeCluster.go index 4dbd405e..bfeaa954 100644 --- a/sdk/go/vsphere/getComputeCluster.go +++ b/sdk/go/vsphere/getComputeCluster.go @@ -87,21 +87,11 @@ type LookupComputeClusterResult struct { } func LookupComputeClusterOutput(ctx *pulumi.Context, args LookupComputeClusterOutputArgs, opts ...pulumi.InvokeOption) LookupComputeClusterResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupComputeClusterResultOutput, error) { args := v.(LookupComputeClusterArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupComputeClusterResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getComputeCluster:getComputeCluster", args, &rv, "", opts...) - if err != nil { - return LookupComputeClusterResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupComputeClusterResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupComputeClusterResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getComputeCluster:getComputeCluster", args, LookupComputeClusterResultOutput{}, options).(LookupComputeClusterResultOutput), nil }).(LookupComputeClusterResultOutput) } diff --git a/sdk/go/vsphere/getComputeClusterHostGroup.go b/sdk/go/vsphere/getComputeClusterHostGroup.go index 62d0a7d1..87f4ff24 100644 --- a/sdk/go/vsphere/getComputeClusterHostGroup.go +++ b/sdk/go/vsphere/getComputeClusterHostGroup.go @@ -97,21 +97,11 @@ type LookupComputeClusterHostGroupResult struct { } func LookupComputeClusterHostGroupOutput(ctx *pulumi.Context, args LookupComputeClusterHostGroupOutputArgs, opts ...pulumi.InvokeOption) LookupComputeClusterHostGroupResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupComputeClusterHostGroupResultOutput, error) { args := v.(LookupComputeClusterHostGroupArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupComputeClusterHostGroupResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getComputeClusterHostGroup:getComputeClusterHostGroup", args, &rv, "", opts...) - if err != nil { - return LookupComputeClusterHostGroupResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupComputeClusterHostGroupResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupComputeClusterHostGroupResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getComputeClusterHostGroup:getComputeClusterHostGroup", args, LookupComputeClusterHostGroupResultOutput{}, options).(LookupComputeClusterHostGroupResultOutput), nil }).(LookupComputeClusterHostGroupResultOutput) } diff --git a/sdk/go/vsphere/getContentLibrary.go b/sdk/go/vsphere/getContentLibrary.go index ebb2154c..71a2a7a0 100644 --- a/sdk/go/vsphere/getContentLibrary.go +++ b/sdk/go/vsphere/getContentLibrary.go @@ -66,21 +66,11 @@ type LookupContentLibraryResult struct { } func LookupContentLibraryOutput(ctx *pulumi.Context, args LookupContentLibraryOutputArgs, opts ...pulumi.InvokeOption) LookupContentLibraryResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupContentLibraryResultOutput, error) { args := v.(LookupContentLibraryArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupContentLibraryResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getContentLibrary:getContentLibrary", args, &rv, "", opts...) - if err != nil { - return LookupContentLibraryResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupContentLibraryResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupContentLibraryResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getContentLibrary:getContentLibrary", args, LookupContentLibraryResultOutput{}, options).(LookupContentLibraryResultOutput), nil }).(LookupContentLibraryResultOutput) } diff --git a/sdk/go/vsphere/getContentLibraryItem.go b/sdk/go/vsphere/getContentLibraryItem.go index 375d6c7f..879970ab 100644 --- a/sdk/go/vsphere/getContentLibraryItem.go +++ b/sdk/go/vsphere/getContentLibraryItem.go @@ -48,21 +48,11 @@ type LookupContentLibraryItemResult struct { } func LookupContentLibraryItemOutput(ctx *pulumi.Context, args LookupContentLibraryItemOutputArgs, opts ...pulumi.InvokeOption) LookupContentLibraryItemResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupContentLibraryItemResultOutput, error) { args := v.(LookupContentLibraryItemArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupContentLibraryItemResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getContentLibraryItem:getContentLibraryItem", args, &rv, "", opts...) - if err != nil { - return LookupContentLibraryItemResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupContentLibraryItemResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupContentLibraryItemResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getContentLibraryItem:getContentLibraryItem", args, LookupContentLibraryItemResultOutput{}, options).(LookupContentLibraryItemResultOutput), nil }).(LookupContentLibraryItemResultOutput) } diff --git a/sdk/go/vsphere/getCustomAttribute.go b/sdk/go/vsphere/getCustomAttribute.go index 624c292e..d4799e9d 100644 --- a/sdk/go/vsphere/getCustomAttribute.go +++ b/sdk/go/vsphere/getCustomAttribute.go @@ -70,21 +70,11 @@ type LookupCustomAttributeResult struct { } func LookupCustomAttributeOutput(ctx *pulumi.Context, args LookupCustomAttributeOutputArgs, opts ...pulumi.InvokeOption) LookupCustomAttributeResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupCustomAttributeResultOutput, error) { args := v.(LookupCustomAttributeArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupCustomAttributeResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getCustomAttribute:getCustomAttribute", args, &rv, "", opts...) - if err != nil { - return LookupCustomAttributeResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupCustomAttributeResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupCustomAttributeResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getCustomAttribute:getCustomAttribute", args, LookupCustomAttributeResultOutput{}, options).(LookupCustomAttributeResultOutput), nil }).(LookupCustomAttributeResultOutput) } diff --git a/sdk/go/vsphere/getDatacenter.go b/sdk/go/vsphere/getDatacenter.go index 8671619d..d667f05f 100644 --- a/sdk/go/vsphere/getDatacenter.go +++ b/sdk/go/vsphere/getDatacenter.go @@ -73,21 +73,11 @@ type LookupDatacenterResult struct { } func LookupDatacenterOutput(ctx *pulumi.Context, args LookupDatacenterOutputArgs, opts ...pulumi.InvokeOption) LookupDatacenterResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupDatacenterResultOutput, error) { args := v.(LookupDatacenterArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupDatacenterResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getDatacenter:getDatacenter", args, &rv, "", opts...) - if err != nil { - return LookupDatacenterResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupDatacenterResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupDatacenterResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getDatacenter:getDatacenter", args, LookupDatacenterResultOutput{}, options).(LookupDatacenterResultOutput), nil }).(LookupDatacenterResultOutput) } diff --git a/sdk/go/vsphere/getDatastore.go b/sdk/go/vsphere/getDatastore.go index 43557d1e..a989449d 100644 --- a/sdk/go/vsphere/getDatastore.go +++ b/sdk/go/vsphere/getDatastore.go @@ -86,21 +86,11 @@ type GetDatastoreResult struct { } func GetDatastoreOutput(ctx *pulumi.Context, args GetDatastoreOutputArgs, opts ...pulumi.InvokeOption) GetDatastoreResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetDatastoreResultOutput, error) { args := v.(GetDatastoreArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetDatastoreResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getDatastore:getDatastore", args, &rv, "", opts...) - if err != nil { - return GetDatastoreResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetDatastoreResultOutput) - if secret { - return pulumi.ToSecret(output).(GetDatastoreResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getDatastore:getDatastore", args, GetDatastoreResultOutput{}, options).(GetDatastoreResultOutput), nil }).(GetDatastoreResultOutput) } diff --git a/sdk/go/vsphere/getDatastoreCluster.go b/sdk/go/vsphere/getDatastoreCluster.go index c757a4ba..afb5b79d 100644 --- a/sdk/go/vsphere/getDatastoreCluster.go +++ b/sdk/go/vsphere/getDatastoreCluster.go @@ -82,21 +82,11 @@ type LookupDatastoreClusterResult struct { } func LookupDatastoreClusterOutput(ctx *pulumi.Context, args LookupDatastoreClusterOutputArgs, opts ...pulumi.InvokeOption) LookupDatastoreClusterResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupDatastoreClusterResultOutput, error) { args := v.(LookupDatastoreClusterArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupDatastoreClusterResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getDatastoreCluster:getDatastoreCluster", args, &rv, "", opts...) - if err != nil { - return LookupDatastoreClusterResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupDatastoreClusterResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupDatastoreClusterResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getDatastoreCluster:getDatastoreCluster", args, LookupDatastoreClusterResultOutput{}, options).(LookupDatastoreClusterResultOutput), nil }).(LookupDatastoreClusterResultOutput) } diff --git a/sdk/go/vsphere/getDatastoreStats.go b/sdk/go/vsphere/getDatastoreStats.go index 20aa769a..8b9f895f 100644 --- a/sdk/go/vsphere/getDatastoreStats.go +++ b/sdk/go/vsphere/getDatastoreStats.go @@ -118,21 +118,11 @@ type GetDatastoreStatsResult struct { } func GetDatastoreStatsOutput(ctx *pulumi.Context, args GetDatastoreStatsOutputArgs, opts ...pulumi.InvokeOption) GetDatastoreStatsResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetDatastoreStatsResultOutput, error) { args := v.(GetDatastoreStatsArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetDatastoreStatsResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getDatastoreStats:getDatastoreStats", args, &rv, "", opts...) - if err != nil { - return GetDatastoreStatsResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetDatastoreStatsResultOutput) - if secret { - return pulumi.ToSecret(output).(GetDatastoreStatsResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getDatastoreStats:getDatastoreStats", args, GetDatastoreStatsResultOutput{}, options).(GetDatastoreStatsResultOutput), nil }).(GetDatastoreStatsResultOutput) } diff --git a/sdk/go/vsphere/getDistributedVirtualSwitch.go b/sdk/go/vsphere/getDistributedVirtualSwitch.go index 88914214..cf50a9ed 100644 --- a/sdk/go/vsphere/getDistributedVirtualSwitch.go +++ b/sdk/go/vsphere/getDistributedVirtualSwitch.go @@ -105,21 +105,11 @@ type LookupDistributedVirtualSwitchResult struct { } func LookupDistributedVirtualSwitchOutput(ctx *pulumi.Context, args LookupDistributedVirtualSwitchOutputArgs, opts ...pulumi.InvokeOption) LookupDistributedVirtualSwitchResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupDistributedVirtualSwitchResultOutput, error) { args := v.(LookupDistributedVirtualSwitchArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupDistributedVirtualSwitchResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getDistributedVirtualSwitch:getDistributedVirtualSwitch", args, &rv, "", opts...) - if err != nil { - return LookupDistributedVirtualSwitchResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupDistributedVirtualSwitchResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupDistributedVirtualSwitchResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getDistributedVirtualSwitch:getDistributedVirtualSwitch", args, LookupDistributedVirtualSwitchResultOutput{}, options).(LookupDistributedVirtualSwitchResultOutput), nil }).(LookupDistributedVirtualSwitchResultOutput) } diff --git a/sdk/go/vsphere/getDynamic.go b/sdk/go/vsphere/getDynamic.go index 6c190974..403993a4 100644 --- a/sdk/go/vsphere/getDynamic.go +++ b/sdk/go/vsphere/getDynamic.go @@ -100,21 +100,11 @@ type GetDynamicResult struct { } func GetDynamicOutput(ctx *pulumi.Context, args GetDynamicOutputArgs, opts ...pulumi.InvokeOption) GetDynamicResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetDynamicResultOutput, error) { args := v.(GetDynamicArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetDynamicResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getDynamic:getDynamic", args, &rv, "", opts...) - if err != nil { - return GetDynamicResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetDynamicResultOutput) - if secret { - return pulumi.ToSecret(output).(GetDynamicResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getDynamic:getDynamic", args, GetDynamicResultOutput{}, options).(GetDynamicResultOutput), nil }).(GetDynamicResultOutput) } diff --git a/sdk/go/vsphere/getFolder.go b/sdk/go/vsphere/getFolder.go index 7dd6ed00..01cbe531 100644 --- a/sdk/go/vsphere/getFolder.go +++ b/sdk/go/vsphere/getFolder.go @@ -71,21 +71,11 @@ type LookupFolderResult struct { } func LookupFolderOutput(ctx *pulumi.Context, args LookupFolderOutputArgs, opts ...pulumi.InvokeOption) LookupFolderResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupFolderResultOutput, error) { args := v.(LookupFolderArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupFolderResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getFolder:getFolder", args, &rv, "", opts...) - if err != nil { - return LookupFolderResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupFolderResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupFolderResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getFolder:getFolder", args, LookupFolderResultOutput{}, options).(LookupFolderResultOutput), nil }).(LookupFolderResultOutput) } diff --git a/sdk/go/vsphere/getGuestOsCustomization.go b/sdk/go/vsphere/getGuestOsCustomization.go index 23217900..80728ca1 100644 --- a/sdk/go/vsphere/getGuestOsCustomization.go +++ b/sdk/go/vsphere/getGuestOsCustomization.go @@ -43,21 +43,11 @@ type LookupGuestOsCustomizationResult struct { } func LookupGuestOsCustomizationOutput(ctx *pulumi.Context, args LookupGuestOsCustomizationOutputArgs, opts ...pulumi.InvokeOption) LookupGuestOsCustomizationResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupGuestOsCustomizationResultOutput, error) { args := v.(LookupGuestOsCustomizationArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupGuestOsCustomizationResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getGuestOsCustomization:getGuestOsCustomization", args, &rv, "", opts...) - if err != nil { - return LookupGuestOsCustomizationResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupGuestOsCustomizationResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupGuestOsCustomizationResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getGuestOsCustomization:getGuestOsCustomization", args, LookupGuestOsCustomizationResultOutput{}, options).(LookupGuestOsCustomizationResultOutput), nil }).(LookupGuestOsCustomizationResultOutput) } diff --git a/sdk/go/vsphere/getHost.go b/sdk/go/vsphere/getHost.go index 59eea9b3..57869858 100644 --- a/sdk/go/vsphere/getHost.go +++ b/sdk/go/vsphere/getHost.go @@ -82,21 +82,11 @@ type LookupHostResult struct { } func LookupHostOutput(ctx *pulumi.Context, args LookupHostOutputArgs, opts ...pulumi.InvokeOption) LookupHostResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupHostResultOutput, error) { args := v.(LookupHostArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupHostResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getHost:getHost", args, &rv, "", opts...) - if err != nil { - return LookupHostResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupHostResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupHostResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getHost:getHost", args, LookupHostResultOutput{}, options).(LookupHostResultOutput), nil }).(LookupHostResultOutput) } diff --git a/sdk/go/vsphere/getHostBaseImages.go b/sdk/go/vsphere/getHostBaseImages.go index 524aa685..441d2d60 100644 --- a/sdk/go/vsphere/getHostBaseImages.go +++ b/sdk/go/vsphere/getHostBaseImages.go @@ -57,18 +57,8 @@ type GetHostBaseImagesResult struct { func GetHostBaseImagesOutput(ctx *pulumi.Context, opts ...pulumi.InvokeOption) GetHostBaseImagesResultOutput { return pulumi.ToOutput(0).ApplyT(func(int) (GetHostBaseImagesResultOutput, error) { - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetHostBaseImagesResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getHostBaseImages:getHostBaseImages", nil, &rv, "", opts...) - if err != nil { - return GetHostBaseImagesResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetHostBaseImagesResultOutput) - if secret { - return pulumi.ToSecret(output).(GetHostBaseImagesResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getHostBaseImages:getHostBaseImages", nil, GetHostBaseImagesResultOutput{}, options).(GetHostBaseImagesResultOutput), nil }).(GetHostBaseImagesResultOutput) } diff --git a/sdk/go/vsphere/getHostPciDevice.go b/sdk/go/vsphere/getHostPciDevice.go index e250a7e8..eeac07cc 100644 --- a/sdk/go/vsphere/getHostPciDevice.go +++ b/sdk/go/vsphere/getHostPciDevice.go @@ -138,21 +138,11 @@ type GetHostPciDeviceResult struct { } func GetHostPciDeviceOutput(ctx *pulumi.Context, args GetHostPciDeviceOutputArgs, opts ...pulumi.InvokeOption) GetHostPciDeviceResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetHostPciDeviceResultOutput, error) { args := v.(GetHostPciDeviceArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetHostPciDeviceResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getHostPciDevice:getHostPciDevice", args, &rv, "", opts...) - if err != nil { - return GetHostPciDeviceResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetHostPciDeviceResultOutput) - if secret { - return pulumi.ToSecret(output).(GetHostPciDeviceResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getHostPciDevice:getHostPciDevice", args, GetHostPciDeviceResultOutput{}, options).(GetHostPciDeviceResultOutput), nil }).(GetHostPciDeviceResultOutput) } diff --git a/sdk/go/vsphere/getHostThumbprint.go b/sdk/go/vsphere/getHostThumbprint.go index c4a5c36a..f323d1a8 100644 --- a/sdk/go/vsphere/getHostThumbprint.go +++ b/sdk/go/vsphere/getHostThumbprint.go @@ -77,21 +77,11 @@ type GetHostThumbprintResult struct { } func GetHostThumbprintOutput(ctx *pulumi.Context, args GetHostThumbprintOutputArgs, opts ...pulumi.InvokeOption) GetHostThumbprintResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetHostThumbprintResultOutput, error) { args := v.(GetHostThumbprintArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetHostThumbprintResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getHostThumbprint:getHostThumbprint", args, &rv, "", opts...) - if err != nil { - return GetHostThumbprintResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetHostThumbprintResultOutput) - if secret { - return pulumi.ToSecret(output).(GetHostThumbprintResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getHostThumbprint:getHostThumbprint", args, GetHostThumbprintResultOutput{}, options).(GetHostThumbprintResultOutput), nil }).(GetHostThumbprintResultOutput) } diff --git a/sdk/go/vsphere/getHostVgpuProfile.go b/sdk/go/vsphere/getHostVgpuProfile.go index 675c7d43..b82167fe 100644 --- a/sdk/go/vsphere/getHostVgpuProfile.go +++ b/sdk/go/vsphere/getHostVgpuProfile.go @@ -131,21 +131,11 @@ type GetHostVgpuProfileResult struct { } func GetHostVgpuProfileOutput(ctx *pulumi.Context, args GetHostVgpuProfileOutputArgs, opts ...pulumi.InvokeOption) GetHostVgpuProfileResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetHostVgpuProfileResultOutput, error) { args := v.(GetHostVgpuProfileArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetHostVgpuProfileResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getHostVgpuProfile:getHostVgpuProfile", args, &rv, "", opts...) - if err != nil { - return GetHostVgpuProfileResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetHostVgpuProfileResultOutput) - if secret { - return pulumi.ToSecret(output).(GetHostVgpuProfileResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getHostVgpuProfile:getHostVgpuProfile", args, GetHostVgpuProfileResultOutput{}, options).(GetHostVgpuProfileResultOutput), nil }).(GetHostVgpuProfileResultOutput) } diff --git a/sdk/go/vsphere/getLicense.go b/sdk/go/vsphere/getLicense.go index 4365a017..1c6078da 100644 --- a/sdk/go/vsphere/getLicense.go +++ b/sdk/go/vsphere/getLicense.go @@ -73,21 +73,11 @@ type LookupLicenseResult struct { } func LookupLicenseOutput(ctx *pulumi.Context, args LookupLicenseOutputArgs, opts ...pulumi.InvokeOption) LookupLicenseResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupLicenseResultOutput, error) { args := v.(LookupLicenseArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupLicenseResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getLicense:getLicense", args, &rv, "", opts...) - if err != nil { - return LookupLicenseResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupLicenseResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupLicenseResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getLicense:getLicense", args, LookupLicenseResultOutput{}, options).(LookupLicenseResultOutput), nil }).(LookupLicenseResultOutput) } diff --git a/sdk/go/vsphere/getNetwork.go b/sdk/go/vsphere/getNetwork.go index b2a72d83..a41b446d 100644 --- a/sdk/go/vsphere/getNetwork.go +++ b/sdk/go/vsphere/getNetwork.go @@ -131,21 +131,11 @@ type GetNetworkResult struct { } func GetNetworkOutput(ctx *pulumi.Context, args GetNetworkOutputArgs, opts ...pulumi.InvokeOption) GetNetworkResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetNetworkResultOutput, error) { args := v.(GetNetworkArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetNetworkResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getNetwork:getNetwork", args, &rv, "", opts...) - if err != nil { - return GetNetworkResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetNetworkResultOutput) - if secret { - return pulumi.ToSecret(output).(GetNetworkResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getNetwork:getNetwork", args, GetNetworkResultOutput{}, options).(GetNetworkResultOutput), nil }).(GetNetworkResultOutput) } diff --git a/sdk/go/vsphere/getOvfVmTemplate.go b/sdk/go/vsphere/getOvfVmTemplate.go index a88b5bac..d491f79e 100644 --- a/sdk/go/vsphere/getOvfVmTemplate.go +++ b/sdk/go/vsphere/getOvfVmTemplate.go @@ -128,21 +128,11 @@ type GetOvfVmTemplateResult struct { } func GetOvfVmTemplateOutput(ctx *pulumi.Context, args GetOvfVmTemplateOutputArgs, opts ...pulumi.InvokeOption) GetOvfVmTemplateResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetOvfVmTemplateResultOutput, error) { args := v.(GetOvfVmTemplateArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetOvfVmTemplateResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getOvfVmTemplate:getOvfVmTemplate", args, &rv, "", opts...) - if err != nil { - return GetOvfVmTemplateResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetOvfVmTemplateResultOutput) - if secret { - return pulumi.ToSecret(output).(GetOvfVmTemplateResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getOvfVmTemplate:getOvfVmTemplate", args, GetOvfVmTemplateResultOutput{}, options).(GetOvfVmTemplateResultOutput), nil }).(GetOvfVmTemplateResultOutput) } diff --git a/sdk/go/vsphere/getPolicy.go b/sdk/go/vsphere/getPolicy.go index fa835515..1b86f104 100644 --- a/sdk/go/vsphere/getPolicy.go +++ b/sdk/go/vsphere/getPolicy.go @@ -73,21 +73,11 @@ type GetPolicyResult struct { } func GetPolicyOutput(ctx *pulumi.Context, args GetPolicyOutputArgs, opts ...pulumi.InvokeOption) GetPolicyResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetPolicyResultOutput, error) { args := v.(GetPolicyArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetPolicyResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getPolicy:getPolicy", args, &rv, "", opts...) - if err != nil { - return GetPolicyResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetPolicyResultOutput) - if secret { - return pulumi.ToSecret(output).(GetPolicyResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getPolicy:getPolicy", args, GetPolicyResultOutput{}, options).(GetPolicyResultOutput), nil }).(GetPolicyResultOutput) } diff --git a/sdk/go/vsphere/getResourcePool.go b/sdk/go/vsphere/getResourcePool.go index 08659801..8efc3cad 100644 --- a/sdk/go/vsphere/getResourcePool.go +++ b/sdk/go/vsphere/getResourcePool.go @@ -125,21 +125,11 @@ type LookupResourcePoolResult struct { } func LookupResourcePoolOutput(ctx *pulumi.Context, args LookupResourcePoolOutputArgs, opts ...pulumi.InvokeOption) LookupResourcePoolResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupResourcePoolResultOutput, error) { args := v.(LookupResourcePoolArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupResourcePoolResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getResourcePool:getResourcePool", args, &rv, "", opts...) - if err != nil { - return LookupResourcePoolResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupResourcePoolResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupResourcePoolResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getResourcePool:getResourcePool", args, LookupResourcePoolResultOutput{}, options).(LookupResourcePoolResultOutput), nil }).(LookupResourcePoolResultOutput) } diff --git a/sdk/go/vsphere/getRole.go b/sdk/go/vsphere/getRole.go index 5d2f69ec..6fabcb68 100644 --- a/sdk/go/vsphere/getRole.go +++ b/sdk/go/vsphere/getRole.go @@ -74,21 +74,11 @@ type LookupRoleResult struct { } func LookupRoleOutput(ctx *pulumi.Context, args LookupRoleOutputArgs, opts ...pulumi.InvokeOption) LookupRoleResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupRoleResultOutput, error) { args := v.(LookupRoleArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupRoleResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getRole:getRole", args, &rv, "", opts...) - if err != nil { - return LookupRoleResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupRoleResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupRoleResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getRole:getRole", args, LookupRoleResultOutput{}, options).(LookupRoleResultOutput), nil }).(LookupRoleResultOutput) } diff --git a/sdk/go/vsphere/getTag.go b/sdk/go/vsphere/getTag.go index d9cf8153..931b907e 100644 --- a/sdk/go/vsphere/getTag.go +++ b/sdk/go/vsphere/getTag.go @@ -81,21 +81,11 @@ type LookupTagResult struct { } func LookupTagOutput(ctx *pulumi.Context, args LookupTagOutputArgs, opts ...pulumi.InvokeOption) LookupTagResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupTagResultOutput, error) { args := v.(LookupTagArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupTagResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getTag:getTag", args, &rv, "", opts...) - if err != nil { - return LookupTagResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupTagResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupTagResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getTag:getTag", args, LookupTagResultOutput{}, options).(LookupTagResultOutput), nil }).(LookupTagResultOutput) } diff --git a/sdk/go/vsphere/getTagCategory.go b/sdk/go/vsphere/getTagCategory.go index 9c53d1c5..4ebf01a9 100644 --- a/sdk/go/vsphere/getTagCategory.go +++ b/sdk/go/vsphere/getTagCategory.go @@ -72,21 +72,11 @@ type LookupTagCategoryResult struct { } func LookupTagCategoryOutput(ctx *pulumi.Context, args LookupTagCategoryOutputArgs, opts ...pulumi.InvokeOption) LookupTagCategoryResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupTagCategoryResultOutput, error) { args := v.(LookupTagCategoryArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupTagCategoryResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getTagCategory:getTagCategory", args, &rv, "", opts...) - if err != nil { - return LookupTagCategoryResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupTagCategoryResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupTagCategoryResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getTagCategory:getTagCategory", args, LookupTagCategoryResultOutput{}, options).(LookupTagCategoryResultOutput), nil }).(LookupTagCategoryResultOutput) } diff --git a/sdk/go/vsphere/getVappContainer.go b/sdk/go/vsphere/getVappContainer.go index 2653c49f..3bd4759a 100644 --- a/sdk/go/vsphere/getVappContainer.go +++ b/sdk/go/vsphere/getVappContainer.go @@ -77,21 +77,11 @@ type LookupVappContainerResult struct { } func LookupVappContainerOutput(ctx *pulumi.Context, args LookupVappContainerOutputArgs, opts ...pulumi.InvokeOption) LookupVappContainerResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVappContainerResultOutput, error) { args := v.(LookupVappContainerArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupVappContainerResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getVappContainer:getVappContainer", args, &rv, "", opts...) - if err != nil { - return LookupVappContainerResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupVappContainerResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupVappContainerResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getVappContainer:getVappContainer", args, LookupVappContainerResultOutput{}, options).(LookupVappContainerResultOutput), nil }).(LookupVappContainerResultOutput) } diff --git a/sdk/go/vsphere/getVirtualMachine.go b/sdk/go/vsphere/getVirtualMachine.go index 570e46dc..9c3b25f4 100644 --- a/sdk/go/vsphere/getVirtualMachine.go +++ b/sdk/go/vsphere/getVirtualMachine.go @@ -315,21 +315,11 @@ type LookupVirtualMachineResult struct { } func LookupVirtualMachineOutput(ctx *pulumi.Context, args LookupVirtualMachineOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualMachineResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVirtualMachineResultOutput, error) { args := v.(LookupVirtualMachineArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv LookupVirtualMachineResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getVirtualMachine:getVirtualMachine", args, &rv, "", opts...) - if err != nil { - return LookupVirtualMachineResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(LookupVirtualMachineResultOutput) - if secret { - return pulumi.ToSecret(output).(LookupVirtualMachineResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getVirtualMachine:getVirtualMachine", args, LookupVirtualMachineResultOutput{}, options).(LookupVirtualMachineResultOutput), nil }).(LookupVirtualMachineResultOutput) } diff --git a/sdk/go/vsphere/getVmfsDisks.go b/sdk/go/vsphere/getVmfsDisks.go index aa246c0d..10836a89 100644 --- a/sdk/go/vsphere/getVmfsDisks.go +++ b/sdk/go/vsphere/getVmfsDisks.go @@ -97,21 +97,11 @@ type GetVmfsDisksResult struct { } func GetVmfsDisksOutput(ctx *pulumi.Context, args GetVmfsDisksOutputArgs, opts ...pulumi.InvokeOption) GetVmfsDisksResultOutput { - return pulumi.ToOutputWithContext(context.Background(), args). + return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetVmfsDisksResultOutput, error) { args := v.(GetVmfsDisksArgs) - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetVmfsDisksResult - secret, err := ctx.InvokePackageRaw("vsphere:index/getVmfsDisks:getVmfsDisks", args, &rv, "", opts...) - if err != nil { - return GetVmfsDisksResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetVmfsDisksResultOutput) - if secret { - return pulumi.ToSecret(output).(GetVmfsDisksResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("vsphere:index/getVmfsDisks:getVmfsDisks", args, GetVmfsDisksResultOutput{}, options).(GetVmfsDisksResultOutput), nil }).(GetVmfsDisksResultOutput) } diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index c1364978..619c7656 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -44,7 +44,7 @@ repositories { dependencies { implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.gson:gson:2.8.9") - implementation("com.pulumi:pulumi:0.18.0") + implementation("com.pulumi:pulumi:0.20.0") } task sourcesJar(type: Jar) { diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/Utilities.java b/sdk/java/src/main/java/com/pulumi/vsphere/Utilities.java index c7c19a74..3d0946be 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/Utilities.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/Utilities.java @@ -14,6 +14,7 @@ import javax.annotation.Nullable; import com.pulumi.core.internal.Environment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; public class Utilities { @@ -57,16 +58,28 @@ public static Optional getEnvDouble(java.lang.String... names) return Optional.empty(); } - public static InvokeOptions withVersion(@Nullable InvokeOptions options) { - if (options != null && options.getVersion().isPresent()) { - return options; - } - return new InvokeOptions( - options == null ? null : options.getParent().orElse(null), - options == null ? null : options.getProvider().orElse(null), - getVersion() - ); + public static InvokeOptions withVersion(@Nullable InvokeOptions options) { + if (options != null && options.getVersion().isPresent()) { + return options; + } + return new InvokeOptions( + options == null ? null : options.getParent().orElse(null), + options == null ? null : options.getProvider().orElse(null), + getVersion() + ); + } + + public static InvokeOutputOptions withVersion(@Nullable InvokeOutputOptions options) { + if (options != null && options.getVersion().isPresent()) { + return options; } + return new InvokeOutputOptions( + options == null ? null : options.getParent().orElse(null), + options == null ? null : options.getProvider().orElse(null), + getVersion(), + options == null ? null : options.getDependsOn() + ); + } private static final java.lang.String version; public static java.lang.String getVersion() { diff --git a/sdk/java/src/main/java/com/pulumi/vsphere/VsphereFunctions.java b/sdk/java/src/main/java/com/pulumi/vsphere/VsphereFunctions.java index 4b60857b..5cca5268 100644 --- a/sdk/java/src/main/java/com/pulumi/vsphere/VsphereFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/vsphere/VsphereFunctions.java @@ -7,6 +7,7 @@ import com.pulumi.core.TypeShape; import com.pulumi.deployment.Deployment; import com.pulumi.deployment.InvokeOptions; +import com.pulumi.deployment.InvokeOutputOptions; import com.pulumi.resources.InvokeArgs; import com.pulumi.vsphere.Utilities; import com.pulumi.vsphere.inputs.GetComputeClusterArgs; @@ -265,6 +266,62 @@ public static CompletableFuture getComputeClusterPlain( public static Output getComputeCluster(GetComputeClusterArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getComputeCluster:getComputeCluster", TypeShape.of(GetComputeClusterResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.ComputeCluster` data source can be used to discover the ID of a + * cluster in vSphere. This is useful to fetch the ID of a cluster that you want + * to use for virtual machine placement via the `vsphere.VirtualMachine` resource, allowing to specify the cluster's root resource pool directly versus + * using the alias available through the `vsphere.ResourcePool` + * data source. + * + * > 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetComputeClusterArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var computeCluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()
+     *             .name("cluster-01")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getComputeCluster(GetComputeClusterArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getComputeCluster:getComputeCluster", TypeShape.of(GetComputeClusterResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.ComputeCluster` data source can be used to discover the ID of a * cluster in vSphere. This is useful to fetch the ID of a cluster that you want @@ -516,6 +573,71 @@ public static CompletableFuture getComputeClus public static Output getComputeClusterHostGroup(GetComputeClusterHostGroupArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getComputeClusterHostGroup:getComputeClusterHostGroup", TypeShape.of(GetComputeClusterHostGroupResult.class), args, Utilities.withVersion(options)); } + /** + * 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetComputeClusterArgs;
+     * import com.pulumi.vsphere.inputs.GetComputeClusterHostGroupArgs;
+     * import com.pulumi.vsphere.ComputeClusterVmHostRule;
+     * import com.pulumi.vsphere.ComputeClusterVmHostRuleArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var cluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()
+     *             .name("cluster-01")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *         final var hostGroup = VsphereFunctions.getComputeClusterHostGroup(GetComputeClusterHostGroupArgs.builder()
+     *             .name("hostgroup-01")
+     *             .computeClusterId(cluster.applyValue(getComputeClusterResult -> getComputeClusterResult.id()))
+     *             .build());
+     * 
+     *         var hostRule = new ComputeClusterVmHostRule("hostRule", ComputeClusterVmHostRuleArgs.builder()
+     *             .computeClusterId(cluster.applyValue(getComputeClusterResult -> getComputeClusterResult.id()))
+     *             .name("pulumi-host-rule1")
+     *             .vmGroupName("vmgroup-01")
+     *             .affinityHostGroupName(hostGroup.applyValue(getComputeClusterHostGroupResult -> getComputeClusterHostGroupResult.name()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getComputeClusterHostGroup(GetComputeClusterHostGroupArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getComputeClusterHostGroup:getComputeClusterHostGroup", TypeShape.of(GetComputeClusterHostGroupResult.class), args, Utilities.withVersion(options)); + } /** * 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 @@ -719,6 +841,52 @@ public static CompletableFuture getContentLibraryPlain( public static Output getContentLibrary(GetContentLibraryArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getContentLibrary:getContentLibrary", TypeShape.of(GetContentLibraryResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.ContentLibrary` data source can be used to discover the ID of a + * content library. + * + * > **NOTE:** This resource requires vCenter and is not available on direct ESXi + * host connections. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetContentLibraryArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var contentLibrary = VsphereFunctions.getContentLibrary(GetContentLibraryArgs.builder()
+     *             .name("Content Library")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getContentLibrary(GetContentLibraryArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getContentLibrary:getContentLibrary", TypeShape.of(GetContentLibraryResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.ContentLibrary` data source can be used to discover the ID of a * content library. @@ -798,6 +966,17 @@ public static CompletableFuture getContentLibraryIt public static Output getContentLibraryItem(GetContentLibraryItemArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getContentLibraryItem:getContentLibraryItem", TypeShape.of(GetContentLibraryItemResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.ContentLibraryItem` data source can be used to discover the ID + * of a content library item. + * + * > **NOTE:** This resource requires vCenter and is not available on direct ESXi + * host connections. + * + */ + public static Output getContentLibraryItem(GetContentLibraryItemArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getContentLibraryItem:getContentLibraryItem", TypeShape.of(GetContentLibraryItemResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.ContentLibraryItem` data source can be used to discover the ID * of a content library item. @@ -956,6 +1135,55 @@ public static CompletableFuture getCustomAttributePlai public static Output getCustomAttribute(GetCustomAttributeArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getCustomAttribute:getCustomAttribute", TypeShape.of(GetCustomAttributeResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.CustomAttribute` data source can be used to reference custom + * attributes that are not managed by this provider. Its attributes are exactly the + * same as the `vsphere.CustomAttribute` resource, + * and, like importing, the data source takes a name argument for the search. The + * `id` and other attributes are then populated with the data found by the search. + * + * > **NOTE:** Custom attributes are unsupported on direct ESXi host connections + * and require vCenter Server. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetCustomAttributeArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var attribute = VsphereFunctions.getCustomAttribute(GetCustomAttributeArgs.builder()
+     *             .name("test-attribute")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getCustomAttribute(GetCustomAttributeArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getCustomAttribute:getCustomAttribute", TypeShape.of(GetCustomAttributeResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.CustomAttribute` data source can be used to reference custom * attributes that are not managed by this provider. Its attributes are exactly the @@ -1272,14 +1500,14 @@ public static Output getDatacenter(GetDatacenterArgs args, * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getDatacenterPlain(GetDatacenterPlainArgs args, InvokeOptions options) { - return Deployment.getInstance().invokeAsync("vsphere:index/getDatacenter:getDatacenter", TypeShape.of(GetDatacenterResult.class), args, Utilities.withVersion(options)); + public static Output getDatacenter(GetDatacenterArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getDatacenter:getDatacenter", TypeShape.of(GetDatacenterResult.class), args, Utilities.withVersion(options)); } /** - * The `vsphere.getDatastore` data source can be used to discover the ID of a - * 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. + * The `vsphere.Datacenter` data source can be used to discover the ID of a + * 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 * @@ -1293,7 +1521,6 @@ public static CompletableFuture getDatacenterPlain(GetDatac * import com.pulumi.core.Output; * import com.pulumi.vsphere.VsphereFunctions; * import com.pulumi.vsphere.inputs.GetDatacenterArgs; - * import com.pulumi.vsphere.inputs.GetDatastoreArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -1311,11 +1538,6 @@ public static CompletableFuture getDatacenterPlain(GetDatac * .name("dc-01") * .build()); * - * final var datastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder() - * .name("datastore-01") - * .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id())) - * .build()); - * * } * } * } @@ -1323,8 +1545,8 @@ public static CompletableFuture getDatacenterPlain(GetDatac * <!--End PulumiCodeChooser --> * */ - public static Output getDatastore(GetDatastoreArgs args) { - return getDatastore(args, InvokeOptions.Empty); + public static CompletableFuture getDatacenterPlain(GetDatacenterPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("vsphere:index/getDatacenter:getDatacenter", TypeShape.of(GetDatacenterResult.class), args, Utilities.withVersion(options)); } /** * The `vsphere.getDatastore` data source can be used to discover the ID of a @@ -1374,8 +1596,8 @@ public static Output getDatastore(GetDatastoreArgs args) { * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getDatastorePlain(GetDatastorePlainArgs args) { - return getDatastorePlain(args, InvokeOptions.Empty); + public static Output getDatastore(GetDatastoreArgs args) { + return getDatastore(args, InvokeOptions.Empty); } /** * The `vsphere.getDatastore` data source can be used to discover the ID of a @@ -1425,8 +1647,8 @@ public static CompletableFuture getDatastorePlain(GetDatasto * <!--End PulumiCodeChooser --> * */ - public static Output getDatastore(GetDatastoreArgs args, InvokeOptions options) { - return Deployment.getInstance().invoke("vsphere:index/getDatastore:getDatastore", TypeShape.of(GetDatastoreResult.class), args, Utilities.withVersion(options)); + public static CompletableFuture getDatastorePlain(GetDatastorePlainArgs args) { + return getDatastorePlain(args, InvokeOptions.Empty); } /** * The `vsphere.getDatastore` data source can be used to discover the ID of a @@ -1476,11 +1698,113 @@ public static Output getDatastore(GetDatastoreArgs args, Inv * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getDatastorePlain(GetDatastorePlainArgs args, InvokeOptions options) { - return Deployment.getInstance().invokeAsync("vsphere:index/getDatastore:getDatastore", TypeShape.of(GetDatastoreResult.class), args, Utilities.withVersion(options)); + public static Output getDatastore(GetDatastoreArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getDatastore:getDatastore", TypeShape.of(GetDatastoreResult.class), args, Utilities.withVersion(options)); } /** - * The `vsphere.DatastoreCluster` data source can be used to discover the ID of a + * The `vsphere.getDatastore` data source can be used to discover the ID of a + * 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetDatastoreArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var datastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder()
+     *             .name("datastore-01")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getDatastore(GetDatastoreArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getDatastore:getDatastore", TypeShape.of(GetDatastoreResult.class), args, Utilities.withVersion(options)); + } + /** + * The `vsphere.getDatastore` data source can be used to discover the ID of a + * 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetDatastoreArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var datastore = VsphereFunctions.getDatastore(GetDatastoreArgs.builder()
+     *             .name("datastore-01")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getDatastorePlain(GetDatastorePlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("vsphere:index/getDatastore:getDatastore", TypeShape.of(GetDatastoreResult.class), args, Utilities.withVersion(options)); + } + /** + * The `vsphere.DatastoreCluster` data source can be used to discover the ID of a * 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. @@ -1632,6 +1956,57 @@ public static CompletableFuture getDatastoreClusterPl public static Output getDatastoreCluster(GetDatastoreClusterArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getDatastoreCluster:getDatastoreCluster", TypeShape.of(GetDatastoreClusterResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.DatastoreCluster` data source can be used to discover the ID of a + * 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetDatastoreClusterArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var datastoreCluster = VsphereFunctions.getDatastoreCluster(GetDatastoreClusterArgs.builder()
+     *             .name("datastore-cluster-01")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getDatastoreCluster(GetDatastoreClusterArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getDatastoreCluster:getDatastoreCluster", TypeShape.of(GetDatastoreClusterResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.DatastoreCluster` data source can be used to discover the ID of a * vSphere datastore cluster object. This can then be used with resources or data sources @@ -1941,6 +2316,92 @@ public static CompletableFuture getDatastoreStatsPlain( public static Output getDatastoreStats(GetDatastoreStatsArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getDatastoreStats:getDatastoreStats", TypeShape.of(GetDatastoreStatsResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.getDatastoreStats` data source can be used to retrieve the usage + * stats of all vSphere datastore objects in a datacenter. This can then be used as + * a standalone data source to get information required as input to other data + * sources. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetDatastoreStatsArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var datastoreStats = VsphereFunctions.getDatastoreStats(GetDatastoreStatsArgs.builder()
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * A useful example of this data source would be to determine the datastore with + * the most free space. For example, in addition to the above: + * + * Create an `outputs.tf` like that: + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         ctx.export("maxFreeSpaceName", theirMaxFreeSpaceName);
+     *         ctx.export("maxFreeSpace", theirMaxFreeSpace);
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * and a `locals.tf` like that: + * + */ + public static Output getDatastoreStats(GetDatastoreStatsArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getDatastoreStats:getDatastoreStats", TypeShape.of(GetDatastoreStatsResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.getDatastoreStats` data source can be used to retrieve the usage * stats of all vSphere datastore objects in a datacenter. This can then be used as @@ -2300,23 +2761,92 @@ public static Output getDistributedVirtualSwi * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getDistributedVirtualSwitchPlain(GetDistributedVirtualSwitchPlainArgs args, InvokeOptions options) { - return Deployment.getInstance().invokeAsync("vsphere:index/getDistributedVirtualSwitch:getDistributedVirtualSwitch", TypeShape.of(GetDistributedVirtualSwitchResult.class), args, Utilities.withVersion(options)); + public static Output getDistributedVirtualSwitch(GetDistributedVirtualSwitchArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getDistributedVirtualSwitch:getDistributedVirtualSwitch", TypeShape.of(GetDistributedVirtualSwitchResult.class), args, Utilities.withVersion(options)); } /** - * [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider + * The `vsphere.DistributedVirtualSwitch` data source can be used to discover + * the ID and uplink data of a of a vSphere distributed switch (VDS). This + * can then be used with resources or data sources that require a VDS, such as the + * `vsphere.DistributedPortGroup` resource, for which + * an example is shown below. * - * 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. + * > **NOTE:** This data source requires vCenter Server and is not available on + * direct ESXi host connections. * * ## Example Usage * - * <!--Start PulumiCodeChooser --> - *
-     * {@code
-     * package generated_program;
+     * 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.
+     * 
+     * <!--Start PulumiCodeChooser -->
+     * 
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetDistributedVirtualSwitchArgs;
+     * import com.pulumi.vsphere.DistributedPortGroup;
+     * import com.pulumi.vsphere.DistributedPortGroupArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var vds = VsphereFunctions.getDistributedVirtualSwitch(GetDistributedVirtualSwitchArgs.builder()
+     *             .name("vds-01")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *         var dvpg = new DistributedPortGroup("dvpg", DistributedPortGroupArgs.builder()
+     *             .name("dvpg-01")
+     *             .distributedVirtualSwitchUuid(vds.applyValue(getDistributedVirtualSwitchResult -> getDistributedVirtualSwitchResult.id()))
+     *             .activeUplinks(vds.applyValue(getDistributedVirtualSwitchResult -> getDistributedVirtualSwitchResult.uplinks()[0]))
+     *             .standbyUplinks(vds.applyValue(getDistributedVirtualSwitchResult -> getDistributedVirtualSwitchResult.uplinks()[1]))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getDistributedVirtualSwitchPlain(GetDistributedVirtualSwitchPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("vsphere:index/getDistributedVirtualSwitch:getDistributedVirtualSwitch", TypeShape.of(GetDistributedVirtualSwitchResult.class), args, Utilities.withVersion(options)); + } + /** + * [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider + * + * 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
      * 
      * import com.pulumi.Context;
      * import com.pulumi.Pulumi;
@@ -2504,6 +3034,73 @@ public static CompletableFuture getDynamicPlain(GetDynamicPlai
     public static Output getDynamic(GetDynamicArgs args, InvokeOptions options) {
         return Deployment.getInstance().invoke("vsphere:index/getDynamic:getDynamic", TypeShape.of(GetDynamicResult.class), args, Utilities.withVersion(options));
     }
+    /**
+     * [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider
+     * 
+     * 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
+     * 
+     * <!--Start PulumiCodeChooser -->
+     * 
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetTagCategoryArgs;
+     * import com.pulumi.vsphere.inputs.GetTagArgs;
+     * import com.pulumi.vsphere.inputs.GetDynamicArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var category = VsphereFunctions.getTagCategory(GetTagCategoryArgs.builder()
+     *             .name("SomeCategory")
+     *             .build());
+     * 
+     *         final var tag1 = VsphereFunctions.getTag(GetTagArgs.builder()
+     *             .name("FirstTag")
+     *             .categoryId(cat.id())
+     *             .build());
+     * 
+     *         final var tag2 = VsphereFunctions.getTag(GetTagArgs.builder()
+     *             .name("SecondTag")
+     *             .categoryId(cat.id())
+     *             .build());
+     * 
+     *         final var dyn = VsphereFunctions.getDynamic(GetDynamicArgs.builder()
+     *             .filters(            
+     *                 tag1.applyValue(getTagResult -> getTagResult.id()),
+     *                 tag1.applyValue(getTagResult -> getTagResult.id()))
+     *             .nameRegex("ubuntu")
+     *             .type("Datacenter")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getDynamic(GetDynamicArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getDynamic:getDynamic", TypeShape.of(GetDynamicResult.class), args, Utilities.withVersion(options)); + } /** * [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider * @@ -2712,6 +3309,53 @@ public static CompletableFuture getFolderPlain(GetFolderPlainAr public static Output getFolder(GetFolderArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getFolder:getFolder", TypeShape.of(GetFolderResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.Folder` data source can be used to get the general attributes of a + * vSphere inventory folder. The data source supports creating folders of the 5 + * major types - datacenter folders, host and cluster folders, virtual machine + * folders, storage folders, and network folders. + * + * Paths are absolute and must include the datacenter. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetFolderArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var folder = VsphereFunctions.getFolder(GetFolderArgs.builder()
+     *             .path("/dc-01/datastore-01/folder-01")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getFolder(GetFolderArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getFolder:getFolder", TypeShape.of(GetFolderResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.Folder` data source can be used to get the general attributes of a * vSphere inventory folder. The data source supports creating folders of the 5 @@ -2798,6 +3442,19 @@ public static CompletableFuture getGuestOsCustomi public static Output getGuestOsCustomization(GetGuestOsCustomizationArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getGuestOsCustomization:getGuestOsCustomization", TypeShape.of(GetGuestOsCustomizationResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.GuestOsCustomization` data source can be used to discover the + * details about a customization specification for a guest operating system. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + * <!--End PulumiCodeChooser --> + * + */ + public static Output getGuestOsCustomization(GetGuestOsCustomizationArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getGuestOsCustomization:getGuestOsCustomization", TypeShape.of(GetGuestOsCustomizationResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.GuestOsCustomization` data source can be used to discover the * details about a customization specification for a guest operating system. @@ -2962,9 +3619,188 @@ public static Output getHost(GetHostArgs args, InvokeOptions opti return Deployment.getInstance().invoke("vsphere:index/getHost:getHost", TypeShape.of(GetHostResult.class), args, Utilities.withVersion(options)); } /** - * 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. + * 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetHostArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var host = VsphereFunctions.getHost(GetHostArgs.builder()
+     *             .name("esxi-01.example.com")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getHost(GetHostArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getHost:getHost", TypeShape.of(GetHostResult.class), args, Utilities.withVersion(options)); + } + /** + * 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetHostArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var host = VsphereFunctions.getHost(GetHostArgs.builder()
+     *             .name("esxi-01.example.com")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getHostPlain(GetHostPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("vsphere:index/getHost:getHost", TypeShape.of(GetHostResult.class), args, Utilities.withVersion(options)); + } + /** + * The `vsphere.getHostBaseImages` data source can be used to get the list of ESXi + * base images available for cluster software management. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var baseImages = VsphereFunctions.getHostBaseImages();
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getHostBaseImages() { + return getHostBaseImages(InvokeArgs.Empty, InvokeOptions.Empty); + } + /** + * The `vsphere.getHostBaseImages` data source can be used to get the list of ESXi + * base images available for cluster software management. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var baseImages = VsphereFunctions.getHostBaseImages();
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getHostBaseImagesPlain() { + return getHostBaseImagesPlain(InvokeArgs.Empty, InvokeOptions.Empty); + } + /** + * The `vsphere.getHostBaseImages` data source can be used to get the list of ESXi + * base images available for cluster software management. * * ## Example Usage * @@ -2977,8 +3813,6 @@ public static Output getHost(GetHostArgs args, InvokeOptions opti * import com.pulumi.Pulumi; * import com.pulumi.core.Output; * import com.pulumi.vsphere.VsphereFunctions; - * import com.pulumi.vsphere.inputs.GetDatacenterArgs; - * import com.pulumi.vsphere.inputs.GetHostArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -2992,14 +3826,7 @@ public static Output getHost(GetHostArgs args, InvokeOptions opti * } * * public static void stack(Context ctx) { - * final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder() - * .name("dc-01") - * .build()); - * - * final var host = VsphereFunctions.getHost(GetHostArgs.builder() - * .name("esxi-01.example.com") - * .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id())) - * .build()); + * final var baseImages = VsphereFunctions.getHostBaseImages(); * * } * } @@ -3008,8 +3835,8 @@ public static Output getHost(GetHostArgs args, InvokeOptions opti * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getHostPlain(GetHostPlainArgs args, InvokeOptions options) { - return Deployment.getInstance().invokeAsync("vsphere:index/getHost:getHost", TypeShape.of(GetHostResult.class), args, Utilities.withVersion(options)); + public static Output getHostBaseImages(InvokeArgs args) { + return getHostBaseImages(args, InvokeOptions.Empty); } /** * The `vsphere.getHostBaseImages` data source can be used to get the list of ESXi @@ -3048,8 +3875,8 @@ public static CompletableFuture getHostPlain(GetHostPlainArgs arg * <!--End PulumiCodeChooser --> * */ - public static Output getHostBaseImages() { - return getHostBaseImages(InvokeArgs.Empty, InvokeOptions.Empty); + public static CompletableFuture getHostBaseImagesPlain(InvokeArgs args) { + return getHostBaseImagesPlain(args, InvokeOptions.Empty); } /** * The `vsphere.getHostBaseImages` data source can be used to get the list of ESXi @@ -3088,8 +3915,8 @@ public static Output getHostBaseImages() { * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getHostBaseImagesPlain() { - return getHostBaseImagesPlain(InvokeArgs.Empty, InvokeOptions.Empty); + public static Output getHostBaseImages(InvokeArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getHostBaseImages:getHostBaseImages", TypeShape.of(GetHostBaseImagesResult.class), args, Utilities.withVersion(options)); } /** * The `vsphere.getHostBaseImages` data source can be used to get the list of ESXi @@ -3128,8 +3955,8 @@ public static CompletableFuture getHostBaseImagesPlain( * <!--End PulumiCodeChooser --> * */ - public static Output getHostBaseImages(InvokeArgs args) { - return getHostBaseImages(args, InvokeOptions.Empty); + public static Output getHostBaseImages(InvokeArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getHostBaseImages:getHostBaseImages", TypeShape.of(GetHostBaseImagesResult.class), args, Utilities.withVersion(options)); } /** * The `vsphere.getHostBaseImages` data source can be used to get the list of ESXi @@ -3168,15 +3995,18 @@ public static Output getHostBaseImages(InvokeArgs args) * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getHostBaseImagesPlain(InvokeArgs args) { - return getHostBaseImagesPlain(args, InvokeOptions.Empty); + public static CompletableFuture getHostBaseImagesPlain(InvokeArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("vsphere:index/getHostBaseImages:getHostBaseImages", TypeShape.of(GetHostBaseImagesResult.class), args, Utilities.withVersion(options)); } /** - * The `vsphere.getHostBaseImages` data source can be used to get the list of ESXi - * base images available for cluster software management. + * The `vsphere.getHostPciDevice` data source can be used to discover the device ID + * of a vSphere host's PCI device. This can then be used with + * `vsphere.VirtualMachine`'s `pci_device_id`. * * ## Example Usage * + * ### With Vendor ID And Class ID + * * <!--Start PulumiCodeChooser --> *
      * {@code
@@ -3186,6 +4016,9 @@ public static CompletableFuture getHostBaseImagesPlain(
      * import com.pulumi.Pulumi;
      * import com.pulumi.core.Output;
      * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetHostArgs;
+     * import com.pulumi.vsphere.inputs.GetHostPciDeviceArgs;
      * import java.util.List;
      * import java.util.ArrayList;
      * import java.util.Map;
@@ -3199,7 +4032,20 @@ public static CompletableFuture getHostBaseImagesPlain(
      *     }
      * 
      *     public static void stack(Context ctx) {
-     *         final var baseImages = VsphereFunctions.getHostBaseImages();
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var host = VsphereFunctions.getHost(GetHostArgs.builder()
+     *             .name("esxi-01.example.com")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *         final var dev = VsphereFunctions.getHostPciDevice(GetHostPciDeviceArgs.builder()
+     *             .hostId(host.applyValue(getHostResult -> getHostResult.id()))
+     *             .classId(123)
+     *             .vendorId(456)
+     *             .build());
      * 
      *     }
      * }
@@ -3207,17 +4053,9 @@ public static CompletableFuture getHostBaseImagesPlain(
      * 
* <!--End PulumiCodeChooser --> * - */ - public static Output getHostBaseImages(InvokeArgs args, InvokeOptions options) { - return Deployment.getInstance().invoke("vsphere:index/getHostBaseImages:getHostBaseImages", TypeShape.of(GetHostBaseImagesResult.class), args, Utilities.withVersion(options)); - } - /** - * The `vsphere.getHostBaseImages` data source can be used to get the list of ESXi - * base images available for cluster software management. - * - * ## Example Usage + * ### With Name Regular Expression * - * <!--Start PulumiCodeChooser --> + * <!--Start PulumiCodeChooser --> *
      * {@code
      * package generated_program;
@@ -3226,6 +4064,9 @@ public static Output getHostBaseImages(InvokeArgs args,
      * import com.pulumi.Pulumi;
      * import com.pulumi.core.Output;
      * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetHostArgs;
+     * import com.pulumi.vsphere.inputs.GetHostPciDeviceArgs;
      * import java.util.List;
      * import java.util.ArrayList;
      * import java.util.Map;
@@ -3239,7 +4080,19 @@ public static Output getHostBaseImages(InvokeArgs args,
      *     }
      * 
      *     public static void stack(Context ctx) {
-     *         final var baseImages = VsphereFunctions.getHostBaseImages();
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var host = VsphereFunctions.getHost(GetHostArgs.builder()
+     *             .name("esxi-01.example.com")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *         final var dev = VsphereFunctions.getHostPciDevice(GetHostPciDeviceArgs.builder()
+     *             .hostId(host.applyValue(getHostResult -> getHostResult.id()))
+     *             .nameRegex("MMC")
+     *             .build());
      * 
      *     }
      * }
@@ -3248,8 +4101,8 @@ public static Output getHostBaseImages(InvokeArgs args,
      * <!--End PulumiCodeChooser -->
      * 
      */
-    public static CompletableFuture getHostBaseImagesPlain(InvokeArgs args, InvokeOptions options) {
-        return Deployment.getInstance().invokeAsync("vsphere:index/getHostBaseImages:getHostBaseImages", TypeShape.of(GetHostBaseImagesResult.class), args, Utilities.withVersion(options));
+    public static Output getHostPciDevice(GetHostPciDeviceArgs args) {
+        return getHostPciDevice(args, InvokeOptions.Empty);
     }
     /**
      * The `vsphere.getHostPciDevice` data source can be used to discover the device ID
@@ -3354,8 +4207,8 @@ public static CompletableFuture getHostBaseImagesPlain(
      * <!--End PulumiCodeChooser -->
      * 
      */
-    public static Output getHostPciDevice(GetHostPciDeviceArgs args) {
-        return getHostPciDevice(args, InvokeOptions.Empty);
+    public static CompletableFuture getHostPciDevicePlain(GetHostPciDevicePlainArgs args) {
+        return getHostPciDevicePlain(args, InvokeOptions.Empty);
     }
     /**
      * The `vsphere.getHostPciDevice` data source can be used to discover the device ID
@@ -3460,8 +4313,8 @@ public static Output getHostPciDevice(GetHostPciDeviceAr
      * <!--End PulumiCodeChooser -->
      * 
      */
-    public static CompletableFuture getHostPciDevicePlain(GetHostPciDevicePlainArgs args) {
-        return getHostPciDevicePlain(args, InvokeOptions.Empty);
+    public static Output getHostPciDevice(GetHostPciDeviceArgs args, InvokeOptions options) {
+        return Deployment.getInstance().invoke("vsphere:index/getHostPciDevice:getHostPciDevice", TypeShape.of(GetHostPciDeviceResult.class), args, Utilities.withVersion(options));
     }
     /**
      * The `vsphere.getHostPciDevice` data source can be used to discover the device ID
@@ -3566,7 +4419,7 @@ public static CompletableFuture getHostPciDevicePlain(Ge
      * <!--End PulumiCodeChooser -->
      * 
      */
-    public static Output getHostPciDevice(GetHostPciDeviceArgs args, InvokeOptions options) {
+    public static Output getHostPciDevice(GetHostPciDeviceArgs args, InvokeOutputOptions options) {
         return Deployment.getInstance().invoke("vsphere:index/getHostPciDevice:getHostPciDevice", TypeShape.of(GetHostPciDeviceResult.class), args, Utilities.withVersion(options));
     }
     /**
@@ -3825,6 +4678,56 @@ public static CompletableFuture getHostThumbprintPlain(
     public static Output getHostThumbprint(GetHostThumbprintArgs args, InvokeOptions options) {
         return Deployment.getInstance().invoke("vsphere:index/getHostThumbprint:getHostThumbprint", TypeShape.of(GetHostThumbprintResult.class), args, Utilities.withVersion(options));
     }
+    /**
+     * The `vsphere_thumbprint` data source can be used to discover the host thumbprint
+     * of an ESXi host. This can be used when adding the `vsphere.Host` resource to a
+     * cluster or a vCenter Server instance.
+     * 
+     * * If the ESXi host is using a certificate chain, the first one returned will be
+     * used to generate the thumbprint.
+     * 
+     * * If the ESXi host has a certificate issued by a certificate authority, ensure
+     * that the the certificate authority is trusted on the system running the plan.
+     * 
+     * ## Example Usage
+     * 
+     * <!--Start PulumiCodeChooser -->
+     * 
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetHostThumbprintArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var thumbprint = VsphereFunctions.getHostThumbprint(GetHostThumbprintArgs.builder()
+     *             .address("esxi-01.example.com")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getHostThumbprint(GetHostThumbprintArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getHostThumbprint:getHostThumbprint", TypeShape.of(GetHostThumbprintResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere_thumbprint` data source can be used to discover the host thumbprint * of an ESXi host. This can be used when adding the `vsphere.Host` resource to a @@ -3975,8 +4878,111 @@ public static CompletableFuture getHostThumbprintPlain( * <!--End PulumiCodeChooser --> * */ - public static Output getHostVgpuProfile(GetHostVgpuProfileArgs args) { - return getHostVgpuProfile(args, InvokeOptions.Empty); + public static Output getHostVgpuProfile(GetHostVgpuProfileArgs args) { + return getHostVgpuProfile(args, InvokeOptions.Empty); + } + /** + * The `vsphere.getHostVgpuProfile` data source can be used to discover the + * available vGPU profiles of a vSphere host. + * + * ## Example Usage + * + * ### To Return All VGPU Profiles + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetHostArgs;
+     * import com.pulumi.vsphere.inputs.GetHostVgpuProfileArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var host = VsphereFunctions.getHost(GetHostArgs.builder()
+     *             .name("esxi-01.example.com")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *         final var vgpuProfile = VsphereFunctions.getHostVgpuProfile(GetHostVgpuProfileArgs.builder()
+     *             .hostId(host.applyValue(getHostResult -> getHostResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### With VGPU Profile Name_regex + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetHostArgs;
+     * import com.pulumi.vsphere.inputs.GetHostVgpuProfileArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var host = VsphereFunctions.getHost(GetHostArgs.builder()
+     *             .name("esxi-01.example.com")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *         final var vgpuProfile = VsphereFunctions.getHostVgpuProfile(GetHostVgpuProfileArgs.builder()
+     *             .hostId(host.applyValue(getHostResult -> getHostResult.id()))
+     *             .nameRegex("a100")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getHostVgpuProfilePlain(GetHostVgpuProfilePlainArgs args) { + return getHostVgpuProfilePlain(args, InvokeOptions.Empty); } /** * The `vsphere.getHostVgpuProfile` data source can be used to discover the @@ -4078,8 +5084,8 @@ public static Output getHostVgpuProfile(GetHostVgpuPro * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getHostVgpuProfilePlain(GetHostVgpuProfilePlainArgs args) { - return getHostVgpuProfilePlain(args, InvokeOptions.Empty); + public static Output getHostVgpuProfile(GetHostVgpuProfileArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getHostVgpuProfile:getHostVgpuProfile", TypeShape.of(GetHostVgpuProfileResult.class), args, Utilities.withVersion(options)); } /** * The `vsphere.getHostVgpuProfile` data source can be used to discover the @@ -4181,7 +5187,7 @@ public static CompletableFuture getHostVgpuProfilePlai * <!--End PulumiCodeChooser --> * */ - public static Output getHostVgpuProfile(GetHostVgpuProfileArgs args, InvokeOptions options) { + public static Output getHostVgpuProfile(GetHostVgpuProfileArgs args, InvokeOutputOptions options) { return Deployment.getInstance().invoke("vsphere:index/getHostVgpuProfile:getHostVgpuProfile", TypeShape.of(GetHostVgpuProfileResult.class), args, Utilities.withVersion(options)); } /** @@ -4416,6 +5422,49 @@ public static CompletableFuture getLicensePlain(GetLicensePlai public static Output getLicense(GetLicenseArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getLicense:getLicense", TypeShape.of(GetLicenseResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.License` data source can be used to get the general attributes of + * a license keys from a vCenter Server instance. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetLicenseArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var license = VsphereFunctions.getLicense(GetLicenseArgs.builder()
+     *             .licenseKey("00000-00000-00000-00000-00000")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getLicense(GetLicenseArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getLicense:getLicense", TypeShape.of(GetLicenseResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.License` data source can be used to get the general attributes of * a license keys from a vCenter Server instance. @@ -4747,6 +5796,102 @@ public static CompletableFuture getNetworkPlain(GetNetworkPlai public static Output getNetwork(GetNetworkArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getNetwork:getNetwork", TypeShape.of(GetNetworkResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.getNetwork` data source can be used to discover the ID of a network in + * vSphere. This can be any network that can be used as the backing for a 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetNetworkArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var network = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
+     *             .name("VM Network")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * ### Additional Examples + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetNetworkArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var myPortGroup = VsphereFunctions.getNetwork(GetNetworkArgs.builder()
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .name("VM Network")
+     *             .filters(GetNetworkFilterArgs.builder()
+     *                 .networkType("Network")
+     *                 .build())
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getNetwork(GetNetworkArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getNetwork:getNetwork", TypeShape.of(GetNetworkResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.getNetwork` data source can be used to discover the ID of a network in * vSphere. This can be any network that can be used as the backing for a network @@ -4876,8 +6021,119 @@ public static Output getOvfVmTemplate(GetOvfVmTemplateAr * inputs for a `vsphere.VirtualMachine` resource. * */ - public static CompletableFuture getOvfVmTemplatePlain(GetOvfVmTemplatePlainArgs args, InvokeOptions options) { - return Deployment.getInstance().invokeAsync("vsphere:index/getOvfVmTemplate:getOvfVmTemplate", TypeShape.of(GetOvfVmTemplateResult.class), args, Utilities.withVersion(options)); + public static Output getOvfVmTemplate(GetOvfVmTemplateArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getOvfVmTemplate:getOvfVmTemplate", TypeShape.of(GetOvfVmTemplateResult.class), args, Utilities.withVersion(options)); + } + /** + * The `vsphere.getOvfVmTemplate` data source can be used to submit an OVF to + * vSphere and extract its hardware settings in a form that can be then used as + * inputs for a `vsphere.VirtualMachine` resource. + * + */ + public static CompletableFuture getOvfVmTemplatePlain(GetOvfVmTemplatePlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("vsphere:index/getOvfVmTemplate:getOvfVmTemplate", TypeShape.of(GetOvfVmTemplateResult.class), args, Utilities.withVersion(options)); + } + /** + * The `vsphere.getPolicy` data source can be used to discover the UUID of a + * storage policy. This can then be used with other resources or data sources that + * use a storage policy. + * + * > **NOTE:** Storage policies are not supported on direct ESXi hosts and + * requires vCenter Server. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetPolicyArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var prodPlatinumReplicated = VsphereFunctions.getPolicy(GetPolicyArgs.builder()
+     *             .name("prod_platinum_replicated")
+     *             .build());
+     * 
+     *         final var devSilverNonreplicated = VsphereFunctions.getPolicy(GetPolicyArgs.builder()
+     *             .name("dev_silver_nonreplicated")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getPolicy(GetPolicyArgs args) { + return getPolicy(args, InvokeOptions.Empty); + } + /** + * The `vsphere.getPolicy` data source can be used to discover the UUID of a + * storage policy. This can then be used with other resources or data sources that + * use a storage policy. + * + * > **NOTE:** Storage policies are not supported on direct ESXi hosts and + * requires vCenter Server. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetPolicyArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var prodPlatinumReplicated = VsphereFunctions.getPolicy(GetPolicyArgs.builder()
+     *             .name("prod_platinum_replicated")
+     *             .build());
+     * 
+     *         final var devSilverNonreplicated = VsphereFunctions.getPolicy(GetPolicyArgs.builder()
+     *             .name("dev_silver_nonreplicated")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getPolicyPlain(GetPolicyPlainArgs args) { + return getPolicyPlain(args, InvokeOptions.Empty); } /** * The `vsphere.getPolicy` data source can be used to discover the UUID of a @@ -4927,8 +6183,8 @@ public static CompletableFuture getOvfVmTemplatePlain(Ge * <!--End PulumiCodeChooser --> * */ - public static Output getPolicy(GetPolicyArgs args) { - return getPolicy(args, InvokeOptions.Empty); + public static Output getPolicy(GetPolicyArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getPolicy:getPolicy", TypeShape.of(GetPolicyResult.class), args, Utilities.withVersion(options)); } /** * The `vsphere.getPolicy` data source can be used to discover the UUID of a @@ -4978,8 +6234,8 @@ public static Output getPolicy(GetPolicyArgs args) { * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getPolicyPlain(GetPolicyPlainArgs args) { - return getPolicyPlain(args, InvokeOptions.Empty); + public static Output getPolicy(GetPolicyArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getPolicy:getPolicy", TypeShape.of(GetPolicyResult.class), args, Utilities.withVersion(options)); } /** * The `vsphere.getPolicy` data source can be used to discover the UUID of a @@ -5029,16 +6285,14 @@ public static CompletableFuture getPolicyPlain(GetPolicyPlainAr * <!--End PulumiCodeChooser --> * */ - public static Output getPolicy(GetPolicyArgs args, InvokeOptions options) { - return Deployment.getInstance().invoke("vsphere:index/getPolicy:getPolicy", TypeShape.of(GetPolicyResult.class), args, Utilities.withVersion(options)); + public static CompletableFuture getPolicyPlain(GetPolicyPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("vsphere:index/getPolicy:getPolicy", TypeShape.of(GetPolicyResult.class), args, Utilities.withVersion(options)); } /** - * The `vsphere.getPolicy` data source can be used to discover the UUID of a - * storage policy. This can then be used with other resources or data sources that - * use a storage policy. - * - * > **NOTE:** Storage policies are not supported on direct ESXi hosts and - * requires vCenter Server. + * The `vsphere.ResourcePool` data source can be used to discover the ID of a + * 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 * @@ -5051,7 +6305,8 @@ public static Output getPolicy(GetPolicyArgs args, InvokeOption * import com.pulumi.Pulumi; * import com.pulumi.core.Output; * import com.pulumi.vsphere.VsphereFunctions; - * import com.pulumi.vsphere.inputs.GetPolicyArgs; + * import com.pulumi.vsphere.inputs.GetDatacenterArgs; + * import com.pulumi.vsphere.inputs.GetResourcePoolArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -5065,12 +6320,57 @@ public static Output getPolicy(GetPolicyArgs args, InvokeOption * } * * public static void stack(Context ctx) { - * final var prodPlatinumReplicated = VsphereFunctions.getPolicy(GetPolicyArgs.builder() - * .name("prod_platinum_replicated") + * final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder() + * .name("dc-01") * .build()); * - * final var devSilverNonreplicated = VsphereFunctions.getPolicy(GetPolicyArgs.builder() - * .name("dev_silver_nonreplicated") + * final var pool = VsphereFunctions.getResourcePool(GetResourcePoolArgs.builder() + * .name("resource-pool-01") + * .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id())) + * .build()); + * + * } + * } + * } + *
+ * <!--End PulumiCodeChooser --> + * + * ### 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. + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetResourcePoolArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var pool = VsphereFunctions.getResourcePool(GetResourcePoolArgs.builder()
+     *             .name("esxi-01.example.com/Resources")
+     *             .datacenterId(datacenter.id())
      *             .build());
      * 
      *     }
@@ -5079,9 +6379,15 @@ public static Output getPolicy(GetPolicyArgs args, InvokeOption
      * 
* <!--End PulumiCodeChooser --> * + * 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/8.0/vsphere-resource-management/GUID-60077B40-66FF-4625-934A-641703ED7601.html + * */ - public static CompletableFuture getPolicyPlain(GetPolicyPlainArgs args, InvokeOptions options) { - return Deployment.getInstance().invokeAsync("vsphere:index/getPolicy:getPolicy", TypeShape.of(GetPolicyResult.class), args, Utilities.withVersion(options)); + public static Output getResourcePool() { + return getResourcePool(GetResourcePoolArgs.Empty, InvokeOptions.Empty); } /** * The `vsphere.ResourcePool` data source can be used to discover the ID of a @@ -5181,8 +6487,8 @@ public static CompletableFuture getPolicyPlain(GetPolicyPlainAr * [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-60077B40-66FF-4625-934A-641703ED7601.html * */ - public static Output getResourcePool() { - return getResourcePool(GetResourcePoolArgs.Empty, InvokeOptions.Empty); + public static CompletableFuture getResourcePoolPlain() { + return getResourcePoolPlain(GetResourcePoolPlainArgs.Empty, InvokeOptions.Empty); } /** * The `vsphere.ResourcePool` data source can be used to discover the ID of a @@ -5282,8 +6588,8 @@ public static Output getResourcePool() { * [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-60077B40-66FF-4625-934A-641703ED7601.html * */ - public static CompletableFuture getResourcePoolPlain() { - return getResourcePoolPlain(GetResourcePoolPlainArgs.Empty, InvokeOptions.Empty); + public static Output getResourcePool(GetResourcePoolArgs args) { + return getResourcePool(args, InvokeOptions.Empty); } /** * The `vsphere.ResourcePool` data source can be used to discover the ID of a @@ -5383,8 +6689,8 @@ public static CompletableFuture getResourcePoolPlain() { * [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-60077B40-66FF-4625-934A-641703ED7601.html * */ - public static Output getResourcePool(GetResourcePoolArgs args) { - return getResourcePool(args, InvokeOptions.Empty); + public static CompletableFuture getResourcePoolPlain(GetResourcePoolPlainArgs args) { + return getResourcePoolPlain(args, InvokeOptions.Empty); } /** * The `vsphere.ResourcePool` data source can be used to discover the ID of a @@ -5484,8 +6790,8 @@ public static Output getResourcePool(GetResourcePoolArgs * [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-60077B40-66FF-4625-934A-641703ED7601.html * */ - public static CompletableFuture getResourcePoolPlain(GetResourcePoolPlainArgs args) { - return getResourcePoolPlain(args, InvokeOptions.Empty); + public static Output getResourcePool(GetResourcePoolArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getResourcePool:getResourcePool", TypeShape.of(GetResourcePoolResult.class), args, Utilities.withVersion(options)); } /** * The `vsphere.ResourcePool` data source can be used to discover the ID of a @@ -5585,7 +6891,7 @@ public static CompletableFuture getResourcePoolPlain(GetR * [vmware-docs-resource-pools]: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-resource-management/GUID-60077B40-66FF-4625-934A-641703ED7601.html * */ - public static Output getResourcePool(GetResourcePoolArgs args, InvokeOptions options) { + public static Output getResourcePool(GetResourcePoolArgs args, InvokeOutputOptions options) { return Deployment.getInstance().invoke("vsphere:index/getResourcePool:getResourcePool", TypeShape.of(GetResourcePoolResult.class), args, Utilities.withVersion(options)); } /** @@ -5858,8 +7164,161 @@ public static Output getRole(GetRoleArgs args, InvokeOptions opti * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getRolePlain(GetRolePlainArgs args, InvokeOptions options) { - return Deployment.getInstance().invokeAsync("vsphere:index/getRole:getRole", TypeShape.of(GetRoleResult.class), args, Utilities.withVersion(options)); + public static Output getRole(GetRoleArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getRole:getRole", TypeShape.of(GetRoleResult.class), args, Utilities.withVersion(options)); + } + /** + * 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetRoleArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var terraformRole = VsphereFunctions.getRole(GetRoleArgs.builder()
+     *             .label("Terraform to vSphere Integration Role")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getRolePlain(GetRolePlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("vsphere:index/getRole:getRole", TypeShape.of(GetRoleResult.class), args, Utilities.withVersion(options)); + } + /** + * The `vsphere.Tag` data source can be used to reference tags that are not + * managed by this provider. Its attributes are exactly the same as the `vsphere.Tag` + * resource, and, like importing, the data source takes a name and + * category to search on. The `id` and other attributes are then populated with + * the data found by the search. + * + * > **NOTE:** Tagging is not supported on direct ESXi hosts connections and + * requires vCenter Server. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetTagCategoryArgs;
+     * import com.pulumi.vsphere.inputs.GetTagArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var category = VsphereFunctions.getTagCategory(GetTagCategoryArgs.builder()
+     *             .name("example-category")
+     *             .build());
+     * 
+     *         final var tag = VsphereFunctions.getTag(GetTagArgs.builder()
+     *             .name("example-tag")
+     *             .categoryId(category.applyValue(getTagCategoryResult -> getTagCategoryResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getTag(GetTagArgs args) { + return getTag(args, InvokeOptions.Empty); + } + /** + * The `vsphere.Tag` data source can be used to reference tags that are not + * managed by this provider. Its attributes are exactly the same as the `vsphere.Tag` + * resource, and, like importing, the data source takes a name and + * category to search on. The `id` and other attributes are then populated with + * the data found by the search. + * + * > **NOTE:** Tagging is not supported on direct ESXi hosts connections and + * requires vCenter Server. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetTagCategoryArgs;
+     * import com.pulumi.vsphere.inputs.GetTagArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var category = VsphereFunctions.getTagCategory(GetTagCategoryArgs.builder()
+     *             .name("example-category")
+     *             .build());
+     * 
+     *         final var tag = VsphereFunctions.getTag(GetTagArgs.builder()
+     *             .name("example-tag")
+     *             .categoryId(category.applyValue(getTagCategoryResult -> getTagCategoryResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getTagPlain(GetTagPlainArgs args) { + return getTagPlain(args, InvokeOptions.Empty); } /** * The `vsphere.Tag` data source can be used to reference tags that are not @@ -5913,8 +7372,8 @@ public static CompletableFuture getRolePlain(GetRolePlainArgs arg * <!--End PulumiCodeChooser --> * */ - public static Output getTag(GetTagArgs args) { - return getTag(args, InvokeOptions.Empty); + public static Output getTag(GetTagArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getTag:getTag", TypeShape.of(GetTagResult.class), args, Utilities.withVersion(options)); } /** * The `vsphere.Tag` data source can be used to reference tags that are not @@ -5968,8 +7427,8 @@ public static Output getTag(GetTagArgs args) { * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getTagPlain(GetTagPlainArgs args) { - return getTagPlain(args, InvokeOptions.Empty); + public static Output getTag(GetTagArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getTag:getTag", TypeShape.of(GetTagResult.class), args, Utilities.withVersion(options)); } /** * The `vsphere.Tag` data source can be used to reference tags that are not @@ -6023,15 +7482,15 @@ public static CompletableFuture getTagPlain(GetTagPlainArgs args) * <!--End PulumiCodeChooser --> * */ - public static Output getTag(GetTagArgs args, InvokeOptions options) { - return Deployment.getInstance().invoke("vsphere:index/getTag:getTag", TypeShape.of(GetTagResult.class), args, Utilities.withVersion(options)); + public static CompletableFuture getTagPlain(GetTagPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("vsphere:index/getTag:getTag", TypeShape.of(GetTagResult.class), args, Utilities.withVersion(options)); } /** - * The `vsphere.Tag` data source can be used to reference tags that are not - * managed by this provider. Its attributes are exactly the same as the `vsphere.Tag` - * resource, and, like importing, the data source takes a name and - * category to search on. The `id` and other attributes are then populated with - * the data found by the search. + * The `vsphere.TagCategory` data source can be used to reference tag categories + * that are not managed by this provider. Its attributes are the same as the + * `vsphere.TagCategory` resource, and, like importing, + * the data source uses a name and category as search criteria. The `id` and other + * attributes are populated with the data found by the search. * * > **NOTE:** Tagging is not supported on direct ESXi hosts connections and * requires vCenter Server. @@ -6048,7 +7507,6 @@ public static Output getTag(GetTagArgs args, InvokeOptions options * import com.pulumi.core.Output; * import com.pulumi.vsphere.VsphereFunctions; * import com.pulumi.vsphere.inputs.GetTagCategoryArgs; - * import com.pulumi.vsphere.inputs.GetTagArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -6066,11 +7524,6 @@ public static Output getTag(GetTagArgs args, InvokeOptions options * .name("example-category") * .build()); * - * final var tag = VsphereFunctions.getTag(GetTagArgs.builder() - * .name("example-tag") - * .categoryId(category.applyValue(getTagCategoryResult -> getTagCategoryResult.id())) - * .build()); - * * } * } * } @@ -6078,8 +7531,8 @@ public static Output getTag(GetTagArgs args, InvokeOptions options * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getTagPlain(GetTagPlainArgs args, InvokeOptions options) { - return Deployment.getInstance().invokeAsync("vsphere:index/getTag:getTag", TypeShape.of(GetTagResult.class), args, Utilities.withVersion(options)); + public static Output getTagCategory(GetTagCategoryArgs args) { + return getTagCategory(args, InvokeOptions.Empty); } /** * The `vsphere.TagCategory` data source can be used to reference tag categories @@ -6127,8 +7580,8 @@ public static CompletableFuture getTagPlain(GetTagPlainArgs args, * <!--End PulumiCodeChooser --> * */ - public static Output getTagCategory(GetTagCategoryArgs args) { - return getTagCategory(args, InvokeOptions.Empty); + public static CompletableFuture getTagCategoryPlain(GetTagCategoryPlainArgs args) { + return getTagCategoryPlain(args, InvokeOptions.Empty); } /** * The `vsphere.TagCategory` data source can be used to reference tag categories @@ -6176,8 +7629,8 @@ public static Output getTagCategory(GetTagCategoryArgs arg * <!--End PulumiCodeChooser --> * */ - public static CompletableFuture getTagCategoryPlain(GetTagCategoryPlainArgs args) { - return getTagCategoryPlain(args, InvokeOptions.Empty); + public static Output getTagCategory(GetTagCategoryArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getTagCategory:getTagCategory", TypeShape.of(GetTagCategoryResult.class), args, Utilities.withVersion(options)); } /** * The `vsphere.TagCategory` data source can be used to reference tag categories @@ -6225,7 +7678,7 @@ public static CompletableFuture getTagCategoryPlain(GetTag * <!--End PulumiCodeChooser --> * */ - public static Output getTagCategory(GetTagCategoryArgs args, InvokeOptions options) { + public static Output getTagCategory(GetTagCategoryArgs args, InvokeOutputOptions options) { return Deployment.getInstance().invoke("vsphere:index/getTagCategory:getTagCategory", TypeShape.of(GetTagCategoryResult.class), args, Utilities.withVersion(options)); } /** @@ -6430,6 +7883,57 @@ public static CompletableFuture getVappContainerPlain(Ge public static Output getVappContainer(GetVappContainerArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getVappContainer:getVappContainer", TypeShape.of(GetVappContainerResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.VappContainer` data source can be used to discover the ID of a + * 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetVappContainerArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var pool = VsphereFunctions.getVappContainer(GetVappContainerArgs.builder()
+     *             .name("vapp-container-01")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getVappContainer(GetVappContainerArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getVappContainer:getVappContainer", TypeShape.of(GetVappContainerResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.VappContainer` data source can be used to discover the ID of a * vApp container in vSphere. This is useful to return the ID of a vApp container @@ -6991,6 +8495,108 @@ public static CompletableFuture getVirtualMachinePlain( public static Output getVirtualMachine(GetVirtualMachineArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getVirtualMachine:getVirtualMachine", TypeShape.of(GetVirtualMachineResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.VirtualMachine` data source can be used to find the UUID of an + * existing virtual machine or template. The most common purpose is for finding + * 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`. + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetVirtualMachineArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var template = VsphereFunctions.getVirtualMachine(GetVirtualMachineArgs.builder()
+     *             .name("ubuntu-server-template")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + * In the following example, each virtual machine template is returned by its + * unique full path within the `vsphere.Datacenter`. + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetVirtualMachineArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var productionTemplate = VsphereFunctions.getVirtualMachine(GetVirtualMachineArgs.builder()
+     *             .name("production/templates/ubuntu-server-template")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *         final var developmentTemplate = VsphereFunctions.getVirtualMachine(GetVirtualMachineArgs.builder()
+     *             .name("development/templates/ubuntu-server-template")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getVirtualMachine(GetVirtualMachineArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getVirtualMachine:getVirtualMachine", TypeShape.of(GetVirtualMachineResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.VirtualMachine` data source can be used to find the UUID of an * existing virtual machine or template. The most common purpose is for finding @@ -7267,6 +8873,64 @@ public static CompletableFuture getVmfsDisksPlain(GetVmfsDis public static Output getVmfsDisks(GetVmfsDisksArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("vsphere:index/getVmfsDisks:getVmfsDisks", TypeShape.of(GetVmfsDisksResult.class), args, Utilities.withVersion(options)); } + /** + * The `vsphere.getVmfsDisks` data source can be used to discover the storage + * 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 + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.vsphere.VsphereFunctions;
+     * import com.pulumi.vsphere.inputs.GetDatacenterArgs;
+     * import com.pulumi.vsphere.inputs.GetHostArgs;
+     * import com.pulumi.vsphere.inputs.GetVmfsDisksArgs;
+     * import java.util.List;
+     * import java.util.ArrayList;
+     * import java.util.Map;
+     * import java.io.File;
+     * import java.nio.file.Files;
+     * import java.nio.file.Paths;
+     * 
+     * public class App {
+     *     public static void main(String[] args) {
+     *         Pulumi.run(App::stack);
+     *     }
+     * 
+     *     public static void stack(Context ctx) {
+     *         final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
+     *             .name("dc-01")
+     *             .build());
+     * 
+     *         final var host = VsphereFunctions.getHost(GetHostArgs.builder()
+     *             .name("esxi-01.example.com")
+     *             .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
+     *             .build());
+     * 
+     *         final var vmfsDisks = VsphereFunctions.getVmfsDisks(GetVmfsDisksArgs.builder()
+     *             .hostSystemId(host.applyValue(getHostResult -> getHostResult.id()))
+     *             .rescan(true)
+     *             .filter("mpx.vmhba1:C0:T[12]:L0")
+     *             .build());
+     * 
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getVmfsDisks(GetVmfsDisksArgs args, InvokeOutputOptions options) { + return Deployment.getInstance().invoke("vsphere:index/getVmfsDisks:getVmfsDisks", TypeShape.of(GetVmfsDisksResult.class), args, Utilities.withVersion(options)); + } /** * The `vsphere.getVmfsDisks` data source can be used to discover the storage * devices available on an ESXi host. This data source can be combined with the diff --git a/sdk/nodejs/computeClusterVmAffinityRule.ts b/sdk/nodejs/computeClusterVmAffinityRule.ts index 878f8903..7ed9d4ea 100644 --- a/sdk/nodejs/computeClusterVmAffinityRule.ts +++ b/sdk/nodejs/computeClusterVmAffinityRule.ts @@ -74,7 +74,7 @@ import * as utilities from "./utilities"; * const vmAffinityRule = new vsphere.ComputeClusterVmAffinityRule("vm_affinity_rule", { * name: "vm-affinity-rule", * computeClusterId: cluster.then(cluster => cluster.id), - * virtualMachineIds: vm.map((v, k) => [k, v]).map(([, ]) => (v.id)), + * virtualMachineIds: vm.map((v, k) => [k, v]).map(([k, v]) => (v.id)), * }); * ``` * diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index c6411e7d..6aba52b2 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -13,7 +13,7 @@ "build": "tsc" }, "dependencies": { - "@pulumi/pulumi": "^3.136.0", + "@pulumi/pulumi": "^3.142.0", "builtin-modules": "3.0.0", "read-package-tree": "^5.2.1", "resolve": "^1.8.1" diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index 04cf6a59..b46ee530 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "pulumi_vsphere" description = "A Pulumi package for creating vsphere resources" - dependencies = ["parver>=0.2.1", "pulumi>=3.136.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""] + dependencies = ["parver>=0.2.1", "pulumi>=3.142.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""] keywords = ["pulumi", "vsphere"] readme = "README.md" - requires-python = ">=3.8" + requires-python = ">=3.9" version = "4.0.0a0+dev" [project.license] text = "Apache-2.0"