ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getPiKey
Explore with Pulumi AI
Retrieve information about the SSH key that is used for your Power Systems Virtual Server instance. The SSH key is used to access the instance after it is created. For more information, about generating and using SSH Keys.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const dsInstance = ibm.getPiKey({
piCloudInstanceId: "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
piKeyName: "terraform-test-key",
});
import pulumi
import pulumi_ibm as ibm
ds_instance = ibm.get_pi_key(pi_cloud_instance_id="49fba6c9-23f8-40bc-9899-aca322ee7d5b",
pi_key_name="terraform-test-key")
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.LookupPiKey(ctx, &ibm.LookupPiKeyArgs{
PiCloudInstanceId: "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
PiKeyName: "terraform-test-key",
}, 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 dsInstance = Ibm.GetPiKey.Invoke(new()
{
PiCloudInstanceId = "49fba6c9-23f8-40bc-9899-aca322ee7d5b",
PiKeyName = "terraform-test-key",
});
});
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.GetPiKeyArgs;
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 dsInstance = IbmFunctions.getPiKey(GetPiKeyArgs.builder()
.piCloudInstanceId("49fba6c9-23f8-40bc-9899-aca322ee7d5b")
.piKeyName("terraform-test-key")
.build());
}
}
variables:
dsInstance:
fn::invoke:
function: ibm:getPiKey
arguments:
piCloudInstanceId: 49fba6c9-23f8-40bc-9899-aca322ee7d5b
piKeyName: terraform-test-key
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 getPiKey
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 getPiKey(args: GetPiKeyArgs, opts?: InvokeOptions): Promise<GetPiKeyResult>
function getPiKeyOutput(args: GetPiKeyOutputArgs, opts?: InvokeOptions): Output<GetPiKeyResult>
def get_pi_key(id: Optional[str] = None,
pi_cloud_instance_id: Optional[str] = None,
pi_key_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPiKeyResult
def get_pi_key_output(id: Optional[pulumi.Input[str]] = None,
pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
pi_key_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPiKeyResult]
func LookupPiKey(ctx *Context, args *LookupPiKeyArgs, opts ...InvokeOption) (*LookupPiKeyResult, error)
func LookupPiKeyOutput(ctx *Context, args *LookupPiKeyOutputArgs, opts ...InvokeOption) LookupPiKeyResultOutput
> Note: This function is named LookupPiKey
in the Go SDK.
public static class GetPiKey
{
public static Task<GetPiKeyResult> InvokeAsync(GetPiKeyArgs args, InvokeOptions? opts = null)
public static Output<GetPiKeyResult> Invoke(GetPiKeyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPiKeyResult> getPiKey(GetPiKeyArgs args, InvokeOptions options)
public static Output<GetPiKeyResult> getPiKey(GetPiKeyArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getPiKey:getPiKey
arguments:
# arguments dictionary
The following arguments are supported:
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Key stringName - User defined name for the SSH key.
- Id string
- (String) User defined name for the SSH key
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Pi
Key stringName - User defined name for the SSH key.
- Id string
- (String) User defined name for the SSH key
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Key StringName - User defined name for the SSH key.
- id String
- (String) User defined name for the SSH key
- pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- pi
Key stringName - User defined name for the SSH key.
- id string
- (String) User defined name for the SSH key
- pi_
cloud_ strinstance_ id - The GUID of the service instance associated with an account.
- pi_
key_ strname - User defined name for the SSH key.
- id str
- (String) User defined name for the SSH key
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- pi
Key StringName - User defined name for the SSH key.
- id String
- (String) User defined name for the SSH key
getPiKey Result
The following output properties are available:
- Creation
Date string - (String) Date of SSH Key creation.
- Id string
- (String) User defined name for the SSH key
- Pi
Cloud stringInstance Id - Pi
Key stringName - Ssh
Key string - (String) SSH RSA key.
- Creation
Date string - (String) Date of SSH Key creation.
- Id string
- (String) User defined name for the SSH key
- Pi
Cloud stringInstance Id - Pi
Key stringName - Ssh
Key string - (String) SSH RSA key.
- creation
Date String - (String) Date of SSH Key creation.
- id String
- (String) User defined name for the SSH key
- pi
Cloud StringInstance Id - pi
Key StringName - ssh
Key String - (String) SSH RSA key.
- creation
Date string - (String) Date of SSH Key creation.
- id string
- (String) User defined name for the SSH key
- pi
Cloud stringInstance Id - pi
Key stringName - ssh
Key string - (String) SSH RSA key.
- creation_
date str - (String) Date of SSH Key creation.
- id str
- (String) User defined name for the SSH key
- pi_
cloud_ strinstance_ id - pi_
key_ strname - ssh_
key str - (String) SSH RSA key.
- creation
Date String - (String) Date of SSH Key creation.
- id String
- (String) User defined name for the SSH key
- pi
Cloud StringInstance Id - pi
Key StringName - ssh
Key String - (String) SSH RSA key.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.