createPartitionIndex method
Future<void>
createPartitionIndex({
- required String databaseName,
- required PartitionIndex partitionIndex,
- required String tableName,
- String? catalogId,
Creates a specified partition index in an existing table.
May throw AlreadyExistsException. May throw InvalidInputException. May throw EntityNotFoundException. May throw ResourceNumberLimitExceededException. May throw InternalServiceException. May throw OperationTimeoutException. May throw GlueEncryptionException.
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 {
ArgumentError.checkNotNull(databaseName, 'databaseName');
_s.validateStringLength(
'databaseName',
databaseName,
1,
255,
isRequired: true,
);
ArgumentError.checkNotNull(partitionIndex, 'partitionIndex');
ArgumentError.checkNotNull(tableName, 'tableName');
_s.validateStringLength(
'tableName',
tableName,
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.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,
},
);
}