Sample content of resource configuration history

更新时间:
复制 MD 格式

This topic provides examples of resource configuration history delivered to Object Storage Service (OSS) and describes the main parameters.

Content examples

The following examples show the content of configuration history delivered to OSS for creating, modifying, and deleting resources:

  • Create a resource

    In single-account mode, an Alibaba Cloud account 120886317861**** creates a cloud disk named test_disk in the China (Hohhot) region for ECS. The configurationDiff parameter shows the cloud disk's information before the change (null) and its detailed information after the change. The relationship and relationshipDiff parameters show that the cloud disk has no associated resources and no related changes.

    {
        "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"
  • Modify a resource

    In single-account mode, an Alibaba Cloud account 120886317861**** associates a tag with the bucket test_bucket in the China (Hangzhou) region for OSS. The configurationDiff parameter shows the tag information for the bucket before the change (null) and after the change, where the Key is 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"
    }
  • Delete a resource

    In multi-account mode, a management account 100931896542**** deletes the cloud disk test01_disk in the China (Hohhot) region for ECS. The configurationDiff parameter shows the cloud disk information before the change and its information after the change, which is null. The relationship and relationshipDiff parameters show that the cloud disk has no associated resources and no related changes.

    {
        "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"
    }

Parameter descriptions

The following table describes the main parameters in the resource configuration history delivered to OSS.

Parameter

Description

accountId

The ID of the account to which the resource belongs. Cloud Config supports the following types of accounts:
  • Ordinary account: An ordinary account is an independent Alibaba Cloud account that is not included in a resource directory by a management account.
  • Management account: A management account is an Alibaba Cloud account that enables a resource directory and manages all member accounts.
  • Member account: A member account is an Alibaba Cloud account in a resource directory.
  • Single-account mode: Enter the ID of an independent Alibaba Cloud account that is not added to a resource directory by using a management account.

  • Multi-account mode: Enter a management account ID or a member account ID.

regionId

The ID of the region where the resource is located.

configuration

The detailed configuration of the resource.

configurationDiff

The specific items that were changed in the resource configuration, and the information before and after the change.

relationship

The detailed information about associated resources, including their region ID, resource relationship, resource ID, and resource type. This parameter varies based on whether the resource has associated resources:

  • If the resource has associated resources, this parameter contains their detailed information.

    For more information about the resource relationships that Cloud Config supports, see Supported resource types and relationships by Cloud Config.

  • If the resource has no associated resources, this parameter is empty.

relationshipDiff

The changes made to associated resources.

captureTime

The UNIX timestamp when Cloud Config detected the resource change event and generated the snapshot.

resourceCreateTime

The UNIX timestamp when the resource was created.

resourceStatus

The status of the resource. The resource status depends on how each Alibaba Cloud service defines the resource. This parameter can be empty. For example:

  • If the resource type is ACS::ECS::Instance, this parameter is Running or Stopped because an ECS instance is stateful.

  • If the resource type is ACS::OSS::Bucket, this parameter is empty because an OSS bucket is stateless.

resourceId

The ID of the resource.

resourceName

The name of the resource.

resourceGroupId

The ID of the resource group to which the resource belongs. This parameter varies based on whether the resource type supports resource groups:

  • If the resource type supports resource groups, this parameter is the ID of the resource group.

    For more information about the Alibaba Cloud services that support resource groups, see Alibaba Cloud services that support resource groups.

  • If the resource type does not support resource groups, this parameter is empty.

resourceType

The type of the resource. For more information about the resource types that Cloud Config supports, see Supported resource types and relationships by Cloud Config.

tags

The tags of the resource.

resourceEventType

The type of the resource change event. Valid values:

  • DISCOVERED: A resource creation event.

  • MODIFY: A resource modification event.

  • REMOVE: A resource deletion event.