com.amazonaws.services.ec2.model
Class ImportKeyPairRequest

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

public class ImportKeyPairRequest
extends AmazonWebServiceRequest

Container for the parameters to the ImportKeyPair operation.

Imports the public key from an RSA key pair created with a third-party tool. This operation differs from CreateKeyPair as the private key is never transferred between the caller and AWS servers.

RSA key pairs are easily created on Microsoft Windows and Linux OS systems using the ssh-keygen command line tool provided with the standard OpenSSH installation. Standard library support for RSA key pair creation is also available for Java, Ruby, Python, and many other programming languages.

The following formats are supported:

See Also:
AmazonEC2.importKeyPair(ImportKeyPairRequest)

Constructor Summary
ImportKeyPairRequest()
          Default constructor for a new ImportKeyPairRequest object.
ImportKeyPairRequest(String keyName, String publicKeyMaterial)
          Constructs a new ImportKeyPairRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getKeyName()
          The unique name for the key pair.
 String getPublicKeyMaterial()
          The public key portion of the key pair being imported.
 int hashCode()
           
 void setKeyName(String keyName)
          The unique name for the key pair.
 void setPublicKeyMaterial(String publicKeyMaterial)
          The public key portion of the key pair being imported.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 ImportKeyPairRequest withKeyName(String keyName)
          The unique name for the key pair.
 ImportKeyPairRequest withPublicKeyMaterial(String publicKeyMaterial)
          The public key portion of the key pair being imported.
 
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

ImportKeyPairRequest

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


ImportKeyPairRequest

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

Parameters:
keyName - The unique name for the key pair.
publicKeyMaterial - The public key portion of the key pair being imported.
Method Detail

getKeyName

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

Returns:
The unique name for the key pair.

setKeyName

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

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

withKeyName

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

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

Parameters:
keyName - The unique name for the key pair.
Returns:
A reference to this updated object so that method calls can be chained together.

getPublicKeyMaterial

public String getPublicKeyMaterial()
The public key portion of the key pair being imported.

Returns:
The public key portion of the key pair being imported.

setPublicKeyMaterial

public void setPublicKeyMaterial(String publicKeyMaterial)
The public key portion of the key pair being imported.

Parameters:
publicKeyMaterial - The public key portion of the key pair being imported.

withPublicKeyMaterial

public ImportKeyPairRequest withPublicKeyMaterial(String publicKeyMaterial)
The public key portion of the key pair being imported.

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

Parameters:
publicKeyMaterial - The public key portion of the key pair being imported.
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.