全部產品
Search
文件中心

Cloud Config:資源配置變更歷史內容樣本

更新時間:Jul 13, 2024

通過本文您可以瞭解配置審計的資源配置變更歷史投遞到Log ServiceSLS的內容樣本和主要參數說明。

內容樣本

建立資源、修改資源和刪除資源的配置變更歷史投遞到Log ServiceSLS的內容樣本如下:

  • 建立資源

    在單帳號模式下,阿里雲帳號110803419679****在Elastic Compute Service的呼和浩特地區建立雲端硬碟test_disk,在configurationDiff中顯示雲端硬碟的變更前資訊null和變更後詳細資料,在relationshiprelationshipDiff中顯示雲端硬碟新增相關資源i-8psdh7l6lphbn10l****

    accountId:110803419679****
    availabilityZone:cn-huhehaote-a
    captureTime:1642411308000
    configuration:{"DetachedTime":"","Category":"cloud_efficiency","KMSKeyId":"","Description":"","ResourceGroupId":"rg-aekzmdckngg****","Size":40,"Encrypted":false,"DeleteAutoSnapshot":false,"DiskChargeType":"PrePaid","Attachments":{"Attachment":[{"AttachedTime":"2022-01-17T09:20:14Z","InstanceId":"i-8psdh7l6lphbn10l****","Device":"/dev/xvda"}]},"MultiAttach":"Disabled","ExpiredTime":"2022-02-17T16:00Z","ImageId":"win2012r2_9600_x64_dtc_en-us_40G_alibase_20211217.vhd","StorageSetId":"","Tags":{"Tag":[]},"Status":"In_use","AttachedTime":"2022-01-17T09:20:14Z","StorageClusterId":"","ZoneId":"cn-huhehaote-a","InstanceId":"i-8psdh7l6lphbn10l****","ProductCode":"","SourceSnapshotId":"","Device":"/dev/xvda","PerformanceLevel":"","DeleteWithInstance":true,"EnableAutomatedSnapshotPolicy":false,"EnableAutoSnapshot":true,"AutoSnapshotPolicyId":"","DiskName":"","test_disk":"","OperationLocks":{"OperationLock":[]},"Portable":true,"Type":"system","SerialNumber":"8psdh7l6lphbn10i****","CreationTime":"2022-01-17T09:20:10Z","RegionId":"cn-huhehaote","DiskId":"d-8psdh7l6lphbn10i****"}
    configurationDiff:{"Category":[null,"cloud_efficiency"],"ResourceGroupId":[null,"rg-aekzmdckngg****"],"Size":[null,40],"Encrypted":[null,false],"DeleteAutoSnapshot":[null,false],"DiskChargeType":[null,"PrePaid"],"Attachments":[null,{"Attachment":[{"AttachedTime":"2022-01-17T09:20:14Z","InstanceId":"i-8psdh7l6lphbn10l****","Device":"/dev/xvda"}]}],"MultiAttach":[null,"Disabled"],"ExpiredTime":[null,"2022-02-17T16:00Z"],"ImageId":[null,"win2012r2_9600_x64_dtc_en-us_40G_alibase_20211217.vhd"],"Tags":[null,{"Tag":[]}],"Status":[null,"In_use"],"AttachedTime":[null,"2022-01-17T09:20:14Z"],"ZoneId":[null,"cn-huhehaote-a"],"InstanceId":[null,"i-8psdh7l6lphbn10l****"],"Device":[null,"/dev/xvda"],"DeleteWithInstance":[null,true],"EnableAutomatedSnapshotPolicy":[null,false],"EnableAutoSnapshot":[null,true],"OperationLocks":[null,{"OperationLock":[]}],"Portable":[null,true],"Type":[null,"system"],"SerialNumber":[null,"8psdh7l6lphbn10i****"],"CreationTime":[null,"2022-01-17T09:20:10Z"],"RegionId":[null,"cn-huhehaote"],"DiskId":[null,"d-8psdh7l6lphbn10i****"]}
    dataType:ConfigurationItemChangeNotification
    regionId:cn-huhehaote
    relationship:[{"regionId":"cn-huhehaote","relationType":"IsAttachedTo","resourceId":"i-8psdh7l6lphbn10l****","resourceType":"ACS::ECS::Instance"}]
    relationshipDiff:{"relationship_diff":{"relationship_add":[{"regionId":"cn-huhehaote","relationType":"IsAttachedTo","resourceId":"i-8psdh7l6lphbn10l****","resourceType":"ACS::ECS::Instance"}],"relationship_delete":[]}}
    requestId:be30368b-71dd-4367-9871-d00e565f8679
    resourceCreateTime:1642411210000
    resourceEventType:DISCOVERED
    resourceGroupId:rg-aekzmdckngg****
    resourceId:d-8psdh7l6lphbn10i****
    resourceName:test_disk
    resourceStatus:In_use
    resourceType:ACS::ECS::Disk
    tags:{}
  • 修改資源

    在單帳號模式下,阿里雲帳號118239008140****在Elastic Compute Service的杭州地區為雲端硬碟test_disk關聯標籤key1,在configurationDiff中顯示雲端硬碟的標籤變更前資訊null和變更後資訊key1,在relationshiprelationshipDiff中顯示雲端硬碟刪除相關資源i-bp1g9rukkdar0dro****

    accountId:118239008140****
    availabilityZone:cn-hangzhou-i
    captureTime:1630422042000
    configuration:{"DetachedTime":"2022-01-17T09:27:40Z","Category":"cloud_efficiency","KMSKeyId":"","Description":"","ResourceGroupId":"","Size":20,"Encrypted":false,"DeleteAutoSnapshot":true,"DiskChargeType":"PostPaid","MultiAttach":"Disabled","ExpiredTime":"2999-09-08T16:00Z","ImageId":"","StorageSetId":"","Tags":{"Tag":[{"TagKey":"key1","TagValue":""}]},"Status":"Available","AttachedTime":"2022-01-17T09:02:01Z","StorageClusterId":"","ZoneId":"cn-hangzhou-i","InstanceId":"","ProductCode":"","SourceSnapshotId":"","Device":"","PerformanceLevel":"","DeleteWithInstance":false,"EnableAutomatedSnapshotPolicy":false,"EnableAutoSnapshot":true,"AutoSnapshotPolicyId":"","DiskName":"test_disk","BdfId":"","OperationLocks":{"OperationLock":[]},"Portable":true,"Type":"data","SerialNumber":"bp1fybs4hwesp8kv****","CreationTime":"2021-08-19T09:11:48Z","RegionId":"cn-hangzhou","DiskId":"d-bp1fybs4hwesp8kv****"}
    configurationDiff:{"Tags":[{"Tag":[]},{"Tag":[{"TagKey":"key1","TagValue":""}]}]}
    dataType:ConfigurationItemChangeNotification
    regionId:cn-hangzhou
    relationship:
    relationshipDiff:{"relationship_diff":{"relationship_add":[],"relationship_delete":[{"regionId":"cn-hangzhou","relationType":"IsAttachedTo","resourceId":"i-bp1g9rukkdar0dro****","resourceType":"ACS::ECS::Instance"}]}}
    requestId:4f9a90a9-63bf-43bd-981d-bc15658c423e
    resourceCreateTime:1630422000000
    resourceEventType:MODIFY
    resourceGroupId:rg-acfmwvtff2y***
    resourceId:d-bp1fybs4hwesp8kv****
    resourceName:test_disk
    resourceStatus:Available
    resourceType:ACS::ECS::Disk
    tags:{"key1":[""]}
  • 刪除資源

    在單帳號模式下,阿里雲帳號120886317861****在Elastic Compute Service的呼和浩特地區刪除雲端硬碟test_disk,在configurationDiff中顯示雲端硬碟變更前資訊和變更後資訊null,在relationshiprelationshipDiff中顯示雲端硬碟無相關資源。

    accountId:120886317861****
    availabilityZone:cn-huhehaote-a
    captureTime:1629875147000
    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:{}

參數說明

資源配置變更歷史投遞到Log ServiceSLS的主要參數說明如下表所示。

參數

說明

accountId

資源歸屬的帳號ID。配置審計支援如下帳號類型:

  • 單帳號:未被管理帳號加入資來源目錄的獨立的阿里雲帳號ID。

  • 多帳號:管理帳號ID或成員ID。

availabilityZone

資源可用性區域。

captureTime

配置審計發現資源配置變更並組建記錄檔的時間戳記。

configuration

資源的詳細配置。

configurationDiff

資源配置變更的具體變更項及變更前後資訊。

dataType

Log ServiceSLS的接收內容。取值:

  • ConfigurationItemChangeNotification:資源配置變更歷史。

  • NonCompliantNotification:資源不合規事件。

regionId

資源所在地區ID。

relationship

相關資源的詳細資料,包括相關資源所在地區ID、資源關係、資源ID和資源類型。根據資源是否有相關資源,該參數顯示如下:

relationshipDiff

相關資源的變更項。

resourceCreateTime

建立資源的時間戳記。

resourceEventType

資源變更事件的類型。取值:

  • DISCOVERED:配置審計新發現的資源事件。

  • MODIFY:修改資源事件。

  • REMOVE:刪除資源事件。

  • DISCOVERED_REVISED:配置審計新發現的通過周期修正任務產生的資源事件。

  • MODIFY_REVISED:通過周期修正任務產生的修改資源事件。

resourceGroupId

資源歸屬的資源群組ID。根據資源類型是否支援資源群組,該參數顯示如下:

  • 當資源類型支援資源群組時,該參數為資源群組ID。

    關於支援資源群組的雲端服務,請參見支援資源群組的雲端服務

  • 當資源類型不支援資源群組時,該參數為空白。

resourceId

資源ID。

resourceName

資源名稱。

resourceStatus

資源狀態。資源的狀態取決於各雲端服務對資源的定義,該參數可能為空白。例如:

  • 當資源類型為ACS::ECS::Instance時,由於ECS執行個體有狀態,因此該參數為RunningStopped

  • 當資源類型為ACS::OSS::Bucket時,由於OSS Bucket無狀態,因此該參數為空白。

resourceType

資源類型。關於支援配置審計的資源類型,請參見配置審計支援的資源類型和資源關係

tags

資源標籤。