ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getPiKeys
Explore with Pulumi AI
Retrieve information about all SSH keys. For more information, about generating and using SSH Keys.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const example = ibm.getPiKeys({
piCloudInstanceId: "<value of the cloud_instance_id>",
});
import pulumi
import pulumi_ibm as ibm
example = ibm.get_pi_keys(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.GetPiKeys(ctx, &ibm.GetPiKeysArgs{
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 example = Ibm.GetPiKeys.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.GetPiKeysArgs;
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 = IbmFunctions.getPiKeys(GetPiKeysArgs.builder()
.piCloudInstanceId("<value of the cloud_instance_id>")
.build());
}
}
variables:
example:
fn::invoke:
function: ibm:getPiKeys
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 getPiKeys
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 getPiKeys(args: GetPiKeysArgs, opts?: InvokeOptions): Promise<GetPiKeysResult>
function getPiKeysOutput(args: GetPiKeysOutputArgs, opts?: InvokeOptions): Output<GetPiKeysResult>
def get_pi_keys(id: Optional[str] = None,
pi_cloud_instance_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPiKeysResult
def get_pi_keys_output(id: Optional[pulumi.Input[str]] = None,
pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPiKeysResult]
func GetPiKeys(ctx *Context, args *GetPiKeysArgs, opts ...InvokeOption) (*GetPiKeysResult, error)
func GetPiKeysOutput(ctx *Context, args *GetPiKeysOutputArgs, opts ...InvokeOption) GetPiKeysResultOutput
> Note: This function is named GetPiKeys
in the Go SDK.
public static class GetPiKeys
{
public static Task<GetPiKeysResult> InvokeAsync(GetPiKeysArgs args, InvokeOptions? opts = null)
public static Output<GetPiKeysResult> Invoke(GetPiKeysInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPiKeysResult> getPiKeys(GetPiKeysArgs args, InvokeOptions options)
public static Output<GetPiKeysResult> getPiKeys(GetPiKeysArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getPiKeys:getPiKeys
arguments:
# arguments dictionary
The following arguments are supported:
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Id string
- Pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- Id string
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- id String
- pi
Cloud stringInstance Id - The GUID of the service instance associated with an account.
- id string
- pi_
cloud_ strinstance_ id - The GUID of the service instance associated with an account.
- id str
- pi
Cloud StringInstance Id - The GUID of the service instance associated with an account.
- id String
getPiKeys Result
The following output properties are available:
- Id string
- Keys
List<Get
Pi Keys Key> - (List) List of all the SSH keys.
- Pi
Cloud stringInstance Id
- Id string
- Keys
[]Get
Pi Keys Key - (List) List of all the SSH keys.
- Pi
Cloud stringInstance Id
- id String
- keys
List<Get
Pi Keys Key> - (List) List of all the SSH keys.
- pi
Cloud StringInstance Id
- id string
- keys
Get
Pi Keys Key[] - (List) List of all the SSH keys.
- pi
Cloud stringInstance Id
- id str
- keys
Sequence[Get
Pi Keys Key] - (List) List of all the SSH keys.
- pi_
cloud_ strinstance_ id
- id String
- keys List<Property Map>
- (List) List of all the SSH keys.
- pi
Cloud StringInstance Id
Supporting Types
GetPiKeysKey
- Creation
Date string - (String) Date of SSH Key creation.
- Name string
- (String) User defined name for the SSH key.
- Ssh
Key string - (String) SSH RSA key.
- Creation
Date string - (String) Date of SSH Key creation.
- Name string
- (String) User defined name for the SSH key.
- Ssh
Key string - (String) SSH RSA key.
- creation
Date String - (String) Date of SSH Key creation.
- name String
- (String) User defined name for the SSH key.
- ssh
Key String - (String) SSH RSA key.
- creation
Date string - (String) Date of SSH Key creation.
- name string
- (String) User defined name for the SSH key.
- ssh
Key string - (String) SSH RSA key.
- creation_
date str - (String) Date of SSH Key creation.
- name str
- (String) User defined name for the SSH key.
- ssh_
key str - (String) SSH RSA key.
- creation
Date String - (String) Date of SSH Key creation.
- name String
- (String) User defined name for the SSH key.
- 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.