public class MultiFactorAuthentication extends Object implements Serializable
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 Amazon Web Services Multi-Factor Authentication, including how to get a device and associate it with an Amazon Web Services account, see http://aws.amazon.com/mfa
Constructor and Description |
---|
MultiFactorAuthentication(String deviceSerialNumber,
String token)
Constructs a new
MultiFactorAuthentication object for use in any
Amazon S3
operation that accepts requests with Multi-Factor Authentication (MFA). |
Modifier and Type | Method and Description |
---|---|
String |
getDeviceSerialNumber()
Gets the Multi-Factor Authentication device serial number.
|
String |
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 Amazon Web Services account.
|
void |
setToken(String token)
Sets the current unique Multi-Factor Authentication token generated by
the device associated with the caller's Amazon Web Services account.
|
MultiFactorAuthentication |
withDeviceSerialNumber(String deviceSerialNumber)
Sets the Multi-Factor Authentication device serial number to include with
this request.
|
MultiFactorAuthentication |
withToken(String token)
Sets the current, unique Multi-Factor Authentication token generated by
the device associated with the caller's Amazon Web Services account.
|
public MultiFactorAuthentication(String deviceSerialNumber, String token)
MultiFactorAuthentication
object for use in any
Amazon S3
operation that accepts requests with Multi-Factor Authentication (MFA).deviceSerialNumber
- The serial number identifying the MFA device associated with
the caller's Amazon Web Services account.token
- The current unique token generated by the MFA device.public String getDeviceSerialNumber()
MultiFactorAuthentication.setDeviceSerialNumber(String)
,
MultiFactorAuthentication.withDeviceSerialNumber(String)
public void setDeviceSerialNumber(String deviceSerialNumber)
deviceSerialNumber
- The Multi-Factor Authentication device serial number for the
device associated with the caller's Amazon Web Services account.MultiFactorAuthentication.getDeviceSerialNumber()
,
MultiFactorAuthentication.withDeviceSerialNumber(String)
public MultiFactorAuthentication withDeviceSerialNumber(String deviceSerialNumber)
MultiFactorAuthentication
, enabling additional method
calls to be chained together.deviceSerialNumber
- The serial number of the Multi-Factor Authentication device
associated with the caller's Amazon Web Services account.MultiFactorAuthentication
, enabling additional method
calls to be chained together.MultiFactorAuthentication.getDeviceSerialNumber()
,
MultiFactorAuthentication.setDeviceSerialNumber(String)
public String getToken()
MultiFactorAuthentication.setToken(String)
,
MultiFactorAuthentication.withToken(String)
public void setToken(String token)
token
- The current, unique Multi-Factor Authentication token generated
by the device associated with the caller's Amazon Web Services account.MultiFactorAuthentication.getToken()
,
MultiFactorAuthentication.withToken(String)
public MultiFactorAuthentication withToken(String token)
MultiFactorAuthentication
, enabling additional method
calls to be chained together.token
- The current, unique Multi-Factor Authentication token
generated by the device associated with the caller's Amazon Web Services account.MultiFactorAuthentication
, enabling additional method
calls to be chained together.MultiFactorAuthentication.getToken()
,
MultiFactorAuthentication.setToken(String)
Copyright © 2024. All rights reserved.