更新时间:2022-12-05 GMT+08:00
查询Topic权限
功能介绍
查询Topic权限。
URI
GET /v2/{project_id}/mqs/instances/{instance_id}/topics/{topic_name}/accesspolicy
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 租户的项目ID。 |
| instance_id | 是 | String | 实例ID。 |
| topic_name | 是 | String | topic名称。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| offset | 否 | String | 分页查询偏移量。 |
| limit | 否 | String | 分页查询大小。 |
请求参数
无
响应参数
状态码: 200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| name | String | topic名称。 |
| policies | Array<Object> | 策略列表。 |
| total | Integer | 权限策略的总数。 |
| size | Integer | 查询权限策略的数量。 |
| operation | String | topic名称。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| owner | Boolean | 是否为创建topic时所选择的应用。 |
| user_name | String | 应用ID。 |
| access_policy | String | 权限类型。
|
| app_name | String | 应用名称。 |
| tag | String | 权限类型对应的标签。 |
请求示例
GET https://{endpoint}/v2/{project_id}/mqs/instances/{instance_id}/topics/{topic_name}/accesspolicy 响应示例
状态码: 200
OK
{
"name" : "topic-test",
"policies" : [ {
"owner" : true,
"user_name" : "c5abd910-02b1-4bc4-b587-c3fe4c49dab9",
"access_policy" : "pub",
"app_name" : "topic test",
"tag" : "11 || 22 || aa || bb"
} ],
"total" : 1,
"size" : 1,
"operation" : "topic-test"
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 403 | Forbidden |
错误码
请参见错误码。
父主题: 应用权限管理