通過本文您可以了解資源配置變更歷史投遞到對象存儲OSS的內容示例和主要參數說明。
內容示例
創建資源、修改資源和刪除資源的配置變更歷史投遞到對象存儲OSS的內容示例如下:
創建資源
在單賬號模式下,阿里云賬號
120886317861****
在云服務器ECS的呼和浩特地域創建云盤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****
在對象存儲OSS的杭州地域為存儲空間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****
在云服務器ECS的呼和浩特地域刪除云盤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" }
參數說明
資源配置變更歷史投遞到對象存儲OSS的主要參數說明如下表所示。
參數 | 說明 |
accountId | 資源歸屬的賬號ID。配置審計支持如下賬號類型:
|
regionId | 資源所在地域ID。 |
configuration | 資源的詳細配置。 |
configurationDiff | 資源配置變更的具體變更項及變更前后信息。 |
relationship | 相關資源的詳細信息,包括相關資源所在地域ID、資源關系、資源ID和資源類型。根據資源是否有相關資源,該參數顯示如下:
|
relationshipDiff | 相關資源的變更項。 |
captureTime | 配置審計發現資源變更事件并生成快照的時間戳。 |
resourceCreateTime | 創建資源的時間戳。 |
resourceStatus | 資源狀態。資源的狀態取決于各云服務對資源的定義,該參數可能為空。例如:
|
resourceId | 資源ID。 |
resourceName | 資源名稱。 |
resourceGroupId | 資源歸屬的資源組ID。根據資源類型是否支持資源組,該參數顯示如下:
|
resourceType | 資源類型。關于支持配置審計的資源類型,請參見配置審計支持的資源類型和資源關系。 |
tags | 資源標簽。 |
resourceEventType | 資源變更事件的類型。取值:
|