Queries batch processing tasks. You can filter results by task tag and status, and sort the results.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:ListBatches |
list |
*Batch
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
|
test-project |
| State |
string |
No |
The task status.
|
Succeed |
| Sort |
string |
No |
The sort field. Valid values:
|
2020-11-11T06:51:17.5Z |
| Order |
string |
No |
The sort order.
|
ASC |
| TagSelector |
string |
No |
The custom tag used to filter tasks. |
test=val1 |
| NextToken |
string |
No |
The pagination token. If the total number of results exceeds the MaxResults value, pass this token in the next request to retrieve additional results. Results are returned in lexicographic order after the token value. Leave this parameter empty for your initial request. |
MTIzNDU2Nzg6aW1tdGVzdDpleGFtcGxlYnVja2V0OmRhdGFzZXQwMDE6b3NzOi8vZXhhbXBsZWJ1Y2tldC9zYW1wbGVvYmplY3QxLmpwZw== |
| MaxResults |
integer |
No |
The maximum number of results to return. Valid values: 0 to 100. Default value: 100. A value of 0 returns the default of 100 results. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Batches |
array |
The batch processing tasks. |
|
| DataIngestion |
The information about the batch processing task. |
||
| NextToken |
string |
The pagination token. If the total number of results exceeds the MaxResults value, pass this token in the next request to retrieve additional results. Results are returned in lexicographic order after the token value. |
MTIzNDU2Nzg6aW1tdGVzdDpleGFtcGxlYnVja2V0OmRhdGFzZXQwMDE6b3NzOi8vZXhhbXBsZWJ1Y2tldC9zYW1wbGVvYmplY3QxLmpw**** |
| RequestId |
string |
The request ID. |
FEDC9B1F-30F2-4C1F-8ED2-B7860187**** |
Examples
Success response
JSON format
{
"Batches": [
{
"Id": "trigger-9f72636a-0f0c-4baf-ae78-38b27bfe****",
"Input": {
"OSS": {
"Bucket": "test-bucket",
"Prefix": "test-object",
"MatchExpressions": [
"key prefix (abc)"
]
}
},
"Actions": [
{
"Name": "doc/convert",
"Parameters": [
"pages=3"
],
"FastFailPolicy": {
"Action": "abort"
}
}
],
"Notification": {
"Endpoint": "http://1111111111.mns.cn-hangzhou.aliyuncs.com",
"Topic": "topic1",
"MNS": {
"TopicName": "topic1",
"Endpoint": "http://1111111111.mns.cn-hangzhou.aliyuncs.com"
},
"RocketMQ": {
"Endpoint": "http://11111111111.mqrest.cn-hangzhou.aliyuncs.com",
"TopicName": "topic1",
"InstanceId": "MQ_INST_11111111111_BYcNy2Nc"
}
},
"Statistic": {
"SubmitSuccess": 10,
"SubmitFailure": 1,
"SkipFiles": 0
},
"State": "Succeeded",
"Marker": "MTIzNDU2Nzg6aW1tdGVzdDpleGFtcGxlYnVja2V0OmRhdGFzZXQwMDE6b3NzOi8vZXhhbXBsZWJ1Y2tldC9zYW1wbGVvYmplY3QxLmpw****",
"CreateTime": "2020-11-10T03:50:28Z",
"UpdateTime": "2021-12-18T07:40:29Z",
"Tags": {
"test": "test",
"test2": 1
},
"Error": "api returns error: SDKError: StatusCode: 404 Code: ResourceNotFound",
"Phase": "IncrementalScanning",
"ServiceRole": "AliyunIMMBatchTriggerRole"
}
],
"NextToken": "MTIzNDU2Nzg6aW1tdGVzdDpleGFtcGxlYnVja2V0OmRhdGFzZXQwMDE6b3NzOi8vZXhhbXBsZWJ1Y2tldC9zYW1wbGVvYmplY3QxLmpw****",
"RequestId": "FEDC9B1F-30F2-4C1F-8ED2-B7860187****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.