ListStatementsCommand

Lists statements for the session.

Example Syntax

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

import { GlueClient, ListStatementsCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, ListStatementsCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // ListStatementsRequest
  SessionId: "STRING_VALUE", // required
  RequestOrigin: "STRING_VALUE",
  NextToken: "STRING_VALUE",
};
const command = new ListStatementsCommand(input);
const response = await client.send(command);
// { // ListStatementsResponse
//   Statements: [ // StatementList
//     { // Statement
//       Id: Number("int"),
//       Code: "STRING_VALUE",
//       State: "WAITING" || "RUNNING" || "AVAILABLE" || "CANCELLING" || "CANCELLED" || "ERROR",
//       Output: { // StatementOutput
//         Data: { // StatementOutputData
//           TextPlain: "STRING_VALUE",
//         },
//         ExecutionCount: Number("int"),
//         Status: "WAITING" || "RUNNING" || "AVAILABLE" || "CANCELLING" || "CANCELLED" || "ERROR",
//         ErrorName: "STRING_VALUE",
//         ErrorValue: "STRING_VALUE",
//         Traceback: [ // OrchestrationStringList
//           "STRING_VALUE",
//         ],
//       },
//       Progress: Number("double"),
//       StartedOn: Number("long"),
//       CompletedOn: Number("long"),
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListStatementsCommand Input

See ListStatementsCommandInput for more details

Parameter
Type
Description
SessionId
Required
string | undefined

The Session ID of the statements.

NextToken
string | undefined

A continuation token, if this is a continuation call.

RequestOrigin
string | undefined

The origin of the request to list statements.

ListStatementsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
NextToken
string | undefined

A continuation token, if not all statements have yet been returned.

Statements
Statement[] | undefined

Returns the list of statements.

Throws

Name
Fault
Details
AccessDeniedException
client

Access to a resource was denied.

EntityNotFoundException
client

A specified entity does not exist

IllegalSessionStateException
client

The session is in an invalid state to perform a requested operation.

InternalServiceException
server

An internal service error occurred.

InvalidInputException
client

The input provided was not valid.

OperationTimeoutException
client

The operation timed out.

GlueServiceException
Base exception class for all service exceptions from Glue service.