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

内容示例

创建资源、修改资源和删除资源的配置变更历史投递到日志服务SLS的内容示例如下:
  • 创建资源
    普通账号120886317861****在云服务器ECS的呼和浩特地域创建快照test_snapshot,在configurationDiff中显示快照的变更前信息null和变更后详细信息,在relationshiprelationshipDiff中显示快照新增相关资源d-hp322ngh3vaawgm5****
    accountId:120886317861****
    arn:
    availabilityZone:
    captureTime:1630422010000
    configAggregators:
    configuration:{"Status":"progressing","Usage":"none","Progress":"0%","Category":"standard","KMSKeyId":"","Description":"","ProductCode":"","Encrypted":false,"RetentionDays":30,"SnapshotName":"test_snapshot","SourceDiskId":"d-hp322ngh3vaawgm5****","SourceStorageType":"disk","SnapshotId":"s-hp37dkrirxjfr6wc****","SnapshotSN":"63879-24509308-566****","SourceDiskSize":100,"CreationTime":"2021-08-31T15:00:00Z","LastModifiedTime":"2021-08-31T15:00:00Z","SnapshotType":"timer","RemainTime":-1,"SourceDiskType":"data","Tags":{"Tag":[]}}
    configurationDiff:{"Status":[null,"progressing"],"Usage":[null,"none"],"Progress":[null,"0%"],"Category":[null,"standard"],"Encrypted":[null,false],"RetentionDays":[null,30],"SnapshotName":[null,"test_snapshot"],"SourceDiskId":[null,"d-hp322ngh3vaawgm5****"],"SourceStorageType":[null,"disk"],"SnapshotId":[null,"s-hp37dkrirxjfr6wc****"],"SnapshotSN":[null,"63879-24509308-566****"],"SourceDiskSize":[null,100],"CreationTime":[null,"2021-08-31T15:00:00Z"],"LastModifiedTime":[null,"2021-08-31T15:00:00Z"],"SnapshotType":[null,"timer"],"RemainTime":[null,-1],"SourceDiskType":[null,"data"],"Tags":[null,{"Tag":[]}]}
    dataType:ConfigurationItemChangeNotification
    regionId:cn-huhehaote
    relationship:[{"regionId":"cn-huhehaote","relationType":"IsAttachedTo","resourceId":"d-hp322ngh3vaawgm5****","resourceType":"ACS::ECS::Disk"}]
    relationshipDiff:{"relationship_diff":{"relationship_add":[{"regionId":"cn-huhehaote","relationType":"IsAttachedTo","resourceId":"d-hp322ngh3vaawgm5****","resourceType":"ACS::ECS::Disk"}],"relationship_delete":[]}}
    requestId:1539bfe4-fb24-4335-892f-b71ed15dac8b
    resourceCreateTime:1630422000000
    resourceEventType:DISCOVERED
    resourceGroupId:rg-acfmw3ty5y7****
    resourceId:s-hp37dkrirxjfr6wc****
    resourceName:test_snapshot
    resourceStatus:progressing
    resourceType:ACS::ECS::Snapshot
    tags:{}
  • 修改资源
    普通账号120886317861****在云服务器ECS的呼和浩特地域为快照test_snapshot关联标签key1,在configurationDiff中显示快照的标签变更前信息null和变更后信息key1,在relationshiprelationshipDiff中显示快照删除相关资源d-hp322ngh3vaawgm5****
    accountId:120886317861****
    arn:
    availabilityZone:
    captureTime:1630422042000
    configAggregators:
    configuration:{"Status":"progressing","Usage":"none","Progress":"0%","Category":"standard","KMSKeyId":"","Description":"","ProductCode":"","Encrypted":false,"RetentionDays":30,"SnapshotName":"test_snapshot","SourceDiskId":"d-hp322ngh3vaawgm5****","SourceStorageType":"disk","SnapshotId":"s-hp37dkrirxjfr6wc****","SnapshotSN":"63879-24509308-566****","SourceDiskSize":100,"CreationTime":"2021-08-31T15:00:00Z","LastModifiedTime":"2021-08-31T15:00:00Z","SnapshotType":"timer","RemainTime":-1,"SourceDiskType":"data","Tags":{"Tag":[{"TagKey":"key1","TagValue":""}]}}
    configurationDiff:{"Tags":[{"Tag":[]},{"Tag":[{"TagKey":"key1","TagValue":""}]}]}
    dataType:ConfigurationItemChangeNotification
    regionId:cn-huhehaote
    relationship:[{"regionId":"cn-huhehaote","relationType":"IsAttachedTo","resourceId":"d-hp322ngh3vaawgm5****","resourceType":"ACS::ECS::Disk"}]
    relationshipDiff:{"relationship_diff":{"relationship_add":[],"relationship_delete":[]}}
    requestId:faa8df6c-7dd2-476f-a246-c4b1ea055c21
    resourceCreateTime:1630422000000
    resourceEventType:MODIFY
    resourceGroupId:rg-acfmw3ty5y7****
    resourceId:s-hp37dkrirxjfr6wc****
    resourceName:test_snapshot
    resourceStatus:progressing
    resourceType:ACS::ECS::Snapshot
    tags:{"key1":[""]}
  • 删除资源
    普通账号120886317861****在云服务器ECS的呼和浩特地域删除云盘test_disk,在configurationDiff中显示云盘变更前信息和变更后信息null,在relationshiprelationshipDiff中显示云盘无相关资源。
    accountId:120886317861****
    arn:acs:ecs:cn-huhehaote:120886317861****:disk/d-hp33mwzuof9qoa22****
    availabilityZone:cn-huhehaote-a
    captureTime:1629875147000
    configAggregators:
    configuration:{"DetachedTime":"","Category":"cloud_essd","KMSKeyId":"","Description":"","ResourceGroupId":"","Size":40,"Encrypted":false,"DeleteAutoSnapshot":false,"DiskChargeType":"PostPaid","MultiAttach":"Disabled","ExpiredTime":"2999-09-08T16:00Z","ImageId":"","StorageSetId":"","Tags":{"Tag":[]},"Status":"Available","AttachedTime":"","StorageClusterId":"","ZoneId":"cn-huhehaote-a","InstanceId":"","ProductCode":"","SourceSnapshotId":"","Device":"","PerformanceLevel":"PL1","DeleteWithInstance":false,"EnableAutomatedSnapshotPolicy":false,"EnableAutoSnapshot":true,"AutoSnapshotPolicyId":"","DiskName":"test_disk","BdfId":"","OperationLocks":{"OperationLock":[]},"Portable":true,"Type":"data","SerialNumber":"hp33mwzuof9qoa22****","CreationTime":"2021-08-25T06:52:35Z","RegionId":"cn-huhehaote","DiskId":"d-hp33mwzuof9qoa22****"}
    configurationDiff:{"Status":["Available",null],"Category":["cloud_essd",null],"ZoneId":["cn-huhehaote-a",null],"Size":[40,null],"Encrypted":[false,null],"PerformanceLevel":["PL1",null],"DeleteAutoSnapshot":[false,null],"DeleteWithInstance":[false,null],"EnableAutomatedSnapshotPolicy":[false,null],"DiskChargeType":["PostPaid",null],"EnableAutoSnapshot":[true,null],"DiskName":["test_disk",null],"MultiAttach":["Disabled",null],"OperationLocks":[{"OperationLock":[]},null],"Portable":[true,null],"Type":["data",null],"SerialNumber":["hp33mwzuof9qoa22ic6q",null],"ExpiredTime":["2999-09-08T16:00Z",null],"CreationTime":["2021-08-25T06:52:35Z",null],"RegionId":["cn-huhehaote",null],"Tags":[{"Tag":[]},null],"DiskId":["d-hp33mwzuof9qoa22****",null]}
    dataType:ConfigurationItemChangeNotification
    regionId:cn-huhehaote
    relationship:
    relationshipDiff:{"relationship_diff":{"relationship_add":[],"relationship_delete":[]}}
    requestId:d9bca2bc-75ba-4e4c-92dd-7cc38e779806
    resourceCreateTime:1629874355000
    resourceEventType:REMOVE
    resourceGroupId:rg-acfmw3ty5y7****
    resourceId:d-hp33mwzuof9qoa22****
    resourceName:test_disk
    resourceStatus:Available
    resourceType:ACS::ECS::Disk
    tags:{}

参数说明

资源配置变更历史投递到日志服务SLS的主要参数说明如下表所示。
参数 说明
accountId 资源归属的账号ID。配置审计支持如下账号类型:
  • 普通账号:未被企业管理账号加入资源目录的独立的阿里云账号。
  • 企业管理账号:开通资源目录并管理成员账号的阿里云账号。
  • 成员账号:资源目录中的成员账号。
arn 资源ARN。关于各云服务资源类型对应的ARN格式,请参见ARN格式
availabilityZone 资源可用区。
captureTime 配置审计发现资源配置变更并生成日志的时间戳。
configAggregators 账号组信息,包括创建账号组的企业管理账号ID和账号组ID。根据资源归属账号类型不同,该参数显示如下:
  • 当资源归属普通账号时,该参数为空。
  • 当资源归属企业管理账号时,该参数为当前企业管理账号创建的账号组信息。
  • 当资源归属成员账号时,该参数为成员账号归属的企业管理账号创建的账号组信息。
configuration 资源的详细配置。
configurationDiff 资源配置变更的具体变更项及变更前后信息。
dataType 日志服务SLS的接收内容。取值:
  • ConfigurationItemChangeNotification:资源配置变更历史。
  • NonCompliantNotification:资源不合规事件。
regionId 资源所在地域ID。
relationship 相关资源的详细信息,包括相关资源所在地域ID、资源关系、资源ID和资源类型。根据资源是否有相关资源,该参数显示如下:
relationshipDiff 相关资源的变更项。
resourceCreateTime 创建资源的时间戳。
resourceEventType 资源变更事件的类型。取值:
  • DISCOVERED:创建资源事件。
  • MODIFY:修改资源事件。
  • REMOVE:删除资源事件。
resourceGroupId 资源归属的资源组ID。根据资源类型是否支持资源组,该参数显示如下:
  • 当资源类型支持资源组时,该参数为资源组ID。

    关于支持资源组的云服务,请参见支持资源组的云服务

  • 当资源类型不支持资源组时,该参数为空。
resourceId 资源ID。
resourceName 资源名称。
resourceStatus 资源状态。资源的状态取决于各云服务对资源的定义,该参数可能为空。例如:
  • 当资源类型为ACS::ECS::Instance时,由于ECS实例有状态,因此该参数为RunningStopped
  • 当资源类型为ACS::OSS::Bucket时,由于OSS Bucket无状态,因此该参数为空。
resourceType 资源类型。关于支持配置审计的资源类型,请参见支持配置审计的资源类型和资源关系
tags 资源标签。