v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-14108906717.7 KB

Updates a guardrail with the values you specify.

  • Specify a name and optional description.

  • Specify messages for when the guardrail successfully blocks a prompt or a model response in the blockedInputMessaging and blockedOutputsMessaging fields.

  • Specify topics for the guardrail to deny in the topicPolicyConfig object. Each GuardrailTopicConfig object in the topicsConfig list pertains to one topic.

    • Give a name and description so that the guardrail can properly identify the topic.

    • Specify DENY in the type field.

    • (Optional) Provide up to five prompts that you would categorize as belonging to the topic in the examples list.

  • Specify filter strengths for the harmful categories defined in Amazon Bedrock in the contentPolicyConfig object. Each GuardrailContentFilterConfig object in the filtersConfig list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig.

    • Specify the category in the type field.

    • Specify the strength of the filter for prompts in the inputStrength field and for model responses in the strength field of the GuardrailContentFilterConfig.

  • (Optional) For security, include the ARN of a KMS key in the kmsKeyId field.

put/guardrails/{guardrailIdentifier}

Path parameters

guardrailIdentifierstring required

The unique identifier of the guardrail. This can be an ID or the ARN.

Request body

namestring password required

A name for the guardrail.

descriptionstring password

A description of the guardrail.

blockedInputMessagingstring password required

The message to return when the guardrail blocks a prompt.

blockedOutputsMessagingstring password required

The message to return when the guardrail blocks a model response.

kmsKeyIdstring

The ARN of the KMS key with which to encrypt the guardrail.

Response

Success

guardrailIdstring required

The unique identifier of the guardrail

guardrailArnstring required

The ARN of the guardrail.

versionstring required

The version of the guardrail.

updatedAtstring date-time required

The date and time at which the guardrail was updated.