getTableAutoScalingSettings method

Future<GetTableAutoScalingSettingsResponse> getTableAutoScalingSettings({
  1. required String keyspaceName,
  2. required String tableName,
})

Returns auto scaling related settings of the specified table in JSON format. If the table is a multi-Region table, the Amazon Web Services Region specific auto scaling settings of the table are included.

Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic. For more information, see Managing throughput capacity automatically with Amazon Keyspaces auto scaling in the Amazon Keyspaces Developer Guide. To define permissions for GetTableAutoScalingSettings, you must allow the following two actions in the IAM policy statement's Action element:

  • application-autoscaling:DescribeScalableTargets
  • application-autoscaling:DescribeScalingPolicies

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter keyspaceName : The name of the keyspace.

Parameter tableName : The name of the table.

Implementation

Future<GetTableAutoScalingSettingsResponse> getTableAutoScalingSettings({
  required String keyspaceName,
  required String tableName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'KeyspacesService.GetTableAutoScalingSettings'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'keyspaceName': keyspaceName,
      'tableName': tableName,
    },
  );

  return GetTableAutoScalingSettingsResponse.fromJson(jsonResponse.body);
}