View a markdown version of this page

CancelJob - Amazon Location Service

CancelJob

CancelJob cancels a job that is currently running or pending. If the job is already in a terminal state (Completed, Failed, or Cancelled), the operation returns successfully with the current status.

For more information, see Job concepts in the Amazon Location Service Developer Guide.

Request Syntax

POST /metadata/v0/jobs/cancel-job HTTP/1.1 Content-type: application/json { "JobId": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

JobId

The unique identifier of the job to cancel.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 200.

Pattern: [-._\w]+

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "JobArn": "string", "JobId": "string", "Status": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

JobArn

Amazon Resource Name (ARN) of the cancelled job.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1600.

Pattern: arn(:[a-z0-9]+([.-][a-z0-9]+)*):geo(:([a-z0-9]+([.-][a-z0-9]+)*))(:[0-9]+):((\*)|([-a-z]+[/][*-._\w]+))

JobId

Unique job identifier.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 200.

Pattern: [-._\w]+

Status

Job status after cancellation request.

Type: String

Valid Values: Pending | Running | Completed | Failed | Cancelling | Cancelled

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

You don't have sufficient access to perform this action.

HTTP Status Code: 403

InternalServerException

Request processing has failed because of an unknown error, exception or failure.

HTTP Status Code: 500

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 429

ValidationException

The input fails to satisfy the constraints specified by an AWS service.

Note

Input files have a limitation of 10gb per file, and 1gb per Parquet row-group within the file.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: