---
title: "PATCH /automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/annotations"
method: PATCH
path: "/automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/annotations"
---

# PATCH /automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/annotations

`PATCH /automated-reasoning-policies/{policyArn}/build-workflows/{buildWorkflowId}/annotations`

Updates the annotations for an Automated Reasoning policy build workflow. This allows you to modify extracted rules, variables, and types before finalizing the policy.

## Path parameters

- `policyArn` string, required
- `buildWorkflowId` string, required

## Request body

- object
  - `annotations` AutomatedReasoningPolicyAnnotation[], required — The updated annotations containing modified rules, variables, and types for the policy.
    - `addType` object — An operation to add a new custom type to the policy, defining a set of possible values for policy variables.
      - `name` string, password, required — The name of the new custom type. This name will be used to reference the type in variable definitions and rules.
      - `description` string, password, required — A description of what the custom type represents and how it should be used in the policy.
      - `values` AutomatedReasoningPolicyDefinitionTypeValue[], required — The list of possible values that variables of this type can take, each with its own description and identifier.
        - `value` string, required — The actual value or identifier for this type value.
        - `description` string, password — A human-readable description explaining what this type value represents and when it should be used.
    - `updateType` object — An operation to modify an existing custom type in the policy, such as changing its name, description, or allowed values.
      - `name` string, password, required — The current name of the custom type to update.
      - `newName` string, password — The new name for the custom type, if you want to rename it. If not provided, the name remains unchanged.
      - `description` string, password — The new description for the custom type, replacing the previous description.
      - `values` AutomatedReasoningPolicyTypeValueAnnotation[], required — The updated list of values for the custom type, which can include additions, modifications, or removals.
        - `addTypeValue` object — An operation to add a new value to an existing custom type.
          - `value` string, required — The identifier or name of the new value to add to the type.
          - `description` string, password — A description of what this new type value represents and when it should be used.
        - `updateTypeValue` object — An operation to modify an existing value within a custom type.
          - `value` string, required — The current identifier or name of the type value to update.
          - `newValue` string — The new identifier or name for the type value, if you want to rename it.
          - `description` string, password — The new description for the type value, replacing the previous description.
        - `deleteTypeValue` object — An operation to remove a value from an existing custom type.
          - `value` string, required — The identifier or name of the value to remove from the type.
    - `deleteType` object — An operation to remove a custom type from the policy. The type must not be referenced by any variables or rules.
      - `name` string, password, required — The name of the custom type to delete from the policy. The type must not be referenced by any variables or rules.
    - `addVariable` object — An operation to add a new variable to the policy, which can be used in rule expressions to represent dynamic values.
      - `name` string, password, required — The name of the new variable. This name will be used to reference the variable in rule expressions.
      - `type` string, password, required — The type of the variable, which can be a built-in type (like string or number) or a custom type defined in the policy.
      - `description` string, password, required — A description of what the variable represents and how it should be used in rules.
    - `updateVariable` object — An operation to modify an existing variable in the policy, such as changing its name, type, or description.
      - `name` string, password, required — The current name of the variable to update.
      - `newName` string, password — The new name for the variable, if you want to rename it. If not provided, the name remains unchanged.
      - `description` string, password — The new description for the variable, replacing the previous description.
    - `deleteVariable` object — An operation to remove a variable from the policy. The variable must not be referenced by any rules.
      - `name` string, password, required — The name of the variable to delete from the policy. The variable must not be referenced by any rules.
    - `addRule` object — An operation to add a new logical rule to the policy using formal mathematical expressions.
      - `expression` string, password, required — The formal logical expression that defines the rule, using mathematical notation and referencing policy variables and types.
    - `updateRule` object — An operation to modify an existing rule in the policy, such as changing its logical expression or conditions.
      - `ruleId` string, required — The unique identifier of the rule to update.
      - `expression` string, password, required — The new formal logical expression for the rule, replacing the previous expression.
    - `deleteRule` object — An operation to remove a rule from the policy.
      - `ruleId` string, required — The unique identifier of the rule to delete from the policy.
    - `addRuleFromNaturalLanguage` object — An operation to add a new rule by converting natural language descriptions into formal logical expressions.
      - `naturalLanguage` string, password, required — The natural language description of the rule that should be converted into a formal logical expression.
    - `updateFromRulesFeedback` object — An operation to update the policy based on feedback about how specific rules performed during testing or validation.
      - `ruleIds` AutomatedReasoningPolicyDefinitionRuleId[] — The list of rule identifiers that the feedback applies to.
      - `feedback` string, password, required — The feedback information about rule performance, including suggestions for improvements or corrections.
    - `updateFromScenarioFeedback` object — An operation to update the policy based on feedback about how it performed on specific test scenarios.
      - `ruleIds` AutomatedReasoningPolicyDefinitionRuleId[] — The list of rule identifiers that were involved in the scenario being evaluated.
      - `scenarioExpression` string, password, required — The logical expression that defines the test scenario that generated this feedback.
      - `feedback` string, password — The feedback information about scenario performance, including any issues or improvements identified.
    - `ingestContent` object — An operation to process and incorporate new content into the policy, extracting additional rules and concepts.
      - `content` string, password, required — The new content to be analyzed and incorporated into the policy, such as additional documents or rule descriptions.
  - `lastUpdatedAnnotationSetHash` string, required — The hash value of the annotation set that you're updating. This is used for optimistic concurrency control to prevent conflicting updates.

## Response `200`

Success

- UpdateAutomatedReasoningPolicyAnnotationsResponse
  - `policyArn` string, required — The Amazon Resource Name (ARN) of the Automated Reasoning policy.
  - `buildWorkflowId` string, required — The unique identifier of the build workflow.
  - `annotationSetHash` string, required — The new hash value representing the updated state of the annotations.
  - `updatedAt` string, date-time, required — The timestamp when the annotations were updated.

## Other responses

- `480` — ResourceNotFoundException
- `481` — AccessDeniedException
- `482` — ValidationException
- `483` — ConflictException
- `484` — InternalServerException
- `485` — ThrottlingException

---

[API](https://skmtc.net/aws/apis/bedrock.md) · [All operations](https://skmtc.net/aws/apis/bedrock/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/bedrock/versions/3bc874e43ecd/schema)
