Bedrock / Client / update_automated_reasoning_policy

update_automated_reasoning_policy

Bedrock.Client.update_automated_reasoning_policy(**kwargs)

Updates an existing Automated Reasoning policy with new rules, variables, or configuration. This creates a new version of the policy while preserving the previous version.

See also: AWS API Documentation

Request Syntax

response = client.update_automated_reasoning_policy(
    policyArn='string',
    policyDefinition={
        'version': 'string',
        'types': [
            {
                'name': 'string',
                'description': 'string',
                'values': [
                    {
                        'value': 'string',
                        'description': 'string'
                    },
                ]
            },
        ],
        'rules': [
            {
                'id': 'string',
                'expression': 'string',
                'alternateExpression': 'string'
            },
        ],
        'variables': [
            {
                'name': 'string',
                'type': 'string',
                'description': 'string'
            },
        ]
    },
    name='string',
    description='string'
)
Parameters:
  • policyArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the Automated Reasoning policy to update. This must be the ARN of a draft policy.

  • policyDefinition (dict) –

    [REQUIRED]

    The updated policy definition containing the formal logic rules, variables, and types.

    • version (string) –

      The version of the policy definition format.

    • types (list) –

      The custom user-defined vairable types used in the policy. Types are enum-based variable types that provide additional context beyond the predefined variable types.

      • (dict) –

        Represents a custom user-defined viarble type in an Automated Reasoning policy. Types are enum-based and provide additional context beyond predefined variable types.

        • name (string) – [REQUIRED]

          The name of the custom type.

        • description (string) –

          The description of what the custom type represents.

        • values (list) – [REQUIRED]

          The possible values for this enum-based type, each with its own description.

          • (dict) –

            Represents a single value within a custom type definition, including its identifier and description.

            • value (string) – [REQUIRED]

              The actual value or identifier for this type value.

            • description (string) –

              A human-readable description explaining what this type value represents and when it should be used.

    • rules (list) –

      The formal logic rules extracted from the source document. Rules define the logical constraints that determine whether model responses are valid, invalid, or satisfiable.

      • (dict) –

        Represents a formal logic rule in an Automated Reasoning policy. For example, rules can be expressed as if-then statements that define logical constraints.

        • id (string) – [REQUIRED]

          The unique identifier of the rule within the policy.

        • expression (string) – [REQUIRED]

          The formal logic expression of the rule.

        • alternateExpression (string) –

          The human-readable form of the rule expression, often in natural language or simplified notation.

    • variables (list) –

      The variables that represent concepts in the policy. Variables can have values assigned when translating natural language into formal logic. Their descriptions are crucial for accurate translation.

      • (dict) –

        Represents a variable in an Automated Reasoning policy. Variables represent concepts that can have values assigned during natural language translation.

        • name (string) – [REQUIRED]

          The name of the variable. Use descriptive names that clearly indicate the concept being represented.

        • type (string) – [REQUIRED]

          The data type of the variable. Valid types include bool, int, real, enum, and custom types that you can provide.

        • description (string) – [REQUIRED]

          The description of the variable that explains what it represents and how users might refer to it. Clear and comprehensive descriptions are essential for accurate natural language translation.

  • name (string) – The updated name for the Automated Reasoning policy.

  • description (string) – The updated description for the Automated Reasoning policy.

Return type:

dict

Returns:

Response Syntax

{
    'policyArn': 'string',
    'name': 'string',
    'definitionHash': 'string',
    'updatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • policyArn (string) –

      The Amazon Resource Name (ARN) of the updated policy.

    • name (string) –

      The updated name of the policy.

    • definitionHash (string) –

      The hash of the updated policy definition.

    • updatedAt (datetime) –

      The timestamp when the policy was last updated.

Exceptions