Queries the server-side encryption configuration of a table.
Usage notes
-
A table inherits its encryption configuration from the default encryption settings of the table bucket. Only the AES256 algorithm is supported.
-
When KMS encryption is used, the kmsKeyArn field in the response contains the ARN of the KMS key.
-
When AES256 encryption is used, the kmsKeyArn field is an empty string.
Permissions
|
API |
Action |
Description |
|
GetTableEncryption |
oss:GetTableEncryption |
Queries the encryption configuration of 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: SignatureValue
Request parameters
|
Parameter |
Type |
Required |
Example |
Description |
|
tableBucketARN |
String |
Yes |
acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket |
The ARN of the table bucket, in the format acs:osstables:{region}:{uid}:bucket/{bucketName}. This parameter is part of the URI. |
|
namespace |
String |
Yes |
my_namespace |
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 server-side encryption configuration. Parent node: None Child nodes: |
|
sseAlgorithm |
String |
AES256 |
The server-side encryption algorithm. Valid values: 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 empty if AES256 encryption is used. 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 permissions to perform this operation. |
|
NotFoundException |
404 |
The specified resource does not exist. |