閱讀292 返回首頁    go 阿裏雲


BindMFADevice__用戶管理接口_RAM API文檔_訪問控製-阿裏雲

接口描述

 綁定多因素認證設備

請求參數

Action

  • 類型:String
  • 必須:是
  • 描述:操作接口名,係統規定參數,取值:BindMFADevice

SerialNumber

  • 類型:String
  • 必須:是
  • 描述:指定MFA設備的序列號

UserName

  • 類型:String
  • 必須:是
  • 描述:指定用戶名

AuthenticationCode1

  • 類型:String
  • 必須:是
  • 描述:驗證第一組動態密碼

AuthenticationCode2

  • 類型:String
  • 必須:是
  • 描述:驗證第二組動態密碼

返回參數

  隻有公共返回參數,詳見公共返回參數

需要的權限

Action

ram:BindMFADevice

Resource

acs:ram:*:${AccountId}:user/${UserName}

錯誤信息

InvalidParameter.UserName.InvalidChars
  • HTTP Status:400
  • Error Message:The parameter - "UserName" contains invalid chars.
InvalidParameter.UserName.Length
  • HTTP Status:400
  • Error Message:The parameter - "UserName" beyond the length limit.
InvalidParameter.AuthenticationCode.Format
  • HTTP Status:400
  • Error Message:The parameter - "AuthenticationCode" MUST be 6 numbers.
CheckAuthenticationCodeFail
  • HTTP Status:403
  • Error Message:The authentication code is incorrect.
EntityNotExist.User
  • HTTP Status:404
  • Error Message:The user does not exist.
EntityNotExist.VirtualMFADevice
  • HTTP Status:404
  • Error Message:The virtual mfa device does not exist.
EntityAlreadyExists.User.MFADevice
  • HTTP Status:409
  • Error Message:The user has already bound a MFA device.
EntityAlreadyExists.VirtualMFADevice.User
  • HTTP Status:409
  • Error Message:The virtual mfa device does already been bound to a user.

操作示例

請求示例

https://ram.aliyuncs.com/?Action=BindMFADevice
&SerialNumber=acs:ram::1234567890123:mfa/device002
&UserName=zhangqiang
&<公共請求參數>

返回示例

XML格式

<BindMFADeviceResponse>
    <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
</BindMFADeviceResponse>

JSON格式

{
    "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}

最後更新:2016-11-23 17:16:05

  上一篇:go DeleteVirtualMFADevice__用戶管理接口_RAM API文檔_訪問控製-阿裏雲
  下一篇:go UnbindMFADevice__用戶管理接口_RAM API文檔_訪問控製-阿裏雲