You can use this function to set an AccessKey secret. The AccessKey secret is used to access the Object Storage Service (OSS) bucket that stores the data of a specified trajectory object.

Syntax

text ST_SetAkSecret(trajectory traj, text aksecret, bool checkvalid default true);

Parameters

Parameter Description
traj The trajectory object.
aksecret The AccessKey secret that is used to access the OSS bucket.
checkvalid Specifies whether to check the validity of the AccessKey secret. Default value: true. If this parameter is set to true, the system tests whether the specified AccessKey secret can be used to access the OSS bucket. If the access test fails, an error is returned.

Description

This function resets an AccessKey secret. The AccessKey secret is used to access the OSS bucket that stores the data of a specified trajectory.

When you read trajectory data from a file in an OSS bucket, you must provide the AccessKey pair information to access the OSS bucket. An AccessKey pair consists of an AccessKey ID and an AccessKey secret. An AccessKey ID is similar to a username and an AccessKey secret is similar to a password.

Examples

select ST_SetAkSecret(traj, '<OSS_PWD>') from trajs;
                                                                                                                                                                                                                                             st_setaksecret                                                                                                                                                                                                                                             
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 null
 null
 null
 TRAJECTORY EMPTY
(4 rows)