This API is used to query permission policies of specified streams.
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 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
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:
|
Querying Permission Policies
GET https://{Endpoint}/v2/{project_id}/streams/{stream_name}/policies
Status code: 200
Normal response.
{ "streamId" : "CiFdELMr0401K9GGZlp", "rules" : [ { "action_type" : "putRecords", "principal" : "3b3f237122574xxxxb74482ae11005ba.*", "principal_name" : "anotherusername", "effect" : "accept" } ] }
Status Code |
Description |
---|---|
200 |
Normal response. |
See Error Codes.