Class AWS::IAM::MFADeviceCollection
In: lib/aws/iam/mfa_device_collection.rb
Parent: Object

@attr_reader [User] user Returns the user that owns this collection.

Methods

[]   clear   create   disable   each   each_item   enable   enumerator   new  

Included Modules

Collection

Attributes

user  [R]  @return [User] Returns the user that this mfa device collection
  belongs to.

Public Class methods

@param [User] user The user that owns this device collection.

Public Instance methods

@param [String] serial_number The serial number of an MFA device. @return [MFADevice] Returns a reference to an MFA device with the

  given serial number.

Deactivates all of the MFA devices in this collection. Virtual MFA devices in this collection will not be deleted. Instead they will be available in the {IAM#virtual_mfa_devices} collection so that they can either be deleted or enabled for different users.

@return [nil]

create(serial_number, authentication_code_1, authentication_code_2)

Alias for enable

@param [String] serial_number The serial number of the MFA device you

  want to disable.

@return [nil]

Yields once for each MFA device.

You can limit the number of devices yielded using +:limit+.

@param [Hash] options @option options [Integer] :limit The maximum number of devices to yield. @option options [Integer] :batch_size The maximum number of devices

  receive each service reqeust.

@yieldparam [User] user @return [nil]

Enables an MFA device for this user. @param [String] serial_number The serial number that uniquely

  identifies the MFA device

@param [String] authentication_code_1 An authentication code emitted

  by the device.

@param [String] authentication_code_2 A subsequent authentication

  code emitted by the device.

@return [MFADevice] Returns the newly enabled MFA device.

Returns an enumerable object for this collection. This can be useful if you want to call an enumerable method that does not accept options (e.g. collect, first, etc).

  mfa_devices.enumerator(:limit => 10).collect(&:serial_number)

@param (see each) @option (see each) @return [Enumerator]

Protected Instance methods

[Validate]