このトピックでは、PHP 用 Tablestore SDK を使用してテーブルの構成を更新する方法について説明します。
前提条件
クライアントが初期化されていること。 詳細については、「Tablestore クライアントを初期化する」をご参照ください。
メソッドの説明
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."; // テーブルの更新に失敗しました。
}