All Products
Search
Document Center

Cloud Config:Example of compliance snapshots

Last Updated:Oct 14, 2025

This topic provides an example of the compliance snapshots that are delivered to a Simple Log Service (SLS). The following sections describe the content of the example and the parameters involved.

Example

In single-account mode, you use an Alibaba Cloud account whose ID is 100931896542***** and you have an instance iZ2ze3xqpgsk89p5zxhf**** in Elastic Compute Service (ECS) in the China (Heyuan) region. The compliance snapshots are delivered to a SLS. The following code shows a sample snapshot:

{
  "annotation": "{\"configuration\":\"{}\",\"desiredValue\":\"{\\\"aaaaa\\\":\\\"\\\"}\",\"operator\":\"TagsExist\",\"property\":\"$.Tags\",\"reason\":\"Tags not match key: aaaaa\"}",
  "resourceId": "i-f8z9iqwukcuzbgzxfl****",
  "configRuleName": "ECS instance status is not stopped",
  "riskLevel": "Critical",
  "configRuleId": "cr-d670626622af0086****",
  "dataType": "CompliantSnapshot",
  "resourceName": "Zf8z9iqwukcuzbgzxflcbZ",
  "invokingEventMessageType": "Manual",
  "complianceType": "COMPLIANT",
  "accountId": "100931896542****",
  "compliancePackId": "cp-d670626622af0086****",
  "regionId": "cn-heyuan",
  "requestId": "909c765c-e4da-4bc1-8690-1d93820f****",
  "tags": "{\"acs:tag:createdby\":[\"customer:100931896542****\"],\"test\":[\"\"]}",
  "resourceOwnerId": "100931896542****",
  "lastNonCompliantRecordTimestamp": "1748227701804",
  "resourceType": "ACS::ECS::Instance"
}

Parameters

The following table describes the parameters involved in the compliance snapshots that are delivered to a SLS.

Parameter

Description

annotation

The description of the resource compliance results.

resourceId

The resource ID.

configRuleName

The rule name.

riskLevel

The risk level of the resources that do not comply with the rule. Valid values:

  • Info: low risk.

  • Warning: medium risk.

  • Critical: high risk.

configRuleId

The rule ID.

dataType

The type of the log received by SLS. Valid values:

  • CompliantSnapshot: compliance snapshot.

resourceName

The name of the resource.

invokingEventMessageType

The trigger type of the rule. Valid values:

  • ScheduledNotification: The rule is periodically triggered.

  • ConfigurationItemChangeNotification: The rule is triggered by configuration changes.

  • Manual: The rule is manually triggered.

complianceType

The compliance evaluation result of the resource. Valid values:

  • COMPLIANT: The resource is compliant.

  • NON_COMPLIANT: The resource is incompliant.

  • NOT_APPLICABLE: The rule does not apply to your resource.

  • INSUFFICIENT_DATA: No resource data is available.

  • IGNORED: The resource is ignored by user settings.

accountId

The ID of the account to which the resource belongs. The account ID depends on the account mode.

  • Ordinary account: An ordinary account is an independent Alibaba Cloud account that is not included in a resource directory by a management account.

  • Management account: A management account is an Alibaba Cloud account that enables a resource directory and manages all member accounts in the resource directory.

  • Member: A member is an Alibaba Cloud account in a resource directory.

compliancePackId

The ID of the compliance package.

regionId

The ID of the region where the resource resides.

resourceOwnerId

The ID of the account to which the resource belongs.

resourceType

The type of the resource.

tags

The tags of the resource.

lastNonCompliantRecordTimestamp

The start time of the last non-compliant resource.