All Products
Search
Document Center

Cloud Config:Examples of resource change logs

Last Updated:Oct 14, 2025

This topic provides examples of resource change logs that are delivered to Simple Log Service for storage. The following sections describe the content of the examples and the parameters included in the logs.

Examples

The following three pieces of code show sample resource change logs for the create, modify, and delete operations on resources:

  • Create a resource

    In single-account mode, you use an Alibaba Cloud account whose ID is 100931896542**** to create a disk named test_disk in Elastic Compute Service (ECS) in the China (Heyuan) region. In the configurationDiff parameter, the disk configuration before the create operation is displayed as null and the detailed configuration after the create operation is displayed. The relationship and relationshipDiff parameters show that a resource whose ID is d-f8zcofij6pjsju50**** is associated with the disk.

    {
      "resourceId": "i-f8z8psx67rksgpp3lb****",
      "captureTime": "1748923229001",
      "configuration": "{\"ResourceGroupId\":\"\",\"Memory\":2048,\"InstanceChargeType\":\"PostPaid\",\"Cpu\":2,\"OSName\":\"Alibaba Cloud Linux  3.2104 LTS 64bit\",\"InstanceNetworkType\":\"vpc\",\"InnerIpAddress\":{\"IpAddress\":[]},\"ExpiredTime\":\"2099-12-31T15:59Z\",\"ImageId\":\"aliyun_3_x64_20G_alibase_20250117.vhd\",\"EipAddress\":{\"AllocationId\":\"\",\"IpAddress\":\"\",\"InternetChargeType\":\"\"},\"ImageOptions\":{},\"VlanId\":\"\",\"HostName\":\"iZf8z8psx67rksgpp3lb6lZ\",\"Status\":\"Running\",\"AdditionalInfo\":{},\"HibernationOptions\":{\"Configured\":false},\"MetadataOptions\":{\"HttpTokens\":\"\",\"HttpEndpoint\":\"\"},\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"StoppedMode\":\"Not-applicable\",\"CpuOptions\":{\"ThreadsPerCore\":2,\"Numa\":\"ON\",\"CoreCount\":1},\"StartTime\":\"2025-06-03T03:58Z\",\"PrivateDnsNameOptions\":{},\"DeletionProtection\":false,\"VpcAttributes\":{\"PrivateIpAddress\":{\"IpAddress\":[\"172.28.129.241\"]},\"VpcId\":\"vpc-f8zhnrviismi44amovhi3\",\"VSwitchId\":\"vsw-f8zon645srm3g3xp33t****\",\"NatIpAddress\":\"\"},\"SecurityGroupIds\":{\"SecurityGroupId\":[\"sg-f8z41uaptndu6rj4d0b8\"]},\"InternetChargeType\":\"PayByTraffic\",\"InstanceName\":\"launch-advisor-20250603\",\"DeploymentSetId\":\"\",\"InternetMaxBandwidthOut\":5,\"SerialNumber\":\"b01f12d7-5308-427d-bd6e-af7601a05e****\",\"OSType\":\"linux\",\"CreationTime\":\"2025-06-03T03:58Z\",\"AutoReleaseTime\":\"2025-06-03T07:00Z\",\"Description\":\"Test SLS delivery fields\",\"InstanceTypeFamily\":\"ecs.e\",\"DedicatedInstanceAttribute\":{\"Tenancy\":\"\",\"Affinity\":\"\"},\"PublicIpAddress\":{\"IpAddress\":[\"8.155.XX.XXX\"]},\"GPUSpec\":\"\",\"NetworkInterfaces\":{\"NetworkInterface\":[{\"Type\":\"Primary\",\"PrimaryIpAddress\":\"172.28.129.241\",\"MacAddress\":\"00:16:3e:18:cd:88\",\"NetworkInterfaceId\":\"eni-f8z8psx67rksgpp522lu\",\"PrivateIpSets\":{\"PrivateIpSet\":[{\"PrivateIpAddress\":\"172.28.129.241\",\"Primary\":true}]}}]},\"SpotPriceLimit\":0.0,\"SaleCycle\":\"\",\"DeviceAvailable\":true,\"InstanceType\":\"ecs.e-c1m1.large\",\"OSNameEn\":\"Alibaba Cloud Linux  3.2104 LTS 64 bit\",\"SpotStrategy\":\"NoSpot\",\"IoOptimized\":true,\"ZoneId\":\"cn-heyuan-a\",\"ClusterId\":\"\",\"EcsCapacityReservationAttr\":{\"CapacityReservationPreference\":\"\",\"CapacityReservationId\":\"\"},\"DedicatedHostAttribute\":{\"DedicatedHostId\":\"\",\"DedicatedHostName\":\"\",\"DedicatedHostClusterId\":\"\"},\"GPUAmount\":0,\"OperationLocks\":{\"LockReason\":[]},\"InternetMaxBandwidthIn\":200,\"Recyclable\":false,\"RegionId\":\"cn-heyuan\",\"CreditSpecification\":\"\"}",
      "availabilityZone": "cn-heyuan-a",
      "requestId": "0aece286-5291-491f-8ab8-bfc0921bd****",
      "resourceGroupId": "rg-acfmvoh45rhcfly",
      "arn": "acs:ecs:cn-heyuan:100931896542****:instance/i-f8z8psx67rksgpp3lb****",
      "relationship": "[{\"regionId\":\"cn-heyuan\",\"relationType\":\"IsAttachedTo\",\"resourceId\":\"d-f8zcofij6pjsju505sn5\",\"resourceType\":\"ACS::ECS::Disk\"}]",
      "configurationDiff": "",
      "resourceEventType": "RELATION_MODIFY",
      "resourceCreateTime": "1748923080000",
      "dataType": "ConfigurationItemChangeNotification",
      "resourceName": "launch-advisor-20250603",
      "version": "1748923229132000",
      "tags": {},
      "accountId": "100931896542****",
      "relationshipDiff": "{\"relationship_diff\":{\"relationship_add\":[{\"regionId\":\"cn-heyuan\",\"relationType\":\"IsAttachedTo\",\"resourceId\":\"d-f8zcofij6pjsju505sn5\",\"resourceType\":\"ACS::ECS::Disk\"}],\"relationship_delete\":[]}}",
      "resourceStatus": "Running",
      "regionId": "cn-heyuan",
      "resourceType": "ACS::ECS::Instance"
    }
  • Modify a resource

    In single-account mode, you use an Alibaba Cloud account whose ID is 100931896542**** to add the key1 tag to a disk named test_disk in ECS in the China (Heyuan) region. In the configurationDiff parameter, the tag configuration of the disk before the modify operation is displayed as null and the tag configuration after the modify operation is displayed as key1. The relationship and relationshipDiff parameters show that a resource whose ID is rg-acfmvoh45r***** is disassociated from the disk.

    {
      "resourceId": "d-f8zcofij6pjsju505sn****",
      "captureTime": "1748929932000",
      "configuration": "{\"DetachedTime\":\"\",\"Category\":\"cloud_essd\",\"KMSKeyId\":\"\",\"Description\":\"\",\"ResourceGroupId\":\"\",\"Size\":40,\"Encrypted\":false,\"DeleteAutoSnapshot\":false,\"DiskChargeType\":\"PostPaid\",\"Throughput\":110,\"IOPS\":2280,\"Attachments\":{\"Attachment\":[{\"AttachedTime\":\"2025-06-03T03:58:52Z\",\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"Device\":\"/dev/xvda\"}]},\"MultiAttach\":\"Disabled\",\"Placement\":{},\"ExpiredTime\":\"2999-09-08T16:00Z\",\"ImageId\":\"aliyun_3_x64_20G_alibase_20250117.vhd\",\"StorageSetId\":\"\",\"Tags\":{\"Tag\":[{\"TagKey\":\"key1\",\"TagValue\":\"\"}]},\"Status\":\"In_use\",\"AttachedTime\":\"2025-06-03T03:58:52Z\",\"StorageClusterId\":\"\",\"ZoneId\":\"cn-heyuan-a\",\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"ProductCode\":\"\",\"SourceSnapshotId\":\"\",\"Device\":\"/dev/xvda\",\"PerformanceLevel\":\"PL0\",\"DeleteWithInstance\":true,\"EnableAutomatedSnapshotPolicy\":false,\"EnableAutoSnapshot\":true,\"AutoSnapshotPolicyId\":\"\",\"DiskName\":\"\",\"BdfId\":\"\",\"OperationLocks\":{\"OperationLock\":[]},\"Portable\":true,\"Type\":\"system\",\"SerialNumber\":\"f8zcofij6pjsju505sn****\",\"CreationTime\":\"2025-06-03T03:58:50Z\",\"RegionId\":\"cn-heyuan\",\"DiskId\":\"d-f8zcofij6pjsju505sn****\"",
      "availabilityZone": "cn-heyuan-a",
      "requestId": "b7cdbb24-3ad0-470a-bf89-af8a8fa20****",
      "resourceGroupId": "rg-acfmvoh45rhcfly",
      "arn": "acs:ecs:cn-heyuan:100931896542****:disk/d-f8zcofij6pjsju505sn****",
      "relationship": "[{\"regionId\":\"cn-heyuan\",\"relationType\":\"IsAttachedTo\",\"resourceId\":\"i-f8z8psx67rksgpp3lb****\",\"resourceType\":\"ACS::ECS::Instance\"}]",
      "configurationDiff": "{\"Tags\":[{\"Tag\":[]},{\"Tag\":[{\"TagKey\":\"key1\",\"TagValue\":\"\"}]}]}",
      "resourceEventType": "MODIFY",
      "resourceCreateTime": "1748923130000",
      "dataType": "ConfigurationItemChangeNotification",
      "resourceName": "",
      "version": "1748929931726000",
      "tags": "{\"key1\":[\"\"]}",
      "accountId": "100931896542****",
      "relationshipDiff": "{\"relationship_diff\":{\"relationship_add\":[],\"relationship_delete\":[]}}",
      "resourceStatus": "In_use",
      "regionId": "cn-heyuan",
      "resourceType": "ACS::ECS::Disk"
    }
  • Delete a resource

    In single-account mode, you use an Alibaba Cloud account whose ID is 100931896542**** to delete a disk from ECS in the China (Heyuan) region. In the configurationDiff parameter, the disk configuration before the delete operation is displayed and the disk configuration after the delete operation is displayed as null. The relationship and relationshipDiff parameters show that the disk has no associated resources.

    {
      "resourceId": "d-f8zcofij6pjsju505sn****",
      "captureTime": "1748931168000",
      "configuration": "{\"DetachedTime\":\"2025-06-03T06:09:30Z\",\"Category\":\"cloud_essd\",\"KMSKeyId\":\"\",\"Description\":\"\",\"ResourceGroupId\":\"\",\"Size\":40,\"Encrypted\":false,\"DeleteAutoSnapshot\":false,\"DiskChargeType\":\"PostPaid\",\"Throughput\":110,\"IOPS\":2280,\"Attachments\":{\"Attachment\":[{\"AttachedTime\":\"2025-06-03T06:10:11Z\",\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"Device\":\"/dev/xvda\"}]},\"MultiAttach\":\"Disabled\",\"Placement\":{},\"ExpiredTime\":\"2999-09-08T16:00Z\",\"ImageId\":\"aliyun_3_x64_20G_alibase_20250117.vhd\",\"StorageSetId\":\"\",\"Tags\":{\"Tag\":[{\"TagKey\":\"key1\",\"TagValue\":\"\"}]},\"Status\":\"In_use\",\"AttachedTime\":\"2025-06-03T06:10:11Z\",\"StorageClusterId\":\"\",\"ZoneId\":\"cn-heyuan-a\",\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"ProductCode\":\"\",\"SourceSnapshotId\":\"\",\"Device\":\"/dev/xvda\",\"PerformanceLevel\":\"PL0\",\"DeleteWithInstance\":true,\"EnableAutomatedSnapshotPolicy\":false,\"EnableAutoSnapshot\":true,\"AutoSnapshotPolicyId\":\"\",\"DiskName\":\"\",\"BdfId\":\"\",\"OperationLocks\":{\"OperationLock\":[]},\"Portable\":true,\"Type\":\"system\",\"SerialNumber\":\"f8zcofij6pjsju505sn****\",\"CreationTime\":\"2025-06-03T03:58:50Z\",\"RegionId\":\"cn-heyuan\",\"DiskId\":\"d-f8zcofij6pjsju505sn****\"",
      "availabilityZone": "cn-heyuan-a",
      "requestId": "1795c5e2-ce69-4a41-816d-c6c94f311a****",
      "resourceGroupId": "rg-acfmvoh45rhcfly",
      "arn": "acs:ecs:cn-heyuan:100931896542****:disk/d-f8zcofij6pjsju505sn****",
      "relationship": "",
      "configurationDiff": "{\"DetachedTime\":[\"2025-06-03T06:09:30Z\",null],\"Category\":[\"cloud_essd\",null],\"Description\":[\"\",\"\"],\"KMSKeyId\":[\"\",\"\"],\"ResourceGroupId\":[\"\",\"\"],\"Encrypted\":[false,null],\"Size\":[40,null],\"DeleteAutoSnapshot\":[false,null],\"DiskChargeType\":[\"PostPaid\",null],\"Throughput\":[110,null],\"IOPS\":[2280,null],\"Attachments\":[{\"Attachment\":[{\"AttachedTime\":\"2025-06-03T06:10:11Z\",\"InstanceId\":\"i-f8z8psx67rksgpp3lb****\",\"Device\":\"/dev/xvda\"}]},null],\"MultiAttach\":[\"Disabled\",null],\"Placement\":[{},null],\"ExpiredTime\":[\"2999-09-08T16:00Z\",null],\"ImageId\":[\"aliyun_3_x64_20G_alibase_20250117.vhd\",null],\"StorageSetId\":[\"\",\"\"],\"Tags\":[{\"Tag\":[{\"TagKey\":\"key1\",\"TagValue\":\"\"}]},null],\"Status\":[\"In_use\",null],\"AttachedTime\":[\"2025-06-03T06:10:11Z\",null],\"StorageClusterId\":[\"\",\"\"],\"ZoneId\":[\"cn-heyuan-a\",null],\"ProductCode\":[\"\",\"\"],\"InstanceId\":[\"i-f8z8psx67rksgpp3lb****\",null],\"SourceSnapshotId\":[\"\",\"\"],\"Device\":[\"/dev/xvda\",null],\"PerformanceLevel\":[\"PL0\",null],\"DeleteWithInstance\":[true,null],\"EnableAutomatedSnapshotPolicy\":[false,null],\"EnableAutoSnapshot\":[true,null],\"AutoSnapshotPolicyId\":[\"\",\"\"],\"DiskName\":[\"\",\"\"],\"BdfId\":[\"\",\"\"],\"OperationLocks\":[{\"OperationLock\":[]},null],\"Portable\":[true,null],\"Type\":[\"system\",null],\"SerialNumber\":[\"f8zcofij6pjsju505sn****\",null],\"CreationTime\":[\"2025-06-03T03:58:50Z\",null],\"RegionId\":[\"cn-heyuan\",null],\"DiskId\":[\"d-f8zcofij6pjsju505sn****\",null]}",
      "resourceEventType": "REMOVE",
      "resourceCreateTime": "1748923130000",
      "dataType": "ConfigurationItemChangeNotification",
      "resourceName": "",
      "version": "1748931699081000",
      "tags": "{\"key1\":[\"\"]}",
      "accountId": "100931896542****",
      "relationshipDiff": "{\"relationship_diff\":{\"relationship_add\":[],\"relationship_delete\":[{\"regionId\":\"cn-heyuan\",\"relationType\":\"IsAttachedTo\",\"resourceId\":\"i-f8z8psx67rksgpp3lb****\",\"resourceType\":\"ACS::ECS::Instance\"}]}}",
      "resourceStatus": "In_use",
      "regionId": "cn-heyuan",
      "resourceType": "ACS::ECS::Disk"
    }

Parameters

The following table describes the parameters included in resource change logs that are delivered to Simple Log Service.

Parameter

Description

accountId

The ID of the account to which the resource belongs. The account ID depends on the account mode.

  • 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.

availabilityZone

The ID of the zone where the resource resides.

captureTime

The timestamp when Cloud Config detected the resource change and generated the log.

configuration

The current configuration of the resource.

configurationDiff

The resource configurations before and after the change.

dataType

The type of the log received by Simple Log Service. Valid values:

  • ConfigurationItemChangeNotification: resource change log

  • NonCompliantNotification: resource non-compliance event

regionId

The ID of the region where the resource resides.

relationship

The details of each resource that is associated with the current resource, including the region ID, resource relationship, resource ID, and resource type. This parameter is available only if the current resource has associated resources.

  • If the current resource has associated resources, the value indicates the details of each associated resource.

    For information about the Alibaba Cloud services and resource types supported by Cloud Config, see Alibaba Cloud services and resource types supported by Cloud Config.

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

relationshipDiff

The change records of the resource relationship.

resourceCreateTime

The timestamp when the resource is created.

resourceEventType

The type of the involved resource change event. Valid values:

  • DISCOVERED: A resource is discovered by Cloud Config.

  • MODIFY: A resource is modified.

  • REMOVE: A resource is deleted.

  • DISCOVERED_REVISED: A resource is discovered by Cloud Config through periodic remediation tasks.

  • MODIFY_REVISED: A resource is modified through periodic remediation tasks.

resourceGroupId

The ID of the resource group to which the resource belongs. This parameter is available only if the resource type supports resource groups.

  • If the resource type supports resource groups, the value is the ID of the resource group to which the resource belongs.

    For more information about the Alibaba Cloud services and resource types that support resource groups, see Services that work with Resource Group.

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

resourceId

The ID of the resource.

resourceName

The name of the resource.

resourceStatus

The status of the resource. The value of the parameter varies based on the resource type and the parameter may be left empty. Examples:

  • If the value of the resourceType parameter is ACS::ECS::Instance, the resource is an ECS instance that is in a specific state. In this case, valid values of this parameter are Running and Stopped.

  • If the value of the ResourceType parameter is ACS::OSS::Bucket, the resource is an Object Storage Service (OSS) bucket that is not in a specific state. In this case, this parameter is left empty.

resourceType

The type of the resource. For more information about the resource types supported by Cloud Config, see Alibaba Cloud services and resource types supported by Cloud Config.

tags

The tags of the resource.