update_access_policy
Replace an access policy's complete subjects and targets to change who can access which resources. Requires the current version to avoid 409 conflicts.
Instructions
Replace an access policy's complete subjects and targets, changing access permissions. Requires the current version from get_access_policy; a stale version returns HTTP 409 without retrying. Omitted name, description, effect, and enabled retain their stored values. Returns Portkey's acknowledgement; reread before retrying a conflict.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"subjects": "<subjects>",
"targets": "<targets>",
"version": "<version>",
"id": "<id>"
},
"name": "update_access_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Access policy UUID from list_access_policies or create_access_policy | |
| name | No | Policy name, unique within the workspace (1-64 characters) | |
| effect | No | Allow or deny access; omitted create effect is inferred, while omitted update effect keeps its stored value | |
| enabled | No | Whether the policy is enabled; creates default to true, updates preserve the stored value when omitted | |
| targets | Yes | Complete target list; updates replace the existing targets | |
| version | Yes | Current version from get_access_policy; a stale version returns HTTP 409 | |
| subjects | Yes | Complete subject list; updates replace the existing subjects. A side without entries matches requests without that principal | |
| description | No | Policy description; null clears it |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |