public class CreateKeyPairRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<CreateKeyPairRequest>
CreateKeyPair operation
.
Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error.
You can have up to five thousand key pairs per region.
For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide .
NOOP
Constructor and Description |
---|
CreateKeyPairRequest()
Default constructor for a new CreateKeyPairRequest object.
|
CreateKeyPairRequest(String keyName)
Constructs a new CreateKeyPairRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Request<CreateKeyPairRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
String |
getKeyName()
A unique name for the key pair.
|
int |
hashCode() |
void |
setKeyName(String keyName)
A unique name for the key pair.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateKeyPairRequest |
withKeyName(String keyName)
A unique name for the key pair.
|
copyPrivateRequestParameters, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public CreateKeyPairRequest()
public CreateKeyPairRequest(String keyName)
keyName
- A unique name for the key pair.public String getKeyName()
public void setKeyName(String keyName)
keyName
- A unique name for the key pair.public CreateKeyPairRequest 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 Request<CreateKeyPairRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<CreateKeyPairRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.