vSphere v4.12.1 published on Tuesday, Oct 22, 2024 by Pulumi
vsphere.getHostBaseImages
Explore with Pulumi AI
The vsphere.getHostBaseImages
data source can be used to get the list of ESXi
base images available for cluster software management.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const baseImages = vsphere.getHostBaseImages({});
import pulumi
import pulumi_vsphere as vsphere
base_images = vsphere.get_host_base_images()
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vsphere.GetHostBaseImages(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using VSphere = Pulumi.VSphere;
return await Deployment.RunAsync(() =>
{
var baseImages = VSphere.GetHostBaseImages.Invoke();
});
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();
}
}
variables:
baseImages:
fn::invoke:
Function: vsphere:getHostBaseImages
Arguments: {}
Using getHostBaseImages
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getHostBaseImages(opts?: InvokeOptions): Promise<GetHostBaseImagesResult>
function getHostBaseImagesOutput(opts?: InvokeOptions): Output<GetHostBaseImagesResult>
def get_host_base_images(opts: Optional[InvokeOptions] = None) -> GetHostBaseImagesResult
def get_host_base_images_output(opts: Optional[InvokeOptions] = None) -> Output[GetHostBaseImagesResult]
func GetHostBaseImages(ctx *Context, opts ...InvokeOption) (*GetHostBaseImagesResult, error)
func GetHostBaseImagesOutput(ctx *Context, opts ...InvokeOption) GetHostBaseImagesResultOutput
> Note: This function is named GetHostBaseImages
in the Go SDK.
public static class GetHostBaseImages
{
public static Task<GetHostBaseImagesResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetHostBaseImagesResult> Invoke(InvokeOptions? opts = null)
}
public static CompletableFuture<GetHostBaseImagesResult> getHostBaseImages(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: vsphere:index/getHostBaseImages:getHostBaseImages
arguments:
# arguments dictionary
getHostBaseImages Result
The following output properties are available:
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphere
Terraform Provider.