GetSessionStatusCommand

Gets the current status of a session.

Example Syntax

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

import { AthenaClient, GetSessionStatusCommand } from "@aws-sdk/client-athena"; // ES Modules import
// const { AthenaClient, GetSessionStatusCommand } = require("@aws-sdk/client-athena"); // CommonJS import
const client = new AthenaClient(config);
const input = { // GetSessionStatusRequest
  SessionId: "STRING_VALUE", // required
};
const command = new GetSessionStatusCommand(input);
const response = await client.send(command);
// { // GetSessionStatusResponse
//   SessionId: "STRING_VALUE",
//   Status: { // SessionStatus
//     StartDateTime: new Date("TIMESTAMP"),
//     LastModifiedDateTime: new Date("TIMESTAMP"),
//     EndDateTime: new Date("TIMESTAMP"),
//     IdleSinceDateTime: new Date("TIMESTAMP"),
//     State: "CREATING" || "CREATED" || "IDLE" || "BUSY" || "TERMINATING" || "TERMINATED" || "DEGRADED" || "FAILED",
//     StateChangeReason: "STRING_VALUE",
//   },
// };

GetSessionStatusCommand Input

See GetSessionStatusCommandInput for more details

Parameter
Type
Description
SessionId
Required
string | undefined

The session ID.

GetSessionStatusCommand Output

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

The session ID.

Status
SessionStatus | undefined

Contains information about the status of the session.

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.