Ignoring, Unignoring, Repairing, or Verifying the Failed Configuration Check Items
Function
Ignore, unignore, repair, or verify the failed configuration check items.
Calling Method
For details, see Calling APIs.
URI
PUT /v5/{project_id}/baseline/check-rule/action
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant 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 |
Baseline name |
check_rule_id |
No |
String |
Check item ID |
standard |
No |
String |
Baseline standards. The options are as follows:
|
fix_values |
No |
Array of CheckRuleFixValuesInfo objects |
User-entered repair parameters of check items |
Response Parameters
Status code: 200
Execution complete
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_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_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 |
Execution complete |
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