async def get_table(
self,
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
table_name: "capo_keyspaces.types.table_name.TableName",
*,
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
) -> "capo_keyspaces.types.get_table_response.GetTableResponse":
"""<p>Returns information about the table, including the table's name and current status, the keyspace name, configuration settings, and metadata.</p> <p>To read table metadata using <code>GetTable</code>, the IAM principal needs <code>Select</code> action permissions for the table and the system keyspace.</p>
Args:
keyspace_name: <p>The name of the keyspace that the table is stored in.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_keyspaces.types.get_table_request.GetTableRequest]",
) -> AsyncOperationResponse[
"capo_keyspaces.types.get_table_response.GetTableResponse"
]:
if req.options.protocol == "awsJson1_0":
import capo_keyspaces._operations.keyspaces_service.aws_json1_0.get_table
(
output,
http_response,
) = await capo_keyspaces._operations.keyspaces_service.aws_json1_0.get_table.async_get_table(
req.options, req.input
)
elif req.options.protocol == "rpcv2Cbor":
import capo_keyspaces._operations.keyspaces_service.rpcv2_cbor.get_table
(
output,
http_response,
) = await capo_keyspaces._operations.keyspaces_service.rpcv2_cbor.get_table.async_get_table(
req.options, req.input
)
else:
raise ValueError(f"unknown protocol {req.options.protocol!r}")
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetTable")
)
input_: capo_keyspaces.types.get_table_request.GetTableRequest = {
"keyspace_name": keyspace_name,
"table_name": table_name,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output