updateUserDefinedFunction method
Future<void>
updateUserDefinedFunction({
- required String databaseName,
- required UserDefinedFunctionInput functionInput,
- required String functionName,
- String? catalogId,
Updates an existing function definition in the Data Catalog.
May throw EntityNotFoundException. May throw InvalidInputException. May throw InternalServiceException. May throw OperationTimeoutException. May throw GlueEncryptionException.
Parameter databaseName
:
The name of the catalog database where the function to be updated is
located.
Parameter functionInput
:
A FunctionInput
object that redefines the function in the
Data Catalog.
Parameter functionName
:
The name of the function.
Parameter catalogId
:
The ID of the Data Catalog where the function to be updated is located. If
none is provided, the AWS account ID is used by default.
Implementation
Future<void> updateUserDefinedFunction({
required String databaseName,
required UserDefinedFunctionInput functionInput,
required String functionName,
String? catalogId,
}) async {
ArgumentError.checkNotNull(databaseName, 'databaseName');
_s.validateStringLength(
'databaseName',
databaseName,
1,
255,
isRequired: true,
);
ArgumentError.checkNotNull(functionInput, 'functionInput');
ArgumentError.checkNotNull(functionName, 'functionName');
_s.validateStringLength(
'functionName',
functionName,
1,
255,
isRequired: true,
);
_s.validateStringLength(
'catalogId',
catalogId,
1,
255,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.UpdateUserDefinedFunction'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatabaseName': databaseName,
'FunctionInput': functionInput,
'FunctionName': functionName,
if (catalogId != null) 'CatalogId': catalogId,
},
);
}