AWS AmazonS3 documentation change
Summary
Replaced Java SDK code example with a link to API reference documentation for updating job status
Security assessment
This is a documentation restructuring to reduce code duplication. No security-related content was added or modified beyond general job management functionality.
Diff
diff --git a/AmazonS3/latest/userguide/batch-ops-job-status.md b/AmazonS3/latest/userguide/batch-ops-job-status.md index 3caba982c..57cac8ec2 100644 --- a//AmazonS3/latest/userguide/batch-ops-job-status.md +++ b//AmazonS3/latest/userguide/batch-ops-job-status.md @@ -75,45 +75 @@ To use the following example commands, replace the ``user input placeholders`` w -The following example updates the status of an S3 Batch Operations job by using the AWS SDK for Java. - -For more information about job status, see [Tracking job status and completion reports](./batch-ops-job-status.html). - - - package aws.example.s3control; - - - import com.amazonaws.AmazonServiceException; - import com.amazonaws.SdkClientException; - import com.amazonaws.auth.profile.ProfileCredentialsProvider; - import com.amazonaws.services.s3control.AWSS3Control; - import com.amazonaws.services.s3control.AWSS3ControlClient; - import com.amazonaws.services.s3control.model.UpdateJobStatusRequest; - - import static com.amazonaws.regions.Regions.US_WEST_2; - - public class UpdateJobStatus { - public static void main(String[] args) { - String accountId = "Account ID"; - String jobId = "00e123a4-c0d8-41f4-a0eb-b46f9ba5b07c"; - - try { - AWSS3Control s3ControlClient = AWSS3ControlClient.builder() - .withCredentials(new ProfileCredentialsProvider()) - .withRegion(US_WEST_2) - .build(); - - s3ControlClient.updateJobStatus(new UpdateJobStatusRequest() - .withAccountId(accountId) - .withJobId(jobId) - .withRequestedJobStatus("Ready")); - - } catch (AmazonServiceException e) { - // The call was transmitted successfully, but Amazon S3 couldn't process - // it and returned an error response. - e.printStackTrace(); - } catch (SdkClientException e) { - // Amazon S3 couldn't be contacted for a response, or the client - // couldn't parse the response from Amazon S3. - e.printStackTrace(); - } - } - } - +For examples of how to update job status with the AWS SDK for Java, see [Update the status of a batch job](https://docs.aws.amazon.com/AmazonS3/latest/API/s3-control_example_s3-control_UpdateJobStatus_section.html) in the _Amazon S3 API Reference_.