获取令牌信息-DescribeUFileToken
获取令牌信息
Request Parameters
Parameter name | Type | Description | Required |
Region | string | 地域。 参见 地域和可用区列表 | No |
ProjectId | string | 项目ID。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口 | Yes |
TokenId | string | 令牌ID,只返回指定ID信息,否则拉取所有令牌 | No |
Display | int | 0表示显示部分token信息;不传递和其他情况表示显示全部token信息 | No |
Response Elements
Parameter name | Type | Description | Required |
RetCode | int | 返回码 | Yes |
Action | string | 操作名称 | Yes |
DataSet | array | 令牌描述信息 | Yes |
Request Example
https://api.ucloud.cn/?Action=DescribeUFileToken &ProjectId=org-xxx &TokenId=679c7e5e-74b8-4048-b622-33dd4e8634de &Region=cn-bj &Display=2
Response Example
{ "Action": "DescribeUFileTokenResponse", "RetCode": 0, "DataSet": [ { "AllowedPrefixes": [ "test/test", "test1/test1" ], "TolenName": "testname", "TokenId": "679c7e5e-74b8-4048-b622-33dd4e8634de", "PrivateKey": "7b01a354-adb2-49a1-9f68-af814e884c29", "ExpireTime": 4102416000, "PublicKey": "TOKEN_679c7e5e-74b8-4048-b622-33dd4e8634de", "AllowedBuckets": [ "bucket1", "bucket2" ], "AllowedOps": [ "TOKEN_ALLOW_READ", "TOKEN_ALLOW_WRITE" ] }, { "AllowedPrefixes": [ "test/test", "test1/test1" ], "TokenName": "test1name", "PrivateKey": "7b01a354-adb2-49a1-9f68-af814e884c27", "TokenId": "679c7e5e-74b8-4048-b622-33dd4e8634dc", "ExpireTime": 4102416000, "PublicKey": "TOKEN_679c7e5e-74b8-4048-b622-33dd4e8634dc", "AllowedBuckets": [ "bucket1", "bucket2" ], "AllowedOps": [ "TOKEN_ALLOW_READ", "TOKEN_ALLOW_WRITE" ] } ] }