@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class KeyPair extends Object implements Serializable, Cloneable
Describes a key pair.
Constructor and Description |
---|
KeyPair() |
Modifier and Type | Method and Description |
---|---|
KeyPair |
clone() |
boolean |
equals(Object obj) |
String |
getKeyFingerprint()
|
String |
getKeyMaterial()
An unencrypted PEM encoded RSA or ED25519 private key.
|
String |
getKeyName()
The name of the key pair.
|
String |
getKeyPairId()
The ID of the key pair.
|
List<Tag> |
getTags()
Any tags applied to the key pair.
|
int |
hashCode() |
void |
setKeyFingerprint(String keyFingerprint)
|
void |
setKeyMaterial(String keyMaterial)
An unencrypted PEM encoded RSA or ED25519 private key.
|
void |
setKeyName(String keyName)
The name of the key pair.
|
void |
setKeyPairId(String keyPairId)
The ID of the key pair.
|
void |
setTags(Collection<Tag> tags)
Any tags applied to the key pair.
|
String |
toString()
Returns a string representation of this object.
|
KeyPair |
withKeyFingerprint(String keyFingerprint)
|
KeyPair |
withKeyMaterial(String keyMaterial)
An unencrypted PEM encoded RSA or ED25519 private key.
|
KeyPair |
withKeyName(String keyName)
The name of the key pair.
|
KeyPair |
withKeyPairId(String keyPairId)
The ID of the key pair.
|
KeyPair |
withTags(Collection<Tag> tags)
Any tags applied to the key pair.
|
KeyPair |
withTags(Tag... tags)
Any tags applied to the key pair.
|
public void setKeyFingerprint(String keyFingerprint)
For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.
For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.
keyFingerprint
- For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.
For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.
public String getKeyFingerprint()
For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.
For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.
For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.
For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.
public KeyPair withKeyFingerprint(String keyFingerprint)
For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.
For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.
keyFingerprint
- For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.
For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.
public void setKeyMaterial(String keyMaterial)
An unencrypted PEM encoded RSA or ED25519 private key.
keyMaterial
- An unencrypted PEM encoded RSA or ED25519 private key.public String getKeyMaterial()
An unencrypted PEM encoded RSA or ED25519 private key.
public KeyPair withKeyMaterial(String keyMaterial)
An unencrypted PEM encoded RSA or ED25519 private key.
keyMaterial
- An unencrypted PEM encoded RSA or ED25519 private key.public void setKeyName(String keyName)
The name of the key pair.
keyName
- The name of the key pair.public String getKeyName()
The name of the key pair.
public KeyPair withKeyName(String keyName)
The name of the key pair.
keyName
- The name of the key pair.public void setKeyPairId(String keyPairId)
The ID of the key pair.
keyPairId
- The ID of the key pair.public String getKeyPairId()
The ID of the key pair.
public KeyPair withKeyPairId(String keyPairId)
The ID of the key pair.
keyPairId
- The ID of the key pair.public List<Tag> getTags()
Any tags applied to the key pair.
public void setTags(Collection<Tag> tags)
Any tags applied to the key pair.
tags
- Any tags applied to the key pair.public KeyPair withTags(Tag... tags)
Any tags applied to the key pair.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection)
or withTags(java.util.Collection)
if you want to override the
existing values.
tags
- Any tags applied to the key pair.public KeyPair withTags(Collection<Tag> tags)
Any tags applied to the key pair.
tags
- Any tags applied to the key pair.public String toString()
toString
in class Object
Object.toString()