全部產品
Search
文件中心

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

更新時間:Jun 04, 2025

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

內容樣本

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

  • 建立資源

    在單帳號模式下,阿里雲帳號100931896542****在Elastic Compute Service的河源地區建立雲端硬碟test_disk,在configurationDiff中顯示雲端硬碟的變更前資訊null和變更後詳細資料,在relationshiprelationshipDiff中顯示雲端硬碟新增相關資源d-f8zcofij6pjsju50****。

    {
      "resourceId": "i-f8z8psx67rksgpp3lb****",
      "captureTime": "1748923229001",
      "configuration": "{\"ResourceGroupId\":\"\",\"Memory\":2048,\"InstanceChargeType\":\"PostPaid\",\"Cpu\":2,\"OSName\":\"Alibaba Cloud Linux  3.2104 LTS 64位\",\"InstanceNetworkType\":\"vpc\",\"InnerIpAddress\":{\"IpAddress\":[]},\"ExpiredTime\":\"2099-12-31T15:59Z\",\"ImageId\":\"aliyun_3_x64_20G_alibase_20250117.vhd\",\"EipAddress\":{\"AllocationId\":\"\",\"IpAddress\":\"\",\"InternetChargeType\":\"\"},\"ImageOptions\":{},\"VlanId\":\"\",\"HostName\":\"iZf8z8psx67rksgpp3lb6lZ\",\"Status\":\"Running\",\"AdditionalInfo\":{},\"HibernationOptions\":{\"Configured\":false},\"MetadataOptions\":{\"HttpTokens\":\"\",\"HttpEndpoint\":\"\"},\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"StoppedMode\":\"Not-applicable\",\"CpuOptions\":{\"ThreadsPerCore\":2,\"Numa\":\"ON\",\"CoreCount\":1},\"StartTime\":\"2025-06-03T03:58Z\",\"PrivateDnsNameOptions\":{},\"DeletionProtection\":false,\"VpcAttributes\":{\"PrivateIpAddress\":{\"IpAddress\":[\"172.28.129.241\"]},\"VpcId\":\"vpc-f8zhnrviismi44amovhi3\",\"VSwitchId\":\"vsw-f8zon645srm3g3xp33t****\",\"NatIpAddress\":\"\"},\"SecurityGroupIds\":{\"SecurityGroupId\":[\"sg-f8z41uaptndu6rj4d0b8\"]},\"InternetChargeType\":\"PayByTraffic\",\"InstanceName\":\"launch-advisor-20250603\",\"DeploymentSetId\":\"\",\"InternetMaxBandwidthOut\":5,\"SerialNumber\":\"b01f12d7-5308-427d-bd6e-af7601a05e****\",\"OSType\":\"linux\",\"CreationTime\":\"2025-06-03T03:58Z\",\"AutoReleaseTime\":\"2025-06-03T07:00Z\",\"Description\":\"測試SLS投遞欄位\",\"InstanceTypeFamily\":\"ecs.e\",\"DedicatedInstanceAttribute\":{\"Tenancy\":\"\",\"Affinity\":\"\"},\"PublicIpAddress\":{\"IpAddress\":[\"8.155.XX.XXX\"]},\"GPUSpec\":\"\",\"NetworkInterfaces\":{\"NetworkInterface\":[{\"Type\":\"Primary\",\"PrimaryIpAddress\":\"172.28.129.241\",\"MacAddress\":\"00:16:3e:18:cd:88\",\"NetworkInterfaceId\":\"eni-f8z8psx67rksgpp522lu\",\"PrivateIpSets\":{\"PrivateIpSet\":[{\"PrivateIpAddress\":\"172.28.129.241\",\"Primary\":true}]}}]},\"SpotPriceLimit\":0.0,\"SaleCycle\":\"\",\"DeviceAvailable\":true,\"InstanceType\":\"ecs.e-c1m1.large\",\"OSNameEn\":\"Alibaba Cloud Linux  3.2104 LTS 64 bit\",\"SpotStrategy\":\"NoSpot\",\"IoOptimized\":true,\"ZoneId\":\"cn-heyuan-a\",\"ClusterId\":\"\",\"EcsCapacityReservationAttr\":{\"CapacityReservationPreference\":\"\",\"CapacityReservationId\":\"\"},\"DedicatedHostAttribute\":{\"DedicatedHostId\":\"\",\"DedicatedHostName\":\"\",\"DedicatedHostClusterId\":\"\"},\"GPUAmount\":0,\"OperationLocks\":{\"LockReason\":[]},\"InternetMaxBandwidthIn\":200,\"Recyclable\":false,\"RegionId\":\"cn-heyuan\",\"CreditSpecification\":\"\"}",
      "availabilityZone": "cn-heyuan-a",
      "requestId": "0aece286-5291-491f-8ab8-bfc0921bd****",
      "resourceGroupId": "rg-acfmvoh45rhcfly",
      "arn": "acs:ecs:cn-heyuan:100931896542****:instance/i-f8z8psx67rksgpp3lb****",
      "relationship": "[{\"regionId\":\"cn-heyuan\",\"relationType\":\"IsAttachedTo\",\"resourceId\":\"d-f8zcofij6pjsju505sn5\",\"resourceType\":\"ACS::ECS::Disk\"}]",
      "configurationDiff": "",
      "resourceEventType": "RELATION_MODIFY",
      "resourceCreateTime": "1748923080000",
      "dataType": "ConfigurationItemChangeNotification",
      "resourceName": "launch-advisor-20250603",
      "version": "1748923229132000",
      "tags": {},
      "accountId": "100931896542****",
      "relationshipDiff": "{\"relationship_diff\":{\"relationship_add\":[{\"regionId\":\"cn-heyuan\",\"relationType\":\"IsAttachedTo\",\"resourceId\":\"d-f8zcofij6pjsju505sn5\",\"resourceType\":\"ACS::ECS::Disk\"}],\"relationship_delete\":[]}}",
      "resourceStatus": "Running",
      "regionId": "cn-heyuan",
      "resourceType": "ACS::ECS::Instance"
    }
  • 修改資源

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

    {
      "resourceId": "d-f8zcofij6pjsju505sn****",
      "captureTime": "1748929932000",
      "configuration": "{\"DetachedTime\":\"\",\"Category\":\"cloud_essd\",\"KMSKeyId\":\"\",\"Description\":\"\",\"ResourceGroupId\":\"\",\"Size\":40,\"Encrypted\":false,\"DeleteAutoSnapshot\":false,\"DiskChargeType\":\"PostPaid\",\"Throughput\":110,\"IOPS\":2280,\"Attachments\":{\"Attachment\":[{\"AttachedTime\":\"2025-06-03T03:58:52Z\",\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"Device\":\"/dev/xvda\"}]},\"MultiAttach\":\"Disabled\",\"Placement\":{},\"ExpiredTime\":\"2999-09-08T16:00Z\",\"ImageId\":\"aliyun_3_x64_20G_alibase_20250117.vhd\",\"StorageSetId\":\"\",\"Tags\":{\"Tag\":[{\"TagKey\":\"key1\",\"TagValue\":\"\"}]},\"Status\":\"In_use\",\"AttachedTime\":\"2025-06-03T03:58:52Z\",\"StorageClusterId\":\"\",\"ZoneId\":\"cn-heyuan-a\",\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"ProductCode\":\"\",\"SourceSnapshotId\":\"\",\"Device\":\"/dev/xvda\",\"PerformanceLevel\":\"PL0\",\"DeleteWithInstance\":true,\"EnableAutomatedSnapshotPolicy\":false,\"EnableAutoSnapshot\":true,\"AutoSnapshotPolicyId\":\"\",\"DiskName\":\"\",\"BdfId\":\"\",\"OperationLocks\":{\"OperationLock\":[]},\"Portable\":true,\"Type\":\"system\",\"SerialNumber\":\"f8zcofij6pjsju505sn****\",\"CreationTime\":\"2025-06-03T03:58:50Z\",\"RegionId\":\"cn-heyuan\",\"DiskId\":\"d-f8zcofij6pjsju505sn****\"",
      "availabilityZone": "cn-heyuan-a",
      "requestId": "b7cdbb24-3ad0-470a-bf89-af8a8fa20****",
      "resourceGroupId": "rg-acfmvoh45rhcfly",
      "arn": "acs:ecs:cn-heyuan:100931896542****:disk/d-f8zcofij6pjsju505sn****",
      "relationship": "[{\"regionId\":\"cn-heyuan\",\"relationType\":\"IsAttachedTo\",\"resourceId\":\"i-f8z8psx67rksgpp3lb****\",\"resourceType\":\"ACS::ECS::Instance\"}]",
      "configurationDiff": "{\"Tags\":[{\"Tag\":[]},{\"Tag\":[{\"TagKey\":\"key1\",\"TagValue\":\"\"}]}]}",
      "resourceEventType": "MODIFY",
      "resourceCreateTime": "1748923130000",
      "dataType": "ConfigurationItemChangeNotification",
      "resourceName": "",
      "version": "1748929931726000",
      "tags": "{\"key1\":[\"\"]}",
      "accountId": "100931896542****",
      "relationshipDiff": "{\"relationship_diff\":{\"relationship_add\":[],\"relationship_delete\":[]}}",
      "resourceStatus": "In_use",
      "regionId": "cn-heyuan",
      "resourceType": "ACS::ECS::Disk"
    }
  • 刪除資源

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

    {
      "resourceId": "d-f8zcofij6pjsju505sn****",
      "captureTime": "1748931168000",
      "configuration": "{\"DetachedTime\":\"2025-06-03T06:09:30Z\",\"Category\":\"cloud_essd\",\"KMSKeyId\":\"\",\"Description\":\"\",\"ResourceGroupId\":\"\",\"Size\":40,\"Encrypted\":false,\"DeleteAutoSnapshot\":false,\"DiskChargeType\":\"PostPaid\",\"Throughput\":110,\"IOPS\":2280,\"Attachments\":{\"Attachment\":[{\"AttachedTime\":\"2025-06-03T06:10:11Z\",\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"Device\":\"/dev/xvda\"}]},\"MultiAttach\":\"Disabled\",\"Placement\":{},\"ExpiredTime\":\"2999-09-08T16:00Z\",\"ImageId\":\"aliyun_3_x64_20G_alibase_20250117.vhd\",\"StorageSetId\":\"\",\"Tags\":{\"Tag\":[{\"TagKey\":\"key1\",\"TagValue\":\"\"}]},\"Status\":\"In_use\",\"AttachedTime\":\"2025-06-03T06:10:11Z\",\"StorageClusterId\":\"\",\"ZoneId\":\"cn-heyuan-a\",\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"ProductCode\":\"\",\"SourceSnapshotId\":\"\",\"Device\":\"/dev/xvda\",\"PerformanceLevel\":\"PL0\",\"DeleteWithInstance\":true,\"EnableAutomatedSnapshotPolicy\":false,\"EnableAutoSnapshot\":true,\"AutoSnapshotPolicyId\":\"\",\"DiskName\":\"\",\"BdfId\":\"\",\"OperationLocks\":{\"OperationLock\":[]},\"Portable\":true,\"Type\":\"system\",\"SerialNumber\":\"f8zcofij6pjsju505sn****\",\"CreationTime\":\"2025-06-03T03:58:50Z\",\"RegionId\":\"cn-heyuan\",\"DiskId\":\"d-f8zcofij6pjsju505sn****\"",
      "availabilityZone": "cn-heyuan-a",
      "requestId": "1795c5e2-ce69-4a41-816d-c6c94f311a****",
      "resourceGroupId": "rg-acfmvoh45rhcfly",
      "arn": "acs:ecs:cn-heyuan:100931896542****:disk/d-f8zcofij6pjsju505sn****",
      "relationship": "",
      "configurationDiff": "{\"DetachedTime\":[\"2025-06-03T06:09:30Z\",null],\"Category\":[\"cloud_essd\",null],\"Description\":[\"\",\"\"],\"KMSKeyId\":[\"\",\"\"],\"ResourceGroupId\":[\"\",\"\"],\"Encrypted\":[false,null],\"Size\":[40,null],\"DeleteAutoSnapshot\":[false,null],\"DiskChargeType\":[\"PostPaid\",null],\"Throughput\":[110,null],\"IOPS\":[2280,null],\"Attachments\":[{\"Attachment\":[{\"AttachedTime\":\"2025-06-03T06:10:11Z\",\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"Device\":\"/dev/xvda\"}]},null],\"MultiAttach\":[\"Disabled\",null],\"Placement\":[{},null],\"ExpiredTime\":[\"2999-09-08T16:00Z\",null],\"ImageId\":[\"aliyun_3_x64_20G_alibase_20250117.vhd\",null],\"StorageSetId\":[\"\",\"\"],\"Tags\":[{\"Tag\":[{\"TagKey\":\"key1\",\"TagValue\":\"\"}]},null],\"Status\":[\"In_use\",null],\"AttachedTime\":[\"2025-06-03T06:10:11Z\",null],\"StorageClusterId\":[\"\",\"\"],\"ZoneId\":[\"cn-heyuan-a\",null],\"ProductCode\":[\"\",\"\"],\"InstanceId\":[\"i-f8z8psx67rksgpp3lb****\",null],\"SourceSnapshotId\":[\"\",\"\"],\"Device\":[\"/dev/xvda\",null],\"PerformanceLevel\":[\"PL0\",null],\"DeleteWithInstance\":[true,null],\"EnableAutomatedSnapshotPolicy\":[false,null],\"EnableAutoSnapshot\":[true,null],\"AutoSnapshotPolicyId\":[\"\",\"\"],\"DiskName\":[\"\",\"\"],\"BdfId\":[\"\",\"\"],\"OperationLocks\":[{\"OperationLock\":[]},null],\"Portable\":[true,null],\"Type\":[\"system\",null],\"SerialNumber\":[\"f8zcofij6pjsju505sn****\",null],\"CreationTime\":[\"2025-06-03T03:58:50Z\",null],\"RegionId\":[\"cn-heyuan\",null],\"DiskId\":[\"d-f8zcofij6pjsju505sn****\",null]}",
      "resourceEventType": "REMOVE",
      "resourceCreateTime": "1748923130000",
      "dataType": "ConfigurationItemChangeNotification",
      "resourceName": "",
      "version": "1748931699081000",
      "tags": "{\"key1\":[\"\"]}",
      "accountId": "100931896542****",
      "relationshipDiff": "{\"relationship_diff\":{\"relationship_add\":[],\"relationship_delete\":[{\"regionId\":\"cn-heyuan\",\"relationType\":\"IsAttachedTo\",\"resourceId\":\"i-f8z8psx67rksgpp3lb****\",\"resourceType\":\"ACS::ECS::Instance\"}]}}",
      "resourceStatus": "In_use",
      "regionId": "cn-heyuan",
      "resourceType": "ACS::ECS::Disk"
    }

參數說明

資源配置變更歷史投遞到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

資源標籤。