getUserDefinedFunctions method
Retrieves multiple function definitions from the Data Catalog.
May throw EntityNotFoundException.
May throw GlueEncryptionException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
Parameter pattern :
An optional function-name pattern string that filters the function
definitions returned.
Parameter catalogId :
The ID of the Data Catalog where the functions to be retrieved are
located. If none is provided, the Amazon Web Services account ID is used
by default.
Parameter databaseName :
The name of the catalog database where the functions are located. If none
is provided, functions from all the databases across the catalog will be
returned.
Parameter functionType :
An optional function-type pattern string that filters the function
definitions returned from Amazon Redshift Federated Permissions Catalog.
Specify a value of REGULAR_FUNCTION or
STORED_PROCEDURE. The STORED_PROCEDURE function
type is only compatible with Amazon Redshift Federated Permissions
Catalog.
Parameter maxResults :
The maximum number of functions to return in one response.
Parameter nextToken :
A continuation token, if this is a continuation call.
Implementation
Future<GetUserDefinedFunctionsResponse> getUserDefinedFunctions({
required String pattern,
String? catalogId,
String? databaseName,
FunctionType? functionType,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.GetUserDefinedFunctions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Pattern': pattern,
if (catalogId != null) 'CatalogId': catalogId,
if (databaseName != null) 'DatabaseName': databaseName,
if (functionType != null) 'FunctionType': functionType.value,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return GetUserDefinedFunctionsResponse.fromJson(jsonResponse.body);
}