Class ImportKeyPairRequest

java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.ec2.model.ImportKeyPairRequest
All Implemented Interfaces:
ReadLimitInfo, DryRunSupportedRequest<ImportKeyPairRequest>, Serializable, Cloneable

public class ImportKeyPairRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<ImportKeyPairRequest>

Contains the parameters for ImportKeyPair.

See Also:
  • Constructor Details

    • ImportKeyPairRequest

      public ImportKeyPairRequest()
      Default constructor for ImportKeyPairRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the 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 - 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.
  • Method Details

    • setKeyName

      public void setKeyName(String keyName)

      A unique name for the key pair.

      Parameters:
      keyName - A unique name for the key pair.
    • getKeyName

      public String getKeyName()

      A unique name for the key pair.

      Returns:
      A unique name for the key pair.
    • withKeyName

      public ImportKeyPairRequest withKeyName(String keyName)

      A unique name for the key pair.

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

      public void setPublicKeyMaterial(String publicKeyMaterial)

      The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.

      Parameters:
      publicKeyMaterial - The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.
    • getPublicKeyMaterial

      public String getPublicKeyMaterial()

      The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.

      Returns:
      The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.
    • withPublicKeyMaterial

      public ImportKeyPairRequest withPublicKeyMaterial(String publicKeyMaterial)

      The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.

      Parameters:
      publicKeyMaterial - The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getDryRunRequest

      public Request<ImportKeyPairRequest> getDryRunRequest()
      This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.
      Specified by:
      getDryRunRequest in interface DryRunSupportedRequest<ImportKeyPairRequest>
    • 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:
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public ImportKeyPairRequest clone()
      Description copied from class: AmazonWebServiceRequest
      Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.
      Overrides:
      clone in class AmazonWebServiceRequest
      See Also: