阅读161 返回首页    go 阿里云


SetSecurityPreference__安全设置接口_RAM API文档_访问控制-阿里云

接口描述

 设置全局安全首选项

请求参数

Action

  • 类型:String
  • 必须:是
  • 描述:操作接口名,系统规定参数,取值:SetSecurityPreference

EnableSaveMFATicket

  • 类型:Boolean
  • 必须:否
  • 描述:是否允许在用户在登录时保存MFA验证票据,目前票据有效期是七天

AllowUserToChangePassword

  • 类型:Boolean
  • 必须:false
  • 默认:true
  • 描述:是否允许用户修改自己的密码

AllowUserToManageAccessKeys

  • 类型:Boolean
  • 必须:false
  • 默认:false
  • 描述:是否允许用户管理自己的AccessKey

AllowUserToManageMFADevices

  • 类型:Boolean
  • 必须:false
  • 默认:true
  • 描述:是否允许用户管理自己绑定或解绑MFA设备

返回参数

SecurityPreference

需要的权限

Action

ram:SetSecurityPreference

Resource

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

操作示例

请求示例

  1. https://ram.aliyuncs.com/?Action=SetSecurityPreference
  2. &EnableSaveMFATicket=true
  3. &AllowUserToChangePassword=true
  4. &AllowUserToManageAccessKeys=false
  5. &<公共请求参数>

返回示例

XML格式

  1. <SetSecurityPreferenceResponse>
  2. <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
  3. <SecurityPreference>
  4. <LoginProfilePreference>
  5. <EnableSaveMFATicket>true</EnableSaveMFATicket>
  6. <AllowUserToChangePassword>true</AllowUserToChangePassword>
  7. </LoginProfilePreference>LoginProfilePreference>
  8. <AccessKeyPreference>
  9. <AllowUserToManageAccessKeys>false</AllowUserToManageAccessKeys>
  10. </AccessKeyPreference>
  11. <MFAPreference>
  12. <AllowUserToManageMFADevices>false</AllowUserToManageMFADevices>
  13. </MFAPreference>
  14. </SecurityPreference>
  15. </SetSecurityPreferenceResponse>

JSON格式

  1. {
  2. "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  3. "SecurityPreference": {
  4. "LoginProfilePreference": {
  5. "EnableSaveMFATicket": true,
  6. "AllowUserToChangePassword": true
  7. },
  8. "AccessKeyPreference": {
  9. "AllowUserToManageAccessKeys": false
  10. },
  11. "MFAPreference": {
  12. "AllowUserToManageMFADevices": true
  13. }
  14. }
  15. }

最后更新:2016-11-23 17:16:10

  上一篇:go GetPasswordPolicy__安全设置接口_RAM API文档_访问控制-阿里云
  下一篇:go User__数据类型_RAM API文档_访问控制-阿里云