调用GetSecurityPreference查询RAM用户的全局安全首选项。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetSecurityPreference | 要执行的操作。取值:GetSecurityPreference。 |
关于公共请求参数的详情,请参见公共参数。
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
SecurityPreference | Object | 安全首选项信息。 |
|
AccessKeyPreference | Object | 访问密钥首选项。 |
|
AllowUserToManageAccessKeys | Boolean | false | 是否允许RAM用户自主管理访问密钥。取值:
|
LoginProfilePreference | Object | 登录首选项。 |
|
EnableSaveMFATicket | Boolean | false | RAM用户使用多因素认证登录后,是否允许保存多因素认证的验证状态,其有效期为7天。取值:
|
LoginSessionDuration | Integer | 6 | RAM用户登录有效期。单位:小时。 |
LoginNetworkMasks | String | 10.0.0.0/8 | 登录掩码。 |
AllowUserToChangePassword | Boolean | true | 是否允许RAM用户自主管理密码。取值:
|
OperationForRiskLogin | String | autonomous | 异常登录时是否二次验证MFA。取值:
|
MFAOperationForLogin | String | adaptive | 登录时必须使用MFA(取代原EnforceMFAForLogin参数,原参数仍然有效,建议更新为新参数)。取值:
|
MFAPreference | Object | 多因素认证首选项。 |
|
AllowUserToManageMFADevices | Boolean | false | 是否允许RAM用户自主管理多因素认证设备。取值:
|
PersonalInfoPreference | Object | 个人信息首选项。 |
|
AllowUserToManagePersonalDingTalk | Boolean | true | 是否允许RAM用户自主管理个人钉钉的绑定与解绑。取值:
|
RequestId | String | 30C9068D-FBAA-4998-9986-8A562FED0BC3 | 请求ID。 |
示例
请求示例
https://[Endpoint]/?Action=GetSecurityPreference
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetSecurityPreferenceResponse>
<SecurityPreference>
<AccessKeyPreference>
<AllowUserToManageAccessKeys>false</AllowUserToManageAccessKeys>
</AccessKeyPreference>
<LoginProfilePreference>
<EnableSaveMFATicket>false</EnableSaveMFATicket>
<LoginSessionDuration>6</LoginSessionDuration>
<LoginNetworkMasks>10.0.0.0/8</LoginNetworkMasks>
<AllowUserToChangePassword>true</AllowUserToChangePassword>
<OperationForRiskLogin>autonomous</OperationForRiskLogin>
<MFAOperationForLogin>adaptive</MFAOperationForLogin>
</LoginProfilePreference>
<MFAPreference>
<AllowUserToManageMFADevices>false</AllowUserToManageMFADevices>
</MFAPreference>
<PersonalInfoPreference>
<AllowUserToManagePersonalDingTalk>true</AllowUserToManagePersonalDingTalk>
</PersonalInfoPreference>
</SecurityPreference>
<RequestId>30C9068D-FBAA-4998-9986-8A562FED0BC3</RequestId>
</GetSecurityPreferenceResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"SecurityPreference" : {
"AccessKeyPreference" : {
"AllowUserToManageAccessKeys" : false
},
"LoginProfilePreference" : {
"EnableSaveMFATicket" : false,
"LoginSessionDuration" : 6,
"LoginNetworkMasks" : "10.0.0.0/8",
"AllowUserToChangePassword" : true,
"OperationForRiskLogin" : "autonomous",
"MFAOperationForLogin" : "adaptive"
},
"MFAPreference" : {
"AllowUserToManageMFADevices" : false
},
"PersonalInfoPreference" : {
"AllowUserToManagePersonalDingTalk" : true
}
},
"RequestId" : "30C9068D-FBAA-4998-9986-8A562FED0BC3"
}
错误码
访问错误中心查看更多错误码。