Class KeyPairInfo
- java.lang.Object
-
- com.amazonaws.services.ec2.model.KeyPairInfo
-
- All Implemented Interfaces:
Serializable,Cloneable
public class KeyPairInfo extends Object implements Serializable, Cloneable
Describes a key pair.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description KeyPairInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyPairInfoclone()booleanequals(Object obj)StringgetKeyFingerprint()If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key.StringgetKeyName()The name of the key pair.inthashCode()voidsetKeyFingerprint(String keyFingerprint)If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key.voidsetKeyName(String keyName)The name of the key pair.StringtoString()Returns a string representation of this object; useful for testing and debugging.KeyPairInfowithKeyFingerprint(String keyFingerprint)If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key.KeyPairInfowithKeyName(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 KeyPairInfo 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)
If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used ImportKeyPair to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.
- Parameters:
keyFingerprint- If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used ImportKeyPair to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.
-
getKeyFingerprint
public String getKeyFingerprint()
If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used ImportKeyPair to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.
- Returns:
- If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used ImportKeyPair to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.
-
withKeyFingerprint
public KeyPairInfo withKeyFingerprint(String keyFingerprint)
If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used ImportKeyPair to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.
- Parameters:
keyFingerprint- If you used CreateKeyPair to create the key pair, this is the SHA-1 digest of the DER encoded private key. If you used ImportKeyPair to provide AWS the public key, this is the MD5 public key fingerprint as specified in section 4 of RFC4716.- 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:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public KeyPairInfo clone()
-
-