All Products
Search
Document Center

PolarDB:ST_SetAKId

Last Updated:Mar 28, 2026

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

Prerequisites

The raster object is stored in OSS.

Syntax

raster ST_SetAKId(raster raster_obj, text id, bool valid default true)

Parameters

ParameterDescription
raster_objThe name of the raster object.
idThe AccessKey ID used to log on to OSS. If set to NULL, the previous AccessKey ID is used.
validSpecifies whether to verify the validity of the logon information.

Examples

UPDATE raster_table
SET rast = ST_SetAKId(rast, 'OSS_ACCESSKEY_ID');

SELECT ST_AKId(rast) from raster_table;
     st_akid
------------------
 OSS_ACCESSKEY_ID