Todos os produtos
Search
Central de documentação

Tablestore:Excluir um índice secundário

Última atualização: Jul 03, 2026

Chame a operação DeleteIndex para excluir um índice secundário de uma tabela de dados. Após a exclusão, não é possível restaurar o índice.

Observações de uso

Não é possível restaurar índices secundários excluídos. Para usar o índice novamente, recrie-o.

Operação da API

/**
 * Delete a global secondary index.
 * @api
 *
 * @param [] $request
 *            The request parameters, including the name of the data table.
 * @return [] The response.
 * @throws OTSClientException Thrown when a parameter error occurs or the Tablestore server returns a verification error.
 * @throws OTSServerException Thrown when the Tablestore server returns an error.
 * @example "src/examples/DropIndex.php"
 */
public function dropIndex(array $request)

Parâmetros

Parâmetro

Descrição

table_name

Nome da tabela de dados.

index_name

Nome da tabela de índice.

Exemplos

O exemplo a seguir exclui um índice secundário:

$request = array(
    'table_name' => '<TABLE_NAME>', // The name of the data table.
    'index_name' => '<INDEX_NAME>'  // The name of the index table.
);
$otsClient->dropIndex($request);