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

Syntax

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

Parameters

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

Description

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

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_SetAccessKey(traj, '<OSS_USER>', '<OSS_PWD>') from trajs;
                                                                                                                                                                                                                                            st_setaccesskey                                                                                                                                                                                                                                             
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 null
 null
 null
 TRAJECTORY EMPTY
(4 rows)