Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.amazonaws.services.s3.model
Class MultiFactorAuthentication

    java.lang.Object
      com.amazonaws.services.s3.model.MultiFactorAuthentication

    public class MultiFactorAuthentication

extends Object

Multi-Factor Authentication (MFA) information to be included in 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 your AWS account, see http://aws.amazon.com/mfa

Constructor Summary
`MultiFactorAuthentication(String deviceSerialNumber, String token)` Constructs a new Multi-Factor Authentication object for use in any S3 operation that accepts requests with Multi-Factor Authentication (ex: `AmazonS3.deleteVersion(DeleteVersionRequest)`).

Method Summary
`String` | `getDeviceSerialNumber()` Returns the Multi-Factor Authentication device serial number.
`String` | `getToken()` Returns the Multi-Factor Authentication token.
`void` | `setDeviceSerialNumber(String deviceSerialNumber)` Sets the serial number of the Multi-Factor Authentication device associated with your AWS account.
`void` | `setToken(String token)` Sets the current, unique Multi-Factor Authentication token generated by the device associated with your AWS account.
`MultiFactorAuthentication` | `withDeviceSerialNumber(String deviceSerialNumber)` Sets the Multi-Factor Authentication device serial number to include with this request, and returns this object so that additional method calls may be chained together.
`MultiFactorAuthentication` | `withToken(String token)` Sets the current, unique Multi-Factor Authentication token generated by the device associated with your AWS account, and returns this object so that additional method calls may be chained together.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MultiFactorAuthentication

    public MultiFactorAuthentication(String deviceSerialNumber,
                                     String token)

  Constructs a new Multi-Factor Authentication object for use in any S3 operation that accepts requests with Multi-Factor Authentication (ex: `AmazonS3.deleteVersion(DeleteVersionRequest)`).

  Parameters:
    `deviceSerialNumber` - The serial number identifying the MFA device associated with your AWS account.
    `token` - The current, unique token generated by your MFA device.

Method Detail

### getDeviceSerialNumber

    public String getDeviceSerialNumber()

  Returns the Multi-Factor Authentication device serial number.

  Returns:
    The Multi-Factor Authentication device serial number.

### setDeviceSerialNumber

    public void setDeviceSerialNumber(String deviceSerialNumber)

  Sets the serial number of the Multi-Factor Authentication device associated with your AWS account.

  Parameters:
    `deviceSerialNumber` - The Multi-Factor Authentication device serial number for the device associated with your AWS account.

### withDeviceSerialNumber

    public MultiFactorAuthentication withDeviceSerialNumber(String deviceSerialNumber)

  Sets the Multi-Factor Authentication device serial number to include with this request, and returns this object so that additional method calls may be chained together.

  Parameters:
    `deviceSerialNumber` - The serial number of the Multi-Factor Authentication device associated with your AWS account.
  Returns:
    This updated MultiFactorAuthentication object so that additional method calls may be chained together.

### getToken

    public String getToken()

  Returns the Multi-Factor Authentication token.

  Returns:
    The Multi-Factor Authentication token.

### setToken

    public void setToken(String token)

  Sets the current, unique Multi-Factor Authentication token generated by the device associated with your AWS account.

  Parameters:
    `token` - The current, unique Multi-Factor Authentication token generated by the device associated with your AWS account.

### withToken

    public MultiFactorAuthentication withToken(String token)

  Sets the current, unique Multi-Factor Authentication token generated by the device associated with your AWS account, and returns this object so that additional method calls may be chained together.

  Parameters:
    `token` - The current, unique Multi-Factor Authentication token generated by the device associated with your AWS account.
  Returns:
    This updated object so that additional method calls may be chained together.

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.