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#

Associate a Knowledge Base to an existing Amazon Bedrock Agent See also: AWS API Documentation.

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: AssociateAgentKnowledgeBaseRequestRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "knowledgeBaseId": ...,
    "description": ...,
}

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 Amazon Bedrock Agent See also: AWS API Documentation.

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 = ...,
    instruction: str = ...,
    foundationModel: str = ...,
    description: str = ...,
    idleSessionTTLInSeconds: int = ...,
    customerEncryptionKeyArn: str = ...,
    tags: Mapping[str, str] = ...,
    promptOverrideConfiguration: PromptOverrideConfigurationTypeDef = ...,  # (1)
) -> CreateAgentResponseTypeDef:  # (2)
    ...
  1. See PromptOverrideConfigurationTypeDef
  2. See CreateAgentResponseTypeDef
# create_agent method usage example with argument unpacking

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

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

create_agent_action_group#

Creates an Action Group for existing Amazon Bedrock Agent See also: AWS API Documentation.

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)
    actionGroupExecutor: ActionGroupExecutorTypeDef = ...,  # (2)
    apiSchema: APISchemaTypeDef = ...,  # (3)
    actionGroupState: ActionGroupStateType = ...,  # (4)
) -> CreateAgentActionGroupResponseTypeDef:  # (5)
    ...
  1. See ActionGroupSignatureType
  2. See ActionGroupExecutorTypeDef
  3. See APISchemaTypeDef
  4. See ActionGroupStateType
  5. See CreateAgentActionGroupResponseTypeDef
# create_agent_action_group method usage example with argument unpacking

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

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

create_agent_alias#

Creates an Alias for an existing Amazon Bedrock Agent See also: AWS API Documentation.

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 AgentAliasRoutingConfigurationListItemTypeDef
  2. See CreateAgentAliasResponseTypeDef
# create_agent_alias method usage example with argument unpacking

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

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

create_data_source#

Create a new data source See also: AWS API Documentation.

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: DataSourceConfigurationTypeDef,  # (1)
    clientToken: str = ...,
    description: str = ...,
    serverSideEncryptionConfiguration: ServerSideEncryptionConfigurationTypeDef = ...,  # (2)
    vectorIngestionConfiguration: VectorIngestionConfigurationTypeDef = ...,  # (3)
) -> CreateDataSourceResponseTypeDef:  # (4)
    ...
  1. See DataSourceConfigurationTypeDef
  2. See ServerSideEncryptionConfigurationTypeDef
  3. See VectorIngestionConfigurationTypeDef
  4. See CreateDataSourceResponseTypeDef
# create_data_source method usage example with argument unpacking

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

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

create_knowledge_base#

Create a new knowledge base See also: AWS API Documentation.

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: KnowledgeBaseConfigurationTypeDef,  # (1)
    storageConfiguration: StorageConfigurationTypeDef,  # (2)
    clientToken: str = ...,
    description: str = ...,
    tags: Mapping[str, str] = ...,
) -> CreateKnowledgeBaseResponseTypeDef:  # (3)
    ...
  1. See KnowledgeBaseConfigurationTypeDef
  2. See StorageConfigurationTypeDef
  3. See CreateKnowledgeBaseResponseTypeDef
# create_knowledge_base method usage example with argument unpacking

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

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

delete_agent#

Deletes an Agent for existing Amazon Bedrock Agent See also: AWS API Documentation.

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: DeleteAgentRequestRequestTypeDef = {  # (1)
    "agentId": ...,
}

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

delete_agent_action_group#

Deletes an Action Group for existing Amazon Bedrock 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: DeleteAgentActionGroupRequestRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
    "actionGroupId": ...,
}

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

delete_agent_alias#

Deletes an Alias for a Amazon Bedrock Agent See also: AWS API Documentation.

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: DeleteAgentAliasRequestRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentAliasId": ...,
}

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

delete_agent_version#

Deletes an Agent version for existing Amazon Bedrock Agent See also: AWS API Documentation.

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: DeleteAgentVersionRequestRequestTypeDef = {  # (1)
    "agentId": ...,
    "agentVersion": ...,
}

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

delete_data_source#

Delete an existing data source See also: AWS API Documentation.

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: DeleteDataSourceRequestRequestTypeDef = {  # (1)
    "knowledgeBaseId": ...,
    "dataSourceId": ...,
}

parent.delete_data_source(**kwargs)
  1. See