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.
GetTableAutoScalingSettings can't be used as an action in an IAM policy.
To define permissions for GetTableAutoScalingSettings, you must allow the following two actions in the IAM policy statement's Action element:
Parameters:
Raises:
-
AccessDeniedException
–
You don't have sufficient access permissions to perform this action.
-
InternalServerException
–
Amazon Keyspaces was unable to fully process this request because of an internal server error.
-
ResourceNotFoundException
–
The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE.
-
ServiceQuotaExceededException
–
The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer Guide.
-
ValidationException
–
The operation failed due to an invalid or malformed request.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_keyspaces/_services/keyspaces.py
| def get_table_auto_scaling_settings(
self,
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
table_name: "capo_keyspaces.types.table_name.TableName",
*,
config_overrides: Optional[KeyspacesClientConfig] = None,
) -> "capo_keyspaces.types.get_table_auto_scaling_settings_response.GetTableAutoScalingSettingsResponse":
"""<p>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.</p> <p>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 <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html">Managing throughput capacity automatically with Amazon Keyspaces auto scaling</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p> <important> <p> <code>GetTableAutoScalingSettings</code> can't be used as an action in an IAM policy.</p> </important> <p>To define permissions for <code>GetTableAutoScalingSettings</code>, you must allow the following two actions in the IAM policy statement's <code>Action</code> element:</p> <ul> <li> <p> <code>application-autoscaling:DescribeScalableTargets</code> </p> </li> <li> <p> <code>application-autoscaling:DescribeScalingPolicies</code> </p> </li> </ul>
Args:
keyspace_name: <p>The name of the keyspace.</p>
table_name: <p>The name of the table.</p>
Raises:
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_keyspaces.types.get_table_auto_scaling_settings_request.GetTableAutoScalingSettingsRequest]",
) -> OperationResponse[
"capo_keyspaces.types.get_table_auto_scaling_settings_response.GetTableAutoScalingSettingsResponse"
]:
import capo_keyspaces._operations.keyspaces_service.get_table_auto_scaling_settings
output, http_response = (
capo_keyspaces._operations.keyspaces_service.get_table_auto_scaling_settings.get_table_auto_scaling_settings(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetTableAutoScalingSettings")
)
input_: capo_keyspaces.types.get_table_auto_scaling_settings_request.GetTableAutoScalingSettingsRequest = {
"keyspace_name": keyspace_name,
"table_name": table_name,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|