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
2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 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 | |