UpdateGuardrailRule
PATCH/v1/customers/:customer_id/projects/:project_id/guardrails/:guardrail_id/rules/{rule.id}
UpdateGuardrailRule updates mutable rule fields. Omitted/empty scalar string fields leave the existing value untouched. Enum fields set to *_UNSPECIFIED leave the existing value untouched. Absent message fields (triggered_response, configuration) leave the existing value untouched; a present configuration Struct REPLACES the stored configuration wholesale (no deep merge). The rule id must be set inside the rule field. Returns PERMISSION_DENIED when the target rule's parent guardrail is a template (is_template=true); templates are instantiated via CreateGuardrailFromTemplate, never mutated.
An update that changes the provider or the configuration of a rule on a bedrockguardrails provider, or turns such a rule on, is refused with FAILED_PRECONDITION while a data plane serving the rule's scope reports a build older than 0.11.0, a build that cannot be read, or no build. The response's warnings carry non-fatal advisories, such as a binding to a guardrail's DRAFT.
Request
Responses
- 200
Success