deletePartitionIndex method

Future<void> deletePartitionIndex({
  1. required String databaseName,
  2. required String indexName,
  3. required String tableName,
  4. String? catalogId,
})

Deletes a specified partition index from an existing table.

May throw InternalServiceException. May throw OperationTimeoutException. May throw InvalidInputException. May throw EntityNotFoundException. May throw ConflictException. May throw GlueEncryptionException.

Parameter databaseName : Specifies the name of a database from which you want to delete a partition index.

Parameter indexName : The name of the partition index to be deleted.

Parameter tableName : Specifies the name of a table from which you want to delete a partition index.

Parameter catalogId : The catalog ID where the table resides.

Implementation

Future<void> deletePartitionIndex({
  required String databaseName,
  required String indexName,
  required String tableName,
  String? catalogId,
}) async {
  ArgumentError.checkNotNull(databaseName, 'databaseName');
  _s.validateStringLength(
    'databaseName',
    databaseName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(indexName, 'indexName');
  _s.validateStringLength(
    'indexName',
    indexName,
    1,
    255,
    isRequired: true,
  );
  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.DeletePartitionIndex'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DatabaseName': databaseName,
      'IndexName': indexName,
      'TableName': tableName,
      if (catalogId != null) 'CatalogId': catalogId,
    },
  );
}