Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.amazonaws.services.ec2.model
Class KeyPair

    java.lang.Object
      com.amazonaws.services.ec2.model.KeyPair

    public class KeyPair

extends Object

Describes an Amazon EC2 key pair, including the private key material.

The public key portion is stored by Amazon EC2 and the private key is returned only once, in this type, when the key is initially created.

Constructor Summary
`KeyPair()`

Method Summary
`String` | `getKeyFingerprint()` The SHA-1 digest of the DER encoded private key.
`String` | `getKeyMaterial()` The unencrypted PEM encoded RSA private key.
`String` | `getKeyName()` The name of the key pair.
`void` | `setKeyFingerprint(String keyFingerprint)` The SHA-1 digest of the DER encoded private key.
`void` | `setKeyMaterial(String keyMaterial)` The unencrypted PEM encoded RSA private key.
`void` | `setKeyName(String keyName)` The name of the key pair.
`String` | `toString()` Returns a string representation of this object; useful for testing and debugging.
`KeyPair` | `withKeyFingerprint(String keyFingerprint)` The SHA-1 digest of the DER encoded private key.
`KeyPair` | `withKeyMaterial(String keyMaterial)` The unencrypted PEM encoded RSA private key.
`KeyPair` | `withKeyName(String keyName)` The name of the key pair.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### KeyPair

    public KeyPair()

Method Detail

### getKeyName

    public String getKeyName()

  The name of the key pair.

  Returns:
    The name of the key pair.

### setKeyName

    public void setKeyName(String keyName)

  The name of the key pair.

  Parameters:
    `keyName` - The name of the key pair.

### withKeyName

    public KeyPair withKeyName(String keyName)

  The name of the key pair.

  Returns a reference to this object so that method calls can be chained together.

  Parameters:
    `keyName` - The name of the key pair.
  Returns:
    A reference to this updated object so that method calls can be chained together.

### getKeyFingerprint

    public String getKeyFingerprint()

  The SHA-1 digest of the DER encoded private key.

  Returns:
    The SHA-1 digest of the DER encoded private key.

### setKeyFingerprint

    public void setKeyFingerprint(String keyFingerprint)

  The SHA-1 digest of the DER encoded private key.

  Parameters:
    `keyFingerprint` - The SHA-1 digest of the DER encoded private key.

### withKeyFingerprint

    public KeyPair withKeyFingerprint(String keyFingerprint)

  The SHA-1 digest of the DER encoded private key.

  Returns a reference to this object so that method calls can be chained together.

  Parameters:
    `keyFingerprint` - The SHA-1 digest of the DER encoded private key.
  Returns:
    A reference to this updated object so that method calls can be chained together.

### getKeyMaterial

    public String getKeyMaterial()

  The unencrypted PEM encoded RSA private key.

  Returns:
    The unencrypted PEM encoded RSA private key.

### setKeyMaterial

    public void setKeyMaterial(String keyMaterial)

  The unencrypted PEM encoded RSA private key.

  Parameters:
    `keyMaterial` - The unencrypted PEM encoded RSA private key.

### withKeyMaterial

    public KeyPair withKeyMaterial(String keyMaterial)

  The unencrypted PEM encoded RSA private key.

  Returns a reference to this object so that method calls can be chained together.

  Parameters:
    `keyMaterial` - The unencrypted PEM encoded RSA private key.
  Returns:
    A reference to this updated object so that method calls can be chained together.

### toString

    public String toString()

  Returns a string representation of this object; useful for testing and debugging.

  Overrides:
    `toString` in class `Object`
  Returns:
    A string representation of this object.
  See Also:
    `Object.toString()`

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.