Skip to content

AgentsforBedrockClient#

Index > AgentsforBedrock > AgentsforBedrockClient

Auto-generated documentation for AgentsforBedrock type annotations stubs module types-boto3-bedrock-agent.

AgentsforBedrockClient#

Type annotations and code completion for boto3.client("bedrock-agent"). boto3 documentation

# AgentsforBedrockClient usage example

from boto3.session import Session
from types_boto3_bedrock_agent.client import AgentsforBedrockClient

def get_bedrock-agent_client() -> AgentsforBedrockClient:
    return Session().client("bedrock-agent")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("bedrock-agent").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("bedrock-agent")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from types_boto3_bedrock_agent.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

can_paginate#

Type annotations and code completion for boto3.client("bedrock-agent").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

generate_presigned_url#

Type annotations and code completion for boto3.client("bedrock-agent").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

associate_agent_collaborator#

Makes an agent a collaborator for another agent.

Type annotations and code completion for boto3.client("bedrock-agent").associate_agent_collaborator method. boto3 documentation

# associate_agent_collaborator method definition

def associate_agent_collaborator(
    self,
    *,
    agentId: str,
    agentVersion: str,
    agentDescriptor: AgentDescriptorTypeDef,  # (1)
    collaboratorName: str,
    collaborationInstruction: str,
    relayConversationHistory: RelayConversationHistoryType = ...,  # (2)
    clientToken: str = ...,
) -> AssociateAgentCollaboratorResponseTypeDef:  # (3)
    ...
  1. See AgentDescriptorTypeDef
  2. See RelayConversationHistoryType
  3. See AssociateAgentCollaboratorResponseTypeDef
# associate_agent_collaborator method usage example with argument unpacking

kwargs: AssociateAgentCollaboratorRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "agentDescriptor": ...,
    "collaboratorName": ...,
    "collaborationInstruction": ...,
}

parent.associate_agent_collaborator(**kwargs)
  1. See AssociateAgentCollaboratorRequestTypeDef

associate_agent_knowledge_base#

Associates a knowledge base with an agent.

Type annotations and code completion for boto3.client("bedrock-agent").associate_agent_knowledge_base method. boto3 documentation

# associate_agent_knowledge_base method definition

def associate_agent_knowledge_base(
    self,
    *,
    agentId: str,
    agentVersion: str,
    knowledgeBaseId: str,
    description: str,
    knowledgeBaseState: KnowledgeBaseStateType = ...,  # (1)
) -> AssociateAgentKnowledgeBaseResponseTypeDef:  # (2)
    ...
  1. See KnowledgeBaseStateType
  2. See AssociateAgentKnowledgeBaseResponseTypeDef
# associate_agent_knowledge_base method usage example with argument unpacking

kwargs: AssociateAgentKnowledgeBaseRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "knowledgeBaseId": ...,
    "description": ...,
}

parent.associate_agent_knowledge_base(**kwargs)
  1. See AssociateAgentKnowledgeBaseRequestTypeDef

create_agent#

Amazon Bedrock Agents (now Amazon Bedrock Agents Classic) is no longer open to new customers.

Type annotations and code completion for boto3.client("bedrock-agent").create_agent method. boto3 documentation

# create_agent method definition

def create_agent(
    self,
    *,
    agentName: str,
    clientToken: str = ...,
    instruction: str = ...,
    foundationModel: str = ...,
    description: str = ...,
    orchestrationType: OrchestrationTypeType = ...,  # (1)
    customOrchestration: CustomOrchestrationTypeDef = ...,  # (2)
    idleSessionTTLInSeconds: int = ...,
    agentResourceRoleArn: str = ...,
    customerEncryptionKeyArn: str = ...,
    tags: Mapping[str, str] = ...,
    promptOverrideConfiguration: PromptOverrideConfigurationUnionTypeDef = ...,  # (3)
    guardrailConfiguration: GuardrailConfigurationTypeDef = ...,  # (4)
    memoryConfiguration: MemoryConfigurationUnionTypeDef = ...,  # (5)
    agentCollaboration: AgentCollaborationType = ...,  # (6)
) -> CreateAgentResponseTypeDef:  # (7)
    ...
  1. See OrchestrationTypeType
  2. See CustomOrchestrationTypeDef
  3. See PromptOverrideConfigurationUnionTypeDef
  4. See GuardrailConfigurationTypeDef
  5. See MemoryConfigurationUnionTypeDef
  6. See AgentCollaborationType
  7. See CreateAgentResponseTypeDef
# create_agent method usage example with argument unpacking

kwargs: CreateAgentRequestTypeDef = {  # (1)
    "agentName": ...,
}

parent.create_agent(**kwargs)
  1. See CreateAgentRequestTypeDef

create_agent_action_group#

Creates an action group for an agent.

Type annotations and code completion for boto3.client("bedrock-agent").create_agent_action_group method. boto3 documentation

# create_agent_action_group method definition

def create_agent_action_group(
    self,
    *,
    agentId: str,
    agentVersion: str,
    actionGroupName: str,
    clientToken: str = ...,
    description: str = ...,
    parentActionGroupSignature: ActionGroupSignatureType = ...,  # (1)
    parentActionGroupSignatureParams: Mapping[str, str] = ...,
    actionGroupExecutor: ActionGroupExecutorTypeDef = ...,  # (2)
    apiSchema: APISchemaTypeDef = ...,  # (3)
    actionGroupState: ActionGroupStateType = ...,  # (4)
    functionSchema: FunctionSchemaUnionTypeDef = ...,  # (5)
) -> CreateAgentActionGroupResponseTypeDef:  # (6)
    ...
  1. See ActionGroupSignatureType
  2. See ActionGroupExecutorTypeDef
  3. See APISchemaTypeDef
  4. See ActionGroupStateType
  5. See FunctionSchemaUnionTypeDef
  6. See CreateAgentActionGroupResponseTypeDef
# create_agent_action_group method usage example with argument unpacking

kwargs: CreateAgentActionGroupRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "actionGroupName": ...,
}

parent.create_agent_action_group(**kwargs)
  1. See CreateAgentActionGroupRequestTypeDef

create_agent_alias#

Creates an alias of an agent that can be used to deploy the agent.

Type annotations and code completion for boto3.client("bedrock-agent").create_agent_alias method. boto3 documentation

# create_agent_alias method definition

def create_agent_alias(
    self,
    *,
    agentId: str,
    agentAliasName: str,
    clientToken: str = ...,
    description: str = ...,
    routingConfiguration: Sequence[AgentAliasRoutingConfigurationListItemTypeDef] = ...,  # (1)
    tags: Mapping[str, str] = ...,
) -> CreateAgentAliasResponseTypeDef:  # (2)
    ...
  1. See Sequence[AgentAliasRoutingConfigurationListItemTypeDef]
  2. See CreateAgentAliasResponseTypeDef
# create_agent_alias method usage example with argument unpacking

kwargs: CreateAgentAliasRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentAliasName": ...,
}

parent.create_agent_alias(**kwargs)
  1. See CreateAgentAliasRequestTypeDef

create_data_source#

Connects a knowledge base to a data source.

Type annotations and code completion for boto3.client("bedrock-agent").create_data_source method. boto3 documentation

# create_data_source method definition

def create_data_source(
    self,
    *,
    knowledgeBaseId: str,
    name: str,
    dataSourceConfiguration: DataSourceConfigurationUnionTypeDef,  # (1)
    clientToken: str = ...,
    description: str = ...,
    dataDeletionPolicy: DataDeletionPolicyType = ...,  # (2)
    serverSideEncryptionConfiguration: ServerSideEncryptionConfigurationTypeDef = ...,  # (3)
    vectorIngestionConfiguration: VectorIngestionConfigurationUnionTypeDef = ...,  # (4)
) -> CreateDataSourceResponseTypeDef:  # (5)
    ...
  1. See DataSourceConfigurationUnionTypeDef
  2. See DataDeletionPolicyType
  3. See ServerSideEncryptionConfigurationTypeDef
  4. See VectorIngestionConfigurationUnionTypeDef
  5. See CreateDataSourceResponseTypeDef
# create_data_source method usage example with argument unpacking

kwargs: CreateDataSourceRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "name": ...,
    "dataSourceConfiguration": ...,
}

parent.create_data_source(**kwargs)
  1. See CreateDataSourceRequestTypeDef

create_flow#

Creates a prompt flow that you can use to send an input through various steps to yield an output.

Type annotations and code completion for boto3.client("bedrock-agent").create_flow method. boto3 documentation

# create_flow method definition

def create_flow(
    self,
    *,
    name: str,
    executionRoleArn: str,
    description: str = ...,
    customerEncryptionKeyArn: str = ...,
    definition: FlowDefinitionUnionTypeDef = ...,  # (1)
    clientToken: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreateFlowResponseTypeDef:  # (2)
    ...
  1. See FlowDefinitionUnionTypeDef
  2. See CreateFlowResponseTypeDef
# create_flow method usage example with argument unpacking

kwargs: CreateFlowRequestTypeDef = {  # (1)
    "name": ...,
    "executionRoleArn": ...,
}

parent.create_flow(**kwargs)
  1. See CreateFlowRequestTypeDef

create_flow_alias#

Creates an alias of a flow for deployment.

Type annotations and code completion for boto3.client("bedrock-agent").create_flow_alias method. boto3 documentation

# create_flow_alias method definition

def create_flow_alias(
    self,
    *,
    name: str,
    routingConfiguration: Sequence[FlowAliasRoutingConfigurationListItemTypeDef],  # (1)
    flowIdentifier: str,
    description: str = ...,
    concurrencyConfiguration: FlowAliasConcurrencyConfigurationTypeDef = ...,  # (2)
    clientToken: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreateFlowAliasResponseTypeDef:  # (3)
    ...
  1. See Sequence[FlowAliasRoutingConfigurationListItemTypeDef]
  2. See FlowAliasConcurrencyConfigurationTypeDef
  3. See CreateFlowAliasResponseTypeDef
# create_flow_alias method usage example with argument unpacking

kwargs: CreateFlowAliasRequestTypeDef = {  # (1)
    "name": ...,
    "routingConfiguration": ...,
    "flowIdentifier": ...,
}

parent.create_flow_alias(**kwargs)
  1. See CreateFlowAliasRequestTypeDef

create_flow_version#

Creates a version of the flow that you can deploy.

Type annotations and code completion for boto3.client("bedrock-agent").create_flow_version method. boto3 documentation

# create_flow_version method definition

def create_flow_version(
    self,
    *,
    flowIdentifier: str,
    description: str = ...,
    clientToken: str = ...,
) -> CreateFlowVersionResponseTypeDef:  # (1)
    ...
  1. See CreateFlowVersionResponseTypeDef
# create_flow_version method usage example with argument unpacking

kwargs: CreateFlowVersionRequestTypeDef = {  # (1)
    "flowIdentifier": ...,
}

parent.create_flow_version(**kwargs)
  1. See CreateFlowVersionRequestTypeDef

create_knowledge_base#

Creates a knowledge base.

Type annotations and code completion for boto3.client("bedrock-agent").create_knowledge_base method. boto3 documentation

# create_knowledge_base method definition

def create_knowledge_base(
    self,
    *,
    name: str,
    roleArn: str,
    knowledgeBaseConfiguration: KnowledgeBaseConfigurationUnionTypeDef,  # (1)
    clientToken: str = ...,
    description: str = ...,
    storageConfiguration: StorageConfigurationTypeDef = ...,  # (2)
    tags: Mapping[str, str] = ...,
) -> CreateKnowledgeBaseResponseTypeDef:  # (3)
    ...
  1. See KnowledgeBaseConfigurationUnionTypeDef
  2. See StorageConfigurationTypeDef
  3. See CreateKnowledgeBaseResponseTypeDef
# create_knowledge_base method usage example with argument unpacking

kwargs: CreateKnowledgeBaseRequestTypeDef = {  # (1)
    "name": ...,
    "roleArn": ...,
    "knowledgeBaseConfiguration": ...,
}

parent.create_knowledge_base(**kwargs)
  1. See CreateKnowledgeBaseRequestTypeDef

create_prompt#

Creates a prompt in your prompt library that you can add to a flow.

Type annotations and code completion for boto3.client("bedrock-agent").create_prompt method. boto3 documentation

# create_prompt method definition

def create_prompt(
    self,
    *,
    name: str,
    description: str = ...,
    customerEncryptionKeyArn: str = ...,
    defaultVariant: str = ...,
    variants: Sequence[PromptVariantUnionTypeDef] = ...,  # (1)
    clientToken: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreatePromptResponseTypeDef:  # (2)
    ...
  1. See Sequence[PromptVariantUnionTypeDef]
  2. See CreatePromptResponseTypeDef
# create_prompt method usage example with argument unpacking

kwargs: CreatePromptRequestTypeDef = {  # (1)
    "name": ...,
}

parent.create_prompt(**kwargs)
  1. See CreatePromptRequestTypeDef

create_prompt_version#

Creates a static snapshot of your prompt that can be deployed to production.

Type annotations and code completion for boto3.client("bedrock-agent").create_prompt_version method. boto3 documentation

# create_prompt_version method definition

def create_prompt_version(
    self,
    *,
    promptIdentifier: str,
    description: str = ...,
    clientToken: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreatePromptVersionResponseTypeDef:  # (1)
    ...
  1. See CreatePromptVersionResponseTypeDef
# create_prompt_version method usage example with argument unpacking

kwargs: CreatePromptVersionRequestTypeDef = {  # (1)
    "promptIdentifier": ...,
}

parent.create_prompt_version(**kwargs)
  1. See CreatePromptVersionRequestTypeDef

delete_agent#

Deletes an agent.

Type annotations and code completion for boto3.client("bedrock-agent").delete_agent method. boto3 documentation

# delete_agent method definition

def delete_agent(
    self,
    *,
    agentId: str,
    skipResourceInUseCheck: bool = ...,
) -> DeleteAgentResponseTypeDef:  # (1)
    ...
  1. See DeleteAgentResponseTypeDef
# delete_agent method usage example with argument unpacking

kwargs: DeleteAgentRequestTypeDef = {  # (1)
    "agentId": ...,
}

parent.delete_agent(**kwargs)
  1. See DeleteAgentRequestTypeDef

delete_agent_action_group#

Deletes an action group in an agent.

Type annotations and code completion for boto3.client("bedrock-agent").delete_agent_action_group method. boto3 documentation

# delete_agent_action_group method definition

def delete_agent_action_group(
    self,
    *,
    agentId: str,
    agentVersion: str,
    actionGroupId: str,
    skipResourceInUseCheck: bool = ...,
) -> dict[str, Any]:
    ...
# delete_agent_action_group method usage example with argument unpacking

kwargs: DeleteAgentActionGroupRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "actionGroupId": ...,
}

parent.delete_agent_action_group(**kwargs)
  1. See DeleteAgentActionGroupRequestTypeDef

delete_agent_alias#

Deletes an alias of an agent.

Type annotations and code completion for boto3.client("bedrock-agent").delete_agent_alias method. boto3 documentation

# delete_agent_alias method definition

def delete_agent_alias(
    self,
    *,
    agentId: str,
    agentAliasId: str,
) -> DeleteAgentAliasResponseTypeDef:  # (1)
    ...
  1. See DeleteAgentAliasResponseTypeDef
# delete_agent_alias method usage example with argument unpacking

kwargs: DeleteAgentAliasRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentAliasId": ...,
}

parent.delete_agent_alias(**kwargs)
  1. See DeleteAgentAliasRequestTypeDef

delete_agent_version#

Deletes a version of an agent.

Type annotations and code completion for boto3.client("bedrock-agent").delete_agent_version method. boto3 documentation

# delete_agent_version method definition

def delete_agent_version(
    self,
    *,
    agentId: str,
    agentVersion: str,
    skipResourceInUseCheck: bool = ...,
) -> DeleteAgentVersionResponseTypeDef:  # (1)
    ...
  1. See DeleteAgentVersionResponseTypeDef
# delete_agent_version method usage example with argument unpacking

kwargs: DeleteAgentVersionRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
}

parent.delete_agent_version(**kwargs)
  1. See DeleteAgentVersionRequestTypeDef

delete_data_source#

Deletes a data source from a knowledge base.

Type annotations and code completion for boto3.client("bedrock-agent").delete_data_source method. boto3 documentation

# delete_data_source method definition

def delete_data_source(
    self,
    *,
    knowledgeBaseId: str,
    dataSourceId: str,
) -> DeleteDataSourceResponseTypeDef:  # (1)
    ...
  1. See DeleteDataSourceResponseTypeDef
# delete_data_source method usage example with argument unpacking

kwargs: DeleteDataSourceRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
}

parent.delete_data_source(**kwargs)
  1. See DeleteDataSourceRequestTypeDef

delete_flow#

Deletes a flow.

Type annotations and code completion for boto3.client("bedrock-agent").delete_flow method. boto3 documentation

# delete_flow method definition

def delete_flow(
    self,
    *,
    flowIdentifier: str,
    skipResourceInUseCheck: bool = ...,
) -> DeleteFlowResponseTypeDef:  # (1)
    ...
  1. See DeleteFlowResponseTypeDef
# delete_flow method usage example with argument unpacking

kwargs: DeleteFlowRequestTypeDef = {  # (1)
    "flowIdentifier": ...,
}

parent.delete_flow(**kwargs)
  1. See DeleteFlowRequestTypeDef

delete_flow_alias#

Deletes an alias of a flow.

Type annotations and code completion for boto3.client("bedrock-agent").delete_flow_alias method. boto3 documentation

# delete_flow_alias method definition

def delete_flow_alias(
    self,
    *,
    flowIdentifier: str,
    aliasIdentifier: str,
) -> DeleteFlowAliasResponseTypeDef:  # (1)
    ...
  1. See DeleteFlowAliasResponseTypeDef
# delete_flow_alias method usage example with argument unpacking

kwargs: DeleteFlowAliasRequestTypeDef = {  # (1)
    "flowIdentifier": ...,
    "aliasIdentifier": ...,
}

parent.delete_flow_alias(**kwargs)
  1. See DeleteFlowAliasRequestTypeDef

delete_flow_version#

Deletes a version of a flow.

Type annotations and code completion for boto3.client("bedrock-agent").delete_flow_version method. boto3 documentation

# delete_flow_version method definition

def delete_flow_version(
    self,
    *,
    flowIdentifier: str,
    flowVersion: str,
    skipResourceInUseCheck: bool = ...,
) -> DeleteFlowVersionResponseTypeDef:  # (1)
    ...
  1. See DeleteFlowVersionResponseTypeDef
# delete_flow_version method usage example with argument unpacking

kwargs: DeleteFlowVersionRequestTypeDef = {  # (1)
    "flowIdentifier": ...,
    "flowVersion": ...,
}

parent.delete_flow_version(**kwargs)
  1. See DeleteFlowVersionRequestTypeDef

delete_knowledge_base#

Deletes a knowledge base.

Type annotations and code completion for boto3.client("bedrock-agent").delete_knowledge_base method. boto3 documentation

# delete_knowledge_base method definition

def delete_knowledge_base(
    self,
    *,
    knowledgeBaseId: str,
) -> DeleteKnowledgeBaseResponseTypeDef:  # (1)
    ...
  1. See DeleteKnowledgeBaseResponseTypeDef
# delete_knowledge_base method usage example with argument unpacking

kwargs: DeleteKnowledgeBaseRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
}

parent.delete_knowledge_base(**kwargs)
  1. See DeleteKnowledgeBaseRequestTypeDef

delete_knowledge_base_documents#

Deletes documents from a data source and syncs the changes to the knowledge base that is connected to it.

Type annotations and code completion for boto3.client("bedrock-agent").delete_knowledge_base_documents method. boto3 documentation

# delete_knowledge_base_documents method definition

def delete_knowledge_base_documents(
    self,
    *,
    knowledgeBaseId: str,
    dataSourceId: str,
    documentIdentifiers: Sequence[DocumentIdentifierTypeDef],  # (1)
    clientToken: str = ...,
) -> DeleteKnowledgeBaseDocumentsResponseTypeDef:  # (2)
    ...
  1. See Sequence[DocumentIdentifierTypeDef]
  2. See DeleteKnowledgeBaseDocumentsResponseTypeDef
# delete_knowledge_base_documents method usage example with argument unpacking

kwargs: DeleteKnowledgeBaseDocumentsRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
    "documentIdentifiers": ...,
}

parent.delete_knowledge_base_documents(**kwargs)
  1. See DeleteKnowledgeBaseDocumentsRequestTypeDef

delete_prompt#

Deletes a prompt or a version of it, depending on whether you include the promptVersion field or not.

Type annotations and code completion for boto3.client("bedrock-agent").delete_prompt method. boto3 documentation

# delete_prompt method definition

def delete_prompt(
    self,
    *,
    promptIdentifier: str,
    promptVersion: str = ...,
) -> DeletePromptResponseTypeDef:  # (1)
    ...
  1. See DeletePromptResponseTypeDef
# delete_prompt method usage example with argument unpacking

kwargs: DeletePromptRequestTypeDef = {  # (1)
    "promptIdentifier": ...,
}

parent.delete_prompt(**kwargs)
  1. See DeletePromptRequestTypeDef

delete_resource_policy#

Removes the resource policy associated with a knowledge base.

Type annotations and code completion for boto3.client("bedrock-agent").delete_resource_policy method. boto3 documentation

# delete_resource_policy method definition

def delete_resource_policy(
    self,
    *,
    resourceArn: str,
    expectedRevisionId: str = ...,
) -> DeleteResourcePolicyResponseTypeDef:  # (1)
    ...
  1. See DeleteResourcePolicyResponseTypeDef
# delete_resource_policy method usage example with argument unpacking

kwargs: DeleteResourcePolicyRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.delete_resource_policy(**kwargs)
  1. See DeleteResourcePolicyRequestTypeDef

disassociate_agent_collaborator#

Disassociates an agent collaborator.

Type annotations and code completion for boto3.client("bedrock-agent").disassociate_agent_collaborator method. boto3 documentation

# disassociate_agent_collaborator method definition

def disassociate_agent_collaborator(
    self,
    *,
    agentId: str,
    agentVersion: str,
    collaboratorId: str,
) -> dict[str, Any]:
    ...
# disassociate_agent_collaborator method usage example with argument unpacking

kwargs: DisassociateAgentCollaboratorRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "collaboratorId": ...,
}

parent.disassociate_agent_collaborator(**kwargs)
  1. See DisassociateAgentCollaboratorRequestTypeDef

disassociate_agent_knowledge_base#

Disassociates a knowledge base from an agent.

Type annotations and code completion for boto3.client("bedrock-agent").disassociate_agent_knowledge_base method. boto3 documentation

# disassociate_agent_knowledge_base method definition

def disassociate_agent_knowledge_base(
    self,
    *,
    agentId: str,
    agentVersion: str,
    knowledgeBaseId: str,
) -> dict[str, Any]:
    ...
# disassociate_agent_knowledge_base method usage example with argument unpacking

kwargs: DisassociateAgentKnowledgeBaseRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "knowledgeBaseId": ...,
}

parent.disassociate_agent_knowledge_base(**kwargs)
  1. See DisassociateAgentKnowledgeBaseRequestTypeDef

get_agent#

Gets information about an agent.

Type annotations and code completion for boto3.client("bedrock-agent").get_agent method. boto3 documentation

# get_agent method definition

def get_agent(
    self,
    *,
    agentId: str,
) -> GetAgentResponseTypeDef:  # (1)
    ...
  1. See GetAgentResponseTypeDef
# get_agent method usage example with argument unpacking

kwargs: GetAgentRequestTypeDef = {  # (1)
    "agentId": ...,
}

parent.get_agent(**kwargs)
  1. See GetAgentRequestTypeDef

get_agent_action_group#

Gets information about an action group for an agent.

Type annotations and code completion for boto3.client("bedrock-agent").get_agent_action_group method. boto3 documentation

# get_agent_action_group method definition

def get_agent_action_group(
    self,
    *,
    agentId: str,
    agentVersion: str,
    actionGroupId: str,
) -> GetAgentActionGroupResponseTypeDef:  # (1)
    ...
  1. See GetAgentActionGroupResponseTypeDef
# get_agent_action_group method usage example with argument unpacking

kwargs: GetAgentActionGroupRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "actionGroupId": ...,
}

parent.get_agent_action_group(**kwargs)
  1. See GetAgentActionGroupRequestTypeDef

get_agent_alias#

Gets information about an alias of an agent.

Type annotations and code completion for boto3.client("bedrock-agent").get_agent_alias method. boto3 documentation

# get_agent_alias method definition

def get_agent_alias(
    self,
    *,
    agentId: str,
    agentAliasId: str,
) -> GetAgentAliasResponseTypeDef:  # (1)
    ...
  1. See GetAgentAliasResponseTypeDef
# get_agent_alias method usage example with argument unpacking

kwargs: GetAgentAliasRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentAliasId": ...,
}

parent.get_agent_alias(**kwargs)
  1. See GetAgentAliasRequestTypeDef

get_agent_collaborator#

Retrieves information about an agent's collaborator.

Type annotations and code completion for boto3.client("bedrock-agent").get_agent_collaborator method. boto3 documentation

# get_agent_collaborator method definition

def get_agent_collaborator(
    self,
    *,
    agentId: str,
    agentVersion: str,
    collaboratorId: str,
) -> GetAgentCollaboratorResponseTypeDef:  # (1)
    ...
  1. See GetAgentCollaboratorResponseTypeDef
# get_agent_collaborator method usage example with argument unpacking

kwargs: GetAgentCollaboratorRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "collaboratorId": ...,
}

parent.get_agent_collaborator(**kwargs)
  1. See GetAgentCollaboratorRequestTypeDef

get_agent_knowledge_base#

Gets information about a knowledge base associated with an agent.

Type annotations and code completion for boto3.client("bedrock-agent").get_agent_knowledge_base method. boto3 documentation

# get_agent_knowledge_base method definition

def get_agent_knowledge_base(
    self,
    *,
    agentId: str,
    agentVersion: str,
    knowledgeBaseId: str,
) -> GetAgentKnowledgeBaseResponseTypeDef:  # (1)
    ...
  1. See GetAgentKnowledgeBaseResponseTypeDef
# get_agent_knowledge_base method usage example with argument unpacking

kwargs: GetAgentKnowledgeBaseRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "knowledgeBaseId": ...,
}

parent.get_agent_knowledge_base(**kwargs)
  1. See GetAgentKnowledgeBaseRequestTypeDef

get_agent_version#

Gets details about a version of an agent.

Type annotations and code completion for boto3.client("bedrock-agent").get_agent_version method. boto3 documentation

# get_agent_version method definition

def get_agent_version(
    self,
    *,
    agentId: str,
    agentVersion: str,
) -> GetAgentVersionResponseTypeDef:  # (1)
    ...
  1. See GetAgentVersionResponseTypeDef
# get_agent_version method usage example with argument unpacking

kwargs: GetAgentVersionRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
}

parent.get_agent_version(**kwargs)
  1. See GetAgentVersionRequestTypeDef

get_data_source#

Gets information about a data source.

Type annotations and code completion for boto3.client("bedrock-agent").get_data_source method. boto3 documentation

# get_data_source method definition

def get_data_source(
    self,
    *,
    knowledgeBaseId: str,
    dataSourceId: str,
) -> GetDataSourceResponseTypeDef:  # (1)
    ...
  1. See GetDataSourceResponseTypeDef
# get_data_source method usage example with argument unpacking

kwargs: GetDataSourceRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
}

parent.get_data_source(**kwargs)
  1. See GetDataSourceRequestTypeDef

get_flow#

Retrieves information about a flow.

Type annotations and code completion for boto3.client("bedrock-agent").get_flow method. boto3 documentation

# get_flow method definition

def get_flow(
    self,
    *,
    flowIdentifier: str,
    includedData: IncludedDataType = ...,  # (1)
) -> GetFlowResponseTypeDef:  # (2)
    ...
  1. See IncludedDataType
  2. See GetFlowResponseTypeDef
# get_flow method usage example with argument unpacking

kwargs: GetFlowRequestTypeDef = {  # (1)
    "flowIdentifier": ...,
}

parent.get_flow(**kwargs)
  1. See GetFlowRequestTypeDef

get_flow_alias#

Retrieves information about a flow.

Type annotations and code completion for boto3.client("bedrock-agent").get_flow_alias method. boto3 documentation

# get_flow_alias method definition

def get_flow_alias(
    self,
    *,
    flowIdentifier: str,
    aliasIdentifier: str,
) -> GetFlowAliasResponseTypeDef:  # (1)
    ...
  1. See GetFlowAliasResponseTypeDef
# get_flow_alias method usage example with argument unpacking

kwargs: GetFlowAliasRequestTypeDef = {  # (1)
    "flowIdentifier": ...,
    "aliasIdentifier": ...,
}

parent.get_flow_alias(**kwargs)
  1. See GetFlowAliasRequestTypeDef

get_flow_version#

Retrieves information about a version of a flow.

Type annotations and code completion for boto3.client("bedrock-agent").get_flow_version method. boto3 documentation

# get_flow_version method definition

def get_flow_version(
    self,
    *,
    flowIdentifier: str,
    flowVersion: str,
    includedData: IncludedDataType = ...,  # (1)
) -> GetFlowVersionResponseTypeDef:  # (2)
    ...
  1. See IncludedDataType
  2. See GetFlowVersionResponseTypeDef
# get_flow_version method usage example with argument unpacking

kwargs: GetFlowVersionRequestTypeDef = {  # (1)
    "flowIdentifier": ...,
    "flowVersion": ...,
}

parent.get_flow_version(**kwargs)
  1. See GetFlowVersionRequestTypeDef

get_ingestion_job#

Gets information about a data ingestion job.

Type annotations and code completion for boto3.client("bedrock-agent").get_ingestion_job method. boto3 documentation

# get_ingestion_job method definition

def get_ingestion_job(
    self,
    *,
    knowledgeBaseId: str,
    dataSourceId: str,
    ingestionJobId: str,
) -> GetIngestionJobResponseTypeDef:  # (1)
    ...
  1. See GetIngestionJobResponseTypeDef
# get_ingestion_job method usage example with argument unpacking

kwargs: GetIngestionJobRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
    "ingestionJobId": ...,
}

parent.get_ingestion_job(**kwargs)
  1. See GetIngestionJobRequestTypeDef

get_knowledge_base#

Gets information about a knowledge base.

Type annotations and code completion for boto3.client("bedrock-agent").get_knowledge_base method. boto3 documentation

# get_knowledge_base method definition

def get_knowledge_base(
    self,
    *,
    knowledgeBaseId: str,
) -> GetKnowledgeBaseResponseTypeDef:  # (1)
    ...
  1. See GetKnowledgeBaseResponseTypeDef
# get_knowledge_base method usage example with argument unpacking

kwargs: GetKnowledgeBaseRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
}

parent.get_knowledge_base(**kwargs)
  1. See GetKnowledgeBaseRequestTypeDef

get_knowledge_base_documents#

Retrieves specific documents from a data source that is connected to a knowledge base.

Type annotations and code completion for boto3.client("bedrock-agent").get_knowledge_base_documents method. boto3 documentation

# get_knowledge_base_documents method definition

def get_knowledge_base_documents(
    self,
    *,
    knowledgeBaseId: str,
    dataSourceId: str,
    documentIdentifiers: Sequence[DocumentIdentifierTypeDef],  # (1)
) -> GetKnowledgeBaseDocumentsResponseTypeDef:  # (2)
    ...
  1. See Sequence[DocumentIdentifierTypeDef]
  2. See GetKnowledgeBaseDocumentsResponseTypeDef
# get_knowledge_base_documents method usage example with argument unpacking

kwargs: GetKnowledgeBaseDocumentsRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
    "documentIdentifiers": ...,
}

parent.get_knowledge_base_documents(**kwargs)
  1. See GetKnowledgeBaseDocumentsRequestTypeDef

get_prompt#

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.

Type annotations and code completion for boto3.client("bedrock-agent").get_prompt method. boto3 documentation

# get_prompt method definition

def get_prompt(
    self,
    *,
    promptIdentifier: str,
    promptVersion: str = ...,
    includedData: IncludedDataType = ...,  # (1)
) -> GetPromptResponseTypeDef:  # (2)
    ...
  1. See IncludedDataType
  2. See GetPromptResponseTypeDef
# get_prompt method usage example with argument unpacking

kwargs: GetPromptRequestTypeDef = {  # (1)
    "promptIdentifier": ...,
}

parent.get_prompt(**kwargs)
  1. See GetPromptRequestTypeDef

get_resource_policy#

Retrieves the resource policy associated with a knowledge base.

Type annotations and code completion for boto3.client("bedrock-agent").get_resource_policy method. boto3 documentation

# get_resource_policy method definition

def get_resource_policy(
    self,
    *,
    resourceArn: str,
) -> GetResourcePolicyResponseTypeDef:  # (1)
    ...
  1. See GetResourcePolicyResponseTypeDef
# get_resource_policy method usage example with argument unpacking

kwargs: GetResourcePolicyRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.get_resource_policy(**kwargs)
  1. See GetResourcePolicyRequestTypeDef

ingest_knowledge_base_documents#

Ingests documents directly into the knowledge base that is connected to the data source.

Type annotations and code completion for boto3.client("bedrock-agent").ingest_knowledge_base_documents method. boto3 documentation

# ingest_knowledge_base_documents method definition

def ingest_knowledge_base_documents(
    self,
    *,
    knowledgeBaseId: str,
    dataSourceId: str,
    documents: Sequence[KnowledgeBaseDocumentTypeDef],  # (1)
    clientToken: str = ...,
) -> IngestKnowledgeBaseDocumentsResponseTypeDef:  # (2)
    ...
  1. See Sequence[KnowledgeBaseDocumentTypeDef]
  2. See IngestKnowledgeBaseDocumentsResponseTypeDef
# ingest_knowledge_base_documents method usage example with argument unpacking

kwargs: IngestKnowledgeBaseDocumentsRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
    "documents": ...,
}

parent.ingest_knowledge_base_documents(**kwargs)
  1. See IngestKnowledgeBaseDocumentsRequestTypeDef

list_agent_action_groups#

Lists the action groups for an agent and information about each one.

Type annotations and code completion for boto3.client("bedrock-agent").list_agent_action_groups method. boto3 documentation

# list_agent_action_groups method definition

def list_agent_action_groups(
    self,
    *,
    agentId: str,
    agentVersion: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListAgentActionGroupsResponseTypeDef:  # (1)
    ...
  1. See ListAgentActionGroupsResponseTypeDef
# list_agent_action_groups method usage example with argument unpacking

kwargs: ListAgentActionGroupsRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
}

parent.list_agent_action_groups(**kwargs)
  1. See ListAgentActionGroupsRequestTypeDef

list_agent_aliases#

Lists the aliases of an agent and information about each one.

Type annotations and code completion for boto3.client("bedrock-agent").list_agent_aliases method. boto3 documentation

# list_agent_aliases method definition

def list_agent_aliases(
    self,
    *,
    agentId: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListAgentAliasesResponseTypeDef:  # (1)
    ...
  1. See ListAgentAliasesResponseTypeDef
# list_agent_aliases method usage example with argument unpacking

kwargs: ListAgentAliasesRequestTypeDef = {  # (1)
    "agentId": ...,
}

parent.list_agent_aliases(**kwargs)
  1. See ListAgentAliasesRequestTypeDef

list_agent_collaborators#

Retrieve a list of an agent's collaborators.

Type annotations and code completion for boto3.client("bedrock-agent").list_agent_collaborators method. boto3 documentation

# list_agent_collaborators method definition

def list_agent_collaborators(
    self,
    *,
    agentId: str,
    agentVersion: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListAgentCollaboratorsResponseTypeDef:  # (1)
    ...
  1. See ListAgentCollaboratorsResponseTypeDef
# list_agent_collaborators method usage example with argument unpacking

kwargs: ListAgentCollaboratorsRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
}

parent.list_agent_collaborators(**kwargs)
  1. See ListAgentCollaboratorsRequestTypeDef

list_agent_knowledge_bases#

Lists knowledge bases associated with an agent and information about each one.

Type annotations and code completion for boto3.client("bedrock-agent").list_agent_knowledge_bases method. boto3 documentation

# list_agent_knowledge_bases method definition

def list_agent_knowledge_bases(
    self,
    *,
    agentId: str,
    agentVersion: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListAgentKnowledgeBasesResponseTypeDef:  # (1)
    ...
  1. See ListAgentKnowledgeBasesResponseTypeDef
# list_agent_knowledge_bases method usage example with argument unpacking

kwargs: ListAgentKnowledgeBasesRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
}

parent.list_agent_knowledge_bases(**kwargs)
  1. See ListAgentKnowledgeBasesRequestTypeDef

list_agent_versions#

Lists the versions of an agent and information about each version.

Type annotations and code completion for boto3.client("bedrock-agent").list_agent_versions method. boto3 documentation

# list_agent_versions method definition

def list_agent_versions(
    self,
    *,
    agentId: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListAgentVersionsResponseTypeDef:  # (1)
    ...
  1. See ListAgentVersionsResponseTypeDef
# list_agent_versions method usage example with argument unpacking

kwargs: ListAgentVersionsRequestTypeDef = {  # (1)
    "agentId": ...,
}

parent.list_agent_versions(**kwargs)
  1. See ListAgentVersionsRequestTypeDef

list_agents#

Lists the agents belonging to an account and information about each agent.

Type annotations and code completion for boto3.client("bedrock-agent").list_agents method. boto3 documentation

# list_agents method definition

def list_agents(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListAgentsResponseTypeDef:  # (1)
    ...
  1. See ListAgentsResponseTypeDef
# list_agents method usage example with argument unpacking

kwargs: ListAgentsRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_agents(**kwargs)
  1. See ListAgentsRequestTypeDef

list_data_sources#

Lists the data sources in a knowledge base and information about each one.

Type annotations and code completion for boto3.client("bedrock-agent").list_data_sources method. boto3 documentation

# list_data_sources method definition

def list_data_sources(
    self,
    *,
    knowledgeBaseId: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListDataSourcesResponseTypeDef:  # (1)
    ...
  1. See ListDataSourcesResponseTypeDef
# list_data_sources method usage example with argument unpacking

kwargs: ListDataSourcesRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
}

parent.list_data_sources(**kwargs)
  1. See ListDataSourcesRequestTypeDef

list_flow_aliases#

Returns a list of aliases for a flow.

Type annotations and code completion for boto3.client("bedrock-agent").list_flow_aliases method. boto3 documentation

# list_flow_aliases method definition

def list_flow_aliases(
    self,
    *,
    flowIdentifier: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListFlowAliasesResponseTypeDef:  # (1)
    ...
  1. See ListFlowAliasesResponseTypeDef
# list_flow_aliases method usage example with argument unpacking

kwargs: ListFlowAliasesRequestTypeDef = {  # (1)
    "flowIdentifier": ...,
}

parent.list_flow_aliases(**kwargs)
  1. See ListFlowAliasesRequestTypeDef

list_flow_versions#

Returns a list of information about each flow.

Type annotations and code completion for boto3.client("bedrock-agent").list_flow_versions method. boto3 documentation

# list_flow_versions method definition

def list_flow_versions(
    self,
    *,
    flowIdentifier: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListFlowVersionsResponseTypeDef:  # (1)
    ...
  1. See ListFlowVersionsResponseTypeDef
# list_flow_versions method usage example with argument unpacking

kwargs: ListFlowVersionsRequestTypeDef = {  # (1)
    "flowIdentifier": ...,
}

parent.list_flow_versions(**kwargs)
  1. See ListFlowVersionsRequestTypeDef

list_flows#

Returns a list of flows and information about each flow.

Type annotations and code completion for boto3.client("bedrock-agent").list_flows method. boto3 documentation

# list_flows method definition

def list_flows(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListFlowsResponseTypeDef:  # (1)
    ...
  1. See ListFlowsResponseTypeDef
# list_flows method usage example with argument unpacking

kwargs: ListFlowsRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_flows(**kwargs)
  1. See ListFlowsRequestTypeDef

list_ingestion_jobs#

Lists the data ingestion jobs for a data source.

Type annotations and code completion for boto3.client("bedrock-agent").list_ingestion_jobs method. boto3 documentation

# list_ingestion_jobs method definition

def list_ingestion_jobs(
    self,
    *,
    knowledgeBaseId: str,
    dataSourceId: str,
    filters: Sequence[IngestionJobFilterTypeDef] = ...,  # (1)
    sortBy: IngestionJobSortByTypeDef = ...,  # (2)
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListIngestionJobsResponseTypeDef:  # (3)
    ...
  1. See Sequence[IngestionJobFilterTypeDef]
  2. See IngestionJobSortByTypeDef
  3. See ListIngestionJobsResponseTypeDef
# list_ingestion_jobs method usage example with argument unpacking

kwargs: ListIngestionJobsRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
}

parent.list_ingestion_jobs(**kwargs)
  1. See ListIngestionJobsRequestTypeDef

list_knowledge_base_documents#

Retrieves all the documents contained in a data source that is connected to a knowledge base.

Type annotations and code completion for boto3.client("bedrock-agent").list_knowledge_base_documents method. boto3 documentation

# list_knowledge_base_documents method definition

def list_knowledge_base_documents(
    self,
    *,
    knowledgeBaseId: str,
    dataSourceId: str,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListKnowledgeBaseDocumentsResponseTypeDef:  # (1)
    ...
  1. See ListKnowledgeBaseDocumentsResponseTypeDef
# list_knowledge_base_documents method usage example with argument unpacking

kwargs: ListKnowledgeBaseDocumentsRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
}

parent.list_knowledge_base_documents(**kwargs)
  1. See ListKnowledgeBaseDocumentsRequestTypeDef

list_knowledge_bases#

Lists the knowledge bases in an account.

Type annotations and code completion for boto3.client("bedrock-agent").list_knowledge_bases method. boto3 documentation

# list_knowledge_bases method definition

def list_knowledge_bases(
    self,
    *,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListKnowledgeBasesResponseTypeDef:  # (1)
    ...
  1. See ListKnowledgeBasesResponseTypeDef
# list_knowledge_bases method usage example with argument unpacking

kwargs: ListKnowledgeBasesRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_knowledge_bases(**kwargs)
  1. See ListKnowledgeBasesRequestTypeDef

list_prompts#

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.

Type annotations and code completion for boto3.client("bedrock-agent").list_prompts method. boto3 documentation

# list_prompts method definition

def list_prompts(
    self,
    *,
    promptIdentifier: str = ...,
    maxResults: int = ...,
    nextToken: str = ...,
) -> ListPromptsResponseTypeDef:  # (1)
    ...
  1. See ListPromptsResponseTypeDef
# list_prompts method usage example with argument unpacking

kwargs: ListPromptsRequestTypeDef = {  # (1)
    "promptIdentifier": ...,
}

parent.list_prompts(**kwargs)
  1. See ListPromptsRequestTypeDef

list_tags_for_resource#

List all the tags for the resource you specify.

Type annotations and code completion for boto3.client("bedrock-agent").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestTypeDef

prepare_agent#

Creates a DRAFT version of the agent that can be used for internal testing.

Type annotations and code completion for boto3.client("bedrock-agent").prepare_agent method. boto3 documentation

# prepare_agent method definition

def prepare_agent(
    self,
    *,
    agentId: str,
) -> PrepareAgentResponseTypeDef:  # (1)
    ...
  1. See PrepareAgentResponseTypeDef
# prepare_agent method usage example with argument unpacking

kwargs: PrepareAgentRequestTypeDef = {  # (1)
    "agentId": ...,
}

parent.prepare_agent(**kwargs)
  1. See PrepareAgentRequestTypeDef

prepare_flow#

Prepares the DRAFT version of a flow so that it can be invoked.

Type annotations and code completion for boto3.client("bedrock-agent").prepare_flow method. boto3 documentation

# prepare_flow method definition

def prepare_flow(
    self,
    *,
    flowIdentifier: str,
) -> PrepareFlowResponseTypeDef:  # (1)
    ...
  1. See PrepareFlowResponseTypeDef
# prepare_flow method usage example with argument unpacking

kwargs: PrepareFlowRequestTypeDef = {  # (1)
    "flowIdentifier": ...,
}

parent.prepare_flow(**kwargs)
  1. See PrepareFlowRequestTypeDef

put_resource_policy#

Associates a resource policy with a knowledge base.

Type annotations and code completion for boto3.client("bedrock-agent").put_resource_policy method. boto3 documentation

# put_resource_policy method definition

def put_resource_policy(
    self,
    *,
    resourceArn: str,
    policy: str,
    expectedRevisionId: str = ...,
) -> PutResourcePolicyResponseTypeDef:  # (1)
    ...
  1. See PutResourcePolicyResponseTypeDef
# put_resource_policy method usage example with argument unpacking

kwargs: PutResourcePolicyRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "policy": ...,
}

parent.put_resource_policy(**kwargs)
  1. See PutResourcePolicyRequestTypeDef

start_ingestion_job#

Begins a data ingestion job.

Type annotations and code completion for boto3.client("bedrock-agent").start_ingestion_job method. boto3 documentation

# start_ingestion_job method definition

def start_ingestion_job(
    self,
    *,
    knowledgeBaseId: str,
    dataSourceId: str,
    clientToken: str = ...,
    description: str = ...,
) -> StartIngestionJobResponseTypeDef:  # (1)
    ...
  1. See StartIngestionJobResponseTypeDef
# start_ingestion_job method usage example with argument unpacking

kwargs: StartIngestionJobRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
}

parent.start_ingestion_job(**kwargs)
  1. See StartIngestionJobRequestTypeDef

stop_ingestion_job#

Stops a currently running data ingestion job.

Type annotations and code completion for boto3.client("bedrock-agent").stop_ingestion_job method. boto3 documentation

# stop_ingestion_job method definition

def stop_ingestion_job(
    self,
    *,
    knowledgeBaseId: str,
    dataSourceId: str,
    ingestionJobId: str,
) -> StopIngestionJobResponseTypeDef:  # (1)
    ...
  1. See StopIngestionJobResponseTypeDef
# stop_ingestion_job method usage example with argument unpacking

kwargs: StopIngestionJobRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
    "ingestionJobId": ...,
}

parent.stop_ingestion_job(**kwargs)
  1. See StopIngestionJobRequestTypeDef

tag_resource#

Associate tags with a resource.

Type annotations and code completion for boto3.client("bedrock-agent").tag_resource method. boto3 documentation

# tag_resource method definition

def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Mapping[str, str],
) -> dict[str, Any]:
    ...
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestTypeDef

untag_resource#

Remove tags from a resource.

Type annotations and code completion for boto3.client("bedrock-agent").untag_resource method. boto3 documentation

# untag_resource method definition

def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> dict[str, Any]:
    ...
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestTypeDef

update_agent#

Updates the configuration of an agent.

Type annotations and code completion for boto3.client("bedrock-agent").update_agent method. boto3 documentation

# update_agent method definition

def update_agent(
    self,
    *,
    agentId: str,
    agentName: str,
    foundationModel: str,
    agentResourceRoleArn: str,
    instruction: str = ...,
    description: str = ...,
    orchestrationType: OrchestrationTypeType = ...,  # (1)
    customOrchestration: CustomOrchestrationTypeDef = ...,  # (2)
    idleSessionTTLInSeconds: int = ...,
    customerEncryptionKeyArn: str = ...,
    promptOverrideConfiguration: PromptOverrideConfigurationUnionTypeDef = ...,  # (3)
    guardrailConfiguration: GuardrailConfigurationTypeDef = ...,  # (4)
    memoryConfiguration: MemoryConfigurationUnionTypeDef = ...,  # (5)
    agentCollaboration: AgentCollaborationType = ...,  # (6)
) -> UpdateAgentResponseTypeDef:  # (7)
    ...
  1. See OrchestrationTypeType
  2. See CustomOrchestrationTypeDef
  3. See PromptOverrideConfigurationUnionTypeDef
  4. See GuardrailConfigurationTypeDef
  5. See MemoryConfigurationUnionTypeDef
  6. See AgentCollaborationType
  7. See UpdateAgentResponseTypeDef
# update_agent method usage example with argument unpacking

kwargs: UpdateAgentRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentName": ...,
    "foundationModel": ...,
    "agentResourceRoleArn": ...,
}

parent.update_agent(**kwargs)
  1. See UpdateAgentRequestTypeDef

update_agent_action_group#

Updates the configuration for an action group for an agent.

Type annotations and code completion for boto3.client("bedrock-agent").update_agent_action_group method. boto3 documentation

# update_agent_action_group method definition

def update_agent_action_group(
    self,
    *,
    agentId: str,
    agentVersion: str,
    actionGroupId: str,
    actionGroupName: str,
    description: str = ...,
    parentActionGroupSignature: ActionGroupSignatureType = ...,  # (1)
    parentActionGroupSignatureParams: Mapping[str, str] = ...,
    actionGroupExecutor: ActionGroupExecutorTypeDef = ...,  # (2)
    actionGroupState: ActionGroupStateType = ...,  # (3)
    apiSchema: APISchemaTypeDef = ...,  # (4)
    functionSchema: FunctionSchemaUnionTypeDef = ...,  # (5)
) -> UpdateAgentActionGroupResponseTypeDef:  # (6)
    ...
  1. See ActionGroupSignatureType
  2. See ActionGroupExecutorTypeDef
  3. See ActionGroupStateType
  4. See APISchemaTypeDef
  5. See FunctionSchemaUnionTypeDef
  6. See UpdateAgentActionGroupResponseTypeDef
# update_agent_action_group method usage example with argument unpacking

kwargs: UpdateAgentActionGroupRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "actionGroupId": ...,
    "actionGroupName": ...,
}

parent.update_agent_action_group(**kwargs)
  1. See UpdateAgentActionGroupRequestTypeDef

update_agent_alias#

Updates configurations for an alias of an agent.

Type annotations and code completion for boto3.client("bedrock-agent").update_agent_alias method. boto3 documentation

# update_agent_alias method definition

def update_agent_alias(
    self,
    *,
    agentId: str,
    agentAliasId: str,
    agentAliasName: str,
    description: str = ...,
    routingConfiguration: Sequence[AgentAliasRoutingConfigurationListItemTypeDef] = ...,  # (1)
    aliasInvocationState: AliasInvocationStateType = ...,  # (2)
) -> UpdateAgentAliasResponseTypeDef:  # (3)
    ...
  1. See Sequence[AgentAliasRoutingConfigurationListItemTypeDef]
  2. See AliasInvocationStateType
  3. See UpdateAgentAliasResponseTypeDef
# update_agent_alias method usage example with argument unpacking

kwargs: UpdateAgentAliasRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentAliasId": ...,
    "agentAliasName": ...,
}

parent.update_agent_alias(**kwargs)
  1. See UpdateAgentAliasRequestTypeDef

update_agent_collaborator#

Updates an agent's collaborator.

Type annotations and code completion for boto3.client("bedrock-agent").update_agent_collaborator method. boto3 documentation

# update_agent_collaborator method definition

def update_agent_collaborator(
    self,
    *,
    agentId: str,
    agentVersion: str,
    collaboratorId: str,
    agentDescriptor: AgentDescriptorTypeDef,  # (1)
    collaboratorName: str,
    collaborationInstruction: str,
    relayConversationHistory: RelayConversationHistoryType = ...,  # (2)
) -> UpdateAgentCollaboratorResponseTypeDef:  # (3)
    ...
  1. See AgentDescriptorTypeDef
  2. See RelayConversationHistoryType
  3. See UpdateAgentCollaboratorResponseTypeDef
# update_agent_collaborator method usage example with argument unpacking

kwargs: UpdateAgentCollaboratorRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "collaboratorId": ...,
    "agentDescriptor": ...,
    "collaboratorName": ...,
    "collaborationInstruction": ...,
}

parent.update_agent_collaborator(**kwargs)
  1. See UpdateAgentCollaboratorRequestTypeDef

update_agent_knowledge_base#

Updates the configuration for a knowledge base that has been associated with an agent.

Type annotations and code completion for boto3.client("bedrock-agent").update_agent_knowledge_base method. boto3 documentation

# update_agent_knowledge_base method definition

def update_agent_knowledge_base(
    self,
    *,
    agentId: str,
    agentVersion: str,
    knowledgeBaseId: str,
    description: str = ...,
    knowledgeBaseState: KnowledgeBaseStateType = ...,  # (1)
) -> UpdateAgentKnowledgeBaseResponseTypeDef:  # (2)
    ...
  1. See KnowledgeBaseStateType
  2. See UpdateAgentKnowledgeBaseResponseTypeDef
# update_agent_knowledge_base method usage example with argument unpacking

kwargs: UpdateAgentKnowledgeBaseRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "knowledgeBaseId": ...,
}

parent.update_agent_knowledge_base(**kwargs)
  1. See UpdateAgentKnowledgeBaseRequestTypeDef

update_data_source#

Updates the configurations for a data source connector.

Type annotations and code completion for boto3.client("bedrock-agent").update_data_source method. boto3 documentation

# update_data_source method definition

def update_data_source(
    self,
    *,
    knowledgeBaseId: str,
    dataSourceId: str,
    name: str,
    dataSourceConfiguration: DataSourceConfigurationUnionTypeDef,  # (1)
    description: str = ...,
    dataDeletionPolicy: DataDeletionPolicyType = ...,  # (2)
    serverSideEncryptionConfiguration: ServerSideEncryptionConfigurationTypeDef = ...,  # (3)
    vectorIngestionConfiguration: VectorIngestionConfigurationUnionTypeDef = ...,  # (4)
) -> UpdateDataSourceResponseTypeDef:  # (5)
    ...
  1. See DataSourceConfigurationUnionTypeDef
  2. See DataDeletionPolicyType
  3. See ServerSideEncryptionConfigurationTypeDef
  4. See VectorIngestionConfigurationUnionTypeDef
  5. See UpdateDataSourceResponseTypeDef
# update_data_source method usage example with argument unpacking

kwargs: UpdateDataSourceRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
    "name": ...,
    "dataSourceConfiguration": ...,
}

parent.update_data_source(**kwargs)
  1. See UpdateDataSourceRequestTypeDef

update_flow#

Modifies a flow.

Type annotations and code completion for boto3.client("bedrock-agent").update_flow method. boto3 documentation

# update_flow method definition

def update_flow(
    self,
    *,
    name: str,
    executionRoleArn: str,
    flowIdentifier: str,
    description: str = ...,
    customerEncryptionKeyArn: str = ...,
    definition: FlowDefinitionUnionTypeDef = ...,  # (1)
) -> UpdateFlowResponseTypeDef:  # (2)
    ...
  1. See FlowDefinitionUnionTypeDef
  2. See UpdateFlowResponseTypeDef
# update_flow method usage example with argument unpacking

kwargs: UpdateFlowRequestTypeDef = {  # (1)
    "name": ...,
    "executionRoleArn": ...,
    "flowIdentifier": ...,
}

parent.update_flow(**kwargs)
  1. See UpdateFlowRequestTypeDef

update_flow_alias#

Modifies the alias of a flow.

Type annotations and code completion for boto3.client("bedrock-agent").update_flow_alias method. boto3 documentation

# update_flow_alias method definition

def update_flow_alias(
    self,
    *,
    name: str,
    routingConfiguration: Sequence[FlowAliasRoutingConfigurationListItemTypeDef],  # (1)
    flowIdentifier: str,
    aliasIdentifier: str,
    description: str = ...,
    concurrencyConfiguration: FlowAliasConcurrencyConfigurationTypeDef = ...,  # (2)
) -> UpdateFlowAliasResponseTypeDef:  # (3)
    ...
  1. See Sequence[FlowAliasRoutingConfigurationListItemTypeDef]
  2. See FlowAliasConcurrencyConfigurationTypeDef
  3. See UpdateFlowAliasResponseTypeDef
# update_flow_alias method usage example with argument unpacking

kwargs: UpdateFlowAliasRequestTypeDef = {  # (1)
    "name": ...,
    "routingConfiguration": ...,
    "flowIdentifier": ...,
    "aliasIdentifier": ...,
}

parent.update_flow_alias(**kwargs)
  1. See UpdateFlowAliasRequestTypeDef

update_knowledge_base#

Updates the configuration of a knowledge base with the fields that you specify.

Type annotations and code completion for boto3.client("bedrock-agent").update_knowledge_base method. boto3 documentation

# update_knowledge_base method definition

def update_knowledge_base(
    self,
    *,
    knowledgeBaseId: str,
    name: str,
    roleArn: str,
    knowledgeBaseConfiguration: KnowledgeBaseConfigurationUnionTypeDef,  # (1)
    description: str = ...,
    storageConfiguration: StorageConfigurationTypeDef = ...,  # (2)
) -> UpdateKnowledgeBaseResponseTypeDef:  # (3)
    ...
  1. See KnowledgeBaseConfigurationUnionTypeDef
  2. See StorageConfigurationTypeDef
  3. See UpdateKnowledgeBaseResponseTypeDef
# update_knowledge_base method usage example with argument unpacking

kwargs: UpdateKnowledgeBaseRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "name": ...,
    "roleArn": ...,
    "knowledgeBaseConfiguration": ...,
}

parent.update_knowledge_base(**kwargs)
  1. See UpdateKnowledgeBaseRequestTypeDef

update_prompt#

Modifies a prompt in your prompt library.

Type annotations and code completion for boto3.client("bedrock-agent").update_prompt method. boto3 documentation

# update_prompt method definition

def update_prompt(
    self,
    *,
    name: str,
    promptIdentifier: str,
    description: str = ...,
    customerEncryptionKeyArn: str = ...,
    defaultVariant: str = ...,
    variants: Sequence[PromptVariantUnionTypeDef] = ...,  # (1)
) -> UpdatePromptResponseTypeDef:  # (2)
    ...
  1. See Sequence[PromptVariantUnionTypeDef]
  2. See UpdatePromptResponseTypeDef
# update_prompt method usage example with argument unpacking

kwargs: UpdatePromptRequestTypeDef = {  # (1)
    "name": ...,
    "promptIdentifier": ...,
}

parent.update_prompt(**kwargs)
  1. See UpdatePromptRequestTypeDef

validate_flow_definition#

Validates the definition of a flow.

Type annotations and code completion for boto3.client("bedrock-agent").validate_flow_definition method. boto3 documentation

# validate_flow_definition method definition

def validate_flow_definition(
    self,
    *,
    definition: FlowDefinitionUnionTypeDef,  # (1)
) -> ValidateFlowDefinitionResponseTypeDef:  # (2)
    ...
  1. See FlowDefinitionUnionTypeDef
  2. See ValidateFlowDefinitionResponseTypeDef
# validate_flow_definition method usage example with argument unpacking

kwargs: ValidateFlowDefinitionRequestTypeDef = {  # (1)
    "definition": ...,
}

parent.validate_flow_definition(**kwargs)
  1. See ValidateFlowDefinitionRequestTypeDef

get_paginator#

Type annotations and code completion for boto3.client("bedrock-agent").get_paginator method with overloads.