通过本文您可以了解资源配置变更历史投递到对象存储OSS的内容示例和主要参数说明。

内容示例

创建资源、修改资源和删除资源的配置变更历史投递到对象存储OSS的内容示例如下:
  • 创建资源
    普通账号120886317861****在云服务器ECS的呼和浩特地域创建云盘test_disk,在configurationDiff中显示云盘的变更前信息null和变更后详细信息,在relationshiprelationshipDiff中显示云盘无相关资源,且无变更项。
    {
        "configurationItems": [
            {
            "accountId": "120886317861****",
            "arn": "acs:ecs:cn-huhehaote:120886317861****:disk/d-hp33k7bzwqvtmjrs****",
            "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",
            "configAggregators": ""
            }
        ],
        "requestId": "c746a79d-c0b9-4584-bf41-a6a9f370ee71",
        "fileVersion": "1.0"
  • 修改资源
    普通账号120886317861****在对象存储OSS的杭州地域为存储空间test_bucket关联标签,在configurationDiff中显示存储空间的标签变更前信息null和标签变更后信息(Keykey1)。
    {
        "configurationItems": [
            {
            "accountId": "120886317861****",
            "arn": "acs:oss:cn-hangzhou:120886317861****:test_bucket",
            "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",
            "configAggregators": ""
            }
        ],
        "requestId": "e2e88348-8ee4-4b3a-9908-0c815bd47718",
        "fileVersion": "1.0"
    }
  • 删除资源
    企业管理账号100931896542****在云服务器ECS的呼和浩特地域删除云盘test01_disk,在configurationDiff中显示云盘变更前信息和变更后信息(null),在relationshiprelationshipDiff中显示云盘无相关资源,且无变更项。
    {
        "configurationItems": [
            {
            "accountId": "100931896542****",
            "arn": "acs:ecs:cn-huhehaote:100931896542****:disk/d-hp3ezlgii0ltupns****",
            "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",
            "configAggregators": "100931896542****:ca-08e6626622af0044****"
            }
        ],
        "requestId": "cbb047ba-1149-46d3-a07d-5ac20d94ba49",
        "fileVersion": "1.0"
    }

参数说明

资源配置变更历史投递到对象存储OSS的主要参数说明如下表所示。
参数 说明
accountId
资源归属的账号ID。配置审计支持如下账号类型:
  • 普通账号:未被企业管理账号加入资源目录的独立的阿里云账号。
  • 企业管理账号:开通资源目录并管理成员账号的阿里云账号。
  • 成员账号:资源目录中的成员账号。
arn 资源ARN。关于各云服务资源类型对应的ARN格式,请参见ARN格式
regionId 资源所在地域ID。
configuration 资源的详细配置。
configurationDiff 资源配置变更的具体变更项及变更前后信息。
relationship 相关资源的详细信息,包括相关资源所在地域ID、资源关系、资源ID和资源类型。根据资源是否有相关资源,该参数显示如下:
relationshipDiff 相关资源的变更项。
captureTime 配置审计发现资源变更事件并生成快照的时间戳。关于时间戳的转换方法,请参见Unix时间戳
resourceCreateTime 创建资源的时间戳。关于时间戳的转换方法,请参见Unix时间戳
resourceStatus 资源状态。资源的状态取决于各云服务对资源的定义,该参数可能为空。例如:
  • 当资源类型为ACS::ECS::Instance时,由于ECS实例有状态,因此该参数为RunningStopped
  • 当资源类型为ACS::OSS::Bucket时,由于OSS Bucket无状态,因此该参数为空。
resourceId 资源ID。
resourceName 资源名称。
resourceGroupId 资源归属的资源组ID。根据资源类型是否支持资源组,该参数显示如下:
  • 当资源类型支持资源组时,该参数为资源组ID。

    关于支持资源组的云服务,请参见支持资源组的云服务

  • 当资源类型不支持资源组时,该参数为空。
resourceType 资源类型。关于支持配置审计的资源类型,请参见支持配置审计的资源类型和资源关系
tags 资源标签。
resourceEventType 资源变更事件的类型。取值:
  • DISCOVERED:创建资源事件。
  • MODIFY:修改资源事件。
  • REMOVE:删除资源事件。
configAggregators 账号组信息,包括创建账号组的企业管理账号ID和账号组ID。根据资源归属账号类型不同,该参数显示如下:
  • 当资源归属普通账号时,该参数为空。
  • 当资源归属企业管理账号时,该参数为当前企业管理账号创建的账号组信息。
  • 当资源归属成员账号时,该参数为成员账号归属的企业管理账号创建的账号组信息。