getUserDefinedFunction method
Retrieves a specified function definition from the Data Catalog.
May throw EntityNotFoundException.
May throw GlueEncryptionException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
Parameter databaseName :
The name of the catalog database where the function is located.
Parameter functionName :
The name of the function.
Parameter catalogId :
The ID of the Data Catalog where the function to be retrieved is located.
If none is provided, the Amazon Web Services account ID is used by
default.
Implementation
Future<GetUserDefinedFunctionResponse> getUserDefinedFunction({
required String databaseName,
required String functionName,
String? catalogId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.GetUserDefinedFunction'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatabaseName': databaseName,
'FunctionName': functionName,
if (catalogId != null) 'CatalogId': catalogId,
},
);
return GetUserDefinedFunctionResponse.fromJson(jsonResponse.body);
}