getTemporaryGluePartitionCredentials method
This API is identical to GetTemporaryTableCredentials except
that this is used when the target Data Catalog resource is of type
Partition. Lake Formation restricts the permission of the vended
credentials with the same scope down policy which restricts access to a
single Amazon S3 prefix.
May throw AccessDeniedException.
May throw EntityNotFoundException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw PermissionTypeMismatchException.
Parameter partition :
A list of partition values identifying a single partition.
Parameter tableArn :
The ARN of the partitions' table.
Parameter auditContext :
A structure representing context to access a resource (column names, query
ID, etc).
Parameter durationSeconds :
The time period, between 900 and 21,600 seconds, for the timeout of the
temporary credentials.
Parameter permissions :
Filters the request based on the user having been granted a list of
specified permissions on the requested resource(s).
Parameter supportedPermissionTypes :
A list of supported permission types for the partition. Valid values are
COLUMN_PERMISSION and CELL_FILTER_PERMISSION.
Implementation
Future<GetTemporaryGluePartitionCredentialsResponse>
getTemporaryGluePartitionCredentials({
required PartitionValueList partition,
required String tableArn,
AuditContext? auditContext,
int? durationSeconds,
List<Permission>? permissions,
List<PermissionType>? supportedPermissionTypes,
}) async {
_s.validateNumRange(
'durationSeconds',
durationSeconds,
900,
43200,
);
final $payload = <String, dynamic>{
'Partition': partition,
'TableArn': tableArn,
if (auditContext != null) 'AuditContext': auditContext,
if (durationSeconds != null) 'DurationSeconds': durationSeconds,
if (permissions != null)
'Permissions': permissions.map((e) => e.value).toList(),
if (supportedPermissionTypes != null)
'SupportedPermissionTypes':
supportedPermissionTypes.map((e) => e.value).toList(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/GetTemporaryGluePartitionCredentials',
exceptionFnMap: _exceptionFns,
);
return GetTemporaryGluePartitionCredentialsResponse.fromJson(response);
}