All Products
Search
Document Center

PolarDB:ST_SetAKSecret

Last Updated:Mar 27, 2026

Sets the AccessKey secret used to access a raster object stored in Alibaba Cloud Object Storage Service (OSS).

Prerequisites

The raster object must be stored in OSS.

Syntax

raster ST_SetAKSecret(raster raster_obj, text key, bool valid default true)

Parameters

ParameterTypeDefaultDescription
raster_objrasterThe name of the raster object.
keytextThe AccessKey secret used to log on to OSS. If set to NULL, the previous AccessKey secret is used.
validbooltrueSpecifies whether to verify the validity of the logon information.

Examples

Update the AccessKey secret for a raster column:

UPDATE raster_table
SET rast = ST_SetAKSecret(rast, 'OSS_ACCESSKEY_SECRET');

Replace OSS_ACCESSKEY_SECRET with your actual AccessKey secret.