AgentsforBedrock / Client / get_flow_version

get_flow_version

AgentsforBedrock.Client.get_flow_version(**kwargs)

Retrieves information about a version of a flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

See also: AWS API Documentation

Request Syntax

response = client.get_flow_version(
    flowIdentifier='string',
    flowVersion='string'
)
Parameters:
  • flowIdentifier (string) –

    [REQUIRED]

    The unique identifier of the flow for which to get information.

  • flowVersion (string) –

    [REQUIRED]

    The version of the flow for which to get information.

Return type:

dict

Returns:

Response Syntax

{
    'name': 'string',
    'description': 'string',
    'executionRoleArn': 'string',
    'customerEncryptionKeyArn': 'string',
    'id': 'string',
    'arn': 'string',
    'status': 'Failed'|'Prepared'|'Preparing'|'NotPrepared',
    'createdAt': datetime(2015, 1, 1),
    'version': 'string',
    'definition': {
        'nodes': [
            {
                'name': 'string',
                'type': 'Input'|'Output'|'KnowledgeBase'|'Condition'|'Lex'|'Prompt'|'LambdaFunction'|'Storage'|'Agent'|'Retrieval'|'Iterator'|'Collector'|'InlineCode'|'Loop'|'LoopInput'|'LoopController',
                'configuration': {
                    'input': {},
                    'output': {},
                    'knowledgeBase': {
                        'knowledgeBaseId': 'string',
                        'modelId': 'string',
                        'guardrailConfiguration': {
                            'guardrailIdentifier': 'string',
                            'guardrailVersion': 'string'
                        },
                        'numberOfResults': 123,
                        'promptTemplate': {
                            'textPromptTemplate': 'string'
                        },
                        'inferenceConfiguration': {
                            'text': {
                                'temperature': ...,
                                'topP': ...,
                                'maxTokens': 123,
                                'stopSequences': [
                                    'string',
                                ]
                            }
                        },
                        'rerankingConfiguration': {
                            'type': 'BEDROCK_RERANKING_MODEL',
                            'bedrockRerankingConfiguration': {
                                'modelConfiguration': {
                                    'modelArn': 'string',
                                    'additionalModelRequestFields': {
                                        'string': {...}|[...]|123|123.4|'string'|True|None
                                    }
                                },
                                'numberOfRerankedResults': 123,
                                'metadataConfiguration': {
                                    'selectionMode': 'SELECTIVE'|'ALL',
                                    'selectiveModeConfiguration': {
                                        'fieldsToInclude': [
                                            {
                                                'fieldName': 'string'
                                            },
                                        ],
                                        'fieldsToExclude': [
                                            {
                                                'fieldName': 'string'
                                            },
                                        ]
                                    }
                                }
                            }
                        },
                        'orchestrationConfiguration': {
                            'promptTemplate': {
                                'textPromptTemplate': 'string'
                            },
                            'inferenceConfig': {
                                'text': {
                                    'temperature': ...,
                                    'topP': ...,
                                    'maxTokens': 123,
                                    'stopSequences': [
                                        'string',
                                    ]
                                }
                            },
                            'additionalModelRequestFields': {
                                'string': {...}|[...]|123|123.4|'string'|True|None
                            },
                            'performanceConfig': {
                                'latency': 'standard'|'optimized'
                            }
                        }
                    },
                    'condition': {
                        'conditions': [
                            {
                                'name': 'string',
                                'expression': 'string'
                            },
                        ]
                    },
                    'lex': {
                        'botAliasArn': 'string',
                        'localeId': 'string'
                    },
                    'prompt': {
                        'sourceConfiguration': {
                            'resource': {
                                'promptArn': 'string'
                            },
                            'inline': {
                                'templateType': 'TEXT'|'CHAT',
                                'templateConfiguration': {
                                    'text': {
                                        'text': 'string',
                                        'cachePoint': {
                                            'type': 'default'
                                        },
                                        'inputVariables': [
                                            {
                                                'name': 'string'
                                            },
                                        ]
                                    },
                                    'chat': {
                                        'messages': [
                                            {
                                                'role': 'user'|'assistant',
                                                'content': [
                                                    {
                                                        'text': 'string',
                                                        'cachePoint': {
                                                            'type': 'default'
                                                        }
                                                    },
                                                ]
                                            },
                                        ],
                                        'system': [
                                            {
                                                'text': 'string',
                                                'cachePoint': {
                                                    'type': 'default'
                                                }
                                            },
                                        ],
                                        'inputVariables': [
                                            {
                                                'name': 'string'
                                            },
                                        ],
                                        'toolConfiguration': {
                                            'tools': [
                                                {
                                                    'toolSpec': {
                                                        'name': 'string',
                                                        'description': 'string',
                                                        'inputSchema': {
                                                            'json': {...}|[...]|123|123.4|'string'|True|None
                                                        }
                                                    },
                                                    'cachePoint': {
                                                        'type': 'default'
                                                    }
                                                },
                                            ],
                                            'toolChoice': {
                                                'auto': {},
                                                'any': {},
                                                'tool': {
                                                    'name': 'string'
                                                }
                                            }
                                        }
                                    }
                                },
                                'modelId': 'string',
                                'inferenceConfiguration': {
                                    'text': {
                                        'temperature': ...,
                                        'topP': ...,
                                        'maxTokens': 123,
                                        'stopSequences': [
                                            'string',
                                        ]
                                    }
                                },
                                'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None
                            }
                        },
                        'guardrailConfiguration': {
                            'guardrailIdentifier': 'string',
                            'guardrailVersion': 'string'
                        }
                    },
                    'lambdaFunction': {
                        'lambdaArn': 'string'
                    },
                    'storage': {
                        'serviceConfiguration': {
                            's3': {
                                'bucketName': 'string'
                            }
                        }
                    },
                    'agent': {
                        'agentAliasArn': 'string'
                    },
                    'retrieval': {
                        'serviceConfiguration': {
                            's3': {
                                'bucketName': 'string'
                            }
                        }
                    },
                    'iterator': {},
                    'collector': {},
                    'inlineCode': {
                        'code': 'string',
                        'language': 'Python_3'
                    },
                    'loop': {
                        'definition': {'... recursive ...'}
                    },
                    'loopInput': {},
                    'loopController': {
                        'continueCondition': {
                            'name': 'string',
                            'expression': 'string'
                        },
                        'maxIterations': 123
                    }
                },
                'inputs': [
                    {
                        'name': 'string',
                        'type': 'String'|'Number'|'Boolean'|'Object'|'Array',
                        'expression': 'string',
                        'category': 'LoopCondition'|'ReturnValueToLoopStart'|'ExitLoop'
                    },
                ],
                'outputs': [
                    {
                        'name': 'string',
                        'type': 'String'|'Number'|'Boolean'|'Object'|'Array'
                    },
                ]
            },
        ],
        'connections': [
            {
                'type': 'Data'|'Conditional',
                'name': 'string',
                'source': 'string',
                'target': 'string',
                'configuration': {
                    'data': {
                        'sourceOutput': 'string',
                        'targetInput': 'string'
                    },
                    'conditional': {
                        'condition': 'string'
                    }
                }
            },
        ]
    }
}

Response Structure

  • (dict) –

    • name (string) –

      The name of the version.

    • description (string) –

      The description of the flow.

    • executionRoleArn (string) –

      The Amazon Resource Name (ARN) of the service role with permissions to create a flow. For more information, see Create a service role for flows in Amazon Bedrock in the Amazon Bedrock User Guide.

    • customerEncryptionKeyArn (string) –

      The Amazon Resource Name (ARN) of the KMS key that the version of the flow is encrypted with.

    • id (string) –

      The unique identifier of the flow.

    • arn (string) –

      The Amazon Resource Name (ARN) of the flow.

    • status (string) –

      The status of the flow.

    • createdAt (datetime) –

      The time at which the flow was created.

    • version (string) –

      The version of the flow for which information was retrieved.

    • definition (dict) –

      The definition of the nodes and connections between nodes in the flow.

      • nodes (list) –

        An array of node definitions in the flow.

        • (dict) –

          Contains configurations about a node in the flow.

          • name (string) –

            A name for the node.

          • type (string) –

            The type of node. This value must match the name of the key that you provide in the configuration you provide in the FlowNodeConfiguration field.

          • configuration (dict) –

            Contains configurations for the node.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: input, output, knowledgeBase, condition, lex, prompt, lambdaFunction, storage, agent, retrieval, iterator, collector, inlineCode, loop, loopInput, loopController. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
            
            • input (dict) –

              Contains configurations for an input flow node in your flow. The first node in the flow. inputs can’t be specified for this node.

            • output (dict) –

              Contains configurations for an output flow node in your flow. The last node in the flow. outputs can’t be specified for this node.

            • knowledgeBase (dict) –

              Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response.

              • knowledgeBaseId (string) –

                The unique identifier of the knowledge base to query.

              • modelId (string) –

                The unique identifier of the model or inference profile to use to generate a response from the query results. Omit this field if you want to return the retrieved results as an array.

              • guardrailConfiguration (dict) –

                Contains configurations for a guardrail to apply during query and response generation for the knowledge base in this configuration.

                • guardrailIdentifier (string) –

                  The unique identifier of the guardrail.

                • guardrailVersion (string) –

                  The version of the guardrail.

              • numberOfResults (integer) –

                The number of results to retrieve from the knowledge base.

              • promptTemplate (dict) –

                A custom prompt template to use with the knowledge base for generating responses.

                • textPromptTemplate (string) –

                  The text of the prompt template.

              • inferenceConfiguration (dict) –

                Contains inference configurations for the prompt.

                Note

                This is a Tagged Union structure. Only one of the following top level keys will be set: text. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                
                • text (dict) –

                  Contains inference configurations for a text prompt.

                  • temperature (float) –

                    Controls the randomness of the response. Choose a lower value for more predictable outputs and a higher value for more surprising outputs.

                  • topP (float) –

                    The percentage of most-likely candidates that the model considers for the next token.

                  • maxTokens (integer) –

                    The maximum number of tokens to return in the response.

                  • stopSequences (list) –

                    A list of strings that define sequences after which the model will stop generating.

                    • (string) –

              • rerankingConfiguration (dict) –

                The configuration for reranking the retrieved results from the knowledge base to improve relevance.

                • type (string) –

                  Specifies the type of reranking model to use. Currently, the only supported value is BEDROCK_RERANKING_MODEL.

                • bedrockRerankingConfiguration (dict) –

                  Specifies the configuration for using an Amazon Bedrock reranker model to rerank retrieved results.

                  • modelConfiguration (dict) –

                    Specifies the configuration for the Amazon Bedrock reranker model.

                    • modelArn (string) –

                      The Amazon Resource Name (ARN) of the Amazon Bedrock reranker model.

                    • additionalModelRequestFields (dict) –

                      Specifies additional model-specific request parameters as key-value pairs that are included in the request to the Amazon Bedrock reranker model.

                      • (string) –

                        • (document) –

                  • numberOfRerankedResults (integer) –

                    Specifies the number of results to return after reranking.

                  • metadataConfiguration (dict) –

                    Specifies how metadata fields should be handled during the reranking process.

                    • selectionMode (string) –

                      The mode for selecting metadata fields for reranking.

                    • selectiveModeConfiguration (dict) –

                      The configuration for selective metadata field inclusion or exclusion during reranking.

                      Note

                      This is a Tagged Union structure. Only one of the following top level keys will be set: fieldsToInclude, fieldsToExclude. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                      
                      • fieldsToInclude (list) –

                        Specifies the metadata fields to include in the reranking process.

                        • (dict) –

                          Specifies a metadata field to include or exclude during the reranking process.

                          • fieldName (string) –

                            The name of the metadata field to include or exclude during reranking.

                      • fieldsToExclude (list) –

                        Specifies the metadata fields to exclude from the reranking process.

                        • (dict) –

                          Specifies a metadata field to include or exclude during the reranking process.

                          • fieldName (string) –

                            The name of the metadata field to include or exclude during reranking.

              • orchestrationConfiguration (dict) –

                The configuration for orchestrating the retrieval and generation process in the knowledge base node.

                • promptTemplate (dict) –

                  A custom prompt template for orchestrating the retrieval and generation process.

                  • textPromptTemplate (string) –

                    The text of the prompt template.

                • inferenceConfig (dict) –

                  Contains inference configurations for the prompt.

                  Note

                  This is a Tagged Union structure. Only one of the following top level keys will be set: text. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                  'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                  
                  • text (dict) –

                    Contains inference configurations for a text prompt.

                    • temperature (float) –

                      Controls the randomness of the response. Choose a lower value for more predictable outputs and a higher value for more surprising outputs.

                    • topP (float) –

                      The percentage of most-likely candidates that the model considers for the next token.

                    • maxTokens (integer) –

                      The maximum number of tokens to return in the response.

                    • stopSequences (list) –

                      A list of strings that define sequences after which the model will stop generating.

                      • (string) –

                • additionalModelRequestFields (dict) –

                  The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model.

                  • (string) –

                    • (document) –

                • performanceConfig (dict) –

                  The performance configuration options for the knowledge base retrieval and generation process.

                  • latency (string) –

                    The latency optimization setting.

            • condition (dict) –

              Contains configurations for a condition node in your flow. Defines conditions that lead to different branches of the flow.

              • conditions (list) –

                An array of conditions. Each member contains the name of a condition and an expression that defines the condition.

                • (dict) –

                  Defines a condition in the condition node.

                  • name (string) –

                    A name for the condition that you can reference.

                  • expression (string) –

                    Defines the condition. You must refer to at least one of the inputs in the condition. For more information, expand the Condition node section in Node types in prompt flows.

            • lex (dict) –

              Contains configurations for a Lex node in your flow. Invokes an Amazon Lex bot to identify the intent of the input and return the intent as the output.

              • botAliasArn (string) –

                The Amazon Resource Name (ARN) of the Amazon Lex bot alias to invoke.

              • localeId (string) –

                The Region to invoke the Amazon Lex bot in.

            • prompt (dict) –

              Contains configurations for a prompt node in your flow. Runs a prompt and generates the model response as the output. You can use a prompt from Prompt management or you can configure one in this node.

              • sourceConfiguration (dict) –

                Specifies whether the prompt is from Prompt management or defined inline.

                Note

                This is a Tagged Union structure. Only one of the following top level keys will be set: resource, inline. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                
                • resource (dict) –

                  Contains configurations for a prompt from Prompt management.

                  • promptArn (string) –

                    The Amazon Resource Name (ARN) of the prompt from Prompt management.

                • inline (dict) –

                  Contains configurations for a prompt that is defined inline

                  • templateType (string) –

                    The type of prompt template.

                  • templateConfiguration (dict) –

                    Contains a prompt and variables in the prompt that can be replaced with values at runtime.

                    Note

                    This is a Tagged Union structure. Only one of the following top level keys will be set: text, chat. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                    
                    • text (dict) –

                      Contains configurations for the text in a message for a prompt.

                      • text (string) –

                        The message for the prompt.

                      • cachePoint (dict) –

                        A cache checkpoint within a template configuration.

                        • type (string) –

                          Indicates that the CachePointBlock is of the default type

                      • inputVariables (list) –

                        An array of the variables in the prompt template.

                        • (dict) –

                          Contains information about a variable in the prompt.

                          • name (string) –

                            The name of the variable.

                    • chat (dict) –

                      Contains configurations to use the prompt in a conversational format.

                      • messages (list) –

                        Contains messages in the chat for the prompt.

                        • (dict) –

                          A message input or response from a model. For more information, see Create a prompt using Prompt management.

                          • role (string) –

                            The role that the message belongs to.

                          • content (list) –

                            The content in the message.

                            • (dict) –

                              Contains the content for the message you pass to, or receive from a model. For more information, see Create a prompt using Prompt management.

                              Note

                              This is a Tagged Union structure. Only one of the following top level keys will be set: text, cachePoint. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                              'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                              
                              • text (string) –

                                The text in the message.

                              • cachePoint (dict) –

                                Creates a cache checkpoint within a message.

                                • type (string) –

                                  Indicates that the CachePointBlock is of the default type

                      • system (list) –

                        Contains system prompts to provide context to the model or to describe how it should behave.

                        • (dict) –

                          Contains a system prompt to provide context to the model or to describe how it should behave. For more information, see Create a prompt using Prompt management.

                          Note

                          This is a Tagged Union structure. Only one of the following top level keys will be set: text, cachePoint. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                          'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                          
                          • text (string) –

                            The text in the system prompt.

                          • cachePoint (dict) –

                            Creates a cache checkpoint within a tool designation

                            • type (string) –

                              Indicates that the CachePointBlock is of the default type

                      • inputVariables (list) –

                        An array of the variables in the prompt template.

                        • (dict) –

                          Contains information about a variable in the prompt.

                          • name (string) –

                            The name of the variable.

                      • toolConfiguration (dict) –

                        Configuration information for the tools that the model can use when generating a response.

                        • tools (list) –

                          An array of tools to pass to a model.

                          • (dict) –

                            Contains configurations for a tool that a model can use when generating a response. For more information, see Use a tool to complete an Amazon Bedrock model response.

                            Note

                            This is a Tagged Union structure. Only one of the following top level keys will be set: toolSpec, cachePoint. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                            
                            • toolSpec (dict) –

                              The specification for the tool.

                              • name (string) –

                                The name of the tool.

                              • description (string) –

                                The description of the tool.

                              • inputSchema (dict) –

                                The input schema for the tool.

                                Note

                                This is a Tagged Union structure. Only one of the following top level keys will be set: json. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                                
                                • json (document) –

                                  A JSON object defining the input schema for the tool.

                            • cachePoint (dict) –

                              Creates a cache checkpoint within a tool designation

                              • type (string) –

                                Indicates that the CachePointBlock is of the default type

                        • toolChoice (dict) –

                          Defines which tools the model should request when invoked.

                          Note

                          This is a Tagged Union structure. Only one of the following top level keys will be set: auto, any, tool. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                          'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                          
                          • auto (dict) –

                            Defines tools. The model automatically decides whether to call a tool or to generate text instead.

                          • any (dict) –

                            Defines tools, at least one of which must be requested by the model. No text is generated but the results of tool use are sent back to the model to help generate a response.

                          • tool (dict) –

                            Defines a specific tool that the model must request. No text is generated but the results of tool use are sent back to the model to help generate a response.

                            • name (string) –

                              The name of the tool.

                  • modelId (string) –

                    The unique identifier of the model or inference profile to run inference with.

                  • inferenceConfiguration (dict) –

                    Contains inference configurations for the prompt.

                    Note

                    This is a Tagged Union structure. Only one of the following top level keys will be set: text. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                    
                    • text (dict) –

                      Contains inference configurations for a text prompt.

                      • temperature (float) –

                        Controls the randomness of the response. Choose a lower value for more predictable outputs and a higher value for more surprising outputs.

                      • topP (float) –

                        The percentage of most-likely candidates that the model considers for the next token.

                      • maxTokens (integer) –

                        The maximum number of tokens to return in the response.

                      • stopSequences (list) –

                        A list of strings that define sequences after which the model will stop generating.

                        • (string) –

                  • additionalModelRequestFields (document) –

                    Additional fields to be included in the model request for the Prompt node.

              • guardrailConfiguration (dict) –

                Contains configurations for a guardrail to apply to the prompt in this node and the response generated from it.

                • guardrailIdentifier (string) –

                  The unique identifier of the guardrail.

                • guardrailVersion (string) –

                  The version of the guardrail.

            • lambdaFunction (dict) –

              Contains configurations for a Lambda function node in your flow. Invokes an Lambda function.

              • lambdaArn (string) –

                The Amazon Resource Name (ARN) of the Lambda function to invoke.

            • storage (dict) –

              Contains configurations for a storage node in your flow. Stores an input in an Amazon S3 location.

              • serviceConfiguration (dict) –

                Contains configurations for the service to use for storing the input into the node.

                Note

                This is a Tagged Union structure. Only one of the following top level keys will be set: s3. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                
                • s3 (dict) –

                  Contains configurations for the Amazon S3 location in which to store the input into the node.

                  • bucketName (string) –

                    The name of the Amazon S3 bucket in which to store the input into the node.

            • agent (dict) –

              Contains configurations for an agent node in your flow. Invokes an alias of an agent and returns the response.

              • agentAliasArn (string) –

                The Amazon Resource Name (ARN) of the alias of the agent to invoke.

            • retrieval (dict) –

              Contains configurations for a retrieval node in your flow. Retrieves data from an Amazon S3 location and returns it as the output.

              • serviceConfiguration (dict) –

                Contains configurations for the service to use for retrieving data to return as the output from the node.

                Note

                This is a Tagged Union structure. Only one of the following top level keys will be set: s3. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
                
                • s3 (dict) –

                  Contains configurations for the Amazon S3 location from which to retrieve data to return as the output from the node.

                  • bucketName (string) –

                    The name of the Amazon S3 bucket from which to retrieve data.

            • iterator (dict) –

              Contains configurations for an iterator node in your flow. Takes an input that is an array and iteratively sends each item of the array as an output to the following node. The size of the array is also returned in the output.

              The output flow node at the end of the flow iteration will return a response for each member of the array. To return only one response, you can include a collector node downstream from the iterator node.

            • collector (dict) –

              Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs.

            • inlineCode (dict) –

              Contains configurations for an inline code node in your flow. Inline code nodes let you write and execute code directly within your flow, enabling data transformations, custom logic, and integrations without needing an external Lambda function.

              • code (string) –

                The code that’s executed in your inline code node. The code can access input data from previous nodes in the flow, perform operations on that data, and produce output that can be used by other nodes in your flow.

                The code must be valid in the programming language that you specify.

              • language (string) –

                The programming language used by your inline code node.

                The code must be valid in the programming language that you specify. Currently, only Python 3 ( Python_3) is supported.

            • loop (dict) –

              Contains configurations for a DoWhile loop in your flow.

              • definition (dict) –

                The definition of the DoWhile loop nodes and connections between nodes in the flow.

            • loopInput (dict) –

              Contains input node configurations for a DoWhile loop in your flow.

            • loopController (dict) –

              Contains controller node configurations for a DoWhile loop in your flow.

              • continueCondition (dict) –

                Specifies the condition that determines when the flow exits the DoWhile loop. The loop executes until this condition evaluates to true.

                • name (string) –

                  A name for the condition that you can reference.

                • expression (string) –

                  Defines the condition. You must refer to at least one of the inputs in the condition. For more information, expand the Condition node section in Node types in prompt flows.

              • maxIterations (integer) –

                Specifies the maximum number of times the DoWhile loop can iterate before the flow exits the loop.

          • inputs (list) –

            An array of objects, each of which contains information about an input into the node.

            • (dict) –

              Contains configurations for an input in an Amazon Bedrock Flows node.

              • name (string) –

                Specifies a name for the input that you can reference.

              • type (string) –

                Specifies the data type of the input. If the input doesn’t match this type at runtime, a validation error will be thrown.

              • expression (string) –

                An expression that formats the input for the node. For an explanation of how to create expressions, see Expressions in Prompt flows in Amazon Bedrock.

              • category (string) –

                Specifies how input data flows between iterations in a DoWhile loop.

                • LoopCondition - Controls whether the loop continues by evaluating condition expressions against the input data. Use this category to define the condition that determines if the loop should continue.

                • ReturnValueToLoopStart - Defines data to pass back to the start of the loop’s next iteration. Use this category for variables that you want to update for each loop iteration.

                • ExitLoop - Defines the value that’s available once the loop ends. Use this category to expose loop results to nodes outside the loop.

          • outputs (list) –

            A list of objects, each of which contains information about an output from the node.

            • (dict) –

              Contains configurations for an output from a node.

              • name (string) –

                A name for the output that you can reference.

              • type (string) –

                The data type of the output. If the output doesn’t match this type at runtime, a validation error will be thrown.

      • connections (list) –

        An array of connection definitions in the flow.

        • (dict) –

          Contains information about a connection between two nodes in the flow.

          • type (string) –

            Whether the source node that the connection begins from is a condition node ( Conditional) or not ( Data).

          • name (string) –

            A name for the connection that you can reference.

          • source (string) –

            The node that the connection starts at.

          • target (string) –

            The node that the connection ends at.

          • configuration (dict) –

            The configuration of the connection.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: data, conditional. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
            
            • data (dict) –

              The configuration of a connection originating from a node that isn’t a Condition node.

              • sourceOutput (string) –

                The name of the output in the source node that the connection begins from.

              • targetInput (string) –

                The name of the input in the target node that the connection ends at.

            • conditional (dict) –

              The configuration of a connection originating from a Condition node.

              • condition (string) –

                The condition that triggers this connection. For more information about how to write conditions, see the Condition node type in the Node types topic in the Amazon Bedrock User Guide.

Exceptions

  • AgentsforBedrock.Client.exceptions.ThrottlingException

  • AgentsforBedrock.Client.exceptions.AccessDeniedException

  • AgentsforBedrock.Client.exceptions.ValidationException

  • AgentsforBedrock.Client.exceptions.InternalServerException

  • AgentsforBedrock.Client.exceptions.ResourceNotFoundException