

# GetWorkUnitResults


Returns the work units resulting from the query. Work units can be executed in any order and in parallel. 

## Request Syntax


```
POST /GetWorkUnitResults HTTP/1.1
Content-type: application/json

{
   "QueryId": "string",
   "WorkUnitId": number,
   "WorkUnitToken": "string"
}
```

## URI Request Parameters


The request does not use any URI parameters.

## Request Body


The request accepts the following data in JSON format.

 ** [QueryId](#API_GetWorkUnitResults_RequestSyntax) **   <a name="lakeformation-GetWorkUnitResults-request-QueryId"></a>
The ID of the plan query operation for which to get results.  
Type: String  
Length Constraints: Fixed length of 36.  
Required: Yes

 ** [WorkUnitId](#API_GetWorkUnitResults_RequestSyntax) **   <a name="lakeformation-GetWorkUnitResults-request-WorkUnitId"></a>
The work unit ID for which to get results. Value generated by enumerating `WorkUnitIdMin` to `WorkUnitIdMax` (inclusive) from the `WorkUnitRange` in the output of `GetWorkUnits`.  
Type: Long  
Valid Range: Minimum value of 0.  
Required: Yes

 ** [WorkUnitToken](#API_GetWorkUnitResults_RequestSyntax) **   <a name="lakeformation-GetWorkUnitResults-request-WorkUnitToken"></a>
A work token used to query the execution service. Token output from `GetWorkUnits`.  
Type: String  
Length Constraints: Minimum length of 1.  
Required: Yes

## Response Syntax


```
HTTP/1.1 200

ResultStream
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The response returns the following as the HTTP body.

 ** [ResultStream](#API_GetWorkUnitResults_ResponseSyntax) **   <a name="lakeformation-GetWorkUnitResults-response-ResultStream"></a>
Rows returned from the `GetWorkUnitResults` operation as a stream of Apache Arrow v1.0 messages.

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
Access to a resource was denied.    
 ** Message **   
A message describing the problem.
HTTP Status Code: 403

 ** ExpiredException **   
Contains details about an error where the query request expired.    
 ** Message **   
A message describing the error.
HTTP Status Code: 410

 ** InternalServiceException **   
An internal service error occurred.    
 ** Message **   
A message describing the problem.
HTTP Status Code: 500

 ** InvalidInputException **   
The input provided was not valid.    
 ** Message **   
A message describing the problem.
HTTP Status Code: 400

 ** ThrottledException **   
Contains details about an error where the query request was throttled.    
 ** Message **   
A message describing the error.
HTTP Status Code: 429

## See Also


For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/lakeformation-2017-03-31/GetWorkUnitResults) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/lakeformation-2017-03-31/GetWorkUnitResults) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/lakeformation-2017-03-31/GetWorkUnitResults) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/lakeformation-2017-03-31/GetWorkUnitResults) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/lakeformation-2017-03-31/GetWorkUnitResults) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/lakeformation-2017-03-31/GetWorkUnitResults) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/lakeformation-2017-03-31/GetWorkUnitResults) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/lakeformation-2017-03-31/GetWorkUnitResults) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/lakeformation-2017-03-31/GetWorkUnitResults) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/lakeformation-2017-03-31/GetWorkUnitResults) 