get_temporary_data_location_credentials
¶
get_temporary_data_location_credentials(
*,
config_overrides: Optional[LakeFormationClientConfig] = 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/lake_formation.py
2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 | |