xenorchestra v1.5.0 published on Friday, Mar 7, 2025 by Vates
xenorchestra.getXoaHost
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as xenorchestra from "@pulumi/xenorchestra";
import * as xenorchestra from "@vates/pulumi-xenorchestra";
const host1 = xenorchestra.getXoaHost({
    nameLabel: "Your host",
});
const node = new xenorchestra.Vm("node", {affinityHost: host1.then(host1 => host1.id)});
import pulumi
import pulumi_xenorchestra as xenorchestra
host1 = xenorchestra.get_xoa_host(name_label="Your host")
node = xenorchestra.Vm("node", affinity_host=host1.id)
package main
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/vatesfr/pulumi-xenorchestra/sdk/go/xenorchestra"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		host1, err := xenorchestra.GetXoaHost(ctx, &xenorchestra.GetXoaHostArgs{
			NameLabel: "Your host",
		}, nil)
		if err != nil {
			return err
		}
		_, err = xenorchestra.NewVm(ctx, "node", &xenorchestra.VmArgs{
			AffinityHost: pulumi.String(host1.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Xenorchestra = Pulumi.Xenorchestra;
return await Deployment.RunAsync(() => 
{
    var host1 = Xenorchestra.GetXoaHost.Invoke(new()
    {
        NameLabel = "Your host",
    });
    var node = new Xenorchestra.Vm("node", new()
    {
        AffinityHost = host1.Apply(getXoaHostResult => getXoaHostResult.Id),
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.xenorchestra.XenorchestraFunctions;
import com.pulumi.xenorchestra.inputs.GetXoaHostArgs;
import com.pulumi.xenorchestra.Vm;
import com.pulumi.xenorchestra.VmArgs;
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 host1 = XenorchestraFunctions.getXoaHost(GetXoaHostArgs.builder()
            .nameLabel("Your host")
            .build());
        var node = new Vm("node", VmArgs.builder()
            .affinityHost(host1.applyValue(getXoaHostResult -> getXoaHostResult.id()))
            .build());
    }
}
resources:
  node:
    type: xenorchestra:Vm
    properties:
      affinityHost: ${host1.id}
variables:
  host1:
    fn::invoke:
      function: xenorchestra:getXoaHost
      arguments:
        nameLabel: Your host
Using getXoaHost
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 getXoaHost(args: GetXoaHostArgs, opts?: InvokeOptions): Promise<GetXoaHostResult>
function getXoaHostOutput(args: GetXoaHostOutputArgs, opts?: InvokeOptions): Output<GetXoaHostResult>def get_xoa_host(name_label: Optional[str] = None,
                 tags: Optional[Sequence[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetXoaHostResult
def get_xoa_host_output(name_label: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetXoaHostResult]func GetXoaHost(ctx *Context, args *GetXoaHostArgs, opts ...InvokeOption) (*GetXoaHostResult, error)
func GetXoaHostOutput(ctx *Context, args *GetXoaHostOutputArgs, opts ...InvokeOption) GetXoaHostResultOutput> Note: This function is named GetXoaHost in the Go SDK.
public static class GetXoaHost 
{
    public static Task<GetXoaHostResult> InvokeAsync(GetXoaHostArgs args, InvokeOptions? opts = null)
    public static Output<GetXoaHostResult> Invoke(GetXoaHostInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetXoaHostResult> getXoaHost(GetXoaHostArgs args, InvokeOptions options)
public static Output<GetXoaHostResult> getXoaHost(GetXoaHostArgs args, InvokeOptions options)
fn::invoke:
  function: xenorchestra:index/getXoaHost:getXoaHost
  arguments:
    # arguments dictionaryThe following arguments are supported:
- NameLabel string
- The name label of the host.
- List<string>
- The tags (labels) applied to the given entity.
- NameLabel string
- The name label of the host.
- []string
- The tags (labels) applied to the given entity.
- nameLabel String
- The name label of the host.
- List<String>
- The tags (labels) applied to the given entity.
- nameLabel string
- The name label of the host.
- string[]
- The tags (labels) applied to the given entity.
- name_label str
- The name label of the host.
- Sequence[str]
- The tags (labels) applied to the given entity.
- nameLabel String
- The name label of the host.
- List<String>
- The tags (labels) applied to the given entity.
getXoaHost Result
The following output properties are available:
- Cpus Dictionary<string, int>
- CPU information about the host. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
- Id string
- The provider-assigned unique ID for this managed resource.
- Memory double
- The memory size of the host.
- MemoryUsage double
- The memory usage of the host.
- NameLabel string
- The name label of the host.
- PoolId string
- Id of the pool that the host belongs to.
- List<string>
- The tags (labels) applied to the given entity.
- Cpus map[string]int
- CPU information about the host. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
- Id string
- The provider-assigned unique ID for this managed resource.
- Memory float64
- The memory size of the host.
- MemoryUsage float64
- The memory usage of the host.
- NameLabel string
- The name label of the host.
- PoolId string
- Id of the pool that the host belongs to.
- []string
- The tags (labels) applied to the given entity.
- cpus Map<String,Integer>
- CPU information about the host. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
- id String
- The provider-assigned unique ID for this managed resource.
- memory Double
- The memory size of the host.
- memoryUsage Double
- The memory usage of the host.
- nameLabel String
- The name label of the host.
- poolId String
- Id of the pool that the host belongs to.
- List<String>
- The tags (labels) applied to the given entity.
- cpus {[key: string]: number}
- CPU information about the host. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
- id string
- The provider-assigned unique ID for this managed resource.
- memory number
- The memory size of the host.
- memoryUsage number
- The memory usage of the host.
- nameLabel string
- The name label of the host.
- poolId string
- Id of the pool that the host belongs to.
- string[]
- The tags (labels) applied to the given entity.
- cpus Mapping[str, int]
- CPU information about the host. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
- id str
- The provider-assigned unique ID for this managed resource.
- memory float
- The memory size of the host.
- memory_usage float
- The memory usage of the host.
- name_label str
- The name label of the host.
- pool_id str
- Id of the pool that the host belongs to.
- Sequence[str]
- The tags (labels) applied to the given entity.
- cpus Map<Number>
- CPU information about the host. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
- id String
- The provider-assigned unique ID for this managed resource.
- memory Number
- The memory size of the host.
- memoryUsage Number
- The memory usage of the host.
- nameLabel String
- The name label of the host.
- poolId String
- Id of the pool that the host belongs to.
- List<String>
- The tags (labels) applied to the given entity.
Package Details
- Repository
- xenorchestra vatesfr/pulumi-xenorchestra
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the xenorchestraTerraform Provider.
