ibm.getIsSshKey
Explore with Pulumi AI
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";
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) {
}
}
{}
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const example = ibm.getIsSshKey({
name: "example-ssh-key",
});
import pulumi
import pulumi_ibm as ibm
example = ibm.get_is_ssh_key(name="example-ssh-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.LookupIsSshKey(ctx, &ibm.LookupIsSshKeyArgs{
Name: pulumi.StringRef("example-ssh-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 example = Ibm.GetIsSshKey.Invoke(new()
{
Name = "example-ssh-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.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());
}
}
variables:
example:
fn::invoke:
function: ibm:getIsSshKey
arguments:
name: example-ssh-key
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>
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]
func LookupIsSshKey(ctx *Context, args *LookupIsSshKeyArgs, opts ...InvokeOption) (*LookupIsSshKeyResult, error)
func LookupIsSshKeyOutput(ctx *Context, args *LookupIsSshKeyOutputArgs, opts ...InvokeOption) LookupIsSshKeyResultOutput
> 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)
}
public static CompletableFuture<GetIsSshKeyResult> getIsSshKey(GetIsSshKeyArgs args, InvokeOptions options)
public static Output<GetIsSshKeyResult> getIsSshKey(GetIsSshKeyArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIsSshKey:getIsSshKey
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- The id of the SSH key. {Exactly one of
id
orname
is required} - Name string
- The name of the SSH key. {Exactly one of
id
orname
is required} - Resource
Group string
- Id string
- The id of the SSH key. {Exactly one of
id
orname
is required} - Name string
- The name of the SSH key. {Exactly one of
id
orname
is required} - Resource
Group string
- id String
- The id of the SSH key. {Exactly one of
id
orname
is required} - name String
- The name of the SSH key. {Exactly one of
id
orname
is required} - resource
Group String
- id string
- The id of the SSH key. {Exactly one of
id
orname
is required} - name string
- The name of the SSH key. {Exactly one of
id
orname
is required} - resource
Group string
- id str
- The id of the SSH key. {Exactly one of
id
orname
is required} - name str
- The name of the SSH key. {Exactly one of
id
orname
is required} - resource_
group str
- id String
- The id of the SSH key. {Exactly one of
id
orname
is required} - name String
- The name of the SSH key. {Exactly one of
id
orname
is required} - resource
Group String
getIsSshKey Result
The following output properties are available:
- List<string>
- (List) Access management tags associated for the ssh key.
- Created
At 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.
- Public
Key string - (String) The public SSH key value.
- Resource
Controller stringUrl - Resource
Crn string - Resource
Group stringName - Resource
Name string - 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
- Resource
Group string
- []string
- (List) Access management tags associated for the ssh key.
- Created
At 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.
- Public
Key string - (String) The public SSH key value.
- Resource
Controller stringUrl - Resource
Crn string - Resource
Group stringName - Resource
Name string - []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
- Resource
Group string
- List<String>
- (List) Access management tags associated for the ssh key.
- created
At 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.
- public
Key String - (String) The public SSH key value.
- resource
Controller StringUrl - resource
Crn String - resource
Group StringName - resource
Name String - 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
- resource
Group String
- string[]
- (List) Access management tags associated for the ssh key.
- created
At 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.
- public
Key string - (String) The public SSH key value.
- resource
Controller stringUrl - resource
Crn string - resource
Group stringName - resource
Name string - 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
- resource
Group string
- 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_ strurl - resource_
crn str - resource_
group_ strname - resource_
name str - 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
- List<String>
- (List) Access management tags associated for the ssh key.
- created
At 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.
- public
Key String - (String) The public SSH key value.
- resource
Controller StringUrl - resource
Crn String - resource
Group StringName - resource
Name String - 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
- resource
Group String
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.