v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1411386222.7 KB

The action to apply a guardrail.

For troubleshooting some of the common errors you might encounter when using the ApplyGuardrail API, see Troubleshooting Amazon Bedrock API Error Codes in the Amazon Bedrock User Guide

post/guardrail/{guardrailIdentifier}/version/{guardrailVersion}/apply

Path parameters

guardrailIdentifierstring required

The guardrail identifier used in the request to apply the guardrail.

guardrailVersionstring required

The guardrail version used in the request to apply the guardrail.

Request body

source'INPUT' | 'OUTPUT' required

The source of data used in the request to apply the guardrail.

outputScope'INTERVENTIONS' | 'FULL'
<p>Specifies the scope of the output that you get in the response. Set to <code>FULL</code> to return the entire output, including any detected and non-detected entries in the response for enhanced debugging.</p> <p>Note that the full output scope doesn't apply to word filters or regex in sensitive information filters. It does apply to all other filtering policies, including sensitive information with filters that can detect personally identifiable information (PII).</p>

Response

Success

action'NONE' | 'GUARDRAIL_INTERVENED' required

The action taken in the response from the guardrail.

actionReasonstring

The reason for the action taken when harmful content is detected.

All 11 operations