

# GetDataLakePrincipal
<a name="API_GetDataLakePrincipal"></a>

Returns the identity of the invoking principal.

## Request Syntax
<a name="API_GetDataLakePrincipal_RequestSyntax"></a>

```
POST /GetDataLakePrincipal HTTP/1.1
```

## URI Request Parameters
<a name="API_GetDataLakePrincipal_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_GetDataLakePrincipal_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_GetDataLakePrincipal_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "Identity": "string"
}
```

## Response Elements
<a name="API_GetDataLakePrincipal_ResponseElements"></a>

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

The following data is returned in JSON format by the service.

 ** [Identity](#API_GetDataLakePrincipal_ResponseSyntax) **   <a name="lakeformation-GetDataLakePrincipal-response-Identity"></a>
A unique identifier of the invoking principal.  
Type: String

## Errors
<a name="API_GetDataLakePrincipal_Errors"></a>

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

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

 ** OperationTimeoutException **   
The operation timed out.    
 ** Message **   
A message describing the problem.
HTTP Status Code: 400

## Examples
<a name="API_GetDataLakePrincipal_Examples"></a>

### Response example
<a name="API_GetDataLakePrincipal_Example_1"></a>

This example illustrates one usage of GetDataLakePrincipal.

```
{
   "Identity": "arn:aws:iam::<111221110200>:role/user "
  
}
```

## See Also
<a name="API_GetDataLakePrincipal_SeeAlso"></a>

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