v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-141531,219979.8 KB

Updates an existing policy within the AgentCore Policy system. This operation allows modification of the policy description and definition while maintaining the policy's identity. The updated policy is validated against the Cedar schema before being applied. This is an asynchronous operation. Use the <code>GetPolicy</code> operation to poll the <code>status</code> field to track completion.

patch/policy-engines/{policyEngineId}/policies/{policyId}

Path parameters

policyEngineIdstring required

The identifier of the policy engine that manages the policy to be updated. This ensures the policy is updated within the correct policy engine context.

policyIdstring required

The unique identifier of the policy to be updated. This must be a valid policy ID that exists within the specified policy engine.

Request body

validationMode'FAIL_ON_ANY_FINDINGS' | 'IGNORE_ALL_FINDINGS'

The validation mode for the policy update. Determines how Cedar analyzer validation results are handled during policy updates. FAIL_ON_ANY_FINDINGS runs the Cedar analyzer and fails the update if validation issues are detected, ensuring the policy conforms to the Cedar schema and tool context. IGNORE_ALL_FINDINGS runs the Cedar analyzer but allows updates despite validation warnings. Use FAIL_ON_ANY_FINDINGS to ensure policy correctness during updates, especially when modifying policy logic or conditions.

enforcementMode'ACTIVE' | 'LOG_ONLY'

The enforcement mode for a policy. Run this policy in <code>LOG_ONLY</code> mode to collect data on how it affects your application. Once you are satisfied with the data gathered, switch the policy to <code>ACTIVE</code>.

Response

Success

policyIdstring required

The unique identifier of the updated policy.

namestring required

The name of the updated policy.

policyEngineIdstring required

The identifier of the policy engine managing the updated policy.

createdAtstring date-time required

The original creation timestamp of the policy.

updatedAtstring date-time required

The timestamp when the policy was last updated.

policyArnstring required

The ARN of the updated policy.

status'CREATING' | 'ACTIVE' | 'UPDATING' | 'DELETING' | 'CREATE_FAILED' | 'UPDATE_FAILED' | 'DELETE_FAILED' required

The current status of the updated policy.

enforcementMode'ACTIVE' | 'LOG_ONLY'

The current enforcement mode of the updated policy.

descriptionstring password

The updated description of the policy.

statusReasonsString[] required

Additional information about the update status.