资源不合规事件内容示例

通过本文您可以了解配置审计的资源不合规事件投递到日志服务SLS的内容示例和主要参数说明。

内容示例

在单账号模式下,阿里云账号120886317861****ECS实例未使用指定镜像的不合规事件投递到日志服务SLS,内容示例如下:

{
  "annotation": {
    "configuration": "aliyun_3_x64_20G_alibase_20250117.vhd",
    "desiredValue": "03333",
    "operator": "StringIn",
    "property": "$.ImageId"
  },
  "riskLevel": "Warning",
  "dataType": "NonCompliantNotification",
  "evaluationResultIdentifier": {
    "orderingTimestamp": 1748917125166,
    "evaluationResultQualifier": {
      "resourceId": "i-2ze1j7ocdg95bd5z4p**",
      "configRuleName": "ECS实例使用指定镜像",
      "sourceIdentifier": "ecs-instance-imageId-check",
      "configRuleId": "cr-5a8f4fbef2bc00e5aa**",
      "captureTime": 1748917125166,
      "resourceName": "launch-advisor-20250530",
      "compliancePackId": "cp-5a8f4fbef2bc00e5aa**",
      "configRuleArn": "acs:config::141339776561****:rule/cr-5a8f4fbef2bc00e5aa**",
      "regionId": "cn-beijing",
      "resourceArn": "acs:ecs:cn-beijing:141339776561****:instance/i-2ze1j7ocdg95bd5z4p**",
      "resourceGroupId": "rg-acfmykd63gtpfpa",
      "resourceOwnerId": 1413397765616316,
      "resourceType": "ACS::ECS::Instance"
    }
  },
  "eventType": "ResourceCompliance",
  "invokingEventMessageType": "Manual",
  "complianceType": "NON_COMPLIANT",
  "accountId": "141339776561****",
  "lastNonCompliantRecordTimestamp": "1748916884628",
  "requestId": "2e05d4cf-37e4-4a41-bff2-8f1932bf9a**",
  "eventName": "NonCompliant",
  "notificationCreationTime": "1748917125362"
}

参数说明

资源不合规事件投递到日志服务SLS的主要参数说明如下表所示。

参数

说明

accountId

资源归属的账号ID。配置审计支持如下账号类型:

  • 单账号:未被管理账号加入资源目录的独立的阿里云账号ID。

  • 多账号:管理账号ID或成员ID。

annotation

资源不合规描述信息。

complianceType

合规类型。取值为NON_COMPLIANT(不合规)。

dataType

日志服务SLS的接收内容。取值:

  • ConfigurationItemChangeNotification:资源配置变更历史。

  • NonCompliantNotification:资源不合规事件。

evaluationResultIdentifier

资源合规评估的详细信息。

eventName

事件名称。取值为NonCompliant(资源不合规事件)。

eventType

事件类型。取值:

  • ResourceChange:资源配置变更历史事件。

  • ResourceCompliance:资源不合规事件。

invokingEventMessageType

规则的触发机制。取值:

  • ScheduledNotification:周期执行触发。

  • ConfigurationItemChangeNotification:配置变更通知。

  • Manual:手动执行。

notificationCreationTime

创建通知的时间戳。

riskLevel

规则风险等级。取值:

  • Info:低风险。

  • Warning:中风险。

  • Critical:高风险。