- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
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 |
---|
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 |
StateFilter | CalculationExecutionState | undefined | A filter for a specific calculation execution state. A description of each state follows. |
ListCalculationExecutionsCommand Output
Parameter | Type | Description |
---|
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 |
Throws
Name | Fault | Details |
---|
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. |