updateDatabase method
Updates an existing database definition in a Data Catalog.
May throw AlreadyExistsException.
May throw ConcurrentModificationException.
May throw EntityNotFoundException.
May throw FederationSourceException.
May throw FederationSourceRetryableException.
May throw GlueEncryptionException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
Parameter databaseInput :
A DatabaseInput object specifying the new definition of the
metadata database in the catalog.
Parameter name :
The name of the database to update in the catalog. For Hive compatibility,
this is folded to lowercase.
Parameter catalogId :
The ID of the Data Catalog in which the metadata database resides. If none
is provided, the Amazon Web Services account ID is used by default.
Implementation
Future<void> updateDatabase({
required DatabaseInput databaseInput,
required String name,
String? catalogId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.UpdateDatabase'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatabaseInput': databaseInput,
'Name': name,
if (catalogId != null) 'CatalogId': catalogId,
},
);
}