Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.s3.model;


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

 
 public class MultiFactorAuthentication {

    
The serial number of the Multi-Factor Authentication device associated with your AWS account.
 
     private String deviceSerialNumber;

    
The current, unique Multi-Factor Authentication (MFA) token generated by the MFA device associated with your AWS account.
 
     private String token;

    
Constructs a new MultiFactorAuthentication 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.
 
     public MultiFactorAuthentication(String deviceSerialNumberString token) {
         this. = deviceSerialNumber;
         this. = token;
     }
    
    
Gets the Multi-Factor Authentication device serial number.

Returns:
The Multi-Factor Authentication device serial number.
See also:
setDeviceSerialNumber(java.lang.String)
withDeviceSerialNumber(java.lang.String)
 
     public String getDeviceSerialNumber() {
         return ;
     }

    
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:
getDeviceSerialNumber()
withDeviceSerialNumber(java.lang.String)
 
     public void setDeviceSerialNumber(String deviceSerialNumber) {
         this. = deviceSerialNumber;
     }

    
Sets the Multi-Factor Authentication device serial number to include with this request. Returns this MultiFactorAuthentication, 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:
getDeviceSerialNumber()
setDeviceSerialNumber(java.lang.String)
    public MultiFactorAuthentication withDeviceSerialNumber(String deviceSerialNumber) {
        setDeviceSerialNumber(deviceSerialNumber);
        return this;
    }

    
Gets the Multi-Factor Authentication token.

Returns:
The Multi-Factor Authentication token.
See also:
setToken(java.lang.String)
withToken(java.lang.String)
    public String getToken() {
        return ;
    }

    
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:
getToken()
withToken(java.lang.String)
    public void setToken(String token) {
        this. = token;
    }

    
Sets 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.

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:
getToken()
setToken(java.lang.String)
    public MultiFactorAuthentication withToken(String token) {
        setToken(token);
        return this;
    }
New to GrepCode? Check out our FAQ X