Update a policy
Modifies an existing Conjur policy. Data may be explicitly deleted using the !delete
, !revoke
, and !deny
statements. Unlike “replace” mode, no data is ever implicitly deleted.
Entity IDs must be URL-encoded. |
URI
|
Any identifier included in the URL must be URL-encoded to be recognized by the Conjur API.
Examples
Identifier |
URL-Encoded |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Permissions required
update
privilege on the policy.
Example with curl
Suppose you have a policy to load in /tmp/policy.yml
(such as the sample one provided below). The following command will create and delete data in the “root” your policy policy1:
|
Request Body
The request body should be a policy file. For example:
|
Response
Code |
Description |
---|---|
201 |
The policy was updated successfully |
401 |
The request lacks valid authentication credentials |
403 |
The authenticated user lacks the necessary privilege |
404 |
The policy referred to a role or resource that does not exist in the specified account |
409 |
Policy load already in progress, retry after a delay |
422 |
The request body was empty or the policy was not valid YAML |
Example URI
|
URI Parameters
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
account |
String |
Yes |
Organization account name Example: |
identifier |
String |
Yes |
The ID of the policy to update Example: |
Response 201
Headers
|
Body
|