Replace a policy
Loads or replaces a Conjur policy document.
|
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 loads this as the
|
Request Body
The request body is a policy file. For example:
|
Response
Code |
Description |
---|---|
201 |
The policy was loaded or replaced 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 load Example: |
Response 201
Headers
|
Body
|