View a markdown version of this page

GetChannel - Amazon S3

GetChannel

Gets the current state of a table's channel in Amazon S3 Tables.

The operation returns the following information about the channel:

  • The state of the channel

  • The approximate number of rows that the channel has buffered and not yet committed to the table

  • An error code and a message that describe the error, if an error blocks commits

The default channel is created the first time that PutRows writes to the table. Until then, GetChannel fails with a NotFoundException error.

Permissions

To use this operation, you must have the s3tables:GetChannel permission on the table.

Request Syntax

GET /tables/channel?channelId=channelId&tableArn=tableARN HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

channelId

The identifier of the channel whose state you want to get. If you don't specify a channel, the operation uses default. Only default is supported.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-z0-9-]+

tableARN

The Amazon Resource Name (ARN) of the table that the channel belongs to.

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: (arn:aws[-a-z0-9]*:[a-z0-9]+:[-a-z0-9]*:[0-9]{12}:bucket/[a-z0-9_-]{3,63}/table/[a-zA-Z0-9-_]{1,255})

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "approximateNumberOfBufferedRows": number, "errorCode": "string", "errorMessage": "string", "state": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

approximateNumberOfBufferedRows

The approximate number of rows that the channel has buffered and not yet committed to the table.

Type: Long

errorCode

The code of the error that's blocking the channel from committing buffered rows to the table. For how to fix each error, see ChannelErrorCode. GetChannel returns this value only when state is failing.

Type: String

Valid Values: kms_key_disabled | kms_access_denied | kms_key_not_found

errorMessage

A message that describes the error in errorCode. GetChannel returns this value only together with errorCode.

Type: String

state

The current state of the channel. The state is one of the following values:

  • active – The channel is operating normally.

  • failing – The channel can't commit rows to the table because of an error that requires your action. For details, see errorCode and errorMessage.

Type: String

Valid Values: active | failing

Errors

AccessDeniedException

The action cannot be performed because you do not have the required permission.

HTTP Status Code: 403

BadRequestException

The request is invalid or malformed.

HTTP Status Code: 400

ForbiddenException

The caller isn't authorized to make the request.

HTTP Status Code: 403

InternalServerErrorException

The request failed due to an internal server error.

HTTP Status Code: 500

NotFoundException

The request was rejected because the specified resource could not be found.

HTTP Status Code: 404

TooManyRequestsException

The limit on the number of requests per second was exceeded.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: