通過本文您可以瞭解資源配置變更歷史投遞到Object Storage Service的內容樣本和主要參數說明。
內容樣本
建立資源、修改資源和刪除資源的配置變更歷史投遞到Object Storage Service的內容樣本如下:
建立資源
在單帳號模式下,阿里雲帳號
120886317861****
在Elastic Compute Service的呼和浩特地區建立雲端硬碟test_disk
,在configurationDiff
中顯示雲端硬碟的變更前資訊null
和變更後詳細資料,在relationship
和relationshipDiff
中顯示雲端硬碟無相關資源,且無變更項。{ "configurationItems": [ { "accountId": "120886317861****", "availabilityZone": "cn-huhehaote-a", "regionId": "cn-huhehaote", "configuration": "{\"DetachedTime\":\"\",\"Category\":\"cloud_essd\",\"KMSKeyId\":\"\",\"Description\":\"test_disk\",\"ResourceGroupId\":\"\",\"Size\":40,\"Encrypted\":false,\"DeleteAutoSnapshot\":false,\"DiskChargeType\":\"PostPaid\",\"MultiAttach\":\"Disabled\",\"ExpiredTime\":\"2029-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\":\"hp33k7bzwqvtmjrs****\",\"CreationTime\":\"2021-08-25T06:32:40Z\",\"RegionId\":\"cn-huhehaote\",\"DiskId\":\"d-hp33k7bzwqvtmjrs****\"}", "configurationDiff": "{\"Status\":[null,\"Available\"],\"Category\":[null,\"cloud_essd\"],\"Description\":[null,\"test_disk\"],\"ZoneId\":[null,\"cn-huhehaote-a\"],\"Size\":[null,40],\"Encrypted\":[null,false],\"PerformanceLevel\":[null,\"PL1\"],\"DeleteAutoSnapshot\":[null,false],\"DeleteWithInstance\":[null,false],\"EnableAutomatedSnapshotPolicy\":[null,false],\"DiskChargeType\":[null,\"PostPaid\"],\"EnableAutoSnapshot\":[null,true],\"DiskName\":[null,\"test_disk\"],\"MultiAttach\":[null,\"Disabled\"],\"OperationLocks\":[null,{\"OperationLock\":[]}],\"Portable\":[null,true],\"Type\":[null,\"data\"],\"SerialNumber\":[null,\"hp33k7bzwqvtmjrs****\"],\"ExpiredTime\":[null,\"2029-09-08T16:00Z\"],\"CreationTime\":[null,\"2021-08-25T06:32:40Z\"],\"RegionId\":[null,\"cn-huhehaote\"],\"Tags\":[null,{\"Tag\":[]}],\"DiskId\":[null,\"d-hp33k7bzwqvtmjrs****\"]}", "relationship": "", "relationshipDiff": "{\"relationship_diff\":{\"relationship_add\":[],\"relationship_delete\":[]}}", "captureTime": 1629873195000, "resourceCreateTime": 1629873160000, "resourceStatus": "Available", "resourceId": "d-hp33k7bzwqvtmjrs****", "resourceName": "test_disk", "resourceGroupId": "rg-acfmw3ty5y7****", "resourceType": "ACS::ECS::Disk", "tags": "{}", "resourceEventType": "DISCOVERED" } ], "requestId": "c746a79d-c0b9-4584-bf41-a6a9f370ee71", "fileVersion": "1.0"
修改資源
在單帳號模式下,阿里雲帳號
120886317861****
在Object Storage Service的杭州地區為儲存空間test_bucket
關聯標籤,在configurationDiff
中顯示儲存空間的標籤變更前資訊null
和標籤變更後資訊(Key
為key1
)。{ "configurationItems": [ { "accountId": "120886317861****", "availabilityZone": "", "regionId": "cn-hangzhou", "configuration": "{\"AccessControlList\":{\"Grant\":\"private\"},\"ServerSideEncryptionRule\":{\"SSEAlgorithm\":\"None\"},\"Comment\":\"\",\"CreationDate\":\"2021-08-10T07:49:53.000Z\",\"Owner\":{\"DisplayName\":\"120886317861****\",\"ID\":\"120886317861****\"},\"StorageClass\":\"Standard\",\"DataRedundancyType\":\"LRS\",\"AllowEmptyReferer\":\"true\",\"Name\":\"test_bucket\",\"BucketPolicy\":{\"LogPrefix\":\"\",\"LogBucket\":\"\"},\"TagSet\":{\"Tag\":[{\"Value\":\"\",\"Key\":\"key1\"}]},\"ExtranetEndpoint\":\"oss-cn-hangzhou.aliyuncs.com\",\"IntranetEndpoint\":\"oss-cn-hangzhou-internal.aliyuncs.com\",\"Location\":\"oss-cn-hangzhou\"}", "configurationDiff": "{\"TagSet\":[null,{\"Tag\":[{\"Value\":\"\",\"Key\":\"key1\"}]}]}", "relationship": "", "relationshipDiff": "", "captureTime": 1629949618000, "resourceCreateTime": 1628581793000, "resourceStatus": "", "resourceId": "test_bucket", "resourceName": "test_bucket", "resourceGroupId": "", "resourceType": "ACS::OSS::Bucket", "tags": "{\"key1\":[\"\"]}", "resourceEventType": "MODIFY" } ], "requestId": "e2e88348-8ee4-4b3a-9908-0c815bd47718", "fileVersion": "1.0" }
刪除資源
在多帳號模式下,管理帳號
100931896542****
在Elastic Compute Service的呼和浩特地區刪除雲端硬碟test01_disk
,在configurationDiff
中顯示雲端硬碟變更前資訊和變更後資訊(null),在relationship
和relationshipDiff
中顯示雲端硬碟無相關資源,且無變更項。{ "configurationItems": [ { "accountId": "100931896542****", "availabilityZone": "cn-huhehaote-a", "regionId": "cn-huhehaote", "configuration": "{\"DetachedTime\":\"\",\"Category\":\"cloud_essd\",\"KMSKeyId\":\"\",\"Description\":\"\",\"ResourceGroupId\":\"\",\"Size\":40,\"Encrypted\":false,\"DeleteAutoSnapshot\":false,\"DiskChargeType\":\"PostPaid\",\"MultiAttach\":\"Disabled\",\"ExpiredTime\":\"2029-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\":\"test01_disk\",\"BdfId\":\"\",\"OperationLocks\":{\"OperationLock\":[]},\"Portable\":true,\"Type\":\"data\",\"SerialNumber\":\"hp3ezlgii0ltupns****\",\"CreationTime\":\"2021-08-25T08:16:20Z\",\"RegionId\":\"cn-huhehaote\",\"DiskId\":\"d-hp3ezlgii0ltupns****\"}", "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\":[\"test01_disk\",null],\"MultiAttach\":[\"Disabled\",null],\"OperationLocks\":[{\"OperationLock\":[]},null],\"Portable\":[true,null],\"Type\":[\"data\",null],\"SerialNumber\":[\"hp3ezlgii0ltupns****\",null],\"ExpiredTime\":[\"2029-09-08T16:00Z\",null],\"CreationTime\":[\"2021-08-25T08:16:20Z\",null],\"RegionId\":[\"cn-huhehaote\",null],\"Tags\":[{\"Tag\":[]},null],\"DiskId\":[\"d-hp3ezlgii0ltupns****\",null]}", "relationship": "", "relationshipDiff": "{\"relationship_diff\":{\"relationship_add\":[],\"relationship_delete\":[]}}", "captureTime": 1629880000000, "resourceCreateTime": 1629879380000, "resourceStatus": "Available", "resourceId": "d-hp3ezlgii0ltupns****", "resourceName": "test01_disk", "resourceGroupId": "rg-acfmvoh45rh****", "resourceType": "ACS::ECS::Disk", "tags": "{}", "resourceEventType": "REMOVE" } ], "requestId": "cbb047ba-1149-46d3-a07d-5ac20d94ba49", "fileVersion": "1.0" }
參數說明
資源配置變更歷史投遞到Object Storage Service的主要參數說明如下表所示。
參數 | 說明 |
accountId | 資源歸屬的帳號ID。配置審計支援如下帳號類型:
|
regionId | 資源所在地區ID。 |
configuration | 資源的詳細配置。 |
configurationDiff | 資源配置變更的具體變更項及變更前後資訊。 |
relationship | 相關資源的詳細資料,包括相關資源所在地區ID、資源關係、資源ID和資源類型。根據資源是否有相關資源,該參數顯示如下:
|
relationshipDiff | 相關資源的變更項。 |
captureTime | 配置審計發現資源變更事件並產生快照的時間戳記。 |
resourceCreateTime | 建立資源的時間戳記。 |
resourceStatus | 資源狀態。資源的狀態取決於各雲端服務對資源的定義,該參數可能為空白。例如:
|
resourceId | 資源ID。 |
resourceName | 資源名稱。 |
resourceGroupId | 資源歸屬的資源群組ID。根據資源類型是否支援資源群組,該參數顯示如下:
|
resourceType | 資源類型。關於支援配置審計的資源類型,請參見配置審計支援的資源類型和資源關係。 |
tags | 資源標籤。 |
resourceEventType | 資源變更事件的類型。取值:
|