通過本文您可以了解配置審計的資源配置變更歷史投遞到輕量消息隊列(原 MNS)的內容示例和主要參數說明。
內容示例
創建資源、修改資源和刪除資源的配置變更歷史投遞到輕量消息隊列(原 MNS)的內容示例如下:
創建資源
在單賬號模式下,阿里云賬號
132585902944****
在對象存儲OSS的北京地域創建存儲空間test_bucket
。{ "requestId": "c9e582cf-8aba-47bc-8bf3-8c2c5c7fa615", "dataType": "ConfigurationItemChangeNotification", "eventName": "ResourceAdd", "configurationItemDiff": { "changedProperties": {}, "changeType": "DISCOVERED" }, "eventType": "ResourceChange", "notificationCreationTime": 1629883217558, "configurationItem": { "accountId": 132585902944****, "resourceCreateTime": 1629883110000, "resourceId": "test_bucket", "resourceStatus": "", "regionId": "cn-beijing", "configuration": { "AccessControlList": { "Grant": "private" }, "ServerSideEncryptionRule": { "SSEAlgorithm": "None" }, "Comment": "", "CreationDate": "2021-08-25T09:18:30.000Z", "Owner": { "DisplayName": "132585902944****", "ID": "132585902944****" }, "StorageClass": "Standard", "DataRedundancyType": "LRS", "AllowEmptyReferer": "true", "Name": "test_bucket", "BucketPolicy": { "LogPrefix": "", "LogBucket": "" }, "ExtranetEndpoint": "oss-cn-beijing.aliyuncs.com", "IntranetEndpoint": "oss-cn-beijing-internal.aliyuncs.com", "Location": "oss-cn-beijing" }, "captureTime": 1629883213000, "resourceName": "test_bucket", "availabilityZone": "", "resourceType": "ACS::OSS::Bucket", "tags": {} } }
修改資源
在單賬號模式下,阿里云賬號
100931896542****
在云服務器ECS的呼和浩特地域將云盤名稱由test_disk1
修改為test_disk2
。{ "requestId": "bb6f19ff-9c58-45c3-b79d-a20469c37eae", "dataType": "ConfigurationItemChangeNotification", "eventName": "ResourceUpdate", "configurationItemDiff": { "changedProperties": { "DiskName": { "changeType": "MODIFY", "previousValue": "test_disk1", "updatedValue": "test_disk2" } }, "changeType": "MODIFY" }, "eventType": "ResourceChange", "notificationCreationTime": 1629879815173, "configurationItem": { "accountId": 100931896542****, "resourceCreateTime": 162987938****, "resourceId": "d-hp3ezlgii0ltupns****", "resourceStatus": "Available", "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": "test_disk2", "BdfId": "", "OperationLocks": { "OperationLock": [] }, "Portable": true, "Type": "data", "SerialNumber": "hp3ezlgii0ltupns****", "CreationTime": "2021-08-25T08:16:20Z", "RegionId": "cn-huhehaote", "DiskId": "d-hp3ezlgii0ltupns****" }, "captureTime": 1629879808000, "resourceName": "test_disk2", "availabilityZone": "cn-huhehaote-a", "resourceType": "ACS::ECS::Disk", "tags": {} } }
刪除資源
在單賬號模式下,阿里云賬號
120886317861****
在對象存儲OSS的北京地域刪除存儲空間test_bucket
。{ "requestId": "e63b8fca-74d4-4709-9ea3-b7e0a3159294", "dataType": "ConfigurationItemChangeNotification", "eventName": "ResourceDelete", "configurationItemDiff": { "changedProperties": {}, "changeType": "REMOVE" }, "eventType": "ResourceChange", "notificationCreationTime": 1629883026181, "configurationItem": { "accountId": 132585902944****, "resourceCreateTime": 1629882024000, "resourceId": "test_bucket", "resourceStatus": "", "regionId": "cn-beijing", "configuration": { "AccessControlList": { "Grant": "private" }, "ServerSideEncryptionRule": { "SSEAlgorithm": "None" }, "Comment": "", "CreationDate": "2021-08-25T09:00:24.000Z", "Owner": { "DisplayName": "132585902944****", "ID": "132585902944****" }, "StorageClass": "Standard", "DataRedundancyType": "LRS", "AllowEmptyReferer": "true", "Name": "test_bucket", "BucketPolicy": { "LogPrefix": "", "LogBucket": "" }, "ExtranetEndpoint": "oss-cn-beijing.aliyuncs.com", "IntranetEndpoint": "oss-cn-beijing-internal.aliyuncs.com", "Location": "oss-cn-beijing" }, "captureTime": 1629883020000, "resourceName": "test_bucket", "availabilityZone": "", "resourceType": "ACS::OSS::Bucket", "tags": {} } }
參數說明
資源配置變更歷史投遞到輕量消息隊列(原 MNS)的主要參數說明如下表所示。
參數 | 說明 |
dataType | 輕量消息隊列(原 MNS)的接收內容。取值:
|
eventName | 事件名稱。取值:
|
configurationItemDiff | 資源配置變更詳情。包括資源變更類型和變更項。 |
eventType | 事件類型。取值:
|
notificationCreationTime | 創建通知的時間戳。 |
configurationItem | 資源的詳細配置。包括資源ID、資源狀態、資源歸屬地域和資源歸屬賬號ID等。 |
captureTime | 配置審計發現資源配置變更并生成事件的時間戳。 |
resourceName | 資源名稱。 |
availabilityZone | 資源可用區。 |
resourceType | 資源類型。關于支持配置審計的資源類型,請參見配置審計支持的資源類型和資源關系。 |
tags | 資源標簽。 |