AgentsforBedrock **************** Client ====== class AgentsforBedrock.Client A low-level client representing Agents for Amazon Bedrock Describes the API operations for creating and managing Amazon Bedrock agents. import boto3 client = boto3.client('bedrock-agent') These are the available methods: * associate_agent_collaborator * associate_agent_knowledge_base * can_paginate * close * create_agent * create_agent_action_group * create_agent_alias * create_data_source * create_flow * create_flow_alias * create_flow_version * create_knowledge_base * create_prompt * create_prompt_version * delete_agent * delete_agent_action_group * delete_agent_alias * delete_agent_version * delete_data_source * delete_flow * delete_flow_alias * delete_flow_version * delete_knowledge_base * delete_knowledge_base_documents * delete_prompt * disassociate_agent_collaborator * disassociate_agent_knowledge_base * get_agent * get_agent_action_group * get_agent_alias * get_agent_collaborator * get_agent_knowledge_base * get_agent_version * get_data_source * get_flow * get_flow_alias * get_flow_version * get_ingestion_job * get_knowledge_base * get_knowledge_base_documents * get_paginator * get_prompt * get_waiter * ingest_knowledge_base_documents * list_agent_action_groups * list_agent_aliases * list_agent_collaborators * list_agent_knowledge_bases * list_agent_versions * list_agents * list_data_sources * list_flow_aliases * list_flow_versions * list_flows * list_ingestion_jobs * list_knowledge_base_documents * list_knowledge_bases * list_prompts * list_tags_for_resource * prepare_agent * prepare_flow * start_ingestion_job * stop_ingestion_job * tag_resource * untag_resource * update_agent * update_agent_action_group * update_agent_alias * update_agent_collaborator * update_agent_knowledge_base * update_data_source * update_flow * update_flow_alias * update_knowledge_base * update_prompt * validate_flow_definition Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * ListAgentActionGroups * ListAgentAliases * ListAgentCollaborators * ListAgentKnowledgeBases * ListAgentVersions * ListAgents * ListDataSources * ListFlowAliases * ListFlowVersions * ListFlows * ListIngestionJobs * ListKnowledgeBaseDocuments * ListKnowledgeBases * ListPrompts AgentsforBedrock / Paginator / ListFlowAliases ListFlowAliases *************** class AgentsforBedrock.Paginator.ListFlowAliases paginator = client.get_paginator('list_flow_aliases') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_flow_aliases()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( flowIdentifier='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow for which aliases are being returned. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'flowAliasSummaries': [ { 'arn': 'string', 'concurrencyConfiguration': { 'maxConcurrency': 123, 'type': 'Automatic'|'Manual' }, 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'flowId': 'string', 'id': 'string', 'name': 'string', 'routingConfiguration': [ { 'flowVersion': 'string' }, ], 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **flowAliasSummaries** *(list) --* A list, each member of which contains information about an alias. * *(dict) --* Contains information about an alias of a flow. This data type is used in the following API operations: * ListFlowAliases response * **arn** *(string) --* The Amazon Resource Name (ARN) of the alias. * **concurrencyConfiguration** *(dict) --* The configuration that specifies how nodes in the flow are executed concurrently. * **maxConcurrency** *(integer) --* The maximum number of nodes that can be executed concurrently in the flow. * **type** *(string) --* The type of concurrency to use for parallel node execution. Specify one of the following options: * "Automatic" - Amazon Bedrock determines which nodes can be executed in parallel based on the flow definition and its dependencies. * "Manual" - You specify which nodes can be executed in parallel. * **createdAt** *(datetime) --* The time at which the alias was created. * **description** *(string) --* A description of the alias. * **flowId** *(string) --* The unique identifier of the flow. * **id** *(string) --* The unique identifier of the alias of the flow. * **name** *(string) --* The name of the alias. * **routingConfiguration** *(list) --* A list of configurations about the versions that the alias maps to. Currently, you can only specify one. * *(dict) --* Contains information about a version that the alias maps to. * **flowVersion** *(string) --* The version that the alias maps to. * **updatedAt** *(datetime) --* The time at which the alias was last updated. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListIngestionJobs ListIngestionJobs ***************** class AgentsforBedrock.Paginator.ListIngestionJobs paginator = client.get_paginator('list_ingestion_jobs') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_ingestion_jobs()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( dataSourceId='string', filters=[ { 'attribute': 'STATUS', 'operator': 'EQ', 'values': [ 'string', ] }, ], knowledgeBaseId='string', sortBy={ 'attribute': 'STATUS'|'STARTED_AT', 'order': 'ASCENDING'|'DESCENDING' }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source for the list of data ingestion jobs. * **filters** (*list*) -- Contains information about the filters for filtering the data. * *(dict) --* The definition of a filter to filter the data. * **attribute** *(string) --* **[REQUIRED]** The name of field or attribute to apply the filter. * **operator** *(string) --* **[REQUIRED]** The operation to apply to the field or attribute. * **values** *(list) --* **[REQUIRED]** A list of values that belong to the field or attribute. * *(string) --* * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base for the list of data ingestion jobs. * **sortBy** (*dict*) -- Contains details about how to sort the data. * **attribute** *(string) --* **[REQUIRED]** The name of field or attribute to apply sorting of data. * **order** *(string) --* **[REQUIRED]** The order for sorting the data. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'ingestionJobSummaries': [ { 'dataSourceId': 'string', 'description': 'string', 'ingestionJobId': 'string', 'knowledgeBaseId': 'string', 'startedAt': datetime(2015, 1, 1), 'statistics': { 'numberOfDocumentsDeleted': 123, 'numberOfDocumentsFailed': 123, 'numberOfDocumentsScanned': 123, 'numberOfMetadataDocumentsModified': 123, 'numberOfMetadataDocumentsScanned': 123, 'numberOfModifiedDocumentsIndexed': 123, 'numberOfNewDocumentsIndexed': 123 }, 'status': 'STARTING'|'IN_PROGRESS'|'COMPLETE'|'FAILED'|'STOPPING'|'STOPPED', 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **ingestionJobSummaries** *(list) --* A list of data ingestion jobs with information about each job. * *(dict) --* Contains details about a data ingestion job. * **dataSourceId** *(string) --* The unique identifier of the data source for the data ingestion job. * **description** *(string) --* The description of the data ingestion job. * **ingestionJobId** *(string) --* The unique identifier of the data ingestion job. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base for the data ingestion job. * **startedAt** *(datetime) --* The time the data ingestion job started. * **statistics** *(dict) --* Contains statistics for the data ingestion job. * **numberOfDocumentsDeleted** *(integer) --* The number of source documents that were deleted. * **numberOfDocumentsFailed** *(integer) --* The number of source documents that failed to be ingested. * **numberOfDocumentsScanned** *(integer) --* The total number of source documents that were scanned. Includes new, updated, and unchanged documents. * **numberOfMetadataDocumentsModified** *(integer) --* The number of metadata files that were updated or deleted. * **numberOfMetadataDocumentsScanned** *(integer) --* The total number of metadata files that were scanned. Includes new, updated, and unchanged files. * **numberOfModifiedDocumentsIndexed** *(integer) --* The number of modified source documents in the data source that were successfully indexed. * **numberOfNewDocumentsIndexed** *(integer) --* The number of new source documents in the data source that were successfully indexed. * **status** *(string) --* The status of the data ingestion job. * **updatedAt** *(datetime) --* The time the data ingestion job was last updated. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListKnowledgeBaseDocuments ListKnowledgeBaseDocuments ************************** class AgentsforBedrock.Paginator.ListKnowledgeBaseDocuments paginator = client.get_paginator('list_knowledge_base_documents') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_knowledge_base_documents()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( dataSourceId='string', knowledgeBaseId='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source that contains the documents. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base that is connected to the data source. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'documentDetails': [ { 'dataSourceId': 'string', 'identifier': { 'custom': { 'id': 'string' }, 'dataSourceType': 'CUSTOM'|'S3', 's3': { 'uri': 'string' } }, 'knowledgeBaseId': 'string', 'status': 'INDEXED'|'PARTIALLY_INDEXED'|'PENDING'|'FAILED'|'METADATA_PARTIALLY_INDEXED'|'METADATA_UPDATE_FAILED'|'IGNORED'|'NOT_FOUND'|'STARTING'|'IN_PROGRESS'|'DELETING'|'DELETE_IN_PROGRESS', 'statusReason': 'string', 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **documentDetails** *(list) --* A list of objects, each of which contains information about the documents that were retrieved. * *(dict) --* Contains the details for a document that was ingested or deleted. * **dataSourceId** *(string) --* The identifier of the data source connected to the knowledge base that the document was ingested into or deleted from. * **identifier** *(dict) --* Contains information that identifies the document. * **custom** *(dict) --* Contains information that identifies the document in a custom data source. * **id** *(string) --* The identifier of the document to ingest into a custom data source. * **dataSourceType** *(string) --* The type of data source connected to the knowledge base that contains the document. * **s3** *(dict) --* Contains information that identifies the document in an S3 data source. * **uri** *(string) --* The location's URI. For example, "s3://my-bucket /chunk-processor/". * **knowledgeBaseId** *(string) --* The identifier of the knowledge base that the document was ingested into or deleted from. * **status** *(string) --* The ingestion status of the document. The following statuses are possible: * STARTED – You submitted the ingestion job containing the document. * PENDING – The document is waiting to be ingested. * IN_PROGRESS – The document is being ingested. * INDEXED – The document was successfully indexed. * PARTIALLY_INDEXED – The document was partially indexed. * METADATA_PARTIALLY_INDEXED – You submitted metadata for an existing document and it was partially indexed. * METADATA_UPDATE_FAILED – You submitted a metadata update for an existing document but it failed. * FAILED – The document failed to be ingested. * NOT_FOUND – The document wasn't found. * IGNORED – The document was ignored during ingestion. * DELETING – You submitted the delete job containing the document. * DELETE_IN_PROGRESS – The document is being deleted. * **statusReason** *(string) --* The reason for the status. Appears alongside the status "IGNORED". * **updatedAt** *(datetime) --* The date and time at which the document was last updated. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListAgentCollaborators ListAgentCollaborators ********************** class AgentsforBedrock.Paginator.ListAgentCollaborators paginator = client.get_paginator('list_agent_collaborators') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_agent_collaborators()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( agentId='string', agentVersion='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The agent's ID. * **agentVersion** (*string*) -- **[REQUIRED]** The agent's version. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'agentCollaboratorSummaries': [ { 'agentDescriptor': { 'aliasArn': 'string' }, 'agentId': 'string', 'agentVersion': 'string', 'collaborationInstruction': 'string', 'collaboratorId': 'string', 'collaboratorName': 'string', 'createdAt': datetime(2015, 1, 1), 'lastUpdatedAt': datetime(2015, 1, 1), 'relayConversationHistory': 'TO_COLLABORATOR'|'DISABLED' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **agentCollaboratorSummaries** *(list) --* A list of collaborator summaries. * *(dict) --* An agent collaborator summary. * **agentDescriptor** *(dict) --* The collaborator's agent descriptor. * **aliasArn** *(string) --* The agent's alias ARN. * **agentId** *(string) --* The collaborator's agent ID. * **agentVersion** *(string) --* The collaborator's agent version. * **collaborationInstruction** *(string) --* The collaborator's collaboration instruction. * **collaboratorId** *(string) --* The collaborator's ID. * **collaboratorName** *(string) --* The collaborator's name. * **createdAt** *(datetime) --* When the collaborator was created. * **lastUpdatedAt** *(datetime) --* When the collaborator was last updated. * **relayConversationHistory** *(string) --* The collaborator's relay conversation history. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListPrompts ListPrompts *********** class AgentsforBedrock.Paginator.ListPrompts paginator = client.get_paginator('list_prompts') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_prompts()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( promptIdentifier='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **promptIdentifier** (*string*) -- The unique identifier of the prompt for whose versions you want to return information. Omit this field to list information about all prompts in an account. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'promptSummaries': [ { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'id': 'string', 'name': 'string', 'updatedAt': datetime(2015, 1, 1), 'version': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **promptSummaries** *(list) --* A list, each member of which contains information about a prompt using Prompt management. * *(dict) --* Contains information about a prompt in your Prompt management tool. This data type is used in the following API operations: * ListPrompts response * **arn** *(string) --* The Amazon Resource Name (ARN) of the prompt or the prompt version (if you specified a version in the request). * **createdAt** *(datetime) --* The time at which the prompt was created. * **description** *(string) --* The description of the prompt. * **id** *(string) --* The unique identifier of the prompt. * **name** *(string) --* The name of the prompt. * **updatedAt** *(datetime) --* The time at which the prompt was last updated. * **version** *(string) --* The version of the prompt that this summary applies to. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListAgentKnowledgeBases ListAgentKnowledgeBases *********************** class AgentsforBedrock.Paginator.ListAgentKnowledgeBases paginator = client.get_paginator('list_agent_knowledge_bases') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_agent_knowledge_bases()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( agentId='string', agentVersion='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent for which to return information about knowledge bases associated with it. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent for which to return information about knowledge bases associated with it. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'agentKnowledgeBaseSummaries': [ { 'description': 'string', 'knowledgeBaseId': 'string', 'knowledgeBaseState': 'ENABLED'|'DISABLED', 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **agentKnowledgeBaseSummaries** *(list) --* A list of objects, each of which contains information about a knowledge base associated with the agent. * *(dict) --* Contains details about a knowledge base associated with an agent. * **description** *(string) --* The description of the knowledge base associated with an agent. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base associated with an agent. * **knowledgeBaseState** *(string) --* Specifies whether the agent uses the knowledge base or not when sending an InvokeAgent request. * **updatedAt** *(datetime) --* The time at which the knowledge base associated with an agent was last updated. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListAgentActionGroups ListAgentActionGroups ********************* class AgentsforBedrock.Paginator.ListAgentActionGroups paginator = client.get_paginator('list_agent_action_groups') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_agent_action_groups()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( agentId='string', agentVersion='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'actionGroupSummaries': [ { 'actionGroupId': 'string', 'actionGroupName': 'string', 'actionGroupState': 'ENABLED'|'DISABLED', 'description': 'string', 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **actionGroupSummaries** *(list) --* A list of objects, each of which contains information about an action group. * *(dict) --* Contains details about an action group. * **actionGroupId** *(string) --* The unique identifier of the action group. * **actionGroupName** *(string) --* The name of the action group. * **actionGroupState** *(string) --* Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request. * **description** *(string) --* The description of the action group. * **updatedAt** *(datetime) --* The time at which the action group was last updated. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListFlowVersions ListFlowVersions **************** class AgentsforBedrock.Paginator.ListFlowVersions paginator = client.get_paginator('list_flow_versions') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_flow_versions()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( flowIdentifier='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'flowVersionSummaries': [ { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'id': 'string', 'status': 'Failed'|'Prepared'|'Preparing'|'NotPrepared', 'version': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **flowVersionSummaries** *(list) --* A list, each member of which contains information about a flow. * *(dict) --* Contains information about a version of a flow. This data type is used in the following API operations: * ListFlowVersions response * **arn** *(string) --* The Amazon Resource Name (ARN) of the flow that the version belongs to. * **createdAt** *(datetime) --* The time at the version was created. * **id** *(string) --* The unique identifier of the flow. * **status** *(string) --* The status of the flow. * **version** *(string) --* The version of the flow. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListAgentVersions ListAgentVersions ***************** class AgentsforBedrock.Paginator.ListAgentVersions paginator = client.get_paginator('list_agent_versions') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_agent_versions()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( agentId='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'agentVersionSummaries': [ { 'agentName': 'string', 'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING', 'agentVersion': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **agentVersionSummaries** *(list) --* A list of objects, each of which contains information about a version of the agent. * *(dict) --* Contains details about a version of an agent. * **agentName** *(string) --* The name of the agent to which the version belongs. * **agentStatus** *(string) --* The status of the agent to which the version belongs. * **agentVersion** *(string) --* The version of the agent. * **createdAt** *(datetime) --* The time at which the version was created. * **description** *(string) --* The description of the version of the agent. * **guardrailConfiguration** *(dict) --* Details about the guardrail associated with the agent. * **guardrailIdentifier** *(string) --* The unique identifier of the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **updatedAt** *(datetime) --* The time at which the version was last updated. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListFlows ListFlows ********* class AgentsforBedrock.Paginator.ListFlows paginator = client.get_paginator('list_flows') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_flows()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max- items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'flowSummaries': [ { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'id': 'string', 'name': 'string', 'status': 'Failed'|'Prepared'|'Preparing'|'NotPrepared', 'updatedAt': datetime(2015, 1, 1), 'version': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **flowSummaries** *(list) --* A list, each member of which contains information about a flow. * *(dict) --* Contains the definition of a flow. * **arn** *(string) --* The Amazon Resource Name (ARN) of the flow. * **createdAt** *(datetime) --* The time at which the flow was created. * **description** *(string) --* A description of the flow. * **id** *(string) --* The unique identifier of the flow. * **name** *(string) --* The name of the flow. * **status** *(string) --* The status of the flow. The following statuses are possible: * NotPrepared – The flow has been created or updated, but hasn't been prepared. If you just created the flow, you can't test it. If you updated the flow, the "DRAFT" version won't contain the latest changes for testing. Send a PrepareFlow request to package the latest changes into the "DRAFT" version. * Preparing – The flow is being prepared so that the "DRAFT" version contains the latest changes for testing. * Prepared – The flow is prepared and the "DRAFT" version contains the latest changes for testing. * Failed – The last API operation that you invoked on the flow failed. Send a GetFlow request and check the error message in the "validations" field. * **updatedAt** *(datetime) --* The time at which the flow was last updated. * **version** *(string) --* The latest version of the flow. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListAgents ListAgents ********** class AgentsforBedrock.Paginator.ListAgents paginator = client.get_paginator('list_agents') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_agents()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max- items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'agentSummaries': [ { 'agentId': 'string', 'agentName': 'string', 'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING', 'description': 'string', 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'latestAgentVersion': 'string', 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **agentSummaries** *(list) --* A list of objects, each of which contains information about an agent. * *(dict) --* Contains details about an agent. * **agentId** *(string) --* The unique identifier of the agent. * **agentName** *(string) --* The name of the agent. * **agentStatus** *(string) --* The status of the agent. * **description** *(string) --* The description of the agent. * **guardrailConfiguration** *(dict) --* Details about the guardrail associated with the agent. * **guardrailIdentifier** *(string) --* The unique identifier of the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **latestAgentVersion** *(string) --* The latest version of the agent. * **updatedAt** *(datetime) --* The time at which the agent was last updated. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListDataSources ListDataSources *************** class AgentsforBedrock.Paginator.ListDataSources paginator = client.get_paginator('list_data_sources') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_data_sources()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( knowledgeBaseId='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base for which to return a list of information. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'dataSourceSummaries': [ { 'dataSourceId': 'string', 'description': 'string', 'knowledgeBaseId': 'string', 'name': 'string', 'status': 'AVAILABLE'|'DELETING'|'DELETE_UNSUCCESSFUL', 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **dataSourceSummaries** *(list) --* A list of objects, each of which contains information about a data source. * *(dict) --* Contains details about a data source. * **dataSourceId** *(string) --* The unique identifier of the data source. * **description** *(string) --* The description of the data source. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base to which the data source belongs. * **name** *(string) --* The name of the data source. * **status** *(string) --* The status of the data source. * **updatedAt** *(datetime) --* The time at which the data source was last updated. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListKnowledgeBases ListKnowledgeBases ****************** class AgentsforBedrock.Paginator.ListKnowledgeBases paginator = client.get_paginator('list_knowledge_bases') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_knowledge_bases()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max- items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'knowledgeBaseSummaries': [ { 'description': 'string', 'knowledgeBaseId': 'string', 'name': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED'|'DELETE_UNSUCCESSFUL', 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **knowledgeBaseSummaries** *(list) --* A list of knowledge bases with information about each knowledge base. * *(dict) --* Contains details about a knowledge base. * **description** *(string) --* The description of the knowledge base. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base. * **name** *(string) --* The name of the knowledge base. * **status** *(string) --* The status of the knowledge base. * **updatedAt** *(datetime) --* The time the knowledge base was last updated. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Paginator / ListAgentAliases ListAgentAliases **************** class AgentsforBedrock.Paginator.ListAgentAliases paginator = client.get_paginator('list_agent_aliases') paginate(**kwargs) Creates an iterator that will paginate through responses from "AgentsforBedrock.Client.list_agent_aliases()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( agentId='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'agentAliasSummaries': [ { 'agentAliasId': 'string', 'agentAliasName': 'string', 'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING'|'DISSOCIATED', 'aliasInvocationState': 'ACCEPT_INVOCATIONS'|'REJECT_INVOCATIONS', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'routingConfiguration': [ { 'agentVersion': 'string', 'provisionedThroughput': 'string' }, ], 'updatedAt': datetime(2015, 1, 1) }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **agentAliasSummaries** *(list) --* A list of objects, each of which contains information about an alias of the agent. * *(dict) --* Contains details about an alias of an agent. * **agentAliasId** *(string) --* Contains details about * **agentAliasName** *(string) --* The name of the alias. * **agentAliasStatus** *(string) --* The status of the alias. * **aliasInvocationState** *(string) --* The invocation state for the agent alias. If the agent alias is running, the value is "ACCEPT_INVOCATIONS". If the agent alias is paused, the value is "REJECT_INVOCATIONS". Use the "UpdateAgentAlias" operation to change the invocation state. * **createdAt** *(datetime) --* The time at which the alias of the agent was created. * **description** *(string) --* The description of the alias. * **routingConfiguration** *(list) --* Contains details about the version of the agent with which the alias is associated. * *(dict) --* Contains details about the routing configuration of the alias. * **agentVersion** *(string) --* The version of the agent with which the alias is associated. * **provisionedThroughput** *(string) --* Information on the Provisioned Throughput assigned to an agent alias. * **updatedAt** *(datetime) --* The time at which the alias was last updated. * **NextToken** *(string) --* A token to resume pagination. AgentsforBedrock / Client / get_paginator get_paginator ************* AgentsforBedrock.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. AgentsforBedrock / Client / list_flow_versions list_flow_versions ****************** AgentsforBedrock.Client.list_flow_versions(**kwargs) Returns a list of information about each 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.list_flow_versions( flowIdentifier='string', maxResults=123, nextToken='string' ) Parameters: * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. Return type: dict Returns: **Response Syntax** { 'flowVersionSummaries': [ { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'id': 'string', 'status': 'Failed'|'Prepared'|'Preparing'|'NotPrepared', 'version': 'string' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **flowVersionSummaries** *(list) --* A list, each member of which contains information about a flow. * *(dict) --* Contains information about a version of a flow. This data type is used in the following API operations: * ListFlowVersions response * **arn** *(string) --* The Amazon Resource Name (ARN) of the flow that the version belongs to. * **createdAt** *(datetime) --* The time at the version was created. * **id** *(string) --* The unique identifier of the flow. * **status** *(string) --* The status of the flow. * **version** *(string) --* The version of the flow. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / list_flow_aliases list_flow_aliases ***************** AgentsforBedrock.Client.list_flow_aliases(**kwargs) Returns a list of aliases for a flow. See also: AWS API Documentation **Request Syntax** response = client.list_flow_aliases( flowIdentifier='string', maxResults=123, nextToken='string' ) Parameters: * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow for which aliases are being returned. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. Return type: dict Returns: **Response Syntax** { 'flowAliasSummaries': [ { 'arn': 'string', 'concurrencyConfiguration': { 'maxConcurrency': 123, 'type': 'Automatic'|'Manual' }, 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'flowId': 'string', 'id': 'string', 'name': 'string', 'routingConfiguration': [ { 'flowVersion': 'string' }, ], 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **flowAliasSummaries** *(list) --* A list, each member of which contains information about an alias. * *(dict) --* Contains information about an alias of a flow. This data type is used in the following API operations: * ListFlowAliases response * **arn** *(string) --* The Amazon Resource Name (ARN) of the alias. * **concurrencyConfiguration** *(dict) --* The configuration that specifies how nodes in the flow are executed concurrently. * **maxConcurrency** *(integer) --* The maximum number of nodes that can be executed concurrently in the flow. * **type** *(string) --* The type of concurrency to use for parallel node execution. Specify one of the following options: * "Automatic" - Amazon Bedrock determines which nodes can be executed in parallel based on the flow definition and its dependencies. * "Manual" - You specify which nodes can be executed in parallel. * **createdAt** *(datetime) --* The time at which the alias was created. * **description** *(string) --* A description of the alias. * **flowId** *(string) --* The unique identifier of the flow. * **id** *(string) --* The unique identifier of the alias of the flow. * **name** *(string) --* The name of the alias. * **routingConfiguration** *(list) --* A list of configurations about the versions that the alias maps to. Currently, you can only specify one. * *(dict) --* Contains information about a version that the alias maps to. * **flowVersion** *(string) --* The version that the alias maps to. * **updatedAt** *(datetime) --* The time at which the alias was last updated. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / get_data_source get_data_source *************** AgentsforBedrock.Client.get_data_source(**kwargs) Gets information about a data source. See also: AWS API Documentation **Request Syntax** response = client.get_data_source( dataSourceId='string', knowledgeBaseId='string' ) Parameters: * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base for the data source. Return type: dict Returns: **Response Syntax** { 'dataSource': { 'createdAt': datetime(2015, 1, 1), 'dataDeletionPolicy': 'RETAIN'|'DELETE', 'dataSourceConfiguration': { 'confluenceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'BASIC'|'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostType': 'SAAS', 'hostUrl': 'string' } }, 's3Configuration': { 'bucketArn': 'string', 'bucketOwnerAccountId': 'string', 'inclusionPrefixes': [ 'string', ] }, 'salesforceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostUrl': 'string' } }, 'sharePointConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS'|'OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'domain': 'string', 'hostType': 'ONLINE', 'siteUrls': [ 'string', ], 'tenantId': 'string' } }, 'type': 'S3'|'WEB'|'CONFLUENCE'|'SALESFORCE'|'SHAREPOINT'|'CUSTOM'|'REDSHIFT_METADATA', 'webConfiguration': { 'crawlerConfiguration': { 'crawlerLimits': { 'maxPages': 123, 'rateLimit': 123 }, 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'scope': 'HOST_ONLY'|'SUBDOMAINS', 'userAgent': 'string', 'userAgentHeader': 'string' }, 'sourceConfiguration': { 'urlConfiguration': { 'seedUrls': [ { 'url': 'string' }, ] } } } }, 'dataSourceId': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseId': 'string', 'name': 'string', 'serverSideEncryptionConfiguration': { 'kmsKeyArn': 'string' }, 'status': 'AVAILABLE'|'DELETING'|'DELETE_UNSUCCESSFUL', 'updatedAt': datetime(2015, 1, 1), 'vectorIngestionConfiguration': { 'chunkingConfiguration': { 'chunkingStrategy': 'FIXED_SIZE'|'NONE'|'HIERARCHICAL'|'SEMANTIC', 'fixedSizeChunkingConfiguration': { 'maxTokens': 123, 'overlapPercentage': 123 }, 'hierarchicalChunkingConfiguration': { 'levelConfigurations': [ { 'maxTokens': 123 }, ], 'overlapTokens': 123 }, 'semanticChunkingConfiguration': { 'breakpointPercentileThreshold': 123, 'bufferSize': 123, 'maxTokens': 123 } }, 'contextEnrichmentConfiguration': { 'bedrockFoundationModelConfiguration': { 'enrichmentStrategyConfiguration': { 'method': 'CHUNK_ENTITY_EXTRACTION' }, 'modelArn': 'string' }, 'type': 'BEDROCK_FOUNDATION_MODEL' }, 'customTransformationConfiguration': { 'intermediateStorage': { 's3Location': { 'uri': 'string' } }, 'transformations': [ { 'stepToApply': 'POST_CHUNKING', 'transformationFunction': { 'transformationLambdaConfiguration': { 'lambdaArn': 'string' } } }, ] }, 'parsingConfiguration': { 'bedrockDataAutomationConfiguration': { 'parsingModality': 'MULTIMODAL' }, 'bedrockFoundationModelConfiguration': { 'modelArn': 'string', 'parsingModality': 'MULTIMODAL', 'parsingPrompt': { 'parsingPromptText': 'string' } }, 'parsingStrategy': 'BEDROCK_FOUNDATION_MODEL'|'BEDROCK_DATA_AUTOMATION' } } } } **Response Structure** * *(dict) --* * **dataSource** *(dict) --* Contains details about the data source. * **createdAt** *(datetime) --* The time at which the data source was created. * **dataDeletionPolicy** *(string) --* The data deletion policy for the data source. * **dataSourceConfiguration** *(dict) --* The connection configuration for the data source. * **confluenceConfiguration** *(dict) --* The configuration information to connect to Confluence as your data source. Note: Confluence data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the Confluence content. For example, configuring specific types of Confluence content. * **filterConfiguration** *(dict) --* The configuration of filtering the Confluence content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* The supported object type or content type of the data source. * **type** *(string) --* The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* The endpoint information to connect to your Confluence data source. * **authType** *(string) --* The supported authentication type to authenticate and connect to your Confluence instance. * **credentialsSecretArn** *(string) --* The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration. * **hostType** *(string) --* The supported host type, whether online/cloud or server/on-premises. * **hostUrl** *(string) --* The Confluence host URL or instance URL. * **s3Configuration** *(dict) --* The configuration information to connect to Amazon S3 as your data source. * **bucketArn** *(string) --* The Amazon Resource Name (ARN) of the S3 bucket that contains your data. * **bucketOwnerAccountId** *(string) --* The account ID for the owner of the S3 bucket. * **inclusionPrefixes** *(list) --* A list of S3 prefixes to include certain files or content. For more information, see Organizing objects using prefixes. * *(string) --* * **salesforceConfiguration** *(dict) --* The configuration information to connect to Salesforce as your data source. Note: Salesforce data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the Salesforce content. For example, configuring specific types of Salesforce content. * **filterConfiguration** *(dict) --* The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* The supported object type or content type of the data source. * **type** *(string) --* The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* The endpoint information to connect to your Salesforce data source. * **authType** *(string) --* The supported authentication type to authenticate and connect to your Salesforce instance. * **credentialsSecretArn** *(string) --* The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration. * **hostUrl** *(string) --* The Salesforce host URL or instance URL. * **sharePointConfiguration** *(dict) --* The configuration information to connect to SharePoint as your data source. Note: SharePoint data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the SharePoint content. For example, configuring specific types of SharePoint content. * **filterConfiguration** *(dict) --* The configuration of filtering the SharePoint content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* The supported object type or content type of the data source. * **type** *(string) --* The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* The endpoint information to connect to your SharePoint data source. * **authType** *(string) --* The supported authentication type to authenticate and connect to your SharePoint site/sites. * **credentialsSecretArn** *(string) --* The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see SharePoint connection configuration. * **domain** *(string) --* The domain of your SharePoint instance or site URL/URLs. * **hostType** *(string) --* The supported host type, whether online/cloud or server/on-premises. * **siteUrls** *(list) --* A list of one or more SharePoint site URLs. * *(string) --* * **tenantId** *(string) --* The identifier of your Microsoft 365 tenant. * **type** *(string) --* The type of data source. * **webConfiguration** *(dict) --* The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs. Note: Crawling web URLs as your data source is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The Web Crawler configuration details for the web data source. * **crawlerLimits** *(dict) --* The configuration of crawl limits for the web URLs. * **maxPages** *(integer) --* The max number of web pages crawled from your source URLs, up to 25,000 pages. If the web pages exceed this limit, the data source sync will fail and no web pages will be ingested. * **rateLimit** *(integer) --* The max rate at which pages are crawled, up to 300 per minute per host. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled. * *(string) --* * **scope** *(string) --* The scope of what is crawled for your URLs. You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL "https://d ocs.aws.amazon.com/bedrock/latest/userguide/" and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain "aws.amazon.com" can also include sub domain "docs.aws.amazon.com". * **userAgent** *(string) --* Returns the user agent suffix for your web crawler. * **userAgentHeader** *(string) --* A string used for identifying the crawler or bot when it accesses a web server. The user agent header value consists of the "bedrockbot", UUID, and a user agent suffix for your crawler (if one is provided). By default, it is set to "bedrockbot_UUID". You can optionally append a custom suffix to "bedrockbot_UUID" to allowlist a specific user agent permitted to access your source URLs. * **sourceConfiguration** *(dict) --* The source configuration details for the web data source. * **urlConfiguration** *(dict) --* The configuration of the URL/URLs. * **seedUrls** *(list) --* One or more seed or starting point URLs. * *(dict) --* The seed or starting point URL. You should be authorized to crawl the URL. * **url** *(string) --* A seed or starting point URL. * **dataSourceId** *(string) --* The unique identifier of the data source. * **description** *(string) --* The description of the data source. * **failureReasons** *(list) --* The detailed reasons on the failure to delete a data source. * *(string) --* * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base to which the data source belongs. * **name** *(string) --* The name of the data source. * **serverSideEncryptionConfiguration** *(dict) --* Contains details about the configuration of the server- side encryption. * **kmsKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key used to encrypt the resource. * **status** *(string) --* The status of the data source. The following statuses are possible: * Available – The data source has been created and is ready for ingestion into the knowledge base. * Deleting – The data source is being deleted. * **updatedAt** *(datetime) --* The time at which the data source was last updated. * **vectorIngestionConfiguration** *(dict) --* Contains details about how to ingest the documents in the data source. * **chunkingConfiguration** *(dict) --* Details about how to chunk the documents in the data source. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. * **chunkingStrategy** *(string) --* Knowledge base can split your source data into chunks. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for "NONE", then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk. * "FIXED_SIZE" – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the "fixedSizeChunkingConfiguration". * "HIERARCHICAL" – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer. * "SEMANTIC" – Split documents into chunks based on groups of similar content derived with natural language processing. * "NONE" – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files. * **fixedSizeChunkingConfiguration** *(dict) --* Configurations for when you choose fixed-size chunking. If you set the "chunkingStrategy" as "NONE", exclude this field. * **maxTokens** *(integer) --* The maximum number of tokens to include in a chunk. * **overlapPercentage** *(integer) --* The percentage of overlap between adjacent chunks of a data source. * **hierarchicalChunkingConfiguration** *(dict) --* Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer. * **levelConfigurations** *(list) --* Token settings for each layer. * *(dict) --* Token settings for a layer in a hierarchical chunking configuration. * **maxTokens** *(integer) --* The maximum number of tokens that a chunk can contain in this layer. * **overlapTokens** *(integer) --* The number of tokens to repeat across chunks in the same layer. * **semanticChunkingConfiguration** *(dict) --* Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing. * **breakpointPercentileThreshold** *(integer) --* The dissimilarity threshold for splitting chunks. * **bufferSize** *(integer) --* The buffer size. * **maxTokens** *(integer) --* The maximum number of tokens that a chunk can contain. * **contextEnrichmentConfiguration** *(dict) --* The context enrichment configuration used for ingestion of the data into the vector store. * **bedrockFoundationModelConfiguration** *(dict) --* The configuration of the Amazon Bedrock foundation model used for context enrichment. * **enrichmentStrategyConfiguration** *(dict) --* The enrichment stategy used to provide additional context. For example, Neptune GraphRAG uses Amazon Bedrock foundation models to perform chunk entity extraction. * **method** *(string) --* The method used for the context enrichment strategy. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base. * **type** *(string) --* The method used for context enrichment. It must be Amazon Bedrock foundation models. * **customTransformationConfiguration** *(dict) --* A custom document transformer for parsed data source documents. * **intermediateStorage** *(dict) --* An S3 bucket path for input and output objects. * **s3Location** *(dict) --* An S3 bucket path. * **uri** *(string) --* The location's URI. For example, "s3://my-bucket /chunk-processor/". * **transformations** *(list) --* A Lambda function that processes documents. * *(dict) --* A custom processing step for documents moving through a data source ingestion pipeline. To process documents after they have been converted into chunks, set the step to apply to "POST_CHUNKING". * **stepToApply** *(string) --* When the service applies the transformation. * **transformationFunction** *(dict) --* A Lambda function that processes documents. * **transformationLambdaConfiguration** *(dict) --* The Lambda function. * **lambdaArn** *(string) --* The function's ARN identifier. * **parsingConfiguration** *(dict) --* Configurations for a parser to use for parsing documents in your data source. If you exclude this field, the default parser will be used. * **bedrockDataAutomationConfiguration** *(dict) --* If you specify "BEDROCK_DATA_AUTOMATION" as the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser. * **parsingModality** *(string) --* Specifies whether to enable parsing of multimodal data, including both text and/or images. * **bedrockFoundationModelConfiguration** *(dict) --* If you specify "BEDROCK_FOUNDATION_MODEL" as the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents. * **modelArn** *(string) --* The ARN of the foundation model to use for parsing. * **parsingModality** *(string) --* Specifies whether to enable parsing of multimodal data, including both text and/or images. * **parsingPrompt** *(dict) --* Instructions for interpreting the contents of a document. * **parsingPromptText** *(string) --* Instructions for interpreting the contents of a document. * **parsingStrategy** *(string) --* The parsing strategy for the data source. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / delete_agent_action_group delete_agent_action_group ************************* AgentsforBedrock.Client.delete_agent_action_group(**kwargs) Deletes an action group in an agent. See also: AWS API Documentation **Request Syntax** response = client.delete_agent_action_group( actionGroupId='string', agentId='string', agentVersion='string', skipResourceInUseCheck=True|False ) Parameters: * **actionGroupId** (*string*) -- **[REQUIRED]** The unique identifier of the action group to delete. * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent that the action group belongs to. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent that the action group belongs to. * **skipResourceInUseCheck** (*boolean*) -- By default, this value is "false" and deletion is stopped if the resource is in use. If you set it to "true", the resource will be deleted even if the resource is in use. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / list_agents list_agents *********** AgentsforBedrock.Client.list_agents(**kwargs) Lists the agents belonging to an account and information about each agent. See also: AWS API Documentation **Request Syntax** response = client.list_agents( maxResults=123, nextToken='string' ) Parameters: * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. Return type: dict Returns: **Response Syntax** { 'agentSummaries': [ { 'agentId': 'string', 'agentName': 'string', 'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING', 'description': 'string', 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'latestAgentVersion': 'string', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **agentSummaries** *(list) --* A list of objects, each of which contains information about an agent. * *(dict) --* Contains details about an agent. * **agentId** *(string) --* The unique identifier of the agent. * **agentName** *(string) --* The name of the agent. * **agentStatus** *(string) --* The status of the agent. * **description** *(string) --* The description of the agent. * **guardrailConfiguration** *(dict) --* Details about the guardrail associated with the agent. * **guardrailIdentifier** *(string) --* The unique identifier of the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **latestAgentVersion** *(string) --* The latest version of the agent. * **updatedAt** *(datetime) --* The time at which the agent was last updated. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" AgentsforBedrock / Client / can_paginate can_paginate ************ AgentsforBedrock.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. AgentsforBedrock / Client / list_knowledge_base_documents list_knowledge_base_documents ***************************** AgentsforBedrock.Client.list_knowledge_base_documents(**kwargs) Retrieves all the documents contained in a data source that is connected to a knowledge base. For more information, see Ingest changes directly into a knowledge base in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.list_knowledge_base_documents( dataSourceId='string', knowledgeBaseId='string', maxResults=123, nextToken='string' ) Parameters: * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source that contains the documents. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base that is connected to the data source. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. Return type: dict Returns: **Response Syntax** { 'documentDetails': [ { 'dataSourceId': 'string', 'identifier': { 'custom': { 'id': 'string' }, 'dataSourceType': 'CUSTOM'|'S3', 's3': { 'uri': 'string' } }, 'knowledgeBaseId': 'string', 'status': 'INDEXED'|'PARTIALLY_INDEXED'|'PENDING'|'FAILED'|'METADATA_PARTIALLY_INDEXED'|'METADATA_UPDATE_FAILED'|'IGNORED'|'NOT_FOUND'|'STARTING'|'IN_PROGRESS'|'DELETING'|'DELETE_IN_PROGRESS', 'statusReason': 'string', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **documentDetails** *(list) --* A list of objects, each of which contains information about the documents that were retrieved. * *(dict) --* Contains the details for a document that was ingested or deleted. * **dataSourceId** *(string) --* The identifier of the data source connected to the knowledge base that the document was ingested into or deleted from. * **identifier** *(dict) --* Contains information that identifies the document. * **custom** *(dict) --* Contains information that identifies the document in a custom data source. * **id** *(string) --* The identifier of the document to ingest into a custom data source. * **dataSourceType** *(string) --* The type of data source connected to the knowledge base that contains the document. * **s3** *(dict) --* Contains information that identifies the document in an S3 data source. * **uri** *(string) --* The location's URI. For example, "s3://my-bucket /chunk-processor/". * **knowledgeBaseId** *(string) --* The identifier of the knowledge base that the document was ingested into or deleted from. * **status** *(string) --* The ingestion status of the document. The following statuses are possible: * STARTED – You submitted the ingestion job containing the document. * PENDING – The document is waiting to be ingested. * IN_PROGRESS – The document is being ingested. * INDEXED – The document was successfully indexed. * PARTIALLY_INDEXED – The document was partially indexed. * METADATA_PARTIALLY_INDEXED – You submitted metadata for an existing document and it was partially indexed. * METADATA_UPDATE_FAILED – You submitted a metadata update for an existing document but it failed. * FAILED – The document failed to be ingested. * NOT_FOUND – The document wasn't found. * IGNORED – The document was ignored during ingestion. * DELETING – You submitted the delete job containing the document. * DELETE_IN_PROGRESS – The document is being deleted. * **statusReason** *(string) --* The reason for the status. Appears alongside the status "IGNORED". * **updatedAt** *(datetime) --* The date and time at which the document was last updated. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / update_knowledge_base update_knowledge_base ********************* AgentsforBedrock.Client.update_knowledge_base(**kwargs) Updates the configuration of a knowledge base with the fields that you specify. Because all fields will be overwritten, you must include the same values for fields that you want to keep the same. You can change the following fields: * "name" * "description" * "roleArn" You can't change the "knowledgeBaseConfiguration" or "storageConfiguration" fields, so you must specify the same configurations as when you created the knowledge base. You can send a GetKnowledgeBase request and copy the same configurations. See also: AWS API Documentation **Request Syntax** response = client.update_knowledge_base( description='string', knowledgeBaseConfiguration={ 'kendraKnowledgeBaseConfiguration': { 'kendraIndexArn': 'string' }, 'sqlKnowledgeBaseConfiguration': { 'redshiftConfiguration': { 'queryEngineConfiguration': { 'provisionedConfiguration': { 'authConfiguration': { 'databaseUser': 'string', 'type': 'IAM'|'USERNAME_PASSWORD'|'USERNAME', 'usernamePasswordSecretArn': 'string' }, 'clusterIdentifier': 'string' }, 'serverlessConfiguration': { 'authConfiguration': { 'type': 'IAM'|'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string' }, 'workgroupArn': 'string' }, 'type': 'SERVERLESS'|'PROVISIONED' }, 'queryGenerationConfiguration': { 'executionTimeoutSeconds': 123, 'generationContext': { 'curatedQueries': [ { 'naturalLanguage': 'string', 'sql': 'string' }, ], 'tables': [ { 'columns': [ { 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ], 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ] } }, 'storageConfigurations': [ { 'awsDataCatalogConfiguration': { 'tableNames': [ 'string', ] }, 'redshiftConfiguration': { 'databaseName': 'string' }, 'type': 'REDSHIFT'|'AWS_DATA_CATALOG' }, ] }, 'type': 'REDSHIFT' }, 'type': 'VECTOR'|'KENDRA'|'SQL', 'vectorKnowledgeBaseConfiguration': { 'embeddingModelArn': 'string', 'embeddingModelConfiguration': { 'bedrockEmbeddingModelConfiguration': { 'dimensions': 123, 'embeddingDataType': 'FLOAT32'|'BINARY' } }, 'supplementalDataStorageConfiguration': { 'storageLocations': [ { 's3Location': { 'uri': 'string' }, 'type': 'S3' }, ] } } }, knowledgeBaseId='string', name='string', roleArn='string', storageConfiguration={ 'mongoDbAtlasConfiguration': { 'collectionName': 'string', 'credentialsSecretArn': 'string', 'databaseName': 'string', 'endpoint': 'string', 'endpointServiceName': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'textIndexName': 'string', 'vectorIndexName': 'string' }, 'neptuneAnalyticsConfiguration': { 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'graphArn': 'string' }, 'opensearchManagedClusterConfiguration': { 'domainArn': 'string', 'domainEndpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'opensearchServerlessConfiguration': { 'collectionArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'pineconeConfiguration': { 'connectionString': 'string', 'credentialsSecretArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'namespace': 'string' }, 'rdsConfiguration': { 'credentialsSecretArn': 'string', 'databaseName': 'string', 'fieldMapping': { 'customMetadataField': 'string', 'metadataField': 'string', 'primaryKeyField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'resourceArn': 'string', 'tableName': 'string' }, 'redisEnterpriseCloudConfiguration': { 'credentialsSecretArn': 'string', 'endpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 's3VectorsConfiguration': { 'indexArn': 'string', 'indexName': 'string', 'vectorBucketArn': 'string' }, 'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD'|'RDS'|'MONGO_DB_ATLAS'|'NEPTUNE_ANALYTICS'|'OPENSEARCH_MANAGED_CLUSTER'|'S3_VECTORS' } ) Parameters: * **description** (*string*) -- Specifies a new description for the knowledge base. * **knowledgeBaseConfiguration** (*dict*) -- **[REQUIRED]** Specifies the configuration for the embeddings model used for the knowledge base. You must use the same configuration as when the knowledge base was created. * **kendraKnowledgeBaseConfiguration** *(dict) --* Settings for an Amazon Kendra knowledge base. * **kendraIndexArn** *(string) --* **[REQUIRED]** The ARN of the Amazon Kendra index. * **sqlKnowledgeBaseConfiguration** *(dict) --* Specifies configurations for a knowledge base connected to an SQL database. * **redshiftConfiguration** *(dict) --* Specifies configurations for a knowledge base connected to an Amazon Redshift database. * **queryEngineConfiguration** *(dict) --* **[REQUIRED]** Specifies configurations for an Amazon Redshift query engine. * **provisionedConfiguration** *(dict) --* Specifies configurations for a provisioned Amazon Redshift query engine. * **authConfiguration** *(dict) --* **[REQUIRED]** Specifies configurations for authentication to Amazon Redshift. * **databaseUser** *(string) --* The database username for authentication to an Amazon Redshift provisioned data warehouse. * **type** *(string) --* **[REQUIRED]** The type of authentication to use. * **usernamePasswordSecretArn** *(string) --* The ARN of an Secrets Manager secret for authentication. * **clusterIdentifier** *(string) --* **[REQUIRED]** The ID of the Amazon Redshift cluster. * **serverlessConfiguration** *(dict) --* Specifies configurations for a serverless Amazon Redshift query engine. * **authConfiguration** *(dict) --* **[REQUIRED]** Specifies configurations for authentication to an Amazon Redshift provisioned data warehouse. * **type** *(string) --* **[REQUIRED]** The type of authentication to use. * **usernamePasswordSecretArn** *(string) --* The ARN of an Secrets Manager secret for authentication. * **workgroupArn** *(string) --* **[REQUIRED]** The ARN of the Amazon Redshift workgroup. * **type** *(string) --* **[REQUIRED]** The type of query engine. * **queryGenerationConfiguration** *(dict) --* Specifies configurations for generating queries. * **executionTimeoutSeconds** *(integer) --* The time after which query generation will time out. * **generationContext** *(dict) --* Specifies configurations for context to use during query generation. * **curatedQueries** *(list) --* An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries. * *(dict) --* Contains configurations for a query, each of which defines information about example queries to help the query engine generate appropriate SQL queries. * **naturalLanguage** *(string) --* **[REQUIRED]** An example natural language query. * **sql** *(string) --* **[REQUIRED]** The SQL equivalent of the natural language query. * **tables** *(list) --* An array of objects, each of which defines information about a table in the database. * *(dict) --* Contains information about a table for the query engine to consider. * **columns** *(list) --* An array of objects, each of which defines information about a column in the table. * *(dict) --* Contains information about a column in the current table for the query engine to consider. * **description** *(string) --* A description of the column that helps the query engine understand the contents of the column. * **inclusion** *(string) --* Specifies whether to include or exclude the column during query generation. If you specify "EXCLUDE", the column will be ignored. If you specify "INCLUDE", all other columns in the table will be ignored. * **name** *(string) --* The name of the column for which the other fields in this object apply. * **description** *(string) --* A description of the table that helps the query engine understand the contents of the table. * **inclusion** *(string) --* Specifies whether to include or exclude the table during query generation. If you specify "EXCLUDE", the table will be ignored. If you specify "INCLUDE", all other tables will be ignored. * **name** *(string) --* **[REQUIRED]** The name of the table for which the other fields in this object apply. * **storageConfigurations** *(list) --* **[REQUIRED]** Specifies configurations for Amazon Redshift database storage. * *(dict) --* Contains configurations for Amazon Redshift data storage. Specify the data storage service to use in the "type" field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide. * **awsDataCatalogConfiguration** *(dict) --* Specifies configurations for storage in Glue Data Catalog. * **tableNames** *(list) --* **[REQUIRED]** A list of names of the tables to use. * *(string) --* * **redshiftConfiguration** *(dict) --* Specifies configurations for storage in Amazon Redshift. * **databaseName** *(string) --* **[REQUIRED]** The name of the Amazon Redshift database. * **type** *(string) --* **[REQUIRED]** The data storage service to use. * **type** *(string) --* **[REQUIRED]** The type of SQL database to connect to the knowledge base. * **type** *(string) --* **[REQUIRED]** The type of data that the data source is converted into for the knowledge base. * **vectorKnowledgeBaseConfiguration** *(dict) --* Contains details about the model that's used to convert the data source into vector embeddings. * **embeddingModelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base. * **embeddingModelConfiguration** *(dict) --* The embeddings model configuration details for the vector model used in Knowledge Base. * **bedrockEmbeddingModelConfiguration** *(dict) --* The vector configuration details on the Bedrock embeddings model. * **dimensions** *(integer) --* The dimensions details for the vector configuration used on the Bedrock embeddings model. * **embeddingDataType** *(string) --* The data type for the vectors when using a model to convert text into vector embeddings. The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types. * **supplementalDataStorageConfiguration** *(dict) --* If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents. These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate. * **storageLocations** *(list) --* **[REQUIRED]** A list of objects specifying storage locations for images extracted from multimodal documents in your data source. * *(dict) --* Contains information about a storage location for images extracted from multimodal documents in your data source. * **s3Location** *(dict) --* Contains information about the Amazon S3 location for the extracted images. * **uri** *(string) --* **[REQUIRED]** The location's URI. For example, "s3://my-bucket /chunk-processor/". * **type** *(string) --* **[REQUIRED]** Specifies the storage service used for this location. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base to update. * **name** (*string*) -- **[REQUIRED]** Specifies a new name for the knowledge base. * **roleArn** (*string*) -- **[REQUIRED]** Specifies a different Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base. * **storageConfiguration** (*dict*) -- Specifies the configuration for the vector store used for the knowledge base. You must use the same configuration as when the knowledge base was created. * **mongoDbAtlasConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in MongoDB Atlas. * **collectionName** *(string) --* **[REQUIRED]** The collection name of the knowledge base in MongoDB Atlas. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster. * **databaseName** *(string) --* **[REQUIRED]** The database name in your MongoDB Atlas cluster for your knowledge base. * **endpoint** *(string) --* **[REQUIRED]** The endpoint URL of your MongoDB Atlas cluster for your knowledge base. * **endpointServiceName** *(string) --* The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **textIndexName** *(string) --* The name of the text search index in the MongoDB collection. This is required for using the hybrid search feature. * **vectorIndexName** *(string) --* **[REQUIRED]** The name of the MongoDB Atlas vector search index. * **neptuneAnalyticsConfiguration** *(dict) --* Contains details about the Neptune Analytics configuration of the knowledge base in Amazon Neptune. For more information, see Create a vector index in Amazon Neptune Analytics.. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **graphArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Neptune Analytics vector store. * **opensearchManagedClusterConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base in OpenSearch Managed Cluster. For more information, see Create a vector index in Amazon OpenSearch Service. * **domainArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the OpenSearch domain. * **domainEndpoint** *(string) --* **[REQUIRED]** The endpoint URL the OpenSearch domain. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* **[REQUIRED]** The name of the vector store. * **opensearchServerlessConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Amazon OpenSearch Service. * **collectionArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the OpenSearch Service vector store. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* **[REQUIRED]** The name of the vector store. * **pineconeConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Pinecone. * **connectionString** *(string) --* **[REQUIRED]** The endpoint URL for your index management page. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Pinecone API key. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **namespace** *(string) --* The namespace to be used to write new data to your database. * **rdsConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base in Amazon RDS. For more information, see Create a vector index in Amazon RDS. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Amazon RDS database. * **databaseName** *(string) --* **[REQUIRED]** The name of your Amazon RDS database. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **customMetadataField** *(string) --* Provide a name for the universal metadata field where Amazon Bedrock will store any custom metadata from your data source. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **primaryKeyField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the ID for each entry. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **resourceArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the vector store. * **tableName** *(string) --* **[REQUIRED]** The name of the table in the database. * **redisEnterpriseCloudConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Redis Enterprise Cloud. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Redis Enterprise Cloud database. * **endpoint** *(string) --* **[REQUIRED]** The endpoint URL of the Redis Enterprise Cloud database. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* **[REQUIRED]** The name of the vector index. * **s3VectorsConfiguration** *(dict) --* The configuration settings for storing knowledge base data using S3 vectors. This includes vector index information and S3 bucket details for vector storage. * **indexArn** *(string) --* The Amazon Resource Name (ARN) of the vector index used for the knowledge base. This ARN identifies the specific vector index resource within Amazon Bedrock. * **indexName** *(string) --* The name of the vector index used for the knowledge base. This name identifies the vector index within the Amazon Bedrock service. * **vectorBucketArn** *(string) --* The Amazon Resource Name (ARN) of the S3 bucket where vector embeddings are stored. This bucket contains the vector data used by the knowledge base. * **type** *(string) --* **[REQUIRED]** The vector store service in which the knowledge base is stored. Return type: dict Returns: **Response Syntax** { 'knowledgeBase': { 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseArn': 'string', 'knowledgeBaseConfiguration': { 'kendraKnowledgeBaseConfiguration': { 'kendraIndexArn': 'string' }, 'sqlKnowledgeBaseConfiguration': { 'redshiftConfiguration': { 'queryEngineConfiguration': { 'provisionedConfiguration': { 'authConfiguration': { 'databaseUser': 'string', 'type': 'IAM'|'USERNAME_PASSWORD'|'USERNAME', 'usernamePasswordSecretArn': 'string' }, 'clusterIdentifier': 'string' }, 'serverlessConfiguration': { 'authConfiguration': { 'type': 'IAM'|'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string' }, 'workgroupArn': 'string' }, 'type': 'SERVERLESS'|'PROVISIONED' }, 'queryGenerationConfiguration': { 'executionTimeoutSeconds': 123, 'generationContext': { 'curatedQueries': [ { 'naturalLanguage': 'string', 'sql': 'string' }, ], 'tables': [ { 'columns': [ { 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ], 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ] } }, 'storageConfigurations': [ { 'awsDataCatalogConfiguration': { 'tableNames': [ 'string', ] }, 'redshiftConfiguration': { 'databaseName': 'string' }, 'type': 'REDSHIFT'|'AWS_DATA_CATALOG' }, ] }, 'type': 'REDSHIFT' }, 'type': 'VECTOR'|'KENDRA'|'SQL', 'vectorKnowledgeBaseConfiguration': { 'embeddingModelArn': 'string', 'embeddingModelConfiguration': { 'bedrockEmbeddingModelConfiguration': { 'dimensions': 123, 'embeddingDataType': 'FLOAT32'|'BINARY' } }, 'supplementalDataStorageConfiguration': { 'storageLocations': [ { 's3Location': { 'uri': 'string' }, 'type': 'S3' }, ] } } }, 'knowledgeBaseId': 'string', 'name': 'string', 'roleArn': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED'|'DELETE_UNSUCCESSFUL', 'storageConfiguration': { 'mongoDbAtlasConfiguration': { 'collectionName': 'string', 'credentialsSecretArn': 'string', 'databaseName': 'string', 'endpoint': 'string', 'endpointServiceName': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'textIndexName': 'string', 'vectorIndexName': 'string' }, 'neptuneAnalyticsConfiguration': { 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'graphArn': 'string' }, 'opensearchManagedClusterConfiguration': { 'domainArn': 'string', 'domainEndpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'opensearchServerlessConfiguration': { 'collectionArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'pineconeConfiguration': { 'connectionString': 'string', 'credentialsSecretArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'namespace': 'string' }, 'rdsConfiguration': { 'credentialsSecretArn': 'string', 'databaseName': 'string', 'fieldMapping': { 'customMetadataField': 'string', 'metadataField': 'string', 'primaryKeyField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'resourceArn': 'string', 'tableName': 'string' }, 'redisEnterpriseCloudConfiguration': { 'credentialsSecretArn': 'string', 'endpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 's3VectorsConfiguration': { 'indexArn': 'string', 'indexName': 'string', 'vectorBucketArn': 'string' }, 'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD'|'RDS'|'MONGO_DB_ATLAS'|'NEPTUNE_ANALYTICS'|'OPENSEARCH_MANAGED_CLUSTER'|'S3_VECTORS' }, 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **knowledgeBase** *(dict) --* Contains details about the knowledge base. * **createdAt** *(datetime) --* The time the knowledge base was created. * **description** *(string) --* The description of the knowledge base. * **failureReasons** *(list) --* A list of reasons that the API operation on the knowledge base failed. * *(string) --* * **knowledgeBaseArn** *(string) --* The Amazon Resource Name (ARN) of the knowledge base. * **knowledgeBaseConfiguration** *(dict) --* Contains details about the embeddings configuration of the knowledge base. * **kendraKnowledgeBaseConfiguration** *(dict) --* Settings for an Amazon Kendra knowledge base. * **kendraIndexArn** *(string) --* The ARN of the Amazon Kendra index. * **sqlKnowledgeBaseConfiguration** *(dict) --* Specifies configurations for a knowledge base connected to an SQL database. * **redshiftConfiguration** *(dict) --* Specifies configurations for a knowledge base connected to an Amazon Redshift database. * **queryEngineConfiguration** *(dict) --* Specifies configurations for an Amazon Redshift query engine. * **provisionedConfiguration** *(dict) --* Specifies configurations for a provisioned Amazon Redshift query engine. * **authConfiguration** *(dict) --* Specifies configurations for authentication to Amazon Redshift. * **databaseUser** *(string) --* The database username for authentication to an Amazon Redshift provisioned data warehouse. * **type** *(string) --* The type of authentication to use. * **usernamePasswordSecretArn** *(string) --* The ARN of an Secrets Manager secret for authentication. * **clusterIdentifier** *(string) --* The ID of the Amazon Redshift cluster. * **serverlessConfiguration** *(dict) --* Specifies configurations for a serverless Amazon Redshift query engine. * **authConfiguration** *(dict) --* Specifies configurations for authentication to an Amazon Redshift provisioned data warehouse. * **type** *(string) --* The type of authentication to use. * **usernamePasswordSecretArn** *(string) --* The ARN of an Secrets Manager secret for authentication. * **workgroupArn** *(string) --* The ARN of the Amazon Redshift workgroup. * **type** *(string) --* The type of query engine. * **queryGenerationConfiguration** *(dict) --* Specifies configurations for generating queries. * **executionTimeoutSeconds** *(integer) --* The time after which query generation will time out. * **generationContext** *(dict) --* Specifies configurations for context to use during query generation. * **curatedQueries** *(list) --* An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries. * *(dict) --* Contains configurations for a query, each of which defines information about example queries to help the query engine generate appropriate SQL queries. * **naturalLanguage** *(string) --* An example natural language query. * **sql** *(string) --* The SQL equivalent of the natural language query. * **tables** *(list) --* An array of objects, each of which defines information about a table in the database. * *(dict) --* Contains information about a table for the query engine to consider. * **columns** *(list) --* An array of objects, each of which defines information about a column in the table. * *(dict) --* Contains information about a column in the current table for the query engine to consider. * **description** *(string) --* A description of the column that helps the query engine understand the contents of the column. * **inclusion** *(string) --* Specifies whether to include or exclude the column during query generation. If you specify "EXCLUDE", the column will be ignored. If you specify "INCLUDE", all other columns in the table will be ignored. * **name** *(string) --* The name of the column for which the other fields in this object apply. * **description** *(string) --* A description of the table that helps the query engine understand the contents of the table. * **inclusion** *(string) --* Specifies whether to include or exclude the table during query generation. If you specify "EXCLUDE", the table will be ignored. If you specify "INCLUDE", all other tables will be ignored. * **name** *(string) --* The name of the table for which the other fields in this object apply. * **storageConfigurations** *(list) --* Specifies configurations for Amazon Redshift database storage. * *(dict) --* Contains configurations for Amazon Redshift data storage. Specify the data storage service to use in the "type" field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide. * **awsDataCatalogConfiguration** *(dict) --* Specifies configurations for storage in Glue Data Catalog. * **tableNames** *(list) --* A list of names of the tables to use. * *(string) --* * **redshiftConfiguration** *(dict) --* Specifies configurations for storage in Amazon Redshift. * **databaseName** *(string) --* The name of the Amazon Redshift database. * **type** *(string) --* The data storage service to use. * **type** *(string) --* The type of SQL database to connect to the knowledge base. * **type** *(string) --* The type of data that the data source is converted into for the knowledge base. * **vectorKnowledgeBaseConfiguration** *(dict) --* Contains details about the model that's used to convert the data source into vector embeddings. * **embeddingModelArn** *(string) --* The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base. * **embeddingModelConfiguration** *(dict) --* The embeddings model configuration details for the vector model used in Knowledge Base. * **bedrockEmbeddingModelConfiguration** *(dict) --* The vector configuration details on the Bedrock embeddings model. * **dimensions** *(integer) --* The dimensions details for the vector configuration used on the Bedrock embeddings model. * **embeddingDataType** *(string) --* The data type for the vectors when using a model to convert text into vector embeddings. The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types. * **supplementalDataStorageConfiguration** *(dict) --* If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents. These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate. * **storageLocations** *(list) --* A list of objects specifying storage locations for images extracted from multimodal documents in your data source. * *(dict) --* Contains information about a storage location for images extracted from multimodal documents in your data source. * **s3Location** *(dict) --* Contains information about the Amazon S3 location for the extracted images. * **uri** *(string) --* The location's URI. For example, "s3://my- bucket/chunk-processor/". * **type** *(string) --* Specifies the storage service used for this location. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base. * **name** *(string) --* The name of the knowledge base. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base. * **status** *(string) --* The status of the knowledge base. The following statuses are possible: * CREATING – The knowledge base is being created. * ACTIVE – The knowledge base is ready to be queried. * DELETING – The knowledge base is being deleted. * UPDATING – The knowledge base is being updated. * FAILED – The knowledge base API operation failed. * **storageConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base. * **mongoDbAtlasConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in MongoDB Atlas. * **collectionName** *(string) --* The collection name of the knowledge base in MongoDB Atlas. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster. * **databaseName** *(string) --* The database name in your MongoDB Atlas cluster for your knowledge base. * **endpoint** *(string) --* The endpoint URL of your MongoDB Atlas cluster for your knowledge base. * **endpointServiceName** *(string) --* The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **textIndexName** *(string) --* The name of the text search index in the MongoDB collection. This is required for using the hybrid search feature. * **vectorIndexName** *(string) --* The name of the MongoDB Atlas vector search index. * **neptuneAnalyticsConfiguration** *(dict) --* Contains details about the Neptune Analytics configuration of the knowledge base in Amazon Neptune. For more information, see Create a vector index in Amazon Neptune Analytics.. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **graphArn** *(string) --* The Amazon Resource Name (ARN) of the Neptune Analytics vector store. * **opensearchManagedClusterConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base in OpenSearch Managed Cluster. For more information, see Create a vector index in Amazon OpenSearch Service. * **domainArn** *(string) --* The Amazon Resource Name (ARN) of the OpenSearch domain. * **domainEndpoint** *(string) --* The endpoint URL the OpenSearch domain. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* The name of the vector store. * **opensearchServerlessConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Amazon OpenSearch Service. * **collectionArn** *(string) --* The Amazon Resource Name (ARN) of the OpenSearch Service vector store. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* The name of the vector store. * **pineconeConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Pinecone. * **connectionString** *(string) --* The endpoint URL for your index management page. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Pinecone API key. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **namespace** *(string) --* The namespace to be used to write new data to your database. * **rdsConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base in Amazon RDS. For more information, see Create a vector index in Amazon RDS. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Amazon RDS database. * **databaseName** *(string) --* The name of your Amazon RDS database. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **customMetadataField** *(string) --* Provide a name for the universal metadata field where Amazon Bedrock will store any custom metadata from your data source. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **primaryKeyField** *(string) --* The name of the field in which Amazon Bedrock stores the ID for each entry. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **resourceArn** *(string) --* The Amazon Resource Name (ARN) of the vector store. * **tableName** *(string) --* The name of the table in the database. * **redisEnterpriseCloudConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Redis Enterprise Cloud. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Redis Enterprise Cloud database. * **endpoint** *(string) --* The endpoint URL of the Redis Enterprise Cloud database. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* The name of the vector index. * **s3VectorsConfiguration** *(dict) --* The configuration settings for storing knowledge base data using S3 vectors. This includes vector index information and S3 bucket details for vector storage. * **indexArn** *(string) --* The Amazon Resource Name (ARN) of the vector index used for the knowledge base. This ARN identifies the specific vector index resource within Amazon Bedrock. * **indexName** *(string) --* The name of the vector index used for the knowledge base. This name identifies the vector index within the Amazon Bedrock service. * **vectorBucketArn** *(string) --* The Amazon Resource Name (ARN) of the S3 bucket where vector embeddings are stored. This bucket contains the vector data used by the knowledge base. * **type** *(string) --* The vector store service in which the knowledge base is stored. * **updatedAt** *(datetime) --* The time the knowledge base was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / update_agent_action_group update_agent_action_group ************************* AgentsforBedrock.Client.update_agent_action_group(**kwargs) Updates the configuration for an action group for an agent. See also: AWS API Documentation **Request Syntax** response = client.update_agent_action_group( actionGroupExecutor={ 'customControl': 'RETURN_CONTROL', 'lambda': 'string' }, actionGroupId='string', actionGroupName='string', actionGroupState='ENABLED'|'DISABLED', agentId='string', agentVersion='string', apiSchema={ 'payload': 'string', 's3': { 's3BucketName': 'string', 's3ObjectKey': 'string' } }, description='string', functionSchema={ 'functions': [ { 'description': 'string', 'name': 'string', 'parameters': { 'string': { 'description': 'string', 'required': True|False, 'type': 'string'|'number'|'integer'|'boolean'|'array' } }, 'requireConfirmation': 'ENABLED'|'DISABLED' }, ] }, parentActionGroupSignature='AMAZON.UserInput'|'AMAZON.CodeInterpreter'|'ANTHROPIC.Computer'|'ANTHROPIC.Bash'|'ANTHROPIC.TextEditor', parentActionGroupSignatureParams={ 'string': 'string' } ) Parameters: * **actionGroupExecutor** (*dict*) -- The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "customControl", "lambda". * **customControl** *(string) --* To return the action group invocation results directly in the "InvokeAgent" response, specify "RETURN_CONTROL". * **lambda** *(string) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * **actionGroupId** (*string*) -- **[REQUIRED]** The unique identifier of the action group. * **actionGroupName** (*string*) -- **[REQUIRED]** Specifies a new name for the action group. * **actionGroupState** (*string*) -- Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request. * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent for which to update the action group. * **agentVersion** (*string*) -- **[REQUIRED]** The unique identifier of the agent version for which to update the action group. * **apiSchema** (*dict*) -- Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML- formatted payload defining the schema. For more information, see Action group OpenAPI schemas. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "payload", "s3". * **payload** *(string) --* The JSON or YAML-formatted payload defining the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. * **s3** *(dict) --* Contains details about the S3 object containing the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. * **s3BucketName** *(string) --* The name of the S3 bucket. * **s3ObjectKey** *(string) --* The S3 object key for the S3 resource. * **description** (*string*) -- Specifies a new name for the action group. * **functionSchema** (*dict*) -- Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "functions". * **functions** *(list) --* A list of functions that each define an action in the action group. * *(dict) --* Defines parameters that the agent needs to invoke from the user to complete the function. Corresponds to an action in an action group. This data type is used in the following API operations: * CreateAgentActionGroup request * CreateAgentActionGroup response * UpdateAgentActionGroup request * UpdateAgentActionGroup response * GetAgentActionGroup response * **description** *(string) --* A description of the function and its purpose. * **name** *(string) --* **[REQUIRED]** A name for the function. * **parameters** *(dict) --* The parameters that the agent elicits from the user to fulfill the function. * *(string) --* * *(dict) --* Contains details about a parameter in a function for an action group. This data type is used in the following API operations: * CreateAgentActionGroup request * CreateAgentActionGroup response * UpdateAgentActionGroup request * UpdateAgentActionGroup response * GetAgentActionGroup response * **description** *(string) --* A description of the parameter. Helps the foundation model determine how to elicit the parameters from the user. * **required** *(boolean) --* Whether the parameter is required for the agent to complete the function for action group invocation. * **type** *(string) --* **[REQUIRED]** The data type of the parameter. * **requireConfirmation** *(string) --* Contains information if user confirmation is required to invoke the function. * **parentActionGroupSignature** (*string*) -- Update the built-in or computer use action for this action group. If you specify a value, you must leave the "description", "apiSchema", and "actionGroupExecutor" fields empty for this action group. * To allow your agent to request the user for additional information when trying to complete a task, set this field to "AMAZON.UserInput". * To allow your agent to generate, run, and troubleshoot code when trying to complete a task, set this field to "AMAZON.CodeInterpreter". * To allow your agent to use an Anthropic computer use tool, specify one of the following values. Warning: Computer use is a new Anthropic Claude model capability (in beta) available with Anthropic Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. When operating computer use functionality, we recommend taking additional security precautions, such as executing computer actions in virtual environments with restricted data access and limited internet connectivity. For more information, see Configure an Amazon Bedrock Agent to complete tasks with computer use tools. * "ANTHROPIC.Computer" - Gives the agent permission to use the mouse and keyboard and take screenshots. * "ANTHROPIC.TextEditor" - Gives the agent permission to view, create and edit files. * "ANTHROPIC.Bash" - Gives the agent permission to run commands in a bash shell. During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information. * **parentActionGroupSignatureParams** (*dict*) -- The configuration settings for a computer use action. Warning: Computer use is a new Anthropic Claude model capability (in beta) available with Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. For more information, see Configure an Amazon Bedrock Agent to complete tasks with computer use tools. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'agentActionGroup': { 'actionGroupExecutor': { 'customControl': 'RETURN_CONTROL', 'lambda': 'string' }, 'actionGroupId': 'string', 'actionGroupName': 'string', 'actionGroupState': 'ENABLED'|'DISABLED', 'agentId': 'string', 'agentVersion': 'string', 'apiSchema': { 'payload': 'string', 's3': { 's3BucketName': 'string', 's3ObjectKey': 'string' } }, 'clientToken': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'functionSchema': { 'functions': [ { 'description': 'string', 'name': 'string', 'parameters': { 'string': { 'description': 'string', 'required': True|False, 'type': 'string'|'number'|'integer'|'boolean'|'array' } }, 'requireConfirmation': 'ENABLED'|'DISABLED' }, ] }, 'parentActionGroupSignatureParams': { 'string': 'string' }, 'parentActionSignature': 'AMAZON.UserInput'|'AMAZON.CodeInterpreter'|'ANTHROPIC.Computer'|'ANTHROPIC.Bash'|'ANTHROPIC.TextEditor', 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agentActionGroup** *(dict) --* Contains details about the action group that was updated. * **actionGroupExecutor** *(dict) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "customControl", "lambda". 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'} * **customControl** *(string) --* To return the action group invocation results directly in the "InvokeAgent" response, specify "RETURN_CONTROL". * **lambda** *(string) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * **actionGroupId** *(string) --* The unique identifier of the action group. * **actionGroupName** *(string) --* The name of the action group. * **actionGroupState** *(string) --* Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request. * **agentId** *(string) --* The unique identifier of the agent to which the action group belongs. * **agentVersion** *(string) --* The version of the agent to which the action group belongs. * **apiSchema** *(dict) --* Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML- formatted payload defining the schema. For more information, see Action group OpenAPI schemas. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "payload", "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'} * **payload** *(string) --* The JSON or YAML-formatted payload defining the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. * **s3** *(dict) --* Contains details about the S3 object containing the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. * **s3BucketName** *(string) --* The name of the S3 bucket. * **s3ObjectKey** *(string) --* The S3 object key for the S3 resource. * **clientToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **createdAt** *(datetime) --* The time at which the action group was created. * **description** *(string) --* The description of the action group. * **functionSchema** *(dict) --* Defines functions that each define parameters that the agent needs to invoke from the user. Each function represents an action in an action group. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "functions". 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'} * **functions** *(list) --* A list of functions that each define an action in the action group. * *(dict) --* Defines parameters that the agent needs to invoke from the user to complete the function. Corresponds to an action in an action group. This data type is used in the following API operations: * CreateAgentActionGroup request * CreateAgentActionGroup response * UpdateAgentActionGroup request * UpdateAgentActionGroup response * GetAgentActionGroup response * **description** *(string) --* A description of the function and its purpose. * **name** *(string) --* A name for the function. * **parameters** *(dict) --* The parameters that the agent elicits from the user to fulfill the function. * *(string) --* * *(dict) --* Contains details about a parameter in a function for an action group. This data type is used in the following API operations: * CreateAgentActionGroup request * CreateAgentActionGroup response * UpdateAgentActionGroup request * UpdateAgentActionGroup response * GetAgentActionGroup response * **description** *(string) --* A description of the parameter. Helps the foundation model determine how to elicit the parameters from the user. * **required** *(boolean) --* Whether the parameter is required for the agent to complete the function for action group invocation. * **type** *(string) --* The data type of the parameter. * **requireConfirmation** *(string) --* Contains information if user confirmation is required to invoke the function. * **parentActionGroupSignatureParams** *(dict) --* The configuration settings for a computer use action. Warning: Computer use is a new Anthropic Claude model capability (in beta) available with Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. For more information, see Configure an Amazon Bedrock Agent to complete tasks with computer use tools. * *(string) --* * *(string) --* * **parentActionSignature** *(string) --* If this field is set as "AMAZON.UserInput", the agent can request the user for additional information when trying to complete a task. The "description", "apiSchema", and "actionGroupExecutor" fields must be blank for this action group. During orchestration, if the agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information. * **updatedAt** *(datetime) --* The time at which the action group was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / update_agent_alias update_agent_alias ****************** AgentsforBedrock.Client.update_agent_alias(**kwargs) Updates configurations for an alias of an agent. See also: AWS API Documentation **Request Syntax** response = client.update_agent_alias( agentAliasId='string', agentAliasName='string', agentId='string', aliasInvocationState='ACCEPT_INVOCATIONS'|'REJECT_INVOCATIONS', description='string', routingConfiguration=[ { 'agentVersion': 'string', 'provisionedThroughput': 'string' }, ] ) Parameters: * **agentAliasId** (*string*) -- **[REQUIRED]** The unique identifier of the alias. * **agentAliasName** (*string*) -- **[REQUIRED]** Specifies a new name for the alias. * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent. * **aliasInvocationState** (*string*) -- The invocation state for the agent alias. To pause the agent alias, set the value to "REJECT_INVOCATIONS". To start the agent alias running again, set the value to "ACCEPT_INVOCATIONS". Use the "GetAgentAlias", or "ListAgentAliases", operation to get the invocation state of an agent alias. * **description** (*string*) -- Specifies a new description for the alias. * **routingConfiguration** (*list*) -- Contains details about the routing configuration of the alias. * *(dict) --* Contains details about the routing configuration of the alias. * **agentVersion** *(string) --* The version of the agent with which the alias is associated. * **provisionedThroughput** *(string) --* Information on the Provisioned Throughput assigned to an agent alias. Return type: dict Returns: **Response Syntax** { 'agentAlias': { 'agentAliasArn': 'string', 'agentAliasHistoryEvents': [ { 'endDate': datetime(2015, 1, 1), 'routingConfiguration': [ { 'agentVersion': 'string', 'provisionedThroughput': 'string' }, ], 'startDate': datetime(2015, 1, 1) }, ], 'agentAliasId': 'string', 'agentAliasName': 'string', 'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING'|'DISSOCIATED', 'agentId': 'string', 'aliasInvocationState': 'ACCEPT_INVOCATIONS'|'REJECT_INVOCATIONS', 'clientToken': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'failureReasons': [ 'string', ], 'routingConfiguration': [ { 'agentVersion': 'string', 'provisionedThroughput': 'string' }, ], 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agentAlias** *(dict) --* Contains details about the alias that was updated. * **agentAliasArn** *(string) --* The Amazon Resource Name (ARN) of the alias of the agent. * **agentAliasHistoryEvents** *(list) --* Contains details about the history of the alias. * *(dict) --* Contains details about the history of the alias. * **endDate** *(datetime) --* The date that the alias stopped being associated to the version in the "routingConfiguration" object * **routingConfiguration** *(list) --* Contains details about the version of the agent with which the alias is associated. * *(dict) --* Contains details about the routing configuration of the alias. * **agentVersion** *(string) --* The version of the agent with which the alias is associated. * **provisionedThroughput** *(string) --* Information on the Provisioned Throughput assigned to an agent alias. * **startDate** *(datetime) --* The date that the alias began being associated to the version in the "routingConfiguration" object. * **agentAliasId** *(string) --* The unique identifier of the alias of the agent. * **agentAliasName** *(string) --* The name of the alias of the agent. * **agentAliasStatus** *(string) --* The status of the alias of the agent and whether it is ready for use. The following statuses are possible: * CREATING – The agent alias is being created. * PREPARED – The agent alias is finished being created or updated and is ready to be invoked. * FAILED – The agent alias API operation failed. * UPDATING – The agent alias is being updated. * DELETING – The agent alias is being deleted. * DISSOCIATED - The agent alias has no version associated with it. * **agentId** *(string) --* The unique identifier of the agent. * **aliasInvocationState** *(string) --* The invocation state for the agent alias. If the agent alias is running, the value is "ACCEPT_INVOCATIONS". If the agent alias is paused, the value is "REJECT_INVOCATIONS". Use the "UpdateAgentAlias" operation to change the invocation state. * **clientToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **createdAt** *(datetime) --* The time at which the alias of the agent was created. * **description** *(string) --* The description of the alias of the agent. * **failureReasons** *(list) --* Information on the failure of Provisioned Throughput assigned to an agent alias. * *(string) --* * **routingConfiguration** *(list) --* Contains details about the routing configuration of the alias. * *(dict) --* Contains details about the routing configuration of the alias. * **agentVersion** *(string) --* The version of the agent with which the alias is associated. * **provisionedThroughput** *(string) --* Information on the Provisioned Throughput assigned to an agent alias. * **updatedAt** *(datetime) --* The time at which the alias was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / delete_data_source delete_data_source ****************** AgentsforBedrock.Client.delete_data_source(**kwargs) Deletes a data source from a knowledge base. See also: AWS API Documentation **Request Syntax** response = client.delete_data_source( dataSourceId='string', knowledgeBaseId='string' ) Parameters: * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source to delete. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base from which to delete the data source. Return type: dict Returns: **Response Syntax** { 'dataSourceId': 'string', 'knowledgeBaseId': 'string', 'status': 'AVAILABLE'|'DELETING'|'DELETE_UNSUCCESSFUL' } **Response Structure** * *(dict) --* * **dataSourceId** *(string) --* The unique identifier of the data source that was deleted. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base to which the data source that was deleted belonged. * **status** *(string) --* The status of the data source. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / create_data_source create_data_source ****************** AgentsforBedrock.Client.create_data_source(**kwargs) Connects a knowledge base to a data source. You specify the configuration for the specific data source service in the "dataSourceConfiguration" field. Warning: You can't change the "chunkingConfiguration" after you create the data source connector. See also: AWS API Documentation **Request Syntax** response = client.create_data_source( clientToken='string', dataDeletionPolicy='RETAIN'|'DELETE', dataSourceConfiguration={ 'confluenceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'BASIC'|'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostType': 'SAAS', 'hostUrl': 'string' } }, 's3Configuration': { 'bucketArn': 'string', 'bucketOwnerAccountId': 'string', 'inclusionPrefixes': [ 'string', ] }, 'salesforceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostUrl': 'string' } }, 'sharePointConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS'|'OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'domain': 'string', 'hostType': 'ONLINE', 'siteUrls': [ 'string', ], 'tenantId': 'string' } }, 'type': 'S3'|'WEB'|'CONFLUENCE'|'SALESFORCE'|'SHAREPOINT'|'CUSTOM'|'REDSHIFT_METADATA', 'webConfiguration': { 'crawlerConfiguration': { 'crawlerLimits': { 'maxPages': 123, 'rateLimit': 123 }, 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'scope': 'HOST_ONLY'|'SUBDOMAINS', 'userAgent': 'string', 'userAgentHeader': 'string' }, 'sourceConfiguration': { 'urlConfiguration': { 'seedUrls': [ { 'url': 'string' }, ] } } } }, description='string', knowledgeBaseId='string', name='string', serverSideEncryptionConfiguration={ 'kmsKeyArn': 'string' }, vectorIngestionConfiguration={ 'chunkingConfiguration': { 'chunkingStrategy': 'FIXED_SIZE'|'NONE'|'HIERARCHICAL'|'SEMANTIC', 'fixedSizeChunkingConfiguration': { 'maxTokens': 123, 'overlapPercentage': 123 }, 'hierarchicalChunkingConfiguration': { 'levelConfigurations': [ { 'maxTokens': 123 }, ], 'overlapTokens': 123 }, 'semanticChunkingConfiguration': { 'breakpointPercentileThreshold': 123, 'bufferSize': 123, 'maxTokens': 123 } }, 'contextEnrichmentConfiguration': { 'bedrockFoundationModelConfiguration': { 'enrichmentStrategyConfiguration': { 'method': 'CHUNK_ENTITY_EXTRACTION' }, 'modelArn': 'string' }, 'type': 'BEDROCK_FOUNDATION_MODEL' }, 'customTransformationConfiguration': { 'intermediateStorage': { 's3Location': { 'uri': 'string' } }, 'transformations': [ { 'stepToApply': 'POST_CHUNKING', 'transformationFunction': { 'transformationLambdaConfiguration': { 'lambdaArn': 'string' } } }, ] }, 'parsingConfiguration': { 'bedrockDataAutomationConfiguration': { 'parsingModality': 'MULTIMODAL' }, 'bedrockFoundationModelConfiguration': { 'modelArn': 'string', 'parsingModality': 'MULTIMODAL', 'parsingPrompt': { 'parsingPromptText': 'string' } }, 'parsingStrategy': 'BEDROCK_FOUNDATION_MODEL'|'BEDROCK_DATA_AUTOMATION' } } ) Parameters: * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **dataDeletionPolicy** (*string*) -- The data deletion policy for the data source. You can set the data deletion policy to: * DELETE: Deletes all data from your data source that’s converted into vector embeddings upon deletion of a knowledge base or data source resource. Note that the **vector store itself is not deleted**, only the data. This flag is ignored if an Amazon Web Services account is deleted. * RETAIN: Retains all data from your data source that’s converted into vector embeddings upon deletion of a knowledge base or data source resource. Note that the **vector store itself is not deleted** if you delete a knowledge base or data source resource. * **dataSourceConfiguration** (*dict*) -- **[REQUIRED]** The connection configuration for the data source. * **confluenceConfiguration** *(dict) --* The configuration information to connect to Confluence as your data source. Note: Confluence data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the Confluence content. For example, configuring specific types of Confluence content. * **filterConfiguration** *(dict) --* The configuration of filtering the Confluence content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* **[REQUIRED]** The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* **[REQUIRED]** The supported object type or content type of the data source. * **type** *(string) --* **[REQUIRED]** The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* **[REQUIRED]** The endpoint information to connect to your Confluence data source. * **authType** *(string) --* **[REQUIRED]** The supported authentication type to authenticate and connect to your Confluence instance. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration. * **hostType** *(string) --* **[REQUIRED]** The supported host type, whether online/cloud or server /on-premises. * **hostUrl** *(string) --* **[REQUIRED]** The Confluence host URL or instance URL. * **s3Configuration** *(dict) --* The configuration information to connect to Amazon S3 as your data source. * **bucketArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the S3 bucket that contains your data. * **bucketOwnerAccountId** *(string) --* The account ID for the owner of the S3 bucket. * **inclusionPrefixes** *(list) --* A list of S3 prefixes to include certain files or content. For more information, see Organizing objects using prefixes. * *(string) --* * **salesforceConfiguration** *(dict) --* The configuration information to connect to Salesforce as your data source. Note: Salesforce data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the Salesforce content. For example, configuring specific types of Salesforce content. * **filterConfiguration** *(dict) --* The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* **[REQUIRED]** The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* **[REQUIRED]** The supported object type or content type of the data source. * **type** *(string) --* **[REQUIRED]** The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* **[REQUIRED]** The endpoint information to connect to your Salesforce data source. * **authType** *(string) --* **[REQUIRED]** The supported authentication type to authenticate and connect to your Salesforce instance. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration. * **hostUrl** *(string) --* **[REQUIRED]** The Salesforce host URL or instance URL. * **sharePointConfiguration** *(dict) --* The configuration information to connect to SharePoint as your data source. Note: SharePoint data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the SharePoint content. For example, configuring specific types of SharePoint content. * **filterConfiguration** *(dict) --* The configuration of filtering the SharePoint content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* **[REQUIRED]** The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* **[REQUIRED]** The supported object type or content type of the data source. * **type** *(string) --* **[REQUIRED]** The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* **[REQUIRED]** The endpoint information to connect to your SharePoint data source. * **authType** *(string) --* **[REQUIRED]** The supported authentication type to authenticate and connect to your SharePoint site/sites. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key- value pairs that must be included in your secret, depending on your authentication type, see SharePoint connection configuration. * **domain** *(string) --* **[REQUIRED]** The domain of your SharePoint instance or site URL/URLs. * **hostType** *(string) --* **[REQUIRED]** The supported host type, whether online/cloud or server /on-premises. * **siteUrls** *(list) --* **[REQUIRED]** A list of one or more SharePoint site URLs. * *(string) --* * **tenantId** *(string) --* The identifier of your Microsoft 365 tenant. * **type** *(string) --* **[REQUIRED]** The type of data source. * **webConfiguration** *(dict) --* The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs. Note: Crawling web URLs as your data source is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The Web Crawler configuration details for the web data source. * **crawlerLimits** *(dict) --* The configuration of crawl limits for the web URLs. * **maxPages** *(integer) --* The max number of web pages crawled from your source URLs, up to 25,000 pages. If the web pages exceed this limit, the data source sync will fail and no web pages will be ingested. * **rateLimit** *(integer) --* The max rate at which pages are crawled, up to 300 per minute per host. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled. * *(string) --* * **scope** *(string) --* The scope of what is crawled for your URLs. You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL "https://docs.aws.amazon.com/bedrock/latest/userguide/" and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain "aws.amazon.com" can also include sub domain "docs.aws.amazon.com". * **userAgent** *(string) --* Returns the user agent suffix for your web crawler. * **userAgentHeader** *(string) --* A string used for identifying the crawler or bot when it accesses a web server. The user agent header value consists of the "bedrockbot", UUID, and a user agent suffix for your crawler (if one is provided). By default, it is set to "bedrockbot_UUID". You can optionally append a custom suffix to "bedrockbot_UUID" to allowlist a specific user agent permitted to access your source URLs. * **sourceConfiguration** *(dict) --* **[REQUIRED]** The source configuration details for the web data source. * **urlConfiguration** *(dict) --* **[REQUIRED]** The configuration of the URL/URLs. * **seedUrls** *(list) --* One or more seed or starting point URLs. * *(dict) --* The seed or starting point URL. You should be authorized to crawl the URL. * **url** *(string) --* A seed or starting point URL. * **description** (*string*) -- A description of the data source. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base to which to add the data source. * **name** (*string*) -- **[REQUIRED]** The name of the data source. * **serverSideEncryptionConfiguration** (*dict*) -- Contains details about the server-side encryption for the data source. * **kmsKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key used to encrypt the resource. * **vectorIngestionConfiguration** (*dict*) -- Contains details about how to ingest the documents in the data source. * **chunkingConfiguration** *(dict) --* Details about how to chunk the documents in the data source. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. * **chunkingStrategy** *(string) --* **[REQUIRED]** Knowledge base can split your source data into chunks. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for "NONE", then you may want to pre- process your files by splitting them up such that each file corresponds to a chunk. * "FIXED_SIZE" – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the "fixedSizeChunkingConfiguration". * "HIERARCHICAL" – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer. * "SEMANTIC" – Split documents into chunks based on groups of similar content derived with natural language processing. * "NONE" – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files. * **fixedSizeChunkingConfiguration** *(dict) --* Configurations for when you choose fixed-size chunking. If you set the "chunkingStrategy" as "NONE", exclude this field. * **maxTokens** *(integer) --* **[REQUIRED]** The maximum number of tokens to include in a chunk. * **overlapPercentage** *(integer) --* **[REQUIRED]** The percentage of overlap between adjacent chunks of a data source. * **hierarchicalChunkingConfiguration** *(dict) --* Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer. * **levelConfigurations** *(list) --* **[REQUIRED]** Token settings for each layer. * *(dict) --* Token settings for a layer in a hierarchical chunking configuration. * **maxTokens** *(integer) --* **[REQUIRED]** The maximum number of tokens that a chunk can contain in this layer. * **overlapTokens** *(integer) --* **[REQUIRED]** The number of tokens to repeat across chunks in the same layer. * **semanticChunkingConfiguration** *(dict) --* Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing. * **breakpointPercentileThreshold** *(integer) --* **[REQUIRED]** The dissimilarity threshold for splitting chunks. * **bufferSize** *(integer) --* **[REQUIRED]** The buffer size. * **maxTokens** *(integer) --* **[REQUIRED]** The maximum number of tokens that a chunk can contain. * **contextEnrichmentConfiguration** *(dict) --* The context enrichment configuration used for ingestion of the data into the vector store. * **bedrockFoundationModelConfiguration** *(dict) --* The configuration of the Amazon Bedrock foundation model used for context enrichment. * **enrichmentStrategyConfiguration** *(dict) --* **[REQUIRED]** The enrichment stategy used to provide additional context. For example, Neptune GraphRAG uses Amazon Bedrock foundation models to perform chunk entity extraction. * **method** *(string) --* **[REQUIRED]** The method used for the context enrichment strategy. * **modelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base. * **type** *(string) --* **[REQUIRED]** The method used for context enrichment. It must be Amazon Bedrock foundation models. * **customTransformationConfiguration** *(dict) --* A custom document transformer for parsed data source documents. * **intermediateStorage** *(dict) --* **[REQUIRED]** An S3 bucket path for input and output objects. * **s3Location** *(dict) --* **[REQUIRED]** An S3 bucket path. * **uri** *(string) --* **[REQUIRED]** The location's URI. For example, "s3://my-bucket /chunk-processor/". * **transformations** *(list) --* **[REQUIRED]** A Lambda function that processes documents. * *(dict) --* A custom processing step for documents moving through a data source ingestion pipeline. To process documents after they have been converted into chunks, set the step to apply to "POST_CHUNKING". * **stepToApply** *(string) --* **[REQUIRED]** When the service applies the transformation. * **transformationFunction** *(dict) --* **[REQUIRED]** A Lambda function that processes documents. * **transformationLambdaConfiguration** *(dict) --* **[REQUIRED]** The Lambda function. * **lambdaArn** *(string) --* **[REQUIRED]** The function's ARN identifier. * **parsingConfiguration** *(dict) --* Configurations for a parser to use for parsing documents in your data source. If you exclude this field, the default parser will be used. * **bedrockDataAutomationConfiguration** *(dict) --* If you specify "BEDROCK_DATA_AUTOMATION" as the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser. * **parsingModality** *(string) --* Specifies whether to enable parsing of multimodal data, including both text and/or images. * **bedrockFoundationModelConfiguration** *(dict) --* If you specify "BEDROCK_FOUNDATION_MODEL" as the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents. * **modelArn** *(string) --* **[REQUIRED]** The ARN of the foundation model to use for parsing. * **parsingModality** *(string) --* Specifies whether to enable parsing of multimodal data, including both text and/or images. * **parsingPrompt** *(dict) --* Instructions for interpreting the contents of a document. * **parsingPromptText** *(string) --* **[REQUIRED]** Instructions for interpreting the contents of a document. * **parsingStrategy** *(string) --* **[REQUIRED]** The parsing strategy for the data source. Return type: dict Returns: **Response Syntax** { 'dataSource': { 'createdAt': datetime(2015, 1, 1), 'dataDeletionPolicy': 'RETAIN'|'DELETE', 'dataSourceConfiguration': { 'confluenceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'BASIC'|'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostType': 'SAAS', 'hostUrl': 'string' } }, 's3Configuration': { 'bucketArn': 'string', 'bucketOwnerAccountId': 'string', 'inclusionPrefixes': [ 'string', ] }, 'salesforceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostUrl': 'string' } }, 'sharePointConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS'|'OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'domain': 'string', 'hostType': 'ONLINE', 'siteUrls': [ 'string', ], 'tenantId': 'string' } }, 'type': 'S3'|'WEB'|'CONFLUENCE'|'SALESFORCE'|'SHAREPOINT'|'CUSTOM'|'REDSHIFT_METADATA', 'webConfiguration': { 'crawlerConfiguration': { 'crawlerLimits': { 'maxPages': 123, 'rateLimit': 123 }, 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'scope': 'HOST_ONLY'|'SUBDOMAINS', 'userAgent': 'string', 'userAgentHeader': 'string' }, 'sourceConfiguration': { 'urlConfiguration': { 'seedUrls': [ { 'url': 'string' }, ] } } } }, 'dataSourceId': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseId': 'string', 'name': 'string', 'serverSideEncryptionConfiguration': { 'kmsKeyArn': 'string' }, 'status': 'AVAILABLE'|'DELETING'|'DELETE_UNSUCCESSFUL', 'updatedAt': datetime(2015, 1, 1), 'vectorIngestionConfiguration': { 'chunkingConfiguration': { 'chunkingStrategy': 'FIXED_SIZE'|'NONE'|'HIERARCHICAL'|'SEMANTIC', 'fixedSizeChunkingConfiguration': { 'maxTokens': 123, 'overlapPercentage': 123 }, 'hierarchicalChunkingConfiguration': { 'levelConfigurations': [ { 'maxTokens': 123 }, ], 'overlapTokens': 123 }, 'semanticChunkingConfiguration': { 'breakpointPercentileThreshold': 123, 'bufferSize': 123, 'maxTokens': 123 } }, 'contextEnrichmentConfiguration': { 'bedrockFoundationModelConfiguration': { 'enrichmentStrategyConfiguration': { 'method': 'CHUNK_ENTITY_EXTRACTION' }, 'modelArn': 'string' }, 'type': 'BEDROCK_FOUNDATION_MODEL' }, 'customTransformationConfiguration': { 'intermediateStorage': { 's3Location': { 'uri': 'string' } }, 'transformations': [ { 'stepToApply': 'POST_CHUNKING', 'transformationFunction': { 'transformationLambdaConfiguration': { 'lambdaArn': 'string' } } }, ] }, 'parsingConfiguration': { 'bedrockDataAutomationConfiguration': { 'parsingModality': 'MULTIMODAL' }, 'bedrockFoundationModelConfiguration': { 'modelArn': 'string', 'parsingModality': 'MULTIMODAL', 'parsingPrompt': { 'parsingPromptText': 'string' } }, 'parsingStrategy': 'BEDROCK_FOUNDATION_MODEL'|'BEDROCK_DATA_AUTOMATION' } } } } **Response Structure** * *(dict) --* * **dataSource** *(dict) --* Contains details about the data source. * **createdAt** *(datetime) --* The time at which the data source was created. * **dataDeletionPolicy** *(string) --* The data deletion policy for the data source. * **dataSourceConfiguration** *(dict) --* The connection configuration for the data source. * **confluenceConfiguration** *(dict) --* The configuration information to connect to Confluence as your data source. Note: Confluence data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the Confluence content. For example, configuring specific types of Confluence content. * **filterConfiguration** *(dict) --* The configuration of filtering the Confluence content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* The supported object type or content type of the data source. * **type** *(string) --* The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* The endpoint information to connect to your Confluence data source. * **authType** *(string) --* The supported authentication type to authenticate and connect to your Confluence instance. * **credentialsSecretArn** *(string) --* The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration. * **hostType** *(string) --* The supported host type, whether online/cloud or server/on-premises. * **hostUrl** *(string) --* The Confluence host URL or instance URL. * **s3Configuration** *(dict) --* The configuration information to connect to Amazon S3 as your data source. * **bucketArn** *(string) --* The Amazon Resource Name (ARN) of the S3 bucket that contains your data. * **bucketOwnerAccountId** *(string) --* The account ID for the owner of the S3 bucket. * **inclusionPrefixes** *(list) --* A list of S3 prefixes to include certain files or content. For more information, see Organizing objects using prefixes. * *(string) --* * **salesforceConfiguration** *(dict) --* The configuration information to connect to Salesforce as your data source. Note: Salesforce data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the Salesforce content. For example, configuring specific types of Salesforce content. * **filterConfiguration** *(dict) --* The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* The supported object type or content type of the data source. * **type** *(string) --* The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* The endpoint information to connect to your Salesforce data source. * **authType** *(string) --* The supported authentication type to authenticate and connect to your Salesforce instance. * **credentialsSecretArn** *(string) --* The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration. * **hostUrl** *(string) --* The Salesforce host URL or instance URL. * **sharePointConfiguration** *(dict) --* The configuration information to connect to SharePoint as your data source. Note: SharePoint data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the SharePoint content. For example, configuring specific types of SharePoint content. * **filterConfiguration** *(dict) --* The configuration of filtering the SharePoint content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* The supported object type or content type of the data source. * **type** *(string) --* The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* The endpoint information to connect to your SharePoint data source. * **authType** *(string) --* The supported authentication type to authenticate and connect to your SharePoint site/sites. * **credentialsSecretArn** *(string) --* The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see SharePoint connection configuration. * **domain** *(string) --* The domain of your SharePoint instance or site URL/URLs. * **hostType** *(string) --* The supported host type, whether online/cloud or server/on-premises. * **siteUrls** *(list) --* A list of one or more SharePoint site URLs. * *(string) --* * **tenantId** *(string) --* The identifier of your Microsoft 365 tenant. * **type** *(string) --* The type of data source. * **webConfiguration** *(dict) --* The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs. Note: Crawling web URLs as your data source is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The Web Crawler configuration details for the web data source. * **crawlerLimits** *(dict) --* The configuration of crawl limits for the web URLs. * **maxPages** *(integer) --* The max number of web pages crawled from your source URLs, up to 25,000 pages. If the web pages exceed this limit, the data source sync will fail and no web pages will be ingested. * **rateLimit** *(integer) --* The max rate at which pages are crawled, up to 300 per minute per host. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled. * *(string) --* * **scope** *(string) --* The scope of what is crawled for your URLs. You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL "https://d ocs.aws.amazon.com/bedrock/latest/userguide/" and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain "aws.amazon.com" can also include sub domain "docs.aws.amazon.com". * **userAgent** *(string) --* Returns the user agent suffix for your web crawler. * **userAgentHeader** *(string) --* A string used for identifying the crawler or bot when it accesses a web server. The user agent header value consists of the "bedrockbot", UUID, and a user agent suffix for your crawler (if one is provided). By default, it is set to "bedrockbot_UUID". You can optionally append a custom suffix to "bedrockbot_UUID" to allowlist a specific user agent permitted to access your source URLs. * **sourceConfiguration** *(dict) --* The source configuration details for the web data source. * **urlConfiguration** *(dict) --* The configuration of the URL/URLs. * **seedUrls** *(list) --* One or more seed or starting point URLs. * *(dict) --* The seed or starting point URL. You should be authorized to crawl the URL. * **url** *(string) --* A seed or starting point URL. * **dataSourceId** *(string) --* The unique identifier of the data source. * **description** *(string) --* The description of the data source. * **failureReasons** *(list) --* The detailed reasons on the failure to delete a data source. * *(string) --* * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base to which the data source belongs. * **name** *(string) --* The name of the data source. * **serverSideEncryptionConfiguration** *(dict) --* Contains details about the configuration of the server- side encryption. * **kmsKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key used to encrypt the resource. * **status** *(string) --* The status of the data source. The following statuses are possible: * Available – The data source has been created and is ready for ingestion into the knowledge base. * Deleting – The data source is being deleted. * **updatedAt** *(datetime) --* The time at which the data source was last updated. * **vectorIngestionConfiguration** *(dict) --* Contains details about how to ingest the documents in the data source. * **chunkingConfiguration** *(dict) --* Details about how to chunk the documents in the data source. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. * **chunkingStrategy** *(string) --* Knowledge base can split your source data into chunks. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for "NONE", then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk. * "FIXED_SIZE" – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the "fixedSizeChunkingConfiguration". * "HIERARCHICAL" – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer. * "SEMANTIC" – Split documents into chunks based on groups of similar content derived with natural language processing. * "NONE" – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files. * **fixedSizeChunkingConfiguration** *(dict) --* Configurations for when you choose fixed-size chunking. If you set the "chunkingStrategy" as "NONE", exclude this field. * **maxTokens** *(integer) --* The maximum number of tokens to include in a chunk. * **overlapPercentage** *(integer) --* The percentage of overlap between adjacent chunks of a data source. * **hierarchicalChunkingConfiguration** *(dict) --* Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer. * **levelConfigurations** *(list) --* Token settings for each layer. * *(dict) --* Token settings for a layer in a hierarchical chunking configuration. * **maxTokens** *(integer) --* The maximum number of tokens that a chunk can contain in this layer. * **overlapTokens** *(integer) --* The number of tokens to repeat across chunks in the same layer. * **semanticChunkingConfiguration** *(dict) --* Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing. * **breakpointPercentileThreshold** *(integer) --* The dissimilarity threshold for splitting chunks. * **bufferSize** *(integer) --* The buffer size. * **maxTokens** *(integer) --* The maximum number of tokens that a chunk can contain. * **contextEnrichmentConfiguration** *(dict) --* The context enrichment configuration used for ingestion of the data into the vector store. * **bedrockFoundationModelConfiguration** *(dict) --* The configuration of the Amazon Bedrock foundation model used for context enrichment. * **enrichmentStrategyConfiguration** *(dict) --* The enrichment stategy used to provide additional context. For example, Neptune GraphRAG uses Amazon Bedrock foundation models to perform chunk entity extraction. * **method** *(string) --* The method used for the context enrichment strategy. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base. * **type** *(string) --* The method used for context enrichment. It must be Amazon Bedrock foundation models. * **customTransformationConfiguration** *(dict) --* A custom document transformer for parsed data source documents. * **intermediateStorage** *(dict) --* An S3 bucket path for input and output objects. * **s3Location** *(dict) --* An S3 bucket path. * **uri** *(string) --* The location's URI. For example, "s3://my-bucket /chunk-processor/". * **transformations** *(list) --* A Lambda function that processes documents. * *(dict) --* A custom processing step for documents moving through a data source ingestion pipeline. To process documents after they have been converted into chunks, set the step to apply to "POST_CHUNKING". * **stepToApply** *(string) --* When the service applies the transformation. * **transformationFunction** *(dict) --* A Lambda function that processes documents. * **transformationLambdaConfiguration** *(dict) --* The Lambda function. * **lambdaArn** *(string) --* The function's ARN identifier. * **parsingConfiguration** *(dict) --* Configurations for a parser to use for parsing documents in your data source. If you exclude this field, the default parser will be used. * **bedrockDataAutomationConfiguration** *(dict) --* If you specify "BEDROCK_DATA_AUTOMATION" as the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser. * **parsingModality** *(string) --* Specifies whether to enable parsing of multimodal data, including both text and/or images. * **bedrockFoundationModelConfiguration** *(dict) --* If you specify "BEDROCK_FOUNDATION_MODEL" as the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents. * **modelArn** *(string) --* The ARN of the foundation model to use for parsing. * **parsingModality** *(string) --* Specifies whether to enable parsing of multimodal data, including both text and/or images. * **parsingPrompt** *(dict) --* Instructions for interpreting the contents of a document. * **parsingPromptText** *(string) --* Instructions for interpreting the contents of a document. * **parsingStrategy** *(string) --* The parsing strategy for the data source. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / disassociate_agent_knowledge_base disassociate_agent_knowledge_base ********************************* AgentsforBedrock.Client.disassociate_agent_knowledge_base(**kwargs) Disassociates a knowledge base from an agent. See also: AWS API Documentation **Request Syntax** response = client.disassociate_agent_knowledge_base( agentId='string', agentVersion='string', knowledgeBaseId='string' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent from which to disassociate the knowledge base. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent from which to disassociate the knowledge base. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base to disassociate. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" 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** { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'customerEncryptionKeyArn': 'string', 'definition': { 'connections': [ { 'configuration': { 'conditional': { 'condition': 'string' }, 'data': { 'sourceOutput': 'string', 'targetInput': 'string' } }, 'name': 'string', 'source': 'string', 'target': 'string', 'type': 'Data'|'Conditional' }, ], 'nodes': [ { 'configuration': { 'agent': { 'agentAliasArn': 'string' }, 'collector': {}, 'condition': { 'conditions': [ { 'expression': 'string', 'name': 'string' }, ] }, 'inlineCode': { 'code': 'string', 'language': 'Python_3' }, 'input': {}, 'iterator': {}, 'knowledgeBase': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'knowledgeBaseId': 'string', 'modelId': 'string', 'numberOfResults': 123, 'orchestrationConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'inferenceConfig': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'performanceConfig': { 'latency': 'standard'|'optimized' }, 'promptTemplate': { 'textPromptTemplate': 'string' } }, 'promptTemplate': { 'textPromptTemplate': 'string' }, 'rerankingConfiguration': { 'bedrockRerankingConfiguration': { 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToExclude': [ { 'fieldName': 'string' }, ], 'fieldsToInclude': [ { 'fieldName': 'string' }, ] } }, 'modelConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'modelArn': 'string' }, 'numberOfRerankedResults': 123 }, 'type': 'BEDROCK_RERANKING_MODEL' } }, 'lambdaFunction': { 'lambdaArn': 'string' }, 'lex': { 'botAliasArn': 'string', 'localeId': 'string' }, 'loop': { 'definition': {'... recursive ...'} }, 'loopController': { 'continueCondition': { 'expression': 'string', 'name': 'string' }, 'maxIterations': 123 }, 'loopInput': {}, 'output': {}, 'prompt': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'sourceConfiguration': { 'inline': { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'modelId': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {}, 'auto': {}, 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, 'resource': { 'promptArn': 'string' } } }, 'retrieval': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } }, 'storage': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } } }, 'inputs': [ { 'category': 'LoopCondition'|'ReturnValueToLoopStart'|'ExitLoop', 'expression': 'string', 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'name': 'string', 'outputs': [ { 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'type': 'Input'|'Output'|'KnowledgeBase'|'Condition'|'Lex'|'Prompt'|'LambdaFunction'|'Storage'|'Agent'|'Retrieval'|'Iterator'|'Collector'|'InlineCode'|'Loop'|'LoopInput'|'LoopController' }, ] }, 'description': 'string', 'executionRoleArn': 'string', 'id': 'string', 'name': 'string', 'status': 'Failed'|'Prepared'|'Preparing'|'NotPrepared', 'version': 'string' } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the flow. * **createdAt** *(datetime) --* The time at which the flow was created. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key that the version of the flow is encrypted with. * **definition** *(dict) --* The definition of the nodes and connections between nodes in the flow. * **connections** *(list) --* An array of connection definitions in the flow. * *(dict) --* Contains information about a connection between two nodes in the flow. * **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: "conditional", "data". 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'} * **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. * **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. * **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. * **type** *(string) --* Whether the source node that the connection begins from is a condition node ( "Conditional") or not ( "Data"). * **nodes** *(list) --* An array of node definitions in the flow. * *(dict) --* Contains configurations about a node in the flow. * **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: "agent", "collector", "condition", "inlineCode", "input", "iterator", "knowledgeBase", "lambdaFunction", "lex", "loop", "loopController", "loopInput", "output", "prompt", "retrieval", "storage". 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'} * **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. * **collector** *(dict) --* Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs. * **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. * **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. * **name** *(string) --* A name for the condition that you can reference. * **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. * **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. * **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. * **knowledgeBase** *(dict) --* Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response. * **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. * **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. * **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) --* * **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. * **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. * **numberOfResults** *(integer) --* The number of results to retrieve from the knowledge base. * **orchestrationConfiguration** *(dict) --* The configuration for orchestrating the retrieval and generation process in the knowledge base node. * **additionalModelRequestFields** *(dict) --* The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model. * *(string) --* * (*document*) -- * **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. * **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) --* * **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. * **performanceConfig** *(dict) --* The performance configuration options for the knowledge base retrieval and generation process. * **latency** *(string) --* The latency optimization setting. * **promptTemplate** *(dict) --* A custom prompt template for orchestrating the retrieval and generation process. * **textPromptTemplate** *(string) --* The text of the prompt template. * **promptTemplate** *(dict) --* A custom prompt template to use with the knowledge base for generating responses. * **textPromptTemplate** *(string) --* The text of the prompt template. * **rerankingConfiguration** *(dict) --* The configuration for reranking the retrieved results from the knowledge base to improve relevance. * **bedrockRerankingConfiguration** *(dict) --* Specifies the configuration for using an Amazon Bedrock reranker model to rerank retrieved results. * **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: "fieldsToExclude", "fieldsToInclude". 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'} * **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. * **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. * **modelConfiguration** *(dict) --* Specifies the configuration for 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*) -- * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Bedrock reranker model. * **numberOfRerankedResults** *(integer) --* Specifies the number of results to return after reranking. * **type** *(string) --* Specifies the type of reranking model to use. Currently, the only supported value is "BEDROCK_RERANKING_MODEL". * **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. * **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. * **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. * **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. * **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. * **name** *(string) --* A name for the condition that you can reference. * **maxIterations** *(integer) --* Specifies the maximum number of times the DoWhile loop can iterate before the flow exits the loop. * **loopInput** *(dict) --* Contains input node configurations for a DoWhile loop in your flow. * **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. * **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. * **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. * **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: "inline", "resource". 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'} * **inline** *(dict) --* Contains configurations for a prompt that is defined inline * **additionalModelRequestFields** (*document*) -- Additional fields to be included in the model request for the Prompt node. * **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. * **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) --* * **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. * **modelId** *(string) --* The unique identifier of the model or inference profile to run inference with. * **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: "chat", "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'} * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **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. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* The role that the message belongs to. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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: "any", "auto", "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'} * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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. * **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: "cachePoint", "toolSpec". 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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for 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. * **name** *(string) --* The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a 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. * **text** *(string) --* The message for the prompt. * **templateType** *(string) --* The type of prompt template. * **resource** *(dict) --* Contains configurations for a prompt from Prompt management. * **promptArn** *(string) --* The Amazon Resource Name (ARN) of the prompt from Prompt management. * **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. * **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. * **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. * **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. * **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. * **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. * **name** *(string) --* A name for the node. * **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. * **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. * **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. * **id** *(string) --* The unique identifier of the flow. * **name** *(string) --* The name of the version. * **status** *(string) --* The status of the flow. * **version** *(string) --* The version of the flow for which information was retrieved. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / delete_agent delete_agent ************ AgentsforBedrock.Client.delete_agent(**kwargs) Deletes an agent. See also: AWS API Documentation **Request Syntax** response = client.delete_agent( agentId='string', skipResourceInUseCheck=True|False ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent to delete. * **skipResourceInUseCheck** (*boolean*) -- By default, this value is "false" and deletion is stopped if the resource is in use. If you set it to "true", the resource will be deleted even if the resource is in use. Return type: dict Returns: **Response Syntax** { 'agentId': 'string', 'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING' } **Response Structure** * *(dict) --* * **agentId** *(string) --* The unique identifier of the agent that was deleted. * **agentStatus** *(string) --* The status of the agent. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / update_data_source update_data_source ****************** AgentsforBedrock.Client.update_data_source(**kwargs) Updates the configurations for a data source connector. Warning: You can't change the "chunkingConfiguration" after you create the data source connector. Specify the existing "chunkingConfiguration". See also: AWS API Documentation **Request Syntax** response = client.update_data_source( dataDeletionPolicy='RETAIN'|'DELETE', dataSourceConfiguration={ 'confluenceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'BASIC'|'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostType': 'SAAS', 'hostUrl': 'string' } }, 's3Configuration': { 'bucketArn': 'string', 'bucketOwnerAccountId': 'string', 'inclusionPrefixes': [ 'string', ] }, 'salesforceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostUrl': 'string' } }, 'sharePointConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS'|'OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'domain': 'string', 'hostType': 'ONLINE', 'siteUrls': [ 'string', ], 'tenantId': 'string' } }, 'type': 'S3'|'WEB'|'CONFLUENCE'|'SALESFORCE'|'SHAREPOINT'|'CUSTOM'|'REDSHIFT_METADATA', 'webConfiguration': { 'crawlerConfiguration': { 'crawlerLimits': { 'maxPages': 123, 'rateLimit': 123 }, 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'scope': 'HOST_ONLY'|'SUBDOMAINS', 'userAgent': 'string', 'userAgentHeader': 'string' }, 'sourceConfiguration': { 'urlConfiguration': { 'seedUrls': [ { 'url': 'string' }, ] } } } }, dataSourceId='string', description='string', knowledgeBaseId='string', name='string', serverSideEncryptionConfiguration={ 'kmsKeyArn': 'string' }, vectorIngestionConfiguration={ 'chunkingConfiguration': { 'chunkingStrategy': 'FIXED_SIZE'|'NONE'|'HIERARCHICAL'|'SEMANTIC', 'fixedSizeChunkingConfiguration': { 'maxTokens': 123, 'overlapPercentage': 123 }, 'hierarchicalChunkingConfiguration': { 'levelConfigurations': [ { 'maxTokens': 123 }, ], 'overlapTokens': 123 }, 'semanticChunkingConfiguration': { 'breakpointPercentileThreshold': 123, 'bufferSize': 123, 'maxTokens': 123 } }, 'contextEnrichmentConfiguration': { 'bedrockFoundationModelConfiguration': { 'enrichmentStrategyConfiguration': { 'method': 'CHUNK_ENTITY_EXTRACTION' }, 'modelArn': 'string' }, 'type': 'BEDROCK_FOUNDATION_MODEL' }, 'customTransformationConfiguration': { 'intermediateStorage': { 's3Location': { 'uri': 'string' } }, 'transformations': [ { 'stepToApply': 'POST_CHUNKING', 'transformationFunction': { 'transformationLambdaConfiguration': { 'lambdaArn': 'string' } } }, ] }, 'parsingConfiguration': { 'bedrockDataAutomationConfiguration': { 'parsingModality': 'MULTIMODAL' }, 'bedrockFoundationModelConfiguration': { 'modelArn': 'string', 'parsingModality': 'MULTIMODAL', 'parsingPrompt': { 'parsingPromptText': 'string' } }, 'parsingStrategy': 'BEDROCK_FOUNDATION_MODEL'|'BEDROCK_DATA_AUTOMATION' } } ) Parameters: * **dataDeletionPolicy** (*string*) -- The data deletion policy for the data source that you want to update. * **dataSourceConfiguration** (*dict*) -- **[REQUIRED]** The connection configuration for the data source that you want to update. * **confluenceConfiguration** *(dict) --* The configuration information to connect to Confluence as your data source. Note: Confluence data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the Confluence content. For example, configuring specific types of Confluence content. * **filterConfiguration** *(dict) --* The configuration of filtering the Confluence content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* **[REQUIRED]** The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* **[REQUIRED]** The supported object type or content type of the data source. * **type** *(string) --* **[REQUIRED]** The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* **[REQUIRED]** The endpoint information to connect to your Confluence data source. * **authType** *(string) --* **[REQUIRED]** The supported authentication type to authenticate and connect to your Confluence instance. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration. * **hostType** *(string) --* **[REQUIRED]** The supported host type, whether online/cloud or server /on-premises. * **hostUrl** *(string) --* **[REQUIRED]** The Confluence host URL or instance URL. * **s3Configuration** *(dict) --* The configuration information to connect to Amazon S3 as your data source. * **bucketArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the S3 bucket that contains your data. * **bucketOwnerAccountId** *(string) --* The account ID for the owner of the S3 bucket. * **inclusionPrefixes** *(list) --* A list of S3 prefixes to include certain files or content. For more information, see Organizing objects using prefixes. * *(string) --* * **salesforceConfiguration** *(dict) --* The configuration information to connect to Salesforce as your data source. Note: Salesforce data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the Salesforce content. For example, configuring specific types of Salesforce content. * **filterConfiguration** *(dict) --* The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* **[REQUIRED]** The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* **[REQUIRED]** The supported object type or content type of the data source. * **type** *(string) --* **[REQUIRED]** The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* **[REQUIRED]** The endpoint information to connect to your Salesforce data source. * **authType** *(string) --* **[REQUIRED]** The supported authentication type to authenticate and connect to your Salesforce instance. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration. * **hostUrl** *(string) --* **[REQUIRED]** The Salesforce host URL or instance URL. * **sharePointConfiguration** *(dict) --* The configuration information to connect to SharePoint as your data source. Note: SharePoint data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the SharePoint content. For example, configuring specific types of SharePoint content. * **filterConfiguration** *(dict) --* The configuration of filtering the SharePoint content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* **[REQUIRED]** The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* **[REQUIRED]** The supported object type or content type of the data source. * **type** *(string) --* **[REQUIRED]** The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* **[REQUIRED]** The endpoint information to connect to your SharePoint data source. * **authType** *(string) --* **[REQUIRED]** The supported authentication type to authenticate and connect to your SharePoint site/sites. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key- value pairs that must be included in your secret, depending on your authentication type, see SharePoint connection configuration. * **domain** *(string) --* **[REQUIRED]** The domain of your SharePoint instance or site URL/URLs. * **hostType** *(string) --* **[REQUIRED]** The supported host type, whether online/cloud or server /on-premises. * **siteUrls** *(list) --* **[REQUIRED]** A list of one or more SharePoint site URLs. * *(string) --* * **tenantId** *(string) --* The identifier of your Microsoft 365 tenant. * **type** *(string) --* **[REQUIRED]** The type of data source. * **webConfiguration** *(dict) --* The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs. Note: Crawling web URLs as your data source is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The Web Crawler configuration details for the web data source. * **crawlerLimits** *(dict) --* The configuration of crawl limits for the web URLs. * **maxPages** *(integer) --* The max number of web pages crawled from your source URLs, up to 25,000 pages. If the web pages exceed this limit, the data source sync will fail and no web pages will be ingested. * **rateLimit** *(integer) --* The max rate at which pages are crawled, up to 300 per minute per host. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled. * *(string) --* * **scope** *(string) --* The scope of what is crawled for your URLs. You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL "https://docs.aws.amazon.com/bedrock/latest/userguide/" and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain "aws.amazon.com" can also include sub domain "docs.aws.amazon.com". * **userAgent** *(string) --* Returns the user agent suffix for your web crawler. * **userAgentHeader** *(string) --* A string used for identifying the crawler or bot when it accesses a web server. The user agent header value consists of the "bedrockbot", UUID, and a user agent suffix for your crawler (if one is provided). By default, it is set to "bedrockbot_UUID". You can optionally append a custom suffix to "bedrockbot_UUID" to allowlist a specific user agent permitted to access your source URLs. * **sourceConfiguration** *(dict) --* **[REQUIRED]** The source configuration details for the web data source. * **urlConfiguration** *(dict) --* **[REQUIRED]** The configuration of the URL/URLs. * **seedUrls** *(list) --* One or more seed or starting point URLs. * *(dict) --* The seed or starting point URL. You should be authorized to crawl the URL. * **url** *(string) --* A seed or starting point URL. * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source. * **description** (*string*) -- Specifies a new description for the data source. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base for the data source. * **name** (*string*) -- **[REQUIRED]** Specifies a new name for the data source. * **serverSideEncryptionConfiguration** (*dict*) -- Contains details about server-side encryption of the data source. * **kmsKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key used to encrypt the resource. * **vectorIngestionConfiguration** (*dict*) -- Contains details about how to ingest the documents in the data source. * **chunkingConfiguration** *(dict) --* Details about how to chunk the documents in the data source. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. * **chunkingStrategy** *(string) --* **[REQUIRED]** Knowledge base can split your source data into chunks. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for "NONE", then you may want to pre- process your files by splitting them up such that each file corresponds to a chunk. * "FIXED_SIZE" – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the "fixedSizeChunkingConfiguration". * "HIERARCHICAL" – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer. * "SEMANTIC" – Split documents into chunks based on groups of similar content derived with natural language processing. * "NONE" – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files. * **fixedSizeChunkingConfiguration** *(dict) --* Configurations for when you choose fixed-size chunking. If you set the "chunkingStrategy" as "NONE", exclude this field. * **maxTokens** *(integer) --* **[REQUIRED]** The maximum number of tokens to include in a chunk. * **overlapPercentage** *(integer) --* **[REQUIRED]** The percentage of overlap between adjacent chunks of a data source. * **hierarchicalChunkingConfiguration** *(dict) --* Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer. * **levelConfigurations** *(list) --* **[REQUIRED]** Token settings for each layer. * *(dict) --* Token settings for a layer in a hierarchical chunking configuration. * **maxTokens** *(integer) --* **[REQUIRED]** The maximum number of tokens that a chunk can contain in this layer. * **overlapTokens** *(integer) --* **[REQUIRED]** The number of tokens to repeat across chunks in the same layer. * **semanticChunkingConfiguration** *(dict) --* Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing. * **breakpointPercentileThreshold** *(integer) --* **[REQUIRED]** The dissimilarity threshold for splitting chunks. * **bufferSize** *(integer) --* **[REQUIRED]** The buffer size. * **maxTokens** *(integer) --* **[REQUIRED]** The maximum number of tokens that a chunk can contain. * **contextEnrichmentConfiguration** *(dict) --* The context enrichment configuration used for ingestion of the data into the vector store. * **bedrockFoundationModelConfiguration** *(dict) --* The configuration of the Amazon Bedrock foundation model used for context enrichment. * **enrichmentStrategyConfiguration** *(dict) --* **[REQUIRED]** The enrichment stategy used to provide additional context. For example, Neptune GraphRAG uses Amazon Bedrock foundation models to perform chunk entity extraction. * **method** *(string) --* **[REQUIRED]** The method used for the context enrichment strategy. * **modelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base. * **type** *(string) --* **[REQUIRED]** The method used for context enrichment. It must be Amazon Bedrock foundation models. * **customTransformationConfiguration** *(dict) --* A custom document transformer for parsed data source documents. * **intermediateStorage** *(dict) --* **[REQUIRED]** An S3 bucket path for input and output objects. * **s3Location** *(dict) --* **[REQUIRED]** An S3 bucket path. * **uri** *(string) --* **[REQUIRED]** The location's URI. For example, "s3://my-bucket /chunk-processor/". * **transformations** *(list) --* **[REQUIRED]** A Lambda function that processes documents. * *(dict) --* A custom processing step for documents moving through a data source ingestion pipeline. To process documents after they have been converted into chunks, set the step to apply to "POST_CHUNKING". * **stepToApply** *(string) --* **[REQUIRED]** When the service applies the transformation. * **transformationFunction** *(dict) --* **[REQUIRED]** A Lambda function that processes documents. * **transformationLambdaConfiguration** *(dict) --* **[REQUIRED]** The Lambda function. * **lambdaArn** *(string) --* **[REQUIRED]** The function's ARN identifier. * **parsingConfiguration** *(dict) --* Configurations for a parser to use for parsing documents in your data source. If you exclude this field, the default parser will be used. * **bedrockDataAutomationConfiguration** *(dict) --* If you specify "BEDROCK_DATA_AUTOMATION" as the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser. * **parsingModality** *(string) --* Specifies whether to enable parsing of multimodal data, including both text and/or images. * **bedrockFoundationModelConfiguration** *(dict) --* If you specify "BEDROCK_FOUNDATION_MODEL" as the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents. * **modelArn** *(string) --* **[REQUIRED]** The ARN of the foundation model to use for parsing. * **parsingModality** *(string) --* Specifies whether to enable parsing of multimodal data, including both text and/or images. * **parsingPrompt** *(dict) --* Instructions for interpreting the contents of a document. * **parsingPromptText** *(string) --* **[REQUIRED]** Instructions for interpreting the contents of a document. * **parsingStrategy** *(string) --* **[REQUIRED]** The parsing strategy for the data source. Return type: dict Returns: **Response Syntax** { 'dataSource': { 'createdAt': datetime(2015, 1, 1), 'dataDeletionPolicy': 'RETAIN'|'DELETE', 'dataSourceConfiguration': { 'confluenceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'BASIC'|'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostType': 'SAAS', 'hostUrl': 'string' } }, 's3Configuration': { 'bucketArn': 'string', 'bucketOwnerAccountId': 'string', 'inclusionPrefixes': [ 'string', ] }, 'salesforceConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'hostUrl': 'string' } }, 'sharePointConfiguration': { 'crawlerConfiguration': { 'filterConfiguration': { 'patternObjectFilter': { 'filters': [ { 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'objectType': 'string' }, ] }, 'type': 'PATTERN' } }, 'sourceConfiguration': { 'authType': 'OAUTH2_CLIENT_CREDENTIALS'|'OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS', 'credentialsSecretArn': 'string', 'domain': 'string', 'hostType': 'ONLINE', 'siteUrls': [ 'string', ], 'tenantId': 'string' } }, 'type': 'S3'|'WEB'|'CONFLUENCE'|'SALESFORCE'|'SHAREPOINT'|'CUSTOM'|'REDSHIFT_METADATA', 'webConfiguration': { 'crawlerConfiguration': { 'crawlerLimits': { 'maxPages': 123, 'rateLimit': 123 }, 'exclusionFilters': [ 'string', ], 'inclusionFilters': [ 'string', ], 'scope': 'HOST_ONLY'|'SUBDOMAINS', 'userAgent': 'string', 'userAgentHeader': 'string' }, 'sourceConfiguration': { 'urlConfiguration': { 'seedUrls': [ { 'url': 'string' }, ] } } } }, 'dataSourceId': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseId': 'string', 'name': 'string', 'serverSideEncryptionConfiguration': { 'kmsKeyArn': 'string' }, 'status': 'AVAILABLE'|'DELETING'|'DELETE_UNSUCCESSFUL', 'updatedAt': datetime(2015, 1, 1), 'vectorIngestionConfiguration': { 'chunkingConfiguration': { 'chunkingStrategy': 'FIXED_SIZE'|'NONE'|'HIERARCHICAL'|'SEMANTIC', 'fixedSizeChunkingConfiguration': { 'maxTokens': 123, 'overlapPercentage': 123 }, 'hierarchicalChunkingConfiguration': { 'levelConfigurations': [ { 'maxTokens': 123 }, ], 'overlapTokens': 123 }, 'semanticChunkingConfiguration': { 'breakpointPercentileThreshold': 123, 'bufferSize': 123, 'maxTokens': 123 } }, 'contextEnrichmentConfiguration': { 'bedrockFoundationModelConfiguration': { 'enrichmentStrategyConfiguration': { 'method': 'CHUNK_ENTITY_EXTRACTION' }, 'modelArn': 'string' }, 'type': 'BEDROCK_FOUNDATION_MODEL' }, 'customTransformationConfiguration': { 'intermediateStorage': { 's3Location': { 'uri': 'string' } }, 'transformations': [ { 'stepToApply': 'POST_CHUNKING', 'transformationFunction': { 'transformationLambdaConfiguration': { 'lambdaArn': 'string' } } }, ] }, 'parsingConfiguration': { 'bedrockDataAutomationConfiguration': { 'parsingModality': 'MULTIMODAL' }, 'bedrockFoundationModelConfiguration': { 'modelArn': 'string', 'parsingModality': 'MULTIMODAL', 'parsingPrompt': { 'parsingPromptText': 'string' } }, 'parsingStrategy': 'BEDROCK_FOUNDATION_MODEL'|'BEDROCK_DATA_AUTOMATION' } } } } **Response Structure** * *(dict) --* * **dataSource** *(dict) --* Contains details about the data source. * **createdAt** *(datetime) --* The time at which the data source was created. * **dataDeletionPolicy** *(string) --* The data deletion policy for the data source. * **dataSourceConfiguration** *(dict) --* The connection configuration for the data source. * **confluenceConfiguration** *(dict) --* The configuration information to connect to Confluence as your data source. Note: Confluence data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the Confluence content. For example, configuring specific types of Confluence content. * **filterConfiguration** *(dict) --* The configuration of filtering the Confluence content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* The supported object type or content type of the data source. * **type** *(string) --* The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* The endpoint information to connect to your Confluence data source. * **authType** *(string) --* The supported authentication type to authenticate and connect to your Confluence instance. * **credentialsSecretArn** *(string) --* The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration. * **hostType** *(string) --* The supported host type, whether online/cloud or server/on-premises. * **hostUrl** *(string) --* The Confluence host URL or instance URL. * **s3Configuration** *(dict) --* The configuration information to connect to Amazon S3 as your data source. * **bucketArn** *(string) --* The Amazon Resource Name (ARN) of the S3 bucket that contains your data. * **bucketOwnerAccountId** *(string) --* The account ID for the owner of the S3 bucket. * **inclusionPrefixes** *(list) --* A list of S3 prefixes to include certain files or content. For more information, see Organizing objects using prefixes. * *(string) --* * **salesforceConfiguration** *(dict) --* The configuration information to connect to Salesforce as your data source. Note: Salesforce data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the Salesforce content. For example, configuring specific types of Salesforce content. * **filterConfiguration** *(dict) --* The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* The supported object type or content type of the data source. * **type** *(string) --* The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* The endpoint information to connect to your Salesforce data source. * **authType** *(string) --* The supported authentication type to authenticate and connect to your Salesforce instance. * **credentialsSecretArn** *(string) --* The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration. * **hostUrl** *(string) --* The Salesforce host URL or instance URL. * **sharePointConfiguration** *(dict) --* The configuration information to connect to SharePoint as your data source. Note: SharePoint data source connector is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The configuration of the SharePoint content. For example, configuring specific types of SharePoint content. * **filterConfiguration** *(dict) --* The configuration of filtering the SharePoint content. For example, configuring regular expression patterns to include or exclude certain content. * **patternObjectFilter** *(dict) --* The configuration of filtering certain objects or content types of the data source. * **filters** *(list) --* The configuration of specific filters applied to your data source content. You can filter out or include certain content. * *(dict) --* The specific filters applied to your data source content. You can filter out or include certain content. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled. * *(string) --* * **objectType** *(string) --* The supported object type or content type of the data source. * **type** *(string) --* The type of filtering that you want to apply to certain objects or content of the data source. For example, the "PATTERN" type is regular expression patterns you can apply to filter your content. * **sourceConfiguration** *(dict) --* The endpoint information to connect to your SharePoint data source. * **authType** *(string) --* The supported authentication type to authenticate and connect to your SharePoint site/sites. * **credentialsSecretArn** *(string) --* The Amazon Resource Name of an Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see SharePoint connection configuration. * **domain** *(string) --* The domain of your SharePoint instance or site URL/URLs. * **hostType** *(string) --* The supported host type, whether online/cloud or server/on-premises. * **siteUrls** *(list) --* A list of one or more SharePoint site URLs. * *(string) --* * **tenantId** *(string) --* The identifier of your Microsoft 365 tenant. * **type** *(string) --* The type of data source. * **webConfiguration** *(dict) --* The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs. Note: Crawling web URLs as your data source is in preview release and is subject to change. * **crawlerConfiguration** *(dict) --* The Web Crawler configuration details for the web data source. * **crawlerLimits** *(dict) --* The configuration of crawl limits for the web URLs. * **maxPages** *(integer) --* The max number of web pages crawled from your source URLs, up to 25,000 pages. If the web pages exceed this limit, the data source sync will fail and no web pages will be ingested. * **rateLimit** *(integer) --* The max rate at which pages are crawled, up to 300 per minute per host. * **exclusionFilters** *(list) --* A list of one or more exclusion regular expression patterns to exclude certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled. * *(string) --* * **inclusionFilters** *(list) --* A list of one or more inclusion regular expression patterns to include certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled. * *(string) --* * **scope** *(string) --* The scope of what is crawled for your URLs. You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL "https://d ocs.aws.amazon.com/bedrock/latest/userguide/" and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain "aws.amazon.com" can also include sub domain "docs.aws.amazon.com". * **userAgent** *(string) --* Returns the user agent suffix for your web crawler. * **userAgentHeader** *(string) --* A string used for identifying the crawler or bot when it accesses a web server. The user agent header value consists of the "bedrockbot", UUID, and a user agent suffix for your crawler (if one is provided). By default, it is set to "bedrockbot_UUID". You can optionally append a custom suffix to "bedrockbot_UUID" to allowlist a specific user agent permitted to access your source URLs. * **sourceConfiguration** *(dict) --* The source configuration details for the web data source. * **urlConfiguration** *(dict) --* The configuration of the URL/URLs. * **seedUrls** *(list) --* One or more seed or starting point URLs. * *(dict) --* The seed or starting point URL. You should be authorized to crawl the URL. * **url** *(string) --* A seed or starting point URL. * **dataSourceId** *(string) --* The unique identifier of the data source. * **description** *(string) --* The description of the data source. * **failureReasons** *(list) --* The detailed reasons on the failure to delete a data source. * *(string) --* * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base to which the data source belongs. * **name** *(string) --* The name of the data source. * **serverSideEncryptionConfiguration** *(dict) --* Contains details about the configuration of the server- side encryption. * **kmsKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key used to encrypt the resource. * **status** *(string) --* The status of the data source. The following statuses are possible: * Available – The data source has been created and is ready for ingestion into the knowledge base. * Deleting – The data source is being deleted. * **updatedAt** *(datetime) --* The time at which the data source was last updated. * **vectorIngestionConfiguration** *(dict) --* Contains details about how to ingest the documents in the data source. * **chunkingConfiguration** *(dict) --* Details about how to chunk the documents in the data source. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. * **chunkingStrategy** *(string) --* Knowledge base can split your source data into chunks. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for "NONE", then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk. * "FIXED_SIZE" – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the "fixedSizeChunkingConfiguration". * "HIERARCHICAL" – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer. * "SEMANTIC" – Split documents into chunks based on groups of similar content derived with natural language processing. * "NONE" – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files. * **fixedSizeChunkingConfiguration** *(dict) --* Configurations for when you choose fixed-size chunking. If you set the "chunkingStrategy" as "NONE", exclude this field. * **maxTokens** *(integer) --* The maximum number of tokens to include in a chunk. * **overlapPercentage** *(integer) --* The percentage of overlap between adjacent chunks of a data source. * **hierarchicalChunkingConfiguration** *(dict) --* Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer. * **levelConfigurations** *(list) --* Token settings for each layer. * *(dict) --* Token settings for a layer in a hierarchical chunking configuration. * **maxTokens** *(integer) --* The maximum number of tokens that a chunk can contain in this layer. * **overlapTokens** *(integer) --* The number of tokens to repeat across chunks in the same layer. * **semanticChunkingConfiguration** *(dict) --* Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing. * **breakpointPercentileThreshold** *(integer) --* The dissimilarity threshold for splitting chunks. * **bufferSize** *(integer) --* The buffer size. * **maxTokens** *(integer) --* The maximum number of tokens that a chunk can contain. * **contextEnrichmentConfiguration** *(dict) --* The context enrichment configuration used for ingestion of the data into the vector store. * **bedrockFoundationModelConfiguration** *(dict) --* The configuration of the Amazon Bedrock foundation model used for context enrichment. * **enrichmentStrategyConfiguration** *(dict) --* The enrichment stategy used to provide additional context. For example, Neptune GraphRAG uses Amazon Bedrock foundation models to perform chunk entity extraction. * **method** *(string) --* The method used for the context enrichment strategy. * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base. * **type** *(string) --* The method used for context enrichment. It must be Amazon Bedrock foundation models. * **customTransformationConfiguration** *(dict) --* A custom document transformer for parsed data source documents. * **intermediateStorage** *(dict) --* An S3 bucket path for input and output objects. * **s3Location** *(dict) --* An S3 bucket path. * **uri** *(string) --* The location's URI. For example, "s3://my-bucket /chunk-processor/". * **transformations** *(list) --* A Lambda function that processes documents. * *(dict) --* A custom processing step for documents moving through a data source ingestion pipeline. To process documents after they have been converted into chunks, set the step to apply to "POST_CHUNKING". * **stepToApply** *(string) --* When the service applies the transformation. * **transformationFunction** *(dict) --* A Lambda function that processes documents. * **transformationLambdaConfiguration** *(dict) --* The Lambda function. * **lambdaArn** *(string) --* The function's ARN identifier. * **parsingConfiguration** *(dict) --* Configurations for a parser to use for parsing documents in your data source. If you exclude this field, the default parser will be used. * **bedrockDataAutomationConfiguration** *(dict) --* If you specify "BEDROCK_DATA_AUTOMATION" as the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser. * **parsingModality** *(string) --* Specifies whether to enable parsing of multimodal data, including both text and/or images. * **bedrockFoundationModelConfiguration** *(dict) --* If you specify "BEDROCK_FOUNDATION_MODEL" as the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents. * **modelArn** *(string) --* The ARN of the foundation model to use for parsing. * **parsingModality** *(string) --* Specifies whether to enable parsing of multimodal data, including both text and/or images. * **parsingPrompt** *(dict) --* Instructions for interpreting the contents of a document. * **parsingPromptText** *(string) --* Instructions for interpreting the contents of a document. * **parsingStrategy** *(string) --* The parsing strategy for the data source. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / delete_agent_alias delete_agent_alias ****************** AgentsforBedrock.Client.delete_agent_alias(**kwargs) Deletes an alias of an agent. See also: AWS API Documentation **Request Syntax** response = client.delete_agent_alias( agentAliasId='string', agentId='string' ) Parameters: * **agentAliasId** (*string*) -- **[REQUIRED]** The unique identifier of the alias to delete. * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent that the alias belongs to. Return type: dict Returns: **Response Syntax** { 'agentAliasId': 'string', 'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING'|'DISSOCIATED', 'agentId': 'string' } **Response Structure** * *(dict) --* * **agentAliasId** *(string) --* The unique identifier of the alias that was deleted. * **agentAliasStatus** *(string) --* The status of the alias. * **agentId** *(string) --* The unique identifier of the agent that the alias belongs to. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / update_prompt update_prompt ************* AgentsforBedrock.Client.update_prompt(**kwargs) Modifies a prompt in your prompt library. Include both fields that you want to keep and fields that you want to replace. For more information, see Prompt management in Amazon Bedrock and Edit prompts in your prompt library in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.update_prompt( customerEncryptionKeyArn='string', defaultVariant='string', description='string', name='string', promptIdentifier='string', variants=[ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'genAiResource': { 'agent': { 'agentIdentifier': 'string' } }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'metadata': [ { 'key': 'string', 'value': 'string' }, ], 'modelId': 'string', 'name': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {} , 'auto': {} , 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, ] ) Parameters: * **customerEncryptionKeyArn** (*string*) -- The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt. * **defaultVariant** (*string*) -- The name of the default variant for the prompt. This value must match the "name" field in the relevant PromptVariant object. * **description** (*string*) -- A description for the prompt. * **name** (*string*) -- **[REQUIRED]** A name for the prompt. * **promptIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the prompt. * **variants** (*list*) -- A list of objects, each containing details about a variant of the prompt. * *(dict) --* Contains details about a variant of the prompt. * **additionalModelRequestFields** (*document*) -- Contains model-specific inference configurations that aren't in the "inferenceConfiguration" field. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models. * **genAiResource** *(dict) --* Specifies a generative AI resource with which to use the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "agent". * **agent** *(dict) --* Specifies an Amazon Bedrock agent with which to use the prompt. * **agentIdentifier** *(string) --* **[REQUIRED]** The ARN of the agent with which to use the prompt. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt variant. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "text". * **text** *(dict) --* Contains inference configurations for a text prompt. * **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) --* * **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. * **metadata** *(list) --* An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant. * *(dict) --* Contains a key-value pair that defines a metadata tag and value to attach to a prompt variant. For more information, see Create a prompt using Prompt management. * **key** *(string) --* **[REQUIRED]** The key of a metadata tag for a prompt variant. * **value** *(string) --* **[REQUIRED]** The value of a metadata tag for a prompt variant. * **modelId** *(string) --* The unique identifier of the model or inference profile with which to run inference on the prompt. * **name** *(string) --* **[REQUIRED]** The name of the prompt variant. * **templateConfiguration** *(dict) --* **[REQUIRED]** Contains configurations for the prompt template. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "chat", "text". * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **messages** *(list) --* **[REQUIRED]** 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. * **content** *(list) --* **[REQUIRED]** 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 can be set: "cachePoint", "text". * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* **[REQUIRED]** The role that the message belongs to. * **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 can be set: "cachePoint", "text". * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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 can be set: "any", "auto", "tool". * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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) --* **[REQUIRED]** The name of the tool. * **tools** *(list) --* **[REQUIRED]** 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 can be set: "cachePoint", "toolSpec". * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for the tool. * **description** *(string) --* The description of the tool. * **inputSchema** *(dict) --* **[REQUIRED]** The input schema for the tool. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "json". * **json** (*document*) -- A JSON object defining the input schema for the tool. * **name** *(string) --* **[REQUIRED]** The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a prompt. * **cachePoint** *(dict) --* A cache checkpoint within a template configuration. * **type** *(string) --* **[REQUIRED]** 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. * **text** *(string) --* **[REQUIRED]** The message for the prompt. * **templateType** *(string) --* **[REQUIRED]** The type of prompt template to use. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'customerEncryptionKeyArn': 'string', 'defaultVariant': 'string', 'description': 'string', 'id': 'string', 'name': 'string', 'updatedAt': datetime(2015, 1, 1), 'variants': [ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'genAiResource': { 'agent': { 'agentIdentifier': 'string' } }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'metadata': [ { 'key': 'string', 'value': 'string' }, ], 'modelId': 'string', 'name': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {}, 'auto': {}, 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, ], 'version': 'string' } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the prompt. * **createdAt** *(datetime) --* The time at which the prompt was created. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt. * **defaultVariant** *(string) --* The name of the default variant for the prompt. This value must match the "name" field in the relevant PromptVariant object. * **description** *(string) --* The description of the prompt. * **id** *(string) --* The unique identifier of the prompt. * **name** *(string) --* The name of the prompt. * **updatedAt** *(datetime) --* The time at which the prompt was last updated. * **variants** *(list) --* A list of objects, each containing details about a variant of the prompt. * *(dict) --* Contains details about a variant of the prompt. * **additionalModelRequestFields** (*document*) -- Contains model-specific inference configurations that aren't in the "inferenceConfiguration" field. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models. * **genAiResource** *(dict) --* Specifies a generative AI resource with which to use the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "agent". 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'} * **agent** *(dict) --* Specifies an Amazon Bedrock agent with which to use the prompt. * **agentIdentifier** *(string) --* The ARN of the agent with which to use the prompt. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt variant. 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. * **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) --* * **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. * **metadata** *(list) --* An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant. * *(dict) --* Contains a key-value pair that defines a metadata tag and value to attach to a prompt variant. For more information, see Create a prompt using Prompt management. * **key** *(string) --* The key of a metadata tag for a prompt variant. * **value** *(string) --* The value of a metadata tag for a prompt variant. * **modelId** *(string) --* The unique identifier of the model or inference profile with which to run inference on the prompt. * **name** *(string) --* The name of the prompt variant. * **templateConfiguration** *(dict) --* Contains configurations for the prompt template. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "chat", "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'} * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **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. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* The role that the message belongs to. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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: "any", "auto", "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'} * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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. * **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: "cachePoint", "toolSpec". 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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for 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. * **name** *(string) --* The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a 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. * **text** *(string) --* The message for the prompt. * **templateType** *(string) --* The type of prompt template to use. * **version** *(string) --* The version of the prompt. When you update a prompt, the version updated is the "DRAFT" version. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / get_agent_collaborator get_agent_collaborator ********************** AgentsforBedrock.Client.get_agent_collaborator(**kwargs) Retrieves information about an agent's collaborator. See also: AWS API Documentation **Request Syntax** response = client.get_agent_collaborator( agentId='string', agentVersion='string', collaboratorId='string' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The agent's ID. * **agentVersion** (*string*) -- **[REQUIRED]** The agent's version. * **collaboratorId** (*string*) -- **[REQUIRED]** The collaborator's ID. Return type: dict Returns: **Response Syntax** { 'agentCollaborator': { 'agentDescriptor': { 'aliasArn': 'string' }, 'agentId': 'string', 'agentVersion': 'string', 'clientToken': 'string', 'collaborationInstruction': 'string', 'collaboratorId': 'string', 'collaboratorName': 'string', 'createdAt': datetime(2015, 1, 1), 'lastUpdatedAt': datetime(2015, 1, 1), 'relayConversationHistory': 'TO_COLLABORATOR'|'DISABLED' } } **Response Structure** * *(dict) --* * **agentCollaborator** *(dict) --* Details about the collaborator. * **agentDescriptor** *(dict) --* The collaborator's agent descriptor. * **aliasArn** *(string) --* The agent's alias ARN. * **agentId** *(string) --* The collaborator's agent ID. * **agentVersion** *(string) --* The collaborator's agent version. * **clientToken** *(string) --* The collaborator's client token. * **collaborationInstruction** *(string) --* The collaborator's instructions. * **collaboratorId** *(string) --* The collaborator's collaborator ID. * **collaboratorName** *(string) --* The collaborator's collaborator name. * **createdAt** *(datetime) --* When the collaborator was created. * **lastUpdatedAt** *(datetime) --* When the collaborator was updated. * **relayConversationHistory** *(string) --* The collaborator's relay conversation history. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / create_agent_alias create_agent_alias ****************** AgentsforBedrock.Client.create_agent_alias(**kwargs) Creates an alias of an agent that can be used to deploy the agent. See also: AWS API Documentation **Request Syntax** response = client.create_agent_alias( agentAliasName='string', agentId='string', clientToken='string', description='string', routingConfiguration=[ { 'agentVersion': 'string', 'provisionedThroughput': 'string' }, ], tags={ 'string': 'string' } ) Parameters: * **agentAliasName** (*string*) -- **[REQUIRED]** The name of the alias. * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent. * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **description** (*string*) -- A description of the alias of the agent. * **routingConfiguration** (*list*) -- Contains details about the routing configuration of the alias. * *(dict) --* Contains details about the routing configuration of the alias. * **agentVersion** *(string) --* The version of the agent with which the alias is associated. * **provisionedThroughput** *(string) --* Information on the Provisioned Throughput assigned to an agent alias. * **tags** (*dict*) -- Any tags that you want to attach to the alias of the agent. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'agentAlias': { 'agentAliasArn': 'string', 'agentAliasHistoryEvents': [ { 'endDate': datetime(2015, 1, 1), 'routingConfiguration': [ { 'agentVersion': 'string', 'provisionedThroughput': 'string' }, ], 'startDate': datetime(2015, 1, 1) }, ], 'agentAliasId': 'string', 'agentAliasName': 'string', 'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING'|'DISSOCIATED', 'agentId': 'string', 'aliasInvocationState': 'ACCEPT_INVOCATIONS'|'REJECT_INVOCATIONS', 'clientToken': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'failureReasons': [ 'string', ], 'routingConfiguration': [ { 'agentVersion': 'string', 'provisionedThroughput': 'string' }, ], 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agentAlias** *(dict) --* Contains details about the alias that was created. * **agentAliasArn** *(string) --* The Amazon Resource Name (ARN) of the alias of the agent. * **agentAliasHistoryEvents** *(list) --* Contains details about the history of the alias. * *(dict) --* Contains details about the history of the alias. * **endDate** *(datetime) --* The date that the alias stopped being associated to the version in the "routingConfiguration" object * **routingConfiguration** *(list) --* Contains details about the version of the agent with which the alias is associated. * *(dict) --* Contains details about the routing configuration of the alias. * **agentVersion** *(string) --* The version of the agent with which the alias is associated. * **provisionedThroughput** *(string) --* Information on the Provisioned Throughput assigned to an agent alias. * **startDate** *(datetime) --* The date that the alias began being associated to the version in the "routingConfiguration" object. * **agentAliasId** *(string) --* The unique identifier of the alias of the agent. * **agentAliasName** *(string) --* The name of the alias of the agent. * **agentAliasStatus** *(string) --* The status of the alias of the agent and whether it is ready for use. The following statuses are possible: * CREATING – The agent alias is being created. * PREPARED – The agent alias is finished being created or updated and is ready to be invoked. * FAILED – The agent alias API operation failed. * UPDATING – The agent alias is being updated. * DELETING – The agent alias is being deleted. * DISSOCIATED - The agent alias has no version associated with it. * **agentId** *(string) --* The unique identifier of the agent. * **aliasInvocationState** *(string) --* The invocation state for the agent alias. If the agent alias is running, the value is "ACCEPT_INVOCATIONS". If the agent alias is paused, the value is "REJECT_INVOCATIONS". Use the "UpdateAgentAlias" operation to change the invocation state. * **clientToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **createdAt** *(datetime) --* The time at which the alias of the agent was created. * **description** *(string) --* The description of the alias of the agent. * **failureReasons** *(list) --* Information on the failure of Provisioned Throughput assigned to an agent alias. * *(string) --* * **routingConfiguration** *(list) --* Contains details about the routing configuration of the alias. * *(dict) --* Contains details about the routing configuration of the alias. * **agentVersion** *(string) --* The version of the agent with which the alias is associated. * **provisionedThroughput** *(string) --* Information on the Provisioned Throughput assigned to an agent alias. * **updatedAt** *(datetime) --* The time at which the alias was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / create_flow_version create_flow_version ******************* AgentsforBedrock.Client.create_flow_version(**kwargs) Creates a version of the flow that you can deploy. 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.create_flow_version( clientToken='string', description='string', flowIdentifier='string' ) Parameters: * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **description** (*string*) -- A description of the version of the flow. * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow that you want to create a version of. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'customerEncryptionKeyArn': 'string', 'definition': { 'connections': [ { 'configuration': { 'conditional': { 'condition': 'string' }, 'data': { 'sourceOutput': 'string', 'targetInput': 'string' } }, 'name': 'string', 'source': 'string', 'target': 'string', 'type': 'Data'|'Conditional' }, ], 'nodes': [ { 'configuration': { 'agent': { 'agentAliasArn': 'string' }, 'collector': {}, 'condition': { 'conditions': [ { 'expression': 'string', 'name': 'string' }, ] }, 'inlineCode': { 'code': 'string', 'language': 'Python_3' }, 'input': {}, 'iterator': {}, 'knowledgeBase': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'knowledgeBaseId': 'string', 'modelId': 'string', 'numberOfResults': 123, 'orchestrationConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'inferenceConfig': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'performanceConfig': { 'latency': 'standard'|'optimized' }, 'promptTemplate': { 'textPromptTemplate': 'string' } }, 'promptTemplate': { 'textPromptTemplate': 'string' }, 'rerankingConfiguration': { 'bedrockRerankingConfiguration': { 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToExclude': [ { 'fieldName': 'string' }, ], 'fieldsToInclude': [ { 'fieldName': 'string' }, ] } }, 'modelConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'modelArn': 'string' }, 'numberOfRerankedResults': 123 }, 'type': 'BEDROCK_RERANKING_MODEL' } }, 'lambdaFunction': { 'lambdaArn': 'string' }, 'lex': { 'botAliasArn': 'string', 'localeId': 'string' }, 'loop': { 'definition': {'... recursive ...'} }, 'loopController': { 'continueCondition': { 'expression': 'string', 'name': 'string' }, 'maxIterations': 123 }, 'loopInput': {}, 'output': {}, 'prompt': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'sourceConfiguration': { 'inline': { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'modelId': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {}, 'auto': {}, 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, 'resource': { 'promptArn': 'string' } } }, 'retrieval': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } }, 'storage': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } } }, 'inputs': [ { 'category': 'LoopCondition'|'ReturnValueToLoopStart'|'ExitLoop', 'expression': 'string', 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'name': 'string', 'outputs': [ { 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'type': 'Input'|'Output'|'KnowledgeBase'|'Condition'|'Lex'|'Prompt'|'LambdaFunction'|'Storage'|'Agent'|'Retrieval'|'Iterator'|'Collector'|'InlineCode'|'Loop'|'LoopInput'|'LoopController' }, ] }, 'description': 'string', 'executionRoleArn': 'string', 'id': 'string', 'name': 'string', 'status': 'Failed'|'Prepared'|'Preparing'|'NotPrepared', 'version': 'string' } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the flow. * **createdAt** *(datetime) --* The time at which the flow was created. * **customerEncryptionKeyArn** *(string) --* The KMS key that the flow is encrypted with. * **definition** *(dict) --* A definition of the nodes and connections in the flow. * **connections** *(list) --* An array of connection definitions in the flow. * *(dict) --* Contains information about a connection between two nodes in the flow. * **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: "conditional", "data". 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'} * **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. * **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. * **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. * **type** *(string) --* Whether the source node that the connection begins from is a condition node ( "Conditional") or not ( "Data"). * **nodes** *(list) --* An array of node definitions in the flow. * *(dict) --* Contains configurations about a node in the flow. * **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: "agent", "collector", "condition", "inlineCode", "input", "iterator", "knowledgeBase", "lambdaFunction", "lex", "loop", "loopController", "loopInput", "output", "prompt", "retrieval", "storage". 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'} * **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. * **collector** *(dict) --* Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs. * **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. * **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. * **name** *(string) --* A name for the condition that you can reference. * **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. * **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. * **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. * **knowledgeBase** *(dict) --* Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response. * **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. * **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. * **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) --* * **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. * **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. * **numberOfResults** *(integer) --* The number of results to retrieve from the knowledge base. * **orchestrationConfiguration** *(dict) --* The configuration for orchestrating the retrieval and generation process in the knowledge base node. * **additionalModelRequestFields** *(dict) --* The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model. * *(string) --* * (*document*) -- * **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. * **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) --* * **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. * **performanceConfig** *(dict) --* The performance configuration options for the knowledge base retrieval and generation process. * **latency** *(string) --* The latency optimization setting. * **promptTemplate** *(dict) --* A custom prompt template for orchestrating the retrieval and generation process. * **textPromptTemplate** *(string) --* The text of the prompt template. * **promptTemplate** *(dict) --* A custom prompt template to use with the knowledge base for generating responses. * **textPromptTemplate** *(string) --* The text of the prompt template. * **rerankingConfiguration** *(dict) --* The configuration for reranking the retrieved results from the knowledge base to improve relevance. * **bedrockRerankingConfiguration** *(dict) --* Specifies the configuration for using an Amazon Bedrock reranker model to rerank retrieved results. * **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: "fieldsToExclude", "fieldsToInclude". 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'} * **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. * **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. * **modelConfiguration** *(dict) --* Specifies the configuration for 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*) -- * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Bedrock reranker model. * **numberOfRerankedResults** *(integer) --* Specifies the number of results to return after reranking. * **type** *(string) --* Specifies the type of reranking model to use. Currently, the only supported value is "BEDROCK_RERANKING_MODEL". * **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. * **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. * **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. * **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. * **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. * **name** *(string) --* A name for the condition that you can reference. * **maxIterations** *(integer) --* Specifies the maximum number of times the DoWhile loop can iterate before the flow exits the loop. * **loopInput** *(dict) --* Contains input node configurations for a DoWhile loop in your flow. * **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. * **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. * **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. * **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: "inline", "resource". 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'} * **inline** *(dict) --* Contains configurations for a prompt that is defined inline * **additionalModelRequestFields** (*document*) -- Additional fields to be included in the model request for the Prompt node. * **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. * **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) --* * **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. * **modelId** *(string) --* The unique identifier of the model or inference profile to run inference with. * **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: "chat", "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'} * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **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. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* The role that the message belongs to. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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: "any", "auto", "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'} * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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. * **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: "cachePoint", "toolSpec". 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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for 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. * **name** *(string) --* The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a 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. * **text** *(string) --* The message for the prompt. * **templateType** *(string) --* The type of prompt template. * **resource** *(dict) --* Contains configurations for a prompt from Prompt management. * **promptArn** *(string) --* The Amazon Resource Name (ARN) of the prompt from Prompt management. * **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. * **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. * **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. * **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. * **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. * **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. * **name** *(string) --* A name for the node. * **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. * **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. * **description** *(string) --* The description of the version. * **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. * **id** *(string) --* The unique identifier of the flow. * **name** *(string) --* The name of the version. * **status** *(string) --* The status of the flow. * **version** *(string) --* The version of the flow that was created. Versions are numbered incrementally, starting from 1. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / list_prompts list_prompts ************ AgentsforBedrock.Client.list_prompts(**kwargs) Returns either information about the working draft ( "DRAFT" version) of each prompt in an account, or information about of all versions of a prompt, depending on whether you include the "promptIdentifier" field or not. For more information, see View information about prompts using Prompt management in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.list_prompts( maxResults=123, nextToken='string', promptIdentifier='string' ) Parameters: * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. * **promptIdentifier** (*string*) -- The unique identifier of the prompt for whose versions you want to return information. Omit this field to list information about all prompts in an account. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'promptSummaries': [ { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'id': 'string', 'name': 'string', 'updatedAt': datetime(2015, 1, 1), 'version': 'string' }, ] } **Response Structure** * *(dict) --* * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. * **promptSummaries** *(list) --* A list, each member of which contains information about a prompt using Prompt management. * *(dict) --* Contains information about a prompt in your Prompt management tool. This data type is used in the following API operations: * ListPrompts response * **arn** *(string) --* The Amazon Resource Name (ARN) of the prompt or the prompt version (if you specified a version in the request). * **createdAt** *(datetime) --* The time at which the prompt was created. * **description** *(string) --* The description of the prompt. * **id** *(string) --* The unique identifier of the prompt. * **name** *(string) --* The name of the prompt. * **updatedAt** *(datetime) --* The time at which the prompt was last updated. * **version** *(string) --* The version of the prompt that this summary applies to. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / create_agent_action_group create_agent_action_group ************************* AgentsforBedrock.Client.create_agent_action_group(**kwargs) Creates an action group for an agent. An action group represents the actions that an agent can carry out for the customer by defining the APIs that an agent can call and the logic for calling them. To allow your agent to request the user for additional information when trying to complete a task, add an action group with the "parentActionGroupSignature" field set to "AMAZON.UserInput". To allow your agent to generate, run, and troubleshoot code when trying to complete a task, add an action group with the "parentActionGroupSignature" field set to "AMAZON.CodeInterpreter". You must leave the "description", "apiSchema", and "actionGroupExecutor" fields blank for this action group. During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information. See also: AWS API Documentation **Request Syntax** response = client.create_agent_action_group( actionGroupExecutor={ 'customControl': 'RETURN_CONTROL', 'lambda': 'string' }, actionGroupName='string', actionGroupState='ENABLED'|'DISABLED', agentId='string', agentVersion='string', apiSchema={ 'payload': 'string', 's3': { 's3BucketName': 'string', 's3ObjectKey': 'string' } }, clientToken='string', description='string', functionSchema={ 'functions': [ { 'description': 'string', 'name': 'string', 'parameters': { 'string': { 'description': 'string', 'required': True|False, 'type': 'string'|'number'|'integer'|'boolean'|'array' } }, 'requireConfirmation': 'ENABLED'|'DISABLED' }, ] }, parentActionGroupSignature='AMAZON.UserInput'|'AMAZON.CodeInterpreter'|'ANTHROPIC.Computer'|'ANTHROPIC.Bash'|'ANTHROPIC.TextEditor', parentActionGroupSignatureParams={ 'string': 'string' } ) Parameters: * **actionGroupExecutor** (*dict*) -- The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "customControl", "lambda". * **customControl** *(string) --* To return the action group invocation results directly in the "InvokeAgent" response, specify "RETURN_CONTROL". * **lambda** *(string) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * **actionGroupName** (*string*) -- **[REQUIRED]** The name to give the action group. * **actionGroupState** (*string*) -- Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request. * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent for which to create the action group. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent for which to create the action group. * **apiSchema** (*dict*) -- Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML- formatted payload defining the schema. For more information, see Action group OpenAPI schemas. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "payload", "s3". * **payload** *(string) --* The JSON or YAML-formatted payload defining the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. * **s3** *(dict) --* Contains details about the S3 object containing the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. * **s3BucketName** *(string) --* The name of the S3 bucket. * **s3ObjectKey** *(string) --* The S3 object key for the S3 resource. * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **description** (*string*) -- A description of the action group. * **functionSchema** (*dict*) -- Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "functions". * **functions** *(list) --* A list of functions that each define an action in the action group. * *(dict) --* Defines parameters that the agent needs to invoke from the user to complete the function. Corresponds to an action in an action group. This data type is used in the following API operations: * CreateAgentActionGroup request * CreateAgentActionGroup response * UpdateAgentActionGroup request * UpdateAgentActionGroup response * GetAgentActionGroup response * **description** *(string) --* A description of the function and its purpose. * **name** *(string) --* **[REQUIRED]** A name for the function. * **parameters** *(dict) --* The parameters that the agent elicits from the user to fulfill the function. * *(string) --* * *(dict) --* Contains details about a parameter in a function for an action group. This data type is used in the following API operations: * CreateAgentActionGroup request * CreateAgentActionGroup response * UpdateAgentActionGroup request * UpdateAgentActionGroup response * GetAgentActionGroup response * **description** *(string) --* A description of the parameter. Helps the foundation model determine how to elicit the parameters from the user. * **required** *(boolean) --* Whether the parameter is required for the agent to complete the function for action group invocation. * **type** *(string) --* **[REQUIRED]** The data type of the parameter. * **requireConfirmation** *(string) --* Contains information if user confirmation is required to invoke the function. * **parentActionGroupSignature** (*string*) -- Specify a built-in or computer use action for this action group. If you specify a value, you must leave the "description", "apiSchema", and "actionGroupExecutor" fields empty for this action group. * To allow your agent to request the user for additional information when trying to complete a task, set this field to "AMAZON.UserInput". * To allow your agent to generate, run, and troubleshoot code when trying to complete a task, set this field to "AMAZON.CodeInterpreter". * To allow your agent to use an Anthropic computer use tool, specify one of the following values. Warning: Computer use is a new Anthropic Claude model capability (in beta) available with Anthropic Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. When operating computer use functionality, we recommend taking additional security precautions, such as executing computer actions in virtual environments with restricted data access and limited internet connectivity. For more information, see Configure an Amazon Bedrock Agent to complete tasks with computer use tools. * "ANTHROPIC.Computer" - Gives the agent permission to use the mouse and keyboard and take screenshots. * "ANTHROPIC.TextEditor" - Gives the agent permission to view, create and edit files. * "ANTHROPIC.Bash" - Gives the agent permission to run commands in a bash shell. * **parentActionGroupSignatureParams** (*dict*) -- The configuration settings for a computer use action. Warning: Computer use is a new Anthropic Claude model capability (in beta) available with Anthropic Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. For more information, see Configure an Amazon Bedrock Agent to complete tasks with computer use tools. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'agentActionGroup': { 'actionGroupExecutor': { 'customControl': 'RETURN_CONTROL', 'lambda': 'string' }, 'actionGroupId': 'string', 'actionGroupName': 'string', 'actionGroupState': 'ENABLED'|'DISABLED', 'agentId': 'string', 'agentVersion': 'string', 'apiSchema': { 'payload': 'string', 's3': { 's3BucketName': 'string', 's3ObjectKey': 'string' } }, 'clientToken': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'functionSchema': { 'functions': [ { 'description': 'string', 'name': 'string', 'parameters': { 'string': { 'description': 'string', 'required': True|False, 'type': 'string'|'number'|'integer'|'boolean'|'array' } }, 'requireConfirmation': 'ENABLED'|'DISABLED' }, ] }, 'parentActionGroupSignatureParams': { 'string': 'string' }, 'parentActionSignature': 'AMAZON.UserInput'|'AMAZON.CodeInterpreter'|'ANTHROPIC.Computer'|'ANTHROPIC.Bash'|'ANTHROPIC.TextEditor', 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agentActionGroup** *(dict) --* Contains details about the action group that was created. * **actionGroupExecutor** *(dict) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "customControl", "lambda". 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'} * **customControl** *(string) --* To return the action group invocation results directly in the "InvokeAgent" response, specify "RETURN_CONTROL". * **lambda** *(string) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * **actionGroupId** *(string) --* The unique identifier of the action group. * **actionGroupName** *(string) --* The name of the action group. * **actionGroupState** *(string) --* Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request. * **agentId** *(string) --* The unique identifier of the agent to which the action group belongs. * **agentVersion** *(string) --* The version of the agent to which the action group belongs. * **apiSchema** *(dict) --* Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML- formatted payload defining the schema. For more information, see Action group OpenAPI schemas. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "payload", "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'} * **payload** *(string) --* The JSON or YAML-formatted payload defining the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. * **s3** *(dict) --* Contains details about the S3 object containing the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. * **s3BucketName** *(string) --* The name of the S3 bucket. * **s3ObjectKey** *(string) --* The S3 object key for the S3 resource. * **clientToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **createdAt** *(datetime) --* The time at which the action group was created. * **description** *(string) --* The description of the action group. * **functionSchema** *(dict) --* Defines functions that each define parameters that the agent needs to invoke from the user. Each function represents an action in an action group. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "functions". 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'} * **functions** *(list) --* A list of functions that each define an action in the action group. * *(dict) --* Defines parameters that the agent needs to invoke from the user to complete the function. Corresponds to an action in an action group. This data type is used in the following API operations: * CreateAgentActionGroup request * CreateAgentActionGroup response * UpdateAgentActionGroup request * UpdateAgentActionGroup response * GetAgentActionGroup response * **description** *(string) --* A description of the function and its purpose. * **name** *(string) --* A name for the function. * **parameters** *(dict) --* The parameters that the agent elicits from the user to fulfill the function. * *(string) --* * *(dict) --* Contains details about a parameter in a function for an action group. This data type is used in the following API operations: * CreateAgentActionGroup request * CreateAgentActionGroup response * UpdateAgentActionGroup request * UpdateAgentActionGroup response * GetAgentActionGroup response * **description** *(string) --* A description of the parameter. Helps the foundation model determine how to elicit the parameters from the user. * **required** *(boolean) --* Whether the parameter is required for the agent to complete the function for action group invocation. * **type** *(string) --* The data type of the parameter. * **requireConfirmation** *(string) --* Contains information if user confirmation is required to invoke the function. * **parentActionGroupSignatureParams** *(dict) --* The configuration settings for a computer use action. Warning: Computer use is a new Anthropic Claude model capability (in beta) available with Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. For more information, see Configure an Amazon Bedrock Agent to complete tasks with computer use tools. * *(string) --* * *(string) --* * **parentActionSignature** *(string) --* If this field is set as "AMAZON.UserInput", the agent can request the user for additional information when trying to complete a task. The "description", "apiSchema", and "actionGroupExecutor" fields must be blank for this action group. During orchestration, if the agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information. * **updatedAt** *(datetime) --* The time at which the action group was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / update_flow_alias update_flow_alias ***************** AgentsforBedrock.Client.update_flow_alias(**kwargs) Modifies the alias of a flow. Include both fields that you want to keep and ones that you want to change. 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.update_flow_alias( aliasIdentifier='string', concurrencyConfiguration={ 'maxConcurrency': 123, 'type': 'Automatic'|'Manual' }, description='string', flowIdentifier='string', name='string', routingConfiguration=[ { 'flowVersion': 'string' }, ] ) Parameters: * **aliasIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the alias. * **concurrencyConfiguration** (*dict*) -- The configuration that specifies how nodes in the flow are executed in parallel. * **maxConcurrency** *(integer) --* The maximum number of nodes that can be executed concurrently in the flow. * **type** *(string) --* **[REQUIRED]** The type of concurrency to use for parallel node execution. Specify one of the following options: * "Automatic" - Amazon Bedrock determines which nodes can be executed in parallel based on the flow definition and its dependencies. * "Manual" - You specify which nodes can be executed in parallel. * **description** (*string*) -- A description for the alias. * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow. * **name** (*string*) -- **[REQUIRED]** The name of the alias. * **routingConfiguration** (*list*) -- **[REQUIRED]** Contains information about the version to which to map the alias. * *(dict) --* Contains information about a version that the alias maps to. * **flowVersion** *(string) --* The version that the alias maps to. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'concurrencyConfiguration': { 'maxConcurrency': 123, 'type': 'Automatic'|'Manual' }, 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'flowId': 'string', 'id': 'string', 'name': 'string', 'routingConfiguration': [ { 'flowVersion': 'string' }, ], 'updatedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the flow. * **concurrencyConfiguration** *(dict) --* The configuration that specifies how nodes in the flow are executed in parallel. * **maxConcurrency** *(integer) --* The maximum number of nodes that can be executed concurrently in the flow. * **type** *(string) --* The type of concurrency to use for parallel node execution. Specify one of the following options: * "Automatic" - Amazon Bedrock determines which nodes can be executed in parallel based on the flow definition and its dependencies. * "Manual" - You specify which nodes can be executed in parallel. * **createdAt** *(datetime) --* The time at which the flow was created. * **description** *(string) --* The description of the flow. * **flowId** *(string) --* The unique identifier of the flow. * **id** *(string) --* The unique identifier of the alias. * **name** *(string) --* The name of the alias. * **routingConfiguration** *(list) --* Contains information about the version that the alias is mapped to. * *(dict) --* Contains information about a version that the alias maps to. * **flowVersion** *(string) --* The version that the alias maps to. * **updatedAt** *(datetime) --* The time at which the alias was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / list_tags_for_resource list_tags_for_resource ********************** AgentsforBedrock.Client.list_tags_for_resource(**kwargs) List all the tags for the resource you specify. See also: AWS API Documentation **Request Syntax** response = client.list_tags_for_resource( resourceArn='string' ) Parameters: **resourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource for which to list tags. Return type: dict Returns: **Response Syntax** { 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **tags** *(dict) --* The key-value pairs for the tags associated with the resource. * *(string) --* * *(string) --* **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / get_knowledge_base get_knowledge_base ****************** AgentsforBedrock.Client.get_knowledge_base(**kwargs) Gets information about a knoweldge base. See also: AWS API Documentation **Request Syntax** response = client.get_knowledge_base( knowledgeBaseId='string' ) Parameters: **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base you want to get information on. Return type: dict Returns: **Response Syntax** { 'knowledgeBase': { 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseArn': 'string', 'knowledgeBaseConfiguration': { 'kendraKnowledgeBaseConfiguration': { 'kendraIndexArn': 'string' }, 'sqlKnowledgeBaseConfiguration': { 'redshiftConfiguration': { 'queryEngineConfiguration': { 'provisionedConfiguration': { 'authConfiguration': { 'databaseUser': 'string', 'type': 'IAM'|'USERNAME_PASSWORD'|'USERNAME', 'usernamePasswordSecretArn': 'string' }, 'clusterIdentifier': 'string' }, 'serverlessConfiguration': { 'authConfiguration': { 'type': 'IAM'|'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string' }, 'workgroupArn': 'string' }, 'type': 'SERVERLESS'|'PROVISIONED' }, 'queryGenerationConfiguration': { 'executionTimeoutSeconds': 123, 'generationContext': { 'curatedQueries': [ { 'naturalLanguage': 'string', 'sql': 'string' }, ], 'tables': [ { 'columns': [ { 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ], 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ] } }, 'storageConfigurations': [ { 'awsDataCatalogConfiguration': { 'tableNames': [ 'string', ] }, 'redshiftConfiguration': { 'databaseName': 'string' }, 'type': 'REDSHIFT'|'AWS_DATA_CATALOG' }, ] }, 'type': 'REDSHIFT' }, 'type': 'VECTOR'|'KENDRA'|'SQL', 'vectorKnowledgeBaseConfiguration': { 'embeddingModelArn': 'string', 'embeddingModelConfiguration': { 'bedrockEmbeddingModelConfiguration': { 'dimensions': 123, 'embeddingDataType': 'FLOAT32'|'BINARY' } }, 'supplementalDataStorageConfiguration': { 'storageLocations': [ { 's3Location': { 'uri': 'string' }, 'type': 'S3' }, ] } } }, 'knowledgeBaseId': 'string', 'name': 'string', 'roleArn': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED'|'DELETE_UNSUCCESSFUL', 'storageConfiguration': { 'mongoDbAtlasConfiguration': { 'collectionName': 'string', 'credentialsSecretArn': 'string', 'databaseName': 'string', 'endpoint': 'string', 'endpointServiceName': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'textIndexName': 'string', 'vectorIndexName': 'string' }, 'neptuneAnalyticsConfiguration': { 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'graphArn': 'string' }, 'opensearchManagedClusterConfiguration': { 'domainArn': 'string', 'domainEndpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'opensearchServerlessConfiguration': { 'collectionArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'pineconeConfiguration': { 'connectionString': 'string', 'credentialsSecretArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'namespace': 'string' }, 'rdsConfiguration': { 'credentialsSecretArn': 'string', 'databaseName': 'string', 'fieldMapping': { 'customMetadataField': 'string', 'metadataField': 'string', 'primaryKeyField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'resourceArn': 'string', 'tableName': 'string' }, 'redisEnterpriseCloudConfiguration': { 'credentialsSecretArn': 'string', 'endpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 's3VectorsConfiguration': { 'indexArn': 'string', 'indexName': 'string', 'vectorBucketArn': 'string' }, 'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD'|'RDS'|'MONGO_DB_ATLAS'|'NEPTUNE_ANALYTICS'|'OPENSEARCH_MANAGED_CLUSTER'|'S3_VECTORS' }, 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **knowledgeBase** *(dict) --* Contains details about the knowledge base. * **createdAt** *(datetime) --* The time the knowledge base was created. * **description** *(string) --* The description of the knowledge base. * **failureReasons** *(list) --* A list of reasons that the API operation on the knowledge base failed. * *(string) --* * **knowledgeBaseArn** *(string) --* The Amazon Resource Name (ARN) of the knowledge base. * **knowledgeBaseConfiguration** *(dict) --* Contains details about the embeddings configuration of the knowledge base. * **kendraKnowledgeBaseConfiguration** *(dict) --* Settings for an Amazon Kendra knowledge base. * **kendraIndexArn** *(string) --* The ARN of the Amazon Kendra index. * **sqlKnowledgeBaseConfiguration** *(dict) --* Specifies configurations for a knowledge base connected to an SQL database. * **redshiftConfiguration** *(dict) --* Specifies configurations for a knowledge base connected to an Amazon Redshift database. * **queryEngineConfiguration** *(dict) --* Specifies configurations for an Amazon Redshift query engine. * **provisionedConfiguration** *(dict) --* Specifies configurations for a provisioned Amazon Redshift query engine. * **authConfiguration** *(dict) --* Specifies configurations for authentication to Amazon Redshift. * **databaseUser** *(string) --* The database username for authentication to an Amazon Redshift provisioned data warehouse. * **type** *(string) --* The type of authentication to use. * **usernamePasswordSecretArn** *(string) --* The ARN of an Secrets Manager secret for authentication. * **clusterIdentifier** *(string) --* The ID of the Amazon Redshift cluster. * **serverlessConfiguration** *(dict) --* Specifies configurations for a serverless Amazon Redshift query engine. * **authConfiguration** *(dict) --* Specifies configurations for authentication to an Amazon Redshift provisioned data warehouse. * **type** *(string) --* The type of authentication to use. * **usernamePasswordSecretArn** *(string) --* The ARN of an Secrets Manager secret for authentication. * **workgroupArn** *(string) --* The ARN of the Amazon Redshift workgroup. * **type** *(string) --* The type of query engine. * **queryGenerationConfiguration** *(dict) --* Specifies configurations for generating queries. * **executionTimeoutSeconds** *(integer) --* The time after which query generation will time out. * **generationContext** *(dict) --* Specifies configurations for context to use during query generation. * **curatedQueries** *(list) --* An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries. * *(dict) --* Contains configurations for a query, each of which defines information about example queries to help the query engine generate appropriate SQL queries. * **naturalLanguage** *(string) --* An example natural language query. * **sql** *(string) --* The SQL equivalent of the natural language query. * **tables** *(list) --* An array of objects, each of which defines information about a table in the database. * *(dict) --* Contains information about a table for the query engine to consider. * **columns** *(list) --* An array of objects, each of which defines information about a column in the table. * *(dict) --* Contains information about a column in the current table for the query engine to consider. * **description** *(string) --* A description of the column that helps the query engine understand the contents of the column. * **inclusion** *(string) --* Specifies whether to include or exclude the column during query generation. If you specify "EXCLUDE", the column will be ignored. If you specify "INCLUDE", all other columns in the table will be ignored. * **name** *(string) --* The name of the column for which the other fields in this object apply. * **description** *(string) --* A description of the table that helps the query engine understand the contents of the table. * **inclusion** *(string) --* Specifies whether to include or exclude the table during query generation. If you specify "EXCLUDE", the table will be ignored. If you specify "INCLUDE", all other tables will be ignored. * **name** *(string) --* The name of the table for which the other fields in this object apply. * **storageConfigurations** *(list) --* Specifies configurations for Amazon Redshift database storage. * *(dict) --* Contains configurations for Amazon Redshift data storage. Specify the data storage service to use in the "type" field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide. * **awsDataCatalogConfiguration** *(dict) --* Specifies configurations for storage in Glue Data Catalog. * **tableNames** *(list) --* A list of names of the tables to use. * *(string) --* * **redshiftConfiguration** *(dict) --* Specifies configurations for storage in Amazon Redshift. * **databaseName** *(string) --* The name of the Amazon Redshift database. * **type** *(string) --* The data storage service to use. * **type** *(string) --* The type of SQL database to connect to the knowledge base. * **type** *(string) --* The type of data that the data source is converted into for the knowledge base. * **vectorKnowledgeBaseConfiguration** *(dict) --* Contains details about the model that's used to convert the data source into vector embeddings. * **embeddingModelArn** *(string) --* The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base. * **embeddingModelConfiguration** *(dict) --* The embeddings model configuration details for the vector model used in Knowledge Base. * **bedrockEmbeddingModelConfiguration** *(dict) --* The vector configuration details on the Bedrock embeddings model. * **dimensions** *(integer) --* The dimensions details for the vector configuration used on the Bedrock embeddings model. * **embeddingDataType** *(string) --* The data type for the vectors when using a model to convert text into vector embeddings. The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types. * **supplementalDataStorageConfiguration** *(dict) --* If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents. These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate. * **storageLocations** *(list) --* A list of objects specifying storage locations for images extracted from multimodal documents in your data source. * *(dict) --* Contains information about a storage location for images extracted from multimodal documents in your data source. * **s3Location** *(dict) --* Contains information about the Amazon S3 location for the extracted images. * **uri** *(string) --* The location's URI. For example, "s3://my- bucket/chunk-processor/". * **type** *(string) --* Specifies the storage service used for this location. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base. * **name** *(string) --* The name of the knowledge base. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base. * **status** *(string) --* The status of the knowledge base. The following statuses are possible: * CREATING – The knowledge base is being created. * ACTIVE – The knowledge base is ready to be queried. * DELETING – The knowledge base is being deleted. * UPDATING – The knowledge base is being updated. * FAILED – The knowledge base API operation failed. * **storageConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base. * **mongoDbAtlasConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in MongoDB Atlas. * **collectionName** *(string) --* The collection name of the knowledge base in MongoDB Atlas. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster. * **databaseName** *(string) --* The database name in your MongoDB Atlas cluster for your knowledge base. * **endpoint** *(string) --* The endpoint URL of your MongoDB Atlas cluster for your knowledge base. * **endpointServiceName** *(string) --* The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **textIndexName** *(string) --* The name of the text search index in the MongoDB collection. This is required for using the hybrid search feature. * **vectorIndexName** *(string) --* The name of the MongoDB Atlas vector search index. * **neptuneAnalyticsConfiguration** *(dict) --* Contains details about the Neptune Analytics configuration of the knowledge base in Amazon Neptune. For more information, see Create a vector index in Amazon Neptune Analytics.. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **graphArn** *(string) --* The Amazon Resource Name (ARN) of the Neptune Analytics vector store. * **opensearchManagedClusterConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base in OpenSearch Managed Cluster. For more information, see Create a vector index in Amazon OpenSearch Service. * **domainArn** *(string) --* The Amazon Resource Name (ARN) of the OpenSearch domain. * **domainEndpoint** *(string) --* The endpoint URL the OpenSearch domain. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* The name of the vector store. * **opensearchServerlessConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Amazon OpenSearch Service. * **collectionArn** *(string) --* The Amazon Resource Name (ARN) of the OpenSearch Service vector store. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* The name of the vector store. * **pineconeConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Pinecone. * **connectionString** *(string) --* The endpoint URL for your index management page. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Pinecone API key. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **namespace** *(string) --* The namespace to be used to write new data to your database. * **rdsConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base in Amazon RDS. For more information, see Create a vector index in Amazon RDS. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Amazon RDS database. * **databaseName** *(string) --* The name of your Amazon RDS database. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **customMetadataField** *(string) --* Provide a name for the universal metadata field where Amazon Bedrock will store any custom metadata from your data source. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **primaryKeyField** *(string) --* The name of the field in which Amazon Bedrock stores the ID for each entry. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **resourceArn** *(string) --* The Amazon Resource Name (ARN) of the vector store. * **tableName** *(string) --* The name of the table in the database. * **redisEnterpriseCloudConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Redis Enterprise Cloud. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Redis Enterprise Cloud database. * **endpoint** *(string) --* The endpoint URL of the Redis Enterprise Cloud database. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* The name of the vector index. * **s3VectorsConfiguration** *(dict) --* The configuration settings for storing knowledge base data using S3 vectors. This includes vector index information and S3 bucket details for vector storage. * **indexArn** *(string) --* The Amazon Resource Name (ARN) of the vector index used for the knowledge base. This ARN identifies the specific vector index resource within Amazon Bedrock. * **indexName** *(string) --* The name of the vector index used for the knowledge base. This name identifies the vector index within the Amazon Bedrock service. * **vectorBucketArn** *(string) --* The Amazon Resource Name (ARN) of the S3 bucket where vector embeddings are stored. This bucket contains the vector data used by the knowledge base. * **type** *(string) --* The vector store service in which the knowledge base is stored. * **updatedAt** *(datetime) --* The time the knowledge base was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / untag_resource untag_resource ************** AgentsforBedrock.Client.untag_resource(**kwargs) Remove tags from a resource. See also: AWS API Documentation **Request Syntax** response = client.untag_resource( resourceArn='string', tagKeys=[ 'string', ] ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource from which to remove tags. * **tagKeys** (*list*) -- **[REQUIRED]** A list of keys of the tags to remove from the resource. * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / get_agent_alias get_agent_alias *************** AgentsforBedrock.Client.get_agent_alias(**kwargs) Gets information about an alias of an agent. See also: AWS API Documentation **Request Syntax** response = client.get_agent_alias( agentAliasId='string', agentId='string' ) Parameters: * **agentAliasId** (*string*) -- **[REQUIRED]** The unique identifier of the alias for which to get information. * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent to which the alias to get information belongs. Return type: dict Returns: **Response Syntax** { 'agentAlias': { 'agentAliasArn': 'string', 'agentAliasHistoryEvents': [ { 'endDate': datetime(2015, 1, 1), 'routingConfiguration': [ { 'agentVersion': 'string', 'provisionedThroughput': 'string' }, ], 'startDate': datetime(2015, 1, 1) }, ], 'agentAliasId': 'string', 'agentAliasName': 'string', 'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING'|'DISSOCIATED', 'agentId': 'string', 'aliasInvocationState': 'ACCEPT_INVOCATIONS'|'REJECT_INVOCATIONS', 'clientToken': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'failureReasons': [ 'string', ], 'routingConfiguration': [ { 'agentVersion': 'string', 'provisionedThroughput': 'string' }, ], 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agentAlias** *(dict) --* Contains information about the alias. * **agentAliasArn** *(string) --* The Amazon Resource Name (ARN) of the alias of the agent. * **agentAliasHistoryEvents** *(list) --* Contains details about the history of the alias. * *(dict) --* Contains details about the history of the alias. * **endDate** *(datetime) --* The date that the alias stopped being associated to the version in the "routingConfiguration" object * **routingConfiguration** *(list) --* Contains details about the version of the agent with which the alias is associated. * *(dict) --* Contains details about the routing configuration of the alias. * **agentVersion** *(string) --* The version of the agent with which the alias is associated. * **provisionedThroughput** *(string) --* Information on the Provisioned Throughput assigned to an agent alias. * **startDate** *(datetime) --* The date that the alias began being associated to the version in the "routingConfiguration" object. * **agentAliasId** *(string) --* The unique identifier of the alias of the agent. * **agentAliasName** *(string) --* The name of the alias of the agent. * **agentAliasStatus** *(string) --* The status of the alias of the agent and whether it is ready for use. The following statuses are possible: * CREATING – The agent alias is being created. * PREPARED – The agent alias is finished being created or updated and is ready to be invoked. * FAILED – The agent alias API operation failed. * UPDATING – The agent alias is being updated. * DELETING – The agent alias is being deleted. * DISSOCIATED - The agent alias has no version associated with it. * **agentId** *(string) --* The unique identifier of the agent. * **aliasInvocationState** *(string) --* The invocation state for the agent alias. If the agent alias is running, the value is "ACCEPT_INVOCATIONS". If the agent alias is paused, the value is "REJECT_INVOCATIONS". Use the "UpdateAgentAlias" operation to change the invocation state. * **clientToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **createdAt** *(datetime) --* The time at which the alias of the agent was created. * **description** *(string) --* The description of the alias of the agent. * **failureReasons** *(list) --* Information on the failure of Provisioned Throughput assigned to an agent alias. * *(string) --* * **routingConfiguration** *(list) --* Contains details about the routing configuration of the alias. * *(dict) --* Contains details about the routing configuration of the alias. * **agentVersion** *(string) --* The version of the agent with which the alias is associated. * **provisionedThroughput** *(string) --* Information on the Provisioned Throughput assigned to an agent alias. * **updatedAt** *(datetime) --* The time at which the alias was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / list_data_sources list_data_sources ***************** AgentsforBedrock.Client.list_data_sources(**kwargs) Lists the data sources in a knowledge base and information about each one. See also: AWS API Documentation **Request Syntax** response = client.list_data_sources( knowledgeBaseId='string', maxResults=123, nextToken='string' ) Parameters: * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base for which to return a list of information. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. Return type: dict Returns: **Response Syntax** { 'dataSourceSummaries': [ { 'dataSourceId': 'string', 'description': 'string', 'knowledgeBaseId': 'string', 'name': 'string', 'status': 'AVAILABLE'|'DELETING'|'DELETE_UNSUCCESSFUL', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **dataSourceSummaries** *(list) --* A list of objects, each of which contains information about a data source. * *(dict) --* Contains details about a data source. * **dataSourceId** *(string) --* The unique identifier of the data source. * **description** *(string) --* The description of the data source. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base to which the data source belongs. * **name** *(string) --* The name of the data source. * **status** *(string) --* The status of the data source. * **updatedAt** *(datetime) --* The time at which the data source was last updated. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / delete_flow_alias delete_flow_alias ***************** AgentsforBedrock.Client.delete_flow_alias(**kwargs) Deletes an alias of a flow. See also: AWS API Documentation **Request Syntax** response = client.delete_flow_alias( aliasIdentifier='string', flowIdentifier='string' ) Parameters: * **aliasIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the alias to be deleted. * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow that the alias belongs to. Return type: dict Returns: **Response Syntax** { 'flowId': 'string', 'id': 'string' } **Response Structure** * *(dict) --* * **flowId** *(string) --* The unique identifier of the flow that the alias belongs to. * **id** *(string) --* The unique identifier of the flow. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / get_waiter get_waiter ********** AgentsforBedrock.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" AgentsforBedrock / Client / list_flows list_flows ********** AgentsforBedrock.Client.list_flows(**kwargs) Returns a list of flows and information about each flow. For more information, see Manage a flow in Amazon Bedrock in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.list_flows( maxResults=123, nextToken='string' ) Parameters: * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. Return type: dict Returns: **Response Syntax** { 'flowSummaries': [ { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'id': 'string', 'name': 'string', 'status': 'Failed'|'Prepared'|'Preparing'|'NotPrepared', 'updatedAt': datetime(2015, 1, 1), 'version': 'string' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **flowSummaries** *(list) --* A list, each member of which contains information about a flow. * *(dict) --* Contains the definition of a flow. * **arn** *(string) --* The Amazon Resource Name (ARN) of the flow. * **createdAt** *(datetime) --* The time at which the flow was created. * **description** *(string) --* A description of the flow. * **id** *(string) --* The unique identifier of the flow. * **name** *(string) --* The name of the flow. * **status** *(string) --* The status of the flow. The following statuses are possible: * NotPrepared – The flow has been created or updated, but hasn't been prepared. If you just created the flow, you can't test it. If you updated the flow, the "DRAFT" version won't contain the latest changes for testing. Send a PrepareFlow request to package the latest changes into the "DRAFT" version. * Preparing – The flow is being prepared so that the "DRAFT" version contains the latest changes for testing. * Prepared – The flow is prepared and the "DRAFT" version contains the latest changes for testing. * Failed – The last API operation that you invoked on the flow failed. Send a GetFlow request and check the error message in the "validations" field. * **updatedAt** *(datetime) --* The time at which the flow was last updated. * **version** *(string) --* The latest version of the flow. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" AgentsforBedrock / Client / disassociate_agent_collaborator disassociate_agent_collaborator ******************************* AgentsforBedrock.Client.disassociate_agent_collaborator(**kwargs) Disassociates an agent collaborator. See also: AWS API Documentation **Request Syntax** response = client.disassociate_agent_collaborator( agentId='string', agentVersion='string', collaboratorId='string' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** An agent ID. * **agentVersion** (*string*) -- **[REQUIRED]** The agent's version. * **collaboratorId** (*string*) -- **[REQUIRED]** The collaborator's ID. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / list_agent_collaborators list_agent_collaborators ************************ AgentsforBedrock.Client.list_agent_collaborators(**kwargs) Retrieve a list of an agent's collaborators. See also: AWS API Documentation **Request Syntax** response = client.list_agent_collaborators( agentId='string', agentVersion='string', maxResults=123, nextToken='string' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The agent's ID. * **agentVersion** (*string*) -- **[REQUIRED]** The agent's version. * **maxResults** (*integer*) -- The maximum number of agent collaborators to return in one page of results. * **nextToken** (*string*) -- Specify the pagination token from a previous request to retrieve the next page of results. Return type: dict Returns: **Response Syntax** { 'agentCollaboratorSummaries': [ { 'agentDescriptor': { 'aliasArn': 'string' }, 'agentId': 'string', 'agentVersion': 'string', 'collaborationInstruction': 'string', 'collaboratorId': 'string', 'collaboratorName': 'string', 'createdAt': datetime(2015, 1, 1), 'lastUpdatedAt': datetime(2015, 1, 1), 'relayConversationHistory': 'TO_COLLABORATOR'|'DISABLED' }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **agentCollaboratorSummaries** *(list) --* A list of collaborator summaries. * *(dict) --* An agent collaborator summary. * **agentDescriptor** *(dict) --* The collaborator's agent descriptor. * **aliasArn** *(string) --* The agent's alias ARN. * **agentId** *(string) --* The collaborator's agent ID. * **agentVersion** *(string) --* The collaborator's agent version. * **collaborationInstruction** *(string) --* The collaborator's collaboration instruction. * **collaboratorId** *(string) --* The collaborator's ID. * **collaboratorName** *(string) --* The collaborator's name. * **createdAt** *(datetime) --* When the collaborator was created. * **lastUpdatedAt** *(datetime) --* When the collaborator was last updated. * **relayConversationHistory** *(string) --* The collaborator's relay conversation history. * **nextToken** *(string) --* Specify the pagination token from a previous request to retrieve the next page of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / list_agent_versions list_agent_versions ******************* AgentsforBedrock.Client.list_agent_versions(**kwargs) Lists the versions of an agent and information about each version. See also: AWS API Documentation **Request Syntax** response = client.list_agent_versions( agentId='string', maxResults=123, nextToken='string' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. Return type: dict Returns: **Response Syntax** { 'agentVersionSummaries': [ { 'agentName': 'string', 'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING', 'agentVersion': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **agentVersionSummaries** *(list) --* A list of objects, each of which contains information about a version of the agent. * *(dict) --* Contains details about a version of an agent. * **agentName** *(string) --* The name of the agent to which the version belongs. * **agentStatus** *(string) --* The status of the agent to which the version belongs. * **agentVersion** *(string) --* The version of the agent. * **createdAt** *(datetime) --* The time at which the version was created. * **description** *(string) --* The description of the version of the agent. * **guardrailConfiguration** *(dict) --* Details about the guardrail associated with the agent. * **guardrailIdentifier** *(string) --* The unique identifier of the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **updatedAt** *(datetime) --* The time at which the version was last updated. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / delete_prompt delete_prompt ************* AgentsforBedrock.Client.delete_prompt(**kwargs) Deletes a prompt or a version of it, depending on whether you include the "promptVersion" field or not. For more information, see Delete prompts from the Prompt management tool and Delete a version of a prompt from the Prompt management tool in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.delete_prompt( promptIdentifier='string', promptVersion='string' ) Parameters: * **promptIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the prompt. * **promptVersion** (*string*) -- The version of the prompt to delete. To delete the prompt, omit this field. Return type: dict Returns: **Response Syntax** { 'id': 'string', 'version': 'string' } **Response Structure** * *(dict) --* * **id** *(string) --* The unique identifier of the prompt that was deleted. * **version** *(string) --* The version of the prompt that was deleted. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / create_prompt create_prompt ************* AgentsforBedrock.Client.create_prompt(**kwargs) Creates a prompt in your prompt library that you can add to a flow. For more information, see Prompt management in Amazon Bedrock, Create a prompt using Prompt management and Prompt flows in Amazon Bedrock in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.create_prompt( clientToken='string', customerEncryptionKeyArn='string', defaultVariant='string', description='string', name='string', tags={ 'string': 'string' }, variants=[ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'genAiResource': { 'agent': { 'agentIdentifier': 'string' } }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'metadata': [ { 'key': 'string', 'value': 'string' }, ], 'modelId': 'string', 'name': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {} , 'auto': {} , 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, ] ) Parameters: * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **customerEncryptionKeyArn** (*string*) -- The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt. * **defaultVariant** (*string*) -- The name of the default variant for the prompt. This value must match the "name" field in the relevant PromptVariant object. * **description** (*string*) -- A description for the prompt. * **name** (*string*) -- **[REQUIRED]** A name for the prompt. * **tags** (*dict*) -- Any tags that you want to attach to the prompt. For more information, see Tagging resources in Amazon Bedrock. * *(string) --* * *(string) --* * **variants** (*list*) -- A list of objects, each containing details about a variant of the prompt. * *(dict) --* Contains details about a variant of the prompt. * **additionalModelRequestFields** (*document*) -- Contains model-specific inference configurations that aren't in the "inferenceConfiguration" field. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models. * **genAiResource** *(dict) --* Specifies a generative AI resource with which to use the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "agent". * **agent** *(dict) --* Specifies an Amazon Bedrock agent with which to use the prompt. * **agentIdentifier** *(string) --* **[REQUIRED]** The ARN of the agent with which to use the prompt. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt variant. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "text". * **text** *(dict) --* Contains inference configurations for a text prompt. * **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) --* * **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. * **metadata** *(list) --* An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant. * *(dict) --* Contains a key-value pair that defines a metadata tag and value to attach to a prompt variant. For more information, see Create a prompt using Prompt management. * **key** *(string) --* **[REQUIRED]** The key of a metadata tag for a prompt variant. * **value** *(string) --* **[REQUIRED]** The value of a metadata tag for a prompt variant. * **modelId** *(string) --* The unique identifier of the model or inference profile with which to run inference on the prompt. * **name** *(string) --* **[REQUIRED]** The name of the prompt variant. * **templateConfiguration** *(dict) --* **[REQUIRED]** Contains configurations for the prompt template. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "chat", "text". * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **messages** *(list) --* **[REQUIRED]** 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. * **content** *(list) --* **[REQUIRED]** 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 can be set: "cachePoint", "text". * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* **[REQUIRED]** The role that the message belongs to. * **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 can be set: "cachePoint", "text". * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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 can be set: "any", "auto", "tool". * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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) --* **[REQUIRED]** The name of the tool. * **tools** *(list) --* **[REQUIRED]** 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 can be set: "cachePoint", "toolSpec". * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for the tool. * **description** *(string) --* The description of the tool. * **inputSchema** *(dict) --* **[REQUIRED]** The input schema for the tool. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "json". * **json** (*document*) -- A JSON object defining the input schema for the tool. * **name** *(string) --* **[REQUIRED]** The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a prompt. * **cachePoint** *(dict) --* A cache checkpoint within a template configuration. * **type** *(string) --* **[REQUIRED]** 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. * **text** *(string) --* **[REQUIRED]** The message for the prompt. * **templateType** *(string) --* **[REQUIRED]** The type of prompt template to use. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'customerEncryptionKeyArn': 'string', 'defaultVariant': 'string', 'description': 'string', 'id': 'string', 'name': 'string', 'updatedAt': datetime(2015, 1, 1), 'variants': [ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'genAiResource': { 'agent': { 'agentIdentifier': 'string' } }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'metadata': [ { 'key': 'string', 'value': 'string' }, ], 'modelId': 'string', 'name': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {}, 'auto': {}, 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, ], 'version': 'string' } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the prompt. * **createdAt** *(datetime) --* The time at which the prompt was created. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key that you encrypted the prompt with. * **defaultVariant** *(string) --* The name of the default variant for your prompt. * **description** *(string) --* The description of the prompt. * **id** *(string) --* The unique identifier of the prompt. * **name** *(string) --* The name of the prompt. * **updatedAt** *(datetime) --* The time at which the prompt was last updated. * **variants** *(list) --* A list of objects, each containing details about a variant of the prompt. * *(dict) --* Contains details about a variant of the prompt. * **additionalModelRequestFields** (*document*) -- Contains model-specific inference configurations that aren't in the "inferenceConfiguration" field. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models. * **genAiResource** *(dict) --* Specifies a generative AI resource with which to use the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "agent". 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'} * **agent** *(dict) --* Specifies an Amazon Bedrock agent with which to use the prompt. * **agentIdentifier** *(string) --* The ARN of the agent with which to use the prompt. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt variant. 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. * **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) --* * **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. * **metadata** *(list) --* An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant. * *(dict) --* Contains a key-value pair that defines a metadata tag and value to attach to a prompt variant. For more information, see Create a prompt using Prompt management. * **key** *(string) --* The key of a metadata tag for a prompt variant. * **value** *(string) --* The value of a metadata tag for a prompt variant. * **modelId** *(string) --* The unique identifier of the model or inference profile with which to run inference on the prompt. * **name** *(string) --* The name of the prompt variant. * **templateConfiguration** *(dict) --* Contains configurations for the prompt template. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "chat", "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'} * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **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. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* The role that the message belongs to. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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: "any", "auto", "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'} * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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. * **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: "cachePoint", "toolSpec". 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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for 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. * **name** *(string) --* The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a 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. * **text** *(string) --* The message for the prompt. * **templateType** *(string) --* The type of prompt template to use. * **version** *(string) --* The version of the prompt. When you create a prompt, the version created is the "DRAFT" version. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / update_agent_knowledge_base update_agent_knowledge_base *************************** AgentsforBedrock.Client.update_agent_knowledge_base(**kwargs) Updates the configuration for a knowledge base that has been associated with an agent. See also: AWS API Documentation **Request Syntax** response = client.update_agent_knowledge_base( agentId='string', agentVersion='string', description='string', knowledgeBaseId='string', knowledgeBaseState='ENABLED'|'DISABLED' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent associated with the knowledge base that you want to update. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent associated with the knowledge base that you want to update. * **description** (*string*) -- Specifies a new description for the knowledge base associated with an agent. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base that has been associated with an agent. * **knowledgeBaseState** (*string*) -- Specifies whether the agent uses the knowledge base or not when sending an InvokeAgent request. Return type: dict Returns: **Response Syntax** { 'agentKnowledgeBase': { 'agentId': 'string', 'agentVersion': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'knowledgeBaseId': 'string', 'knowledgeBaseState': 'ENABLED'|'DISABLED', 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agentKnowledgeBase** *(dict) --* Contains details about the knowledge base that has been associated with an agent. * **agentId** *(string) --* The unique identifier of the agent with which the knowledge base is associated. * **agentVersion** *(string) --* The version of the agent with which the knowledge base is associated. * **createdAt** *(datetime) --* The time at which the association between the agent and the knowledge base was created. * **description** *(string) --* The description of the association between the agent and the knowledge base. * **knowledgeBaseId** *(string) --* The unique identifier of the association between the agent and the knowledge base. * **knowledgeBaseState** *(string) --* Specifies whether to use the knowledge base or not when sending an InvokeAgent request. * **updatedAt** *(datetime) --* The time at which the association between the agent and the knowledge base was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / list_agent_knowledge_bases list_agent_knowledge_bases ************************** AgentsforBedrock.Client.list_agent_knowledge_bases(**kwargs) Lists knowledge bases associated with an agent and information about each one. See also: AWS API Documentation **Request Syntax** response = client.list_agent_knowledge_bases( agentId='string', agentVersion='string', maxResults=123, nextToken='string' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent for which to return information about knowledge bases associated with it. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent for which to return information about knowledge bases associated with it. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. Return type: dict Returns: **Response Syntax** { 'agentKnowledgeBaseSummaries': [ { 'description': 'string', 'knowledgeBaseId': 'string', 'knowledgeBaseState': 'ENABLED'|'DISABLED', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **agentKnowledgeBaseSummaries** *(list) --* A list of objects, each of which contains information about a knowledge base associated with the agent. * *(dict) --* Contains details about a knowledge base associated with an agent. * **description** *(string) --* The description of the knowledge base associated with an agent. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base associated with an agent. * **knowledgeBaseState** *(string) --* Specifies whether the agent uses the knowledge base or not when sending an InvokeAgent request. * **updatedAt** *(datetime) --* The time at which the knowledge base associated with an agent was last updated. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / delete_flow_version delete_flow_version ******************* AgentsforBedrock.Client.delete_flow_version(**kwargs) Deletes a version of a flow. See also: AWS API Documentation **Request Syntax** response = client.delete_flow_version( flowIdentifier='string', flowVersion='string', skipResourceInUseCheck=True|False ) Parameters: * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow whose version that you want to delete * **flowVersion** (*string*) -- **[REQUIRED]** The version of the flow that you want to delete. * **skipResourceInUseCheck** (*boolean*) -- By default, this value is "false" and deletion is stopped if the resource is in use. If you set it to "true", the resource will be deleted even if the resource is in use. Return type: dict Returns: **Response Syntax** { 'id': 'string', 'version': 'string' } **Response Structure** * *(dict) --* * **id** *(string) --* The unique identifier of the flow. * **version** *(string) --* The version of the flow being deleted. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / ingest_knowledge_base_documents ingest_knowledge_base_documents ******************************* AgentsforBedrock.Client.ingest_knowledge_base_documents(**kwargs) Ingests documents directly into the knowledge base that is connected to the data source. The "dataSourceType" specified in the content for each document must match the type of the data source that you specify in the header. For more information, see Ingest changes directly into a knowledge base in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.ingest_knowledge_base_documents( clientToken='string', dataSourceId='string', documents=[ { 'content': { 'custom': { 'customDocumentIdentifier': { 'id': 'string' }, 'inlineContent': { 'byteContent': { 'data': b'bytes', 'mimeType': 'string' }, 'textContent': { 'data': 'string' }, 'type': 'BYTE'|'TEXT' }, 's3Location': { 'bucketOwnerAccountId': 'string', 'uri': 'string' }, 'sourceType': 'IN_LINE'|'S3_LOCATION' }, 'dataSourceType': 'CUSTOM'|'S3', 's3': { 's3Location': { 'uri': 'string' } } }, 'metadata': { 'inlineAttributes': [ { 'key': 'string', 'value': { 'booleanValue': True|False, 'numberValue': 123.0, 'stringListValue': [ 'string', ], 'stringValue': 'string', 'type': 'BOOLEAN'|'NUMBER'|'STRING'|'STRING_LIST' } }, ], 's3Location': { 'bucketOwnerAccountId': 'string', 'uri': 'string' }, 'type': 'IN_LINE_ATTRIBUTE'|'S3_LOCATION' } }, ], knowledgeBaseId='string' ) Parameters: * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source connected to the knowledge base that you're adding documents to. * **documents** (*list*) -- **[REQUIRED]** A list of objects, each of which contains information about the documents to add. * *(dict) --* Contains information about a document to ingest into a knowledge base and metadata to associate with it. * **content** *(dict) --* **[REQUIRED]** Contains the content of the document. * **custom** *(dict) --* Contains information about the content to ingest into a knowledge base connected to a custom data source. * **customDocumentIdentifier** *(dict) --* **[REQUIRED]** A unique identifier for the document. * **id** *(string) --* **[REQUIRED]** The identifier of the document to ingest into a custom data source. * **inlineContent** *(dict) --* Contains information about content defined inline to ingest into a knowledge base. * **byteContent** *(dict) --* Contains information about content defined inline in bytes. * **data** *(bytes) --* **[REQUIRED]** The base64-encoded string of the content. * **mimeType** *(string) --* **[REQUIRED]** The MIME type of the content. For a list of MIME types, see Media Types. The following MIME types are supported: * text/plain * text/html * text/csv * text/vtt * message/rfc822 * application/xhtml+xml * application/pdf * application/msword * application/vnd.ms-word.document.macroenabled.12 * application/vnd.ms-word.template.macroenabled.12 * application/vnd.ms-excel * application/vnd.ms-excel.addin.macroenabled.12 * application/vnd.ms-excel.sheet.macroenabled.12 * application/vnd.ms- excel.template.macroenabled.12 * application/vnd.ms- excel.sheet.binary.macroenabled.12 * application/vnd.ms-spreadsheetml * application/vnd.openxmlformats- officedocument.spreadsheetml.sheet * application/vnd.openxmlformats- officedocument.spreadsheetml.template * application/vnd.openxmlformats- officedocument.wordprocessingml.document * application/vnd.openxmlformats- officedocument.wordprocessingml.template * **textContent** *(dict) --* Contains information about content defined inline in text. * **data** *(string) --* **[REQUIRED]** The text of the content. * **type** *(string) --* **[REQUIRED]** The type of inline content to define. * **s3Location** *(dict) --* Contains information about the Amazon S3 location of the file from which to ingest data. * **bucketOwnerAccountId** *(string) --* The identifier of the Amazon Web Services account that owns the S3 bucket containing the content to ingest. * **uri** *(string) --* **[REQUIRED]** The S3 URI of the file containing the content to ingest. * **sourceType** *(string) --* **[REQUIRED]** The source of the data to ingest. * **dataSourceType** *(string) --* **[REQUIRED]** The type of data source that is connected to the knowledge base to which to ingest this document. * **s3** *(dict) --* Contains information about the content to ingest into a knowledge base connected to an Amazon S3 data source * **s3Location** *(dict) --* **[REQUIRED]** The S3 location of the file containing the content to ingest. * **uri** *(string) --* **[REQUIRED]** The location's URI. For example, "s3://my-bucket /chunk-processor/". * **metadata** *(dict) --* Contains the metadata to associate with the document. * **inlineAttributes** *(list) --* An array of objects, each of which defines a metadata attribute to associate with the content to ingest. You define the attributes inline. * *(dict) --* Contains information about a metadata attribute. * **key** *(string) --* **[REQUIRED]** The key of the metadata attribute. * **value** *(dict) --* **[REQUIRED]** Contains the value of the metadata attribute. * **booleanValue** *(boolean) --* The value of the Boolean metadata attribute. * **numberValue** *(float) --* The value of the numeric metadata attribute. * **stringListValue** *(list) --* An array of strings that define the value of the metadata attribute. * *(string) --* * **stringValue** *(string) --* The value of the string metadata attribute. * **type** *(string) --* **[REQUIRED]** The type of the metadata attribute. * **s3Location** *(dict) --* The Amazon S3 location of the file containing metadata to associate with the content to ingest. * **bucketOwnerAccountId** *(string) --* The identifier of the Amazon Web Services account that owns the S3 bucket containing the content to ingest. * **uri** *(string) --* **[REQUIRED]** The S3 URI of the file containing the content to ingest. * **type** *(string) --* **[REQUIRED]** The type of the source source from which to add metadata. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base to ingest the documents into. Return type: dict Returns: **Response Syntax** { 'documentDetails': [ { 'dataSourceId': 'string', 'identifier': { 'custom': { 'id': 'string' }, 'dataSourceType': 'CUSTOM'|'S3', 's3': { 'uri': 'string' } }, 'knowledgeBaseId': 'string', 'status': 'INDEXED'|'PARTIALLY_INDEXED'|'PENDING'|'FAILED'|'METADATA_PARTIALLY_INDEXED'|'METADATA_UPDATE_FAILED'|'IGNORED'|'NOT_FOUND'|'STARTING'|'IN_PROGRESS'|'DELETING'|'DELETE_IN_PROGRESS', 'statusReason': 'string', 'updatedAt': datetime(2015, 1, 1) }, ] } **Response Structure** * *(dict) --* * **documentDetails** *(list) --* A list of objects, each of which contains information about the documents that were ingested. * *(dict) --* Contains the details for a document that was ingested or deleted. * **dataSourceId** *(string) --* The identifier of the data source connected to the knowledge base that the document was ingested into or deleted from. * **identifier** *(dict) --* Contains information that identifies the document. * **custom** *(dict) --* Contains information that identifies the document in a custom data source. * **id** *(string) --* The identifier of the document to ingest into a custom data source. * **dataSourceType** *(string) --* The type of data source connected to the knowledge base that contains the document. * **s3** *(dict) --* Contains information that identifies the document in an S3 data source. * **uri** *(string) --* The location's URI. For example, "s3://my-bucket /chunk-processor/". * **knowledgeBaseId** *(string) --* The identifier of the knowledge base that the document was ingested into or deleted from. * **status** *(string) --* The ingestion status of the document. The following statuses are possible: * STARTED – You submitted the ingestion job containing the document. * PENDING – The document is waiting to be ingested. * IN_PROGRESS – The document is being ingested. * INDEXED – The document was successfully indexed. * PARTIALLY_INDEXED – The document was partially indexed. * METADATA_PARTIALLY_INDEXED – You submitted metadata for an existing document and it was partially indexed. * METADATA_UPDATE_FAILED – You submitted a metadata update for an existing document but it failed. * FAILED – The document failed to be ingested. * NOT_FOUND – The document wasn't found. * IGNORED – The document was ignored during ingestion. * DELETING – You submitted the delete job containing the document. * DELETE_IN_PROGRESS – The document is being deleted. * **statusReason** *(string) --* The reason for the status. Appears alongside the status "IGNORED". * **updatedAt** *(datetime) --* The date and time at which the document was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / list_agent_action_groups list_agent_action_groups ************************ AgentsforBedrock.Client.list_agent_action_groups(**kwargs) Lists the action groups for an agent and information about each one. See also: AWS API Documentation **Request Syntax** response = client.list_agent_action_groups( agentId='string', agentVersion='string', maxResults=123, nextToken='string' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. Return type: dict Returns: **Response Syntax** { 'actionGroupSummaries': [ { 'actionGroupId': 'string', 'actionGroupName': 'string', 'actionGroupState': 'ENABLED'|'DISABLED', 'description': 'string', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **actionGroupSummaries** *(list) --* A list of objects, each of which contains information about an action group. * *(dict) --* Contains details about an action group. * **actionGroupId** *(string) --* The unique identifier of the action group. * **actionGroupName** *(string) --* The name of the action group. * **actionGroupState** *(string) --* Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request. * **description** *(string) --* The description of the action group. * **updatedAt** *(datetime) --* The time at which the action group was last updated. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / get_flow get_flow ******** AgentsforBedrock.Client.get_flow(**kwargs) Retrieves information about a flow. For more information, see Manage a flow in Amazon Bedrock in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.get_flow( flowIdentifier='string' ) Parameters: **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'customerEncryptionKeyArn': 'string', 'definition': { 'connections': [ { 'configuration': { 'conditional': { 'condition': 'string' }, 'data': { 'sourceOutput': 'string', 'targetInput': 'string' } }, 'name': 'string', 'source': 'string', 'target': 'string', 'type': 'Data'|'Conditional' }, ], 'nodes': [ { 'configuration': { 'agent': { 'agentAliasArn': 'string' }, 'collector': {}, 'condition': { 'conditions': [ { 'expression': 'string', 'name': 'string' }, ] }, 'inlineCode': { 'code': 'string', 'language': 'Python_3' }, 'input': {}, 'iterator': {}, 'knowledgeBase': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'knowledgeBaseId': 'string', 'modelId': 'string', 'numberOfResults': 123, 'orchestrationConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'inferenceConfig': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'performanceConfig': { 'latency': 'standard'|'optimized' }, 'promptTemplate': { 'textPromptTemplate': 'string' } }, 'promptTemplate': { 'textPromptTemplate': 'string' }, 'rerankingConfiguration': { 'bedrockRerankingConfiguration': { 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToExclude': [ { 'fieldName': 'string' }, ], 'fieldsToInclude': [ { 'fieldName': 'string' }, ] } }, 'modelConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'modelArn': 'string' }, 'numberOfRerankedResults': 123 }, 'type': 'BEDROCK_RERANKING_MODEL' } }, 'lambdaFunction': { 'lambdaArn': 'string' }, 'lex': { 'botAliasArn': 'string', 'localeId': 'string' }, 'loop': { 'definition': {'... recursive ...'} }, 'loopController': { 'continueCondition': { 'expression': 'string', 'name': 'string' }, 'maxIterations': 123 }, 'loopInput': {}, 'output': {}, 'prompt': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'sourceConfiguration': { 'inline': { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'modelId': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {}, 'auto': {}, 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, 'resource': { 'promptArn': 'string' } } }, 'retrieval': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } }, 'storage': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } } }, 'inputs': [ { 'category': 'LoopCondition'|'ReturnValueToLoopStart'|'ExitLoop', 'expression': 'string', 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'name': 'string', 'outputs': [ { 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'type': 'Input'|'Output'|'KnowledgeBase'|'Condition'|'Lex'|'Prompt'|'LambdaFunction'|'Storage'|'Agent'|'Retrieval'|'Iterator'|'Collector'|'InlineCode'|'Loop'|'LoopInput'|'LoopController' }, ] }, 'description': 'string', 'executionRoleArn': 'string', 'id': 'string', 'name': 'string', 'status': 'Failed'|'Prepared'|'Preparing'|'NotPrepared', 'updatedAt': datetime(2015, 1, 1), 'validations': [ { 'details': { 'cyclicConnection': { 'connection': 'string' }, 'duplicateConditionExpression': { 'expression': 'string', 'node': 'string' }, 'duplicateConnections': { 'source': 'string', 'target': 'string' }, 'incompatibleConnectionDataType': { 'connection': 'string' }, 'invalidLoopBoundary': { 'connection': 'string', 'source': 'string', 'target': 'string' }, 'loopIncompatibleNodeType': { 'incompatibleNodeName': 'string', 'incompatibleNodeType': 'Input'|'Condition'|'Iterator'|'Collector', 'node': 'string' }, 'malformedConditionExpression': { 'cause': 'string', 'condition': 'string', 'node': 'string' }, 'malformedNodeInputExpression': { 'cause': 'string', 'input': 'string', 'node': 'string' }, 'mismatchedNodeInputType': { 'expectedType': 'String'|'Number'|'Boolean'|'Object'|'Array', 'input': 'string', 'node': 'string' }, 'mismatchedNodeOutputType': { 'expectedType': 'String'|'Number'|'Boolean'|'Object'|'Array', 'node': 'string', 'output': 'string' }, 'missingConnectionConfiguration': { 'connection': 'string' }, 'missingDefaultCondition': { 'node': 'string' }, 'missingEndingNodes': {}, 'missingLoopControllerNode': { 'loopNode': 'string' }, 'missingLoopInputNode': { 'loopNode': 'string' }, 'missingNodeConfiguration': { 'node': 'string' }, 'missingNodeInput': { 'input': 'string', 'node': 'string' }, 'missingNodeOutput': { 'node': 'string', 'output': 'string' }, 'missingStartingNodes': {}, 'multipleLoopControllerNodes': { 'loopNode': 'string' }, 'multipleLoopInputNodes': { 'loopNode': 'string' }, 'multipleNodeInputConnections': { 'input': 'string', 'node': 'string' }, 'unfulfilledNodeInput': { 'input': 'string', 'node': 'string' }, 'unknownConnectionCondition': { 'connection': 'string' }, 'unknownConnectionSource': { 'connection': 'string' }, 'unknownConnectionSourceOutput': { 'connection': 'string' }, 'unknownConnectionTarget': { 'connection': 'string' }, 'unknownConnectionTargetInput': { 'connection': 'string' }, 'unknownNodeInput': { 'input': 'string', 'node': 'string' }, 'unknownNodeOutput': { 'node': 'string', 'output': 'string' }, 'unreachableNode': { 'node': 'string' }, 'unsatisfiedConnectionConditions': { 'connection': 'string' }, 'unspecified': {} }, 'message': 'string', 'severity': 'Warning'|'Error', 'type': 'CyclicConnection'|'DuplicateConnections'|'DuplicateConditionExpression'|'UnreachableNode'|'UnknownConnectionSource'|'UnknownConnectionSourceOutput'|'UnknownConnectionTarget'|'UnknownConnectionTargetInput'|'UnknownConnectionCondition'|'MalformedConditionExpression'|'MalformedNodeInputExpression'|'MismatchedNodeInputType'|'MismatchedNodeOutputType'|'IncompatibleConnectionDataType'|'MissingConnectionConfiguration'|'MissingDefaultCondition'|'MissingEndingNodes'|'MissingNodeConfiguration'|'MissingNodeInput'|'MissingNodeOutput'|'MissingStartingNodes'|'MultipleNodeInputConnections'|'UnfulfilledNodeInput'|'UnsatisfiedConnectionConditions'|'Unspecified'|'UnknownNodeInput'|'UnknownNodeOutput'|'MissingLoopInputNode'|'MissingLoopControllerNode'|'MultipleLoopInputNodes'|'MultipleLoopControllerNodes'|'LoopIncompatibleNodeType'|'InvalidLoopBoundary' }, ], 'version': 'string' } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the flow. * **createdAt** *(datetime) --* The time at which the flow was created. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key that the flow is encrypted with. * **definition** *(dict) --* The definition of the nodes and connections between the nodes in the flow. * **connections** *(list) --* An array of connection definitions in the flow. * *(dict) --* Contains information about a connection between two nodes in the flow. * **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: "conditional", "data". 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'} * **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. * **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. * **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. * **type** *(string) --* Whether the source node that the connection begins from is a condition node ( "Conditional") or not ( "Data"). * **nodes** *(list) --* An array of node definitions in the flow. * *(dict) --* Contains configurations about a node in the flow. * **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: "agent", "collector", "condition", "inlineCode", "input", "iterator", "knowledgeBase", "lambdaFunction", "lex", "loop", "loopController", "loopInput", "output", "prompt", "retrieval", "storage". 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'} * **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. * **collector** *(dict) --* Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs. * **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. * **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. * **name** *(string) --* A name for the condition that you can reference. * **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. * **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. * **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. * **knowledgeBase** *(dict) --* Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response. * **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. * **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. * **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) --* * **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. * **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. * **numberOfResults** *(integer) --* The number of results to retrieve from the knowledge base. * **orchestrationConfiguration** *(dict) --* The configuration for orchestrating the retrieval and generation process in the knowledge base node. * **additionalModelRequestFields** *(dict) --* The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model. * *(string) --* * (*document*) -- * **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. * **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) --* * **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. * **performanceConfig** *(dict) --* The performance configuration options for the knowledge base retrieval and generation process. * **latency** *(string) --* The latency optimization setting. * **promptTemplate** *(dict) --* A custom prompt template for orchestrating the retrieval and generation process. * **textPromptTemplate** *(string) --* The text of the prompt template. * **promptTemplate** *(dict) --* A custom prompt template to use with the knowledge base for generating responses. * **textPromptTemplate** *(string) --* The text of the prompt template. * **rerankingConfiguration** *(dict) --* The configuration for reranking the retrieved results from the knowledge base to improve relevance. * **bedrockRerankingConfiguration** *(dict) --* Specifies the configuration for using an Amazon Bedrock reranker model to rerank retrieved results. * **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: "fieldsToExclude", "fieldsToInclude". 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'} * **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. * **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. * **modelConfiguration** *(dict) --* Specifies the configuration for 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*) -- * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Bedrock reranker model. * **numberOfRerankedResults** *(integer) --* Specifies the number of results to return after reranking. * **type** *(string) --* Specifies the type of reranking model to use. Currently, the only supported value is "BEDROCK_RERANKING_MODEL". * **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. * **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. * **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. * **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. * **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. * **name** *(string) --* A name for the condition that you can reference. * **maxIterations** *(integer) --* Specifies the maximum number of times the DoWhile loop can iterate before the flow exits the loop. * **loopInput** *(dict) --* Contains input node configurations for a DoWhile loop in your flow. * **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. * **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. * **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. * **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: "inline", "resource". 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'} * **inline** *(dict) --* Contains configurations for a prompt that is defined inline * **additionalModelRequestFields** (*document*) -- Additional fields to be included in the model request for the Prompt node. * **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. * **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) --* * **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. * **modelId** *(string) --* The unique identifier of the model or inference profile to run inference with. * **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: "chat", "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'} * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **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. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* The role that the message belongs to. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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: "any", "auto", "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'} * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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. * **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: "cachePoint", "toolSpec". 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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for 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. * **name** *(string) --* The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a 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. * **text** *(string) --* The message for the prompt. * **templateType** *(string) --* The type of prompt template. * **resource** *(dict) --* Contains configurations for a prompt from Prompt management. * **promptArn** *(string) --* The Amazon Resource Name (ARN) of the prompt from Prompt management. * **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. * **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. * **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. * **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. * **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. * **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. * **name** *(string) --* A name for the node. * **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. * **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. * **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 row for flows in the Amazon Bedrock User Guide. * **id** *(string) --* The unique identifier of the flow. * **name** *(string) --* The name of the flow. * **status** *(string) --* The status of the flow. The following statuses are possible: * NotPrepared – The flow has been created or updated, but hasn't been prepared. If you just created the flow, you can't test it. If you updated the flow, the "DRAFT" version won't contain the latest changes for testing. Send a PrepareFlow request to package the latest changes into the "DRAFT" version. * Preparing – The flow is being prepared so that the "DRAFT" version contains the latest changes for testing. * Prepared – The flow is prepared and the "DRAFT" version contains the latest changes for testing. * Failed – The last API operation that you invoked on the flow failed. Send a GetFlow request and check the error message in the "validations" field. * **updatedAt** *(datetime) --* The time at which the flow was last updated. * **validations** *(list) --* A list of validation error messages related to the last failed operation on the flow. * *(dict) --* Contains information about validation of the flow. This data type is used in the following API operations: * GetFlow response * GetFlowVersion response * **details** *(dict) --* Specific details about the validation issue encountered in the flow. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "cyclicConnection", "duplicateConditionExpression", "duplicateConnections", "incompatibleConnectionDataType", "invalidLoopBoundary", "loopIncompatibleNodeType", "malformedConditionExpression", "malformedNodeInputExpression", "mismatchedNodeInputType", "mismatchedNodeOutputType", "missingConnectionConfiguration", "missingDefaultCondition", "missingEndingNodes", "missingLoopControllerNode", "missingLoopInputNode", "missingNodeConfiguration", "missingNodeInput", "missingNodeOutput", "missingStartingNodes", "multipleLoopControllerNodes", "multipleLoopInputNodes", "multipleNodeInputConnections", "unfulfilledNodeInput", "unknownConnectionCondition", "unknownConnectionSource", "unknownConnectionSourceOutput", "unknownConnectionTarget", "unknownConnectionTargetInput", "unknownNodeInput", "unknownNodeOutput", "unreachableNode", "unsatisfiedConnectionConditions", "unspecified". 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'} * **cyclicConnection** *(dict) --* Details about a cyclic connection in the flow. * **connection** *(string) --* The name of the connection that causes the cycle in the flow. * **duplicateConditionExpression** *(dict) --* Details about duplicate condition expressions in a node. * **expression** *(string) --* The duplicated condition expression. * **node** *(string) --* The name of the node containing the duplicate condition expressions. * **duplicateConnections** *(dict) --* Details about duplicate connections between nodes. * **source** *(string) --* The name of the source node where the duplicate connection starts. * **target** *(string) --* The name of the target node where the duplicate connection ends. * **incompatibleConnectionDataType** *(dict) --* Details about incompatible data types in a connection. * **connection** *(string) --* The name of the connection with incompatible data types. * **invalidLoopBoundary** *(dict) --* Details about a flow that includes connections that violate loop boundary rules. * **connection** *(string) --* The name of the connection that violates loop boundary rules. * **source** *(string) --* The source node of the connection that violates DoWhile loop boundary rules. * **target** *(string) --* The target node of the connection that violates DoWhile loop boundary rules. * **loopIncompatibleNodeType** *(dict) --* Details about a flow that includes incompatible node types in a DoWhile loop. * **incompatibleNodeName** *(string) --* The node that's incompatible in the DoWhile loop. * **incompatibleNodeType** *(string) --* The node type of the incompatible node in the DoWhile loop. Some node types, like a condition node, aren't allowed in a DoWhile loop. * **node** *(string) --* The "Loop" container node that contains an incompatible node. * **malformedConditionExpression** *(dict) --* Details about a malformed condition expression in a node. * **cause** *(string) --* The error message describing why the condition expression is malformed. * **condition** *(string) --* The name of the malformed condition. * **node** *(string) --* The name of the node containing the malformed condition expression. * **malformedNodeInputExpression** *(dict) --* Details about a malformed input expression in a node. * **cause** *(string) --* The error message describing why the input expression is malformed. * **input** *(string) --* The name of the input with the malformed expression. * **node** *(string) --* The name of the node containing the malformed input expression. * **mismatchedNodeInputType** *(dict) --* Details about mismatched input data types in a node. * **expectedType** *(string) --* The expected data type for the node input. * **input** *(string) --* The name of the input with the mismatched data type. * **node** *(string) --* The name of the node containing the input with the mismatched data type. * **mismatchedNodeOutputType** *(dict) --* Details about mismatched output data types in a node. * **expectedType** *(string) --* The expected data type for the node output. * **node** *(string) --* The name of the node containing the output with the mismatched data type. * **output** *(string) --* The name of the output with the mismatched data type. * **missingConnectionConfiguration** *(dict) --* Details about missing configuration for a connection. * **connection** *(string) --* The name of the connection missing configuration. * **missingDefaultCondition** *(dict) --* Details about a missing default condition in a conditional node. * **node** *(string) --* The name of the node missing the default condition. * **missingEndingNodes** *(dict) --* Details about missing ending nodes in the flow. * **missingLoopControllerNode** *(dict) --* Details about a flow that's missing a required "LoopController" node in a DoWhile loop. * **loopNode** *(string) --* The DoWhile loop in a flow that's missing a required "LoopController" node. * **missingLoopInputNode** *(dict) --* Details about a flow that's missing a required "LoopInput" node in a DoWhile loop. * **loopNode** *(string) --* The DoWhile loop in a flow that's missing a required "LoopInput" node. * **missingNodeConfiguration** *(dict) --* Details about missing configuration for a node. * **node** *(string) --* The name of the node missing a required configuration. * **missingNodeInput** *(dict) --* Details about a missing required input in a node. * **input** *(string) --* The name of the missing input. * **node** *(string) --* The name of the node missing the required input. * **missingNodeOutput** *(dict) --* Details about a missing required output in a node. * **node** *(string) --* The name of the node missing the required output. * **output** *(string) --* The name of the missing output. * **missingStartingNodes** *(dict) --* Details about missing starting nodes in the flow. * **multipleLoopControllerNodes** *(dict) --* Details about a flow that contains multiple "LoopController" nodes in a DoWhile loop. * **loopNode** *(string) --* The DoWhile loop in a flow that contains multiple "LoopController" nodes. * **multipleLoopInputNodes** *(dict) --* Details about a flow that contains multiple "LoopInput" nodes in a DoWhile loop. * **loopNode** *(string) --* The DoWhile loop in a flow that contains multiple "LoopInput" nodes. * **multipleNodeInputConnections** *(dict) --* Details about multiple connections to a single node input. * **input** *(string) --* The name of the input with multiple connections to it. * **node** *(string) --* The name of the node containing the input with multiple connections. * **unfulfilledNodeInput** *(dict) --* Details about an unfulfilled node input with no valid connections. * **input** *(string) --* The name of the unfulfilled input. An input is unfulfilled if there are no data connections to it. * **node** *(string) --* The name of the node containing the unfulfilled input. * **unknownConnectionCondition** *(dict) --* Details about an unknown condition for a connection. * **connection** *(string) --* The name of the connection with the unknown condition. * **unknownConnectionSource** *(dict) --* Details about an unknown source node for a connection. * **connection** *(string) --* The name of the connection with the unknown source. * **unknownConnectionSourceOutput** *(dict) --* Details about an unknown source output for a connection. * **connection** *(string) --* The name of the connection with the unknown source output. * **unknownConnectionTarget** *(dict) --* Details about an unknown target node for a connection. * **connection** *(string) --* The name of the connection with the unknown target. * **unknownConnectionTargetInput** *(dict) --* Details about an unknown target input for a connection. * **connection** *(string) --* The name of the connection with the unknown target input. * **unknownNodeInput** *(dict) --* Details about an unknown input for a node. * **input** *(string) --* The name of the node with the unknown input. * **node** *(string) --* The name of the unknown input. * **unknownNodeOutput** *(dict) --* Details about an unknown output for a node. * **node** *(string) --* The name of the node with the unknown output. * **output** *(string) --* The name of the unknown output. * **unreachableNode** *(dict) --* Details about an unreachable node in the flow. * **node** *(string) --* The name of the unreachable node. * **unsatisfiedConnectionConditions** *(dict) --* Details about unsatisfied conditions for a connection. * **connection** *(string) --* The name of the connection with unsatisfied conditions. * **unspecified** *(dict) --* Details about an unspecified validation. * **message** *(string) --* A message describing the validation error. * **severity** *(string) --* The severity of the issue described in the message. * **type** *(string) --* The type of validation issue encountered in the flow. * **version** *(string) --* The version of the flow for which information was retrieved. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / get_agent get_agent ********* AgentsforBedrock.Client.get_agent(**kwargs) Gets information about an agent. See also: AWS API Documentation **Request Syntax** response = client.get_agent( agentId='string' ) Parameters: **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent. Return type: dict Returns: **Response Syntax** { 'agent': { 'agentArn': 'string', 'agentCollaboration': 'SUPERVISOR'|'SUPERVISOR_ROUTER'|'DISABLED', 'agentId': 'string', 'agentName': 'string', 'agentResourceRoleArn': 'string', 'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING', 'agentVersion': 'string', 'clientToken': 'string', 'createdAt': datetime(2015, 1, 1), 'customOrchestration': { 'executor': { 'lambda': 'string' } }, 'customerEncryptionKeyArn': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'foundationModel': 'string', 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'idleSessionTTLInSeconds': 123, 'instruction': 'string', 'memoryConfiguration': { 'enabledMemoryTypes': [ 'SESSION_SUMMARY', ], 'sessionSummaryConfiguration': { 'maxRecentSessions': 123 }, 'storageDays': 123 }, 'orchestrationType': 'DEFAULT'|'CUSTOM_ORCHESTRATION', 'preparedAt': datetime(2015, 1, 1), 'promptOverrideConfiguration': { 'overrideLambda': 'string', 'promptConfigurations': [ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'basePromptTemplate': 'string', 'foundationModel': 'string', 'inferenceConfiguration': { 'maximumLength': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topK': 123, 'topP': ... }, 'parserMode': 'DEFAULT'|'OVERRIDDEN', 'promptCreationMode': 'DEFAULT'|'OVERRIDDEN', 'promptState': 'ENABLED'|'DISABLED', 'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION'|'MEMORY_SUMMARIZATION' }, ] }, 'recommendedActions': [ 'string', ], 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agent** *(dict) --* Contains details about the agent. * **agentArn** *(string) --* The Amazon Resource Name (ARN) of the agent. * **agentCollaboration** *(string) --* The agent's collaboration settings. * **agentId** *(string) --* The unique identifier of the agent. * **agentName** *(string) --* The name of the agent. * **agentResourceRoleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent. * **agentStatus** *(string) --* The status of the agent and whether it is ready for use. The following statuses are possible: * CREATING – The agent is being created. * PREPARING – The agent is being prepared. * PREPARED – The agent is prepared and ready to be invoked. * NOT_PREPARED – The agent has been created but not yet prepared. * FAILED – The agent API operation failed. * UPDATING – The agent is being updated. * DELETING – The agent is being deleted. * **agentVersion** *(string) --* The version of the agent. * **clientToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **createdAt** *(datetime) --* The time at which the agent was created. * **customOrchestration** *(dict) --* Contains custom orchestration configurations for the agent. * **executor** *(dict) --* The structure of the executor invoking the actions in custom orchestration. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "lambda". 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'} * **lambda** *(string) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key that encrypts the agent. * **description** *(string) --* The description of the agent. * **failureReasons** *(list) --* Contains reasons that the agent-related API that you invoked failed. * *(string) --* * **foundationModel** *(string) --* The foundation model used for orchestration by the agent. * **guardrailConfiguration** *(dict) --* Details about the guardrail associated with the agent. * **guardrailIdentifier** *(string) --* The unique identifier of the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **idleSessionTTLInSeconds** *(integer) --* The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout. * **instruction** *(string) --* Instructions that tell the agent what it should do and how it should interact with users. * **memoryConfiguration** *(dict) --* Contains memory configuration for the agent. * **enabledMemoryTypes** *(list) --* The type of memory that is stored. * *(string) --* * **sessionSummaryConfiguration** *(dict) --* Contains the configuration for SESSION_SUMMARY memory type enabled for the agent. * **maxRecentSessions** *(integer) --* Maximum number of recent session summaries to include in the agent's prompt context. * **storageDays** *(integer) --* The number of days the agent is configured to retain the conversational context. * **orchestrationType** *(string) --* Specifies the orchestration strategy for the agent. * **preparedAt** *(datetime) --* The time at which the agent was last prepared. * **promptOverrideConfiguration** *(dict) --* Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see Advanced prompts. * **overrideLambda** *(string) --* The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the "promptConfigurations" must contain a "parserMode" value that is set to "OVERRIDDEN". For more information, see Parser Lambda function in Amazon Bedrock Agents. * **promptConfigurations** *(list) --* Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * *(dict) --* Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * **additionalModelRequestFields** (*document*) -- If the Converse or ConverseStream operations support the model, "additionalModelRequestFields" contains additional inference parameters, beyond the base set of inference parameters in the "inferenceConfiguration" field. For more information, see *Inference request parameters and response fields for foundation models* in the Amazon Bedrock user guide. * **basePromptTemplate** *(string) --* Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables. For more information, see Configure the prompt templates. * **foundationModel** *(string) --* The agent's foundation model. * **inferenceConfiguration** *(dict) --* Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by the "promptType". For more information, see Inference parameters for foundation models. * **maximumLength** *(integer) --* The maximum number of tokens to allow in the generated response. * **stopSequences** *(list) --* A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response. * *(string) --* * **temperature** *(float) --* The likelihood of the model selecting higher- probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower- probability options. * **topK** *(integer) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "topK" is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topK" to 50, the model selects the next token from among the top 50 most likely choices. * **topP** *(float) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "Top P" determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topP" to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens. * **parserMode** *(string) --* Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the "promptType". If you set the field as "OVERRIDDEN", the "overrideLambda" field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function. * **promptCreationMode** *(string) --* Specifies whether to override the default prompt template for this "promptType". Set this value to "OVERRIDDEN" to use the prompt that you provide in the "basePromptTemplate". If you leave it as "DEFAULT", the agent uses a default prompt template. * **promptState** *(string) --* Specifies whether to allow the agent to carry out the step specified in the "promptType". If you set this value to "DISABLED", the agent skips that step. The default state for each "promptType" is as follows. * "PRE_PROCESSING" – "DISABLED" * "ORCHESTRATION" – "ENABLED" * "KNOWLEDGE_BASE_RESPONSE_GENERATION" – "ENABLED" * "POST_PROCESSING" – "DISABLED" * **promptType** *(string) --* The step in the agent sequence that this prompt configuration applies to. * **recommendedActions** *(list) --* Contains recommended actions to take for the agent-related API that you invoked to succeed. * *(string) --* * **updatedAt** *(datetime) --* The time at which the agent was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / delete_knowledge_base_documents delete_knowledge_base_documents ******************************* AgentsforBedrock.Client.delete_knowledge_base_documents(**kwargs) Deletes documents from a data source and syncs the changes to the knowledge base that is connected to it. For more information, see Ingest changes directly into a knowledge base in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.delete_knowledge_base_documents( clientToken='string', dataSourceId='string', documentIdentifiers=[ { 'custom': { 'id': 'string' }, 'dataSourceType': 'CUSTOM'|'S3', 's3': { 'uri': 'string' } }, ], knowledgeBaseId='string' ) Parameters: * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source that contains the documents. * **documentIdentifiers** (*list*) -- **[REQUIRED]** A list of objects, each of which contains information to identify a document to delete. * *(dict) --* Contains information that identifies the document. * **custom** *(dict) --* Contains information that identifies the document in a custom data source. * **id** *(string) --* **[REQUIRED]** The identifier of the document to ingest into a custom data source. * **dataSourceType** *(string) --* **[REQUIRED]** The type of data source connected to the knowledge base that contains the document. * **s3** *(dict) --* Contains information that identifies the document in an S3 data source. * **uri** *(string) --* **[REQUIRED]** The location's URI. For example, "s3://my-bucket/chunk- processor/". * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base that is connected to the data source. Return type: dict Returns: **Response Syntax** { 'documentDetails': [ { 'dataSourceId': 'string', 'identifier': { 'custom': { 'id': 'string' }, 'dataSourceType': 'CUSTOM'|'S3', 's3': { 'uri': 'string' } }, 'knowledgeBaseId': 'string', 'status': 'INDEXED'|'PARTIALLY_INDEXED'|'PENDING'|'FAILED'|'METADATA_PARTIALLY_INDEXED'|'METADATA_UPDATE_FAILED'|'IGNORED'|'NOT_FOUND'|'STARTING'|'IN_PROGRESS'|'DELETING'|'DELETE_IN_PROGRESS', 'statusReason': 'string', 'updatedAt': datetime(2015, 1, 1) }, ] } **Response Structure** * *(dict) --* * **documentDetails** *(list) --* A list of objects, each of which contains information about the documents that were deleted. * *(dict) --* Contains the details for a document that was ingested or deleted. * **dataSourceId** *(string) --* The identifier of the data source connected to the knowledge base that the document was ingested into or deleted from. * **identifier** *(dict) --* Contains information that identifies the document. * **custom** *(dict) --* Contains information that identifies the document in a custom data source. * **id** *(string) --* The identifier of the document to ingest into a custom data source. * **dataSourceType** *(string) --* The type of data source connected to the knowledge base that contains the document. * **s3** *(dict) --* Contains information that identifies the document in an S3 data source. * **uri** *(string) --* The location's URI. For example, "s3://my-bucket /chunk-processor/". * **knowledgeBaseId** *(string) --* The identifier of the knowledge base that the document was ingested into or deleted from. * **status** *(string) --* The ingestion status of the document. The following statuses are possible: * STARTED – You submitted the ingestion job containing the document. * PENDING – The document is waiting to be ingested. * IN_PROGRESS – The document is being ingested. * INDEXED – The document was successfully indexed. * PARTIALLY_INDEXED – The document was partially indexed. * METADATA_PARTIALLY_INDEXED – You submitted metadata for an existing document and it was partially indexed. * METADATA_UPDATE_FAILED – You submitted a metadata update for an existing document but it failed. * FAILED – The document failed to be ingested. * NOT_FOUND – The document wasn't found. * IGNORED – The document was ignored during ingestion. * DELETING – You submitted the delete job containing the document. * DELETE_IN_PROGRESS – The document is being deleted. * **statusReason** *(string) --* The reason for the status. Appears alongside the status "IGNORED". * **updatedAt** *(datetime) --* The date and time at which the document was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / get_agent_action_group get_agent_action_group ********************** AgentsforBedrock.Client.get_agent_action_group(**kwargs) Gets information about an action group for an agent. See also: AWS API Documentation **Request Syntax** response = client.get_agent_action_group( actionGroupId='string', agentId='string', agentVersion='string' ) Parameters: * **actionGroupId** (*string*) -- **[REQUIRED]** The unique identifier of the action group for which to get information. * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent that the action group belongs to. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent that the action group belongs to. Return type: dict Returns: **Response Syntax** { 'agentActionGroup': { 'actionGroupExecutor': { 'customControl': 'RETURN_CONTROL', 'lambda': 'string' }, 'actionGroupId': 'string', 'actionGroupName': 'string', 'actionGroupState': 'ENABLED'|'DISABLED', 'agentId': 'string', 'agentVersion': 'string', 'apiSchema': { 'payload': 'string', 's3': { 's3BucketName': 'string', 's3ObjectKey': 'string' } }, 'clientToken': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'functionSchema': { 'functions': [ { 'description': 'string', 'name': 'string', 'parameters': { 'string': { 'description': 'string', 'required': True|False, 'type': 'string'|'number'|'integer'|'boolean'|'array' } }, 'requireConfirmation': 'ENABLED'|'DISABLED' }, ] }, 'parentActionGroupSignatureParams': { 'string': 'string' }, 'parentActionSignature': 'AMAZON.UserInput'|'AMAZON.CodeInterpreter'|'ANTHROPIC.Computer'|'ANTHROPIC.Bash'|'ANTHROPIC.TextEditor', 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agentActionGroup** *(dict) --* Contains details about the action group. * **actionGroupExecutor** *(dict) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "customControl", "lambda". 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'} * **customControl** *(string) --* To return the action group invocation results directly in the "InvokeAgent" response, specify "RETURN_CONTROL". * **lambda** *(string) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * **actionGroupId** *(string) --* The unique identifier of the action group. * **actionGroupName** *(string) --* The name of the action group. * **actionGroupState** *(string) --* Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request. * **agentId** *(string) --* The unique identifier of the agent to which the action group belongs. * **agentVersion** *(string) --* The version of the agent to which the action group belongs. * **apiSchema** *(dict) --* Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML- formatted payload defining the schema. For more information, see Action group OpenAPI schemas. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "payload", "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'} * **payload** *(string) --* The JSON or YAML-formatted payload defining the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. * **s3** *(dict) --* Contains details about the S3 object containing the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. * **s3BucketName** *(string) --* The name of the S3 bucket. * **s3ObjectKey** *(string) --* The S3 object key for the S3 resource. * **clientToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **createdAt** *(datetime) --* The time at which the action group was created. * **description** *(string) --* The description of the action group. * **functionSchema** *(dict) --* Defines functions that each define parameters that the agent needs to invoke from the user. Each function represents an action in an action group. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "functions". 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'} * **functions** *(list) --* A list of functions that each define an action in the action group. * *(dict) --* Defines parameters that the agent needs to invoke from the user to complete the function. Corresponds to an action in an action group. This data type is used in the following API operations: * CreateAgentActionGroup request * CreateAgentActionGroup response * UpdateAgentActionGroup request * UpdateAgentActionGroup response * GetAgentActionGroup response * **description** *(string) --* A description of the function and its purpose. * **name** *(string) --* A name for the function. * **parameters** *(dict) --* The parameters that the agent elicits from the user to fulfill the function. * *(string) --* * *(dict) --* Contains details about a parameter in a function for an action group. This data type is used in the following API operations: * CreateAgentActionGroup request * CreateAgentActionGroup response * UpdateAgentActionGroup request * UpdateAgentActionGroup response * GetAgentActionGroup response * **description** *(string) --* A description of the parameter. Helps the foundation model determine how to elicit the parameters from the user. * **required** *(boolean) --* Whether the parameter is required for the agent to complete the function for action group invocation. * **type** *(string) --* The data type of the parameter. * **requireConfirmation** *(string) --* Contains information if user confirmation is required to invoke the function. * **parentActionGroupSignatureParams** *(dict) --* The configuration settings for a computer use action. Warning: Computer use is a new Anthropic Claude model capability (in beta) available with Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. For more information, see Configure an Amazon Bedrock Agent to complete tasks with computer use tools. * *(string) --* * *(string) --* * **parentActionSignature** *(string) --* If this field is set as "AMAZON.UserInput", the agent can request the user for additional information when trying to complete a task. The "description", "apiSchema", and "actionGroupExecutor" fields must be blank for this action group. During orchestration, if the agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information. * **updatedAt** *(datetime) --* The time at which the action group was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / create_flow_alias create_flow_alias ***************** AgentsforBedrock.Client.create_flow_alias(**kwargs) Creates an alias of a flow for deployment. 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.create_flow_alias( clientToken='string', concurrencyConfiguration={ 'maxConcurrency': 123, 'type': 'Automatic'|'Manual' }, description='string', flowIdentifier='string', name='string', routingConfiguration=[ { 'flowVersion': 'string' }, ], tags={ 'string': 'string' } ) Parameters: * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **concurrencyConfiguration** (*dict*) -- The configuration that specifies how nodes in the flow are executed in parallel. * **maxConcurrency** *(integer) --* The maximum number of nodes that can be executed concurrently in the flow. * **type** *(string) --* **[REQUIRED]** The type of concurrency to use for parallel node execution. Specify one of the following options: * "Automatic" - Amazon Bedrock determines which nodes can be executed in parallel based on the flow definition and its dependencies. * "Manual" - You specify which nodes can be executed in parallel. * **description** (*string*) -- A description for the alias. * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow for which to create an alias. * **name** (*string*) -- **[REQUIRED]** A name for the alias. * **routingConfiguration** (*list*) -- **[REQUIRED]** Contains information about the version to which to map the alias. * *(dict) --* Contains information about a version that the alias maps to. * **flowVersion** *(string) --* The version that the alias maps to. * **tags** (*dict*) -- Any tags that you want to attach to the alias of the flow. For more information, see Tagging resources in Amazon Bedrock. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'concurrencyConfiguration': { 'maxConcurrency': 123, 'type': 'Automatic'|'Manual' }, 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'flowId': 'string', 'id': 'string', 'name': 'string', 'routingConfiguration': [ { 'flowVersion': 'string' }, ], 'updatedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the alias. * **concurrencyConfiguration** *(dict) --* The configuration that specifies how nodes in the flow are executed in parallel. * **maxConcurrency** *(integer) --* The maximum number of nodes that can be executed concurrently in the flow. * **type** *(string) --* The type of concurrency to use for parallel node execution. Specify one of the following options: * "Automatic" - Amazon Bedrock determines which nodes can be executed in parallel based on the flow definition and its dependencies. * "Manual" - You specify which nodes can be executed in parallel. * **createdAt** *(datetime) --* The time at which the alias was created. * **description** *(string) --* The description of the alias. * **flowId** *(string) --* The unique identifier of the flow that the alias belongs to. * **id** *(string) --* The unique identifier of the alias. * **name** *(string) --* The name of the alias. * **routingConfiguration** *(list) --* Contains information about the version that the alias is mapped to. * *(dict) --* Contains information about a version that the alias maps to. * **flowVersion** *(string) --* The version that the alias maps to. * **updatedAt** *(datetime) --* The time at which the alias of the flow was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / list_ingestion_jobs list_ingestion_jobs ******************* AgentsforBedrock.Client.list_ingestion_jobs(**kwargs) Lists the data ingestion jobs for a data source. The list also includes information about each job. See also: AWS API Documentation **Request Syntax** response = client.list_ingestion_jobs( dataSourceId='string', filters=[ { 'attribute': 'STATUS', 'operator': 'EQ', 'values': [ 'string', ] }, ], knowledgeBaseId='string', maxResults=123, nextToken='string', sortBy={ 'attribute': 'STATUS'|'STARTED_AT', 'order': 'ASCENDING'|'DESCENDING' } ) Parameters: * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source for the list of data ingestion jobs. * **filters** (*list*) -- Contains information about the filters for filtering the data. * *(dict) --* The definition of a filter to filter the data. * **attribute** *(string) --* **[REQUIRED]** The name of field or attribute to apply the filter. * **operator** *(string) --* **[REQUIRED]** The operation to apply to the field or attribute. * **values** *(list) --* **[REQUIRED]** A list of values that belong to the field or attribute. * *(string) --* * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base for the list of data ingestion jobs. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. * **sortBy** (*dict*) -- Contains details about how to sort the data. * **attribute** *(string) --* **[REQUIRED]** The name of field or attribute to apply sorting of data. * **order** *(string) --* **[REQUIRED]** The order for sorting the data. Return type: dict Returns: **Response Syntax** { 'ingestionJobSummaries': [ { 'dataSourceId': 'string', 'description': 'string', 'ingestionJobId': 'string', 'knowledgeBaseId': 'string', 'startedAt': datetime(2015, 1, 1), 'statistics': { 'numberOfDocumentsDeleted': 123, 'numberOfDocumentsFailed': 123, 'numberOfDocumentsScanned': 123, 'numberOfMetadataDocumentsModified': 123, 'numberOfMetadataDocumentsScanned': 123, 'numberOfModifiedDocumentsIndexed': 123, 'numberOfNewDocumentsIndexed': 123 }, 'status': 'STARTING'|'IN_PROGRESS'|'COMPLETE'|'FAILED'|'STOPPING'|'STOPPED', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **ingestionJobSummaries** *(list) --* A list of data ingestion jobs with information about each job. * *(dict) --* Contains details about a data ingestion job. * **dataSourceId** *(string) --* The unique identifier of the data source for the data ingestion job. * **description** *(string) --* The description of the data ingestion job. * **ingestionJobId** *(string) --* The unique identifier of the data ingestion job. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base for the data ingestion job. * **startedAt** *(datetime) --* The time the data ingestion job started. * **statistics** *(dict) --* Contains statistics for the data ingestion job. * **numberOfDocumentsDeleted** *(integer) --* The number of source documents that were deleted. * **numberOfDocumentsFailed** *(integer) --* The number of source documents that failed to be ingested. * **numberOfDocumentsScanned** *(integer) --* The total number of source documents that were scanned. Includes new, updated, and unchanged documents. * **numberOfMetadataDocumentsModified** *(integer) --* The number of metadata files that were updated or deleted. * **numberOfMetadataDocumentsScanned** *(integer) --* The total number of metadata files that were scanned. Includes new, updated, and unchanged files. * **numberOfModifiedDocumentsIndexed** *(integer) --* The number of modified source documents in the data source that were successfully indexed. * **numberOfNewDocumentsIndexed** *(integer) --* The number of new source documents in the data source that were successfully indexed. * **status** *(string) --* The status of the data ingestion job. * **updatedAt** *(datetime) --* The time the data ingestion job was last updated. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / delete_agent_version delete_agent_version ******************** AgentsforBedrock.Client.delete_agent_version(**kwargs) Deletes a version of an agent. See also: AWS API Documentation **Request Syntax** response = client.delete_agent_version( agentId='string', agentVersion='string', skipResourceInUseCheck=True|False ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent that the version belongs to. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent to delete. * **skipResourceInUseCheck** (*boolean*) -- By default, this value is "false" and deletion is stopped if the resource is in use. If you set it to "true", the resource will be deleted even if the resource is in use. Return type: dict Returns: **Response Syntax** { 'agentId': 'string', 'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING', 'agentVersion': 'string' } **Response Structure** * *(dict) --* * **agentId** *(string) --* The unique identifier of the agent that the version belongs to. * **agentStatus** *(string) --* The status of the agent version. * **agentVersion** *(string) --* The version that was deleted. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / get_ingestion_job get_ingestion_job ***************** AgentsforBedrock.Client.get_ingestion_job(**kwargs) Gets information about a data ingestion job. Data sources are ingested into your knowledge base so that Large Language Models (LLMs) can use your data. See also: AWS API Documentation **Request Syntax** response = client.get_ingestion_job( dataSourceId='string', ingestionJobId='string', knowledgeBaseId='string' ) Parameters: * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source for the data ingestion job you want to get information on. * **ingestionJobId** (*string*) -- **[REQUIRED]** The unique identifier of the data ingestion job you want to get information on. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base for the data ingestion job you want to get information on. Return type: dict Returns: **Response Syntax** { 'ingestionJob': { 'dataSourceId': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'ingestionJobId': 'string', 'knowledgeBaseId': 'string', 'startedAt': datetime(2015, 1, 1), 'statistics': { 'numberOfDocumentsDeleted': 123, 'numberOfDocumentsFailed': 123, 'numberOfDocumentsScanned': 123, 'numberOfMetadataDocumentsModified': 123, 'numberOfMetadataDocumentsScanned': 123, 'numberOfModifiedDocumentsIndexed': 123, 'numberOfNewDocumentsIndexed': 123 }, 'status': 'STARTING'|'IN_PROGRESS'|'COMPLETE'|'FAILED'|'STOPPING'|'STOPPED', 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **ingestionJob** *(dict) --* Contains details about the data ingestion job. * **dataSourceId** *(string) --* The unique identifier of the data source for the data ingestion job. * **description** *(string) --* The description of the data ingestion job. * **failureReasons** *(list) --* A list of reasons that the data ingestion job failed. * *(string) --* * **ingestionJobId** *(string) --* The unique identifier of the data ingestion job. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge for the data ingestion job. * **startedAt** *(datetime) --* The time the data ingestion job started. If you stop a data ingestion job, the "startedAt" time is the time the job was started before the job was stopped. * **statistics** *(dict) --* Contains statistics about the data ingestion job. * **numberOfDocumentsDeleted** *(integer) --* The number of source documents that were deleted. * **numberOfDocumentsFailed** *(integer) --* The number of source documents that failed to be ingested. * **numberOfDocumentsScanned** *(integer) --* The total number of source documents that were scanned. Includes new, updated, and unchanged documents. * **numberOfMetadataDocumentsModified** *(integer) --* The number of metadata files that were updated or deleted. * **numberOfMetadataDocumentsScanned** *(integer) --* The total number of metadata files that were scanned. Includes new, updated, and unchanged files. * **numberOfModifiedDocumentsIndexed** *(integer) --* The number of modified source documents in the data source that were successfully indexed. * **numberOfNewDocumentsIndexed** *(integer) --* The number of new source documents in the data source that were successfully indexed. * **status** *(string) --* The status of the data ingestion job. * **updatedAt** *(datetime) --* The time the data ingestion job was last updated. If you stop a data ingestion job, the "updatedAt" time is the time the job was stopped. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / create_knowledge_base create_knowledge_base ********************* AgentsforBedrock.Client.create_knowledge_base(**kwargs) Creates a knowledge base. A knowledge base contains your data sources so that Large Language Models (LLMs) can use your data. To create a knowledge base, you must first set up your data sources and configure a supported vector store. For more information, see Set up a knowledge base. Note: If you prefer to let Amazon Bedrock create and manage a vector store for you in Amazon OpenSearch Service, use the console. For more information, see Create a knowledge base. * Provide the "name" and an optional "description". * Provide the Amazon Resource Name (ARN) with permissions to create a knowledge base in the "roleArn" field. * Provide the embedding model to use in the "embeddingModelArn" field in the "knowledgeBaseConfiguration" object. * Provide the configuration for your vector store in the "storageConfiguration" object. * For an Amazon OpenSearch Service database, use the "opensearchServerlessConfiguration" object. For more information, see Create a vector store in Amazon OpenSearch Service. * For an Amazon Aurora database, use the "RdsConfiguration" object. For more information, see Create a vector store in Amazon Aurora. * For a Pinecone database, use the "pineconeConfiguration" object. For more information, see Create a vector store in Pinecone. * For a Redis Enterprise Cloud database, use the "redisEnterpriseCloudConfiguration" object. For more information, see Create a vector store in Redis Enterprise Cloud. See also: AWS API Documentation **Request Syntax** response = client.create_knowledge_base( clientToken='string', description='string', knowledgeBaseConfiguration={ 'kendraKnowledgeBaseConfiguration': { 'kendraIndexArn': 'string' }, 'sqlKnowledgeBaseConfiguration': { 'redshiftConfiguration': { 'queryEngineConfiguration': { 'provisionedConfiguration': { 'authConfiguration': { 'databaseUser': 'string', 'type': 'IAM'|'USERNAME_PASSWORD'|'USERNAME', 'usernamePasswordSecretArn': 'string' }, 'clusterIdentifier': 'string' }, 'serverlessConfiguration': { 'authConfiguration': { 'type': 'IAM'|'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string' }, 'workgroupArn': 'string' }, 'type': 'SERVERLESS'|'PROVISIONED' }, 'queryGenerationConfiguration': { 'executionTimeoutSeconds': 123, 'generationContext': { 'curatedQueries': [ { 'naturalLanguage': 'string', 'sql': 'string' }, ], 'tables': [ { 'columns': [ { 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ], 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ] } }, 'storageConfigurations': [ { 'awsDataCatalogConfiguration': { 'tableNames': [ 'string', ] }, 'redshiftConfiguration': { 'databaseName': 'string' }, 'type': 'REDSHIFT'|'AWS_DATA_CATALOG' }, ] }, 'type': 'REDSHIFT' }, 'type': 'VECTOR'|'KENDRA'|'SQL', 'vectorKnowledgeBaseConfiguration': { 'embeddingModelArn': 'string', 'embeddingModelConfiguration': { 'bedrockEmbeddingModelConfiguration': { 'dimensions': 123, 'embeddingDataType': 'FLOAT32'|'BINARY' } }, 'supplementalDataStorageConfiguration': { 'storageLocations': [ { 's3Location': { 'uri': 'string' }, 'type': 'S3' }, ] } } }, name='string', roleArn='string', storageConfiguration={ 'mongoDbAtlasConfiguration': { 'collectionName': 'string', 'credentialsSecretArn': 'string', 'databaseName': 'string', 'endpoint': 'string', 'endpointServiceName': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'textIndexName': 'string', 'vectorIndexName': 'string' }, 'neptuneAnalyticsConfiguration': { 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'graphArn': 'string' }, 'opensearchManagedClusterConfiguration': { 'domainArn': 'string', 'domainEndpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'opensearchServerlessConfiguration': { 'collectionArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'pineconeConfiguration': { 'connectionString': 'string', 'credentialsSecretArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'namespace': 'string' }, 'rdsConfiguration': { 'credentialsSecretArn': 'string', 'databaseName': 'string', 'fieldMapping': { 'customMetadataField': 'string', 'metadataField': 'string', 'primaryKeyField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'resourceArn': 'string', 'tableName': 'string' }, 'redisEnterpriseCloudConfiguration': { 'credentialsSecretArn': 'string', 'endpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 's3VectorsConfiguration': { 'indexArn': 'string', 'indexName': 'string', 'vectorBucketArn': 'string' }, 'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD'|'RDS'|'MONGO_DB_ATLAS'|'NEPTUNE_ANALYTICS'|'OPENSEARCH_MANAGED_CLUSTER'|'S3_VECTORS' }, tags={ 'string': 'string' } ) Parameters: * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **description** (*string*) -- A description of the knowledge base. * **knowledgeBaseConfiguration** (*dict*) -- **[REQUIRED]** Contains details about the embeddings model used for the knowledge base. * **kendraKnowledgeBaseConfiguration** *(dict) --* Settings for an Amazon Kendra knowledge base. * **kendraIndexArn** *(string) --* **[REQUIRED]** The ARN of the Amazon Kendra index. * **sqlKnowledgeBaseConfiguration** *(dict) --* Specifies configurations for a knowledge base connected to an SQL database. * **redshiftConfiguration** *(dict) --* Specifies configurations for a knowledge base connected to an Amazon Redshift database. * **queryEngineConfiguration** *(dict) --* **[REQUIRED]** Specifies configurations for an Amazon Redshift query engine. * **provisionedConfiguration** *(dict) --* Specifies configurations for a provisioned Amazon Redshift query engine. * **authConfiguration** *(dict) --* **[REQUIRED]** Specifies configurations for authentication to Amazon Redshift. * **databaseUser** *(string) --* The database username for authentication to an Amazon Redshift provisioned data warehouse. * **type** *(string) --* **[REQUIRED]** The type of authentication to use. * **usernamePasswordSecretArn** *(string) --* The ARN of an Secrets Manager secret for authentication. * **clusterIdentifier** *(string) --* **[REQUIRED]** The ID of the Amazon Redshift cluster. * **serverlessConfiguration** *(dict) --* Specifies configurations for a serverless Amazon Redshift query engine. * **authConfiguration** *(dict) --* **[REQUIRED]** Specifies configurations for authentication to an Amazon Redshift provisioned data warehouse. * **type** *(string) --* **[REQUIRED]** The type of authentication to use. * **usernamePasswordSecretArn** *(string) --* The ARN of an Secrets Manager secret for authentication. * **workgroupArn** *(string) --* **[REQUIRED]** The ARN of the Amazon Redshift workgroup. * **type** *(string) --* **[REQUIRED]** The type of query engine. * **queryGenerationConfiguration** *(dict) --* Specifies configurations for generating queries. * **executionTimeoutSeconds** *(integer) --* The time after which query generation will time out. * **generationContext** *(dict) --* Specifies configurations for context to use during query generation. * **curatedQueries** *(list) --* An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries. * *(dict) --* Contains configurations for a query, each of which defines information about example queries to help the query engine generate appropriate SQL queries. * **naturalLanguage** *(string) --* **[REQUIRED]** An example natural language query. * **sql** *(string) --* **[REQUIRED]** The SQL equivalent of the natural language query. * **tables** *(list) --* An array of objects, each of which defines information about a table in the database. * *(dict) --* Contains information about a table for the query engine to consider. * **columns** *(list) --* An array of objects, each of which defines information about a column in the table. * *(dict) --* Contains information about a column in the current table for the query engine to consider. * **description** *(string) --* A description of the column that helps the query engine understand the contents of the column. * **inclusion** *(string) --* Specifies whether to include or exclude the column during query generation. If you specify "EXCLUDE", the column will be ignored. If you specify "INCLUDE", all other columns in the table will be ignored. * **name** *(string) --* The name of the column for which the other fields in this object apply. * **description** *(string) --* A description of the table that helps the query engine understand the contents of the table. * **inclusion** *(string) --* Specifies whether to include or exclude the table during query generation. If you specify "EXCLUDE", the table will be ignored. If you specify "INCLUDE", all other tables will be ignored. * **name** *(string) --* **[REQUIRED]** The name of the table for which the other fields in this object apply. * **storageConfigurations** *(list) --* **[REQUIRED]** Specifies configurations for Amazon Redshift database storage. * *(dict) --* Contains configurations for Amazon Redshift data storage. Specify the data storage service to use in the "type" field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide. * **awsDataCatalogConfiguration** *(dict) --* Specifies configurations for storage in Glue Data Catalog. * **tableNames** *(list) --* **[REQUIRED]** A list of names of the tables to use. * *(string) --* * **redshiftConfiguration** *(dict) --* Specifies configurations for storage in Amazon Redshift. * **databaseName** *(string) --* **[REQUIRED]** The name of the Amazon Redshift database. * **type** *(string) --* **[REQUIRED]** The data storage service to use. * **type** *(string) --* **[REQUIRED]** The type of SQL database to connect to the knowledge base. * **type** *(string) --* **[REQUIRED]** The type of data that the data source is converted into for the knowledge base. * **vectorKnowledgeBaseConfiguration** *(dict) --* Contains details about the model that's used to convert the data source into vector embeddings. * **embeddingModelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base. * **embeddingModelConfiguration** *(dict) --* The embeddings model configuration details for the vector model used in Knowledge Base. * **bedrockEmbeddingModelConfiguration** *(dict) --* The vector configuration details on the Bedrock embeddings model. * **dimensions** *(integer) --* The dimensions details for the vector configuration used on the Bedrock embeddings model. * **embeddingDataType** *(string) --* The data type for the vectors when using a model to convert text into vector embeddings. The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types. * **supplementalDataStorageConfiguration** *(dict) --* If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents. These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate. * **storageLocations** *(list) --* **[REQUIRED]** A list of objects specifying storage locations for images extracted from multimodal documents in your data source. * *(dict) --* Contains information about a storage location for images extracted from multimodal documents in your data source. * **s3Location** *(dict) --* Contains information about the Amazon S3 location for the extracted images. * **uri** *(string) --* **[REQUIRED]** The location's URI. For example, "s3://my-bucket /chunk-processor/". * **type** *(string) --* **[REQUIRED]** Specifies the storage service used for this location. * **name** (*string*) -- **[REQUIRED]** A name for the knowledge base. * **roleArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base. * **storageConfiguration** (*dict*) -- Contains details about the configuration of the vector database used for the knowledge base. * **mongoDbAtlasConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in MongoDB Atlas. * **collectionName** *(string) --* **[REQUIRED]** The collection name of the knowledge base in MongoDB Atlas. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster. * **databaseName** *(string) --* **[REQUIRED]** The database name in your MongoDB Atlas cluster for your knowledge base. * **endpoint** *(string) --* **[REQUIRED]** The endpoint URL of your MongoDB Atlas cluster for your knowledge base. * **endpointServiceName** *(string) --* The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **textIndexName** *(string) --* The name of the text search index in the MongoDB collection. This is required for using the hybrid search feature. * **vectorIndexName** *(string) --* **[REQUIRED]** The name of the MongoDB Atlas vector search index. * **neptuneAnalyticsConfiguration** *(dict) --* Contains details about the Neptune Analytics configuration of the knowledge base in Amazon Neptune. For more information, see Create a vector index in Amazon Neptune Analytics.. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **graphArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Neptune Analytics vector store. * **opensearchManagedClusterConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base in OpenSearch Managed Cluster. For more information, see Create a vector index in Amazon OpenSearch Service. * **domainArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the OpenSearch domain. * **domainEndpoint** *(string) --* **[REQUIRED]** The endpoint URL the OpenSearch domain. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* **[REQUIRED]** The name of the vector store. * **opensearchServerlessConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Amazon OpenSearch Service. * **collectionArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the OpenSearch Service vector store. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* **[REQUIRED]** The name of the vector store. * **pineconeConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Pinecone. * **connectionString** *(string) --* **[REQUIRED]** The endpoint URL for your index management page. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Pinecone API key. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **namespace** *(string) --* The namespace to be used to write new data to your database. * **rdsConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base in Amazon RDS. For more information, see Create a vector index in Amazon RDS. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Amazon RDS database. * **databaseName** *(string) --* **[REQUIRED]** The name of your Amazon RDS database. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **customMetadataField** *(string) --* Provide a name for the universal metadata field where Amazon Bedrock will store any custom metadata from your data source. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **primaryKeyField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the ID for each entry. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **resourceArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the vector store. * **tableName** *(string) --* **[REQUIRED]** The name of the table in the database. * **redisEnterpriseCloudConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Redis Enterprise Cloud. * **credentialsSecretArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Redis Enterprise Cloud database. * **endpoint** *(string) --* **[REQUIRED]** The endpoint URL of the Redis Enterprise Cloud database. * **fieldMapping** *(dict) --* **[REQUIRED]** Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* **[REQUIRED]** The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* **[REQUIRED]** The name of the vector index. * **s3VectorsConfiguration** *(dict) --* The configuration settings for storing knowledge base data using S3 vectors. This includes vector index information and S3 bucket details for vector storage. * **indexArn** *(string) --* The Amazon Resource Name (ARN) of the vector index used for the knowledge base. This ARN identifies the specific vector index resource within Amazon Bedrock. * **indexName** *(string) --* The name of the vector index used for the knowledge base. This name identifies the vector index within the Amazon Bedrock service. * **vectorBucketArn** *(string) --* The Amazon Resource Name (ARN) of the S3 bucket where vector embeddings are stored. This bucket contains the vector data used by the knowledge base. * **type** *(string) --* **[REQUIRED]** The vector store service in which the knowledge base is stored. * **tags** (*dict*) -- Specify the key-value pairs for the tags that you want to attach to your knowledge base in this object. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'knowledgeBase': { 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'failureReasons': [ 'string', ], 'knowledgeBaseArn': 'string', 'knowledgeBaseConfiguration': { 'kendraKnowledgeBaseConfiguration': { 'kendraIndexArn': 'string' }, 'sqlKnowledgeBaseConfiguration': { 'redshiftConfiguration': { 'queryEngineConfiguration': { 'provisionedConfiguration': { 'authConfiguration': { 'databaseUser': 'string', 'type': 'IAM'|'USERNAME_PASSWORD'|'USERNAME', 'usernamePasswordSecretArn': 'string' }, 'clusterIdentifier': 'string' }, 'serverlessConfiguration': { 'authConfiguration': { 'type': 'IAM'|'USERNAME_PASSWORD', 'usernamePasswordSecretArn': 'string' }, 'workgroupArn': 'string' }, 'type': 'SERVERLESS'|'PROVISIONED' }, 'queryGenerationConfiguration': { 'executionTimeoutSeconds': 123, 'generationContext': { 'curatedQueries': [ { 'naturalLanguage': 'string', 'sql': 'string' }, ], 'tables': [ { 'columns': [ { 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ], 'description': 'string', 'inclusion': 'INCLUDE'|'EXCLUDE', 'name': 'string' }, ] } }, 'storageConfigurations': [ { 'awsDataCatalogConfiguration': { 'tableNames': [ 'string', ] }, 'redshiftConfiguration': { 'databaseName': 'string' }, 'type': 'REDSHIFT'|'AWS_DATA_CATALOG' }, ] }, 'type': 'REDSHIFT' }, 'type': 'VECTOR'|'KENDRA'|'SQL', 'vectorKnowledgeBaseConfiguration': { 'embeddingModelArn': 'string', 'embeddingModelConfiguration': { 'bedrockEmbeddingModelConfiguration': { 'dimensions': 123, 'embeddingDataType': 'FLOAT32'|'BINARY' } }, 'supplementalDataStorageConfiguration': { 'storageLocations': [ { 's3Location': { 'uri': 'string' }, 'type': 'S3' }, ] } } }, 'knowledgeBaseId': 'string', 'name': 'string', 'roleArn': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED'|'DELETE_UNSUCCESSFUL', 'storageConfiguration': { 'mongoDbAtlasConfiguration': { 'collectionName': 'string', 'credentialsSecretArn': 'string', 'databaseName': 'string', 'endpoint': 'string', 'endpointServiceName': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'textIndexName': 'string', 'vectorIndexName': 'string' }, 'neptuneAnalyticsConfiguration': { 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'graphArn': 'string' }, 'opensearchManagedClusterConfiguration': { 'domainArn': 'string', 'domainEndpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'opensearchServerlessConfiguration': { 'collectionArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 'pineconeConfiguration': { 'connectionString': 'string', 'credentialsSecretArn': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string' }, 'namespace': 'string' }, 'rdsConfiguration': { 'credentialsSecretArn': 'string', 'databaseName': 'string', 'fieldMapping': { 'customMetadataField': 'string', 'metadataField': 'string', 'primaryKeyField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'resourceArn': 'string', 'tableName': 'string' }, 'redisEnterpriseCloudConfiguration': { 'credentialsSecretArn': 'string', 'endpoint': 'string', 'fieldMapping': { 'metadataField': 'string', 'textField': 'string', 'vectorField': 'string' }, 'vectorIndexName': 'string' }, 's3VectorsConfiguration': { 'indexArn': 'string', 'indexName': 'string', 'vectorBucketArn': 'string' }, 'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD'|'RDS'|'MONGO_DB_ATLAS'|'NEPTUNE_ANALYTICS'|'OPENSEARCH_MANAGED_CLUSTER'|'S3_VECTORS' }, 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **knowledgeBase** *(dict) --* Contains details about the knowledge base. * **createdAt** *(datetime) --* The time the knowledge base was created. * **description** *(string) --* The description of the knowledge base. * **failureReasons** *(list) --* A list of reasons that the API operation on the knowledge base failed. * *(string) --* * **knowledgeBaseArn** *(string) --* The Amazon Resource Name (ARN) of the knowledge base. * **knowledgeBaseConfiguration** *(dict) --* Contains details about the embeddings configuration of the knowledge base. * **kendraKnowledgeBaseConfiguration** *(dict) --* Settings for an Amazon Kendra knowledge base. * **kendraIndexArn** *(string) --* The ARN of the Amazon Kendra index. * **sqlKnowledgeBaseConfiguration** *(dict) --* Specifies configurations for a knowledge base connected to an SQL database. * **redshiftConfiguration** *(dict) --* Specifies configurations for a knowledge base connected to an Amazon Redshift database. * **queryEngineConfiguration** *(dict) --* Specifies configurations for an Amazon Redshift query engine. * **provisionedConfiguration** *(dict) --* Specifies configurations for a provisioned Amazon Redshift query engine. * **authConfiguration** *(dict) --* Specifies configurations for authentication to Amazon Redshift. * **databaseUser** *(string) --* The database username for authentication to an Amazon Redshift provisioned data warehouse. * **type** *(string) --* The type of authentication to use. * **usernamePasswordSecretArn** *(string) --* The ARN of an Secrets Manager secret for authentication. * **clusterIdentifier** *(string) --* The ID of the Amazon Redshift cluster. * **serverlessConfiguration** *(dict) --* Specifies configurations for a serverless Amazon Redshift query engine. * **authConfiguration** *(dict) --* Specifies configurations for authentication to an Amazon Redshift provisioned data warehouse. * **type** *(string) --* The type of authentication to use. * **usernamePasswordSecretArn** *(string) --* The ARN of an Secrets Manager secret for authentication. * **workgroupArn** *(string) --* The ARN of the Amazon Redshift workgroup. * **type** *(string) --* The type of query engine. * **queryGenerationConfiguration** *(dict) --* Specifies configurations for generating queries. * **executionTimeoutSeconds** *(integer) --* The time after which query generation will time out. * **generationContext** *(dict) --* Specifies configurations for context to use during query generation. * **curatedQueries** *(list) --* An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries. * *(dict) --* Contains configurations for a query, each of which defines information about example queries to help the query engine generate appropriate SQL queries. * **naturalLanguage** *(string) --* An example natural language query. * **sql** *(string) --* The SQL equivalent of the natural language query. * **tables** *(list) --* An array of objects, each of which defines information about a table in the database. * *(dict) --* Contains information about a table for the query engine to consider. * **columns** *(list) --* An array of objects, each of which defines information about a column in the table. * *(dict) --* Contains information about a column in the current table for the query engine to consider. * **description** *(string) --* A description of the column that helps the query engine understand the contents of the column. * **inclusion** *(string) --* Specifies whether to include or exclude the column during query generation. If you specify "EXCLUDE", the column will be ignored. If you specify "INCLUDE", all other columns in the table will be ignored. * **name** *(string) --* The name of the column for which the other fields in this object apply. * **description** *(string) --* A description of the table that helps the query engine understand the contents of the table. * **inclusion** *(string) --* Specifies whether to include or exclude the table during query generation. If you specify "EXCLUDE", the table will be ignored. If you specify "INCLUDE", all other tables will be ignored. * **name** *(string) --* The name of the table for which the other fields in this object apply. * **storageConfigurations** *(list) --* Specifies configurations for Amazon Redshift database storage. * *(dict) --* Contains configurations for Amazon Redshift data storage. Specify the data storage service to use in the "type" field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide. * **awsDataCatalogConfiguration** *(dict) --* Specifies configurations for storage in Glue Data Catalog. * **tableNames** *(list) --* A list of names of the tables to use. * *(string) --* * **redshiftConfiguration** *(dict) --* Specifies configurations for storage in Amazon Redshift. * **databaseName** *(string) --* The name of the Amazon Redshift database. * **type** *(string) --* The data storage service to use. * **type** *(string) --* The type of SQL database to connect to the knowledge base. * **type** *(string) --* The type of data that the data source is converted into for the knowledge base. * **vectorKnowledgeBaseConfiguration** *(dict) --* Contains details about the model that's used to convert the data source into vector embeddings. * **embeddingModelArn** *(string) --* The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base. * **embeddingModelConfiguration** *(dict) --* The embeddings model configuration details for the vector model used in Knowledge Base. * **bedrockEmbeddingModelConfiguration** *(dict) --* The vector configuration details on the Bedrock embeddings model. * **dimensions** *(integer) --* The dimensions details for the vector configuration used on the Bedrock embeddings model. * **embeddingDataType** *(string) --* The data type for the vectors when using a model to convert text into vector embeddings. The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types. * **supplementalDataStorageConfiguration** *(dict) --* If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents. These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate. * **storageLocations** *(list) --* A list of objects specifying storage locations for images extracted from multimodal documents in your data source. * *(dict) --* Contains information about a storage location for images extracted from multimodal documents in your data source. * **s3Location** *(dict) --* Contains information about the Amazon S3 location for the extracted images. * **uri** *(string) --* The location's URI. For example, "s3://my- bucket/chunk-processor/". * **type** *(string) --* Specifies the storage service used for this location. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base. * **name** *(string) --* The name of the knowledge base. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base. * **status** *(string) --* The status of the knowledge base. The following statuses are possible: * CREATING – The knowledge base is being created. * ACTIVE – The knowledge base is ready to be queried. * DELETING – The knowledge base is being deleted. * UPDATING – The knowledge base is being updated. * FAILED – The knowledge base API operation failed. * **storageConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base. * **mongoDbAtlasConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in MongoDB Atlas. * **collectionName** *(string) --* The collection name of the knowledge base in MongoDB Atlas. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that contains user credentials for your MongoDB Atlas cluster. * **databaseName** *(string) --* The database name in your MongoDB Atlas cluster for your knowledge base. * **endpoint** *(string) --* The endpoint URL of your MongoDB Atlas cluster for your knowledge base. * **endpointServiceName** *(string) --* The name of the VPC endpoint service in your account that is connected to your MongoDB Atlas cluster. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **textIndexName** *(string) --* The name of the text search index in the MongoDB collection. This is required for using the hybrid search feature. * **vectorIndexName** *(string) --* The name of the MongoDB Atlas vector search index. * **neptuneAnalyticsConfiguration** *(dict) --* Contains details about the Neptune Analytics configuration of the knowledge base in Amazon Neptune. For more information, see Create a vector index in Amazon Neptune Analytics.. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **graphArn** *(string) --* The Amazon Resource Name (ARN) of the Neptune Analytics vector store. * **opensearchManagedClusterConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base in OpenSearch Managed Cluster. For more information, see Create a vector index in Amazon OpenSearch Service. * **domainArn** *(string) --* The Amazon Resource Name (ARN) of the OpenSearch domain. * **domainEndpoint** *(string) --* The endpoint URL the OpenSearch domain. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* The name of the vector store. * **opensearchServerlessConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Amazon OpenSearch Service. * **collectionArn** *(string) --* The Amazon Resource Name (ARN) of the OpenSearch Service vector store. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* The name of the vector store. * **pineconeConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Pinecone. * **connectionString** *(string) --* The endpoint URL for your index management page. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Pinecone API key. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **namespace** *(string) --* The namespace to be used to write new data to your database. * **rdsConfiguration** *(dict) --* Contains details about the storage configuration of the knowledge base in Amazon RDS. For more information, see Create a vector index in Amazon RDS. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Amazon RDS database. * **databaseName** *(string) --* The name of your Amazon RDS database. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **customMetadataField** *(string) --* Provide a name for the universal metadata field where Amazon Bedrock will store any custom metadata from your data source. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **primaryKeyField** *(string) --* The name of the field in which Amazon Bedrock stores the ID for each entry. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **resourceArn** *(string) --* The Amazon Resource Name (ARN) of the vector store. * **tableName** *(string) --* The name of the table in the database. * **redisEnterpriseCloudConfiguration** *(dict) --* Contains the storage configuration of the knowledge base in Redis Enterprise Cloud. * **credentialsSecretArn** *(string) --* The Amazon Resource Name (ARN) of the secret that you created in Secrets Manager that is linked to your Redis Enterprise Cloud database. * **endpoint** *(string) --* The endpoint URL of the Redis Enterprise Cloud database. * **fieldMapping** *(dict) --* Contains the names of the fields to which to map information about the vector store. * **metadataField** *(string) --* The name of the field in which Amazon Bedrock stores metadata about the vector store. * **textField** *(string) --* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose. * **vectorField** *(string) --* The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources. * **vectorIndexName** *(string) --* The name of the vector index. * **s3VectorsConfiguration** *(dict) --* The configuration settings for storing knowledge base data using S3 vectors. This includes vector index information and S3 bucket details for vector storage. * **indexArn** *(string) --* The Amazon Resource Name (ARN) of the vector index used for the knowledge base. This ARN identifies the specific vector index resource within Amazon Bedrock. * **indexName** *(string) --* The name of the vector index used for the knowledge base. This name identifies the vector index within the Amazon Bedrock service. * **vectorBucketArn** *(string) --* The Amazon Resource Name (ARN) of the S3 bucket where vector embeddings are stored. This bucket contains the vector data used by the knowledge base. * **type** *(string) --* The vector store service in which the knowledge base is stored. * **updatedAt** *(datetime) --* The time the knowledge base was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / delete_knowledge_base delete_knowledge_base ********************* AgentsforBedrock.Client.delete_knowledge_base(**kwargs) Deletes a knowledge base. Before deleting a knowledge base, you should disassociate the knowledge base from any agents that it is associated with by making a DisassociateAgentKnowledgeBase request. See also: AWS API Documentation **Request Syntax** response = client.delete_knowledge_base( knowledgeBaseId='string' ) Parameters: **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base to delete. Return type: dict Returns: **Response Syntax** { 'knowledgeBaseId': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED'|'DELETE_UNSUCCESSFUL' } **Response Structure** * *(dict) --* * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base that was deleted. * **status** *(string) --* The status of the knowledge base and whether it has been successfully deleted. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / create_agent create_agent ************ AgentsforBedrock.Client.create_agent(**kwargs) Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers. * Specify the following fields for security purposes. * "agentResourceRoleArn" – The Amazon Resource Name (ARN) of the role with permissions to invoke API operations on an agent. * (Optional) "customerEncryptionKeyArn" – The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent. * (Optional) "idleSessionTTLinSeconds" – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent "InvokeAgent" request begins a new session. * To enable your agent to retain conversational context across multiple sessions, include a "memoryConfiguration" object. For more information, see Configure memory. * To override the default prompt behavior for agent orchestration and to use advanced prompts, include a "promptOverrideConfiguration" object. For more information, see Advanced prompts. * If your agent fails to be created, the response returns a list of "failureReasons" alongside a list of "recommendedActions" for you to troubleshoot. * The agent instructions will not be honored if your agent has only one knowledge base, uses default prompts, has no action group, and user input is disabled. See also: AWS API Documentation **Request Syntax** response = client.create_agent( agentCollaboration='SUPERVISOR'|'SUPERVISOR_ROUTER'|'DISABLED', agentName='string', agentResourceRoleArn='string', clientToken='string', customOrchestration={ 'executor': { 'lambda': 'string' } }, customerEncryptionKeyArn='string', description='string', foundationModel='string', guardrailConfiguration={ 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, idleSessionTTLInSeconds=123, instruction='string', memoryConfiguration={ 'enabledMemoryTypes': [ 'SESSION_SUMMARY', ], 'sessionSummaryConfiguration': { 'maxRecentSessions': 123 }, 'storageDays': 123 }, orchestrationType='DEFAULT'|'CUSTOM_ORCHESTRATION', promptOverrideConfiguration={ 'overrideLambda': 'string', 'promptConfigurations': [ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'basePromptTemplate': 'string', 'foundationModel': 'string', 'inferenceConfiguration': { 'maximumLength': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topK': 123, 'topP': ... }, 'parserMode': 'DEFAULT'|'OVERRIDDEN', 'promptCreationMode': 'DEFAULT'|'OVERRIDDEN', 'promptState': 'ENABLED'|'DISABLED', 'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION'|'MEMORY_SUMMARIZATION' }, ] }, tags={ 'string': 'string' } ) Parameters: * **agentCollaboration** (*string*) -- The agent's collaboration role. * **agentName** (*string*) -- **[REQUIRED]** A name for the agent that you create. * **agentResourceRoleArn** (*string*) -- The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent. * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **customOrchestration** (*dict*) -- Contains details of the custom orchestration configured for the agent. * **executor** *(dict) --* The structure of the executor invoking the actions in custom orchestration. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "lambda". * **lambda** *(string) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * **customerEncryptionKeyArn** (*string*) -- The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent. * **description** (*string*) -- A description of the agent. * **foundationModel** (*string*) -- The identifier for the model that you want to be used for orchestration by the agent you create. The "modelId" to provide depends on the type of model or throughput that you use: * If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide. * If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see Supported Regions and models for cross-region inference in the Amazon Bedrock User Guide. * If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide. * If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide. * If you use an imported model, specify the ARN of the imported model. You can get the model ARN from a successful call to CreateModelImportJob or from the Imported models page in the Amazon Bedrock console. * **guardrailConfiguration** (*dict*) -- The unique Guardrail configuration assigned to the agent when it is created. * **guardrailIdentifier** *(string) --* The unique identifier of the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **idleSessionTTLInSeconds** (*integer*) -- The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout. * **instruction** (*string*) -- Instructions that tell the agent what it should do and how it should interact with users. * **memoryConfiguration** (*dict*) -- Contains the details of the memory configured for the agent. * **enabledMemoryTypes** *(list) --* **[REQUIRED]** The type of memory that is stored. * *(string) --* * **sessionSummaryConfiguration** *(dict) --* Contains the configuration for SESSION_SUMMARY memory type enabled for the agent. * **maxRecentSessions** *(integer) --* Maximum number of recent session summaries to include in the agent's prompt context. * **storageDays** *(integer) --* The number of days the agent is configured to retain the conversational context. * **orchestrationType** (*string*) -- Specifies the type of orchestration strategy for the agent. This is set to "DEFAULT" orchestration type, by default. * **promptOverrideConfiguration** (*dict*) -- Contains configurations to override prompts in different parts of an agent sequence. For more information, see Advanced prompts. * **overrideLambda** *(string) --* The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the "promptConfigurations" must contain a "parserMode" value that is set to "OVERRIDDEN". For more information, see Parser Lambda function in Amazon Bedrock Agents. * **promptConfigurations** *(list) --* **[REQUIRED]** Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * *(dict) --* Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * **additionalModelRequestFields** (*document*) -- If the Converse or ConverseStream operations support the model, "additionalModelRequestFields" contains additional inference parameters, beyond the base set of inference parameters in the "inferenceConfiguration" field. For more information, see *Inference request parameters and response fields for foundation models* in the Amazon Bedrock user guide. * **basePromptTemplate** *(string) --* Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables. For more information, see Configure the prompt templates. * **foundationModel** *(string) --* The agent's foundation model. * **inferenceConfiguration** *(dict) --* Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by the "promptType". For more information, see Inference parameters for foundation models. * **maximumLength** *(integer) --* The maximum number of tokens to allow in the generated response. * **stopSequences** *(list) --* A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response. * *(string) --* * **temperature** *(float) --* The likelihood of the model selecting higher- probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options. * **topK** *(integer) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "topK" is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topK" to 50, the model selects the next token from among the top 50 most likely choices. * **topP** *(float) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "Top P" determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topP" to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens. * **parserMode** *(string) --* Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the "promptType". If you set the field as "OVERRIDDEN", the "overrideLambda" field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function. * **promptCreationMode** *(string) --* Specifies whether to override the default prompt template for this "promptType". Set this value to "OVERRIDDEN" to use the prompt that you provide in the "basePromptTemplate". If you leave it as "DEFAULT", the agent uses a default prompt template. * **promptState** *(string) --* Specifies whether to allow the agent to carry out the step specified in the "promptType". If you set this value to "DISABLED", the agent skips that step. The default state for each "promptType" is as follows. * "PRE_PROCESSING" – "DISABLED" * "ORCHESTRATION" – "ENABLED" * "KNOWLEDGE_BASE_RESPONSE_GENERATION" – "ENABLED" * "POST_PROCESSING" – "DISABLED" * **promptType** *(string) --* The step in the agent sequence that this prompt configuration applies to. * **tags** (*dict*) -- Any tags that you want to attach to the agent. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'agent': { 'agentArn': 'string', 'agentCollaboration': 'SUPERVISOR'|'SUPERVISOR_ROUTER'|'DISABLED', 'agentId': 'string', 'agentName': 'string', 'agentResourceRoleArn': 'string', 'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING', 'agentVersion': 'string', 'clientToken': 'string', 'createdAt': datetime(2015, 1, 1), 'customOrchestration': { 'executor': { 'lambda': 'string' } }, 'customerEncryptionKeyArn': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'foundationModel': 'string', 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'idleSessionTTLInSeconds': 123, 'instruction': 'string', 'memoryConfiguration': { 'enabledMemoryTypes': [ 'SESSION_SUMMARY', ], 'sessionSummaryConfiguration': { 'maxRecentSessions': 123 }, 'storageDays': 123 }, 'orchestrationType': 'DEFAULT'|'CUSTOM_ORCHESTRATION', 'preparedAt': datetime(2015, 1, 1), 'promptOverrideConfiguration': { 'overrideLambda': 'string', 'promptConfigurations': [ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'basePromptTemplate': 'string', 'foundationModel': 'string', 'inferenceConfiguration': { 'maximumLength': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topK': 123, 'topP': ... }, 'parserMode': 'DEFAULT'|'OVERRIDDEN', 'promptCreationMode': 'DEFAULT'|'OVERRIDDEN', 'promptState': 'ENABLED'|'DISABLED', 'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION'|'MEMORY_SUMMARIZATION' }, ] }, 'recommendedActions': [ 'string', ], 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agent** *(dict) --* Contains details about the agent created. * **agentArn** *(string) --* The Amazon Resource Name (ARN) of the agent. * **agentCollaboration** *(string) --* The agent's collaboration settings. * **agentId** *(string) --* The unique identifier of the agent. * **agentName** *(string) --* The name of the agent. * **agentResourceRoleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent. * **agentStatus** *(string) --* The status of the agent and whether it is ready for use. The following statuses are possible: * CREATING – The agent is being created. * PREPARING – The agent is being prepared. * PREPARED – The agent is prepared and ready to be invoked. * NOT_PREPARED – The agent has been created but not yet prepared. * FAILED – The agent API operation failed. * UPDATING – The agent is being updated. * DELETING – The agent is being deleted. * **agentVersion** *(string) --* The version of the agent. * **clientToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **createdAt** *(datetime) --* The time at which the agent was created. * **customOrchestration** *(dict) --* Contains custom orchestration configurations for the agent. * **executor** *(dict) --* The structure of the executor invoking the actions in custom orchestration. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "lambda". 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'} * **lambda** *(string) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key that encrypts the agent. * **description** *(string) --* The description of the agent. * **failureReasons** *(list) --* Contains reasons that the agent-related API that you invoked failed. * *(string) --* * **foundationModel** *(string) --* The foundation model used for orchestration by the agent. * **guardrailConfiguration** *(dict) --* Details about the guardrail associated with the agent. * **guardrailIdentifier** *(string) --* The unique identifier of the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **idleSessionTTLInSeconds** *(integer) --* The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout. * **instruction** *(string) --* Instructions that tell the agent what it should do and how it should interact with users. * **memoryConfiguration** *(dict) --* Contains memory configuration for the agent. * **enabledMemoryTypes** *(list) --* The type of memory that is stored. * *(string) --* * **sessionSummaryConfiguration** *(dict) --* Contains the configuration for SESSION_SUMMARY memory type enabled for the agent. * **maxRecentSessions** *(integer) --* Maximum number of recent session summaries to include in the agent's prompt context. * **storageDays** *(integer) --* The number of days the agent is configured to retain the conversational context. * **orchestrationType** *(string) --* Specifies the orchestration strategy for the agent. * **preparedAt** *(datetime) --* The time at which the agent was last prepared. * **promptOverrideConfiguration** *(dict) --* Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see Advanced prompts. * **overrideLambda** *(string) --* The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the "promptConfigurations" must contain a "parserMode" value that is set to "OVERRIDDEN". For more information, see Parser Lambda function in Amazon Bedrock Agents. * **promptConfigurations** *(list) --* Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * *(dict) --* Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * **additionalModelRequestFields** (*document*) -- If the Converse or ConverseStream operations support the model, "additionalModelRequestFields" contains additional inference parameters, beyond the base set of inference parameters in the "inferenceConfiguration" field. For more information, see *Inference request parameters and response fields for foundation models* in the Amazon Bedrock user guide. * **basePromptTemplate** *(string) --* Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables. For more information, see Configure the prompt templates. * **foundationModel** *(string) --* The agent's foundation model. * **inferenceConfiguration** *(dict) --* Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by the "promptType". For more information, see Inference parameters for foundation models. * **maximumLength** *(integer) --* The maximum number of tokens to allow in the generated response. * **stopSequences** *(list) --* A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response. * *(string) --* * **temperature** *(float) --* The likelihood of the model selecting higher- probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower- probability options. * **topK** *(integer) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "topK" is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topK" to 50, the model selects the next token from among the top 50 most likely choices. * **topP** *(float) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "Top P" determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topP" to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens. * **parserMode** *(string) --* Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the "promptType". If you set the field as "OVERRIDDEN", the "overrideLambda" field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function. * **promptCreationMode** *(string) --* Specifies whether to override the default prompt template for this "promptType". Set this value to "OVERRIDDEN" to use the prompt that you provide in the "basePromptTemplate". If you leave it as "DEFAULT", the agent uses a default prompt template. * **promptState** *(string) --* Specifies whether to allow the agent to carry out the step specified in the "promptType". If you set this value to "DISABLED", the agent skips that step. The default state for each "promptType" is as follows. * "PRE_PROCESSING" – "DISABLED" * "ORCHESTRATION" – "ENABLED" * "KNOWLEDGE_BASE_RESPONSE_GENERATION" – "ENABLED" * "POST_PROCESSING" – "DISABLED" * **promptType** *(string) --* The step in the agent sequence that this prompt configuration applies to. * **recommendedActions** *(list) --* Contains recommended actions to take for the agent-related API that you invoked to succeed. * *(string) --* * **updatedAt** *(datetime) --* The time at which the agent was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / start_ingestion_job start_ingestion_job ******************* AgentsforBedrock.Client.start_ingestion_job(**kwargs) Begins a data ingestion job. Data sources are ingested into your knowledge base so that Large Language Models (LLMs) can use your data. See also: AWS API Documentation **Request Syntax** response = client.start_ingestion_job( clientToken='string', dataSourceId='string', description='string', knowledgeBaseId='string' ) Parameters: * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source you want to ingest into your knowledge base. * **description** (*string*) -- A description of the data ingestion job. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base for the data ingestion job. Return type: dict Returns: **Response Syntax** { 'ingestionJob': { 'dataSourceId': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'ingestionJobId': 'string', 'knowledgeBaseId': 'string', 'startedAt': datetime(2015, 1, 1), 'statistics': { 'numberOfDocumentsDeleted': 123, 'numberOfDocumentsFailed': 123, 'numberOfDocumentsScanned': 123, 'numberOfMetadataDocumentsModified': 123, 'numberOfMetadataDocumentsScanned': 123, 'numberOfModifiedDocumentsIndexed': 123, 'numberOfNewDocumentsIndexed': 123 }, 'status': 'STARTING'|'IN_PROGRESS'|'COMPLETE'|'FAILED'|'STOPPING'|'STOPPED', 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **ingestionJob** *(dict) --* Contains information about the data ingestion job. * **dataSourceId** *(string) --* The unique identifier of the data source for the data ingestion job. * **description** *(string) --* The description of the data ingestion job. * **failureReasons** *(list) --* A list of reasons that the data ingestion job failed. * *(string) --* * **ingestionJobId** *(string) --* The unique identifier of the data ingestion job. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge for the data ingestion job. * **startedAt** *(datetime) --* The time the data ingestion job started. If you stop a data ingestion job, the "startedAt" time is the time the job was started before the job was stopped. * **statistics** *(dict) --* Contains statistics about the data ingestion job. * **numberOfDocumentsDeleted** *(integer) --* The number of source documents that were deleted. * **numberOfDocumentsFailed** *(integer) --* The number of source documents that failed to be ingested. * **numberOfDocumentsScanned** *(integer) --* The total number of source documents that were scanned. Includes new, updated, and unchanged documents. * **numberOfMetadataDocumentsModified** *(integer) --* The number of metadata files that were updated or deleted. * **numberOfMetadataDocumentsScanned** *(integer) --* The total number of metadata files that were scanned. Includes new, updated, and unchanged files. * **numberOfModifiedDocumentsIndexed** *(integer) --* The number of modified source documents in the data source that were successfully indexed. * **numberOfNewDocumentsIndexed** *(integer) --* The number of new source documents in the data source that were successfully indexed. * **status** *(string) --* The status of the data ingestion job. * **updatedAt** *(datetime) --* The time the data ingestion job was last updated. If you stop a data ingestion job, the "updatedAt" time is the time the job was stopped. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / close close ***** AgentsforBedrock.Client.close() Closes underlying endpoint connections. AgentsforBedrock / Client / update_flow update_flow *********** AgentsforBedrock.Client.update_flow(**kwargs) Modifies a flow. Include both fields that you want to keep and fields that you want to change. For more information, see How it works and Create a flow in Amazon Bedrock in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.update_flow( customerEncryptionKeyArn='string', definition={ 'connections': [ { 'configuration': { 'conditional': { 'condition': 'string' }, 'data': { 'sourceOutput': 'string', 'targetInput': 'string' } }, 'name': 'string', 'source': 'string', 'target': 'string', 'type': 'Data'|'Conditional' }, ], 'nodes': [ { 'configuration': { 'agent': { 'agentAliasArn': 'string' }, 'collector': {} , 'condition': { 'conditions': [ { 'expression': 'string', 'name': 'string' }, ] }, 'inlineCode': { 'code': 'string', 'language': 'Python_3' }, 'input': {} , 'iterator': {} , 'knowledgeBase': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'knowledgeBaseId': 'string', 'modelId': 'string', 'numberOfResults': 123, 'orchestrationConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'inferenceConfig': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'performanceConfig': { 'latency': 'standard'|'optimized' }, 'promptTemplate': { 'textPromptTemplate': 'string' } }, 'promptTemplate': { 'textPromptTemplate': 'string' }, 'rerankingConfiguration': { 'bedrockRerankingConfiguration': { 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToExclude': [ { 'fieldName': 'string' }, ], 'fieldsToInclude': [ { 'fieldName': 'string' }, ] } }, 'modelConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'modelArn': 'string' }, 'numberOfRerankedResults': 123 }, 'type': 'BEDROCK_RERANKING_MODEL' } }, 'lambdaFunction': { 'lambdaArn': 'string' }, 'lex': { 'botAliasArn': 'string', 'localeId': 'string' }, 'loop': { 'definition': {'... recursive ...'} }, 'loopController': { 'continueCondition': { 'expression': 'string', 'name': 'string' }, 'maxIterations': 123 }, 'loopInput': {} , 'output': {} , 'prompt': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'sourceConfiguration': { 'inline': { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'modelId': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {} , 'auto': {} , 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, 'resource': { 'promptArn': 'string' } } }, 'retrieval': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } }, 'storage': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } } }, 'inputs': [ { 'category': 'LoopCondition'|'ReturnValueToLoopStart'|'ExitLoop', 'expression': 'string', 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'name': 'string', 'outputs': [ { 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'type': 'Input'|'Output'|'KnowledgeBase'|'Condition'|'Lex'|'Prompt'|'LambdaFunction'|'Storage'|'Agent'|'Retrieval'|'Iterator'|'Collector'|'InlineCode'|'Loop'|'LoopInput'|'LoopController' }, ] }, description='string', executionRoleArn='string', flowIdentifier='string', name='string' ) Parameters: * **customerEncryptionKeyArn** (*string*) -- The Amazon Resource Name (ARN) of the KMS key to encrypt the flow. * **definition** (*dict*) -- A definition of the nodes and the connections between the nodes in the flow. * **connections** *(list) --* An array of connection definitions in the flow. * *(dict) --* Contains information about a connection between two nodes in the flow. * **configuration** *(dict) --* The configuration of the connection. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "conditional", "data". * **conditional** *(dict) --* The configuration of a connection originating from a Condition node. * **condition** *(string) --* **[REQUIRED]** 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. * **data** *(dict) --* The configuration of a connection originating from a node that isn't a Condition node. * **sourceOutput** *(string) --* **[REQUIRED]** The name of the output in the source node that the connection begins from. * **targetInput** *(string) --* **[REQUIRED]** The name of the input in the target node that the connection ends at. * **name** *(string) --* **[REQUIRED]** A name for the connection that you can reference. * **source** *(string) --* **[REQUIRED]** The node that the connection starts at. * **target** *(string) --* **[REQUIRED]** The node that the connection ends at. * **type** *(string) --* **[REQUIRED]** Whether the source node that the connection begins from is a condition node ( "Conditional") or not ( "Data"). * **nodes** *(list) --* An array of node definitions in the flow. * *(dict) --* Contains configurations about a node in the flow. * **configuration** *(dict) --* Contains configurations for the node. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "agent", "collector", "condition", "inlineCode", "input", "iterator", "knowledgeBase", "lambdaFunction", "lex", "loop", "loopController", "loopInput", "output", "prompt", "retrieval", "storage". * **agent** *(dict) --* Contains configurations for an agent node in your flow. Invokes an alias of an agent and returns the response. * **agentAliasArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the alias of the agent to invoke. * **collector** *(dict) --* Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs. * **condition** *(dict) --* Contains configurations for a condition node in your flow. Defines conditions that lead to different branches of the flow. * **conditions** *(list) --* **[REQUIRED]** 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. * **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. * **name** *(string) --* **[REQUIRED]** A name for the condition that you can reference. * **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) --* **[REQUIRED]** 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) --* **[REQUIRED]** 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. * **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. * **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. * **knowledgeBase** *(dict) --* Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response. * **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. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "text". * **text** *(dict) --* Contains inference configurations for a text prompt. * **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) --* * **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. * **knowledgeBaseId** *(string) --* **[REQUIRED]** 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. * **numberOfResults** *(integer) --* The number of results to retrieve from the knowledge base. * **orchestrationConfiguration** *(dict) --* The configuration for orchestrating the retrieval and generation process in the knowledge base node. * **additionalModelRequestFields** *(dict) --* The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model. * *(string) --* * (*document*) -- * **inferenceConfig** *(dict) --* Contains inference configurations for the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "text". * **text** *(dict) --* Contains inference configurations for a text prompt. * **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) --* * **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. * **performanceConfig** *(dict) --* The performance configuration options for the knowledge base retrieval and generation process. * **latency** *(string) --* The latency optimization setting. * **promptTemplate** *(dict) --* A custom prompt template for orchestrating the retrieval and generation process. * **textPromptTemplate** *(string) --* The text of the prompt template. * **promptTemplate** *(dict) --* A custom prompt template to use with the knowledge base for generating responses. * **textPromptTemplate** *(string) --* The text of the prompt template. * **rerankingConfiguration** *(dict) --* The configuration for reranking the retrieved results from the knowledge base to improve relevance. * **bedrockRerankingConfiguration** *(dict) --* Specifies the configuration for using an Amazon Bedrock reranker model to rerank retrieved results. * **metadataConfiguration** *(dict) --* Specifies how metadata fields should be handled during the reranking process. * **selectionMode** *(string) --* **[REQUIRED]** 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 can be set: "fieldsToExclude", "fieldsToInclude". * **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) --* **[REQUIRED]** The name of the metadata field to include or exclude during reranking. * **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) --* **[REQUIRED]** The name of the metadata field to include or exclude during reranking. * **modelConfiguration** *(dict) --* **[REQUIRED]** Specifies the configuration for 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*) -- * **modelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Amazon Bedrock reranker model. * **numberOfRerankedResults** *(integer) --* Specifies the number of results to return after reranking. * **type** *(string) --* **[REQUIRED]** Specifies the type of reranking model to use. Currently, the only supported value is "BEDROCK_RERANKING_MODEL". * **lambdaFunction** *(dict) --* Contains configurations for a Lambda function node in your flow. Invokes an Lambda function. * **lambdaArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Lambda function to invoke. * **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) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Amazon Lex bot alias to invoke. * **localeId** *(string) --* **[REQUIRED]** The Region to invoke the Amazon Lex bot in. * **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. * **loopController** *(dict) --* Contains controller node configurations for a DoWhile loop in your flow. * **continueCondition** *(dict) --* **[REQUIRED]** Specifies the condition that determines when the flow exits the DoWhile loop. The loop executes until this condition evaluates to true. * **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. * **name** *(string) --* **[REQUIRED]** A name for the condition that you can reference. * **maxIterations** *(integer) --* Specifies the maximum number of times the DoWhile loop can iterate before the flow exits the loop. * **loopInput** *(dict) --* Contains input node configurations for a DoWhile loop in your flow. * **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. * **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. * **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. * **sourceConfiguration** *(dict) --* **[REQUIRED]** 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 can be set: "inline", "resource". * **inline** *(dict) --* Contains configurations for a prompt that is defined inline * **additionalModelRequestFields** (*document*) -- Additional fields to be included in the model request for the Prompt node. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "text". * **text** *(dict) --* Contains inference configurations for a text prompt. * **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) --* * **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. * **modelId** *(string) --* **[REQUIRED]** The unique identifier of the model or inference profile to run inference with. * **templateConfiguration** *(dict) --* **[REQUIRED]** 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 can be set: "chat", "text". * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **messages** *(list) --* **[REQUIRED]** 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. * **content** *(list) --* **[REQUIRED]** 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 can be set: "cachePoint", "text". * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* **[REQUIRED]** The role that the message belongs to. * **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 can be set: "cachePoint", "text". * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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 can be set: "any", "auto", "tool". * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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) --* **[REQUIRED]** The name of the tool. * **tools** *(list) --* **[REQUIRED]** 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 can be set: "cachePoint", "toolSpec". * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for the tool. * **description** *(string) --* The description of the tool. * **inputSchema** *(dict) --* **[REQUIRED]** The input schema for the tool. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "json". * **json** (*document*) -- A JSON object defining the input schema for the tool. * **name** *(string) --* **[REQUIRED]** The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a prompt. * **cachePoint** *(dict) --* A cache checkpoint within a template configuration. * **type** *(string) --* **[REQUIRED]** 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. * **text** *(string) --* **[REQUIRED]** The message for the prompt. * **templateType** *(string) --* **[REQUIRED]** The type of prompt template. * **resource** *(dict) --* Contains configurations for a prompt from Prompt management. * **promptArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the prompt from Prompt management. * **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) --* **[REQUIRED]** 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 can be set: "s3". * **s3** *(dict) --* Contains configurations for the Amazon S3 location from which to retrieve data to return as the output from the node. * **bucketName** *(string) --* **[REQUIRED]** The name of the Amazon S3 bucket from which to retrieve data. * **storage** *(dict) --* Contains configurations for a storage node in your flow. Stores an input in an Amazon S3 location. * **serviceConfiguration** *(dict) --* **[REQUIRED]** 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 can be set: "s3". * **s3** *(dict) --* Contains configurations for the Amazon S3 location in which to store the input into the node. * **bucketName** *(string) --* **[REQUIRED]** The name of the Amazon S3 bucket in which to store the input into the node. * **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. * **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. * **expression** *(string) --* **[REQUIRED]** 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. * **name** *(string) --* **[REQUIRED]** Specifies a name for the input that you can reference. * **type** *(string) --* **[REQUIRED]** Specifies the data type of the input. If the input doesn't match this type at runtime, a validation error will be thrown. * **name** *(string) --* **[REQUIRED]** A name for the node. * **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) --* **[REQUIRED]** A name for the output that you can reference. * **type** *(string) --* **[REQUIRED]** The data type of the output. If the output doesn't match this type at runtime, a validation error will be thrown. * **type** *(string) --* **[REQUIRED]** 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. * **description** (*string*) -- A description for the flow. * **executionRoleArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see Create a service role for flows in Amazon Bedrock in the Amazon Bedrock User Guide. * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow. * **name** (*string*) -- **[REQUIRED]** A name for the flow. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'customerEncryptionKeyArn': 'string', 'definition': { 'connections': [ { 'configuration': { 'conditional': { 'condition': 'string' }, 'data': { 'sourceOutput': 'string', 'targetInput': 'string' } }, 'name': 'string', 'source': 'string', 'target': 'string', 'type': 'Data'|'Conditional' }, ], 'nodes': [ { 'configuration': { 'agent': { 'agentAliasArn': 'string' }, 'collector': {}, 'condition': { 'conditions': [ { 'expression': 'string', 'name': 'string' }, ] }, 'inlineCode': { 'code': 'string', 'language': 'Python_3' }, 'input': {}, 'iterator': {}, 'knowledgeBase': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'knowledgeBaseId': 'string', 'modelId': 'string', 'numberOfResults': 123, 'orchestrationConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'inferenceConfig': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'performanceConfig': { 'latency': 'standard'|'optimized' }, 'promptTemplate': { 'textPromptTemplate': 'string' } }, 'promptTemplate': { 'textPromptTemplate': 'string' }, 'rerankingConfiguration': { 'bedrockRerankingConfiguration': { 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToExclude': [ { 'fieldName': 'string' }, ], 'fieldsToInclude': [ { 'fieldName': 'string' }, ] } }, 'modelConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'modelArn': 'string' }, 'numberOfRerankedResults': 123 }, 'type': 'BEDROCK_RERANKING_MODEL' } }, 'lambdaFunction': { 'lambdaArn': 'string' }, 'lex': { 'botAliasArn': 'string', 'localeId': 'string' }, 'loop': { 'definition': {'... recursive ...'} }, 'loopController': { 'continueCondition': { 'expression': 'string', 'name': 'string' }, 'maxIterations': 123 }, 'loopInput': {}, 'output': {}, 'prompt': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'sourceConfiguration': { 'inline': { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'modelId': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {}, 'auto': {}, 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, 'resource': { 'promptArn': 'string' } } }, 'retrieval': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } }, 'storage': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } } }, 'inputs': [ { 'category': 'LoopCondition'|'ReturnValueToLoopStart'|'ExitLoop', 'expression': 'string', 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'name': 'string', 'outputs': [ { 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'type': 'Input'|'Output'|'KnowledgeBase'|'Condition'|'Lex'|'Prompt'|'LambdaFunction'|'Storage'|'Agent'|'Retrieval'|'Iterator'|'Collector'|'InlineCode'|'Loop'|'LoopInput'|'LoopController' }, ] }, 'description': 'string', 'executionRoleArn': 'string', 'id': 'string', 'name': 'string', 'status': 'Failed'|'Prepared'|'Preparing'|'NotPrepared', 'updatedAt': datetime(2015, 1, 1), 'version': 'string' } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the flow. * **createdAt** *(datetime) --* The time at which the flow was created. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key that the flow was encrypted with. * **definition** *(dict) --* A definition of the nodes and the connections between nodes in the flow. * **connections** *(list) --* An array of connection definitions in the flow. * *(dict) --* Contains information about a connection between two nodes in the flow. * **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: "conditional", "data". 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'} * **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. * **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. * **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. * **type** *(string) --* Whether the source node that the connection begins from is a condition node ( "Conditional") or not ( "Data"). * **nodes** *(list) --* An array of node definitions in the flow. * *(dict) --* Contains configurations about a node in the flow. * **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: "agent", "collector", "condition", "inlineCode", "input", "iterator", "knowledgeBase", "lambdaFunction", "lex", "loop", "loopController", "loopInput", "output", "prompt", "retrieval", "storage". 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'} * **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. * **collector** *(dict) --* Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs. * **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. * **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. * **name** *(string) --* A name for the condition that you can reference. * **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. * **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. * **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. * **knowledgeBase** *(dict) --* Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response. * **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. * **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. * **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) --* * **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. * **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. * **numberOfResults** *(integer) --* The number of results to retrieve from the knowledge base. * **orchestrationConfiguration** *(dict) --* The configuration for orchestrating the retrieval and generation process in the knowledge base node. * **additionalModelRequestFields** *(dict) --* The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model. * *(string) --* * (*document*) -- * **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. * **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) --* * **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. * **performanceConfig** *(dict) --* The performance configuration options for the knowledge base retrieval and generation process. * **latency** *(string) --* The latency optimization setting. * **promptTemplate** *(dict) --* A custom prompt template for orchestrating the retrieval and generation process. * **textPromptTemplate** *(string) --* The text of the prompt template. * **promptTemplate** *(dict) --* A custom prompt template to use with the knowledge base for generating responses. * **textPromptTemplate** *(string) --* The text of the prompt template. * **rerankingConfiguration** *(dict) --* The configuration for reranking the retrieved results from the knowledge base to improve relevance. * **bedrockRerankingConfiguration** *(dict) --* Specifies the configuration for using an Amazon Bedrock reranker model to rerank retrieved results. * **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: "fieldsToExclude", "fieldsToInclude". 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'} * **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. * **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. * **modelConfiguration** *(dict) --* Specifies the configuration for 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*) -- * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Bedrock reranker model. * **numberOfRerankedResults** *(integer) --* Specifies the number of results to return after reranking. * **type** *(string) --* Specifies the type of reranking model to use. Currently, the only supported value is "BEDROCK_RERANKING_MODEL". * **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. * **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. * **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. * **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. * **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. * **name** *(string) --* A name for the condition that you can reference. * **maxIterations** *(integer) --* Specifies the maximum number of times the DoWhile loop can iterate before the flow exits the loop. * **loopInput** *(dict) --* Contains input node configurations for a DoWhile loop in your flow. * **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. * **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. * **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. * **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: "inline", "resource". 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'} * **inline** *(dict) --* Contains configurations for a prompt that is defined inline * **additionalModelRequestFields** (*document*) -- Additional fields to be included in the model request for the Prompt node. * **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. * **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) --* * **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. * **modelId** *(string) --* The unique identifier of the model or inference profile to run inference with. * **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: "chat", "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'} * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **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. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* The role that the message belongs to. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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: "any", "auto", "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'} * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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. * **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: "cachePoint", "toolSpec". 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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for 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. * **name** *(string) --* The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a 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. * **text** *(string) --* The message for the prompt. * **templateType** *(string) --* The type of prompt template. * **resource** *(dict) --* Contains configurations for a prompt from Prompt management. * **promptArn** *(string) --* The Amazon Resource Name (ARN) of the prompt from Prompt management. * **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. * **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. * **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. * **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. * **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. * **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. * **name** *(string) --* A name for the node. * **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. * **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. * **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. * **id** *(string) --* The unique identifier of the flow. * **name** *(string) --* The name of the flow. * **status** *(string) --* The status of the flow. When you submit this request, the status will be "NotPrepared". If updating fails, the status becomes "Failed". * **updatedAt** *(datetime) --* The time at which the flow was last updated. * **version** *(string) --* The version of the flow. When you update a flow, the version updated is the "DRAFT" version. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / get_flow_alias get_flow_alias ************** AgentsforBedrock.Client.get_flow_alias(**kwargs) Retrieves information about 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_alias( aliasIdentifier='string', flowIdentifier='string' ) Parameters: * **aliasIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the alias for which to retrieve information. * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow that the alias belongs to. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'concurrencyConfiguration': { 'maxConcurrency': 123, 'type': 'Automatic'|'Manual' }, 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'flowId': 'string', 'id': 'string', 'name': 'string', 'routingConfiguration': [ { 'flowVersion': 'string' }, ], 'updatedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the flow. * **concurrencyConfiguration** *(dict) --* The configuration that specifies how nodes in the flow are executed in parallel. * **maxConcurrency** *(integer) --* The maximum number of nodes that can be executed concurrently in the flow. * **type** *(string) --* The type of concurrency to use for parallel node execution. Specify one of the following options: * "Automatic" - Amazon Bedrock determines which nodes can be executed in parallel based on the flow definition and its dependencies. * "Manual" - You specify which nodes can be executed in parallel. * **createdAt** *(datetime) --* The time at which the flow was created. * **description** *(string) --* The description of the flow. * **flowId** *(string) --* The unique identifier of the flow that the alias belongs to. * **id** *(string) --* The unique identifier of the alias of the flow. * **name** *(string) --* The name of the alias. * **routingConfiguration** *(list) --* Contains information about the version that the alias is mapped to. * *(dict) --* Contains information about a version that the alias maps to. * **flowVersion** *(string) --* The version that the alias maps to. * **updatedAt** *(datetime) --* The time at which the alias was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / create_prompt_version create_prompt_version ********************* AgentsforBedrock.Client.create_prompt_version(**kwargs) Creates a static snapshot of your prompt that can be deployed to production. For more information, see Deploy prompts using Prompt management by creating versions in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.create_prompt_version( clientToken='string', description='string', promptIdentifier='string', tags={ 'string': 'string' } ) Parameters: * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **description** (*string*) -- A description for the version of the prompt. * **promptIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the prompt that you want to create a version of. * **tags** (*dict*) -- Any tags that you want to attach to the version of the prompt. For more information, see Tagging resources in Amazon Bedrock. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'customerEncryptionKeyArn': 'string', 'defaultVariant': 'string', 'description': 'string', 'id': 'string', 'name': 'string', 'updatedAt': datetime(2015, 1, 1), 'variants': [ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'genAiResource': { 'agent': { 'agentIdentifier': 'string' } }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'metadata': [ { 'key': 'string', 'value': 'string' }, ], 'modelId': 'string', 'name': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {}, 'auto': {}, 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, ], 'version': 'string' } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the version of the prompt. * **createdAt** *(datetime) --* The time at which the prompt was created. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key to encrypt the version of the prompt. * **defaultVariant** *(string) --* The name of the default variant for the prompt. This value must match the "name" field in the relevant PromptVariant object. * **description** *(string) --* A description for the version. * **id** *(string) --* The unique identifier of the prompt. * **name** *(string) --* The name of the prompt. * **updatedAt** *(datetime) --* The time at which the prompt was last updated. * **variants** *(list) --* A list of objects, each containing details about a variant of the prompt. * *(dict) --* Contains details about a variant of the prompt. * **additionalModelRequestFields** (*document*) -- Contains model-specific inference configurations that aren't in the "inferenceConfiguration" field. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models. * **genAiResource** *(dict) --* Specifies a generative AI resource with which to use the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "agent". 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'} * **agent** *(dict) --* Specifies an Amazon Bedrock agent with which to use the prompt. * **agentIdentifier** *(string) --* The ARN of the agent with which to use the prompt. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt variant. 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. * **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) --* * **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. * **metadata** *(list) --* An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant. * *(dict) --* Contains a key-value pair that defines a metadata tag and value to attach to a prompt variant. For more information, see Create a prompt using Prompt management. * **key** *(string) --* The key of a metadata tag for a prompt variant. * **value** *(string) --* The value of a metadata tag for a prompt variant. * **modelId** *(string) --* The unique identifier of the model or inference profile with which to run inference on the prompt. * **name** *(string) --* The name of the prompt variant. * **templateConfiguration** *(dict) --* Contains configurations for the prompt template. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "chat", "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'} * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **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. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* The role that the message belongs to. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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: "any", "auto", "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'} * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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. * **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: "cachePoint", "toolSpec". 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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for 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. * **name** *(string) --* The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a 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. * **text** *(string) --* The message for the prompt. * **templateType** *(string) --* The type of prompt template to use. * **version** *(string) --* The version of the prompt that was created. Versions are numbered incrementally, starting from 1. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / associate_agent_collaborator associate_agent_collaborator **************************** AgentsforBedrock.Client.associate_agent_collaborator(**kwargs) Makes an agent a collaborator for another agent. See also: AWS API Documentation **Request Syntax** response = client.associate_agent_collaborator( agentDescriptor={ 'aliasArn': 'string' }, agentId='string', agentVersion='string', clientToken='string', collaborationInstruction='string', collaboratorName='string', relayConversationHistory='TO_COLLABORATOR'|'DISABLED' ) Parameters: * **agentDescriptor** (*dict*) -- **[REQUIRED]** The alias of the collaborator agent. * **aliasArn** *(string) --* The agent's alias ARN. * **agentId** (*string*) -- **[REQUIRED]** The agent's ID. * **agentVersion** (*string*) -- **[REQUIRED]** An agent version. * **clientToken** (*string*) -- A client token. This field is autopopulated if not provided. * **collaborationInstruction** (*string*) -- **[REQUIRED]** Instruction for the collaborator. * **collaboratorName** (*string*) -- **[REQUIRED]** A name for the collaborator. * **relayConversationHistory** (*string*) -- A relay conversation history for the collaborator. Return type: dict Returns: **Response Syntax** { 'agentCollaborator': { 'agentDescriptor': { 'aliasArn': 'string' }, 'agentId': 'string', 'agentVersion': 'string', 'clientToken': 'string', 'collaborationInstruction': 'string', 'collaboratorId': 'string', 'collaboratorName': 'string', 'createdAt': datetime(2015, 1, 1), 'lastUpdatedAt': datetime(2015, 1, 1), 'relayConversationHistory': 'TO_COLLABORATOR'|'DISABLED' } } **Response Structure** * *(dict) --* * **agentCollaborator** *(dict) --* Details about the collaborator. * **agentDescriptor** *(dict) --* The collaborator's agent descriptor. * **aliasArn** *(string) --* The agent's alias ARN. * **agentId** *(string) --* The collaborator's agent ID. * **agentVersion** *(string) --* The collaborator's agent version. * **clientToken** *(string) --* The collaborator's client token. * **collaborationInstruction** *(string) --* The collaborator's instructions. * **collaboratorId** *(string) --* The collaborator's collaborator ID. * **collaboratorName** *(string) --* The collaborator's collaborator name. * **createdAt** *(datetime) --* When the collaborator was created. * **lastUpdatedAt** *(datetime) --* When the collaborator was updated. * **relayConversationHistory** *(string) --* The collaborator's relay conversation history. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / get_prompt get_prompt ********** AgentsforBedrock.Client.get_prompt(**kwargs) Retrieves information about the working draft ( "DRAFT" version) of a prompt or a version of it, depending on whether you include the "promptVersion" field or not. For more information, see View information about prompts using Prompt management and View information about a version of your prompt in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.get_prompt( promptIdentifier='string', promptVersion='string' ) Parameters: * **promptIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the prompt. * **promptVersion** (*string*) -- The version of the prompt about which you want to retrieve information. Omit this field to return information about the working draft of the prompt. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'customerEncryptionKeyArn': 'string', 'defaultVariant': 'string', 'description': 'string', 'id': 'string', 'name': 'string', 'updatedAt': datetime(2015, 1, 1), 'variants': [ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'genAiResource': { 'agent': { 'agentIdentifier': 'string' } }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'metadata': [ { 'key': 'string', 'value': 'string' }, ], 'modelId': 'string', 'name': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {}, 'auto': {}, 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, ], 'version': 'string' } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the prompt or the prompt version (if you specified a version in the request). * **createdAt** *(datetime) --* The time at which the prompt was created. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key that the prompt is encrypted with. * **defaultVariant** *(string) --* The name of the default variant for the prompt. This value must match the "name" field in the relevant PromptVariant object. * **description** *(string) --* The descriptino of the prompt. * **id** *(string) --* The unique identifier of the prompt. * **name** *(string) --* The name of the prompt. * **updatedAt** *(datetime) --* The time at which the prompt was last updated. * **variants** *(list) --* A list of objects, each containing details about a variant of the prompt. * *(dict) --* Contains details about a variant of the prompt. * **additionalModelRequestFields** (*document*) -- Contains model-specific inference configurations that aren't in the "inferenceConfiguration" field. To see model-specific inference parameters, see Inference request parameters and response fields for foundation models. * **genAiResource** *(dict) --* Specifies a generative AI resource with which to use the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "agent". 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'} * **agent** *(dict) --* Specifies an Amazon Bedrock agent with which to use the prompt. * **agentIdentifier** *(string) --* The ARN of the agent with which to use the prompt. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt variant. 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. * **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) --* * **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. * **metadata** *(list) --* An array of objects, each containing a key-value pair that defines a metadata tag and value to attach to a prompt variant. * *(dict) --* Contains a key-value pair that defines a metadata tag and value to attach to a prompt variant. For more information, see Create a prompt using Prompt management. * **key** *(string) --* The key of a metadata tag for a prompt variant. * **value** *(string) --* The value of a metadata tag for a prompt variant. * **modelId** *(string) --* The unique identifier of the model or inference profile with which to run inference on the prompt. * **name** *(string) --* The name of the prompt variant. * **templateConfiguration** *(dict) --* Contains configurations for the prompt template. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "chat", "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'} * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **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. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* The role that the message belongs to. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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: "any", "auto", "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'} * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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. * **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: "cachePoint", "toolSpec". 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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for 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. * **name** *(string) --* The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a 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. * **text** *(string) --* The message for the prompt. * **templateType** *(string) --* The type of prompt template to use. * **version** *(string) --* The version of the prompt. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / create_flow create_flow *********** AgentsforBedrock.Client.create_flow(**kwargs) Creates a prompt flow that you can use to send an input through various steps to yield an output. Configure nodes, each of which corresponds to a step of the flow, and create connections between the nodes to create paths to different outputs. For more information, see How it works and Create a flow in Amazon Bedrock in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.create_flow( clientToken='string', customerEncryptionKeyArn='string', definition={ 'connections': [ { 'configuration': { 'conditional': { 'condition': 'string' }, 'data': { 'sourceOutput': 'string', 'targetInput': 'string' } }, 'name': 'string', 'source': 'string', 'target': 'string', 'type': 'Data'|'Conditional' }, ], 'nodes': [ { 'configuration': { 'agent': { 'agentAliasArn': 'string' }, 'collector': {} , 'condition': { 'conditions': [ { 'expression': 'string', 'name': 'string' }, ] }, 'inlineCode': { 'code': 'string', 'language': 'Python_3' }, 'input': {} , 'iterator': {} , 'knowledgeBase': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'knowledgeBaseId': 'string', 'modelId': 'string', 'numberOfResults': 123, 'orchestrationConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'inferenceConfig': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'performanceConfig': { 'latency': 'standard'|'optimized' }, 'promptTemplate': { 'textPromptTemplate': 'string' } }, 'promptTemplate': { 'textPromptTemplate': 'string' }, 'rerankingConfiguration': { 'bedrockRerankingConfiguration': { 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToExclude': [ { 'fieldName': 'string' }, ], 'fieldsToInclude': [ { 'fieldName': 'string' }, ] } }, 'modelConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'modelArn': 'string' }, 'numberOfRerankedResults': 123 }, 'type': 'BEDROCK_RERANKING_MODEL' } }, 'lambdaFunction': { 'lambdaArn': 'string' }, 'lex': { 'botAliasArn': 'string', 'localeId': 'string' }, 'loop': { 'definition': {'... recursive ...'} }, 'loopController': { 'continueCondition': { 'expression': 'string', 'name': 'string' }, 'maxIterations': 123 }, 'loopInput': {} , 'output': {} , 'prompt': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'sourceConfiguration': { 'inline': { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'modelId': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {} , 'auto': {} , 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, 'resource': { 'promptArn': 'string' } } }, 'retrieval': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } }, 'storage': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } } }, 'inputs': [ { 'category': 'LoopCondition'|'ReturnValueToLoopStart'|'ExitLoop', 'expression': 'string', 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'name': 'string', 'outputs': [ { 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'type': 'Input'|'Output'|'KnowledgeBase'|'Condition'|'Lex'|'Prompt'|'LambdaFunction'|'Storage'|'Agent'|'Retrieval'|'Iterator'|'Collector'|'InlineCode'|'Loop'|'LoopInput'|'LoopController' }, ] }, description='string', executionRoleArn='string', name='string', tags={ 'string': 'string' } ) Parameters: * **clientToken** (*string*) -- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. This field is autopopulated if not provided. * **customerEncryptionKeyArn** (*string*) -- The Amazon Resource Name (ARN) of the KMS key to encrypt the flow. * **definition** (*dict*) -- A definition of the nodes and connections between nodes in the flow. * **connections** *(list) --* An array of connection definitions in the flow. * *(dict) --* Contains information about a connection between two nodes in the flow. * **configuration** *(dict) --* The configuration of the connection. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "conditional", "data". * **conditional** *(dict) --* The configuration of a connection originating from a Condition node. * **condition** *(string) --* **[REQUIRED]** 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. * **data** *(dict) --* The configuration of a connection originating from a node that isn't a Condition node. * **sourceOutput** *(string) --* **[REQUIRED]** The name of the output in the source node that the connection begins from. * **targetInput** *(string) --* **[REQUIRED]** The name of the input in the target node that the connection ends at. * **name** *(string) --* **[REQUIRED]** A name for the connection that you can reference. * **source** *(string) --* **[REQUIRED]** The node that the connection starts at. * **target** *(string) --* **[REQUIRED]** The node that the connection ends at. * **type** *(string) --* **[REQUIRED]** Whether the source node that the connection begins from is a condition node ( "Conditional") or not ( "Data"). * **nodes** *(list) --* An array of node definitions in the flow. * *(dict) --* Contains configurations about a node in the flow. * **configuration** *(dict) --* Contains configurations for the node. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "agent", "collector", "condition", "inlineCode", "input", "iterator", "knowledgeBase", "lambdaFunction", "lex", "loop", "loopController", "loopInput", "output", "prompt", "retrieval", "storage". * **agent** *(dict) --* Contains configurations for an agent node in your flow. Invokes an alias of an agent and returns the response. * **agentAliasArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the alias of the agent to invoke. * **collector** *(dict) --* Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs. * **condition** *(dict) --* Contains configurations for a condition node in your flow. Defines conditions that lead to different branches of the flow. * **conditions** *(list) --* **[REQUIRED]** 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. * **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. * **name** *(string) --* **[REQUIRED]** A name for the condition that you can reference. * **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) --* **[REQUIRED]** 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) --* **[REQUIRED]** 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. * **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. * **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. * **knowledgeBase** *(dict) --* Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response. * **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. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "text". * **text** *(dict) --* Contains inference configurations for a text prompt. * **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) --* * **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. * **knowledgeBaseId** *(string) --* **[REQUIRED]** 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. * **numberOfResults** *(integer) --* The number of results to retrieve from the knowledge base. * **orchestrationConfiguration** *(dict) --* The configuration for orchestrating the retrieval and generation process in the knowledge base node. * **additionalModelRequestFields** *(dict) --* The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model. * *(string) --* * (*document*) -- * **inferenceConfig** *(dict) --* Contains inference configurations for the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "text". * **text** *(dict) --* Contains inference configurations for a text prompt. * **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) --* * **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. * **performanceConfig** *(dict) --* The performance configuration options for the knowledge base retrieval and generation process. * **latency** *(string) --* The latency optimization setting. * **promptTemplate** *(dict) --* A custom prompt template for orchestrating the retrieval and generation process. * **textPromptTemplate** *(string) --* The text of the prompt template. * **promptTemplate** *(dict) --* A custom prompt template to use with the knowledge base for generating responses. * **textPromptTemplate** *(string) --* The text of the prompt template. * **rerankingConfiguration** *(dict) --* The configuration for reranking the retrieved results from the knowledge base to improve relevance. * **bedrockRerankingConfiguration** *(dict) --* Specifies the configuration for using an Amazon Bedrock reranker model to rerank retrieved results. * **metadataConfiguration** *(dict) --* Specifies how metadata fields should be handled during the reranking process. * **selectionMode** *(string) --* **[REQUIRED]** 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 can be set: "fieldsToExclude", "fieldsToInclude". * **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) --* **[REQUIRED]** The name of the metadata field to include or exclude during reranking. * **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) --* **[REQUIRED]** The name of the metadata field to include or exclude during reranking. * **modelConfiguration** *(dict) --* **[REQUIRED]** Specifies the configuration for 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*) -- * **modelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Amazon Bedrock reranker model. * **numberOfRerankedResults** *(integer) --* Specifies the number of results to return after reranking. * **type** *(string) --* **[REQUIRED]** Specifies the type of reranking model to use. Currently, the only supported value is "BEDROCK_RERANKING_MODEL". * **lambdaFunction** *(dict) --* Contains configurations for a Lambda function node in your flow. Invokes an Lambda function. * **lambdaArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Lambda function to invoke. * **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) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Amazon Lex bot alias to invoke. * **localeId** *(string) --* **[REQUIRED]** The Region to invoke the Amazon Lex bot in. * **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. * **loopController** *(dict) --* Contains controller node configurations for a DoWhile loop in your flow. * **continueCondition** *(dict) --* **[REQUIRED]** Specifies the condition that determines when the flow exits the DoWhile loop. The loop executes until this condition evaluates to true. * **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. * **name** *(string) --* **[REQUIRED]** A name for the condition that you can reference. * **maxIterations** *(integer) --* Specifies the maximum number of times the DoWhile loop can iterate before the flow exits the loop. * **loopInput** *(dict) --* Contains input node configurations for a DoWhile loop in your flow. * **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. * **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. * **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. * **sourceConfiguration** *(dict) --* **[REQUIRED]** 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 can be set: "inline", "resource". * **inline** *(dict) --* Contains configurations for a prompt that is defined inline * **additionalModelRequestFields** (*document*) -- Additional fields to be included in the model request for the Prompt node. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "text". * **text** *(dict) --* Contains inference configurations for a text prompt. * **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) --* * **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. * **modelId** *(string) --* **[REQUIRED]** The unique identifier of the model or inference profile to run inference with. * **templateConfiguration** *(dict) --* **[REQUIRED]** 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 can be set: "chat", "text". * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **messages** *(list) --* **[REQUIRED]** 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. * **content** *(list) --* **[REQUIRED]** 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 can be set: "cachePoint", "text". * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* **[REQUIRED]** The role that the message belongs to. * **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 can be set: "cachePoint", "text". * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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 can be set: "any", "auto", "tool". * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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) --* **[REQUIRED]** The name of the tool. * **tools** *(list) --* **[REQUIRED]** 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 can be set: "cachePoint", "toolSpec". * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for the tool. * **description** *(string) --* The description of the tool. * **inputSchema** *(dict) --* **[REQUIRED]** The input schema for the tool. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "json". * **json** (*document*) -- A JSON object defining the input schema for the tool. * **name** *(string) --* **[REQUIRED]** The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a prompt. * **cachePoint** *(dict) --* A cache checkpoint within a template configuration. * **type** *(string) --* **[REQUIRED]** 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. * **text** *(string) --* **[REQUIRED]** The message for the prompt. * **templateType** *(string) --* **[REQUIRED]** The type of prompt template. * **resource** *(dict) --* Contains configurations for a prompt from Prompt management. * **promptArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the prompt from Prompt management. * **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) --* **[REQUIRED]** 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 can be set: "s3". * **s3** *(dict) --* Contains configurations for the Amazon S3 location from which to retrieve data to return as the output from the node. * **bucketName** *(string) --* **[REQUIRED]** The name of the Amazon S3 bucket from which to retrieve data. * **storage** *(dict) --* Contains configurations for a storage node in your flow. Stores an input in an Amazon S3 location. * **serviceConfiguration** *(dict) --* **[REQUIRED]** 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 can be set: "s3". * **s3** *(dict) --* Contains configurations for the Amazon S3 location in which to store the input into the node. * **bucketName** *(string) --* **[REQUIRED]** The name of the Amazon S3 bucket in which to store the input into the node. * **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. * **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. * **expression** *(string) --* **[REQUIRED]** 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. * **name** *(string) --* **[REQUIRED]** Specifies a name for the input that you can reference. * **type** *(string) --* **[REQUIRED]** Specifies the data type of the input. If the input doesn't match this type at runtime, a validation error will be thrown. * **name** *(string) --* **[REQUIRED]** A name for the node. * **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) --* **[REQUIRED]** A name for the output that you can reference. * **type** *(string) --* **[REQUIRED]** The data type of the output. If the output doesn't match this type at runtime, a validation error will be thrown. * **type** *(string) --* **[REQUIRED]** 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. * **description** (*string*) -- A description for the flow. * **executionRoleArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see Create a service role for flows in Amazon Bedrock in the Amazon Bedrock User Guide. * **name** (*string*) -- **[REQUIRED]** A name for the flow. * **tags** (*dict*) -- Any tags that you want to attach to the flow. For more information, see Tagging resources in Amazon Bedrock. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'customerEncryptionKeyArn': 'string', 'definition': { 'connections': [ { 'configuration': { 'conditional': { 'condition': 'string' }, 'data': { 'sourceOutput': 'string', 'targetInput': 'string' } }, 'name': 'string', 'source': 'string', 'target': 'string', 'type': 'Data'|'Conditional' }, ], 'nodes': [ { 'configuration': { 'agent': { 'agentAliasArn': 'string' }, 'collector': {}, 'condition': { 'conditions': [ { 'expression': 'string', 'name': 'string' }, ] }, 'inlineCode': { 'code': 'string', 'language': 'Python_3' }, 'input': {}, 'iterator': {}, 'knowledgeBase': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'knowledgeBaseId': 'string', 'modelId': 'string', 'numberOfResults': 123, 'orchestrationConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'inferenceConfig': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'performanceConfig': { 'latency': 'standard'|'optimized' }, 'promptTemplate': { 'textPromptTemplate': 'string' } }, 'promptTemplate': { 'textPromptTemplate': 'string' }, 'rerankingConfiguration': { 'bedrockRerankingConfiguration': { 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToExclude': [ { 'fieldName': 'string' }, ], 'fieldsToInclude': [ { 'fieldName': 'string' }, ] } }, 'modelConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'modelArn': 'string' }, 'numberOfRerankedResults': 123 }, 'type': 'BEDROCK_RERANKING_MODEL' } }, 'lambdaFunction': { 'lambdaArn': 'string' }, 'lex': { 'botAliasArn': 'string', 'localeId': 'string' }, 'loop': { 'definition': {'... recursive ...'} }, 'loopController': { 'continueCondition': { 'expression': 'string', 'name': 'string' }, 'maxIterations': 123 }, 'loopInput': {}, 'output': {}, 'prompt': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'sourceConfiguration': { 'inline': { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'modelId': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {}, 'auto': {}, 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, 'resource': { 'promptArn': 'string' } } }, 'retrieval': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } }, 'storage': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } } }, 'inputs': [ { 'category': 'LoopCondition'|'ReturnValueToLoopStart'|'ExitLoop', 'expression': 'string', 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'name': 'string', 'outputs': [ { 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'type': 'Input'|'Output'|'KnowledgeBase'|'Condition'|'Lex'|'Prompt'|'LambdaFunction'|'Storage'|'Agent'|'Retrieval'|'Iterator'|'Collector'|'InlineCode'|'Loop'|'LoopInput'|'LoopController' }, ] }, 'description': 'string', 'executionRoleArn': 'string', 'id': 'string', 'name': 'string', 'status': 'Failed'|'Prepared'|'Preparing'|'NotPrepared', 'updatedAt': datetime(2015, 1, 1), 'version': 'string' } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the flow. * **createdAt** *(datetime) --* The time at which the flow was created. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key that you encrypted the flow with. * **definition** *(dict) --* A definition of the nodes and connections between nodes in the flow. * **connections** *(list) --* An array of connection definitions in the flow. * *(dict) --* Contains information about a connection between two nodes in the flow. * **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: "conditional", "data". 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'} * **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. * **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. * **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. * **type** *(string) --* Whether the source node that the connection begins from is a condition node ( "Conditional") or not ( "Data"). * **nodes** *(list) --* An array of node definitions in the flow. * *(dict) --* Contains configurations about a node in the flow. * **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: "agent", "collector", "condition", "inlineCode", "input", "iterator", "knowledgeBase", "lambdaFunction", "lex", "loop", "loopController", "loopInput", "output", "prompt", "retrieval", "storage". 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'} * **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. * **collector** *(dict) --* Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs. * **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. * **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. * **name** *(string) --* A name for the condition that you can reference. * **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. * **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. * **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. * **knowledgeBase** *(dict) --* Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response. * **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. * **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. * **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) --* * **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. * **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. * **numberOfResults** *(integer) --* The number of results to retrieve from the knowledge base. * **orchestrationConfiguration** *(dict) --* The configuration for orchestrating the retrieval and generation process in the knowledge base node. * **additionalModelRequestFields** *(dict) --* The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model. * *(string) --* * (*document*) -- * **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. * **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) --* * **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. * **performanceConfig** *(dict) --* The performance configuration options for the knowledge base retrieval and generation process. * **latency** *(string) --* The latency optimization setting. * **promptTemplate** *(dict) --* A custom prompt template for orchestrating the retrieval and generation process. * **textPromptTemplate** *(string) --* The text of the prompt template. * **promptTemplate** *(dict) --* A custom prompt template to use with the knowledge base for generating responses. * **textPromptTemplate** *(string) --* The text of the prompt template. * **rerankingConfiguration** *(dict) --* The configuration for reranking the retrieved results from the knowledge base to improve relevance. * **bedrockRerankingConfiguration** *(dict) --* Specifies the configuration for using an Amazon Bedrock reranker model to rerank retrieved results. * **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: "fieldsToExclude", "fieldsToInclude". 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'} * **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. * **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. * **modelConfiguration** *(dict) --* Specifies the configuration for 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*) -- * **modelArn** *(string) --* The Amazon Resource Name (ARN) of the Amazon Bedrock reranker model. * **numberOfRerankedResults** *(integer) --* Specifies the number of results to return after reranking. * **type** *(string) --* Specifies the type of reranking model to use. Currently, the only supported value is "BEDROCK_RERANKING_MODEL". * **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. * **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. * **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. * **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. * **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. * **name** *(string) --* A name for the condition that you can reference. * **maxIterations** *(integer) --* Specifies the maximum number of times the DoWhile loop can iterate before the flow exits the loop. * **loopInput** *(dict) --* Contains input node configurations for a DoWhile loop in your flow. * **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. * **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. * **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. * **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: "inline", "resource". 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'} * **inline** *(dict) --* Contains configurations for a prompt that is defined inline * **additionalModelRequestFields** (*document*) -- Additional fields to be included in the model request for the Prompt node. * **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. * **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) --* * **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. * **modelId** *(string) --* The unique identifier of the model or inference profile to run inference with. * **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: "chat", "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'} * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **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. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* The role that the message belongs to. * **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: "cachePoint", "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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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: "any", "auto", "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'} * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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. * **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: "cachePoint", "toolSpec". 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'} * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for 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. * **name** *(string) --* The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a 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. * **text** *(string) --* The message for the prompt. * **templateType** *(string) --* The type of prompt template. * **resource** *(dict) --* Contains configurations for a prompt from Prompt management. * **promptArn** *(string) --* The Amazon Resource Name (ARN) of the prompt from Prompt management. * **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. * **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. * **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. * **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. * **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. * **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. * **name** *(string) --* A name for the node. * **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. * **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. * **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. * **id** *(string) --* The unique identifier of the flow. * **name** *(string) --* The name of the flow. * **status** *(string) --* The status of the flow. When you submit this request, the status will be "NotPrepared". If creation fails, the status becomes "Failed". * **updatedAt** *(datetime) --* The time at which the flow was last updated. * **version** *(string) --* The version of the flow. When you create a flow, the version created is the "DRAFT" version. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / get_agent_knowledge_base get_agent_knowledge_base ************************ AgentsforBedrock.Client.get_agent_knowledge_base(**kwargs) Gets information about a knowledge base associated with an agent. See also: AWS API Documentation **Request Syntax** response = client.get_agent_knowledge_base( agentId='string', agentVersion='string', knowledgeBaseId='string' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent with which the knowledge base is associated. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent with which the knowledge base is associated. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base associated with the agent. Return type: dict Returns: **Response Syntax** { 'agentKnowledgeBase': { 'agentId': 'string', 'agentVersion': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'knowledgeBaseId': 'string', 'knowledgeBaseState': 'ENABLED'|'DISABLED', 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agentKnowledgeBase** *(dict) --* Contains details about a knowledge base attached to an agent. * **agentId** *(string) --* The unique identifier of the agent with which the knowledge base is associated. * **agentVersion** *(string) --* The version of the agent with which the knowledge base is associated. * **createdAt** *(datetime) --* The time at which the association between the agent and the knowledge base was created. * **description** *(string) --* The description of the association between the agent and the knowledge base. * **knowledgeBaseId** *(string) --* The unique identifier of the association between the agent and the knowledge base. * **knowledgeBaseState** *(string) --* Specifies whether to use the knowledge base or not when sending an InvokeAgent request. * **updatedAt** *(datetime) --* The time at which the association between the agent and the knowledge base was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / validate_flow_definition validate_flow_definition ************************ AgentsforBedrock.Client.validate_flow_definition(**kwargs) Validates the definition of a flow. See also: AWS API Documentation **Request Syntax** response = client.validate_flow_definition( definition={ 'connections': [ { 'configuration': { 'conditional': { 'condition': 'string' }, 'data': { 'sourceOutput': 'string', 'targetInput': 'string' } }, 'name': 'string', 'source': 'string', 'target': 'string', 'type': 'Data'|'Conditional' }, ], 'nodes': [ { 'configuration': { 'agent': { 'agentAliasArn': 'string' }, 'collector': {} , 'condition': { 'conditions': [ { 'expression': 'string', 'name': 'string' }, ] }, 'inlineCode': { 'code': 'string', 'language': 'Python_3' }, 'input': {} , 'iterator': {} , 'knowledgeBase': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'knowledgeBaseId': 'string', 'modelId': 'string', 'numberOfResults': 123, 'orchestrationConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'inferenceConfig': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'performanceConfig': { 'latency': 'standard'|'optimized' }, 'promptTemplate': { 'textPromptTemplate': 'string' } }, 'promptTemplate': { 'textPromptTemplate': 'string' }, 'rerankingConfiguration': { 'bedrockRerankingConfiguration': { 'metadataConfiguration': { 'selectionMode': 'SELECTIVE'|'ALL', 'selectiveModeConfiguration': { 'fieldsToExclude': [ { 'fieldName': 'string' }, ], 'fieldsToInclude': [ { 'fieldName': 'string' }, ] } }, 'modelConfiguration': { 'additionalModelRequestFields': { 'string': {...}|[...]|123|123.4|'string'|True|None }, 'modelArn': 'string' }, 'numberOfRerankedResults': 123 }, 'type': 'BEDROCK_RERANKING_MODEL' } }, 'lambdaFunction': { 'lambdaArn': 'string' }, 'lex': { 'botAliasArn': 'string', 'localeId': 'string' }, 'loop': { 'definition': {'... recursive ...'} }, 'loopController': { 'continueCondition': { 'expression': 'string', 'name': 'string' }, 'maxIterations': 123 }, 'loopInput': {} , 'output': {} , 'prompt': { 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'sourceConfiguration': { 'inline': { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'inferenceConfiguration': { 'text': { 'maxTokens': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topP': ... } }, 'modelId': 'string', 'templateConfiguration': { 'chat': { 'inputVariables': [ { 'name': 'string' }, ], 'messages': [ { 'content': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'role': 'user'|'assistant' }, ], 'system': [ { 'cachePoint': { 'type': 'default' }, 'text': 'string' }, ], 'toolConfiguration': { 'toolChoice': { 'any': {} , 'auto': {} , 'tool': { 'name': 'string' } }, 'tools': [ { 'cachePoint': { 'type': 'default' }, 'toolSpec': { 'description': 'string', 'inputSchema': { 'json': {...}|[...]|123|123.4|'string'|True|None }, 'name': 'string' } }, ] } }, 'text': { 'cachePoint': { 'type': 'default' }, 'inputVariables': [ { 'name': 'string' }, ], 'text': 'string' } }, 'templateType': 'TEXT'|'CHAT' }, 'resource': { 'promptArn': 'string' } } }, 'retrieval': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } }, 'storage': { 'serviceConfiguration': { 's3': { 'bucketName': 'string' } } } }, 'inputs': [ { 'category': 'LoopCondition'|'ReturnValueToLoopStart'|'ExitLoop', 'expression': 'string', 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'name': 'string', 'outputs': [ { 'name': 'string', 'type': 'String'|'Number'|'Boolean'|'Object'|'Array' }, ], 'type': 'Input'|'Output'|'KnowledgeBase'|'Condition'|'Lex'|'Prompt'|'LambdaFunction'|'Storage'|'Agent'|'Retrieval'|'Iterator'|'Collector'|'InlineCode'|'Loop'|'LoopInput'|'LoopController' }, ] } ) Parameters: **definition** (*dict*) -- **[REQUIRED]** The definition of a flow to validate. * **connections** *(list) --* An array of connection definitions in the flow. * *(dict) --* Contains information about a connection between two nodes in the flow. * **configuration** *(dict) --* The configuration of the connection. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "conditional", "data". * **conditional** *(dict) --* The configuration of a connection originating from a Condition node. * **condition** *(string) --* **[REQUIRED]** 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. * **data** *(dict) --* The configuration of a connection originating from a node that isn't a Condition node. * **sourceOutput** *(string) --* **[REQUIRED]** The name of the output in the source node that the connection begins from. * **targetInput** *(string) --* **[REQUIRED]** The name of the input in the target node that the connection ends at. * **name** *(string) --* **[REQUIRED]** A name for the connection that you can reference. * **source** *(string) --* **[REQUIRED]** The node that the connection starts at. * **target** *(string) --* **[REQUIRED]** The node that the connection ends at. * **type** *(string) --* **[REQUIRED]** Whether the source node that the connection begins from is a condition node ( "Conditional") or not ( "Data"). * **nodes** *(list) --* An array of node definitions in the flow. * *(dict) --* Contains configurations about a node in the flow. * **configuration** *(dict) --* Contains configurations for the node. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "agent", "collector", "condition", "inlineCode", "input", "iterator", "knowledgeBase", "lambdaFunction", "lex", "loop", "loopController", "loopInput", "output", "prompt", "retrieval", "storage". * **agent** *(dict) --* Contains configurations for an agent node in your flow. Invokes an alias of an agent and returns the response. * **agentAliasArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the alias of the agent to invoke. * **collector** *(dict) --* Contains configurations for a collector node in your flow. Collects an iteration of inputs and consolidates them into an array of outputs. * **condition** *(dict) --* Contains configurations for a condition node in your flow. Defines conditions that lead to different branches of the flow. * **conditions** *(list) --* **[REQUIRED]** 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. * **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. * **name** *(string) --* **[REQUIRED]** A name for the condition that you can reference. * **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) --* **[REQUIRED]** 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) --* **[REQUIRED]** 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. * **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. * **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. * **knowledgeBase** *(dict) --* Contains configurations for a knowledge base node in your flow. Queries a knowledge base and returns the retrieved results or generated response. * **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. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "text". * **text** *(dict) --* Contains inference configurations for a text prompt. * **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) --* * **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. * **knowledgeBaseId** *(string) --* **[REQUIRED]** 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. * **numberOfResults** *(integer) --* The number of results to retrieve from the knowledge base. * **orchestrationConfiguration** *(dict) --* The configuration for orchestrating the retrieval and generation process in the knowledge base node. * **additionalModelRequestFields** *(dict) --* The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model. * *(string) --* * (*document*) -- * **inferenceConfig** *(dict) --* Contains inference configurations for the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "text". * **text** *(dict) --* Contains inference configurations for a text prompt. * **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) --* * **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. * **performanceConfig** *(dict) --* The performance configuration options for the knowledge base retrieval and generation process. * **latency** *(string) --* The latency optimization setting. * **promptTemplate** *(dict) --* A custom prompt template for orchestrating the retrieval and generation process. * **textPromptTemplate** *(string) --* The text of the prompt template. * **promptTemplate** *(dict) --* A custom prompt template to use with the knowledge base for generating responses. * **textPromptTemplate** *(string) --* The text of the prompt template. * **rerankingConfiguration** *(dict) --* The configuration for reranking the retrieved results from the knowledge base to improve relevance. * **bedrockRerankingConfiguration** *(dict) --* Specifies the configuration for using an Amazon Bedrock reranker model to rerank retrieved results. * **metadataConfiguration** *(dict) --* Specifies how metadata fields should be handled during the reranking process. * **selectionMode** *(string) --* **[REQUIRED]** 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 can be set: "fieldsToExclude", "fieldsToInclude". * **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) --* **[REQUIRED]** The name of the metadata field to include or exclude during reranking. * **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) --* **[REQUIRED]** The name of the metadata field to include or exclude during reranking. * **modelConfiguration** *(dict) --* **[REQUIRED]** Specifies the configuration for 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*) -- * **modelArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Amazon Bedrock reranker model. * **numberOfRerankedResults** *(integer) --* Specifies the number of results to return after reranking. * **type** *(string) --* **[REQUIRED]** Specifies the type of reranking model to use. Currently, the only supported value is "BEDROCK_RERANKING_MODEL". * **lambdaFunction** *(dict) --* Contains configurations for a Lambda function node in your flow. Invokes an Lambda function. * **lambdaArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Lambda function to invoke. * **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) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the Amazon Lex bot alias to invoke. * **localeId** *(string) --* **[REQUIRED]** The Region to invoke the Amazon Lex bot in. * **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. * **loopController** *(dict) --* Contains controller node configurations for a DoWhile loop in your flow. * **continueCondition** *(dict) --* **[REQUIRED]** Specifies the condition that determines when the flow exits the DoWhile loop. The loop executes until this condition evaluates to true. * **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. * **name** *(string) --* **[REQUIRED]** A name for the condition that you can reference. * **maxIterations** *(integer) --* Specifies the maximum number of times the DoWhile loop can iterate before the flow exits the loop. * **loopInput** *(dict) --* Contains input node configurations for a DoWhile loop in your flow. * **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. * **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. * **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. * **sourceConfiguration** *(dict) --* **[REQUIRED]** 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 can be set: "inline", "resource". * **inline** *(dict) --* Contains configurations for a prompt that is defined inline * **additionalModelRequestFields** (*document*) -- Additional fields to be included in the model request for the Prompt node. * **inferenceConfiguration** *(dict) --* Contains inference configurations for the prompt. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "text". * **text** *(dict) --* Contains inference configurations for a text prompt. * **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) --* * **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. * **modelId** *(string) --* **[REQUIRED]** The unique identifier of the model or inference profile to run inference with. * **templateConfiguration** *(dict) --* **[REQUIRED]** 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 can be set: "chat", "text". * **chat** *(dict) --* Contains configurations to use the prompt in a conversational format. * **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. * **messages** *(list) --* **[REQUIRED]** 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. * **content** *(list) --* **[REQUIRED]** 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 can be set: "cachePoint", "text". * **cachePoint** *(dict) --* Creates a cache checkpoint within a message. * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the message. * **role** *(string) --* **[REQUIRED]** The role that the message belongs to. * **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 can be set: "cachePoint", "text". * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **text** *(string) --* The text in the system prompt. * **toolConfiguration** *(dict) --* Configuration information for the tools that the model can use when generating a response. * **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 can be set: "any", "auto", "tool". * **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. * **auto** *(dict) --* Defines tools. The model automatically decides whether to call a tool or to generate text instead. * **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) --* **[REQUIRED]** The name of the tool. * **tools** *(list) --* **[REQUIRED]** 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 can be set: "cachePoint", "toolSpec". * **cachePoint** *(dict) --* Creates a cache checkpoint within a tool designation * **type** *(string) --* **[REQUIRED]** Indicates that the CachePointBlock is of the default type * **toolSpec** *(dict) --* The specification for the tool. * **description** *(string) --* The description of the tool. * **inputSchema** *(dict) --* **[REQUIRED]** The input schema for the tool. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "json". * **json** (*document*) -- A JSON object defining the input schema for the tool. * **name** *(string) --* **[REQUIRED]** The name of the tool. * **text** *(dict) --* Contains configurations for the text in a message for a prompt. * **cachePoint** *(dict) --* A cache checkpoint within a template configuration. * **type** *(string) --* **[REQUIRED]** 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. * **text** *(string) --* **[REQUIRED]** The message for the prompt. * **templateType** *(string) --* **[REQUIRED]** The type of prompt template. * **resource** *(dict) --* Contains configurations for a prompt from Prompt management. * **promptArn** *(string) --* **[REQUIRED]** The Amazon Resource Name (ARN) of the prompt from Prompt management. * **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) --* **[REQUIRED]** 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 can be set: "s3". * **s3** *(dict) --* Contains configurations for the Amazon S3 location from which to retrieve data to return as the output from the node. * **bucketName** *(string) --* **[REQUIRED]** The name of the Amazon S3 bucket from which to retrieve data. * **storage** *(dict) --* Contains configurations for a storage node in your flow. Stores an input in an Amazon S3 location. * **serviceConfiguration** *(dict) --* **[REQUIRED]** 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 can be set: "s3". * **s3** *(dict) --* Contains configurations for the Amazon S3 location in which to store the input into the node. * **bucketName** *(string) --* **[REQUIRED]** The name of the Amazon S3 bucket in which to store the input into the node. * **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. * **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. * **expression** *(string) --* **[REQUIRED]** 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. * **name** *(string) --* **[REQUIRED]** Specifies a name for the input that you can reference. * **type** *(string) --* **[REQUIRED]** Specifies the data type of the input. If the input doesn't match this type at runtime, a validation error will be thrown. * **name** *(string) --* **[REQUIRED]** A name for the node. * **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) --* **[REQUIRED]** A name for the output that you can reference. * **type** *(string) --* **[REQUIRED]** The data type of the output. If the output doesn't match this type at runtime, a validation error will be thrown. * **type** *(string) --* **[REQUIRED]** 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. Return type: dict Returns: **Response Syntax** { 'validations': [ { 'details': { 'cyclicConnection': { 'connection': 'string' }, 'duplicateConditionExpression': { 'expression': 'string', 'node': 'string' }, 'duplicateConnections': { 'source': 'string', 'target': 'string' }, 'incompatibleConnectionDataType': { 'connection': 'string' }, 'invalidLoopBoundary': { 'connection': 'string', 'source': 'string', 'target': 'string' }, 'loopIncompatibleNodeType': { 'incompatibleNodeName': 'string', 'incompatibleNodeType': 'Input'|'Condition'|'Iterator'|'Collector', 'node': 'string' }, 'malformedConditionExpression': { 'cause': 'string', 'condition': 'string', 'node': 'string' }, 'malformedNodeInputExpression': { 'cause': 'string', 'input': 'string', 'node': 'string' }, 'mismatchedNodeInputType': { 'expectedType': 'String'|'Number'|'Boolean'|'Object'|'Array', 'input': 'string', 'node': 'string' }, 'mismatchedNodeOutputType': { 'expectedType': 'String'|'Number'|'Boolean'|'Object'|'Array', 'node': 'string', 'output': 'string' }, 'missingConnectionConfiguration': { 'connection': 'string' }, 'missingDefaultCondition': { 'node': 'string' }, 'missingEndingNodes': {}, 'missingLoopControllerNode': { 'loopNode': 'string' }, 'missingLoopInputNode': { 'loopNode': 'string' }, 'missingNodeConfiguration': { 'node': 'string' }, 'missingNodeInput': { 'input': 'string', 'node': 'string' }, 'missingNodeOutput': { 'node': 'string', 'output': 'string' }, 'missingStartingNodes': {}, 'multipleLoopControllerNodes': { 'loopNode': 'string' }, 'multipleLoopInputNodes': { 'loopNode': 'string' }, 'multipleNodeInputConnections': { 'input': 'string', 'node': 'string' }, 'unfulfilledNodeInput': { 'input': 'string', 'node': 'string' }, 'unknownConnectionCondition': { 'connection': 'string' }, 'unknownConnectionSource': { 'connection': 'string' }, 'unknownConnectionSourceOutput': { 'connection': 'string' }, 'unknownConnectionTarget': { 'connection': 'string' }, 'unknownConnectionTargetInput': { 'connection': 'string' }, 'unknownNodeInput': { 'input': 'string', 'node': 'string' }, 'unknownNodeOutput': { 'node': 'string', 'output': 'string' }, 'unreachableNode': { 'node': 'string' }, 'unsatisfiedConnectionConditions': { 'connection': 'string' }, 'unspecified': {} }, 'message': 'string', 'severity': 'Warning'|'Error', 'type': 'CyclicConnection'|'DuplicateConnections'|'DuplicateConditionExpression'|'UnreachableNode'|'UnknownConnectionSource'|'UnknownConnectionSourceOutput'|'UnknownConnectionTarget'|'UnknownConnectionTargetInput'|'UnknownConnectionCondition'|'MalformedConditionExpression'|'MalformedNodeInputExpression'|'MismatchedNodeInputType'|'MismatchedNodeOutputType'|'IncompatibleConnectionDataType'|'MissingConnectionConfiguration'|'MissingDefaultCondition'|'MissingEndingNodes'|'MissingNodeConfiguration'|'MissingNodeInput'|'MissingNodeOutput'|'MissingStartingNodes'|'MultipleNodeInputConnections'|'UnfulfilledNodeInput'|'UnsatisfiedConnectionConditions'|'Unspecified'|'UnknownNodeInput'|'UnknownNodeOutput'|'MissingLoopInputNode'|'MissingLoopControllerNode'|'MultipleLoopInputNodes'|'MultipleLoopControllerNodes'|'LoopIncompatibleNodeType'|'InvalidLoopBoundary' }, ] } **Response Structure** * *(dict) --* * **validations** *(list) --* Contains an array of objects, each of which contains an error identified by validation. * *(dict) --* Contains information about validation of the flow. This data type is used in the following API operations: * GetFlow response * GetFlowVersion response * **details** *(dict) --* Specific details about the validation issue encountered in the flow. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "cyclicConnection", "duplicateConditionExpression", "duplicateConnections", "incompatibleConnectionDataType", "invalidLoopBoundary", "loopIncompatibleNodeType", "malformedConditionExpression", "malformedNodeInputExpression", "mismatchedNodeInputType", "mismatchedNodeOutputType", "missingConnectionConfiguration", "missingDefaultCondition", "missingEndingNodes", "missingLoopControllerNode", "missingLoopInputNode", "missingNodeConfiguration", "missingNodeInput", "missingNodeOutput", "missingStartingNodes", "multipleLoopControllerNodes", "multipleLoopInputNodes", "multipleNodeInputConnections", "unfulfilledNodeInput", "unknownConnectionCondition", "unknownConnectionSource", "unknownConnectionSourceOutput", "unknownConnectionTarget", "unknownConnectionTargetInput", "unknownNodeInput", "unknownNodeOutput", "unreachableNode", "unsatisfiedConnectionConditions", "unspecified". 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'} * **cyclicConnection** *(dict) --* Details about a cyclic connection in the flow. * **connection** *(string) --* The name of the connection that causes the cycle in the flow. * **duplicateConditionExpression** *(dict) --* Details about duplicate condition expressions in a node. * **expression** *(string) --* The duplicated condition expression. * **node** *(string) --* The name of the node containing the duplicate condition expressions. * **duplicateConnections** *(dict) --* Details about duplicate connections between nodes. * **source** *(string) --* The name of the source node where the duplicate connection starts. * **target** *(string) --* The name of the target node where the duplicate connection ends. * **incompatibleConnectionDataType** *(dict) --* Details about incompatible data types in a connection. * **connection** *(string) --* The name of the connection with incompatible data types. * **invalidLoopBoundary** *(dict) --* Details about a flow that includes connections that violate loop boundary rules. * **connection** *(string) --* The name of the connection that violates loop boundary rules. * **source** *(string) --* The source node of the connection that violates DoWhile loop boundary rules. * **target** *(string) --* The target node of the connection that violates DoWhile loop boundary rules. * **loopIncompatibleNodeType** *(dict) --* Details about a flow that includes incompatible node types in a DoWhile loop. * **incompatibleNodeName** *(string) --* The node that's incompatible in the DoWhile loop. * **incompatibleNodeType** *(string) --* The node type of the incompatible node in the DoWhile loop. Some node types, like a condition node, aren't allowed in a DoWhile loop. * **node** *(string) --* The "Loop" container node that contains an incompatible node. * **malformedConditionExpression** *(dict) --* Details about a malformed condition expression in a node. * **cause** *(string) --* The error message describing why the condition expression is malformed. * **condition** *(string) --* The name of the malformed condition. * **node** *(string) --* The name of the node containing the malformed condition expression. * **malformedNodeInputExpression** *(dict) --* Details about a malformed input expression in a node. * **cause** *(string) --* The error message describing why the input expression is malformed. * **input** *(string) --* The name of the input with the malformed expression. * **node** *(string) --* The name of the node containing the malformed input expression. * **mismatchedNodeInputType** *(dict) --* Details about mismatched input data types in a node. * **expectedType** *(string) --* The expected data type for the node input. * **input** *(string) --* The name of the input with the mismatched data type. * **node** *(string) --* The name of the node containing the input with the mismatched data type. * **mismatchedNodeOutputType** *(dict) --* Details about mismatched output data types in a node. * **expectedType** *(string) --* The expected data type for the node output. * **node** *(string) --* The name of the node containing the output with the mismatched data type. * **output** *(string) --* The name of the output with the mismatched data type. * **missingConnectionConfiguration** *(dict) --* Details about missing configuration for a connection. * **connection** *(string) --* The name of the connection missing configuration. * **missingDefaultCondition** *(dict) --* Details about a missing default condition in a conditional node. * **node** *(string) --* The name of the node missing the default condition. * **missingEndingNodes** *(dict) --* Details about missing ending nodes in the flow. * **missingLoopControllerNode** *(dict) --* Details about a flow that's missing a required "LoopController" node in a DoWhile loop. * **loopNode** *(string) --* The DoWhile loop in a flow that's missing a required "LoopController" node. * **missingLoopInputNode** *(dict) --* Details about a flow that's missing a required "LoopInput" node in a DoWhile loop. * **loopNode** *(string) --* The DoWhile loop in a flow that's missing a required "LoopInput" node. * **missingNodeConfiguration** *(dict) --* Details about missing configuration for a node. * **node** *(string) --* The name of the node missing a required configuration. * **missingNodeInput** *(dict) --* Details about a missing required input in a node. * **input** *(string) --* The name of the missing input. * **node** *(string) --* The name of the node missing the required input. * **missingNodeOutput** *(dict) --* Details about a missing required output in a node. * **node** *(string) --* The name of the node missing the required output. * **output** *(string) --* The name of the missing output. * **missingStartingNodes** *(dict) --* Details about missing starting nodes in the flow. * **multipleLoopControllerNodes** *(dict) --* Details about a flow that contains multiple "LoopController" nodes in a DoWhile loop. * **loopNode** *(string) --* The DoWhile loop in a flow that contains multiple "LoopController" nodes. * **multipleLoopInputNodes** *(dict) --* Details about a flow that contains multiple "LoopInput" nodes in a DoWhile loop. * **loopNode** *(string) --* The DoWhile loop in a flow that contains multiple "LoopInput" nodes. * **multipleNodeInputConnections** *(dict) --* Details about multiple connections to a single node input. * **input** *(string) --* The name of the input with multiple connections to it. * **node** *(string) --* The name of the node containing the input with multiple connections. * **unfulfilledNodeInput** *(dict) --* Details about an unfulfilled node input with no valid connections. * **input** *(string) --* The name of the unfulfilled input. An input is unfulfilled if there are no data connections to it. * **node** *(string) --* The name of the node containing the unfulfilled input. * **unknownConnectionCondition** *(dict) --* Details about an unknown condition for a connection. * **connection** *(string) --* The name of the connection with the unknown condition. * **unknownConnectionSource** *(dict) --* Details about an unknown source node for a connection. * **connection** *(string) --* The name of the connection with the unknown source. * **unknownConnectionSourceOutput** *(dict) --* Details about an unknown source output for a connection. * **connection** *(string) --* The name of the connection with the unknown source output. * **unknownConnectionTarget** *(dict) --* Details about an unknown target node for a connection. * **connection** *(string) --* The name of the connection with the unknown target. * **unknownConnectionTargetInput** *(dict) --* Details about an unknown target input for a connection. * **connection** *(string) --* The name of the connection with the unknown target input. * **unknownNodeInput** *(dict) --* Details about an unknown input for a node. * **input** *(string) --* The name of the node with the unknown input. * **node** *(string) --* The name of the unknown input. * **unknownNodeOutput** *(dict) --* Details about an unknown output for a node. * **node** *(string) --* The name of the node with the unknown output. * **output** *(string) --* The name of the unknown output. * **unreachableNode** *(dict) --* Details about an unreachable node in the flow. * **node** *(string) --* The name of the unreachable node. * **unsatisfiedConnectionConditions** *(dict) --* Details about unsatisfied conditions for a connection. * **connection** *(string) --* The name of the connection with unsatisfied conditions. * **unspecified** *(dict) --* Details about an unspecified validation. * **message** *(string) --* A message describing the validation error. * **severity** *(string) --* The severity of the issue described in the message. * **type** *(string) --* The type of validation issue encountered in the flow. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" AgentsforBedrock / Client / prepare_agent prepare_agent ************* AgentsforBedrock.Client.prepare_agent(**kwargs) Creates a "DRAFT" version of the agent that can be used for internal testing. See also: AWS API Documentation **Request Syntax** response = client.prepare_agent( agentId='string' ) Parameters: **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent for which to create a "DRAFT" version. Return type: dict Returns: **Response Syntax** { 'agentId': 'string', 'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING', 'agentVersion': 'string', 'preparedAt': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **agentId** *(string) --* The unique identifier of the agent for which the "DRAFT" version was created. * **agentStatus** *(string) --* The status of the "DRAFT" version and whether it is ready for use. * **agentVersion** *(string) --* The version of the agent. * **preparedAt** *(datetime) --* The time at which the "DRAFT" version of the agent was last prepared. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / list_knowledge_bases list_knowledge_bases ******************** AgentsforBedrock.Client.list_knowledge_bases(**kwargs) Lists the knowledge bases in an account. The list also includesinformation about each knowledge base. See also: AWS API Documentation **Request Syntax** response = client.list_knowledge_bases( maxResults=123, nextToken='string' ) Parameters: * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. Return type: dict Returns: **Response Syntax** { 'knowledgeBaseSummaries': [ { 'description': 'string', 'knowledgeBaseId': 'string', 'name': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED'|'DELETE_UNSUCCESSFUL', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **knowledgeBaseSummaries** *(list) --* A list of knowledge bases with information about each knowledge base. * *(dict) --* Contains details about a knowledge base. * **description** *(string) --* The description of the knowledge base. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge base. * **name** *(string) --* The name of the knowledge base. * **status** *(string) --* The status of the knowledge base. * **updatedAt** *(datetime) --* The time the knowledge base was last updated. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" AgentsforBedrock / Client / update_agent update_agent ************ AgentsforBedrock.Client.update_agent(**kwargs) Updates the configuration of an agent. See also: AWS API Documentation **Request Syntax** response = client.update_agent( agentCollaboration='SUPERVISOR'|'SUPERVISOR_ROUTER'|'DISABLED', agentId='string', agentName='string', agentResourceRoleArn='string', customOrchestration={ 'executor': { 'lambda': 'string' } }, customerEncryptionKeyArn='string', description='string', foundationModel='string', guardrailConfiguration={ 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, idleSessionTTLInSeconds=123, instruction='string', memoryConfiguration={ 'enabledMemoryTypes': [ 'SESSION_SUMMARY', ], 'sessionSummaryConfiguration': { 'maxRecentSessions': 123 }, 'storageDays': 123 }, orchestrationType='DEFAULT'|'CUSTOM_ORCHESTRATION', promptOverrideConfiguration={ 'overrideLambda': 'string', 'promptConfigurations': [ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'basePromptTemplate': 'string', 'foundationModel': 'string', 'inferenceConfiguration': { 'maximumLength': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topK': 123, 'topP': ... }, 'parserMode': 'DEFAULT'|'OVERRIDDEN', 'promptCreationMode': 'DEFAULT'|'OVERRIDDEN', 'promptState': 'ENABLED'|'DISABLED', 'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION'|'MEMORY_SUMMARIZATION' }, ] } ) Parameters: * **agentCollaboration** (*string*) -- The agent's collaboration role. * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent. * **agentName** (*string*) -- **[REQUIRED]** Specifies a new name for the agent. * **agentResourceRoleArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent. * **customOrchestration** (*dict*) -- Contains details of the custom orchestration configured for the agent. * **executor** *(dict) --* The structure of the executor invoking the actions in custom orchestration. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "lambda". * **lambda** *(string) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * **customerEncryptionKeyArn** (*string*) -- The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent. * **description** (*string*) -- Specifies a new description of the agent. * **foundationModel** (*string*) -- **[REQUIRED]** The identifier for the model that you want to be used for orchestration by the agent you create. The "modelId" to provide depends on the type of model or throughput that you use: * If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide. * If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see Supported Regions and models for cross-region inference in the Amazon Bedrock User Guide. * If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide. * If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide. * If you use an imported model, specify the ARN of the imported model. You can get the model ARN from a successful call to CreateModelImportJob or from the Imported models page in the Amazon Bedrock console. * **guardrailConfiguration** (*dict*) -- The unique Guardrail configuration assigned to the agent when it is updated. * **guardrailIdentifier** *(string) --* The unique identifier of the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **idleSessionTTLInSeconds** (*integer*) -- The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout. * **instruction** (*string*) -- Specifies new instructions that tell the agent what it should do and how it should interact with users. * **memoryConfiguration** (*dict*) -- Specifies the new memory configuration for the agent. * **enabledMemoryTypes** *(list) --* **[REQUIRED]** The type of memory that is stored. * *(string) --* * **sessionSummaryConfiguration** *(dict) --* Contains the configuration for SESSION_SUMMARY memory type enabled for the agent. * **maxRecentSessions** *(integer) --* Maximum number of recent session summaries to include in the agent's prompt context. * **storageDays** *(integer) --* The number of days the agent is configured to retain the conversational context. * **orchestrationType** (*string*) -- Specifies the type of orchestration strategy for the agent. This is set to "DEFAULT" orchestration type, by default. * **promptOverrideConfiguration** (*dict*) -- Contains configurations to override prompts in different parts of an agent sequence. For more information, see Advanced prompts. * **overrideLambda** *(string) --* The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the "promptConfigurations" must contain a "parserMode" value that is set to "OVERRIDDEN". For more information, see Parser Lambda function in Amazon Bedrock Agents. * **promptConfigurations** *(list) --* **[REQUIRED]** Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * *(dict) --* Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * **additionalModelRequestFields** (*document*) -- If the Converse or ConverseStream operations support the model, "additionalModelRequestFields" contains additional inference parameters, beyond the base set of inference parameters in the "inferenceConfiguration" field. For more information, see *Inference request parameters and response fields for foundation models* in the Amazon Bedrock user guide. * **basePromptTemplate** *(string) --* Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables. For more information, see Configure the prompt templates. * **foundationModel** *(string) --* The agent's foundation model. * **inferenceConfiguration** *(dict) --* Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by the "promptType". For more information, see Inference parameters for foundation models. * **maximumLength** *(integer) --* The maximum number of tokens to allow in the generated response. * **stopSequences** *(list) --* A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response. * *(string) --* * **temperature** *(float) --* The likelihood of the model selecting higher- probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options. * **topK** *(integer) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "topK" is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topK" to 50, the model selects the next token from among the top 50 most likely choices. * **topP** *(float) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "Top P" determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topP" to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens. * **parserMode** *(string) --* Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the "promptType". If you set the field as "OVERRIDDEN", the "overrideLambda" field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function. * **promptCreationMode** *(string) --* Specifies whether to override the default prompt template for this "promptType". Set this value to "OVERRIDDEN" to use the prompt that you provide in the "basePromptTemplate". If you leave it as "DEFAULT", the agent uses a default prompt template. * **promptState** *(string) --* Specifies whether to allow the agent to carry out the step specified in the "promptType". If you set this value to "DISABLED", the agent skips that step. The default state for each "promptType" is as follows. * "PRE_PROCESSING" – "DISABLED" * "ORCHESTRATION" – "ENABLED" * "KNOWLEDGE_BASE_RESPONSE_GENERATION" – "ENABLED" * "POST_PROCESSING" – "DISABLED" * **promptType** *(string) --* The step in the agent sequence that this prompt configuration applies to. Return type: dict Returns: **Response Syntax** { 'agent': { 'agentArn': 'string', 'agentCollaboration': 'SUPERVISOR'|'SUPERVISOR_ROUTER'|'DISABLED', 'agentId': 'string', 'agentName': 'string', 'agentResourceRoleArn': 'string', 'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING', 'agentVersion': 'string', 'clientToken': 'string', 'createdAt': datetime(2015, 1, 1), 'customOrchestration': { 'executor': { 'lambda': 'string' } }, 'customerEncryptionKeyArn': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'foundationModel': 'string', 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'idleSessionTTLInSeconds': 123, 'instruction': 'string', 'memoryConfiguration': { 'enabledMemoryTypes': [ 'SESSION_SUMMARY', ], 'sessionSummaryConfiguration': { 'maxRecentSessions': 123 }, 'storageDays': 123 }, 'orchestrationType': 'DEFAULT'|'CUSTOM_ORCHESTRATION', 'preparedAt': datetime(2015, 1, 1), 'promptOverrideConfiguration': { 'overrideLambda': 'string', 'promptConfigurations': [ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'basePromptTemplate': 'string', 'foundationModel': 'string', 'inferenceConfiguration': { 'maximumLength': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topK': 123, 'topP': ... }, 'parserMode': 'DEFAULT'|'OVERRIDDEN', 'promptCreationMode': 'DEFAULT'|'OVERRIDDEN', 'promptState': 'ENABLED'|'DISABLED', 'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION'|'MEMORY_SUMMARIZATION' }, ] }, 'recommendedActions': [ 'string', ], 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agent** *(dict) --* Contains details about the agent that was updated. * **agentArn** *(string) --* The Amazon Resource Name (ARN) of the agent. * **agentCollaboration** *(string) --* The agent's collaboration settings. * **agentId** *(string) --* The unique identifier of the agent. * **agentName** *(string) --* The name of the agent. * **agentResourceRoleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent. * **agentStatus** *(string) --* The status of the agent and whether it is ready for use. The following statuses are possible: * CREATING – The agent is being created. * PREPARING – The agent is being prepared. * PREPARED – The agent is prepared and ready to be invoked. * NOT_PREPARED – The agent has been created but not yet prepared. * FAILED – The agent API operation failed. * UPDATING – The agent is being updated. * DELETING – The agent is being deleted. * **agentVersion** *(string) --* The version of the agent. * **clientToken** *(string) --* A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. * **createdAt** *(datetime) --* The time at which the agent was created. * **customOrchestration** *(dict) --* Contains custom orchestration configurations for the agent. * **executor** *(dict) --* The structure of the executor invoking the actions in custom orchestration. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "lambda". 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'} * **lambda** *(string) --* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key that encrypts the agent. * **description** *(string) --* The description of the agent. * **failureReasons** *(list) --* Contains reasons that the agent-related API that you invoked failed. * *(string) --* * **foundationModel** *(string) --* The foundation model used for orchestration by the agent. * **guardrailConfiguration** *(dict) --* Details about the guardrail associated with the agent. * **guardrailIdentifier** *(string) --* The unique identifier of the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **idleSessionTTLInSeconds** *(integer) --* The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout. * **instruction** *(string) --* Instructions that tell the agent what it should do and how it should interact with users. * **memoryConfiguration** *(dict) --* Contains memory configuration for the agent. * **enabledMemoryTypes** *(list) --* The type of memory that is stored. * *(string) --* * **sessionSummaryConfiguration** *(dict) --* Contains the configuration for SESSION_SUMMARY memory type enabled for the agent. * **maxRecentSessions** *(integer) --* Maximum number of recent session summaries to include in the agent's prompt context. * **storageDays** *(integer) --* The number of days the agent is configured to retain the conversational context. * **orchestrationType** *(string) --* Specifies the orchestration strategy for the agent. * **preparedAt** *(datetime) --* The time at which the agent was last prepared. * **promptOverrideConfiguration** *(dict) --* Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see Advanced prompts. * **overrideLambda** *(string) --* The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the "promptConfigurations" must contain a "parserMode" value that is set to "OVERRIDDEN". For more information, see Parser Lambda function in Amazon Bedrock Agents. * **promptConfigurations** *(list) --* Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * *(dict) --* Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * **additionalModelRequestFields** (*document*) -- If the Converse or ConverseStream operations support the model, "additionalModelRequestFields" contains additional inference parameters, beyond the base set of inference parameters in the "inferenceConfiguration" field. For more information, see *Inference request parameters and response fields for foundation models* in the Amazon Bedrock user guide. * **basePromptTemplate** *(string) --* Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables. For more information, see Configure the prompt templates. * **foundationModel** *(string) --* The agent's foundation model. * **inferenceConfiguration** *(dict) --* Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by the "promptType". For more information, see Inference parameters for foundation models. * **maximumLength** *(integer) --* The maximum number of tokens to allow in the generated response. * **stopSequences** *(list) --* A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response. * *(string) --* * **temperature** *(float) --* The likelihood of the model selecting higher- probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower- probability options. * **topK** *(integer) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "topK" is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topK" to 50, the model selects the next token from among the top 50 most likely choices. * **topP** *(float) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "Top P" determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topP" to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens. * **parserMode** *(string) --* Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the "promptType". If you set the field as "OVERRIDDEN", the "overrideLambda" field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function. * **promptCreationMode** *(string) --* Specifies whether to override the default prompt template for this "promptType". Set this value to "OVERRIDDEN" to use the prompt that you provide in the "basePromptTemplate". If you leave it as "DEFAULT", the agent uses a default prompt template. * **promptState** *(string) --* Specifies whether to allow the agent to carry out the step specified in the "promptType". If you set this value to "DISABLED", the agent skips that step. The default state for each "promptType" is as follows. * "PRE_PROCESSING" – "DISABLED" * "ORCHESTRATION" – "ENABLED" * "KNOWLEDGE_BASE_RESPONSE_GENERATION" – "ENABLED" * "POST_PROCESSING" – "DISABLED" * **promptType** *(string) --* The step in the agent sequence that this prompt configuration applies to. * **recommendedActions** *(list) --* Contains recommended actions to take for the agent-related API that you invoked to succeed. * *(string) --* * **updatedAt** *(datetime) --* The time at which the agent was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / list_agent_aliases list_agent_aliases ****************** AgentsforBedrock.Client.list_agent_aliases(**kwargs) Lists the aliases of an agent and information about each one. See also: AWS API Documentation **Request Syntax** response = client.list_agent_aliases( agentId='string', maxResults=123, nextToken='string' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent. * **maxResults** (*integer*) -- The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the "nextToken" field when making another request to return the next batch of results. * **nextToken** (*string*) -- If the total number of results is greater than the "maxResults" value provided in the request, enter the token returned in the "nextToken" field in the response in this field to return the next batch of results. Return type: dict Returns: **Response Syntax** { 'agentAliasSummaries': [ { 'agentAliasId': 'string', 'agentAliasName': 'string', 'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING'|'DISSOCIATED', 'aliasInvocationState': 'ACCEPT_INVOCATIONS'|'REJECT_INVOCATIONS', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'routingConfiguration': [ { 'agentVersion': 'string', 'provisionedThroughput': 'string' }, ], 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **agentAliasSummaries** *(list) --* A list of objects, each of which contains information about an alias of the agent. * *(dict) --* Contains details about an alias of an agent. * **agentAliasId** *(string) --* Contains details about * **agentAliasName** *(string) --* The name of the alias. * **agentAliasStatus** *(string) --* The status of the alias. * **aliasInvocationState** *(string) --* The invocation state for the agent alias. If the agent alias is running, the value is "ACCEPT_INVOCATIONS". If the agent alias is paused, the value is "REJECT_INVOCATIONS". Use the "UpdateAgentAlias" operation to change the invocation state. * **createdAt** *(datetime) --* The time at which the alias of the agent was created. * **description** *(string) --* The description of the alias. * **routingConfiguration** *(list) --* Contains details about the version of the agent with which the alias is associated. * *(dict) --* Contains details about the routing configuration of the alias. * **agentVersion** *(string) --* The version of the agent with which the alias is associated. * **provisionedThroughput** *(string) --* Information on the Provisioned Throughput assigned to an agent alias. * **updatedAt** *(datetime) --* The time at which the alias was last updated. * **nextToken** *(string) --* If the total number of results is greater than the "maxResults" value provided in the request, use this token when making another request in the "nextToken" field to return the next batch of results. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / tag_resource tag_resource ************ AgentsforBedrock.Client.tag_resource(**kwargs) Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.tag_resource( resourceArn='string', tags={ 'string': 'string' } ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource to tag. * **tags** (*dict*) -- **[REQUIRED]** An object containing key-value pairs that define the tags to attach to the resource. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / update_agent_collaborator update_agent_collaborator ************************* AgentsforBedrock.Client.update_agent_collaborator(**kwargs) Updates an agent's collaborator. See also: AWS API Documentation **Request Syntax** response = client.update_agent_collaborator( agentDescriptor={ 'aliasArn': 'string' }, agentId='string', agentVersion='string', collaborationInstruction='string', collaboratorId='string', collaboratorName='string', relayConversationHistory='TO_COLLABORATOR'|'DISABLED' ) Parameters: * **agentDescriptor** (*dict*) -- **[REQUIRED]** An agent descriptor for the agent collaborator. * **aliasArn** *(string) --* The agent's alias ARN. * **agentId** (*string*) -- **[REQUIRED]** The agent's ID. * **agentVersion** (*string*) -- **[REQUIRED]** The agent's version. * **collaborationInstruction** (*string*) -- **[REQUIRED]** Instruction for the collaborator. * **collaboratorId** (*string*) -- **[REQUIRED]** The collaborator's ID. * **collaboratorName** (*string*) -- **[REQUIRED]** The collaborator's name. * **relayConversationHistory** (*string*) -- A relay conversation history for the collaborator. Return type: dict Returns: **Response Syntax** { 'agentCollaborator': { 'agentDescriptor': { 'aliasArn': 'string' }, 'agentId': 'string', 'agentVersion': 'string', 'clientToken': 'string', 'collaborationInstruction': 'string', 'collaboratorId': 'string', 'collaboratorName': 'string', 'createdAt': datetime(2015, 1, 1), 'lastUpdatedAt': datetime(2015, 1, 1), 'relayConversationHistory': 'TO_COLLABORATOR'|'DISABLED' } } **Response Structure** * *(dict) --* * **agentCollaborator** *(dict) --* Details about the collaborator. * **agentDescriptor** *(dict) --* The collaborator's agent descriptor. * **aliasArn** *(string) --* The agent's alias ARN. * **agentId** *(string) --* The collaborator's agent ID. * **agentVersion** *(string) --* The collaborator's agent version. * **clientToken** *(string) --* The collaborator's client token. * **collaborationInstruction** *(string) --* The collaborator's instructions. * **collaboratorId** *(string) --* The collaborator's collaborator ID. * **collaboratorName** *(string) --* The collaborator's collaborator name. * **createdAt** *(datetime) --* When the collaborator was created. * **lastUpdatedAt** *(datetime) --* When the collaborator was updated. * **relayConversationHistory** *(string) --* The collaborator's relay conversation history. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / get_agent_version get_agent_version ***************** AgentsforBedrock.Client.get_agent_version(**kwargs) Gets details about a version of an agent. See also: AWS API Documentation **Request Syntax** response = client.get_agent_version( agentId='string', agentVersion='string' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent. Return type: dict Returns: **Response Syntax** { 'agentVersion': { 'agentArn': 'string', 'agentCollaboration': 'SUPERVISOR'|'SUPERVISOR_ROUTER'|'DISABLED', 'agentId': 'string', 'agentName': 'string', 'agentResourceRoleArn': 'string', 'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING', 'createdAt': datetime(2015, 1, 1), 'customerEncryptionKeyArn': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'foundationModel': 'string', 'guardrailConfiguration': { 'guardrailIdentifier': 'string', 'guardrailVersion': 'string' }, 'idleSessionTTLInSeconds': 123, 'instruction': 'string', 'memoryConfiguration': { 'enabledMemoryTypes': [ 'SESSION_SUMMARY', ], 'sessionSummaryConfiguration': { 'maxRecentSessions': 123 }, 'storageDays': 123 }, 'promptOverrideConfiguration': { 'overrideLambda': 'string', 'promptConfigurations': [ { 'additionalModelRequestFields': {...}|[...]|123|123.4|'string'|True|None, 'basePromptTemplate': 'string', 'foundationModel': 'string', 'inferenceConfiguration': { 'maximumLength': 123, 'stopSequences': [ 'string', ], 'temperature': ..., 'topK': 123, 'topP': ... }, 'parserMode': 'DEFAULT'|'OVERRIDDEN', 'promptCreationMode': 'DEFAULT'|'OVERRIDDEN', 'promptState': 'ENABLED'|'DISABLED', 'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION'|'MEMORY_SUMMARIZATION' }, ] }, 'recommendedActions': [ 'string', ], 'updatedAt': datetime(2015, 1, 1), 'version': 'string' } } **Response Structure** * *(dict) --* * **agentVersion** *(dict) --* Contains details about the version of the agent. * **agentArn** *(string) --* The Amazon Resource Name (ARN) of the agent that the version belongs to. * **agentCollaboration** *(string) --* The agent's collaboration settings. * **agentId** *(string) --* The unique identifier of the agent that the version belongs to. * **agentName** *(string) --* The name of the agent that the version belongs to. * **agentResourceRoleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent. * **agentStatus** *(string) --* The status of the agent that the version belongs to. * **createdAt** *(datetime) --* The time at which the version was created. * **customerEncryptionKeyArn** *(string) --* The Amazon Resource Name (ARN) of the KMS key that encrypts the agent. * **description** *(string) --* The description of the version. * **failureReasons** *(list) --* A list of reasons that the API operation on the version failed. * *(string) --* * **foundationModel** *(string) --* The foundation model that the version invokes. * **guardrailConfiguration** *(dict) --* Details about the guardrail associated with the agent. * **guardrailIdentifier** *(string) --* The unique identifier of the guardrail. * **guardrailVersion** *(string) --* The version of the guardrail. * **idleSessionTTLInSeconds** *(integer) --* The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout. * **instruction** *(string) --* The instructions provided to the agent. * **memoryConfiguration** *(dict) --* Contains details of the memory configuration on the version of the agent. * **enabledMemoryTypes** *(list) --* The type of memory that is stored. * *(string) --* * **sessionSummaryConfiguration** *(dict) --* Contains the configuration for SESSION_SUMMARY memory type enabled for the agent. * **maxRecentSessions** *(integer) --* Maximum number of recent session summaries to include in the agent's prompt context. * **storageDays** *(integer) --* The number of days the agent is configured to retain the conversational context. * **promptOverrideConfiguration** *(dict) --* Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see Advanced prompts. * **overrideLambda** *(string) --* The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the "promptConfigurations" must contain a "parserMode" value that is set to "OVERRIDDEN". For more information, see Parser Lambda function in Amazon Bedrock Agents. * **promptConfigurations** *(list) --* Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * *(dict) --* Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. * **additionalModelRequestFields** (*document*) -- If the Converse or ConverseStream operations support the model, "additionalModelRequestFields" contains additional inference parameters, beyond the base set of inference parameters in the "inferenceConfiguration" field. For more information, see *Inference request parameters and response fields for foundation models* in the Amazon Bedrock user guide. * **basePromptTemplate** *(string) --* Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables. For more information, see Configure the prompt templates. * **foundationModel** *(string) --* The agent's foundation model. * **inferenceConfiguration** *(dict) --* Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by the "promptType". For more information, see Inference parameters for foundation models. * **maximumLength** *(integer) --* The maximum number of tokens to allow in the generated response. * **stopSequences** *(list) --* A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response. * *(string) --* * **temperature** *(float) --* The likelihood of the model selecting higher- probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower- probability options. * **topK** *(integer) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "topK" is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topK" to 50, the model selects the next token from among the top 50 most likely choices. * **topP** *(float) --* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for "Top P" determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set "topP" to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens. * **parserMode** *(string) --* Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the "promptType". If you set the field as "OVERRIDDEN", the "overrideLambda" field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function. * **promptCreationMode** *(string) --* Specifies whether to override the default prompt template for this "promptType". Set this value to "OVERRIDDEN" to use the prompt that you provide in the "basePromptTemplate". If you leave it as "DEFAULT", the agent uses a default prompt template. * **promptState** *(string) --* Specifies whether to allow the agent to carry out the step specified in the "promptType". If you set this value to "DISABLED", the agent skips that step. The default state for each "promptType" is as follows. * "PRE_PROCESSING" – "DISABLED" * "ORCHESTRATION" – "ENABLED" * "KNOWLEDGE_BASE_RESPONSE_GENERATION" – "ENABLED" * "POST_PROCESSING" – "DISABLED" * **promptType** *(string) --* The step in the agent sequence that this prompt configuration applies to. * **recommendedActions** *(list) --* A list of recommended actions to take for the failed API operation on the version to succeed. * *(string) --* * **updatedAt** *(datetime) --* The time at which the version was last updated. * **version** *(string) --* The version number. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" AgentsforBedrock / Client / prepare_flow prepare_flow ************ AgentsforBedrock.Client.prepare_flow(**kwargs) Prepares the "DRAFT" version of a flow so that it can be invoked. For more information, see Test a flow in Amazon Bedrock in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.prepare_flow( flowIdentifier='string' ) Parameters: **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow. Return type: dict Returns: **Response Syntax** { 'id': 'string', 'status': 'Failed'|'Prepared'|'Preparing'|'NotPrepared' } **Response Structure** * *(dict) --* * **id** *(string) --* The unique identifier of the flow. * **status** *(string) --* The status of the flow. When you submit this request, the status will be "NotPrepared". If preparation succeeds, the status becomes "Prepared". If it fails, the status becomes "FAILED". **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / associate_agent_knowledge_base associate_agent_knowledge_base ****************************** AgentsforBedrock.Client.associate_agent_knowledge_base(**kwargs) Associates a knowledge base with an agent. If a knowledge base is associated and its "indexState" is set to "Enabled", the agent queries the knowledge base for information to augment its response to the user. See also: AWS API Documentation **Request Syntax** response = client.associate_agent_knowledge_base( agentId='string', agentVersion='string', description='string', knowledgeBaseId='string', knowledgeBaseState='ENABLED'|'DISABLED' ) Parameters: * **agentId** (*string*) -- **[REQUIRED]** The unique identifier of the agent with which you want to associate the knowledge base. * **agentVersion** (*string*) -- **[REQUIRED]** The version of the agent with which you want to associate the knowledge base. * **description** (*string*) -- **[REQUIRED]** A description of what the agent should use the knowledge base for. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base to associate with the agent. * **knowledgeBaseState** (*string*) -- Specifies whether to use the knowledge base or not when sending an InvokeAgent request. Return type: dict Returns: **Response Syntax** { 'agentKnowledgeBase': { 'agentId': 'string', 'agentVersion': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'knowledgeBaseId': 'string', 'knowledgeBaseState': 'ENABLED'|'DISABLED', 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **agentKnowledgeBase** *(dict) --* Contains details about the knowledge base that has been associated with the agent. * **agentId** *(string) --* The unique identifier of the agent with which the knowledge base is associated. * **agentVersion** *(string) --* The version of the agent with which the knowledge base is associated. * **createdAt** *(datetime) --* The time at which the association between the agent and the knowledge base was created. * **description** *(string) --* The description of the association between the agent and the knowledge base. * **knowledgeBaseId** *(string) --* The unique identifier of the association between the agent and the knowledge base. * **knowledgeBaseState** *(string) --* Specifies whether to use the knowledge base or not when sending an InvokeAgent request. * **updatedAt** *(datetime) --* The time at which the association between the agent and the knowledge base was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / stop_ingestion_job stop_ingestion_job ****************** AgentsforBedrock.Client.stop_ingestion_job(**kwargs) Stops a currently running data ingestion job. You can send a "StartIngestionJob" request again to ingest the rest of your data when you are ready. See also: AWS API Documentation **Request Syntax** response = client.stop_ingestion_job( dataSourceId='string', ingestionJobId='string', knowledgeBaseId='string' ) Parameters: * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source for the data ingestion job you want to stop. * **ingestionJobId** (*string*) -- **[REQUIRED]** The unique identifier of the data ingestion job you want to stop. * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base for the data ingestion job you want to stop. Return type: dict Returns: **Response Syntax** { 'ingestionJob': { 'dataSourceId': 'string', 'description': 'string', 'failureReasons': [ 'string', ], 'ingestionJobId': 'string', 'knowledgeBaseId': 'string', 'startedAt': datetime(2015, 1, 1), 'statistics': { 'numberOfDocumentsDeleted': 123, 'numberOfDocumentsFailed': 123, 'numberOfDocumentsScanned': 123, 'numberOfMetadataDocumentsModified': 123, 'numberOfMetadataDocumentsScanned': 123, 'numberOfModifiedDocumentsIndexed': 123, 'numberOfNewDocumentsIndexed': 123 }, 'status': 'STARTING'|'IN_PROGRESS'|'COMPLETE'|'FAILED'|'STOPPING'|'STOPPED', 'updatedAt': datetime(2015, 1, 1) } } **Response Structure** * *(dict) --* * **ingestionJob** *(dict) --* Contains information about the stopped data ingestion job. * **dataSourceId** *(string) --* The unique identifier of the data source for the data ingestion job. * **description** *(string) --* The description of the data ingestion job. * **failureReasons** *(list) --* A list of reasons that the data ingestion job failed. * *(string) --* * **ingestionJobId** *(string) --* The unique identifier of the data ingestion job. * **knowledgeBaseId** *(string) --* The unique identifier of the knowledge for the data ingestion job. * **startedAt** *(datetime) --* The time the data ingestion job started. If you stop a data ingestion job, the "startedAt" time is the time the job was started before the job was stopped. * **statistics** *(dict) --* Contains statistics about the data ingestion job. * **numberOfDocumentsDeleted** *(integer) --* The number of source documents that were deleted. * **numberOfDocumentsFailed** *(integer) --* The number of source documents that failed to be ingested. * **numberOfDocumentsScanned** *(integer) --* The total number of source documents that were scanned. Includes new, updated, and unchanged documents. * **numberOfMetadataDocumentsModified** *(integer) --* The number of metadata files that were updated or deleted. * **numberOfMetadataDocumentsScanned** *(integer) --* The total number of metadata files that were scanned. Includes new, updated, and unchanged files. * **numberOfModifiedDocumentsIndexed** *(integer) --* The number of modified source documents in the data source that were successfully indexed. * **numberOfNewDocumentsIndexed** *(integer) --* The number of new source documents in the data source that were successfully indexed. * **status** *(string) --* The status of the data ingestion job. * **updatedAt** *(datetime) --* The time the data ingestion job was last updated. If you stop a data ingestion job, the "updatedAt" time is the time the job was stopped. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException" AgentsforBedrock / Client / get_knowledge_base_documents get_knowledge_base_documents **************************** AgentsforBedrock.Client.get_knowledge_base_documents(**kwargs) Retrieves specific documents from a data source that is connected to a knowledge base. For more information, see Ingest changes directly into a knowledge base in the Amazon Bedrock User Guide. See also: AWS API Documentation **Request Syntax** response = client.get_knowledge_base_documents( dataSourceId='string', documentIdentifiers=[ { 'custom': { 'id': 'string' }, 'dataSourceType': 'CUSTOM'|'S3', 's3': { 'uri': 'string' } }, ], knowledgeBaseId='string' ) Parameters: * **dataSourceId** (*string*) -- **[REQUIRED]** The unique identifier of the data source that contains the documents. * **documentIdentifiers** (*list*) -- **[REQUIRED]** A list of objects, each of which contains information to identify a document for which to retrieve information. * *(dict) --* Contains information that identifies the document. * **custom** *(dict) --* Contains information that identifies the document in a custom data source. * **id** *(string) --* **[REQUIRED]** The identifier of the document to ingest into a custom data source. * **dataSourceType** *(string) --* **[REQUIRED]** The type of data source connected to the knowledge base that contains the document. * **s3** *(dict) --* Contains information that identifies the document in an S3 data source. * **uri** *(string) --* **[REQUIRED]** The location's URI. For example, "s3://my-bucket/chunk- processor/". * **knowledgeBaseId** (*string*) -- **[REQUIRED]** The unique identifier of the knowledge base that is connected to the data source. Return type: dict Returns: **Response Syntax** { 'documentDetails': [ { 'dataSourceId': 'string', 'identifier': { 'custom': { 'id': 'string' }, 'dataSourceType': 'CUSTOM'|'S3', 's3': { 'uri': 'string' } }, 'knowledgeBaseId': 'string', 'status': 'INDEXED'|'PARTIALLY_INDEXED'|'PENDING'|'FAILED'|'METADATA_PARTIALLY_INDEXED'|'METADATA_UPDATE_FAILED'|'IGNORED'|'NOT_FOUND'|'STARTING'|'IN_PROGRESS'|'DELETING'|'DELETE_IN_PROGRESS', 'statusReason': 'string', 'updatedAt': datetime(2015, 1, 1) }, ] } **Response Structure** * *(dict) --* * **documentDetails** *(list) --* A list of objects, each of which contains information about the documents that were retrieved. * *(dict) --* Contains the details for a document that was ingested or deleted. * **dataSourceId** *(string) --* The identifier of the data source connected to the knowledge base that the document was ingested into or deleted from. * **identifier** *(dict) --* Contains information that identifies the document. * **custom** *(dict) --* Contains information that identifies the document in a custom data source. * **id** *(string) --* The identifier of the document to ingest into a custom data source. * **dataSourceType** *(string) --* The type of data source connected to the knowledge base that contains the document. * **s3** *(dict) --* Contains information that identifies the document in an S3 data source. * **uri** *(string) --* The location's URI. For example, "s3://my-bucket /chunk-processor/". * **knowledgeBaseId** *(string) --* The identifier of the knowledge base that the document was ingested into or deleted from. * **status** *(string) --* The ingestion status of the document. The following statuses are possible: * STARTED – You submitted the ingestion job containing the document. * PENDING – The document is waiting to be ingested. * IN_PROGRESS – The document is being ingested. * INDEXED – The document was successfully indexed. * PARTIALLY_INDEXED – The document was partially indexed. * METADATA_PARTIALLY_INDEXED – You submitted metadata for an existing document and it was partially indexed. * METADATA_UPDATE_FAILED – You submitted a metadata update for an existing document but it failed. * FAILED – The document failed to be ingested. * NOT_FOUND – The document wasn't found. * IGNORED – The document was ignored during ingestion. * DELETING – You submitted the delete job containing the document. * DELETE_IN_PROGRESS – The document is being deleted. * **statusReason** *(string) --* The reason for the status. Appears alongside the status "IGNORED". * **updatedAt** *(datetime) --* The date and time at which the document was last updated. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ServiceQuotaExceededExceptio n" AgentsforBedrock / Client / delete_flow delete_flow *********** AgentsforBedrock.Client.delete_flow(**kwargs) Deletes a flow. See also: AWS API Documentation **Request Syntax** response = client.delete_flow( flowIdentifier='string', skipResourceInUseCheck=True|False ) Parameters: * **flowIdentifier** (*string*) -- **[REQUIRED]** The unique identifier of the flow. * **skipResourceInUseCheck** (*boolean*) -- By default, this value is "false" and deletion is stopped if the resource is in use. If you set it to "true", the resource will be deleted even if the resource is in use. Return type: dict Returns: **Response Syntax** { 'id': 'string' } **Response Structure** * *(dict) --* * **id** *(string) --* The unique identifier of the flow. **Exceptions** * "AgentsforBedrock.Client.exceptions.ThrottlingException" * "AgentsforBedrock.Client.exceptions.AccessDeniedException" * "AgentsforBedrock.Client.exceptions.ValidationException" * "AgentsforBedrock.Client.exceptions.InternalServerException" * "AgentsforBedrock.Client.exceptions.ResourceNotFoundException" * "AgentsforBedrock.Client.exceptions.ConflictException"