获取令牌信息-DescribeUFileToken

获取令牌信息

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表No
ProjectIdstring项目ID。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口Yes
TokenIdstring令牌ID,只返回指定ID信息,否则拉取所有令牌No
Displayint0表示显示部分token信息;不传递和其他情况表示显示全部token信息No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint返回码Yes
Actionstring操作名称Yes
DataSetarray令牌描述信息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"
            ]
        }
    ]
}