---
title: "POST /#X-Amz-Target=AmazonAthena.StopCalculationExecution"
method: POST
path: "/#X-Amz-Target=AmazonAthena.StopCalculationExecution"
---

# POST /#X-Amz-Target=AmazonAthena.StopCalculationExecution

`POST /#X-Amz-Target=AmazonAthena.StopCalculationExecution`

Requests the cancellation of a calculation. A `StopCalculationExecution` call on a calculation that is already in a terminal state (for example, `STOPPED`, `FAILED`, or `COMPLETED`) succeeds but has no effect.

Cancelling a calculation is done on a best effort basis. If a calculation cannot be cancelled, you can be charged for its completion. If you are concerned about being charged for a calculation that cannot be cancelled, consider terminating the session in which the calculation is running.

## Headers

- `X-Amz-Target` 'AmazonAthena.StopCalculationExecution', required

## Request body

- StopCalculationExecutionRequest
  - `CalculationExecutionId` string, required — The calculation execution UUID.

## Response `200`

Success

- StopCalculationExecutionResponse
  - `State` 'CREATING' | 'CREATED' | 'QUEUED' | 'RUNNING' | 'CANCELING' | 'CANCELED' | 'COMPLETED' | 'FAILED' — <p> <code>CREATING</code> - The calculation is in the process of being created.</p> <p> <code>CREATED</code> - The calculation has been created and is ready to run.</p> <p> <code>QUEUED</code> - The calculation has been queued for processing.</p> <p> <code>RUNNING</code> - The calculation is running.</p> <p> <code>CANCELING</code> - A request to cancel the calculation has been received and the system is working to stop it.</p> <p> <code>CANCELED</code> - The calculation is no longer running as the result of a cancel request.</p> <p> <code>COMPLETED</code> - The calculation has completed without error.</p> <p> <code>FAILED</code> - The calculation failed and is no longer running.</p>

## Other responses

- `480` — InternalServerException
- `481` — InvalidRequestException
- `482` — ResourceNotFoundException

---

[API](https://skmtc.net/aws/apis/athena.md) · [All operations](https://skmtc.net/aws/apis/athena/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/athena/versions/0aec8c61283d/schema)
