为表关闭 Amazon Keyspaces 自动扩缩 - Amazon Keyspaces(Apache Cassandra 兼容)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

为表关闭 Amazon Keyspaces 自动扩缩

您可以随时为表关闭 Amazon Keyspaces 自动扩缩。如果不再需要扩缩表的读取或写入容量,您应考虑关闭自动扩缩策略,这样 Amazon Keyspaces 就不会继续修改表的读取或写入容量设置。您可以使用控制台、CQL 或 AWS CLI 更新表。

关闭自动扩缩功能还将删除代表您创建的 CloudWatch 警报。

要删除 Application Auto Scaling 用于访问 Amazon Keyspaces 表的服务相关角色,请按照删除适用于 Amazon Keyspaces 的服务相关角色中的步骤操作。

注意

要删除 Application Auto Scaling 使用的服务相关角色,您必须在所有 AWS 区域中禁用账户中所有表的自动扩缩。

Console

使用控制台为表关闭 Amazon Keyspaces 自动扩缩功能

使用 Amazon Keyspaces 控制台
  1. 登录 AWS Management Console,然后打开 Amazon Keyspaces 控制台:https://console.aws.amazon.com/keyspaces/home

  2. 选择要更新的表,然后转到容量选项卡。

  3. 容量设置部分中,选择编辑

  4. 要禁用 Amazon Keyspaces 自动扩缩,请清除自动扩展复选框。禁用自动扩缩会在 Application Auto Scaling 中取消将表注册为可扩展目标。

Cassandra Query Language (CQL)

使用 CQL 为表关闭 Amazon Keyspaces 自动扩缩

以下语句可关闭表 mytable 写入容量的自动扩缩。

ALTER TABLE mykeyspace.mytable WITH AUTOSCALING_SETTINGS = { 'provisioned_write_capacity_autoscaling_update': { 'autoscaling_disabled': true } };
CLI

使用 AWS CLI 为表关闭 Amazon Keyspaces 自动扩缩

以下命令可关闭表读取容量的自动扩缩。它还将删除代表您创建的 CloudWatch 警报。

aws keyspaces update-table --keyspace-name mykeyspace --table-name mytable \ --auto-scaling-specification readCapacityAutoScaling={autoScalingDisabled=true}