Querying Permission Policies
Function
This API is used to query permission policies of specified streams.
URI
GET /v2/{project_id}/streams/{stream_name}/policies
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
stream_name |
Yes |
String |
Name of the DIS stream to be created. Maximum: 60 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
stream_id |
String |
Unique ID of the stream. |
rules |
Array of PrincipalRule objects |
List of authorization information records. |
Parameter |
Type |
Description |
---|---|---|
principal |
String |
ID of the authorized user. |
principal_name |
String |
Name of the authorized user If the permission is granted to all sub-users of a tenant, the format is domainName.*. If the permission is granted to a specified sub-user of a tenant, the format is domainName.userName. |
action_type |
String |
Authorization operation type
Enumeration values:
|
effect |
String |
Authorization impact type
Enumeration values:
|
Example Requests
Querying Permission Policies
GET https://{Endpoint}/v2/{project_id}/streams/{stream_name}/policies
Example Responses
Status code: 200
Normal response.
{ "streamId" : "CiFdELMr0401K9GGZlp", "rules" : [ { "action_type" : "putRecords", "principal" : "3b3f237122574xxxxb74482ae11005ba.*", "principal_name" : "anotherusername", "effect" : "accept" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Normal response. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot