Reviewed-by: Gergo-Bence Lorincz <a200452876@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com> Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
27 KiB
Obtaining the Permission Policy List
Function
This API is used to obtain the permission policy list.
URI
GET /v1/permissions/rules
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
limit |
No |
Integer |
The number of records allowed on each page when the list is queried by page. The default value is -1. |
offset |
No |
Integer |
Start offset when the list is queried by page. The default value is 0. |
order_by |
No |
String |
Sorting parameter when the list is queried by page. The value can be create_at or update_at. |
order |
No |
String |
Sorting order when the list is queried by page. The value can be desc or asc. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
Identity authentication information Minimum length: 1 Maximum length: 16384 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
items |
Array of Rule objects |
Permission policy list |
total |
Integer |
Total number of records on all pages |
Parameter |
Type |
Description |
|---|---|---|
kind |
String |
API type. |
apiVersion |
String |
API version. The value is fixed at v1 and cannot be changed. |
metadata |
ObjectMeta object |
Basic information. |
spec |
RuleSpec object |
Details about the permission policy. UCS creates or updates the permission policy by spec. |
Parameter |
Type |
Description |
|---|---|---|
uid |
String |
Cluster ID |
name |
String |
Cluster name |
labels |
Map<String,String> |
Labels |
creationTimestamp |
String |
Creation time. It is the UTC time in the RFC 3339 format. |
updateTimestamp |
String |
Update timestamp |
Parameter |
Type |
Description |
|---|---|---|
iamuserids |
Array of strings |
Information of IAM users associated with a permission policy |
type |
String |
Permission policy type. The value can be readonly, develop, admin, or custom. |
contents |
Array of Content objects |
Permission policy content |
description |
String |
Permission policy description Minimum length: 0 Maximum length: 255 |
Example Requests
None
Example Responses
Status code: 200
Permission policy list
{
"items" : [ {
"metadata" : {
"name" : "admin",
"uid" : "3dcdef78-65bb-11ee-bdf2-0255ac100033",
"creationTimestamp" : "2023-10-08 09:15:36.526016 +0000 UTC",
"updateTimestamp" : "2023-10-08 09:15:36.526016 +0000 UTC"
},
"spec" : {
"iamUserIDs" : [ "873395a21c8d4d8ba9e37d6d32debc41" ],
"type" : "admin",
"contents" : [ {
"verbs" : [ "*" ],
"resources" : [ "*" ]
} ]
}
} ],
"total" : 1
}
Status Codes
Status Code |
Description |
|---|---|
200 |
Permission policy list |
400 |
Client request error. The server could not execute the request. |
500 |
Internal server error. |
Error Codes
See Error Codes.