Retrieves the server-side encryption configuration of a specified table.
Usage notes
A table inherits its encryption configuration from the table bucket's default. Currently, only the AES256 algorithm is supported.
If you use KMS encryption, the kmsKeyArn field in the response contains the ARN of the KMS key.
If you use AES256 encryption, the kmsKeyArn field is an empty string.
Permissions
API | Action | Description |
GetTableEncryption | oss:GetTableEncryption | Retrieves the encryption configuration for a table and checks the table policy. |
Request syntax
GET /tables/{tableBucketARN}/{namespace}/{name}/encryption HTTP/1.1
Host: cn-hangzhou.oss-tables.aliyuncs.com
Date: GMT Date
Authorization: SignatureValueRequest parameters
Parameter | Type | Required | Example | Description |
tableBucketARN | String | Yes | acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket | The ARN of the table bucket. The format is acs:osstables:{region}:{uid}:bucket/{bucketName}. This parameter is part of the URI. |
namespace | String | Yes | my_namespace | The name of the namespace that contains the table. This parameter is part of the URI. |
name | String | Yes | my_table | The table name. This parameter is part of the URI. |
Response parameters
Parameter | Type | Example | Description |
encryptionConfiguration | container | - | The container for the server-side encryption configuration. Parent node: None Child nodes: |
sseAlgorithm | String | AES256 | The server-side encryption algorithm. Valid values are AES256 and KMS. Parent node: Child nodes: None |
kmsKeyArn | String | acs:kms:cn-hangzhou:1234567890:key/key-id | The ARN of the KMS key. This field is an empty string if you use AES256 encryption. Parent node: Child nodes: None |
Examples
Sample request
GET /tables/acs%3Aosstables%3Acn-hangzhou%3A1234567890%3Abucket%2Fmy-table-bucket/my_namespace/my_table/encryption HTTP/1.1
Host: cn-hangzhou.oss-tables.aliyuncs.com
Date: Thu, 10 Apr 2025 08:00:00 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/osstables/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c****Sample response
HTTP/1.1 200 OK
Server: AliyunOSS
x-oss-request-id: 5C06A3B67B8B5A3DA422****
x-oss-server-time: 3
Content-Type: application/json
{
"encryptionConfiguration": {
"kmsKeyArn": "",
"sseAlgorithm": "AES256"
}
}SDKs
You can use the following SDKs to call the GetTableEncryption operation:
ossutil command-line tool
For the corresponding ossutil command, see get-table-encryption.
Error codes
Error code | HTTP status code | Description |
ForbiddenException | 403 | You do not have the required permissions to perform this request. |
NotFoundException | 404 | The requested resource does not exist. |