消息通知模型
目前,消息通知服务支持Config以下几种类型的消息通知:
- 资源变更(创建/修改/删除)的消息通知;
- 资源关系变更的消息通知;
- 资源变更消息存储完成的消息通知;
- 资源快照存储完成的消息通知。
资源变更的消息通知模型
参数 |
参数类型 |
描述 |
---|---|---|
notification_type |
String |
消息通知类型。 |
notification_creation_time |
String |
消息发送时间。 具有固定格式:遵循ISO8601格式,UTC时区(例如:2018-11-14T08:59:14Z)。 |
domain_id |
String |
账号ID。 |
detail |
Object |
消息详情。 |
参数 |
参数类型 |
描述 |
---|---|---|
resource_id |
String |
资源ID。 |
resource_type |
String |
资源类型。 |
event_type |
Enum |
事件类型(CREATE|UPDATE|DELETE)。 |
capture_time |
String |
事件捕获时间。 具有固定格式:遵循ISO8601格式,UTC时区(例如:2018-11-14T08:59:14Z)。 |
resource |
Object |
资源详情。 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
资源ID。 |
name |
String |
资源名称。 |
provider |
String |
云服务名称。 |
type |
String |
云资源类型。 |
region_id |
String |
资源所在区域ID。 |
project_id |
String |
IAM项目ID。 |
project_name |
String |
IAM项目名称。 |
ep_id |
String |
企业项目ID。 |
ep_name |
String |
企业项目名称。 |
checksum |
String |
校验和。 |
created |
String |
云资源初始创建时间。 具有固定格式:遵循ISO8601格式,UTC时区(例如:2018-11-14T08:59:14Z)。 |
updated |
String |
云资源最后更新时间。 具有固定格式:遵循ISO8601格式,UTC时区(例如:2018-11-14T08:59:14Z)。 |
provisioning_state |
String |
资源操作状态。 |
tags |
Map |
租户为云资源做的标记。 |
properties |
Map |
云资源的属性详情。 |
资源变更消息通知示例
{ "detail": { "resource": { "id": "3e62c0e6-e779-469e-b0f2-35743f6229d1", "name": "ecs-51c8", "provider": "evs", "type": "volumes", "checksum": "b3bcc019cecbb701e324e0dcf2f283236685885236b49f5ba5ea2f5f788170a1", "created": "2020-08-12T07:14:41.638Z", "updated": "2020-08-12T07:14:44.423Z", "tags": {}, "properties": { "shareable": false, "volumeType": "SATA", "metadata": {}, "attachments": [], "replicationStatus": "disabled", "availabilityZone": "regionid1a", "bootable": "true", "userId": "059b5c937d80d3e41ff3c00a3c883d16", "volTenantAttrTenantId": "059b5e0a2500d5552fa1c00adada8c06", "size": "40", "encrypted": false, "volumeImageMetadata": { "virtualEnvType": "FusionCompute", "isregistered": "true", "imageSourceType": "uds", "minDisk": "40", "platform": "CentOS", "size": 0, "osVersion": "CentOS 7.5 64bit", "minRam": "0", "name": "CentOS 7.5 64bit", "checksum": "d41d8cd98f00b204e9800998ecf8427e", "osBit": "64", "osType": "Linux", "containerFormat": "bare", "supportXen": "true", "id": "e0adce3a-a4d2-4207-9018-69ce64b4426a", "supportKvm": "true", "diskFormat": "zvhd2", "imageType": "gold" }, "links": [ { "rel": "self", "href": "https://evs.regionid1.xxxxxx.com/v2/059b5e0a2500d5552fa1c00adada8c06/os-vendor-volumes/3e62c0e6-e779-469e-b0f2-35743f6229d1" }, { "rel": "bookmark", "href": "https://evs."regionid1.xxxxxx.com/059b5e0a2500d5552fa1c00adada8c06/os-vendor-volumes/3e62c0e6-e779-469e-b0f2-35743f6229d1" } ], "volHostAttrHost": ""regionid1a-pod01."regionid1#0", "multiattach": false, "status": "available" }, "region_id": ""regionid1", "project_id": "059b5e0a2500d5552fa1c00adada8c06", "project_name": ""regionid1", "ep_id": "0", "ep_name": "default", "provisioning_state": "Succeeded" }, "resource_id": "3e62c0e6-e779-469e-b0f2-35743f6229d1", "resource_type": "evs.volumes", "event_type": "CREATE", "capture_time": "2020-08-12T07:15:15.116Z" }, "notification_type": "ResourceChanged", "notification_creation_time": "2020-08-12T07:14:47.192Z", "domain_id": "059b5c937100d3e40ff0c00a7675a0a0" }
资源关系变更的消息通知模型
参数 |
参数类型 |
描述 |
---|---|---|
notification_type |
String |
消息通知类型。 |
notification_creation_time |
String |
消息发送时间。 具有固定格式:遵循ISO8601格式,UTC时区(例如:2018-11-14T08:59:14Z)。 |
domain_id |
String |
账号ID。 |
detail |
Object |
消息详情。 |
参数 |
参数类型 |
描述 |
---|---|---|
resource_id |
String |
资源ID。 |
resource_type |
String |
资源类型。 |
event_type |
Enum |
事件类型(CHANGE)。 |
capture_time |
String |
事件捕获时间。 具有固定格式:遵循ISO8601格式,UTC时区(例如:2018-11-14T08:59:14Z)。 |
资源关系变更消息通知示例
{ "detail": { "resource_id": "f65b06d1-d63b-438a-93cc-bdd55b304f0a", "resource_type": "ecs.cloudservers", "event_type": "CHANGE", "capture_time": "2020-08-12T07:15:14.257Z" }, "notification_type": "ResourceRelationChanged", "notification_creation_time": "2020-08-12T07:14:56.296Z", "domain_id": "059b5c937100d3e40ff0c00a7675a0a0" }
资源快照存储完成的消息通知模型
参数 |
参数类型 |
描述 |
---|---|---|
notification_type |
String |
消息通知类型。 |
notification_creation_time |
String |
消息发送时间。 具有固定格式:遵循ISO8601格式,UTC时区(例如:2018-11-14T08:59:14Z)。 |
domain_id |
String |
租户ID。 |
detail |
Object |
消息详情。 |
参数 |
参数类型 |
描述 |
---|---|---|
snapshot_id |
String |
资源快照ID。 |
region_id |
String |
资源快照所在区域ID。 |
bucket_name |
String |
资源快照所在OBS桶名。 |
object_keys |
Array of String |
资源快照路径列表。 |
资源快照存储完成的消息通知示例
{ "detail": { "snapshot_id": "474f85e6-72cd-442b-af4e-517120a5c669", "region_id": ""regionid1", "bucket_name": "test", "object_keys": [ "RMSLogs/059b5c937100d3e40ff0c00a7675a0a0/Snapshot/2020/8/11/059b5c937100d3e40ff0c00a7675a0a0_Snapshot_"regionid1_ResourceSnapshot_2020-08-10T170901_474f85e6-72cd-442b-af4e-517120a5c669_part-1.json.gz" ] }, "notification_type": "SnapshotArchiveCompleted", "notification_creation_time": "2020-08-10T17:09:27.314Z", "domain_id": "059b5c937100d3e40ff0c00a7675a0a0" }
资源变更消息存储完成的消息通知模型
参数 |
参数类型 |
描述 |
---|---|---|
notification_type |
String |
消息通知类型。 |
notification_creation_time |
String |
消息发送时间。 具有固定格式:遵循ISO8601格式,UTC时区(例如:2018-11-14T08:59:14Z)。 |
domain_id |
String |
账号ID。 |
detail |
Object |
消息详情。 |
参数 |
参数类型 |
描述 |
---|---|---|
region_id |
String |
资源快照所在区域ID。 |
bucket_name |
String |
资源快照所在OBS桶名。 |
object_key |
String |
资源快照路径。 |
资源变更消息存储完成的消息通知示例
{ "detail": { "region_id": ""regionid1", "bucket_name": "test", "object_key": "RMSLogs/059b5c937100d3e40ff0c00a7675a0a0/Notification/2020/12/10/NotificationChunk/059b5c937100d3e40ff0c00a7675a0a0_Notification_"regionid2_NotificationChunk_VPC_VPCS_2020-12-10T024612Z_2020-12-10T050621Z.json.gz" }, "notification_type": "NotificationArchiveCompleted", "notification_creation_time": "2020-12-10T05:09:28.002Z", "domain_id": "059b5c937100d3e40ff0c00a7675a0a0" }