Sets or resets the AccessKey pair for a trajectory object. The AccessKey pair authenticates access to the Object Storage Service (OSS) bucket that stores the trajectory data.
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 used to access the OSS bucket. |
| aksecret | The AccessKey secret used to access the OSS bucket. |
| checkvalid | Specifies whether to validate the AccessKey pair against the OSS bucket. Default value: true. If set to true, the system tests whether the AccessKey pair can access the OSS bucket. If the test fails, an error is returned. |
Description
When reading trajectory data from a file in an OSS bucket, you must provide a valid AccessKey pair. An AccessKey pair consists of 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_SetAccessKey(traj, '<OSS_USER>', '<OSS_PWD>') FROM trajs;Expected output:
st_setaccesskey
-----------------
null
null
null
TRAJECTORY EMPTY
(4 rows)