Este tópico descreve como atualizar as configurações de uma tabela com o Tablestore SDK for PHP.
Pré-requisitos
Inicialize um cliente. Para mais informações, consulte Inicializar um cliente Tablestore.
Descrição do método
public function updateTable(array $request)
Código de exemplo
O exemplo a seguir mostra como modifique as configurações da tabela test_table.
$request = array (
'table_name' => 'test_table',
'table_options' => array (
'time_to_live' => 86400,
'max_versions' => 3,
'deviation_cell_version_in_sec' => 86400,
'allow_update' => false
),
'stream_spec' => array (
'enable_stream' => true,
'expiration_time' => 168
),
'reserved_throughput' => array (
'capacity_unit' => array (
'read' => 0,
'write' => 0
)
)
);
try{
$client->updateTable( $request );
echo "Update table succeeded.";
} catch (Exception $e) {
echo "Update table failed.";
}