Returns a virtual MFA device with the given serial number. @param [String] serial_number The serial number (ARN) of a virtual
MFA device.
@return [VirtualMfaDevice]
# File lib/aws/iam/virtual_mfa_device_collection.rb, line 48 def [] serial_number VirtualMfaDevice.new(serial_number, :config => config) end
Creates a new virtual MFA device for the AWS account. After creating the virtual MFA, you can enable the device to an IAM user.
@param [String] name The name of the virtual MFA device. Name and path
together uniquely identify a virtual MFA device.
@param [Hash] options @option [String] :path The path for the virtual MFA device. @return [VirtualMfaDevice]
# File lib/aws/iam/virtual_mfa_device_collection.rb, line 30 def create name, options = {} client_opts = options.dup client_opts[:virtual_mfa_device_name] = name resp = client.create_virtual_mfa_device(client_opts) VirtualMfaDevice.new_from( :create_virtual_mfa_device, resp.virtual_mfa_device, resp.virtual_mfa_device.serial_number, :config => config) end
# File lib/aws/iam/virtual_mfa_device_collection.rb, line 62 def each_item(response) response.virtual_mfa_devices.each do |d| device = VirtualMfaDevice.new_from( :list_mfa_devices, d, d.serial_number, :config => config) yield(device) end end
# File lib/aws/iam/virtual_mfa_device_collection.rb, line 59 def limit_key; :max_items; end
# File lib/aws/iam/virtual_mfa_device_collection.rb, line 56 def next_token_key; :marker; end
# File lib/aws/iam/virtual_mfa_device_collection.rb, line 53 def request_method; :list_virtual_mfa_devices; end