1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsSshKey
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getIsSshKey

Explore with Pulumi AI

ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

Retrieve information of an existing IBM Cloud VPC SSH key as a read only data source. For more information, see SSH keys.

Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

provider.tf

import * as pulumi from "@pulumi/pulumi";
Copy
import pulumi
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;

return await Deployment.RunAsync(() => 
{
});
Copy
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) {
    }
}
Copy
{}
Copy

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

const example = ibm.getIsSshKey({
    name: "example-ssh-key",
});
Copy
import pulumi
import pulumi_ibm as ibm

example = ibm.get_is_ssh_key(name="example-ssh-key")
Copy
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.LookupIsSshKey(ctx, &ibm.LookupIsSshKeyArgs{
			Name: pulumi.StringRef("example-ssh-key"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var example = Ibm.GetIsSshKey.Invoke(new()
    {
        Name = "example-ssh-key",
    });

});
Copy
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.GetIsSshKeyArgs;
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.getIsSshKey(GetIsSshKeyArgs.builder()
            .name("example-ssh-key")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: ibm:getIsSshKey
      arguments:
        name: example-ssh-key
Copy

Using getIsSshKey

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 getIsSshKey(args: GetIsSshKeyArgs, opts?: InvokeOptions): Promise<GetIsSshKeyResult>
function getIsSshKeyOutput(args: GetIsSshKeyOutputArgs, opts?: InvokeOptions): Output<GetIsSshKeyResult>
Copy
def get_is_ssh_key(id: Optional[str] = None,
                   name: Optional[str] = None,
                   resource_group: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetIsSshKeyResult
def get_is_ssh_key_output(id: Optional[pulumi.Input[str]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   resource_group: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetIsSshKeyResult]
Copy
func LookupIsSshKey(ctx *Context, args *LookupIsSshKeyArgs, opts ...InvokeOption) (*LookupIsSshKeyResult, error)
func LookupIsSshKeyOutput(ctx *Context, args *LookupIsSshKeyOutputArgs, opts ...InvokeOption) LookupIsSshKeyResultOutput
Copy

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

public static class GetIsSshKey 
{
    public static Task<GetIsSshKeyResult> InvokeAsync(GetIsSshKeyArgs args, InvokeOptions? opts = null)
    public static Output<GetIsSshKeyResult> Invoke(GetIsSshKeyInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetIsSshKeyResult> getIsSshKey(GetIsSshKeyArgs args, InvokeOptions options)
public static Output<GetIsSshKeyResult> getIsSshKey(GetIsSshKeyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getIsSshKey:getIsSshKey
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id string
The id of the SSH key. {Exactly one of id or name is required}
Name string
The name of the SSH key. {Exactly one of id or name is required}
ResourceGroup string
Id string
The id of the SSH key. {Exactly one of id or name is required}
Name string
The name of the SSH key. {Exactly one of id or name is required}
ResourceGroup string
id String
The id of the SSH key. {Exactly one of id or name is required}
name String
The name of the SSH key. {Exactly one of id or name is required}
resourceGroup String
id string
The id of the SSH key. {Exactly one of id or name is required}
name string
The name of the SSH key. {Exactly one of id or name is required}
resourceGroup string
id str
The id of the SSH key. {Exactly one of id or name is required}
name str
The name of the SSH key. {Exactly one of id or name is required}
resource_group str
id String
The id of the SSH key. {Exactly one of id or name is required}
name String
The name of the SSH key. {Exactly one of id or name is required}
resourceGroup String

getIsSshKey Result

The following output properties are available:

AccessTags List<string>
(List) Access management tags associated for the ssh key.
CreatedAt string
(String) The date and time that the key was created.
Crn string
(String) The CRN for this key.
Fingerprint string
(String) The SHA256 fingerprint of the public key.
Href string
(String) The URL for this key.
Length double
(String) The length of the SSH key.
PublicKey string
(String) The public SSH key value.
ResourceControllerUrl string
ResourceCrn string
ResourceGroupName string
ResourceName string
Tags List<string>
(List) User tags associated for the ssh key.
Type string
(String) The crypto system that is used by this key.
Id string
(String) The ID of the SSH key.
Name string
ResourceGroup string
AccessTags []string
(List) Access management tags associated for the ssh key.
CreatedAt string
(String) The date and time that the key was created.
Crn string
(String) The CRN for this key.
Fingerprint string
(String) The SHA256 fingerprint of the public key.
Href string
(String) The URL for this key.
Length float64
(String) The length of the SSH key.
PublicKey string
(String) The public SSH key value.
ResourceControllerUrl string
ResourceCrn string
ResourceGroupName string
ResourceName string
Tags []string
(List) User tags associated for the ssh key.
Type string
(String) The crypto system that is used by this key.
Id string
(String) The ID of the SSH key.
Name string
ResourceGroup string
accessTags List<String>
(List) Access management tags associated for the ssh key.
createdAt String
(String) The date and time that the key was created.
crn String
(String) The CRN for this key.
fingerprint String
(String) The SHA256 fingerprint of the public key.
href String
(String) The URL for this key.
length Double
(String) The length of the SSH key.
publicKey String
(String) The public SSH key value.
resourceControllerUrl String
resourceCrn String
resourceGroupName String
resourceName String
tags List<String>
(List) User tags associated for the ssh key.
type String
(String) The crypto system that is used by this key.
id String
(String) The ID of the SSH key.
name String
resourceGroup String
accessTags string[]
(List) Access management tags associated for the ssh key.
createdAt string
(String) The date and time that the key was created.
crn string
(String) The CRN for this key.
fingerprint string
(String) The SHA256 fingerprint of the public key.
href string
(String) The URL for this key.
length number
(String) The length of the SSH key.
publicKey string
(String) The public SSH key value.
resourceControllerUrl string
resourceCrn string
resourceGroupName string
resourceName string
tags string[]
(List) User tags associated for the ssh key.
type string
(String) The crypto system that is used by this key.
id string
(String) The ID of the SSH key.
name string
resourceGroup string
access_tags Sequence[str]
(List) Access management tags associated for the ssh key.
created_at str
(String) The date and time that the key was created.
crn str
(String) The CRN for this key.
fingerprint str
(String) The SHA256 fingerprint of the public key.
href str
(String) The URL for this key.
length float
(String) The length of the SSH key.
public_key str
(String) The public SSH key value.
resource_controller_url str
resource_crn str
resource_group_name str
resource_name str
tags Sequence[str]
(List) User tags associated for the ssh key.
type str
(String) The crypto system that is used by this key.
id str
(String) The ID of the SSH key.
name str
resource_group str
accessTags List<String>
(List) Access management tags associated for the ssh key.
createdAt String
(String) The date and time that the key was created.
crn String
(String) The CRN for this key.
fingerprint String
(String) The SHA256 fingerprint of the public key.
href String
(String) The URL for this key.
length Number
(String) The length of the SSH key.
publicKey String
(String) The public SSH key value.
resourceControllerUrl String
resourceCrn String
resourceGroupName String
resourceName String
tags List<String>
(List) User tags associated for the ssh key.
type String
(String) The crypto system that is used by this key.
id String
(String) The ID of the SSH key.
name String
resourceGroup String

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud