Use UpdateJobStatus
with an AWS SDK or CLI
The following code examples show how to use UpdateJobStatus
.
Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code example:
- AWS CLI
-
To update the status of an Amazon S3 batch operations job
The following
update-job-status
example cancels the specified job which is awaiting approval.aws s3control update-job-status \ --account-id
123456789012
\ --job-id8d9a18fe-c303-4d39-8ccc-860d372da386
\ --requested-job-statusCancelled
Output:
{ "Status": "Cancelled", "JobId": "8d9a18fe-c303-4d39-8ccc-860d372da386" }
The following
update-job-status
example confirms and runs the specified which is awaiting approval.aws s3control update-job-status \ --account-id
123456789012
\ --job-id5782949f-3301-4fb3-be34-8d5bab54dbca
\ --requested-job-statusReady
Output::
{
"Status": "Ready", "JobId":"5782949f-3301-4fb3-be34-8d5bab54dbca"
}
The following
update-job-status
example cancels the specified job which is running.aws s3control update-job-status \ --account-id 123456789012 \ --job-id 5782949f-3301-4fb3-be34-8d5bab54dbca \ --requested-job-status Cancelled Output:: { "Status": "Cancelling", "JobId": "5782949f-3301-4fb3-be34-8d5bab54dbca" }
-
For API details, see UpdateJobStatus
in AWS CLI Command Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Developing with Amazon S3 using the AWS SDKs. This topic also includes information about getting started and details about previous SDK versions.