get_temporary_data_location_credentials
async
¶
get_temporary_data_location_credentials(
*,
config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
duration_seconds: Optional[CredentialTimeoutDurationSecondInteger] = None,
audit_context: Optional[AuditContext] = None,
data_locations: Optional[PathStringList] = None,
credentials_scope: Optional[CredentialsScope] = None,
) -> GetTemporaryDataLocationCredentialsResponse
Allows a user or application in a secure environment to access data in a specific Amazon S3 location registered with Lake Formation by providing temporary scoped credentials that are limited to the requested data location and the caller's authorized access level.
GetDataAccess is logged in CloudTrail whenever a principal requests temporary data location credentials to access data in a data lake location that is registered with Lake Formation.
The API operation returns an error in the following scenarios:
-
The data location is not registered with Lake Formation.
-
No Glue table is associated with the data location.
-
The caller doesn't have required permissions on the associated table. The caller must have
SELECTorSUPERpermissions on the associated table, and credential vending for full table access must be enabled in the data lake settings.For more information, see Application integration for full table access.
-
The data location is in a different Amazon Web Services Region. Lake Formation doesn't support cross-Region access when vending credentials for a data location. Lake Formation only supports Amazon S3 paths registered within the same Region as the API call.
Parameters:
-
duration_seconds(Optional[CredentialTimeoutDurationSecondInteger], default:None) –The time period, between 900 and 43,200 seconds, for the timeout of the temporary credentials.
-
data_locations(Optional[PathStringList], default:None) –The Amazon S3 data location that you want to access.
-
credentials_scope(Optional[CredentialsScope], default:None) –The credential scope is determined by the caller's Lake Formation permission on the associated table. Credential scope can be either:
-
READ - Provides read-only access to the data location.
-
READ_WRITE - Provides both read and write access to the data location.
-
Raises:
-
AccessDeniedException–Access to a resource was denied.
-
ConflictException–Multiple resources exist with the same Amazon S3 location
-
EntityNotFoundException–A specified entity does not exist.
-
GlueEncryptionException–An encryption operation failed.
-
InternalServiceException–An internal service error occurred.
-
InvalidInputException–The input provided was not valid.
-
OperationTimeoutException–The operation timed out.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 | |