1. Packages
  2. Ibm Provider
  3. API Docs
  4. getPiHost
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getPiHost

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a read-only data source to retrieve information about a host. For more information, about IBM power virtual server cloud, see getting started with IBM Power Systems Virtual Servers.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const host = ibm.getPiHost({
        piCloudInstanceId: "<value of the pi_cloud_instance_id>",
        piHostId: "<value of the pi_host_id>",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    host = ibm.get_pi_host(pi_cloud_instance_id="<value of the pi_cloud_instance_id>",
        pi_host_id="<value of the pi_host_id>")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupPiHost(ctx, &ibm.LookupPiHostArgs{
    			PiCloudInstanceId: "<value of the pi_cloud_instance_id>",
    			PiHostId:          "<value of the pi_host_id>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var host = Ibm.GetPiHost.Invoke(new()
        {
            PiCloudInstanceId = "<value of the pi_cloud_instance_id>",
            PiHostId = "<value of the pi_host_id>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetPiHostArgs;
    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 host = IbmFunctions.getPiHost(GetPiHostArgs.builder()
                .piCloudInstanceId("<value of the pi_cloud_instance_id>")
                .piHostId("<value of the pi_host_id>")
                .build());
    
        }
    }
    
    variables:
      host:
        fn::invoke:
          function: ibm:getPiHost
          arguments:
            piCloudInstanceId: <value of the pi_cloud_instance_id>
            piHostId: <value of the pi_host_id>
    

    Notes

    • Please find supported Regions for endpoints.
    • If a Power cloud instance is provisioned at lon04, The provider level attributes should be as follows:
      • region - lon
      • zone - lon04

    Example usage:

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    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) {
        }
    }
    
    {}
    

    Using getPiHost

    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 getPiHost(args: GetPiHostArgs, opts?: InvokeOptions): Promise<GetPiHostResult>
    function getPiHostOutput(args: GetPiHostOutputArgs, opts?: InvokeOptions): Output<GetPiHostResult>
    def get_pi_host(id: Optional[str] = None,
                    pi_cloud_instance_id: Optional[str] = None,
                    pi_host_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetPiHostResult
    def get_pi_host_output(id: Optional[pulumi.Input[str]] = None,
                    pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
                    pi_host_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetPiHostResult]
    func LookupPiHost(ctx *Context, args *LookupPiHostArgs, opts ...InvokeOption) (*LookupPiHostResult, error)
    func LookupPiHostOutput(ctx *Context, args *LookupPiHostOutputArgs, opts ...InvokeOption) LookupPiHostResultOutput

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

    public static class GetPiHost 
    {
        public static Task<GetPiHostResult> InvokeAsync(GetPiHostArgs args, InvokeOptions? opts = null)
        public static Output<GetPiHostResult> Invoke(GetPiHostInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPiHostResult> getPiHost(GetPiHostArgs args, InvokeOptions options)
    public static Output<GetPiHostResult> getPiHost(GetPiHostArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPiHost:getPiHost
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiHostId string
    Host ID.
    Id string
    (String) The unique identifier of the host.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    PiHostId string
    Host ID.
    Id string
    (String) The unique identifier of the host.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piHostId String
    Host ID.
    id String
    (String) The unique identifier of the host.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    piHostId string
    Host ID.
    id string
    (String) The unique identifier of the host.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    pi_host_id str
    Host ID.
    id str
    (String) The unique identifier of the host.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    piHostId String
    Host ID.
    id String
    (String) The unique identifier of the host.

    getPiHost Result

    The following output properties are available:

    Capacities List<GetPiHostCapacity>
    (List) Capacities of the host.
    Crn string
    (String) The CRN of this resource.
    DisplayName string
    (String) Name of the host.
    HostGroup Dictionary<string, string>
    (Map) Information about the owning host group.
    HostReference double
    (Integer) Current physical ID of the host.
    Id string
    (String) The unique identifier of the host.
    PiCloudInstanceId string
    PiHostId string
    State string
    (String) State of the host up or down.
    Status string
    (String) Status of the host enabled or disabled.
    SysType string
    (String) System type.
    UserTags List<string>
    (List) List of user tags attached to the resource.
    Capacities []GetPiHostCapacity
    (List) Capacities of the host.
    Crn string
    (String) The CRN of this resource.
    DisplayName string
    (String) Name of the host.
    HostGroup map[string]string
    (Map) Information about the owning host group.
    HostReference float64
    (Integer) Current physical ID of the host.
    Id string
    (String) The unique identifier of the host.
    PiCloudInstanceId string
    PiHostId string
    State string
    (String) State of the host up or down.
    Status string
    (String) Status of the host enabled or disabled.
    SysType string
    (String) System type.
    UserTags []string
    (List) List of user tags attached to the resource.
    capacities List<GetPiHostCapacity>
    (List) Capacities of the host.
    crn String
    (String) The CRN of this resource.
    displayName String
    (String) Name of the host.
    hostGroup Map<String,String>
    (Map) Information about the owning host group.
    hostReference Double
    (Integer) Current physical ID of the host.
    id String
    (String) The unique identifier of the host.
    piCloudInstanceId String
    piHostId String
    state String
    (String) State of the host up or down.
    status String
    (String) Status of the host enabled or disabled.
    sysType String
    (String) System type.
    userTags List<String>
    (List) List of user tags attached to the resource.
    capacities GetPiHostCapacity[]
    (List) Capacities of the host.
    crn string
    (String) The CRN of this resource.
    displayName string
    (String) Name of the host.
    hostGroup {[key: string]: string}
    (Map) Information about the owning host group.
    hostReference number
    (Integer) Current physical ID of the host.
    id string
    (String) The unique identifier of the host.
    piCloudInstanceId string
    piHostId string
    state string
    (String) State of the host up or down.
    status string
    (String) Status of the host enabled or disabled.
    sysType string
    (String) System type.
    userTags string[]
    (List) List of user tags attached to the resource.
    capacities Sequence[GetPiHostCapacity]
    (List) Capacities of the host.
    crn str
    (String) The CRN of this resource.
    display_name str
    (String) Name of the host.
    host_group Mapping[str, str]
    (Map) Information about the owning host group.
    host_reference float
    (Integer) Current physical ID of the host.
    id str
    (String) The unique identifier of the host.
    pi_cloud_instance_id str
    pi_host_id str
    state str
    (String) State of the host up or down.
    status str
    (String) Status of the host enabled or disabled.
    sys_type str
    (String) System type.
    user_tags Sequence[str]
    (List) List of user tags attached to the resource.
    capacities List<Property Map>
    (List) Capacities of the host.
    crn String
    (String) The CRN of this resource.
    displayName String
    (String) Name of the host.
    hostGroup Map<String>
    (Map) Information about the owning host group.
    hostReference Number
    (Integer) Current physical ID of the host.
    id String
    (String) The unique identifier of the host.
    piCloudInstanceId String
    piHostId String
    state String
    (String) State of the host up or down.
    status String
    (String) Status of the host enabled or disabled.
    sysType String
    (String) System type.
    userTags List<String>
    (List) List of user tags attached to the resource.

    Supporting Types

    GetPiHostCapacity

    AvailableCores double
    AvailableMemory double
    (Float) Amount of memory currently available (in GB).
    ReservedCore double
    (Float) Number of cores reserved for system use.
    ReservedMemory double
    (Float) Amount of memory reserved for system use (in GB).
    TotalCore double
    (Float) Total number of cores of the host.
    TotalMemory double
    (Float) Total amount of memory of the host (in GB).
    UsedCore double
    (Float) Number of cores in use on the host.
    UsedMemory double
    (Float) Amount of memory used on the host (in GB).
    AvailableCores float64
    AvailableMemory float64
    (Float) Amount of memory currently available (in GB).
    ReservedCore float64
    (Float) Number of cores reserved for system use.
    ReservedMemory float64
    (Float) Amount of memory reserved for system use (in GB).
    TotalCore float64
    (Float) Total number of cores of the host.
    TotalMemory float64
    (Float) Total amount of memory of the host (in GB).
    UsedCore float64
    (Float) Number of cores in use on the host.
    UsedMemory float64
    (Float) Amount of memory used on the host (in GB).
    availableCores Double
    availableMemory Double
    (Float) Amount of memory currently available (in GB).
    reservedCore Double
    (Float) Number of cores reserved for system use.
    reservedMemory Double
    (Float) Amount of memory reserved for system use (in GB).
    totalCore Double
    (Float) Total number of cores of the host.
    totalMemory Double
    (Float) Total amount of memory of the host (in GB).
    usedCore Double
    (Float) Number of cores in use on the host.
    usedMemory Double
    (Float) Amount of memory used on the host (in GB).
    availableCores number
    availableMemory number
    (Float) Amount of memory currently available (in GB).
    reservedCore number
    (Float) Number of cores reserved for system use.
    reservedMemory number
    (Float) Amount of memory reserved for system use (in GB).
    totalCore number
    (Float) Total number of cores of the host.
    totalMemory number
    (Float) Total amount of memory of the host (in GB).
    usedCore number
    (Float) Number of cores in use on the host.
    usedMemory number
    (Float) Amount of memory used on the host (in GB).
    available_cores float
    available_memory float
    (Float) Amount of memory currently available (in GB).
    reserved_core float
    (Float) Number of cores reserved for system use.
    reserved_memory float
    (Float) Amount of memory reserved for system use (in GB).
    total_core float
    (Float) Total number of cores of the host.
    total_memory float
    (Float) Total amount of memory of the host (in GB).
    used_core float
    (Float) Number of cores in use on the host.
    used_memory float
    (Float) Amount of memory used on the host (in GB).
    availableCores Number
    availableMemory Number
    (Float) Amount of memory currently available (in GB).
    reservedCore Number
    (Float) Number of cores reserved for system use.
    reservedMemory Number
    (Float) Amount of memory reserved for system use (in GB).
    totalCore Number
    (Float) Total number of cores of the host.
    totalMemory Number
    (Float) Total amount of memory of the host (in GB).
    usedCore Number
    (Float) Number of cores in use on the host.
    usedMemory Number
    (Float) Amount of memory used on the host (in GB).

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud