All Products
Search
Document Center

Intelligent Media Management:ListBatches

Last Updated:Dec 11, 2024

Queries batch processing tasks. You can query batch processing tasks based on conditions such task tags and status. The results can be sorted.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
imm:ListBatcheslist
*Batch
acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}/batch/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectNamestringYes

The name of the project.

test-project
StatestringNo

The task status.

  • Ready: The task is newly created and ready.
  • Running: The task is running.
  • Failed: The task failed and cannot be automatically recovered.
  • Suspended: The task is suspended.
  • Succeeded: The task is successful.
Succeed
SortstringNo

The sort field. Valid values:

  • CreateTime
  • UpdateTime
2020-11-11T06:51:17.5Z
OrderstringNo

The sort order. Valid values:

  • ASC: sorts the results in ascending order. This is the default sort order.
  • DES: sorts the results in descending order.
ASC
TagSelectorstringNo

The custom tag. You can use this parameter to query tasks that have the specified tag.

test=val1
NextTokenstringNo

The pagination token.

The pagination token is used in the next request to retrieve a new page of results if the total number of results exceeds the value of the MaxResults parameter. The next call to the operation returns results lexicographically after the NextToken parameter value.

You do not need to specify this parameter in your initial request.

MTIzNDU2Nzg6aW1tdGVzdDpleGFtcGxlYnVja2V0OmRhdGFzZXQwMDE6b3NzOi8vZXhhbXBsZWJ1Y2tldC9zYW1wbGVvYmplY3QxLmpwZw==
MaxResultsintegerNo

The maximum number of results to return. Valid values: 0 to 100.

If you do not specify this parameter or set the parameter to 0, the default value of 100 is used.

10

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

Batchesarray

The batch processing tasks.

BatchesDataIngestion

The information about the batch processing task.

NextTokenstring

The pagination token.

The pagination token is used in the next request to retrieve a new page of results if the total number of results exceeds the value of the MaxResults parameter. The next call to the operation returns results lexicographically after the NextToken parameter value.

MTIzNDU2Nzg6aW1tdGVzdDpleGFtcGxlYnVja2V0OmRhdGFzZXQwMDE6b3NzOi8vZXhhbXBsZWJ1Y2tldC9zYW1wbGVvYmplY3QxLmpw****
RequestIdstring

The request ID.

FEDC9B1F-30F2-4C1F-8ED2-B7860187****

Examples

Sample success responses

JSONformat

{
  "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

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history