ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud
ibm.getPiHost
Explore with Pulumi AI
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-lonzone-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 dictionaryThe following arguments are supported:
- Pi
Cloud stringInstance Id  - The GUID of the service instance associated with an account.
 - Pi
Host stringId  - Host ID.
 - Id string
 - (String) The unique identifier of the host.
 
- Pi
Cloud stringInstance Id  - The GUID of the service instance associated with an account.
 - Pi
Host stringId  - Host ID.
 - Id string
 - (String) The unique identifier of the host.
 
- pi
Cloud StringInstance Id  - The GUID of the service instance associated with an account.
 - pi
Host StringId  - Host ID.
 - id String
 - (String) The unique identifier of the host.
 
- pi
Cloud stringInstance Id  - The GUID of the service instance associated with an account.
 - pi
Host stringId  - Host ID.
 - id string
 - (String) The unique identifier of the host.
 
- pi_
cloud_ strinstance_ id  - The GUID of the service instance associated with an account.
 - pi_
host_ strid  - Host ID.
 - id str
 - (String) The unique identifier of the host.
 
- pi
Cloud StringInstance Id  - The GUID of the service instance associated with an account.
 - pi
Host StringId  - Host ID.
 - id String
 - (String) The unique identifier of the host.
 
getPiHost Result
The following output properties are available:
- Capacities
List<Get
Pi Host Capacity>  - (List) Capacities of the host.
 - Crn string
 - (String) The CRN of this resource.
 - Display
Name string - (String) Name of the host.
 - Host
Group Dictionary<string, string> - (Map) Information about the owning host group.
 - Host
Reference double - (Integer) Current physical ID of the host.
 - Id string
 - (String) The unique identifier of the host.
 - Pi
Cloud stringInstance Id  - Pi
Host stringId  - State string
 - (String) State of the host 
upordown. - Status string
 - (String) Status of the host 
enabledordisabled. - Sys
Type string - (String) System type.
 - List<string>
 - (List) List of user tags attached to the resource.
 
- Capacities
[]Get
Pi Host Capacity  - (List) Capacities of the host.
 - Crn string
 - (String) The CRN of this resource.
 - Display
Name string - (String) Name of the host.
 - Host
Group map[string]string - (Map) Information about the owning host group.
 - Host
Reference float64 - (Integer) Current physical ID of the host.
 - Id string
 - (String) The unique identifier of the host.
 - Pi
Cloud stringInstance Id  - Pi
Host stringId  - State string
 - (String) State of the host 
upordown. - Status string
 - (String) Status of the host 
enabledordisabled. - Sys
Type string - (String) System type.
 - []string
 - (List) List of user tags attached to the resource.
 
- capacities
List<Get
Pi Host Capacity>  - (List) Capacities of the host.
 - crn String
 - (String) The CRN of this resource.
 - display
Name String - (String) Name of the host.
 - host
Group Map<String,String> - (Map) Information about the owning host group.
 - host
Reference Double - (Integer) Current physical ID of the host.
 - id String
 - (String) The unique identifier of the host.
 - pi
Cloud StringInstance Id  - pi
Host StringId  - state String
 - (String) State of the host 
upordown. - status String
 - (String) Status of the host 
enabledordisabled. - sys
Type String - (String) System type.
 - List<String>
 - (List) List of user tags attached to the resource.
 
- capacities
Get
Pi Host Capacity[]  - (List) Capacities of the host.
 - crn string
 - (String) The CRN of this resource.
 - display
Name string - (String) Name of the host.
 - host
Group {[key: string]: string} - (Map) Information about the owning host group.
 - host
Reference number - (Integer) Current physical ID of the host.
 - id string
 - (String) The unique identifier of the host.
 - pi
Cloud stringInstance Id  - pi
Host stringId  - state string
 - (String) State of the host 
upordown. - status string
 - (String) Status of the host 
enabledordisabled. - sys
Type string - (String) System type.
 - string[]
 - (List) List of user tags attached to the resource.
 
- capacities
Sequence[Get
Pi Host Capacity]  - (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_ strinstance_ id  - pi_
host_ strid  - state str
 - (String) State of the host 
upordown. - status str
 - (String) Status of the host 
enabledordisabled. - sys_
type str - (String) System type.
 - 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.
 - display
Name String - (String) Name of the host.
 - host
Group Map<String> - (Map) Information about the owning host group.
 - host
Reference Number - (Integer) Current physical ID of the host.
 - id String
 - (String) The unique identifier of the host.
 - pi
Cloud StringInstance Id  - pi
Host StringId  - state String
 - (String) State of the host 
upordown. - status String
 - (String) Status of the host 
enabledordisabled. - sys
Type String - (String) System type.
 - List<String>
 - (List) List of user tags attached to the resource.
 
Supporting Types
GetPiHostCapacity   
- Available
Cores double - Available
Memory double - (Float) Amount of memory currently available (in GB).
 - Reserved
Core double - (Float) Number of cores reserved for system use.
 - Reserved
Memory double - (Float) Amount of memory reserved for system use (in GB).
 - Total
Core double - (Float) Total number of cores of the host.
 - Total
Memory double - (Float) Total amount of memory of the host (in GB).
 - Used
Core double - (Float) Number of cores in use on the host.
 - Used
Memory double - (Float) Amount of memory used on the host (in GB).
 
- Available
Cores float64 - Available
Memory float64 - (Float) Amount of memory currently available (in GB).
 - Reserved
Core float64 - (Float) Number of cores reserved for system use.
 - Reserved
Memory float64 - (Float) Amount of memory reserved for system use (in GB).
 - Total
Core float64 - (Float) Total number of cores of the host.
 - Total
Memory float64 - (Float) Total amount of memory of the host (in GB).
 - Used
Core float64 - (Float) Number of cores in use on the host.
 - Used
Memory float64 - (Float) Amount of memory used on the host (in GB).
 
- available
Cores Double - available
Memory Double - (Float) Amount of memory currently available (in GB).
 - reserved
Core Double - (Float) Number of cores reserved for system use.
 - reserved
Memory Double - (Float) Amount of memory reserved for system use (in GB).
 - total
Core Double - (Float) Total number of cores of the host.
 - total
Memory Double - (Float) Total amount of memory of the host (in GB).
 - used
Core Double - (Float) Number of cores in use on the host.
 - used
Memory Double - (Float) Amount of memory used on the host (in GB).
 
- available
Cores number - available
Memory number - (Float) Amount of memory currently available (in GB).
 - reserved
Core number - (Float) Number of cores reserved for system use.
 - reserved
Memory number - (Float) Amount of memory reserved for system use (in GB).
 - total
Core number - (Float) Total number of cores of the host.
 - total
Memory number - (Float) Total amount of memory of the host (in GB).
 - used
Core number - (Float) Number of cores in use on the host.
 - used
Memory 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).
 
- available
Cores Number - available
Memory Number - (Float) Amount of memory currently available (in GB).
 - reserved
Core Number - (Float) Number of cores reserved for system use.
 - reserved
Memory Number - (Float) Amount of memory reserved for system use (in GB).
 - total
Core Number - (Float) Total number of cores of the host.
 - total
Memory Number - (Float) Total amount of memory of the host (in GB).
 - used
Core Number - (Float) Number of cores in use on the host.
 - used
Memory 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 
ibmTerraform Provider.