ST_SetAKId
更新时间:
复制 MD 格式
Sets the AccessKey ID used to access a raster object stored in Alibaba Cloud Object Storage Service (OSS).
Prerequisites
The raster object is stored in OSS.
Syntax
raster ST_SetAKId(raster raster_obj, text id, bool valid default true)Description
ST_SetAKId writes an AccessKey ID into the raster object's metadata so that subsequent operations can access the object in OSS. The function returns the updated raster object.
If
idisNULL, the existing AccessKey ID is retained. Use this to reset thevalidflag without changing the credential.If
validisfalse, the function skips logon verification.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
raster_obj | raster | — | The raster object to update. |
id | text | — | The AccessKey ID used to log on to OSS. If NULL, the previous AccessKey ID is used. |
valid | bool | true | Specifies whether to verify the validity of the logon information. |
Examples
Set the AccessKey ID on a raster object, then confirm the value was written:
UPDATE raster_table
SET rast = ST_SetAKId(rast, 'OSS_ACCESSKEY_ID');
SELECT ST_AKId(rast) from raster_table;
st_akid
------------------
OSS_ACCESSKEY_IDThe SELECT ST_AKId(...) call confirms the AccessKey ID was stored correctly.
该文章对您有帮助吗?