Modify a guardrail - Amazon Bedrock

Modify a guardrail

You can edit your guardrails by following these steps for the Amazon Bedrock console or API:

Console
To edit a guardrail
  1. Sign in to the AWS Management Console using an IAM role with Amazon Bedrock permissions, and open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock/.

  2. Choose Guardrails from the left navigation pane. Then, select a guardrail in the Guardrails section.

  3. To modify your guardrail's name, description, cross-Region inference configuration, or model encryption settings, select Edit in the Guardrail Overview section. When you're done, select Save and exit.

  4. To edit your guardrail's tags, select Manage tags. When you're done, select Save and exit.

  5. To modify what policies your guardrail uses, select Working Draft and then Edit for each type of policy that you want to configure. When you're done making changes to your guardrail's policies, select Save and exit.

  6. When you're done making changes to your guardrail, select Save and exit.

API

To edit a guardrail, send a UpdateGuardrail request. Include both fields that you want to update as well as fields that you want to keep the same.

The following is the request format:

PUT /guardrails/guardrailIdentifier HTTP/1.1 Content-type: application/json { "blockedInputMessaging": "string", "blockedOutputsMessaging": "string", "contentPolicyConfig": { "filtersConfig": [ { "inputStrength": "NONE | LOW | MEDIUM | HIGH", "outputStrength": "NONE | LOW | MEDIUM | HIGH", "type": "SEXUAL | VIOLENCE | HATE | INSULTS" } ] }, "description": "string", "kmsKeyId": "string", "name": "string", "tags": [ { "key": "string", "value": "string" } ], "topicPolicyConfig": { "topicsConfig": [ { "definition": "string", "examples": [ "string" ], "name": "string", "type": "DENY" } ] } }

The following is the response format:

HTTP/1.1 202 Content-type: application/json { "guardrailArn": "string", "guardrailId": "string", "updatedAt": "string", "version": "string" }