You can call the UpdateJobStatus operation to update the status of a specified batch operation job.
Permissions
An Alibaba Cloud account has all permissions by default. However, Resource Access Management (RAM) users and RAM roles do not have any permissions by default. The Alibaba Cloud account or an administrator must grant permissions for this operation using 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: SignatureValueRequest parameters
Name | Type | Required | Example | Description |
batchJobId | string | Yes | MzRjZGU2NGQ3YTY5NGRhMTkxZmZhYzY5OTM5YTcxYWU= | The ID of the batch operation job. 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 status to which you want to update the job. The status update 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. This parameter is optional if 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>