1. Packages
  2. Opennebula Provider
  3. API Docs
  4. getHost
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

opennebula.getHost

Explore with Pulumi AI

opennebula logo
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

    Use this data source to retrieve the host information for a given name.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opennebula from "@pulumi/opennebula";
    
    const example = opennebula.getHost({
        name: "My_Host",
    });
    
    import pulumi
    import pulumi_opennebula as opennebula
    
    example = opennebula.get_host(name="My_Host")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opennebula/opennebula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opennebula.LookupHost(ctx, &opennebula.LookupHostArgs{
    			Name: pulumi.StringRef("My_Host"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opennebula = Pulumi.Opennebula;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Opennebula.GetHost.Invoke(new()
        {
            Name = "My_Host",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opennebula.OpennebulaFunctions;
    import com.pulumi.opennebula.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 example = OpennebulaFunctions.getHost(GetHostArgs.builder()
                .name("My_Host")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: opennebula:getHost
          arguments:
            name: My_Host
    

    Using getHost

    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 getHost(args: GetHostArgs, opts?: InvokeOptions): Promise<GetHostResult>
    function getHostOutput(args: GetHostOutputArgs, opts?: InvokeOptions): Output<GetHostResult>
    def get_host(id: Optional[float] = None,
                 name: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetHostResult
    def get_host_output(id: Optional[pulumi.Input[float]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetHostResult]
    func LookupHost(ctx *Context, args *LookupHostArgs, opts ...InvokeOption) (*LookupHostResult, error)
    func LookupHostOutput(ctx *Context, args *LookupHostOutputArgs, opts ...InvokeOption) LookupHostResultOutput

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

    public static class GetHost 
    {
        public static Task<GetHostResult> InvokeAsync(GetHostArgs args, InvokeOptions? opts = null)
        public static Output<GetHostResult> Invoke(GetHostInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetHostResult> getHost(GetHostArgs args, InvokeOptions options)
    public static Output<GetHostResult> getHost(GetHostArgs args, InvokeOptions options)
    
    fn::invoke:
      function: opennebula:index/getHost:getHost
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id double
    ID of the host.
    Name string
    The OpenNebula host to retrieve information for.
    Tags Dictionary<string, string>
    Tags associated to the host.
    Id float64
    ID of the host.
    Name string
    The OpenNebula host to retrieve information for.
    Tags map[string]string
    Tags associated to the host.
    id Double
    ID of the host.
    name String
    The OpenNebula host to retrieve information for.
    tags Map<String,String>
    Tags associated to the host.
    id number
    ID of the host.
    name string
    The OpenNebula host to retrieve information for.
    tags {[key: string]: string}
    Tags associated to the host.
    id float
    ID of the host.
    name str
    The OpenNebula host to retrieve information for.
    tags Mapping[str, str]
    Tags associated to the host.
    id Number
    ID of the host.
    name String
    The OpenNebula host to retrieve information for.
    tags Map<String>
    Tags associated to the host.

    getHost Result

    The following output properties are available:

    Id double
    ID of the host.
    Name string
    Name of the host.
    Tags Dictionary<string, string>
    Tags of the host (Key = Value).
    Id float64
    ID of the host.
    Name string
    Name of the host.
    Tags map[string]string
    Tags of the host (Key = Value).
    id Double
    ID of the host.
    name String
    Name of the host.
    tags Map<String,String>
    Tags of the host (Key = Value).
    id number
    ID of the host.
    name string
    Name of the host.
    tags {[key: string]: string}
    Tags of the host (Key = Value).
    id float
    ID of the host.
    name str
    Name of the host.
    tags Mapping[str, str]
    Tags of the host (Key = Value).
    id Number
    ID of the host.
    name String
    Name of the host.
    tags Map<String>
    Tags of the host (Key = Value).

    Package Details

    Repository
    opennebula opennebula/terraform-provider-opennebula
    License
    Notes
    This Pulumi package is based on the opennebula Terraform Provider.
    opennebula logo
    opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula