1. Packages
  2. AWS Native
  3. API Docs
  4. ec2
  5. getKeyPair

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.77.0 published on Wednesday, Sep 20, 2023 by Pulumi

aws-native.ec2.getKeyPair

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.77.0 published on Wednesday, Sep 20, 2023 by Pulumi

    The AWS::EC2::KeyPair creates an SSH key pair

    Using getKeyPair

    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 getKeyPair(args: GetKeyPairArgs, opts?: InvokeOptions): Promise<GetKeyPairResult>
    function getKeyPairOutput(args: GetKeyPairOutputArgs, opts?: InvokeOptions): Output<GetKeyPairResult>
    def get_key_pair(key_name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetKeyPairResult
    def get_key_pair_output(key_name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetKeyPairResult]
    func LookupKeyPair(ctx *Context, args *LookupKeyPairArgs, opts ...InvokeOption) (*LookupKeyPairResult, error)
    func LookupKeyPairOutput(ctx *Context, args *LookupKeyPairOutputArgs, opts ...InvokeOption) LookupKeyPairResultOutput

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

    public static class GetKeyPair 
    {
        public static Task<GetKeyPairResult> InvokeAsync(GetKeyPairArgs args, InvokeOptions? opts = null)
        public static Output<GetKeyPairResult> Invoke(GetKeyPairInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKeyPairResult> getKeyPair(GetKeyPairArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:ec2:getKeyPair
      arguments:
        # arguments dictionary

    The following arguments are supported:

    KeyName string

    The name of the SSH key pair

    KeyName string

    The name of the SSH key pair

    keyName String

    The name of the SSH key pair

    keyName string

    The name of the SSH key pair

    key_name str

    The name of the SSH key pair

    keyName String

    The name of the SSH key pair

    getKeyPair Result

    The following output properties are available:

    KeyFingerprint string

    A short sequence of bytes used for public key verification

    KeyPairId string

    An AWS generated ID for the key pair

    KeyFingerprint string

    A short sequence of bytes used for public key verification

    KeyPairId string

    An AWS generated ID for the key pair

    keyFingerprint String

    A short sequence of bytes used for public key verification

    keyPairId String

    An AWS generated ID for the key pair

    keyFingerprint string

    A short sequence of bytes used for public key verification

    keyPairId string

    An AWS generated ID for the key pair

    key_fingerprint str

    A short sequence of bytes used for public key verification

    key_pair_id str

    An AWS generated ID for the key pair

    keyFingerprint String

    A short sequence of bytes used for public key verification

    keyPairId String

    An AWS generated ID for the key pair

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.77.0 published on Wednesday, Sep 20, 2023 by Pulumi