Ignoring, Unignoring, Repairing, or Verifying the Failed Configuration Check Items
Function
Ignore, unignore, repair, or verify the failed configuration check items.
URI
PUT /v5/{project_id}/baseline/check-rule/action
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
enterprise_project_id | No | String | Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps. |
host_id | No | String | Server ID. If this parameter is not specified, all the servers of the user are queried. |
action | Yes | String | Action.
|
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
check_rules | No | Array of CheckRuleKeyInfoRequestInfo objects | Check item ID list |
Parameter | Mandatory | Type | Description |
---|---|---|---|
check_name | No | String | Name of the configuration check (baseline), for example, SSH, CentOS 7, and Windows. |
check_rule_id | No | String | Check item ID, which can be obtained from the return data of this API: /v5/{project_id}/baseline/risk-config/{check_name}/check-rules |
standard | No | String | Baseline standards. The options are as follows:
|
fix_values | No | Array of CheckRuleFixValuesInfo objects | User-entered repair parameters of check items |
Parameter | Mandatory | Type | Description |
---|---|---|---|
rule_param_id | No | Integer | Parameter ID of the check item |
fix_value | No | Integer | Parameter value of the check item |
Response Parameters
None
Example Requests
This API is used to ignore the configuration check items whose baseline name is SSH, check item ID is 1.11, check standard is cloud security practice standard, and enterprise project ID is xxx. This operation applies to all affected servers.
PUT https://{endpoint}/v5/{project_id}/baseline/check-rule/action?enterprise_project_id=xxx&action=ignore{"check_rules" : [ {"check_name" : "SSH","check_rule_id" : "1.11","standard" : "hw_standard"} ]}This API is used to restore the configuration check items whose baseline name is SSH, check item ID is 1.11, check standard is cloud security practice standard, and enterprise project ID is xxx. This operation applies only to the server whose ID is xxx. The restoration parameters are as follows: Set the value of the repair item whose ID is 1 to 5 and the value of the repair item whose ID is 2 to 20.
PUT https://{endpoint}/v5/{project_id}/baseline/check-rule/action?enterprise_project_id=xxx&host_id=xxx&action=fix{"check_rules" : [ {"check_name" : "SSH","check_rule_id" : "1.11","standard" : "hw_standard","fix_values" : [ {"rule_param_id" : 1,"fix_value" : 5}, {"rule_param_id" : 2,"fix_value" : 20} ]} ]}
Example Responses
None
Status Codes
Status Code | Description |
---|---|
200 | Request succeeded. |
Error Codes
See Error Codes.
- URI