Docs
api
Object-based Storage(US3)
UpdateUFileToken

Update Token - UpdateUFileToken

Overview

Update the operation permissions of the token, can operate the prefix of the key, can operate the bucket and the token expiration time point.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is UpdateUFileToken.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesNo
ProjectIdstringProject ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface.Yes
TokenIdstringToken IDYes
TokenNamestringToken NameNo
AllowedOps.NstringThe operations that the token allows to perform, [ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ]No
AllowedPrefixes.NstringThe key prefix that the token allows to operateNo
AllowedBuckets.NstringThe token allows operation of the bucketNo
ExpireTimeintExpiration time of the token (timestamp); Note: The expiration time cannot exceed 4102416000No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No

Example

Request Example

https://api.dezai.com/?Action=UpdateUFileToken
&ProjectId=org-xxx
&Region=cn-bj
&TokenId=679c7e5e-74b8-4048-b622-33dd4e8634db
&TokenName=testname
&AllowedOps.0=TOKEN_ALLOW_READ 
&AllowedOps.1=TOKEN_ALLOW_WRITE
&AllowedPrefixes.0=test/test
&AllowedPrefixes.1=test1/test1
&AllowedPrefixes.2=test2/test2
&AllowedBuckets.0=bucket0
&AllowedBuckets.1=bucket1
&ExpireTime=1520411979

Response Example

{
  "Action": "UpdateUFileTokenResponse",
  "RetCode": 0
}