ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getPiHosts
Explore with Pulumi AI
Provides a read-only data source to retrieve information about hosts. 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 hosts = ibm.getPiHosts({
piCloudInstanceId: "<value of the cloud_instance_id>",
});
import pulumi
import pulumi_ibm as ibm
hosts = ibm.get_pi_hosts(pi_cloud_instance_id="<value of the cloud_instance_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.GetPiHosts(ctx, &ibm.GetPiHostsArgs{
PiCloudInstanceId: "<value of the cloud_instance_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 hosts = Ibm.GetPiHosts.Invoke(new()
{
PiCloudInstanceId = "<value of the cloud_instance_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.GetPiHostsArgs;
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 hosts = IbmFunctions.getPiHosts(GetPiHostsArgs.builder()
.piCloudInstanceId("<value of the cloud_instance_id>")
.build());
}
}
variables:
hosts:
fn::invoke:
function: ibm:getPiHosts
arguments:
piCloudInstanceId: <value of the cloud_instance_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 getPiHosts
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 getPiHosts(args: GetPiHostsArgs, opts?: InvokeOptions): Promise<GetPiHostsResult>
function getPiHostsOutput(args: GetPiHostsOutputArgs, opts?: InvokeOptions): Output<GetPiHostsResult>
def get_pi_hosts(id: Optional[str] = None,
pi_cloud_instance_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPiHostsResult
def get_pi_hosts_output(id: Optional[pulumi.Input[str]] = None,
pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPiHostsResult]
func GetPiHosts(ctx *Context, args *GetPiHostsArgs, opts ...InvokeOption) (*GetPiHostsResult, error)
func GetPiHostsOutput(ctx *Context, args *GetPiHostsOutputArgs, opts ...InvokeOption) GetPiHostsResultOutput
> Note: This function is named GetPiHosts
in the Go SDK.
public static class GetPiHosts
{
public static Task<GetPiHostsResult> InvokeAsync(GetPiHostsArgs args, InvokeOptions? opts = null)
public static Output<GetPiHostsResult> Invoke(GetPiHostsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPiHostsResult> getPiHosts(GetPiHostsArgs args, InvokeOptions options)
public static Output<GetPiHostsResult> getPiHosts(GetPiHostsArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getPiHosts:getPiHosts
arguments:
# arguments dictionary
The following arguments are supported:
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Id string
- (String) The unique identifier of the pi_hosts.
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Id string
- (String) The unique identifier of the pi_hosts.
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- id String
- (String) The unique identifier of the pi_hosts.
- pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- id string
- (String) The unique identifier of the pi_hosts.
- pi_
cloud_ strinstance_ id - The GUID of the service instance associated with an account.
- id str
- (String) The unique identifier of the pi_hosts.
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- id String
- (String) The unique identifier of the pi_hosts.
getPiHosts Result
The following output properties are available:
- Hosts
List<Get
Pi Hosts Host> - (List) List of hosts.
- Id string
- (String) The unique identifier of the pi_hosts.
- Pi
Cloud stringInstance Id
- Hosts
[]Get
Pi Hosts Host - (List) List of hosts.
- Id string
- (String) The unique identifier of the pi_hosts.
- Pi
Cloud stringInstance Id
- hosts
List<Get
Pi Hosts Host> - (List) List of hosts.
- id String
- (String) The unique identifier of the pi_hosts.
- pi
Cloud StringInstance Id
- hosts
Get
Pi Hosts Host[] - (List) List of hosts.
- id string
- (String) The unique identifier of the pi_hosts.
- pi
Cloud stringInstance Id
- hosts
Sequence[Get
Pi Hosts Host] - (List) List of hosts.
- id str
- (String) The unique identifier of the pi_hosts.
- pi_
cloud_ strinstance_ id
- hosts List<Property Map>
- (List) List of hosts.
- id String
- (String) The unique identifier of the pi_hosts.
- pi
Cloud StringInstance Id
Supporting Types
GetPiHostsHost
- Capacities
List<Get
Pi Hosts 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
Id string - (String) ID of the host.
- Host
Reference double - (Integer) Current physical ID of the host.
- State string
- (String) State of the host
up
ordown
. - Status string
- (String) Status of the host
enabled
ordisabled
. - Sys
Type string - (String) System type.
- List<string>
- (List) List of user tags attached to the resource.
- Capacities
[]Get
Pi Hosts 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
Id string - (String) ID of the host.
- Host
Reference float64 - (Integer) Current physical ID of the host.
- State string
- (String) State of the host
up
ordown
. - Status string
- (String) Status of the host
enabled
ordisabled
. - Sys
Type string - (String) System type.
- []string
- (List) List of user tags attached to the resource.
- capacities
List<Get
Pi Hosts 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
Id String - (String) ID of the host.
- host
Reference Double - (Integer) Current physical ID of the host.
- state String
- (String) State of the host
up
ordown
. - status String
- (String) Status of the host
enabled
ordisabled
. - sys
Type String - (String) System type.
- List<String>
- (List) List of user tags attached to the resource.
- capacities
Get
Pi Hosts 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
Id string - (String) ID of the host.
- host
Reference number - (Integer) Current physical ID of the host.
- state string
- (String) State of the host
up
ordown
. - status string
- (String) Status of the host
enabled
ordisabled
. - sys
Type string - (String) System type.
- string[]
- (List) List of user tags attached to the resource.
- capacities
Sequence[Get
Pi Hosts 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_
id str - (String) ID of the host.
- host_
reference float - (Integer) Current physical ID of the host.
- state str
- (String) State of the host
up
ordown
. - status str
- (String) Status of the host
enabled
ordisabled
. - 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
Id String - (String) ID of the host.
- host
Reference Number - (Integer) Current physical ID of the host.
- state String
- (String) State of the host
up
ordown
. - status String
- (String) Status of the host
enabled
ordisabled
. - sys
Type String - (String) System type.
- List<String>
- (List) List of user tags attached to the resource.
GetPiHostsHostCapacity
- 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
ibm
Terraform Provider.