All Products
Search
Document Center

ApsaraDB RDS:ST_SetAkId

Last Updated:Mar 28, 2026

Sets the AccessKey ID used to access the Object Storage Service (OSS) bucket that stores data for a trajectory object.

Syntax

text ST_SetAkId(trajectory traj, text akid, bool checkvalid default true);

Parameters

ParameterDescription
trajThe trajectory object.
akidThe AccessKey ID used to access the OSS bucket.
checkvalidSpecifies whether to validate the AccessKey ID. Default value: true. When set to true, the system tests whether the AccessKey ID can access the OSS bucket. If the test fails, an error is returned.

Description

ST_SetAkId resets the AccessKey ID on a trajectory object. The AccessKey ID authenticates access to the OSS bucket that stores the trajectory data.

To read trajectory data from an OSS bucket, provide an AccessKey pair — an AccessKey ID and an AccessKey secret. The AccessKey ID identifies the account (similar to a username) and the AccessKey secret authenticates it (similar to a password).

Examples

select ST_SetAKId(traj, '<OSS_USER>') from trajs;

Result:

 st_setakid
-----------
 null
 null
 null
 TRAJECTORY EMPTY
(4 rows)