forked from docs/doc-exports
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com> Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com> Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
9.7 KiB
9.7 KiB
Querying a Topic Policy
URI
- Parameter description
Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID
topic_urn
Yes
String
Unique resource ID of a topic. You can obtain it by referring to Querying Topics.
name
No
String
Specifies the policy name.
Only specified policy names are supported. For details, see Topic Attribute List.
If name is not specified, all attribute values of the topic are queried. The supported attribute values are provided in Topic Attribute List.
Request
Example request
GET https://{SMN_Endpoint}/v2/{project_id}/notifications/topics/urn:smn:regionId:8bad8a40e0f7462f8c1676e3f93a8183:test_create_topic_v2/attributes?name=access_policy
Response
- Parameter description
Parameter
Type
Description
request_id
String
Request ID, which is unique
attributes
Map
Attribute key-value pair
access_policy: topic access policy
introduction: description of a topic
- Example response
{ "request_id": "6837531fd3f54550927b930180a706bf", "attributes": { "access_policy": "{ "Version": "2016-09-07", "Id": "__default_policy_ID", "Statement": [ { "Sid": "__user_pub_0", "Effect": "Allow", "Principal": { "CSP": [ "urn:csp:iam::93dc1b4697ac493d9b7d089569f86b32:root" ] }, "Action": ["SMN:Publish","SMN:QueryTopicDetail"], "Resource": "urn:smn:regionId:8bad8a40e0f7462f8c1676e3f93a8183:aaa" }, { "Sid": "__service_pub_0", "Effect": "Allow", "Principal": { "Service": ["obs"] }, "Action": ["SMN:Publish","SMN:QueryTopicDetail"], "Resource": "urn:smn:regionId:8bad8a40e0f7462f8c1676e3f93a8183:aaa" } ] }" } }
Returned Value
See Returned Value.
Error Codes
See Error Codes.
Parent topic: Topic Operations