Querying the Account Login Policy
Function
This API is used to query the account login policy.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
iam:securitypolicies:getLoginPolicyV5 |
Read |
- |
- |
- |
- |
URI
GET /v5/login-policy
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
login_policy |
LoginPolicy object |
Login authentication policy |
|
Parameter |
Type |
Description |
|---|---|---|
|
user_validity_period |
Integer |
If an IAM user does not log in within the validity period (days) specified by this parameter, the user is disabled. This does not apply to the root user. |
|
custom_info_for_login |
String |
Login information. |
|
lockout_duration |
Integer |
Account lockout duration (minute) for IAM users. |
|
login_failed_times |
Integer |
Maximum number of invalid login attempts. |
|
period_with_login_failures |
Integer |
Specified duration (minute). |
|
session_timeout |
Integer |
Timeout duration of a session. |
|
show_recent_login_info |
Boolean |
Indicates whether to display the last login information upon successful login. |
|
allow_address_netmasks |
Array of AllowAddressNetmask objects |
IP addresses or CIDR blocks from which API access is allowed. |
|
allow_ip_ranges |
Array of AllowIpRange objects |
IP address ranges from which API access is allowed. |
|
Parameter |
Type |
Description |
|---|---|---|
|
address_netmask |
String |
IP address or CIDR block, for example, 192.168.0.1/24. Maximum: 50 |
|
description |
String |
Description. The value cannot contain the following special characters: @#%&<>\$^* Maximum: 255 |
|
Parameter |
Type |
Description |
|---|---|---|
|
ip_range |
String |
IP address range, for example, 0.0.0.0-255.255.255.255 Maximum: 50 |
|
description |
String |
Description. The value cannot contain the following special characters: @#%&<>\$^* Maximum: 255 |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
request_id |
String |
Request ID. |
|
encoded_authorization_message |
String |
Encrypted authentication failure information, which can be decrypted using the STS5 decryption API. |
Example Requests
Querying the account login policy
GET https://{endpoint}/v5/login-policy
Example Responses
Status code: 200
Successful
{
"login_policy" : {
"user_validity_period" : 0,
"custom_info_for_login" : "info",
"lockout_duration" : 15,
"login_failed_times" : 5,
"period_with_login_failures" : 15,
"session_timeout" : 60,
"show_recent_login_info" : false,
"allow_address_netmasks" : [ {
"address_netmask" : "192.168.0.1/24",
"description" : "description"
} ],
"allow_ip_ranges" : [ {
"ip_range" : "0.0.0.0-255.255.255.255",
"description" : "description"
} ]
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successful |
|
403 |
Forbidden |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot