Updates a custom policy
PUT/iam/policies/:id
This operation overwrites all fields excepting ID, including those omitted from the request, so be sure to specify all properties. Properties that you do not include are reset to empty values. The only exception is the policy ID, which is immutable; it can only be set at creation time.
While you can use this endpoint to update members on a policy, if that is the only property you wish to modify use one of these endpoints instead: Add policy members, Remove policy members, or Replace policy members.
Authorization Action:
iam:policies:update
Request
Path Parameters
Unique ID. Cannot be changed.
- application/json
Body
required
- Array [
- ]
Members affected by this policy.
statements object[]required
Statements for the policy.
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.
Name for this policy.
List of tenants this policy belongs to.
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 Updated Viewer Policy",
"members": [
"user:local:newuser",
"team:local:newteam"
],
"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"
}
]
}