AnalyzeAccess
Returns the effective access of a principal on a resource, and the Lake Formation permissions and row-level security policies that contributed to it.
Request Syntax
POST /AnalyzeAccess HTTP/1.1
Content-type: application/json
{
"ContextAttributes": [
{
"Key": "string",
"ProviderType": "string",
"Value": "string"
}
],
"Groups": [ "string" ],
"Principal": {
"DataLakePrincipalIdentifier": "string"
},
"Resource": {
"AnyResource": {
"CatalogId": "string",
"ResourceType": "string"
},
"Catalog": {
"Id": "string"
},
"Database": {
"CatalogId": "string",
"Name": "string"
},
"DataCellsFilter": {
"DatabaseName": "string",
"Name": "string",
"TableCatalogId": "string",
"TableName": "string"
},
"DataLocation": {
"CatalogId": "string",
"ResourceArn": "string"
},
"LFTag": {
"CatalogId": "string",
"TagKey": "string",
"TagValues": [ "string" ]
},
"LFTagExpression": {
"CatalogId": "string",
"Name": "string"
},
"LFTagPolicy": {
"CatalogId": "string",
"Expression": [
{
"TagKey": "string",
"TagValues": [ "string" ]
}
],
"ExpressionName": "string",
"ResourceType": "string"
},
"RLSPolicy": {
"CatalogId": "string",
"Name": "string"
},
"Table": {
"CatalogId": "string",
"DatabaseName": "string",
"Name": "string",
"TableWildcard": {
}
},
"TableWithColumns": {
"CatalogId": "string",
"ColumnNames": [ "string" ],
"ColumnWildcard": {
"ExcludedColumnNames": [ "string" ]
},
"DatabaseName": "string",
"Name": "string"
},
"UserDefinedFunction": {
"CatalogId": "string",
"DatabaseName": "string",
"Name": "string",
"UserDefinedFunctionWildcard": {
}
}
}
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- ContextAttributes
-
Attributes that override the principal's attributes for the analysis. You can specify up to 50 attributes. If you don't specify any, the analysis uses the principal's existing attributes.
Type: Array of ContextAttribute objects
Array Members: Maximum number of 50 items.
Required: No
- Groups
-
For an IAM Identity Center principal, the Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that its session uses. Only one role is supported.
Type: Array of strings
Array Members: Fixed number of 1 item.
Required: No
- Principal
-
The principal whose access to analyze.
Type: DataLakePrincipal object
Required: Yes
- Resource
-
The resource on which to analyze access.
Type: Resource object
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"AccessDecision": {
"AuthorizedActions": [ "string" ],
"ContributingGrants": [
{
"Actions": [ "string" ],
"Condition": {
"Expression": "string"
},
"IssuingSource": "string",
"Principal": {
"DataLakePrincipalIdentifier": "string"
},
"Resource": {
"AnyResource": {
"CatalogId": "string",
"ResourceType": "string"
},
"Catalog": {
"Id": "string"
},
"Database": {
"CatalogId": "string",
"Name": "string"
},
"DataCellsFilter": {
"DatabaseName": "string",
"Name": "string",
"TableCatalogId": "string",
"TableName": "string"
},
"DataLocation": {
"CatalogId": "string",
"ResourceArn": "string"
},
"LFTag": {
"CatalogId": "string",
"TagKey": "string",
"TagValues": [ "string" ]
},
"LFTagExpression": {
"CatalogId": "string",
"Name": "string"
},
"LFTagPolicy": {
"CatalogId": "string",
"Expression": [
{
"TagKey": "string",
"TagValues": [ "string" ]
}
],
"ExpressionName": "string",
"ResourceType": "string"
},
"RLSPolicy": {
"CatalogId": "string",
"Name": "string"
},
"Table": {
"CatalogId": "string",
"DatabaseName": "string",
"Name": "string",
"TableWildcard": {
}
},
"TableWithColumns": {
"CatalogId": "string",
"ColumnNames": [ "string" ],
"ColumnWildcard": {
"ExcludedColumnNames": [ "string" ]
},
"DatabaseName": "string",
"Name": "string"
},
"UserDefinedFunction": {
"CatalogId": "string",
"DatabaseName": "string",
"Name": "string",
"UserDefinedFunctionWildcard": {
}
}
}
}
],
"ContributingRLSPolicies": [
{
"Condition": {
"Expression": "string"
},
"IssuingSource": "string",
"PolicyName": "string",
"Principal": {
"DataLakePrincipalIdentifier": "string"
},
"Resource": {
"AnyResource": {
"CatalogId": "string",
"ResourceType": "string"
},
"Catalog": {
"Id": "string"
},
"Database": {
"CatalogId": "string",
"Name": "string"
},
"DataCellsFilter": {
"DatabaseName": "string",
"Name": "string",
"TableCatalogId": "string",
"TableName": "string"
},
"DataLocation": {
"CatalogId": "string",
"ResourceArn": "string"
},
"LFTag": {
"CatalogId": "string",
"TagKey": "string",
"TagValues": [ "string" ]
},
"LFTagExpression": {
"CatalogId": "string",
"Name": "string"
},
"LFTagPolicy": {
"CatalogId": "string",
"Expression": [
{
"TagKey": "string",
"TagValues": [ "string" ]
}
],
"ExpressionName": "string",
"ResourceType": "string"
},
"RLSPolicy": {
"CatalogId": "string",
"Name": "string"
},
"Table": {
"CatalogId": "string",
"DatabaseName": "string",
"Name": "string",
"TableWildcard": {
}
},
"TableWithColumns": {
"CatalogId": "string",
"ColumnNames": [ "string" ],
"ColumnWildcard": {
"ExcludedColumnNames": [ "string" ]
},
"DatabaseName": "string",
"Name": "string"
},
"UserDefinedFunction": {
"CatalogId": "string",
"DatabaseName": "string",
"Name": "string",
"UserDefinedFunctionWildcard": {
}
}
}
}
],
"Principal": {
"DataLakePrincipalIdentifier": "string"
},
"SelectActionDetails": {
"AuthorizedColumns": [ "string" ],
"CellFilters": [
{
"ColumnName": "string",
"RowFilterExpression": "string"
}
],
"RowFilter": {
"AllRowsWildcard": {
},
"FilterExpression": "string"
}
}
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- AccessDecision
-
The principal's access on the resource.
Type: AccessDecision object
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
Access to a resource was denied.
- Message
-
A message describing the problem.
HTTP Status Code: 403
- EntityNotFoundException
-
A specified entity does not exist.
- Message
-
A message describing the problem.
HTTP Status Code: 400
- FederationSourceException
-
A generic exception encapsulating exceptions from the federation source that are not actionable by query engines.
- FederationSourceErrorCode
-
The error code that the federation source returned, such as
AccessDeniedExceptionorThrottlingException. - Message
-
A message describing the problem.
HTTP Status Code: 400
- FederationSourceRetryableException
-
The federation source failed. This failure might be temporary. Retry the request.
- Message
-
The error message that the federation source returned, which describes why the request failed.
HTTP Status Code: 400
- GlueEncryptionException
-
An encryption operation failed.
- Message
-
A message describing the problem.
HTTP Status Code: 400
- 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
- OperationTimeoutException
-
The operation timed out.
- Message
-
A message describing the problem.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: