createTableOptimizer method
Creates a new table optimizer for a specific function.
May throw AccessDeniedException.
May throw AlreadyExistsException.
May throw EntityNotFoundException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw ThrottlingException.
May throw ValidationException.
Parameter catalogId :
The Catalog ID of the table.
Parameter databaseName :
The name of the database in the catalog in which the table resides.
Parameter tableName :
The name of the table.
Parameter tableOptimizerConfiguration :
A TableOptimizerConfiguration object representing the
configuration of a table optimizer.
Parameter type :
The type of table optimizer.
Implementation
Future<void> createTableOptimizer({
required String catalogId,
required String databaseName,
required String tableName,
required TableOptimizerConfiguration tableOptimizerConfiguration,
required TableOptimizerType type,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.CreateTableOptimizer'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'CatalogId': catalogId,
'DatabaseName': databaseName,
'TableName': tableName,
'TableOptimizerConfiguration': tableOptimizerConfiguration,
'Type': type.value,
},
);
}