全部產品
Search
文件中心

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

更新時間:Sep 15, 2024

通過本文您可以瞭解配置審計的資源配置變更歷史投遞到輕量訊息佇列(原 MNS)的內容樣本和主要參數說明。

內容樣本

建立資源、修改資源和刪除資源的配置變更歷史投遞到輕量訊息佇列(原 MNS)的內容樣本如下:

  • 建立資源

    在單帳號模式下,阿里雲帳號132585902944****在Object Storage Service的北京地區建立儲存空間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****在Elastic Compute Service的呼和浩特地區將雲端硬碟名稱由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****在Object Storage Service的北京地區刪除儲存空間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)的接收內容。取值:

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

  • NonCompliantNotification:資源不合規事件。

eventName

事件名稱。取值:

  • ResourceAdd:建立資源事件。

  • ResourceUpdate:修改資源事件。

  • ResourceDelete:刪除資源事件。

configurationItemDiff

資源配置變更詳情。包括資源變更類型和變更項。

eventType

事件類型。取值:

  • ResourceChange:資源配置變更歷史事件。

  • ResourceCompliance:資源不合規事件。

notificationCreationTime

建立通知的時間戳記。

configurationItem

資源的詳細配置。包括資源ID、資源狀態、資源歸屬地區和資源歸屬帳號ID等。

captureTime

配置審計發現資源配置變更並建置事件的時間戳記。

resourceName

資源名稱。

availabilityZone

資源可用性區域。

resourceType

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

tags

資源標籤。