ListCalculationExecutionsCommand

Lists the calculations that have been submitted to a session in descending order. Newer calculations are listed first; older calculations are listed later.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { AthenaClient, ListCalculationExecutionsCommand } from "@aws-sdk/client-athena"; // ES Modules import
// const { AthenaClient, ListCalculationExecutionsCommand } = require("@aws-sdk/client-athena"); // CommonJS import
const client = new AthenaClient(config);
const input = { // ListCalculationExecutionsRequest
  SessionId: "STRING_VALUE", // required
  StateFilter: "CREATING" || "CREATED" || "QUEUED" || "RUNNING" || "CANCELING" || "CANCELED" || "COMPLETED" || "FAILED",
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new ListCalculationExecutionsCommand(input);
const response = await client.send(command);
// { // ListCalculationExecutionsResponse
//   NextToken: "STRING_VALUE",
//   Calculations: [ // CalculationsList
//     { // CalculationSummary
//       CalculationExecutionId: "STRING_VALUE",
//       Description: "STRING_VALUE",
//       Status: { // CalculationStatus
//         SubmissionDateTime: new Date("TIMESTAMP"),
//         CompletionDateTime: new Date("TIMESTAMP"),
//         State: "CREATING" || "CREATED" || "QUEUED" || "RUNNING" || "CANCELING" || "CANCELED" || "COMPLETED" || "FAILED",
//         StateChangeReason: "STRING_VALUE",
//       },
//     },
//   ],
// };

ListCalculationExecutionsCommand Input

Parameter
Type
Description
SessionId
Required
string | undefined

The session ID.

MaxResults
number | undefined

The maximum number of calculation executions to return.

NextToken
string | undefined

A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

StateFilter
CalculationExecutionState | undefined

A filter for a specific calculation execution state. A description of each state follows.

CREATING - The calculation is in the process of being created.

CREATED - The calculation has been created and is ready to run.

QUEUED - The calculation has been queued for processing.

RUNNING - The calculation is running.

CANCELING - A request to cancel the calculation has been received and the system is working to stop it.

CANCELED - The calculation is no longer running as the result of a cancel request.

COMPLETED - The calculation has completed without error.

FAILED - The calculation failed and is no longer running.

ListCalculationExecutionsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Calculations
CalculationSummary[] | undefined

A list of CalculationSummary objects.

NextToken
string | undefined

A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

Throws

Name
Fault
Details
InternalServerException
server

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException
client

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException
client

A resource, such as a workgroup, was not found.

AthenaServiceException
Base exception class for all service exceptions from Athena service.