调用 DescribeTopicAuthorities 接口查看 Topic 的权限列表。
2018-01-01
。参数 | 参数类型 | 是否必选 | 示例值 | 说明 |
---|---|---|---|---|
InstanceId | String | 必选 | kafka-**** | 实例 ID。 |
TopicName | String | 必选 | my_topic | Topic 名称。 |
UserName | String | 可选 | my_user | 用于过滤的用户名称,精确匹配。 |
参数 | 参数类型 | 说明 |
---|---|---|
AllAuthority | Bool | Topic 是否配置了所有用户都可以访问。
|
Authorities | List | 查询到的用户配置列表,详细信息请参考 Authority。 |
POST https://kafka.volcengineapi.com/?Action=DescribeTopicAuthorities&Version=2018-01-01 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: kafka.volcengineapi.com
X-Date: 20210328T100802Z
Authorization: HMAC-SHA256 Credential=AK********/20210328/cn-beijing/kafka/request, SignedHeaders=x-date, Signature=********
{
"InstanceId": "kafka-****",
"TopicName": "my_topic",
"UserName": "my_user"
}
{
"ResponseMetadata": {
"RequestId": "****************",
"Action": "DescribeTopicAuthorities",
"Version": "2018-01-01",
"Service": "kafka",
"Region": "cn-beijing"
},
"Result": {
"AllAuthority": false,
"Authorities": [
{
"Name": "tetuser",
"Permission": "Read"
}
]
}
}