阅读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文档_访问控制-阿里云