Amazon Bedrock

2026/03/16 - Amazon Bedrock - 3 updated api methods

Changes  You can now generate policy scenarios on demand using the new GENERATE POLICY SCENARIOS build workflow type. Scenarios will no longer be automatically generated during INGEST CONTENT, REFINE POLICY, and IMPORT POLICY workflows, resulting in faster completion times for these operations.

GetAutomatedReasoningPolicyBuildWorkflow (updated) Link ¶
Changes (response)
{'buildWorkflowType': {'GENERATE_POLICY_SCENARIOS'}}

Retrieves detailed information about an Automated Reasoning policy build workflow, including its status, configuration, and metadata.

See also: AWS API Documentation

Request Syntax

client.get_automated_reasoning_policy_build_workflow(
    policyArn='string',
    buildWorkflowId='string'
)
type policyArn:

string

param policyArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflow you want to retrieve.

type buildWorkflowId:

string

param buildWorkflowId:

[REQUIRED]

The unique identifier of the build workflow to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'policyArn': 'string',
    'buildWorkflowId': 'string',
    'status': 'SCHEDULED'|'CANCEL_REQUESTED'|'PREPROCESSING'|'BUILDING'|'TESTING'|'COMPLETED'|'FAILED'|'CANCELLED',
    'buildWorkflowType': 'INGEST_CONTENT'|'REFINE_POLICY'|'IMPORT_POLICY'|'GENERATE_FIDELITY_REPORT'|'GENERATE_POLICY_SCENARIOS',
    'documentName': 'string',
    'documentContentType': 'pdf'|'txt',
    'documentDescription': 'string',
    'createdAt': datetime(2015, 1, 1),
    'updatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • policyArn (string) --

      The Amazon Resource Name (ARN) of the Automated Reasoning policy.

    • buildWorkflowId (string) --

      The unique identifier of the build workflow.

    • status (string) --

      The current status of the build workflow (e.g., RUNNING, COMPLETED, FAILED, CANCELLED).

    • buildWorkflowType (string) --

      The type of build workflow being executed (e.g., DOCUMENT_INGESTION, POLICY_REPAIR).

    • documentName (string) --

      The name of the source document used in the build workflow.

    • documentContentType (string) --

      The content type of the source document (e.g., text/plain, application/pdf).

    • documentDescription (string) --

      A detailed description of the document's content and how it should be used in the policy generation process.

    • createdAt (datetime) --

      The timestamp when the build workflow was created.

    • updatedAt (datetime) --

      The timestamp when the build workflow was last updated.

ListAutomatedReasoningPolicyBuildWorkflows (updated) Link ¶
Changes (response)
{'automatedReasoningPolicyBuildWorkflowSummaries': {'buildWorkflowType': {'GENERATE_POLICY_SCENARIOS'}}}

Lists all build workflows for an Automated Reasoning policy, showing the history of policy creation and modification attempts.

See also: AWS API Documentation

Request Syntax

client.list_automated_reasoning_policy_build_workflows(
    policyArn='string',
    nextToken='string',
    maxResults=123
)
type policyArn:

string

param policyArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflows you want to list.

type nextToken:

string

param nextToken:

A pagination token from a previous request to continue listing build workflows from where the previous request left off.

type maxResults:

integer

param maxResults:

The maximum number of build workflows to return in a single response. Valid range is 1-100.

rtype:

dict

returns:

Response Syntax

{
    'automatedReasoningPolicyBuildWorkflowSummaries': [
        {
            'policyArn': 'string',
            'buildWorkflowId': 'string',
            'status': 'SCHEDULED'|'CANCEL_REQUESTED'|'PREPROCESSING'|'BUILDING'|'TESTING'|'COMPLETED'|'FAILED'|'CANCELLED',
            'buildWorkflowType': 'INGEST_CONTENT'|'REFINE_POLICY'|'IMPORT_POLICY'|'GENERATE_FIDELITY_REPORT'|'GENERATE_POLICY_SCENARIOS',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • automatedReasoningPolicyBuildWorkflowSummaries (list) --

      A list of build workflow summaries, each containing key information about a build workflow including its status and timestamps.

      • (dict) --

        Provides a summary of a policy build workflow, including its current status, timing information, and key identifiers.

        • policyArn (string) --

          The Amazon Resource Name (ARN) of the Automated Reasoning policy associated with this build workflow.

        • buildWorkflowId (string) --

          The unique identifier of the build workflow.

        • status (string) --

          The current status of the build workflow (e.g., RUNNING, COMPLETED, FAILED, CANCELLED).

        • buildWorkflowType (string) --

          The type of build workflow (e.g., DOCUMENT_INGESTION, POLICY_REPAIR).

        • createdAt (datetime) --

          The timestamp when the build workflow was created.

        • updatedAt (datetime) --

          The timestamp when the build workflow was last updated.

    • nextToken (string) --

      A pagination token to use in subsequent requests to retrieve additional build workflows.

StartAutomatedReasoningPolicyBuildWorkflow (updated) Link ¶
Changes (request)
{'buildWorkflowType': {'GENERATE_POLICY_SCENARIOS'}}

Starts a new build workflow for an Automated Reasoning policy. This initiates the process of analyzing source documents and generating policy rules, variables, and types.

See also: AWS API Documentation

Request Syntax

client.start_automated_reasoning_policy_build_workflow(
    policyArn='string',
    buildWorkflowType='INGEST_CONTENT'|'REFINE_POLICY'|'IMPORT_POLICY'|'GENERATE_FIDELITY_REPORT'|'GENERATE_POLICY_SCENARIOS',
    clientRequestToken='string',
    sourceContent={
        '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'
                },
            ]
        },
        'workflowContent': {
            'documents': [
                {
                    'document': b'bytes',
                    'documentContentType': 'pdf'|'txt',
                    'documentName': 'string',
                    'documentDescription': 'string'
                },
            ],
            'policyRepairAssets': {
                'annotations': [
                    {
                        'addType': {
                            'name': 'string',
                            'description': 'string',
                            'values': [
                                {
                                    'value': 'string',
                                    'description': 'string'
                                },
                            ]
                        },
                        'updateType': {
                            'name': 'string',
                            'newName': 'string',
                            'description': 'string',
                            'values': [
                                {
                                    'addTypeValue': {
                                        'value': 'string',
                                        'description': 'string'
                                    },
                                    'updateTypeValue': {
                                        'value': 'string',
                                        'newValue': 'string',
                                        'description': 'string'
                                    },
                                    'deleteTypeValue': {
                                        'value': 'string'
                                    }
                                },
                            ]
                        },
                        'deleteType': {
                            'name': 'string'
                        },
                        'addVariable': {
                            'name': 'string',
                            'type': 'string',
                            'description': 'string'
                        },
                        'updateVariable': {
                            'name': 'string',
                            'newName': 'string',
                            'description': 'string'
                        },
                        'deleteVariable': {
                            'name': 'string'
                        },
                        'addRule': {
                            'expression': 'string'
                        },
                        'updateRule': {
                            'ruleId': 'string',
                            'expression': 'string'
                        },
                        'deleteRule': {
                            'ruleId': 'string'
                        },
                        'addRuleFromNaturalLanguage': {
                            'naturalLanguage': 'string'
                        },
                        'updateFromRulesFeedback': {
                            'ruleIds': [
                                'string',
                            ],
                            'feedback': 'string'
                        },
                        'updateFromScenarioFeedback': {
                            'ruleIds': [
                                'string',
                            ],
                            'scenarioExpression': 'string',
                            'feedback': 'string'
                        },
                        'ingestContent': {
                            'content': 'string'
                        }
                    },
                ]
            },
            'generateFidelityReportContent': {
                'documents': [
                    {
                        'document': b'bytes',
                        'documentContentType': 'pdf'|'txt',
                        'documentName': 'string',
                        'documentDescription': 'string'
                    },
                ]
            }
        }
    }
)
type policyArn:

string

param policyArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the Automated Reasoning policy for which to start the build workflow.

type buildWorkflowType:

string

param buildWorkflowType:

[REQUIRED]

The type of build workflow to start (e.g., DOCUMENT_INGESTION for processing new documents, POLICY_REPAIR for fixing existing policies).

type clientRequestToken:

string

param clientRequestToken:

A unique, case-sensitive identifier to ensure that the operation completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request but doesn't return an error.

This field is autopopulated if not provided.

type sourceContent:

dict

param sourceContent:

[REQUIRED]

The source content for the build workflow, such as documents to analyze or repair instructions for existing policies.

  • policyDefinition (dict) --

    An existing policy definition that serves as the starting point for the build workflow, typically used in policy repair or update scenarios.

    • 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.

  • workflowContent (dict) --

    The actual content to be processed in the build workflow, such as documents to analyze or repair instructions to apply.

    • documents (list) --

      The list of documents to be processed in a document ingestion workflow.

      • (dict) --

        Represents a source document used in the policy build workflow, containing the content and metadata needed for policy generation.

        • document (bytes) -- [REQUIRED]

          The actual content of the source document that will be analyzed to extract policy rules and concepts.

        • documentContentType (string) -- [REQUIRED]

          The MIME type of the document content (e.g., text/plain, application/pdf, text/markdown).

        • documentName (string) -- [REQUIRED]

          A descriptive name for the document that helps identify its purpose and content.

        • documentDescription (string) --

          A detailed description of the document's content and how it should be used in the policy generation process.

    • policyRepairAssets (dict) --

      The assets and instructions needed for a policy repair workflow, including repair annotations and guidance.

      • annotations (list) -- [REQUIRED]

        Specific annotations or modifications to apply during the policy repair process, such as rule corrections or variable updates.

        • (dict) --

          Contains the various operations that can be performed on an Automated Reasoning policy, including adding, updating, and deleting rules, variables, and types.

          • addType (dict) --

            An operation to add a new custom type to the policy, defining a set of possible values for policy variables.

            • name (string) -- [REQUIRED]

              The name of the new custom type. This name will be used to reference the type in variable definitions and rules.

            • description (string) -- [REQUIRED]

              A description of what the custom type represents and how it should be used in the policy.

            • values (list) -- [REQUIRED]

              The list of possible values that variables of this type can take, each with its own description and identifier.

              • (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.

          • updateType (dict) --

            An operation to modify an existing custom type in the policy, such as changing its name, description, or allowed values.

            • name (string) -- [REQUIRED]

              The current name of the custom type to update.

            • newName (string) --

              The new name for the custom type, if you want to rename it. If not provided, the name remains unchanged.

            • description (string) --

              The new description for the custom type, replacing the previous description.

            • values (list) -- [REQUIRED]

              The updated list of values for the custom type, which can include additions, modifications, or removals.

              • (dict) --

                An annotation for managing values within custom types, including adding, updating, or removing specific type values.

                • addTypeValue (dict) --

                  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) --

                    A description of what this new type value represents and when it should be used.

                • updateTypeValue (dict) --

                  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) --

                    The new description for the type value, replacing the previous description.

                • deleteTypeValue (dict) --

                  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 (dict) --

            An operation to remove a custom type from the policy. The type must not be referenced by any variables or rules.

            • name (string) -- [REQUIRED]

              The name of the custom type to delete from the policy. The type must not be referenced by any variables or rules.

          • addVariable (dict) --

            An operation to add a new variable to the policy, which can be used in rule expressions to represent dynamic values.

            • name (string) -- [REQUIRED]

              The name of the new variable. This name will be used to reference the variable in rule expressions.

            • type (string) -- [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) -- [REQUIRED]

              A description of what the variable represents and how it should be used in rules.

          • updateVariable (dict) --

            An operation to modify an existing variable in the policy, such as changing its name, type, or description.

            • name (string) -- [REQUIRED]

              The current name of the variable to update.

            • newName (string) --

              The new name for the variable, if you want to rename it. If not provided, the name remains unchanged.

            • description (string) --

              The new description for the variable, replacing the previous description.

          • deleteVariable (dict) --

            An operation to remove a variable from the policy. The variable must not be referenced by any rules.

            • name (string) -- [REQUIRED]

              The name of the variable to delete from the policy. The variable must not be referenced by any rules.

          • addRule (dict) --

            An operation to add a new logical rule to the policy using formal mathematical expressions.

            • expression (string) -- [REQUIRED]

              The formal logical expression that defines the rule, using mathematical notation and referencing policy variables and types.

          • updateRule (dict) --

            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) -- [REQUIRED]

              The new formal logical expression for the rule, replacing the previous expression.

          • deleteRule (dict) --

            An operation to remove a rule from the policy.

            • ruleId (string) -- [REQUIRED]

              The unique identifier of the rule to delete from the policy.

          • addRuleFromNaturalLanguage (dict) --

            An operation to add a new rule by converting natural language descriptions into formal logical expressions.

            • naturalLanguage (string) -- [REQUIRED]

              The natural language description of the rule that should be converted into a formal logical expression.

          • updateFromRulesFeedback (dict) --

            An operation to update the policy based on feedback about how specific rules performed during testing or validation.

            • ruleIds (list) --

              The list of rule identifiers that the feedback applies to.

              • (string) --

            • feedback (string) -- [REQUIRED]

              The feedback information about rule performance, including suggestions for improvements or corrections.

          • updateFromScenarioFeedback (dict) --

            An operation to update the policy based on feedback about how it performed on specific test scenarios.

            • ruleIds (list) --

              The list of rule identifiers that were involved in the scenario being evaluated.

              • (string) --

            • scenarioExpression (string) -- [REQUIRED]

              The logical expression that defines the test scenario that generated this feedback.

            • feedback (string) --

              The feedback information about scenario performance, including any issues or improvements identified.

          • ingestContent (dict) --

            An operation to process and incorporate new content into the policy, extracting additional rules and concepts.

            • content (string) -- [REQUIRED]

              The new content to be analyzed and incorporated into the policy, such as additional documents or rule descriptions.

    • generateFidelityReportContent (dict) --

      The content configuration for generating a fidelity report workflow. This can include source documents to analyze or an existing fidelity report to update with a new policy definition.

      • documents (list) --

        Source documents to analyze for generating a new fidelity report. The documents will be processed to create atomic statements and grounding information.

        • (dict) --

          Represents a source document used in the policy build workflow, containing the content and metadata needed for policy generation.

          • document (bytes) -- [REQUIRED]

            The actual content of the source document that will be analyzed to extract policy rules and concepts.

          • documentContentType (string) -- [REQUIRED]

            The MIME type of the document content (e.g., text/plain, application/pdf, text/markdown).

          • documentName (string) -- [REQUIRED]

            A descriptive name for the document that helps identify its purpose and content.

          • documentDescription (string) --

            A detailed description of the document's content and how it should be used in the policy generation process.

rtype:

dict

returns:

Response Syntax

{
    'policyArn': 'string',
    'buildWorkflowId': 'string'
}

Response Structure

  • (dict) --

    • policyArn (string) --

      The Amazon Resource Name (ARN) of the Automated Reasoning policy.

    • buildWorkflowId (string) --

      The unique identifier of the newly started build workflow. Use this ID to track the workflow's progress and retrieve its results.