- 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.
GetWorkUnitsCommand
Retrieves the work units generated by the StartQueryPlanning
operation.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { LakeFormationClient, GetWorkUnitsCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import
// const { LakeFormationClient, GetWorkUnitsCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import
const client = new LakeFormationClient(config);
const input = { // GetWorkUnitsRequest
NextToken: "STRING_VALUE",
PageSize: Number("int"),
QueryId: "STRING_VALUE", // required
};
const command = new GetWorkUnitsCommand(input);
const response = await client.send(command);
// { // GetWorkUnitsResponse
// NextToken: "STRING_VALUE",
// QueryId: "STRING_VALUE", // required
// WorkUnitRanges: [ // WorkUnitRangeList // required
// { // WorkUnitRange
// WorkUnitIdMax: Number("long"), // required
// WorkUnitIdMin: Number("long"), // required
// WorkUnitToken: "STRING_VALUE", // required
// },
// ],
// };
GetWorkUnitsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
QueryId Required | string | undefined | The ID of the plan query operation. |
NextToken | string | undefined | A continuation token, if this is a continuation call. |
PageSize | number | undefined | The size of each page to get in the Amazon Web Services service call. This does not affect the number of items returned in the command's output. Setting a smaller page size results in more calls to the Amazon Web Services service, retrieving fewer items in each call. This can help prevent the Amazon Web Services service calls from timing out. |
GetWorkUnitsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
QueryId Required | string | undefined | The ID of the plan query operation. |
WorkUnitRanges Required | WorkUnitRange[] | undefined | A |
NextToken | string | undefined | A continuation token for paginating the returned list of tokens, returned if the current segment of the list is not the last. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | Access to a resource was denied. |
ExpiredException | client | Contains details about an error where the query request expired. |
InternalServiceException | server | An internal service error occurred. |
InvalidInputException | client | The input provided was not valid. |
WorkUnitsNotReadyYetException | client | Contains details about an error related to work units not being ready. |
LakeFormationServiceException | Base exception class for all service exceptions from LakeFormation service. |