Updates the status of a specified batch operation job.
Permissions
Alibaba Cloud accounts have all permissions by default. RAM users and RAM roles have no permissions by default and must be granted access through a RAM policy or a bucket policy.
|
API |
Action |
Description |
|
UpdateJobStatus |
|
Updates the status of a batch operation job. |
Request syntax
POST /?batchJobStatus&batchJobId=xx&requestedJobStatus=RequestedJobStatus&statusUpdateReason=StatusUpdateReason HTTP/1.1
Host: oss-cn-hangzhou.aliyuncs.com
Authorization: SignatureValue
Request parameters
|
Name |
Type |
Required |
Example |
Description |
|
batchJobId |
string |
Yes |
MzRjZGU2NGQ3YTY5NGRhMTkxZmZhYzY5OTM5YTcxYWU= |
The batch operation job ID. The ID must be 44 characters in length and can contain lowercase letters (a-z), uppercase letters (A-Z), and digits (0-9). The ID cannot contain hyphens (-) or underscores (_). Parent node: None Child nodes: None |
|
requestedJobStatus |
string |
Yes |
Cancelled |
The target status for the job. This affects the execution flow of the job. Valid values: Parent node: None Child nodes: None |
|
statusUpdateReason |
string |
Optional |
User requested cancellation |
The reason for the status update. Optional when Parent node: None Child nodes: None |
Request headers
This operation uses only common request headers. For more information, see Common request headers.
Response elements
|
Name |
Type |
Example |
Description |
|
UpdateJobStatusResult |
Container |
None |
The root node of the response. Parent node: None Child nodes: JobId, Status, and StatusUpdateReason |
|
JobId |
string |
MzRjZGU2NGQ3YTY5NGRhMTkxZmZhYzY5OTM5YTcxYWU= |
The job ID. Parent node: UpdateJobStatusResult Child nodes: None |
|
Status |
string |
Cancelling |
The updated status of the job. Parent node: UpdateJobStatusResult Child nodes: None |
|
StatusUpdateReason |
string |
User requested cancellation |
The reason for the status update. Parent node: UpdateJobStatusResult Child nodes: None |
Response headers
This operation uses only common response headers. For more information, see Common response headers.
Examples
-
Request example
POST /?batchJobStatus&batchJobId=MzRjZGU2NGQ3YTY5NGRhMTkxZmZhYzY5OTM5YTcxYWU=&requestedJobStatus=Cancelled&statusUpdateReason=User%20requested%20cancellation HTTP/1.1 Host: oss-cn-hangzhou.aliyuncs.com Authorization: OSS LTAI4Fw2Nb3o4f5a3a1f****:2s98lj9n796c9kdc6b5f4l5b**** -
Response example
HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <UpdateJobStatusResult> <JobId>MzRjZGU2NGQ3YTY5NGRhMTkxZmZhYzY5OTM5YTcxYWU=</JobId> <Status>Cancelling</Status> <StatusUpdateReason>User requested cancellation</StatusUpdateReason> </UpdateJobStatusResult>