Package com.amazonaws.services.ec2.model
Class KeyPair
- java.lang.Object
-
- com.amazonaws.services.ec2.model.KeyPair
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class KeyPair extends Object implements Serializable, Cloneable
Describes a key pair.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description KeyPair()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyPair
clone()
boolean
equals(Object obj)
String
getKeyFingerprint()
The SHA-1 digest of the DER encoded private key.String
getKeyMaterial()
An unencrypted PEM encoded RSA private key.String
getKeyName()
The name of the key pair.int
hashCode()
void
setKeyFingerprint(String keyFingerprint)
The SHA-1 digest of the DER encoded private key.void
setKeyMaterial(String keyMaterial)
An 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)
An unencrypted PEM encoded RSA private key.KeyPair
withKeyName(String keyName)
The name of the key pair.
-
-
-
Method Detail
-
setKeyName
public void setKeyName(String keyName)
The name of the key pair.
- Parameters:
keyName
- The name of the key pair.
-
getKeyName
public String getKeyName()
The name of the key pair.
- Returns:
- The name of the key pair.
-
withKeyName
public KeyPair withKeyName(String keyName)
The name of the key pair.
- Parameters:
keyName
- The name of the key pair.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
-
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.
-
withKeyFingerprint
public KeyPair withKeyFingerprint(String keyFingerprint)
The SHA-1 digest of the DER encoded private key.
- Parameters:
keyFingerprint
- The SHA-1 digest of the DER encoded private key.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKeyMaterial
public void setKeyMaterial(String keyMaterial)
An unencrypted PEM encoded RSA private key.
- Parameters:
keyMaterial
- An unencrypted PEM encoded RSA private key.
-
getKeyMaterial
public String getKeyMaterial()
An unencrypted PEM encoded RSA private key.
- Returns:
- An unencrypted PEM encoded RSA private key.
-
withKeyMaterial
public KeyPair withKeyMaterial(String keyMaterial)
An unencrypted PEM encoded RSA private key.
- Parameters:
keyMaterial
- An unencrypted PEM encoded RSA private key.- Returns:
- Returns a reference to this 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 classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-