1. Packages
  2. Equinix Metal (Deprecated)
  3. API Docs
  4. getProjectSshKey

This package is deprecated. We recommend using the new Equinix package.

Equinix Metal v3.2.1 published on Thursday, Dec 30, 2021 by DEPRECATED

equinix-metal.getProjectSshKey

Explore with Pulumi AI

equinix-metal logo

This package is deprecated. We recommend using the new Equinix package.

Equinix Metal v3.2.1 published on Thursday, Dec 30, 2021 by DEPRECATED

    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/v3/go/equinix-metal"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		opt0 := "username@hostname"
    		_, err := equinix - metal.LookupProjectSshKey(ctx, &GetProjectSshKeyArgs{
    			Search:    &opt0,
    			ProjectId: local.Project_id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    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,
    });
    

    Coming soon!

    Using getProjectSshKey

    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 getProjectSshKey(args: GetProjectSshKeyArgs, opts?: InvokeOptions): Promise<GetProjectSshKeyResult>
    function getProjectSshKeyOutput(args: GetProjectSshKeyOutputArgs, opts?: InvokeOptions): Output<GetProjectSshKeyResult>
    def get_project_ssh_key(id: Optional[str] = None,
                            project_id: Optional[str] = None,
                            search: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetProjectSshKeyResult
    def get_project_ssh_key_output(id: Optional[pulumi.Input[str]] = None,
                            project_id: Optional[pulumi.Input[str]] = None,
                            search: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetProjectSshKeyResult]
    func LookupProjectSshKey(ctx *Context, args *LookupProjectSshKeyArgs, opts ...InvokeOption) (*LookupProjectSshKeyResult, error)
    func LookupProjectSshKeyOutput(ctx *Context, args *LookupProjectSshKeyOutputArgs, opts ...InvokeOption) LookupProjectSshKeyResultOutput

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

    public static class GetProjectSshKey 
    {
        public static Task<GetProjectSshKeyResult> InvokeAsync(GetProjectSshKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectSshKeyResult> Invoke(GetProjectSshKeyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectSshKeyResult> getProjectSshKey(GetProjectSshKeyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: equinix-metal:index/getProjectSshKey:getProjectSshKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProjectId string
    The Equinix Metal project id of the Equinix Metal SSH Key
    Id string
    The id of the SSH Key to search for in the Equinix Metal project
    Search string
    The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project
    ProjectId string
    The Equinix Metal project id of the Equinix Metal SSH Key
    Id string
    The id of the SSH Key to search for in the Equinix Metal project
    Search string
    The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project
    projectId String
    The Equinix Metal project id of the Equinix Metal SSH Key
    id String
    The id of the SSH Key to search for in the Equinix Metal project
    search String
    The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project
    projectId string
    The Equinix Metal project id of the Equinix Metal SSH Key
    id string
    The id of the SSH Key to search for in the Equinix Metal project
    search string
    The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project
    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
    projectId String
    The Equinix Metal project id of the Equinix Metal SSH Key
    id String
    The id of the SSH Key to search for in the Equinix Metal project
    search String
    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
    OwnerId string
    The ID of parent project (same as project_id)
    ProjectId string
    The ID of parent project
    PublicKey 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
    OwnerId string
    The ID of parent project (same as project_id)
    ProjectId string
    The ID of parent project
    PublicKey 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
    ownerId String
    The ID of parent project (same as project_id)
    projectId String
    The ID of parent project
    publicKey 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
    ownerId string
    The ID of parent project (same as project_id)
    projectId string
    The ID of parent project
    publicKey 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
    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
    ownerId String
    The ID of parent project (same as project_id)
    projectId String
    The ID of parent project
    publicKey String
    The text of the public key
    updated String
    The timestamp for the last time the SSH key was updated
    search String

    Package Details

    Repository
    Equinix Metal pulumi/pulumi-equinix-metal
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the metal Terraform Provider.
    equinix-metal logo

    This package is deprecated. We recommend using the new Equinix package.

    Equinix Metal v3.2.1 published on Thursday, Dec 30, 2021 by DEPRECATED