public class ImportKeyPairRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<ImportKeyPairRequest>
ImportKeyPair operation
.
Imports the public key from an RSA key pair that you created with a third-party tool. Compare this with CreateKeyPair, in which AWS creates the key pair and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, you create the key pair and give AWS just the public key. The private key is never transferred between you and AWS.
For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide .
NOOP
Constructor and Description |
---|
ImportKeyPairRequest()
Default constructor for a new ImportKeyPairRequest object.
|
ImportKeyPairRequest(String keyName,
String publicKeyMaterial)
Constructs a new ImportKeyPairRequest object.
|
Modifier and Type | Method and Description |
---|---|
ImportKeyPairRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
Request<ImportKeyPairRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
String |
getKeyName()
A unique name for the key pair.
|
String |
getPublicKeyMaterial()
The public key.
|
int |
hashCode() |
void |
setKeyName(String keyName)
A unique name for the key pair.
|
void |
setPublicKeyMaterial(String publicKeyMaterial)
The public key.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ImportKeyPairRequest |
withKeyName(String keyName)
A unique name for the key pair.
|
ImportKeyPairRequest |
withPublicKeyMaterial(String publicKeyMaterial)
The public key.
|
copyBaseTo, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public ImportKeyPairRequest()
public ImportKeyPairRequest(String keyName, String publicKeyMaterial)
keyName
- A unique name for the key pair.publicKeyMaterial
- The public key. You must base64 encode the
public key material before sending it to AWS.public String getKeyName()
public void setKeyName(String keyName)
keyName
- A unique name for the key pair.public ImportKeyPairRequest withKeyName(String keyName)
Returns a reference to this object so that method calls can be chained together.
keyName
- A unique name for the key pair.public String getPublicKeyMaterial()
public void setPublicKeyMaterial(String publicKeyMaterial)
publicKeyMaterial
- The public key. You must base64 encode the public key material before
sending it to AWS.public ImportKeyPairRequest withPublicKeyMaterial(String publicKeyMaterial)
Returns a reference to this object so that method calls can be chained together.
publicKeyMaterial
- The public key. You must base64 encode the public key material before
sending it to AWS.public Request<ImportKeyPairRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<ImportKeyPairRequest>
public String toString()
toString
in class Object
Object.toString()
public ImportKeyPairRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.