Lists all policies
GET/iam/policies
Lists all policies.
Authorization Action:
iam:policies:list
Request
Responses
- 200
- default
A successful response.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
policies object[]
name string
Name for the policy.
id string
Unique ID. Cannot be changed.
type compiuta.api.iam.v2.Type
Possible values: [COMPIUTA_MANAGED
, CUSTOM
]
Default value: COMPIUTA_MANAGED
members string[]
Members affected by this policy. May be empty.
statements object[]
Statements for the policy. Will contain one or more.
effect compiuta.api.iam.v2.Statement.Effect
Possible values: [ALLOW
, DENY
]
Default value: ALLOW
actions string[]
Actions defined inline. May be empty. Best practices recommend that you use custom roles rather than inline actions where practical.
role string
The role defines a set of actions that the statement is scoped to.
resources string[]
Resources defined inline.
tenants string[]
The tenant list defines the set of resources that the statement is scoped to. May be empty.
tenants string[]
List of tenants this policy belongs to. May be empty.
{
"policies": [
{
"name": "My Viewer Policy 1",
"id": "custom-viewer-policy-1",
"members": [
"team:local:*"
],
"statements": [
{
"role": "viewer",
"tenants": [
"tenant1",
"tenant2"
],
"effect": "ALLOW"
},
{
"role": "myRole",
"tenants": [
"exampleTenant"
],
"effect": "ALLOW"
}
],
"tenants": []
},
{
"name": "My Custom Policy 2",
"id": "custom-policy-2",
"members": [
"team:local:test"
],
"statements": [
{
"role": "auditor",
"tenants": [
"tenant1"
],
"effect": "ALLOW"
}
],
"tenants": []
}
]
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
code int32
message string
details object[]
@type string
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Loading...