CreateVirtualMFADevice

Last Updated: Aug 25, 2016

Interface description

 Creates a virtual MFA device.

Request parameters

Action

  • Type: String
  • Required: Yes
  • Description: Operation interface, required. The parameter value is “CreateVirtualMFADevice”.

VirtualMFADeviceName

  • Type: String
  • Required: Yes
  • Description: Device name. It consists of a maximum of 64 characters.
  • Restrictions: [a-zA-Z0-9-]*

Return parameters

VirtualMFADevice

Required permissions

Action

ram:CreateVirtualMFADevice

Resource

acs:ram:*:${AccountId}:mfa/*

Error messages

InvalidParameter.VirtualMFADeviceName.InvalidChars
  • HTTP Status:400
  • Error Message:The parameter - “VirtualMFADeviceName” contains invalid chars.
InvalidParameter.VirtualMFADeviceName.Length
  • HTTP Status:400
  • Error Message:The parameter - “VirtualMFADeviceName” beyond the length limit.
EntityAlreadyExists.VirtualMFADevice
  • HTTP Status:409
  • Error Message:The virtual mfa device does already EXIST.
LimitExceeded.VirtualMFADevice
  • HTTP Status:409
  • Error Message:The count of virtual mfa devices beyond the current limits.

Operation examples

Request example

  1. https://ram.aliyuncs.com/?Action=CreateVirtualMFADevice
  2. &VirtualMFADeviceName=device001
  3. &<Public request parameters>

Return example

XML format

  1. <CreateVirtualMFADeviceResponse>
  2. <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
  3. <VirtualMFADevice>
  4. <SerialNumber>acs:ram::1234567890123:mfa/device001</VirtualMFASerialNumber>
  5. <Base32StringSeed>DSF98HAD982KJA9SDFNAS9D8FU839B8ADHBGSD7A8</Base32StringSeed>
  6. <QRCodePNG>YXNkZmFzZDlmeW5hc2Q5OGZoODd4bXJmcThhaGU5aSBmYXNkZiBzYWRmIGFGIDRxd2VjIGEgdHEzdCAg</QRCodePNG>
  7. </VirtualMFADevice>
  8. </CreateVirtualMFADeviceResponse>

JSON format

  1. {
  2. "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  3. "VirtualMFADevice": {
  4. "SerialNumber": "acs:ram::1234567890123:mfa/device001",
  5. "Base32StringSeed": "DSF98HAD982KJA9SDFNAS9D8FU839B8ADHBGSD7A8",
  6. "QRCodePNG": "YXNkZmFzZDlmeW5hc2Q5OGZoODd4bXJmcThhaGU5aSBmYXNkZiBzYWRmIGFGIDRxd2VjIGEgdHEzdCAg"
  7. }
  8. }
Thank you! We've received your feedback.