com.amazonaws.services.ec2.model
Class CreateKeyPairRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.CreateKeyPairRequest

public class CreateKeyPairRequest
extends AmazonWebServiceRequest

Container for the parameters to the CreateKeyPair operation.

The CreateKeyPair operation creates a new 2048 bit RSA key pair and returns a unique ID that can be used to reference this key pair when launching new instances. For more information, see RunInstances.

See Also:
AmazonEC2.createKeyPair(CreateKeyPairRequest)

Constructor Summary
CreateKeyPairRequest()
          Default constructor for a new CreateKeyPairRequest object.
CreateKeyPairRequest(String keyName)
          Constructs a new CreateKeyPairRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getKeyName()
          The unique name for the new key pair.
 int hashCode()
           
 void setKeyName(String keyName)
          The unique name for the new key pair.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateKeyPairRequest withKeyName(String keyName)
          The unique name for the new key pair.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateKeyPairRequest

public CreateKeyPairRequest()
Default constructor for a new CreateKeyPairRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


CreateKeyPairRequest

public CreateKeyPairRequest(String keyName)
Constructs a new CreateKeyPairRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
keyName - The unique name for the new key pair.
Method Detail

getKeyName

public String getKeyName()
The unique name for the new key pair.

Returns:
The unique name for the new key pair.

setKeyName

public void setKeyName(String keyName)
The unique name for the new key pair.

Parameters:
keyName - The unique name for the new key pair.

withKeyName

public CreateKeyPairRequest withKeyName(String keyName)
The unique name for the new key pair.

Returns a reference to this object so that method calls can be chained together.

Parameters:
keyName - The unique name for the new key pair.
Returns:
A reference to this updated 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:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.