- 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.
GetQueryStateCommand
Returns the state of a query previously submitted. Clients are expected to poll GetQueryState
to monitor the current state of the planning before retrieving the work units. A query state is only visible to the principal that made the initial call to StartQueryPlanning
.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { LakeFormationClient, GetQueryStateCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import
// const { LakeFormationClient, GetQueryStateCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import
const client = new LakeFormationClient(config);
const input = { // GetQueryStateRequest
QueryId: "STRING_VALUE", // required
};
const command = new GetQueryStateCommand(input);
const response = await client.send(command);
// { // GetQueryStateResponse
// Error: "STRING_VALUE",
// State: "PENDING" || "WORKUNITS_AVAILABLE" || "ERROR" || "FINISHED" || "EXPIRED", // required
// };
GetQueryStateCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
QueryId Required | string | undefined | The ID of the plan query operation. |
GetQueryStateCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
State Required | QueryStateString | undefined | The state of a query previously submitted. The possible states are:
|
Error | string | undefined | An error message when the operation fails. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | Access to a resource was denied. |
InternalServiceException | server | An internal service error occurred. |
InvalidInputException | client | The input provided was not valid. |
LakeFormationServiceException | Base exception class for all service exceptions from LakeFormation service. |