public class ImportKeyPairRequest extends AmazonWebServiceRequest implements java.io.Serializable, 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 .
Constructor and Description |
---|
ImportKeyPairRequest()
Default constructor for a new ImportKeyPairRequest object.
|
ImportKeyPairRequest(java.lang.String keyName,
java.lang.String publicKeyMaterial)
Constructs a new ImportKeyPairRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Request<ImportKeyPairRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.lang.String |
getKeyName()
A unique name for the key pair.
|
java.lang.String |
getPublicKeyMaterial()
The public key.
|
int |
hashCode() |
void |
setKeyName(java.lang.String keyName)
A unique name for the key pair.
|
void |
setPublicKeyMaterial(java.lang.String publicKeyMaterial)
The public key.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ImportKeyPairRequest |
withKeyName(java.lang.String keyName)
A unique name for the key pair.
|
ImportKeyPairRequest |
withPublicKeyMaterial(java.lang.String publicKeyMaterial)
The public key.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public ImportKeyPairRequest()
public ImportKeyPairRequest(java.lang.String keyName, java.lang.String publicKeyMaterial)
keyName
- A unique name for the key pair.publicKeyMaterial
- The public key. For API calls, the text must
be base64-encoded. For command line tools, base64 encoding is
performed for you.public java.lang.String getKeyName()
public void setKeyName(java.lang.String keyName)
keyName
- A unique name for the key pair.public ImportKeyPairRequest withKeyName(java.lang.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 java.lang.String getPublicKeyMaterial()
public void setPublicKeyMaterial(java.lang.String publicKeyMaterial)
publicKeyMaterial
- The public key. For API calls, the text must be base64-encoded. For
command line tools, base64 encoding is performed for you.public ImportKeyPairRequest withPublicKeyMaterial(java.lang.String publicKeyMaterial)
Returns a reference to this object so that method calls can be chained together.
publicKeyMaterial
- The public key. For API calls, the text must be base64-encoded. For
command line tools, base64 encoding is performed for you.public Request<ImportKeyPairRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<ImportKeyPairRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.