1. Packages
  2. Openstack Provider
  3. API Docs
  4. compute
  5. getHypervisorV2
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

openstack.compute.getHypervisorV2

Explore with Pulumi AI

OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

Use this data source to get information about hypervisors by hostname.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const host01 = openstack.compute.getHypervisorV2({
    hostname: "host01",
});
Copy
import pulumi
import pulumi_openstack as openstack

host01 = openstack.compute.get_hypervisor_v2(hostname="host01")
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.GetHypervisorV2(ctx, &compute.GetHypervisorV2Args{
			Hostname: "host01",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var host01 = OpenStack.Compute.GetHypervisorV2.Invoke(new()
    {
        Hostname = "host01",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.compute.ComputeFunctions;
import com.pulumi.openstack.compute.inputs.GetHypervisorV2Args;
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 host01 = ComputeFunctions.getHypervisorV2(GetHypervisorV2Args.builder()
            .hostname("host01")
            .build());

    }
}
Copy
variables:
  host01:
    fn::invoke:
      Function: openstack:compute:getHypervisorV2
      Arguments:
        hostname: host01
Copy

Using getHypervisorV2

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 getHypervisorV2(args: GetHypervisorV2Args, opts?: InvokeOptions): Promise<GetHypervisorV2Result>
function getHypervisorV2Output(args: GetHypervisorV2OutputArgs, opts?: InvokeOptions): Output<GetHypervisorV2Result>
Copy
def get_hypervisor_v2(hostname: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetHypervisorV2Result
def get_hypervisor_v2_output(hostname: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetHypervisorV2Result]
Copy
func GetHypervisorV2(ctx *Context, args *GetHypervisorV2Args, opts ...InvokeOption) (*GetHypervisorV2Result, error)
func GetHypervisorV2Output(ctx *Context, args *GetHypervisorV2OutputArgs, opts ...InvokeOption) GetHypervisorV2ResultOutput
Copy

> Note: This function is named GetHypervisorV2 in the Go SDK.

public static class GetHypervisorV2 
{
    public static Task<GetHypervisorV2Result> InvokeAsync(GetHypervisorV2Args args, InvokeOptions? opts = null)
    public static Output<GetHypervisorV2Result> Invoke(GetHypervisorV2InvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetHypervisorV2Result> getHypervisorV2(GetHypervisorV2Args args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Copy
fn::invoke:
  function: openstack:compute/getHypervisorV2:getHypervisorV2
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Hostname This property is required. string
The hostname of the hypervisor
Hostname This property is required. string
The hostname of the hypervisor
hostname This property is required. String
The hostname of the hypervisor
hostname This property is required. string
The hostname of the hypervisor
hostname This property is required. str
The hostname of the hypervisor
hostname This property is required. String
The hostname of the hypervisor

getHypervisorV2 Result

The following output properties are available:

Disk int
The amount in GigaBytes of local storage the hypervisor can provide
HostIp string
The IP address of the Hypervisor
Hostname string
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
Memory int
The number in MegaBytes of memory the hypervisor can provide
State string
The state of the hypervisor (up or down)
Status string
The status of the hypervisor (enabled or disabled)
Type string
The type of the hypervisor (example: QEMU)
Vcpus int
The number of virtual CPUs the hypervisor can provide
Disk int
The amount in GigaBytes of local storage the hypervisor can provide
HostIp string
The IP address of the Hypervisor
Hostname string
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
Memory int
The number in MegaBytes of memory the hypervisor can provide
State string
The state of the hypervisor (up or down)
Status string
The status of the hypervisor (enabled or disabled)
Type string
The type of the hypervisor (example: QEMU)
Vcpus int
The number of virtual CPUs the hypervisor can provide
disk Integer
The amount in GigaBytes of local storage the hypervisor can provide
hostIp String
The IP address of the Hypervisor
hostname String
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
memory Integer
The number in MegaBytes of memory the hypervisor can provide
state String
The state of the hypervisor (up or down)
status String
The status of the hypervisor (enabled or disabled)
type String
The type of the hypervisor (example: QEMU)
vcpus Integer
The number of virtual CPUs the hypervisor can provide
disk number
The amount in GigaBytes of local storage the hypervisor can provide
hostIp string
The IP address of the Hypervisor
hostname string
See Argument Reference above.
id string
The provider-assigned unique ID for this managed resource.
memory number
The number in MegaBytes of memory the hypervisor can provide
state string
The state of the hypervisor (up or down)
status string
The status of the hypervisor (enabled or disabled)
type string
The type of the hypervisor (example: QEMU)
vcpus number
The number of virtual CPUs the hypervisor can provide
disk int
The amount in GigaBytes of local storage the hypervisor can provide
host_ip str
The IP address of the Hypervisor
hostname str
See Argument Reference above.
id str
The provider-assigned unique ID for this managed resource.
memory int
The number in MegaBytes of memory the hypervisor can provide
state str
The state of the hypervisor (up or down)
status str
The status of the hypervisor (enabled or disabled)
type str
The type of the hypervisor (example: QEMU)
vcpus int
The number of virtual CPUs the hypervisor can provide
disk Number
The amount in GigaBytes of local storage the hypervisor can provide
hostIp String
The IP address of the Hypervisor
hostname String
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
memory Number
The number in MegaBytes of memory the hypervisor can provide
state String
The state of the hypervisor (up or down)
status String
The status of the hypervisor (enabled or disabled)
type String
The type of the hypervisor (example: QEMU)
vcpus Number
The number of virtual CPUs the hypervisor can provide

Package Details

Repository
OpenStack pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi