Skip to content

AgentsforBedrockClient#

Index > AgentsforBedrock > AgentsforBedrockClient

Auto-generated documentation for AgentsforBedrock type annotations stubs module mypy-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 mypy_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 mypy_boto3_bedrock_agent.client import Exceptions

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

Methods#

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,
    description: str,
    knowledgeBaseId: str,
    knowledgeBaseState: KnowledgeBaseStateType = ...,  # (1)
) -> AssociateAgentKnowledgeBaseResponseTypeDef:  # (2)
    ...
  1. See KnowledgeBaseStateType
  2. See AssociateAgentKnowledgeBaseResponseTypeDef
# associate_agent_knowledge_base method usage example with argument unpacking

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

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

can_paginate#

Check if an operation can be paginated.

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

close#

Closes underlying endpoint connections.

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

# close method definition

def close(
    self,
) -> None:
    ...

create_agent#

Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help 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,
    agentResourceRoleArn: str = ...,
    clientToken: str = ...,
    customerEncryptionKeyArn: str = ...,
    description: str = ...,
    foundationModel: str = ...,
    guardrailConfiguration: GuardrailConfigurationTypeDef = ...,  # (1)
    idleSessionTTLInSeconds: int = ...,
    instruction: str = ...,
    memoryConfiguration: Union[MemoryConfigurationTypeDef, MemoryConfigurationOutputTypeDef] = ...,  # (2)
    promptOverrideConfiguration: Union[PromptOverrideConfigurationTypeDef, PromptOverrideConfigurationOutputTypeDef] = ...,  # (3)
    tags: Mapping[str, str] = ...,
) -> CreateAgentResponseTypeDef:  # (4)
    ...
  1. See GuardrailConfigurationTypeDef
  2. See MemoryConfigurationTypeDef MemoryConfigurationOutputTypeDef
  3. See