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