Package com.amazonaws.services.s3.model
Class MultiFactorAuthentication
java.lang.Object
com.amazonaws.services.s3.model.MultiFactorAuthentication
- All Implemented Interfaces:
Serializable
Contains Multi-Factor Authentication (MFA) information to be included
in Amazon S3 requests,
consisting of the serial number of the MFA device associated with your AWS
account and the current, unique MFA token generated by that device.
Each unique token generated by an MFA device can only be used in one request. It is not valid to reuse the same token in additional requests.
For more information about uses of Multi-Factor Authentication in S3
operations, see BucketVersioningConfiguration
and the explanation
of the MFA Delete functionality.
For more information on AWS Multi-Factor Authentication, including how to get a device and associate it with an AWS account, see http://aws.amazon.com/mfa
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMultiFactorAuthentication
(String deviceSerialNumber, String token) Constructs a newMultiFactorAuthentication
object for use in any Amazonn S3 operation that accepts requests with Multi-Factor Authentication (MFA). -
Method Summary
Modifier and TypeMethodDescriptionGets the Multi-Factor Authentication device serial number.getToken()
Gets the Multi-Factor Authentication token.void
setDeviceSerialNumber
(String deviceSerialNumber) Sets the serial number of the Multi-Factor Authentication device associated with the caller's AWS account.void
Sets the current unique Multi-Factor Authentication token generated by the device associated with the caller's AWS account.withDeviceSerialNumber
(String deviceSerialNumber) Sets the Multi-Factor Authentication device serial number to include with this request.Sets the current, unique Multi-Factor Authentication token generated by the device associated with the caller's AWS account.
-
Constructor Details
-
MultiFactorAuthentication
Constructs a newMultiFactorAuthentication
object for use in any Amazonn S3 operation that accepts requests with Multi-Factor Authentication (MFA).- Parameters:
deviceSerialNumber
- The serial number identifying the MFA device associated with the caller's AWS account.token
- The current unique token generated by the MFA device.
-
-
Method Details
-
getDeviceSerialNumber
Gets the Multi-Factor Authentication device serial number.- Returns:
- The Multi-Factor Authentication device serial number.
- See Also:
-
setDeviceSerialNumber
Sets the serial number of the Multi-Factor Authentication device associated with the caller's AWS account.- Parameters:
deviceSerialNumber
- The Multi-Factor Authentication device serial number for the device associated with the caller's AWS account.- See Also:
-
withDeviceSerialNumber
Sets the Multi-Factor Authentication device serial number to include with this request. Returns thisMultiFactorAuthentication
, enabling additional method calls to be chained together.- Parameters:
deviceSerialNumber
- The serial number of the Multi-Factor Authentication device associated with the caller's AWS account.- Returns:
- This
MultiFactorAuthentication
, enabling additional method calls to be chained together. - See Also:
-
getToken
Gets the Multi-Factor Authentication token.- Returns:
- The Multi-Factor Authentication token.
- See Also:
-
setToken
Sets the current unique Multi-Factor Authentication token generated by the device associated with the caller's AWS account.- Parameters:
token
- The current, unique Multi-Factor Authentication token generated by the device associated with the caller's AWS account.- See Also:
-
withToken
Sets the current, unique Multi-Factor Authentication token generated by the device associated with the caller's AWS account. Returns thisMultiFactorAuthentication
, enabling additional method calls to be chained together.- Parameters:
token
- The current, unique Multi-Factor Authentication token generated by the device associated with the caller's AWS account.- Returns:
- This
MultiFactorAuthentication
, enabling additional method calls to be chained together. - See Also:
-