Package com.amazonaws.services.ec2.model
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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description ImportKeyPairRequest()
Default constructor for ImportKeyPairRequest object.ImportKeyPairRequest(String keyName, String publicKeyMaterial)
Constructs a new ImportKeyPairRequest object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImportKeyPairRequest
clone()
Creates a shallow clone of this request.boolean
equals(Object obj)
Request<ImportKeyPairRequest>
getDryRunRequest()
This method is intended for internal use only.String
getKeyName()
A unique name for the key pair.String
getPublicKeyMaterial()
The public key.int
hashCode()
void
setKeyName(String keyName)
A unique name for the key pair.void
setPublicKeyMaterial(String publicKeyMaterial)
The public key.String
toString()
Returns a string representation of this object; useful for testing and debugging.ImportKeyPairRequest
withKeyName(String keyName)
A unique name for the key pair.ImportKeyPairRequest
withPublicKeyMaterial(String publicKeyMaterial)
The public key.-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
-
-
-
Constructor Detail
-
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 Detail
-
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 interfaceDryRunSupportedRequest<ImportKeyPairRequest>
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
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 classAmazonWebServiceRequest
- See Also:
Object.clone()
-
-