getProjectSshKey
Use this datasource to retrieve attributes of a Project SSH Key API resource.
Example Usage
using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;
class MyStack : Stack
{
public MyStack()
{
var myKey = Output.Create(EquinixMetal.GetProjectSshKey.InvokeAsync(new EquinixMetal.GetProjectSshKeyArgs
{
Search = "username@hostname",
ProjectId = local.Project_id,
}));
}
}
package main
import (
"github.com/pulumi/pulumi-equinix-metal/sdk/go/equinix-metal"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "username@hostname"
_, err := equinix - metal.LookupProjectSshKey(ctx, &equinix-metal.LookupProjectSshKeyArgs{
Search: &opt0,
ProjectId: local.Project_id,
}, nil)
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_equinix_metal as equinix_metal
my_key = equinix_metal.get_project_ssh_key(search="username@hostname",
project_id=local["project_id"])
import * as pulumi from "@pulumi/pulumi";
import * as equinix_metal from "@pulumi/equinix-metal";
const myKey = equinix_metal.getProjectSshKey({
search: "username@hostname",
projectId: local.project_id,
});
Using getProjectSshKey
function getProjectSshKey(args: GetProjectSshKeyArgs, opts?: InvokeOptions): Promise<GetProjectSshKeyResult>
def get_project_ssh_key(id: Optional[str] = None, project_id: Optional[str] = None, search: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetProjectSshKeyResult
func LookupProjectSshKey(ctx *Context, args *LookupProjectSshKeyArgs, opts ...InvokeOption) (*LookupProjectSshKeyResult, error)
Note: This function is named
LookupProjectSshKey
in the Go SDK.
public static class GetProjectSshKey {
public static Task<GetProjectSshKeyResult> InvokeAsync(GetProjectSshKeyArgs args, InvokeOptions? opts = null)
}
The following arguments are supported:
- project_
id str The Equinix Metal project id of the Equinix Metal SSH Key
- id str
The id of the SSH Key to search for in the Equinix Metal project
- search str
The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project
getProjectSshKey Result
The following output properties are available:
- Created string
The timestamp for when the SSH key was created
- Fingerprint string
The fingerprint of the SSH key
- Id string
The unique ID of the key
- Name string
The name of the SSH key
- Owner
Id string The ID of parent project (same as project_id)
- Project
Id string The ID of parent project
- Public
Key string The text of the public key
- Updated string
The timestamp for the last time the SSH key was updated
- Search string
- Created string
The timestamp for when the SSH key was created
- Fingerprint string
The fingerprint of the SSH key
- Id string
The unique ID of the key
- Name string
The name of the SSH key
- Owner
Id string The ID of parent project (same as project_id)
- Project
Id string The ID of parent project
- Public
Key string The text of the public key
- Updated string
The timestamp for the last time the SSH key was updated
- Search string
- created string
The timestamp for when the SSH key was created
- fingerprint string
The fingerprint of the SSH key
- id string
The unique ID of the key
- name string
The name of the SSH key
- owner
Id string The ID of parent project (same as project_id)
- project
Id string The ID of parent project
- public
Key string The text of the public key
- updated string
The timestamp for the last time the SSH key was updated
- search string
- created str
The timestamp for when the SSH key was created
- fingerprint str
The fingerprint of the SSH key
- id str
The unique ID of the key
- name str
The name of the SSH key
- owner_
id str The ID of parent project (same as project_id)
- project_
id str The ID of parent project
- public_
key str The text of the public key
- updated str
The timestamp for the last time the SSH key was updated
- search str
Package Details
- Repository
- https://github.com/pulumi/pulumi-equinix-metal
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
metal
Terraform Provider.