Updated on 2024-03-18 GMT+08:00

Evaluation Results

After an evaluation is triggered, the corresponding evaluation result (PolicyState) will be generated.

You can use a JSON expression to represent an evaluation result, as shown in Table 1.

Table 1 Evaluation result in JSON

Parameter

Description

Remarks

domain_id

Account ID

This parameter is used to distinguish users. domain_id in the evaluation result will not be left blank.

resource_id

Specifies the ID of the evaluated resource.

N/A

resource_name

Specifies the name of the evaluated resource.

N/A

resource_provider

Specifies the service the resource belongs to.

N/A

resource_type

Specifies the resource type.

N/A

trigger_type

Trigger type

Possible values are:

  • resource
  • period

compliance_state

Specifies the compliance result.

Possible values are:

  • Compliant
  • NonCompliant

policy_assignment_id

Rule ID

N/A

policy_definition_id

Specifies the ID of the policy used for evaluation.

N/A

evaluation_time

Specifies the evaluation timestamp.

N/A

The following JSON indicates a non-compliant evaluation result:

{
  "domain_id": "domainidforpolicy",
  "resource_id": "special-ecs1-with-public-ip-with-tag",
  "resource_name": "ecs1-with-public-ip-with-tag",
  "resource_provider": "ecs",
  "resource_type": "cloudservers",
  "trigger_type": "resource",
  "compliance_state": "NonCompliant",
  "policy_assignment_id": "5fa9f8a2501013093a192b07",
  "policy_definition_id": "5fa9f8a2501013093a192b06",
  "evaluation_time": 1604974757084
}