Example of compliance snapshots

Updated at: 2024-08-07 09:13

This topic provides an example of the compliance snapshots that are delivered to a Simple Log Service Logstore. 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 120886317861**** and you have an instance named test_instance_name in Elastic Compute Service (ECS) in the China (Shanghai) region. The compliance snapshots are delivered to a Simple Log Service Logstore. The following code shows a sample snapshot.

{
  "annotation": "{\"configuration\":\"Stopped\",\"desiredValue\":\"Stopped\",\"operator\":\"NotStringEquals\",\"property\":\"$.Status\"}",
  "resourceId": "i-uf6icoumyvptc56b****",
  "configRuleName": "ecs-instance-status-no-stopped",
  "riskLevel": "Warning",
  "configRuleId": "cr-g545626622af0017****",
  "dataType": "CompliantSnapshot",
  "resourceName": "test_instance_name",
  "invokingEventMessageType": "Manual",
  "complianceType": "NON_COMPLIANT",
  "accountId": "120886317861****",
  "compliancePackId": "cp-g4bc626622af006a****",
  "regionId": "cn-shanghai",
  "requestId": "51db2f95-3abf-42c9-be9a-27fd0640****",
  "resourceOwnerId": "120886317861****",
  "resourceType": "ACS::ECS::Instance",
}

Parameters

The following table describes the parameters involved in the compliance snapshots that are delivered to a Simple Log Service Logstore.

Parameter

Description

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

  • Warning: medium

  • Critical: high

configRuleId

The rule ID.

dataType

The type of the log received by Simple Log Service. 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.

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.

  • On this page (1, T)
  • Example
  • Parameters
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare