Obtaining a Node Compliance Report
Function
This API is used to obtaining node compliance reports by page.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
coc:complianceReport:list
List
-
-
-
-
URI
GET /v1/patch/instance/compliant
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
enterprise_project_id |
No |
String |
Definition: Enterprise project ID. Constraints: If no, create one inEnterprise Management. Value range: The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: c17bbc73-f1b4-7890-91f3-a3aa1234561a. Default value: 0. |
|
name |
No |
String |
Definition: Resource name, which is the name of the ECS or BMS after patch scanning or patch fixing. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
instance_id |
No |
String |
Definition: Resource ID, which is the ID of the ECS or BMS after patch scanning or patch fixing. Constraints: N/A. Value range: The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: 8c123456-e426-4cdd-b123-4e1e36e00f99. Default value: N/A. |
|
ip |
No |
String |
Definition: Private IP address of the ECS or BMS NIC. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
eip |
No |
String |
Definition: EIP of the ECS or BMS. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
operating_system |
No |
String |
Definition: Operating system of the ECS or BMS. Constraints: N/A. Value range: Default value: N/A. |
|
region |
No |
String |
Definition: ID of the region where the ECS or BMS instance is located. For details about the mapping between region names and IDs, see Regions and Endpoints. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
group |
No |
String |
Definition: Name of the application group to which the ECS or BMS instance belongs. For details about the application information, see Overview of Application Management. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
compliant_status |
No |
String |
Definition: Compliance status. If the compliance report contains non-compliant patches, the compliance status is non-compliant. Otherwise, the compliance status is compliant. Constraints: N/A. Value range: Default value: N/A. |
|
order_id |
No |
String |
Definition: ID of the patch service ticket, which is generated when a patch scan or patch fixing service ticket is created. Constraints: N/A. Value range: The value must start with OST and be a string of 26 characters consisting of lowercase letters (a to z) and digits (0 to 9). Default value: N/A. |
|
offset |
No |
Integer |
Definition: Offset pointers queried by page for compliance reports. Constraints: N/A. Value range: The value is an integer. The value length is 1 to 1,000,000. Default value: 1. |
|
limit |
No |
Integer |
Definition: Number of compliance reports queried on each page. Constraints: N/A. Value range: The value is an integer. The value length is 1 to 100. Default value: 10. |
|
sort_dir |
No |
String |
Definition: Sorting mode of the compliance report. Constraints: N/A. Value range: Default value: N/A. |
|
sort_key |
No |
String |
Definition: Sorting field. You can select response fields for sorting, which works with the sort_dir parameter. Constraints: N/A. Value range: report_time (Report time) Default value: N/A. |
|
report_scene |
No |
String |
Definition: Compliance report scenario. Constraints: N/A. Value range: Default value: N/A. |
|
cce_info_id |
No |
String |
Definition: CCE cluster ID. Constraints: N/A. Value range: The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: aad16bee-1234-11ef-affb-1234ac1234b6. Default value: N/A. |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
count |
Long |
Definition: Total number of returned node compliance reports. Constraints: N/A. Value range: Integer. Default value: N/A. |
|
instance_compliant |
Array of InstanceCompliant objects |
Definition: Node compliance report. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
compliant_summary |
CompliantSummary object |
Definition: Compliance patch information. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
non_compliant_summary |
NonCompliantSummary object |
Definition: Non-compliance patch information. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
execution_summary |
ExecutionSummary object |
Definition: Execution information. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
id |
String |
Definition: UUID of the compliance report. Constraints: If this parameter does not exist, create one in Enterprise Management. Value range: The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: c17bbc73-f1b4-7890-91f3-a3aa1234561a. Default value: 0. |
|
enterprise_project_id |
String |
Definition: Enterprise project ID. Constraints: If this parameter does not exist, create one in Enterprise Management. Value range: The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: c17bbc73-f1b4-7890-91f3-a3aa1234561a. Default value: 0. |
|
name |
String |
Definition: Resource name, which is the name of the ECS or BMS after patch scanning or patch fixing. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
instance_id |
String |
Definition: Resource ID, which is the ID of the ECS or BMS after patch scanning or patch fixing. Constraints: N/A. Value range: The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: 8c123456-e426-4cdd-b123-4e1e36e00f99. Default value: N/A. |
|
node_id |
String |
Definition: ID of the ECS in the CCE cluster. Constraints: N/A. Value range: The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: aad16bee-1234-11ef-affb-1234ac1234b6. Default value: N/A. |
|
ip |
String |
Definition: Private IP address of the ECS or BMS NIC. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
eip |
String |
Definition: EIP of the ECS or BMS. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
region |
String |
Definition: ID of the region where the ECS or BMS instance is located. For details about the mapping between region names and IDs, see Regions and Endpoints. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
group |
String |
Definition: Name of the application group to which the ECS or BMS instance belongs. For details about the application information, see Overview of Application Management. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
report_scene |
String |
Definition: Compliance report scenario. Constraints: N/A. Value range: Default value: N/A. |
|
cce_info_id |
String |
Definition: CCE cluster ID. Constraints: N/A. Value range: The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: aad16bee-1234-11ef-affb-1234ac1234b6. Default value: N/A. |
|
status |
String |
Definition: Compliance status. If the compliance report contains non-compliant patches, the compliance status is non-compliant. Otherwise, the compliance status is compliant. Constraints: N/A. Value range: Default value: N/A. |
|
baseline_id |
String |
Definition: Baseline ID. Constraints: N/A. Value range: The value is a string of 32 characters starting with JX- and consisting of lowercase letters (a to z) and digits (0 to 9), for example, JX-123456e9541f9b5775193ad3fb8a3. Default value: N/A. |
|
baseline_name |
String |
Definition: Baseline name. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
rule_type |
String |
Definition: Baseline rules Constraints: N/A. Value range: Default value: N/A. |
|
operating_system |
String |
Definition: Operating system of the ECS or BMS. Constraints: N/A. Value range: Default value: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
compliant_count |
Integer |
Definition: Number of returned compliant patches. Constraints: N/A. Value range: Integer. Default value: N/A. |
|
severity_summary |
SeveritySummary object |
Definition: Compliance summary. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
non_compliant_count |
Integer |
Definition: Number of non-compliant patches. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
severity_summary |
SeveritySummary object |
Definition: Compliance summary. Constraints: N/A. Value range: N/A. Default value: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
critical_count |
Integer |
Definition: Number of major compliance reports Constraints: N/A. Value range: Integer. Default value: N/A. |
|
high_count |
Integer |
Definition: Number of high compliance reports Constraints: N/A. Value range: Integer. Default value: N/A. |
|
informational_count |
Integer |
Definition: Number of informational compliance reports Constraints: N/A. Value range: Integer. Default value: N/A. |
|
low_count |
Integer |
Definition: Number of low compliance reports Constraints: N/A. Value range: Integer. Default value: N/A. |
|
medium_count |
Integer |
Definition: Number of medium compliance reports Constraints: N/A. Value range: Integer. Default value: N/A. |
|
unspecified_count |
Integer |
Definition: Number of unspecified compliance reports Constraints: N/A. Value range: Integer. Default value: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
order_id |
String |
Definition: ID of the patch service ticket, which is generated when a patch scan or patch fixing service ticket is created. Constraints: N/A. Value range: The value must start with OST and be a string of 26 characters consisting of lowercase letters (a to z) and digits (0 to 9). Default value: N/A. |
|
job_id |
String |
Definition: ID of the script service ticket to be executed. Constraints: N/A. Value range: The value must start with SCT and be a string of 24 characters consisting of lowercase letters (a to z) and digits (0 to 9). Default value: N/A. |
|
report_time |
Long |
Definition: Report time. Constraints: N/A. Value range: 13-bit millisecond UNIX timestamp. Default value: N/A. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error description |
Example Requests
Query the list of non-compliant reports in the ECS scenario report. Ten records are displayed on each page, starting from the first page.
GET https://coc.myhuaweicloud.com/v1/patch/instance/compliant?offset=1&limit=10&compliant_status=non_compliant&report_scene=ECS
Example Responses
Status code: 200
Node compliance report information is returned.
{
"count" : 1,
"instance_compliant" : [ {
"baseline_id" : "JX-f2d85e2554f7385cbbf2c23a01f41",
"baseline_name" : "COC-EulerOSDefaultPatchBaseline",
"cce_info_id" : null,
"compliant_summary" : {
"compliant_count" : 264,
"severity_summary" : {
"critical_count" : 0,
"high_count" : 0,
"informational_count" : 0,
"low_count" : 0,
"medium_count" : 0,
"unspecified_count" : 264
}
},
"eip" : "123:123:12:1",
"enterprise_project_id" : "c17bbc73-f1b4-7890-91f3-a3aa1234561a",
"execution_summary" : {
"job_id" : "string",
"order_id" : "OST2025060116450602a8asdf1",
"report_time" : 1715308575000
},
"group" : null,
"id" : "string",
"instance_id" : "8c123456-e426-4cdd-b123-4e1e36e00f99",
"ip" : "192.168.2.1",
"name" : "string",
"node_id" : "",
"non_compliant_summary" : {
"non_compliant_count" : 204,
"severity_summary" : {
"critical_count" : 0,
"high_count" : 0,
"informational_count" : 0,
"low_count" : 0,
"medium_count" : 0,
"unspecified_count" : 0
}
},
"operating_system" : "EulerOS",
"region" : "***",
"report_scene" : "ECS",
"rule_type" : "standard",
"status" : "non_compliant"
} ]
}
Status code: 500
An error message is returned.
{
"error_code" : "string",
"error_msg" : "string"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Node compliance report information is returned. |
|
500 |
An error message is returned. |
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