This topic describes the event types that BatchCompute publishes to EventBridge as an event source.
Event types
BatchCompute supports publishing the following event types to EventBridge.
Event type | type parameter value |
Events for operations performed on resources by the Alibaba Cloud platform | batchcompute:ActionTrail:AliyunServiceEvent |
API call | batchcompute:ActionTrail:ApiCall |
Console operation events | batchcompute:ActionTrail:ConsoleOperation |
Cluster created event | batchcompute:ClusterStateChange:ClusterCreated |
Cluster deleted event | batchcompute:ClusterStateChange:ClusterDeleted |
Cluster error event | batchcompute:ClusterStateChange:ClusterError |
Cluster rolling event | batchcompute:ClusterStateChange:ClusterRolling |
Instance busy event | batchcompute:InstanceStateChange:InstanceBusy |
Instance created event | batchcompute:InstanceStateChange:InstanceCreated |
Instance preparing event | batchcompute:InstanceStateChange:InstancePreparing |
Instance ready event | batchcompute:InstanceStateChange:InstanceReady |
Instance released event | batchcompute:InstanceStateChange:InstanceReleased |
batchcompute:JobStateChange:JobCanceled | |
Job created event | batchcompute:JobStateChange:JobCreated |
Job deleted event | batchcompute:JobStateChange:JobDeleted |
batchcompute:JobStateChange:JobFailed | |
batchcompute:JobStateChange:JobRunning | |
batchcompute:JobStateChange:JobSucceeded | |
batchcompute:JobStateChange:JobWaiting | |
Project created event | batchcompute:ProjectStateChange:ProjectCreated |
Project deleted event | batchcompute:ProjectStateChange:ProjectDeleted |
For more information about the parameters defined in the CloudEvents specification, see Event overview.
Job canceled event
The following code shows an example of a job canceled event that EventBridge receives.
{
"datacontenttype": "application/json",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2021-01-08T15:25:03.083Asia/Shanghai",
"data": {
"Status": {
"EnqueueTime": "2021-02-07T18:16:29.081610969+08:00",
"State": "Canceled",
"CreateTime": "2021-02-07T18:16:29.081610969+08:00"
},
"Project": "test48351",
"OwnerId": "123456789098****",
"Definition": {
"MountPoints": [
{
"MountPath": "/home/input/",
"Name": "test"
}
],
"FailStrategy": {
"WaitingTimeout": 999
},
"Type": "Batch",
"Volumes": [
{
"OSS": {
"Bucket": "bcs-test-zb",
"Prefix": "blender-demo/scenes/splash279"
},
"Name": "test"
}
],
"Command": [
"python",
"startclient.py",
"invoke",
"{"action": "Convert", "parameters": "{\\"widthPixel\\": \\"256\\", \\"heightPixel\\": \\"256\\", \\"inputUri\\": \\"oss://bcs-test-zb/daemon_app_fast_test/input/sample2.jpg\\", \\"outputUri\\": \\"oss://bcs-test-zb/daemon_app_fast_test/output/\\"}", "requestid": "e419e112-9795-4f6d-a724-438f54ce****"}"
],
"Envs": {
},
"PackageUri": "oss://bcs-test-zb/daemon_app_fast_test/package/startclient.py",
"Runtimes": {
"JobQueue": "cls-0xQ83wAZvGVKCAaTGSU1V69****"
},
"Labels": {
},
"Resources": {
"memory": "1Gi",
"cpu": "1"
}
},
"JobId": "job-0xQ8VSTpk7HLXyjcdW97EQe****",
"Name": "e2e test"
},
"subject": "acs:batchcompute:cn-hangzhou:123456789098****:test48351/job-0w1JZb8SZ1DEsKbfP99T69t****",
"specversion": "1.0",
"aliyuneventbusname": "default",
"id": "2BF-0w33xE0ZMwZJCh7aat7lEIM****",
"source": "acs.batchcompute",
"time": "2021-01-08T15:25:03Z",
"type": "batchcompute:JobStateChange:JobCanceled",
"aliyunpublishaddr": "172.20.XX.XX"
}The following table describes the parameters in the data field.
Parameter | Type | Example | Description |
Status | Struct | The status information of the job. | |
EnqueueTime | String | 2021-02-07T18:16:29.081610969+08:00 | The time when the job was enqueued. |
State | String | Canceled | The status of the job. |
CreateTime | String | 2021-02-07T18:16:29.081610969+08:00 | The time when the job was created. |
Project | String | test48351 | The name of the project. |
OwnerId | String | 123456789098**** | The owner of the resource. |
Definition | Struct | The description of the job. | |
MountPoints | Struct | The information about the mount target. | |
MountPath | String | /home/input/ | The local folder path after mounting. |
Name | String | test | The local file name displayed after mounting. |
FailStrategy | Struct | The failure policy. | |
WaitingTimeout | String | 999 | The waiting time. |
Type | String | Batch | The type of the job. |
Volumes | Struct | The information about the mount point. | |
OSS | Struct | Alibaba Cloud Object Storage Service. | |
Bucket | String | bcs-test-zb | The name of the bucket. |
Prefix | String | blender-demo/scenes/splash279 | The name of the folder in the bucket. |
Name | String | test | The name of the file in the bucket. |
Command | String | | The shell command that the job must run. |
Envs | Struct | The environment variables for the job runtime. Customize this parameter as needed. | |
PackageUri | String | oss://bcs-test-zb/daemon_app_fast_test/package/startclient.py | The download URL of the OSS resource. |
Runtimes | Struct | Information about the job runtime. | |
JobQueue | String | cls-0xQ83wAZvGVKCAaTGSU1V69**** | The name of the job queue. |
Labels | Struct | Key-value pairs. Customize this parameter as needed. | |
Resources | Struct | The resources required for the job runtime. | |
memory | String | 1 Gi | The CPU memory. |
cpu | String | 1 | The number of CPUs. |
JobId | String | job-0xQ8VSTpk7HLXyjcdW97EQe**** | The ID of the job. |
Name | String | e2e test | The name of the job. |
Job failed event
The following code shows an example of a job failed event that EventBridge receives.
{
"datacontenttype": "application/json",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2021-01-08T15:25:03.083Asia/Shanghai",
"data": {
"Status": {
"EnqueueTime": "2021-02-07T18:16:29.081610969+08:00",
"State": "Failed",
"CreateTime": "2021-02-07T18:16:29.081610969+08:00"
},
"Project": "test48351",
"OwnerId": "123456789098****",
"Definition": {
"MountPoints": [
{
"MountPath": "/home/input/",
"Name": "test"
}
],
"FailStrategy": {
"WaitingTimeout": 999
},
"Type": "Batch",
"Volumes": [
{
"OSS": {
"Bucket": "bcs-test-zb",
"Prefix": "blender-demo/scenes/splash279"
},
"Name": "test"
}
],
"Command": [
"python",
"startclient.py",
"invoke",
"{"action": "Convert", "parameters": "{\\"widthPixel\\": \\"256\\", \\"heightPixel\\": \\"256\\", \\"inputUri\\": \\"oss://bcs-test-zb/daemon_app_fast_test/input/sample2.jpg\\", \\"outputUri\\": \\"oss://bcs-test-zb/daemon_app_fast_test/output/\\"}", "requestid": "e419e112-9795-4f6d-a724-438f54ce****"}"
],
"Envs": {
},
"PackageUri": "oss://bcs-test-zb/daemon_app_fast_test/package/startclient.py",
"Runtimes": {
"JobQueue": "cls-0xQ83wAZvGVKCAaTGSU1V69****"
},
"Labels": {
},
"Resources": {
"memory": "1Gi",
"cpu": "1"
}
},
"JobId": "job-0xQ8VSTpk7HLXyjcdW97EQe****",
"Name": "e2e test"
},
"subject": "acs:batchcompute:cn-hangzhou:123456789098****:test48351/job-0w1JZb8SZ1DEsKbfP99T69t****",
"specversion": "1.0",
"aliyuneventbusname": "default",
"id": "2BF-0w33xE0ZMwZJCh7aat7lEIM****",
"source": "acs.batchcompute",
"time": "2021-01-08T15:25:03Z",
"type": "batchcompute:JobStateChange:JobFailed",
"aliyunpublishaddr": "172.20.XX.XX"
}The following table describes the parameters in the data field.
Parameter | Type | Example | Description |
Status | Struct | The status information of the job. | |
EnqueueTime | String | 2021-02-07T18:16:29.081610969+08:00 | The time when the job was enqueued. |
State | String | Failed | The status of the job. |
CreateTime | String | 2021-02-07T18:16:29.081610969+08:00 | The time when the job was created. |
Project | String | test48351 | The name of the project. |
OwnerId | String | 123456789098**** | The owner of the resource. |
Definition | Struct | The description of the job. | |
MountPoints | Struct | The information about the mount target. | |
MountPath | String | /home/input/ | The local folder path after mounting. |
Name | String | test | The local file name displayed after mounting. |
FailStrategy | Struct | The failure policy. | |
WaitingTimeout | String | 999 | The waiting time. |
Type | String | Batch | The type of the job. |
Volumes | Struct | The information about the mount point. | |
OSS | Struct | Alibaba Cloud Object Storage Service. | |
Bucket | String | bcs-test-zb | The name of the bucket. |
Prefix | String | blender-demo/scenes/splash279 | The name of the folder in the bucket. |
Name | String | test | The name of the file in the bucket. |
Command | String | | The shell command that the job must run. |
Envs | Struct | The environment variables for the job runtime. Customize this parameter as needed. | |
PackageUri | String | oss://bcs-test-zb/daemon_app_fast_test/package/startclient.py | The download URL of the OSS resource. |
Runtimes | Struct | Information about the job runtime. | |
JobQueue | String | cls-0xQ83wAZvGVKCAaTGSU1V69**** | The name of the job queue. |
Labels | Struct | Key-value pairs. Customize this parameter as needed. | |
Resources | Struct | The resources required for the job runtime. | |
memory | String | 1 Gi | The CPU memory. |
cpu | String | 1 | The number of CPUs. |
JobId | String | job-0xQ8VSTpk7HLXyjcdW97EQe**** | The ID of the job. |
Name | String | e2e test | The name of the job. |
Job running event
The following code shows an example of a job running event that EventBridge receives.
{
"datacontenttype": "application/json",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2021-01-08T15:25:03.083Asia/Shanghai",
"data": {
"Status": {
"EnqueueTime": "2021-02-07T18:16:29.081610969+08:00",
"State": "Running",
"CreateTime": "2021-02-07T18:16:29.081610969+08:00"
},
"Project": "test48351",
"OwnerId": "123456789098****",
"Definition": {
"MountPoints": [
{
"MountPath": "/home/input/",
"Name": "test"
}
],
"FailStrategy": {
"WaitingTimeout": 999
},
"Type": "Batch",
"Volumes": [
{
"OSS": {
"Bucket": "bcs-test-zb",
"Prefix": "blender-demo/scenes/splash279"
},
"Name": "test"
}
],
"Command": [
"python",
"startclient.py",
"invoke",
"{"action": "Convert", "parameters": "{\\"widthPixel\\": \\"256\\", \\"heightPixel\\": \\"256\\", \\"inputUri\\": \\"oss://bcs-test-zb/daemon_app_fast_test/input/sample2.jpg\\", \\"outputUri\\": \\"oss://bcs-test-zb/daemon_app_fast_test/output/\\"}", "requestid": "e419e112-9795-4f6d-a724-438f54ce****"}"
],
"Envs": {
},
"PackageUri": "oss://bcs-test-zb/daemon_app_fast_test/package/startclient.py",
"Runtimes": {
"JobQueue": "cls-0xQ83wAZvGVKCAaTGSU1V69****"
},
"Labels": {
},
"Resources": {
"memory": "1Gi",
"cpu": "1"
}
},
"JobId": "job-0xQ8VSTpk7HLXyjcdW97EQeQ****",
"Name": "e2e test"
},
"subject": "acs:batchcompute:cn-hangzhou:123456789098****:test48351/job-0w1JZb8SZ1DEsKbfP99T69t****",
"specversion": "1.0",
"aliyuneventbusname": "default",
"id": "2BF-0w33xE0ZMwZJCh7aat7lEIMP****",
"source": "acs.batchcompute",
"time": "2021-01-08T15:25:03Z",
"type": "batchcompute:JobStateChange:JobRunning",
"aliyunpublishaddr": "172.20.XX.XX"
}The following table describes the parameters in the data field.
Parameter | Type | Example | Description |
Status | Struct | The status information of the job. | |
EnqueueTime | String | 2021-02-07T18:16:29.081610969+08:00 | The time when the job was enqueued. |
State | String | Running | The status of the job. |
CreateTime | String | 2021-02-07T18:16:29.081610969+08:00 | The time when the job was created. |
Project | String | test48351 | The name of the project. |
OwnerId | String | 123456789098**** | The owner of the resource. |
Definition | Struct | The description of the job. | |
MountPoints | Struct | The information about the mount target. | |
MountPath | String | /home/input/ | The local folder path after mounting. |
Name | String | test | The local file name displayed after mounting. |
FailStrategy | Struct | The failure policy. | |
WaitingTimeout | String | 999 | The waiting time. |
Type | String | Batch | The type of the job. |
Volumes | Struct | The information about the mount point. | |
OSS | Struct | Alibaba Cloud Object Storage Service. | |
Bucket | String | bcs-test-zb | The name of the bucket. |
Prefix | String | blender-demo/scenes/splash279 | The name of the folder in the bucket. |
Name | String | test | The name of the file in the bucket. |
Command | String | | The shell command that the job must run. |
Envs | Struct | The environment variables for the job runtime. Customize this parameter as needed. | |
PackageUri | String | oss://bcs-test-zb/daemon_app_fast_test/package/startclient.py | The download URL of the OSS resource. |
Runtimes | Struct | Information about the job runtime. | |
JobQueue | String | cls-0xQ83wAZvGVKCAaTGSU1V69**** | The name of the job queue. |
Labels | Struct | Key-value pairs. Customize this parameter as needed. | |
Resources | Struct | The resources required for the job runtime. | |
memory | String | 1 Gi | The CPU memory. |
cpu | String | 1 | The number of CPUs. |
JobId | String | job-0xQ8VSTpk7HLXyjcdW97EQe**** | The ID of the job. |
Name | String | e2e test | The name of the job. |
Job succeeded event
The following code shows an example of a job succeeded event that EventBridge receives.
{
"datacontenttype":"application/json",
"aliyunaccountid":"123456789098****",
"aliyunpublishtime":"2021-01-08T15:25:03.083Asia/Shanghai",
"data":{
"Status":{
"EnqueueTime":"2021-02-07T18:16:29.081610969+08:00",
"State":"Succeeded",
"CreateTime":"2021-02-07T18:16:29.081610969+08:00"
},
"Project":"test48351",
"OwnerId":"123456789098****",
"Definition":{
"MountPoints":[
{
"MountPath":"/home/input/",
"Name":"test"
}
],
"FailStrategy":{
"WaitingTimeout":999
},
"Type":"Batch",
"Volumes":[
{
"OSS":{
"Bucket":"bcs-test-zb",
"Prefix":"blender-demo/scenes/splash279"
},
"Name":"test"
}
],
"Command":[
"python",
"startclient.py",
"invoke",
"{"action": "Convert", "parameters": "{\"widthPixel\": \"256\", \"heightPixel\": \"256\", \"inputUri\": \"oss://bcs-test-zb/daemon_app_fast_test/input/sample2.jpg\", \"outputUri\": \"oss://bcs-test-zb/daemon_app_fast_test/output/\"}", "requestid": "e419e112-9795-4f6d-a724-438f54ce****"}"
],
"Envs":{
},
"PackageUri":"oss://bcs-test-zb/daemon_app_fast_test/package/startclient.py",
"Runtimes":{
"JobQueue":"cls-0xQ83wAZvGVKCAaTGSU1V69****"
},
"Labels":{
},
"Resources":{
"memory":"1Gi",
"cpu":"1"
}
},
"JobId":"job-0xQ8VSTpk7HLXyjcdW97EQe****",
"Name":"e2e test"
},
"subject":"acs:batchcompute:cn-hangzhou:123456789098****:test48351/job-0w1JZb8SZ1DEsKbfP99T69t****",
"specversion":"1.0",
"aliyuneventbusname":"default",
"id":"2BF-0w33xE0ZMwZJCh7aat7lEIM****",
"source":"acs.batchcompute",
"time":"2021-01-08T15:25:03Z",
"type":"batchcompute:JobStateChange:JobSucceeded",
"aliyunpublishaddr":"172.20.XX.XX"
}The following table describes the parameters in the data field.
Parameter | Type | Example Value | Description |
Status | Struct | The status information of the job. | |
EnqueueTime | String | 2021-02-07T18:16:29.081610969+08:00 | The time when the job was enqueued. |
State | String | Succeeded | The status of the job. |
CreateTime | String | 2021-02-07T18:16:29.081610969+08:00 | The time when the job was created. |
Project | String | test48351 | The name of the project. |
OwnerId | String | 123456789098**** | The owner of the resource. |
Definition | Struct | The description of the job. | |
MountPoints | Struct | The information about the mount target. | |
MountPath | String | /home/input/ | The local folder path after mounting. |
Name | String | test | The local file name displayed after mounting. |
FailStrategy | Struct | The failure policy. | |
WaitingTimeout | String | 999 | The waiting time. |
Type | String | Batch | The type of the job. |
Volumes | Struct | The information about the mount point. | |
OSS | Struct | Alibaba Cloud Object Storage Service. | |
Bucket | String | bcs-test-zb | The name of the bucket. |
Prefix | String | blender-demo/scenes/splash279 | The name of the folder in the bucket. |
Name | String | test | The name of the file in the bucket. |
Command | String | | The shell command that the job must run. |
Envs | Struct | The environment variables for the job runtime. Customize this parameter as needed. | |
PackageUri | String | oss://bcs-test-zb/daemon_app_fast_test/package/startclient.py | The download URL of the OSS resource. |
Runtimes | Struct | Information about the job runtime. | |
JobQueue | String | cls-0xQ83wAZvGVKCAaTGSU1V69**** | The name of the job queue. |
Labels | Struct | Key-value pairs. Customize this parameter as needed. | |
Resources | Struct | The resources required for the job runtime. | |
memory | String | 1 Gi | The CPU memory. |
cpu | String | 1 | The number of CPUs. |
JobId | String | job-0xQ8VSTpk7HLXyjcdW97EQe**** | The ID of the job. |
Name | String | e2e test | The name of the job. |
Job waiting event
The following code shows an example of a job waiting event that EventBridge receives.
{
"datacontenttype": "application/json",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2021-01-08T15:34:50.982Asia/Shanghai",
"data": {
"Status": {
"EnqueueTime": "2021-02-07T18:16:29.081610969+08:00",
"State": "Waiting",
"CreateTime": "2021-02-07T18:16:29.081610969+08:00"
},
"Project": "test48351",
"OwnerId": "123456789098****",
"Definition": {
"MountPoints": [
{
"MountPath": "/home/input/",
"Name": "test"
}
],
"FailStrategy": {
"WaitingTimeout": 999
},
"Type": "Batch",
"Volumes": [
{
"OSS": {
"Bucket": "bcs-test-zb",
"Prefix": "blender-demo/scenes/splash279"
},
"Name": "test"
}
],
"Command": [
"python",
"startclient.py",
"invoke",
"{"action": "Convert", "parameters": "{\\"widthPixel\\": \\"256\\", \\"heightPixel\\": \\"256\\", \\"inputUri\\": \\"oss://bcs-test-zb/daemon_app_fast_test/input/sample2.jpg\\", \\"outputUri\\": \\"oss://bcs-test-zb/daemon_app_fast_test/output/\\"}", "requestid": "e419e112-9795-4f6d-a724-438f54ce****"}"
],
"Envs": {
},
"PackageUri": "oss://bcs-test-zb/daemon_app_fast_test/package/startclient.py",
"Runtimes": {
"JobQueue": "cls-0xQ83wAZvGVKCAaTGSU1V69****"
},
"Labels": {
},
"Resources": {
"memory": "1Gi",
"cpu": "1"
}
},
"JobId": "job-0xQ8VSTpk7HLXyjcdW97EQe****",
"Name": "e2e test"
},
"subject": "acs:batchcompute:cn-hangzhou:123456789098****:test48351/job-0w1K9Hswhm8PyHlr3ZkWxWS****",
"specversion": "1.0",
"aliyuneventbusname": "default",
"id": "286-0w358zXmKWQR4go51hyvAGU****",
"source": "acs.batchcompute",
"time": "2021-01-08T15:34:50Z",
"type": "batchcompute:JobStateChange:JobWaiting",
"aliyunpublishaddr": "172.20.XX.XX"
}The following table describes the parameters in the data field.
Parameter | Type | Example | Description |
Status | Struct | The status information of the job. | |
EnqueueTime | String | 2021-02-07T18:16:29.081610969+08:00 | The time when the job was enqueued. |
State | String | Waiting | The status of the job. |
CreateTime | String | 2021-02-07T18:16:29.081610969+08:00 | The time when the job was created. |
Project | String | test48351 | The name of the project. |
OwnerId | String | 123456789098**** | The owner of the resource. |
Definition | Struct | The description of the job. | |
MountPoints | Struct | The information about the mount target. | |
MountPath | String | /home/input/ | The local folder path after mounting. |
Name | String | test | The local file name displayed after mounting. |
FailStrategy | Struct | The failure policy. | |
WaitingTimeout | String | 999 | The waiting time. |
Type | String | Batch | The type of the job. |
Volumes | Struct | The information about the mount point. | |
OSS | Struct | Alibaba Cloud Object Storage Service. | |
Bucket | String | bcs-test-zb | The name of the bucket. |
Prefix | String | blender-demo/scenes/splash279 | The name of the folder in the bucket. |
Name | String | test | The name of the file in the bucket. |
Command | String | | The shell command that the job must run. |
Envs | Struct | The environment variables for the job runtime. Customize this parameter as needed. | |
PackageUri | String | oss://bcs-test-zb/daemon_app_fast_test/package/startclient.py | The download URL of the OSS resource. |
Runtimes | Struct | Information about the job runtime. | |
JobQueue | String | cls-0xQ83wAZvGVKCAaTGSU1V69**** | The name of the job queue. |
Labels | Struct | Key-value pairs. Customize this parameter as needed. | |
Resources | Struct | The resources required for the job runtime. | |
memory | String | 1 Gi | The CPU memory. |
cpu | String | 1 | The number of CPUs. |
JobId | String | job-0xQ8VSTpk7HLXyjcdW97EQe**** | The ID of the job. |
Name | String | e2e test | The name of the job. |