You can use this function to set an AccessKey ID. The AccessKey ID is used to access the Object Storage Service (OSS) bucket that stores data of a trajectory object.
Syntax
text ST_SetAkId(trajectory traj, text akid, bool checkvalid default true);
Parameters
Parameter | Description |
---|---|
traj | The trajectory object. |
akid | The AccessKey ID that is used to access the OSS bucket. |
checkvalid | Specifies whether to check the validity of the AccessKey ID. Default value: true. If this parameter is set to true, the system tests whether the specified AccessKey ID can be used to access the OSS bucket. If the access test fails, an error is returned. |
Description
This function resets an AccessKey ID. The AccessKey ID 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_SetAKId(traj, '<OSS_USER>') from trajs;
st_setakid
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
null
null
null
TRAJECTORY EMPTY
(4 rows)