create_virtual_mfa_device ( $virtual_mfa_device_name, $opt )

Creates a new virtual MFA device for the AWS account. After creating the virtual MFA, use EnableMFADevice to attach the MFA device to an IAM user. For more information about creating and working with virtual MFA devices, go to Using a Virtual MFA Device in Using AWS Identity and Access Management.

For information about limits on the number of MFA devices you can create, see Limitations on Entities in Using AWS Identity and Access Management.

The seed information contained in the QR code and the Base32 string should be treated like any other secret access information, such as your AWS access keys or your passwords. After you provision your virtual device, you should ensure that the information is destroyed following secure procedures.

Access

public

Parameters

Parameter

Type

Required

Description

$virtual_mfa_device_name

string

Required

The name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device. [Constraints: The value must be more than 1 characters, and must match the following regular expression pattern: [\w+=,.@-]*]

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • Path - string - Optional - The path for the virtual MFA device. For more information about paths, see Identifiers for IAM Entities in Using AWS Identity and Access Management. This parameter is optional. If it is not included, it defaults to a slash (/). [Constraints: The value must be between 1 and 512 characters, and must match the following regular expression pattern: (\u002F)|(\u002F[\u0021-\u007F]+\u002F)]
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Source

Method defined in services/iam.class.php | Toggle source view (7 lines) | View on GitHub

public function create_virtual_mfa_device($virtual_mfa_device_name, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['VirtualMFADeviceName'] = $virtual_mfa_device_name;
    
    return $this->authenticate('CreateVirtualMFADevice', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback