You can specify the types of resources to be monitored by setting the monitoring scope in Cloud Config. If the resources of the specified types are added or deleted or the resource configurations are changed, Cloud Config will send notifications to you in a timely manner.

Add resources

The following table describes the parameters for the events of adding resources.
Parameter Description
"eventName": "ResourceAdd" The name of the event of adding a resource.
"changeType": "DISCOVERED" The type of the resource change. If a resource is added, Cloud Config considers the resource as a new resource.
"eventType": "ResourceChange" The type of the event. Adding resources, deleting resources, and changing resource configurations are resource change events.
"configurationItem" The configuration items of the added resource. For more information about the configuration items, see the parameters used to query the resources of relevant cloud services.

Example:

{
    "eventName": "ResourceAdd",
    "configurationItemDiff": {
        "changedProperties": {

        },
        "changeType": "DISCOVERED"
    },
    "eventType": "ResourceChange",
    "notificationCreationTime": 1582081736257,
    "configurationItem": {
        "accountId": 120886317861****,
        "resourceCreateTime": 1582081735563,
        "resourceId": "eni-wz94bjlwo3t4r3r9****",
        "regionId": "cn-shenzhen",
        "configuration": {
            "ResourceGroupId": "",
            "Memory": 2048,
            "InstanceChargeType": "PostPaid",
            "Cpu": 1,
            "OSName": "CentOS  7.6 64-bit",
            "InstanceNetworkType": "vpc",
            "InnerIpAddress": {
                "IpAddress": [

                ]
            },
            "ExpiredTime": "2099-12-31T15:59Z",
            "ImageId": "m-uf66zpmsydbupufj****",
            "EipAddress": {
                "AllocationId": "",
                "IpAddress": "",
                "InternetChargeType": ""
            },
            "VlanId": "",
            "HostName": "iZuf6dmgl1ay3ktkws5****",
            "Tags": {
                "Tag": [
                    {
                        "TagKey": "type",
                        "TagValue": "pool-instance"
                    },
                    {
                        "TagKey": "uid",
                        "TagValue": "136015022107****"
                    }
                ]
            },
            "Status": "Running",
            "InstanceId": "i-uf6dmgl1ay3ktkws****",
            "StoppedMode": "Not-applicable",
            "CpuOptions": {
                "ThreadsPerCore": 1,
                "Numa": "",
                "CoreCount": 1
            },
            "StartTime": "2020-02-12T15:18Z",
            "DeletionProtection": false,
            "SecurityGroupIds": {
                "SecurityGroupId": [
                    "sg-uf6gi47biq3zb5rl****"
                ]
            },
            "VpcAttributes": {
                "PrivateIpAddress": {
                    "IpAddress": [
                        "10. *. *. *"
                    ]
                },
                "VpcId": "vpc-uf66oesmrqge1t2gs****",
                "VSwitchId": "vsw-uf684d21r7vlt38ao****",
                "NatIpAddress": ""
            },
            "InternetChargeType": "PayByTraffic",
            "InstanceName": "pool-instance",
            "DeploymentSetId": "",
            "InternetMaxBandwidthOut": 0,
            "SerialNumber": "be299046-a5f5-4c31-a2f7-7725207b****",
            "OSType": "linux",
            "CreationTime": "2020-02-12T15:18Z",
            "AutoReleaseTime": "",
            "Description": "",
            "InstanceTypeFamily": "ecs.t5",
            "DedicatedInstanceAttribute": {
                "Tenancy": "",
                "Affinity": ""
            },
            "PublicIpAddress": {
                "IpAddress": [

                ]
            },
            "GPUSpec": "",
            "NetworkInterfaces": {
                "NetworkInterface": [
                    {
                        "PrimaryIpAddress": "10. *. *. *",
                        "MacAddress": "00:**:**:**:**:**",
                        "NetworkInterfaceId": "eni-uf69nj83nf48ayso****"
                    }
                ]
            },
            "SpotPriceLimit": 0.0,
            "DeviceAvailable": true,
            "SaleCycle": "",
            "InstanceType": "ecs.t5-lc1m2.small",
            "SpotStrategy": "NoSpot",
            "OSNameEn": "CentOS  7.6 64-bit",
            "KeyPairName": "cloudshell-proxy",
            "IoOptimized": true,
            "ZoneId": "cn-shanghai-f",
            "ClusterId": "",
            "EcsCapacityReservationAttr": {
                "CapacityReservationPreference": "",
                "CapacityReservationId": ""
            },
            "DedicatedHostAttribute": {
                "DedicatedHostId": "",
                "DedicatedHostName": ""
            },
            "GPUAmount": 0,
            "OperationLocks": {
                "LockReason": [

                ]
            },
            "InternetMaxBandwidthIn": -1,
            "Recyclable": false,
            "RegionId": "cn-shanghai",
            "CreditSpecification": "Standard"
        },
        "captureTime": 1582081735563,
        "arn": "acs:ecs:cn-shenzhen:136029256909****:eni/eni-wz94bjlwo3t4r3r9****",
        "availabilityZone": "cn-shenzhen-e",
        "resourceType": "ACS::ECS::NetworkInterface",
        "tags": {
            "ethId": [
                "3"
            ],
            "cmdb-b1name": [
                "**Container platform"
            ],
            "cmdb-b1id": [
                "00000003****"
            ],
            "cmdb-b2id": [
                "00000003752900****"
            ],
            "cmdb-b3id": [
                "00000003752900004000****"
            ],
            "cmdb-b3name": [
                "k8sworker[****]"
            ],
            "cmdb-b2name": [
                "****Cluster"
            ]
        }
    }
}

Delete resources

The following table describes the parameters for the events of deleting resources.
Parameter Description
"eventName": "ResourceDelete" The name of the event of deleting a resource.
"changeType": "REMOVE" The type of the resource change. If a resource is deleted, Cloud Config considers that the resource is removed.
"eventType": "ResourceChange" The type of the event. Adding resources, deleting resources, and changing resource configurations are resource change events.
"configurationItem" The configuration items of the deleted resource. For more information about the configuration items, see the parameters used to query the resources of relevant cloud services.

Example:

{
    "eventName": "ResourceDelete",
    "configurationItemDiff": {
        "changedProperties": {

        },
        "changeType": "REMOVE"
    },
    "eventType": "ResourceChange",
    "notificationCreationTime": 1582081938705,
    "configurationItem": {
        "accountId": 120886317861****,
        "resourceCreateTime": 1582081938054,
        "resourceId": "eni-wz94bjlwo3t4r3r9****",
        "regionId": "cn-shenzhen",
        "configuration": {
            "ResourceGroupId": "rg-acfmzincesj****",
            "Address": "**. **. **. ***",
            "ListenerPortsAndProtocal": {
                "ListenerPortAndProtocal": [
                    {
                        "ListenerPort": 443,
                        "ListenerProtocal": "tcp"
                    },
                    {
                        "ListenerPort": 80,
                        "ListenerProtocal": "tcp"
                    }
                ]
            },
            "EndTime": "2999-09-08T16:00:00Z",
            "SupportPrivateLink": false,
            "AddressIPVersion": "ipv4",
            "LoadBalancerId": "lb-2zejkpx1ks0jjf52g****",
            "ListenerPortsAndProtocol": {
                "ListenerPortAndProtocol": [
                    {
                        "ListenerPort": 443,
                        "Description": "k8s/443/phabricator/gitlab/clusterid",
                        "ListenerProtocol": "tcp"
                    },
                    {
                        "ListenerPort": 80,
                        "Description": "k8s/80/phabricator/gitlab/clusterid",
                        "ListenerProtocol": "tcp"
                    }
                ]
            },
            "BackendServers": {
                "BackendServer": [

                ]
            },
            "HasReservedInfo": "false",
            "LoadBalancerSpec": "slb.s1.small",
            "NetworkType": "classic",
            "Bandwidth": 5120,
            "Tags": {
                "Tag": [
                    {
                        "TagKey": "kubernetes.do.not.delete",
                        "TagValue": "ac000203c4d6711ea8cc12e38c2f****"
                    }
                ]
            },
            "MasterZoneId": "cn-beijing-f",
            "ListenerPorts": {
                "ListenerPort": [
                    443,
                    80
                ]
            },
            "VSwitchId": "",
            "CreateTime": "2020-02-12T07:17:41Z",
            "PayType": "PayOnDemand",
            "SlaveZoneId": "cn-beijing-g",
            "InternetChargeType": "paybytraffic",
            "RegionIdAlias": "cn-beijing",
            "LoadBalancerName": "ac000203c4d6711ea8cc12e38c2f****",
            "VpcId":"",
            "DeleteProtection": "off",
            "EndTimeStamp": 32493801600000,
            "RegionId": "cn-beijing",
            "AddressType": "internet",
            "LoadBalancerStatus": "active",
            "CreateTimeStamp": 1581491861000
        },
        "captureTime": 1582081938054,
        "arn": "acs:ecs:cn-shenzhen:136029256909****:eni/eni-wz94bjlwo3t4r3r9****",
        "availabilityZone": "cn-shenzhen-e",
        "resourceType": "ACS::ECS::NetworkInterface",
        "tags": {
            "ethId": [
                "3"
            ],
            "cmdb-b1name": [
                "**Container platform"
            ],
            "cmdb-b1id": [
                "00000003****"
            ],
            "cmdb-b2id": [
                "00000003752900****"
            ],
            "cmdb-b3id": [
                "00000003752900004000****"
            ],
            "cmdb-b3name": [
                "k8sworker[****]"
            ],
            "cmdb-b2name": [
                "****Cluster"
            ]
        }
    }
}

Change resource configurations

The following table describes the parameters for the events of changing resource configurations.
Parameter Description
"eventName": "ResourceUpdate" The name of the event of changing configurations of a resource.
"changeType": "MODIFY" The type of the resource change. If the configuration items of a resource are modified, Cloud Config considers that the configurations of the resource are changed.
"eventType": "ResourceChange" The type of the event. Adding resources, deleting resources, and changing resource configurations are resource change events.
"configurationItemDiff" The configuration items that are modified and the configuration details before and after the configuration change.
"configurationItem" The configuration items of the resource whose configurations are changed. For more information about the configuration items, see the parameters used to query the resources of relevant cloud services.

Example:

{
    "eventName": "ResourceUpdate",
    "configurationItemDiff": {
        "changedProperties": {
            "PrivateIpSets": {
                "changeType": "MODIFY",
                "previousValue": {
                    "PrivateIpSet": [
                        {
                            "PrivateIpAddress": "**. ***. ***. ***",
                            "AssociatedPublicIp": {

                            },
                            "Primary": true
                        },
                        {
                            "PrivateIpAddress": "**. ***. ***. **",
                            "AssociatedPublicIp": {

                            },
                            "Primary": false
                        }
                    ]
                },
                "updatedValue": {
                    "PrivateIpSet": [
                        {
                            "PrivateIpAddress": "**. ***. ***. ***",
                            "AssociatedPublicIp": {

                            },
                            "Primary": true
                        },
                        {
                            "PrivateIpAddress": "**. ***. ***. ***",
                            "AssociatedPublicIp": {

                            },
                            "Primary": false
                        },
                        {
                            "PrivateIpAddress": "**. ***. ***. ***",
                            "AssociatedPublicIp": {

                            },
                            "Primary": false
                        }
                    ]
                }
            }
        },
        "changeType": "MODIFY"
    },
    "eventType": "ResourceChange",
    "notificationCreationTime": 1582082211443,
    "configurationItem": {
        "accountId": 120886317861****,
        "resourceCreateTime": 1582082210805,
        "resourceId": "eni-wz94bjlwo3t4r3r9****",
        "regionId": "cn-shenzhen",
        "configuration": {
            "Status": "InUse",
            "PrivateIpAddress": "**. ***. ***. ***",
            "ResourceGroupId": "",
            "ZoneId": "cn-shenzhen-e",
            "InstanceId": "i-wz94bjlwo3t4r1sd****",
            "VSwitchId": "vsw-wz9y5beofg6803ia4****",
            "NetworkInterfaceId": "eni-wz94bjlwo3t4r3r9****",
            "MacAddress": "00:**:**:**:**:**",
            "SecurityGroupIds": {
                "SecurityGroupId": [
                    "sg-wz96y70qwfbchy8h****"
                ]
            },
            "Type": "Secondary",
            "Ipv6Sets": {
                "Ipv6Set": [

                ]
            },
            "VpcId": "vpc-wz9galbyy5v85xkkd****",
            "AssociatedPublicIp": {

            },
            "CreationTime": "2020-01-15T04:32:55Z",
            "Tags": {
                "Tag": [
                    {
                        "TagKey": "cmdb-b1id",
                        "TagValue": "00000003****"
                    },
                    {
                        "TagKey": "cmdb-b1name",
                        "TagValue": "**Container platform"
                    },
                    {
                        "TagKey": "cmdb-b2id",
                        "TagValue": "00000003752900****"
                    },
                    {
                        "TagKey": "cmdb-b2name",
                        "TagValue": "****Cluster"
                    },
                    {
                        "TagKey": "cmdb-b3id",
                        "TagValue": "00000003752900004000****"
                    },
                    {
                        "TagKey": "cmdb-b3name",
                        "TagValue": "k8sworker[****]"
                    },
                    {
                        "TagKey": "ethId",
                        "TagValue": "3"
                    }
                ]
            },
            "PrivateIpSets": {
                "PrivateIpSet": [
                    {
                        "PrivateIpAddress": "**. ***. ***. ***",
                        "AssociatedPublicIp": {

                        },
                        "Primary": true
                    },
                    {
                        "PrivateIpAddress": "**. ***. ***. **",
                        "AssociatedPublicIp": {

                        },
                        "Primary": false
                    },
                    {
                        "PrivateIpAddress": "**. ***. ***. **",
                        "AssociatedPublicIp": {

                        },
                        "Primary": false
                    }
                ]
            }
        },
        "captureTime": 1582082210805,
        "arn": "acs:ecs:cn-shenzhen:136029256909****:eni/eni-wz94bjlwo3t4r3r9****",
        "availabilityZone": "cn-shenzhen-e",
        "resourceType": "ACS::ECS::NetworkInterface",
        "tags": {
            "ethId": [
                "3"
            ],
            "cmdb-b1name": [
                "**Container platform"
            ],
            "cmdb-b1id": [
                "00000003****"
            ],
            "cmdb-b2id": [
                "00000003752900****"
            ],
            "cmdb-b3id": [
                "00000003752900004000****"
            ],
            "cmdb-b3name": [
                "k8sworker[****]"
            ],
            "cmdb-b2name": [
                "****Cluster"
            ]
        }
    }
}