createPartitionIndex method
Creates a specified partition index in an existing table.
May throw AlreadyExistsException.
May throw EntityNotFoundException.
May throw GlueEncryptionException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw ResourceNumberLimitExceededException.
Parameter databaseName :
Specifies the name of a database in which you want to create a partition
index.
Parameter partitionIndex :
Specifies a PartitionIndex structure to create a partition
index in an existing table.
Parameter tableName :
Specifies the name of a table in which you want to create a partition
index.
Parameter catalogId :
The catalog ID where the table resides.
Implementation
Future<void> createPartitionIndex({
required String databaseName,
required PartitionIndex partitionIndex,
required String tableName,
String? catalogId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.CreatePartitionIndex'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatabaseName': databaseName,
'PartitionIndex': partitionIndex,
'TableName': tableName,
if (catalogId != null) 'CatalogId': catalogId,
},
);
}