本文介紹如何通過 PHP SDK 更新表的配置資訊。
前提條件
方法說明
public function updateTable(array $request)
範例程式碼
以下範例程式碼用於修改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.";
}