Agents for Amazon Bedrock

2023/11/28 - Agents for Amazon Bedrock - 40 new api methods

Changes  This release adds support for customization types, model life cycle status and minor versions/aliases for model identifiers.

GetIngestionJob (new) Link ¶

Get an ingestion job

See also: AWS API Documentation

Request Syntax

client.get_ingestion_job(
    knowledgeBaseId='string',
    dataSourceId='string',
    ingestionJobId='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

type dataSourceId

string

param dataSourceId

[REQUIRED]

Identifier for a resource.

type ingestionJobId

string

param ingestionJobId

[REQUIRED]

Identifier for a resource.

rtype

dict

returns

Response Syntax

{
    'ingestionJob': {
        'knowledgeBaseId': 'string',
        'dataSourceId': 'string',
        'ingestionJobId': 'string',
        'description': 'string',
        'status': 'STARTING'|'IN_PROGRESS'|'COMPLETE'|'FAILED',
        'statistics': {
            'numberOfDocumentsScanned': 123,
            'numberOfNewDocumentsIndexed': 123,
            'numberOfModifiedDocumentsIndexed': 123,
            'numberOfDocumentsDeleted': 123,
            'numberOfDocumentsFailed': 123
        },
        'failureReasons': [
            'string',
        ],
        'startedAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • ingestionJob (dict) --

      Contains the information of an ingestion job.

      • knowledgeBaseId (string) --

        Identifier for a resource.

      • dataSourceId (string) --

        Identifier for a resource.

      • ingestionJobId (string) --

        Identifier for a resource.

      • description (string) --

        Description of the Resource.

      • status (string) --

        The status of an ingestion job.

      • statistics (dict) --

        The document level statistics of an ingestion job

        • numberOfDocumentsScanned (integer) --

          Number of scanned documents

        • numberOfNewDocumentsIndexed (integer) --

          Number of indexed documents

        • numberOfModifiedDocumentsIndexed (integer) --

          Number of modified documents indexed

        • numberOfDocumentsDeleted (integer) --

          Number of deleted documents

        • numberOfDocumentsFailed (integer) --

          Number of failed documents

      • failureReasons (list) --

        Failure Reasons for Error.

        • (string) --

          Failure Reason for Error.

      • startedAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

GetDataSource (new) Link ¶

Get an existing data source

See also: AWS API Documentation

Request Syntax

client.get_data_source(
    knowledgeBaseId='string',
    dataSourceId='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

type dataSourceId

string

param dataSourceId

[REQUIRED]

Identifier for a resource.

rtype

dict

returns

Response Syntax

{
    'dataSource': {
        'knowledgeBaseId': 'string',
        'dataSourceId': 'string',
        'name': 'string',
        'status': 'AVAILABLE'|'DELETING',
        'description': 'string',
        'dataSourceConfiguration': {
            'type': 'S3',
            's3Configuration': {
                'bucketArn': 'string',
                'inclusionPrefixes': [
                    'string',
                ]
            }
        },
        'serverSideEncryptionConfiguration': {
            'kmsKeyArn': 'string'
        },
        'vectorIngestionConfiguration': {
            'chunkingConfiguration': {
                'chunkingStrategy': 'FIXED_SIZE'|'NONE',
                'fixedSizeChunkingConfiguration': {
                    'maxTokens': 123,
                    'overlapPercentage': 123
                }
            }
        },
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • dataSource (dict) --

      Contains the information of a data source.

      • knowledgeBaseId (string) --

        Identifier for a resource.

      • dataSourceId (string) --

        Identifier for a resource.

      • name (string) --

        Name for a resource.

      • status (string) --

        The status of a data source.

      • description (string) --

        Description of the Resource.

      • dataSourceConfiguration (dict) --

        Specifies a raw data source location to ingest.

        • type (string) --

          The type of the data source location.

        • s3Configuration (dict) --

          Configures an S3 data source location.

          • bucketArn (string) --

            A S3 bucket ARN

          • inclusionPrefixes (list) --

            A list of S3 prefixes.

            • (string) --

              Prefix for s3 object.

      • serverSideEncryptionConfiguration (dict) --

        Server-side encryption configuration.

        • kmsKeyArn (string) --

          A KMS key ARN

      • vectorIngestionConfiguration (dict) --

        Configures ingestion for a vector knowledge base

        • chunkingConfiguration (dict) --

          Configures chunking strategy

          • chunkingStrategy (string) --

            The type of chunking strategy

          • fixedSizeChunkingConfiguration (dict) --

            Configures fixed size chunking strategy

            • maxTokens (integer) --

              The maximum number of tokens per chunk.

            • overlapPercentage (integer) --

              The overlap percentage between adjacent chunks.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

AssociateAgentKnowledgeBase (new) Link ¶

Associate a Knowledge Base to an existing Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.associate_agent_knowledge_base(
    agentId='string',
    agentVersion='string',
    knowledgeBaseId='string',
    description='string',
    knowledgeBaseState='ENABLED'|'DISABLED'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentVersion

string

param agentVersion

[REQUIRED]

Draft Version of the Agent.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

type description

string

param description

[REQUIRED]

Description of the Resource.

type knowledgeBaseState

string

param knowledgeBaseState

State of the knowledge base; whether it is enabled or disabled

rtype

dict

returns

Response Syntax

{
    'agentKnowledgeBase': {
        'agentId': 'string',
        'agentVersion': 'string',
        'knowledgeBaseId': 'string',
        'description': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'knowledgeBaseState': 'ENABLED'|'DISABLED'
    }
}

Response Structure

  • (dict) --

    Associate Agent Knowledge Base Response

    • agentKnowledgeBase (dict) --

      Contains the information of an Agent Knowledge Base.

      • agentId (string) --

        Identifier for a resource.

      • agentVersion (string) --

        Agent Version.

      • knowledgeBaseId (string) --

        Identifier for a resource.

      • description (string) --

        Description of the Resource.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • knowledgeBaseState (string) --

        State of the knowledge base; whether it is enabled or disabled

DeleteKnowledgeBase (new) Link ¶

Delete an existing knowledge base

See also: AWS API Documentation

Request Syntax

client.delete_knowledge_base(
    knowledgeBaseId='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

rtype

dict

returns

Response Syntax

{
    'knowledgeBaseId': 'string',
    'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED'
}

Response Structure

  • (dict) --

    • knowledgeBaseId (string) --

      Identifier for a resource.

    • status (string) --

      The status of a knowledge base.

PrepareAgent (new) Link ¶

Prepares an existing Amazon Bedrock Agent to receive runtime requests

See also: AWS API Documentation

Request Syntax

client.prepare_agent(
    agentId='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

rtype

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) --

    PrepareAgent Response

    • agentId (string) --

      Identifier for a resource.

    • agentStatus (string) --

      Schema Type for Action APIs.

    • agentVersion (string) --

      Agent Version.

    • preparedAt (datetime) --

      Time Stamp.

CreateKnowledgeBase (new) Link ¶

Create a new knowledge base

See also: AWS API Documentation

Request Syntax

client.create_knowledge_base(
    clientToken='string',
    name='string',
    description='string',
    roleArn='string',
    knowledgeBaseConfiguration={
        'type': 'VECTOR',
        'vectorKnowledgeBaseConfiguration': {
            'embeddingModelArn': 'string'
        }
    },
    storageConfiguration={
        'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD',
        'opensearchServerlessConfiguration': {
            'collectionArn': 'string',
            'vectorIndexName': 'string',
            'fieldMapping': {
                'vectorField': 'string',
                'textField': 'string',
                'metadataField': 'string'
            }
        },
        'pineconeConfiguration': {
            'connectionString': 'string',
            'credentialsSecretArn': 'string',
            'namespace': 'string',
            'fieldMapping': {
                'textField': 'string',
                'metadataField': 'string'
            }
        },
        'redisEnterpriseCloudConfiguration': {
            'endpoint': 'string',
            'vectorIndexName': 'string',
            'credentialsSecretArn': 'string',
            'fieldMapping': {
                'vectorField': 'string',
                'textField': 'string',
                'metadataField': 'string'
            }
        }
    },
    tags={
        'string': 'string'
    }
)
type clientToken

string

param clientToken

Client specified token used for idempotency checks

This field is autopopulated if not provided.

type name

string

param name

[REQUIRED]

Name for a resource.

type description

string

param description

Description of the Resource.

type roleArn

string

param roleArn

[REQUIRED]

ARN of a IAM role.

type knowledgeBaseConfiguration

dict

param knowledgeBaseConfiguration

[REQUIRED]

Configures a bedrock knowledge base.

  • type (string) -- [REQUIRED]

    The type of a knowledge base.

  • vectorKnowledgeBaseConfiguration (dict) --

    Configurations for a vector knowledge base.

    • embeddingModelArn (string) -- [REQUIRED]

      Arn of a Bedrock model.

type storageConfiguration

dict

param storageConfiguration

[REQUIRED]

Configures the physical storage of ingested data in a knowledge base.

  • type (string) -- [REQUIRED]

    The storage type of a knowledge base.

  • opensearchServerlessConfiguration (dict) --

    Contains the configurations to use OpenSearch Serverless to store knowledge base data.

    • collectionArn (string) -- [REQUIRED]

      Arn of an OpenSearch Serverless collection.

    • vectorIndexName (string) -- [REQUIRED]

      Arn of an OpenSearch Serverless index.

    • fieldMapping (dict) -- [REQUIRED]

      A mapping of Bedrock Knowledge Base fields to OpenSearch Serverless field names

      • vectorField (string) -- [REQUIRED]

        Name of the field

      • textField (string) -- [REQUIRED]

        Name of the field

      • metadataField (string) -- [REQUIRED]

        Name of the field

  • pineconeConfiguration (dict) --

    Contains the configurations to use Pinecone to store knowledge base data.

    • connectionString (string) -- [REQUIRED]

      Pinecone connection string

    • credentialsSecretArn (string) -- [REQUIRED]

      Arn of a SecretsManager Secret.

    • namespace (string) --

      Pinecone namespace

    • fieldMapping (dict) -- [REQUIRED]

      A mapping of Bedrock Knowledge Base fields to Pinecone field names

      • textField (string) -- [REQUIRED]

        Name of the field

      • metadataField (string) -- [REQUIRED]

        Name of the field

  • redisEnterpriseCloudConfiguration (dict) --

    Contains the configurations to use Redis Enterprise Cloud to store knowledge base data.

    • endpoint (string) -- [REQUIRED]

      Redis enterprise cloud endpoint

    • vectorIndexName (string) -- [REQUIRED]

      Name of a redis enterprise cloud index

    • credentialsSecretArn (string) -- [REQUIRED]

      Arn of a SecretsManager Secret.

    • fieldMapping (dict) -- [REQUIRED]

      A mapping of Bedrock Knowledge Base fields to Redis Cloud field names

      • vectorField (string) -- [REQUIRED]

        Name of the field

      • textField (string) -- [REQUIRED]

        Name of the field

      • metadataField (string) -- [REQUIRED]

        Name of the field

type tags

dict

param tags

A map of tag keys and values

  • (string) --

    Key of a tag

    • (string) --

      Value of a tag

rtype

dict

returns

Response Syntax

{
    'knowledgeBase': {
        'knowledgeBaseId': 'string',
        'name': 'string',
        'knowledgeBaseArn': 'string',
        'description': 'string',
        'roleArn': 'string',
        'knowledgeBaseConfiguration': {
            'type': 'VECTOR',
            'vectorKnowledgeBaseConfiguration': {
                'embeddingModelArn': 'string'
            }
        },
        'storageConfiguration': {
            'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD',
            'opensearchServerlessConfiguration': {
                'collectionArn': 'string',
                'vectorIndexName': 'string',
                'fieldMapping': {
                    'vectorField': 'string',
                    'textField': 'string',
                    'metadataField': 'string'
                }
            },
            'pineconeConfiguration': {
                'connectionString': 'string',
                'credentialsSecretArn': 'string',
                'namespace': 'string',
                'fieldMapping': {
                    'textField': 'string',
                    'metadataField': 'string'
                }
            },
            'redisEnterpriseCloudConfiguration': {
                'endpoint': 'string',
                'vectorIndexName': 'string',
                'credentialsSecretArn': 'string',
                'fieldMapping': {
                    'vectorField': 'string',
                    'textField': 'string',
                    'metadataField': 'string'
                }
            }
        },
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'failureReasons': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --

    • knowledgeBase (dict) --

      Contains the information of a knowledge base.

      • knowledgeBaseId (string) --

        Identifier for a resource.

      • name (string) --

        Name for a resource.

      • knowledgeBaseArn (string) --

        ARN of a KnowledgeBase

      • description (string) --

        Description of the Resource.

      • roleArn (string) --

        ARN of a IAM role.

      • knowledgeBaseConfiguration (dict) --

        Configures a bedrock knowledge base.

        • type (string) --

          The type of a knowledge base.

        • vectorKnowledgeBaseConfiguration (dict) --

          Configurations for a vector knowledge base.

          • embeddingModelArn (string) --

            Arn of a Bedrock model.

      • storageConfiguration (dict) --

        Configures the physical storage of ingested data in a knowledge base.

        • type (string) --

          The storage type of a knowledge base.

        • opensearchServerlessConfiguration (dict) --

          Contains the configurations to use OpenSearch Serverless to store knowledge base data.

          • collectionArn (string) --

            Arn of an OpenSearch Serverless collection.

          • vectorIndexName (string) --

            Arn of an OpenSearch Serverless index.

          • fieldMapping (dict) --

            A mapping of Bedrock Knowledge Base fields to OpenSearch Serverless field names

            • vectorField (string) --

              Name of the field

            • textField (string) --

              Name of the field

            • metadataField (string) --

              Name of the field

        • pineconeConfiguration (dict) --

          Contains the configurations to use Pinecone to store knowledge base data.

          • connectionString (string) --

            Pinecone connection string

          • credentialsSecretArn (string) --

            Arn of a SecretsManager Secret.

          • namespace (string) --

            Pinecone namespace

          • fieldMapping (dict) --

            A mapping of Bedrock Knowledge Base fields to Pinecone field names

            • textField (string) --

              Name of the field

            • metadataField (string) --

              Name of the field

        • redisEnterpriseCloudConfiguration (dict) --

          Contains the configurations to use Redis Enterprise Cloud to store knowledge base data.

          • endpoint (string) --

            Redis enterprise cloud endpoint

          • vectorIndexName (string) --

            Name of a redis enterprise cloud index

          • credentialsSecretArn (string) --

            Arn of a SecretsManager Secret.

          • fieldMapping (dict) --

            A mapping of Bedrock Knowledge Base fields to Redis Cloud field names

            • vectorField (string) --

              Name of the field

            • textField (string) --

              Name of the field

            • metadataField (string) --

              Name of the field

      • status (string) --

        The status of a knowledge base.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • failureReasons (list) --

        Failure Reasons for Error.

        • (string) --

          Failure Reason for Error.

UpdateAgent (new) Link ¶

Updates an existing Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.update_agent(
    agentId='string',
    agentName='string',
    instruction='string',
    foundationModel='string',
    description='string',
    idleSessionTTLInSeconds=123,
    agentResourceRoleArn='string',
    customerEncryptionKeyArn='string',
    promptOverrideConfiguration={
        'promptConfigurations': [
            {
                'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION',
                'promptCreationMode': 'DEFAULT'|'OVERRIDDEN',
                'promptState': 'ENABLED'|'DISABLED',
                'basePromptTemplate': 'string',
                'inferenceConfiguration': {
                    'temperature': ...,
                    'topP': ...,
                    'topK': 123,
                    'maximumLength': 123,
                    'stopSequences': [
                        'string',
                    ]
                },
                'parserMode': 'DEFAULT'|'OVERRIDDEN'
            },
        ],
        'overrideLambda': 'string'
    }
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentName

string

param agentName

[REQUIRED]

Name for a resource.

type instruction

string

param instruction

Instruction for the agent.

type foundationModel

string

param foundationModel

ARN or name of a Bedrock model.

type description

string

param description

Description of the Resource.

type idleSessionTTLInSeconds

integer

param idleSessionTTLInSeconds

Max Session Time.

type agentResourceRoleArn

string

param agentResourceRoleArn

[REQUIRED]

ARN of a IAM role.

type customerEncryptionKeyArn

string

param customerEncryptionKeyArn

A KMS key ARN

type promptOverrideConfiguration

dict

param promptOverrideConfiguration

Configuration for prompt override.

  • promptConfigurations (list) -- [REQUIRED]

    List of BasePromptConfiguration

    • (dict) --

      BasePromptConfiguration per Prompt Type.

      • promptType (string) --

        Prompt Type.

      • promptCreationMode (string) --

        Creation Mode for Prompt Configuration.

      • promptState (string) --

        Prompt State.

      • basePromptTemplate (string) --

        Base Prompt Template.

      • inferenceConfiguration (dict) --

        Configuration for inference in prompt configuration

        • temperature (float) --

          Controls randomness, higher values increase diversity

        • topP (float) --

          Cumulative probability cutoff for token selection

        • topK (integer) --

          Sample from the k most likely next tokens

        • maximumLength (integer) --

          Maximum length of output

        • stopSequences (list) --

          List of stop sequences

          • (string) --

      • parserMode (string) --

        Creation Mode for Prompt Configuration.

  • overrideLambda (string) --

    ARN of a Lambda.

rtype

dict

returns

Response Syntax

{
    'agent': {
        'agentId': 'string',
        'agentName': 'string',
        'agentArn': 'string',
        'agentVersion': 'string',
        'clientToken': 'string',
        'instruction': 'string',
        'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING',
        'foundationModel': 'string',
        'description': 'string',
        'idleSessionTTLInSeconds': 123,
        'agentResourceRoleArn': 'string',
        'customerEncryptionKeyArn': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'preparedAt': datetime(2015, 1, 1),
        'failureReasons': [
            'string',
        ],
        'recommendedActions': [
            'string',
        ],
        'promptOverrideConfiguration': {
            'promptConfigurations': [
                {
                    'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION',
                    'promptCreationMode': 'DEFAULT'|'OVERRIDDEN',
                    'promptState': 'ENABLED'|'DISABLED',
                    'basePromptTemplate': 'string',
                    'inferenceConfiguration': {
                        'temperature': ...,
                        'topP': ...,
                        'topK': 123,
                        'maximumLength': 123,
                        'stopSequences': [
                            'string',
                        ]
                    },
                    'parserMode': 'DEFAULT'|'OVERRIDDEN'
                },
            ],
            'overrideLambda': 'string'
        }
    }
}

Response Structure

  • (dict) --

    Update Agent Response

    • agent (dict) --

      Contains the information of an agent

      • agentId (string) --

        Identifier for a resource.

      • agentName (string) --

        Name for a resource.

      • agentArn (string) --

        Arn representation of the Agent.

      • agentVersion (string) --

        Draft Agent Version.

      • clientToken (string) --

        Client specified token used for idempotency checks

      • instruction (string) --

        Instruction for the agent.

      • agentStatus (string) --

        Schema Type for Action APIs.

      • foundationModel (string) --

        ARN or name of a Bedrock model.

      • description (string) --

        Description of the Resource.

      • idleSessionTTLInSeconds (integer) --

        Max Session Time.

      • agentResourceRoleArn (string) --

        ARN of a IAM role.

      • customerEncryptionKeyArn (string) --

        A KMS key ARN

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • preparedAt (datetime) --

        Time Stamp.

      • failureReasons (list) --

        Failure Reasons for Error.

        • (string) --

          Failure Reason for Error.

      • recommendedActions (list) --

        The recommended actions users can take to resolve an error in failureReasons.

        • (string) --

          The recommended action users can take to resolve an error in failureReasons.

      • promptOverrideConfiguration (dict) --

        Configuration for prompt override.

        • promptConfigurations (list) --

          List of BasePromptConfiguration

          • (dict) --

            BasePromptConfiguration per Prompt Type.

            • promptType (string) --

              Prompt Type.

            • promptCreationMode (string) --

              Creation Mode for Prompt Configuration.

            • promptState (string) --

              Prompt State.

            • basePromptTemplate (string) --

              Base Prompt Template.

            • inferenceConfiguration (dict) --

              Configuration for inference in prompt configuration

              • temperature (float) --

                Controls randomness, higher values increase diversity

              • topP (float) --

                Cumulative probability cutoff for token selection

              • topK (integer) --

                Sample from the k most likely next tokens

              • maximumLength (integer) --

                Maximum length of output

              • stopSequences (list) --

                List of stop sequences

                • (string) --

            • parserMode (string) --

              Creation Mode for Prompt Configuration.

        • overrideLambda (string) --

          ARN of a Lambda.

UpdateAgentActionGroup (new) Link ¶

Updates an existing Action Group for Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.update_agent_action_group(
    agentId='string',
    agentVersion='string',
    actionGroupId='string',
    actionGroupName='string',
    description='string',
    parentActionGroupSignature='AMAZON.UserInput',
    actionGroupExecutor={
        'lambda': 'string'
    },
    actionGroupState='ENABLED'|'DISABLED',
    apiSchema={
        's3': {
            's3BucketName': 'string',
            's3ObjectKey': 'string'
        },
        'payload': 'string'
    }
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentVersion

string

param agentVersion

[REQUIRED]

Draft Version of the Agent.

type actionGroupId

string

param actionGroupId

[REQUIRED]

Id generated at the server side when an Action Group is created under Agent

type actionGroupName

string

param actionGroupName

[REQUIRED]

Name for a resource.

type description

string

param description

Description of the Resource.

type parentActionGroupSignature

string

param parentActionGroupSignature

Action Group Signature for a BuiltIn Action

type actionGroupExecutor

dict

param actionGroupExecutor

Type of Executors for an Action Group

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: lambda.

  • lambda (string) --

    ARN of a Lambda.

type actionGroupState

string

param actionGroupState

State of the action group

type apiSchema

dict

param apiSchema

Contains information about the API Schema for the Action Group

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: s3, payload.

  • s3 (dict) --

    The identifier for the S3 resource.

    • s3BucketName (string) --

      A bucket in S3.

    • s3ObjectKey (string) --

      A object key in S3.

  • payload (string) --

    String OpenAPI Payload

rtype

dict

returns

Response Syntax

{
    'agentActionGroup': {
        'agentId': 'string',
        'agentVersion': 'string',
        'actionGroupId': 'string',
        'actionGroupName': 'string',
        'clientToken': 'string',
        'description': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'parentActionSignature': 'AMAZON.UserInput',
        'actionGroupExecutor': {
            'lambda': 'string'
        },
        'apiSchema': {
            's3': {
                's3BucketName': 'string',
                's3ObjectKey': 'string'
            },
            'payload': 'string'
        },
        'actionGroupState': 'ENABLED'|'DISABLED'
    }
}

Response Structure

  • (dict) --

    Update Action Group Response

    • agentActionGroup (dict) --

      Contains the information of an Agent Action Group

      • agentId (string) --

        Identifier for a resource.

      • agentVersion (string) --

        Agent Version.

      • actionGroupId (string) --

        Identifier for a resource.

      • actionGroupName (string) --

        Name for a resource.

      • clientToken (string) --

        Client specified token used for idempotency checks

      • description (string) --

        Description of the Resource.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • parentActionSignature (string) --

        Action Group Signature for a BuiltIn Action

      • actionGroupExecutor (dict) --

        Type of Executors for an Action Group

        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) --

          ARN of a Lambda.

      • apiSchema (dict) --

        Contains information about the API Schema for the Action Group

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: s3, payload. 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) --

          The identifier for the S3 resource.

          • s3BucketName (string) --

            A bucket in S3.

          • s3ObjectKey (string) --

            A object key in S3.

        • payload (string) --

          String OpenAPI Payload

      • actionGroupState (string) --

        State of the action group

ListDataSources (new) Link ¶

List data sources

See also: AWS API Documentation

Request Syntax

client.list_data_sources(
    knowledgeBaseId='string',
    maxResults=123,
    nextToken='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

type maxResults

integer

param maxResults

Max Results.

type nextToken

string

param nextToken

Opaque continuation token of previous paginated response.

rtype

dict

returns

Response Syntax

{
    'dataSourceSummaries': [
        {
            'knowledgeBaseId': 'string',
            'dataSourceId': 'string',
            'name': 'string',
            'status': 'AVAILABLE'|'DELETING',
            'description': 'string',
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • dataSourceSummaries (list) --

      list of data source summaries

      • (dict) --

        Summary information of a data source.

        • knowledgeBaseId (string) --

          Identifier for a resource.

        • dataSourceId (string) --

          Identifier for a resource.

        • name (string) --

          Name for a resource.

        • status (string) --

          The status of a data source.

        • description (string) --

          Description of the Resource.

        • updatedAt (datetime) --

          Time Stamp.

    • nextToken (string) --

      Opaque continuation token of previous paginated response.

GetAgent (new) Link ¶

Gets an Agent for existing Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.get_agent(
    agentId='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

rtype

dict

returns

Response Syntax

{
    'agent': {
        'agentId': 'string',
        'agentName': 'string',
        'agentArn': 'string',
        'agentVersion': 'string',
        'clientToken': 'string',
        'instruction': 'string',
        'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING',
        'foundationModel': 'string',
        'description': 'string',
        'idleSessionTTLInSeconds': 123,
        'agentResourceRoleArn': 'string',
        'customerEncryptionKeyArn': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'preparedAt': datetime(2015, 1, 1),
        'failureReasons': [
            'string',
        ],
        'recommendedActions': [
            'string',
        ],
        'promptOverrideConfiguration': {
            'promptConfigurations': [
                {
                    'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION',
                    'promptCreationMode': 'DEFAULT'|'OVERRIDDEN',
                    'promptState': 'ENABLED'|'DISABLED',
                    'basePromptTemplate': 'string',
                    'inferenceConfiguration': {
                        'temperature': ...,
                        'topP': ...,
                        'topK': 123,
                        'maximumLength': 123,
                        'stopSequences': [
                            'string',
                        ]
                    },
                    'parserMode': 'DEFAULT'|'OVERRIDDEN'
                },
            ],
            'overrideLambda': 'string'
        }
    }
}

Response Structure

  • (dict) --

    Get Agent Response

    • agent (dict) --

      Contains the information of an agent

      • agentId (string) --

        Identifier for a resource.

      • agentName (string) --

        Name for a resource.

      • agentArn (string) --

        Arn representation of the Agent.

      • agentVersion (string) --

        Draft Agent Version.

      • clientToken (string) --

        Client specified token used for idempotency checks

      • instruction (string) --

        Instruction for the agent.

      • agentStatus (string) --

        Schema Type for Action APIs.

      • foundationModel (string) --

        ARN or name of a Bedrock model.

      • description (string) --

        Description of the Resource.

      • idleSessionTTLInSeconds (integer) --

        Max Session Time.

      • agentResourceRoleArn (string) --

        ARN of a IAM role.

      • customerEncryptionKeyArn (string) --

        A KMS key ARN

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • preparedAt (datetime) --

        Time Stamp.

      • failureReasons (list) --

        Failure Reasons for Error.

        • (string) --

          Failure Reason for Error.

      • recommendedActions (list) --

        The recommended actions users can take to resolve an error in failureReasons.

        • (string) --

          The recommended action users can take to resolve an error in failureReasons.

      • promptOverrideConfiguration (dict) --

        Configuration for prompt override.

        • promptConfigurations (list) --

          List of BasePromptConfiguration

          • (dict) --

            BasePromptConfiguration per Prompt Type.

            • promptType (string) --

              Prompt Type.

            • promptCreationMode (string) --

              Creation Mode for Prompt Configuration.

            • promptState (string) --

              Prompt State.

            • basePromptTemplate (string) --

              Base Prompt Template.

            • inferenceConfiguration (dict) --

              Configuration for inference in prompt configuration

              • temperature (float) --

                Controls randomness, higher values increase diversity

              • topP (float) --

                Cumulative probability cutoff for token selection

              • topK (integer) --

                Sample from the k most likely next tokens

              • maximumLength (integer) --

                Maximum length of output

              • stopSequences (list) --

                List of stop sequences

                • (string) --

            • parserMode (string) --

              Creation Mode for Prompt Configuration.

        • overrideLambda (string) --

          ARN of a Lambda.

ListIngestionJobs (new) Link ¶

List ingestion jobs

See also: AWS API Documentation

Request Syntax

client.list_ingestion_jobs(
    knowledgeBaseId='string',
    dataSourceId='string',
    filters=[
        {
            'attribute': 'STATUS',
            'operator': 'EQ',
            'values': [
                'string',
            ]
        },
    ],
    sortBy={
        'attribute': 'STATUS'|'STARTED_AT',
        'order': 'ASCENDING'|'DESCENDING'
    },
    maxResults=123,
    nextToken='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

type dataSourceId

string

param dataSourceId

[REQUIRED]

Identifier for a resource.

type filters

list

param filters

List of IngestionJobFilters

  • (dict) --

    Filters the response returned by ListIngestionJobs operation.

    • attribute (string) -- [REQUIRED]

      The name of the field to filter ingestion jobs.

    • operator (string) -- [REQUIRED]

      The operator used to filter ingestion jobs.

    • values (list) -- [REQUIRED]

      The list of values used to filter ingestion jobs.

      • (string) --

        The value used to filter ingestion jobs.

type sortBy

dict

param sortBy

Sorts the response returned by ListIngestionJobs operation.

  • attribute (string) -- [REQUIRED]

    The name of the field to sort ingestion jobs.

  • order (string) -- [REQUIRED]

    Order to sort results by.

type maxResults

integer

param maxResults

Max Results.

type nextToken

string

param nextToken

Opaque continuation token of previous paginated response.

rtype

dict

returns

Response Syntax

{
    'ingestionJobSummaries': [
        {
            'knowledgeBaseId': 'string',
            'dataSourceId': 'string',
            'ingestionJobId': 'string',
            'description': 'string',
            'status': 'STARTING'|'IN_PROGRESS'|'COMPLETE'|'FAILED',
            'startedAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'statistics': {
                'numberOfDocumentsScanned': 123,
                'numberOfNewDocumentsIndexed': 123,
                'numberOfModifiedDocumentsIndexed': 123,
                'numberOfDocumentsDeleted': 123,
                'numberOfDocumentsFailed': 123
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • ingestionJobSummaries (list) --

      List of IngestionJobSummaries

      • (dict) --

        Summary information of an ingestion job.

        • knowledgeBaseId (string) --

          Identifier for a resource.

        • dataSourceId (string) --

          Identifier for a resource.

        • ingestionJobId (string) --

          Identifier for a resource.

        • description (string) --

          Description of the Resource.

        • status (string) --

          The status of an ingestion job.

        • startedAt (datetime) --

          Time Stamp.

        • updatedAt (datetime) --

          Time Stamp.

        • statistics (dict) --

          The document level statistics of an ingestion job

          • numberOfDocumentsScanned (integer) --

            Number of scanned documents

          • numberOfNewDocumentsIndexed (integer) --

            Number of indexed documents

          • numberOfModifiedDocumentsIndexed (integer) --

            Number of modified documents indexed

          • numberOfDocumentsDeleted (integer) --

            Number of deleted documents

          • numberOfDocumentsFailed (integer) --

            Number of failed documents

    • nextToken (string) --

      Opaque continuation token of previous paginated response.

UpdateAgentKnowledgeBase (new) Link ¶

Updates an existing Knowledge Base associated to an Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.update_agent_knowledge_base(
    agentId='string',
    agentVersion='string',
    knowledgeBaseId='string',
    description='string',
    knowledgeBaseState='ENABLED'|'DISABLED'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentVersion

string

param agentVersion

[REQUIRED]

Draft Version of the Agent.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Id generated at the server side when a Knowledge Base is associated to an Agent

type description

string

param description

Description of the Resource.

type knowledgeBaseState

string

param knowledgeBaseState

State of the knowledge base; whether it is enabled or disabled

rtype

dict

returns

Response Syntax

{
    'agentKnowledgeBase': {
        'agentId': 'string',
        'agentVersion': 'string',
        'knowledgeBaseId': 'string',
        'description': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'knowledgeBaseState': 'ENABLED'|'DISABLED'
    }
}

Response Structure

  • (dict) --

    Update Agent Knowledge Base Response

    • agentKnowledgeBase (dict) --

      Contains the information of an Agent Knowledge Base.

      • agentId (string) --

        Identifier for a resource.

      • agentVersion (string) --

        Agent Version.

      • knowledgeBaseId (string) --

        Identifier for a resource.

      • description (string) --

        Description of the Resource.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • knowledgeBaseState (string) --

        State of the knowledge base; whether it is enabled or disabled

UpdateKnowledgeBase (new) Link ¶

Update an existing knowledge base

See also: AWS API Documentation

Request Syntax

client.update_knowledge_base(
    knowledgeBaseId='string',
    name='string',
    description='string',
    roleArn='string',
    knowledgeBaseConfiguration={
        'type': 'VECTOR',
        'vectorKnowledgeBaseConfiguration': {
            'embeddingModelArn': 'string'
        }
    },
    storageConfiguration={
        'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD',
        'opensearchServerlessConfiguration': {
            'collectionArn': 'string',
            'vectorIndexName': 'string',
            'fieldMapping': {
                'vectorField': 'string',
                'textField': 'string',
                'metadataField': 'string'
            }
        },
        'pineconeConfiguration': {
            'connectionString': 'string',
            'credentialsSecretArn': 'string',
            'namespace': 'string',
            'fieldMapping': {
                'textField': 'string',
                'metadataField': 'string'
            }
        },
        'redisEnterpriseCloudConfiguration': {
            'endpoint': 'string',
            'vectorIndexName': 'string',
            'credentialsSecretArn': 'string',
            'fieldMapping': {
                'vectorField': 'string',
                'textField': 'string',
                'metadataField': 'string'
            }
        }
    }
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

type name

string

param name

[REQUIRED]

Name for a resource.

type description

string

param description

Description of the Resource.

type roleArn

string

param roleArn

[REQUIRED]

ARN of a IAM role.

type knowledgeBaseConfiguration

dict

param knowledgeBaseConfiguration

[REQUIRED]

Configures a bedrock knowledge base.

  • type (string) -- [REQUIRED]

    The type of a knowledge base.

  • vectorKnowledgeBaseConfiguration (dict) --

    Configurations for a vector knowledge base.

    • embeddingModelArn (string) -- [REQUIRED]

      Arn of a Bedrock model.

type storageConfiguration

dict

param storageConfiguration

[REQUIRED]

Configures the physical storage of ingested data in a knowledge base.

  • type (string) -- [REQUIRED]

    The storage type of a knowledge base.

  • opensearchServerlessConfiguration (dict) --

    Contains the configurations to use OpenSearch Serverless to store knowledge base data.

    • collectionArn (string) -- [REQUIRED]

      Arn of an OpenSearch Serverless collection.

    • vectorIndexName (string) -- [REQUIRED]

      Arn of an OpenSearch Serverless index.

    • fieldMapping (dict) -- [REQUIRED]

      A mapping of Bedrock Knowledge Base fields to OpenSearch Serverless field names

      • vectorField (string) -- [REQUIRED]

        Name of the field

      • textField (string) -- [REQUIRED]

        Name of the field

      • metadataField (string) -- [REQUIRED]

        Name of the field

  • pineconeConfiguration (dict) --

    Contains the configurations to use Pinecone to store knowledge base data.

    • connectionString (string) -- [REQUIRED]

      Pinecone connection string

    • credentialsSecretArn (string) -- [REQUIRED]

      Arn of a SecretsManager Secret.

    • namespace (string) --

      Pinecone namespace

    • fieldMapping (dict) -- [REQUIRED]

      A mapping of Bedrock Knowledge Base fields to Pinecone field names

      • textField (string) -- [REQUIRED]

        Name of the field

      • metadataField (string) -- [REQUIRED]

        Name of the field

  • redisEnterpriseCloudConfiguration (dict) --

    Contains the configurations to use Redis Enterprise Cloud to store knowledge base data.

    • endpoint (string) -- [REQUIRED]

      Redis enterprise cloud endpoint

    • vectorIndexName (string) -- [REQUIRED]

      Name of a redis enterprise cloud index

    • credentialsSecretArn (string) -- [REQUIRED]

      Arn of a SecretsManager Secret.

    • fieldMapping (dict) -- [REQUIRED]

      A mapping of Bedrock Knowledge Base fields to Redis Cloud field names

      • vectorField (string) -- [REQUIRED]

        Name of the field

      • textField (string) -- [REQUIRED]

        Name of the field

      • metadataField (string) -- [REQUIRED]

        Name of the field

rtype

dict

returns

Response Syntax

{
    'knowledgeBase': {
        'knowledgeBaseId': 'string',
        'name': 'string',
        'knowledgeBaseArn': 'string',
        'description': 'string',
        'roleArn': 'string',
        'knowledgeBaseConfiguration': {
            'type': 'VECTOR',
            'vectorKnowledgeBaseConfiguration': {
                'embeddingModelArn': 'string'
            }
        },
        'storageConfiguration': {
            'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD',
            'opensearchServerlessConfiguration': {
                'collectionArn': 'string',
                'vectorIndexName': 'string',
                'fieldMapping': {
                    'vectorField': 'string',
                    'textField': 'string',
                    'metadataField': 'string'
                }
            },
            'pineconeConfiguration': {
                'connectionString': 'string',
                'credentialsSecretArn': 'string',
                'namespace': 'string',
                'fieldMapping': {
                    'textField': 'string',
                    'metadataField': 'string'
                }
            },
            'redisEnterpriseCloudConfiguration': {
                'endpoint': 'string',
                'vectorIndexName': 'string',
                'credentialsSecretArn': 'string',
                'fieldMapping': {
                    'vectorField': 'string',
                    'textField': 'string',
                    'metadataField': 'string'
                }
            }
        },
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'failureReasons': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --

    • knowledgeBase (dict) --

      Contains the information of a knowledge base.

      • knowledgeBaseId (string) --

        Identifier for a resource.

      • name (string) --

        Name for a resource.

      • knowledgeBaseArn (string) --

        ARN of a KnowledgeBase

      • description (string) --

        Description of the Resource.

      • roleArn (string) --

        ARN of a IAM role.

      • knowledgeBaseConfiguration (dict) --

        Configures a bedrock knowledge base.

        • type (string) --

          The type of a knowledge base.

        • vectorKnowledgeBaseConfiguration (dict) --

          Configurations for a vector knowledge base.

          • embeddingModelArn (string) --

            Arn of a Bedrock model.

      • storageConfiguration (dict) --

        Configures the physical storage of ingested data in a knowledge base.

        • type (string) --

          The storage type of a knowledge base.

        • opensearchServerlessConfiguration (dict) --

          Contains the configurations to use OpenSearch Serverless to store knowledge base data.

          • collectionArn (string) --

            Arn of an OpenSearch Serverless collection.

          • vectorIndexName (string) --

            Arn of an OpenSearch Serverless index.

          • fieldMapping (dict) --

            A mapping of Bedrock Knowledge Base fields to OpenSearch Serverless field names

            • vectorField (string) --

              Name of the field

            • textField (string) --

              Name of the field

            • metadataField (string) --

              Name of the field

        • pineconeConfiguration (dict) --

          Contains the configurations to use Pinecone to store knowledge base data.

          • connectionString (string) --

            Pinecone connection string

          • credentialsSecretArn (string) --

            Arn of a SecretsManager Secret.

          • namespace (string) --

            Pinecone namespace

          • fieldMapping (dict) --

            A mapping of Bedrock Knowledge Base fields to Pinecone field names

            • textField (string) --

              Name of the field

            • metadataField (string) --

              Name of the field

        • redisEnterpriseCloudConfiguration (dict) --

          Contains the configurations to use Redis Enterprise Cloud to store knowledge base data.

          • endpoint (string) --

            Redis enterprise cloud endpoint

          • vectorIndexName (string) --

            Name of a redis enterprise cloud index

          • credentialsSecretArn (string) --

            Arn of a SecretsManager Secret.

          • fieldMapping (dict) --

            A mapping of Bedrock Knowledge Base fields to Redis Cloud field names

            • vectorField (string) --

              Name of the field

            • textField (string) --

              Name of the field

            • metadataField (string) --

              Name of the field

      • status (string) --

        The status of a knowledge base.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • failureReasons (list) --

        Failure Reasons for Error.

        • (string) --

          Failure Reason for Error.

TagResource (new) Link ¶

Tag a resource

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceArn='string',
    tags={
        'string': 'string'
    }
)
type resourceArn

string

param resourceArn

[REQUIRED]

ARN of Taggable resources: [Agent, AgentAlias, Knowledge-Base]

type tags

dict

param tags

[REQUIRED]

A map of tag keys and values

  • (string) --

    Key of a tag

    • (string) --

      Value of a tag

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetAgentKnowledgeBase (new) Link ¶

Gets a knowledge base associated to an existing Amazon Bedrock Agent Version

See also: AWS API Documentation

Request Syntax

client.get_agent_knowledge_base(
    agentId='string',
    agentVersion='string',
    knowledgeBaseId='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentVersion

string

param agentVersion

[REQUIRED]

Version number generated when a version is created

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Id generated at the server side when a Knowledge Base is associated

rtype

dict

returns

Response Syntax

{
    'agentKnowledgeBase': {
        'agentId': 'string',
        'agentVersion': 'string',
        'knowledgeBaseId': 'string',
        'description': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'knowledgeBaseState': 'ENABLED'|'DISABLED'
    }
}

Response Structure

  • (dict) --

    Get Agent Knowledge Base Response

    • agentKnowledgeBase (dict) --

      Contains the information of an Agent Knowledge Base.

      • agentId (string) --

        Identifier for a resource.

      • agentVersion (string) --

        Agent Version.

      • knowledgeBaseId (string) --

        Identifier for a resource.

      • description (string) --

        Description of the Resource.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • knowledgeBaseState (string) --

        State of the knowledge base; whether it is enabled or disabled

DeleteAgent (new) Link ¶

Deletes an Agent for existing Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.delete_agent(
    agentId='string',
    skipResourceInUseCheck=True|False
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type skipResourceInUseCheck

boolean

param skipResourceInUseCheck

Skips checking if resource is in use when set to true. Defaults to false

rtype

dict

returns

Response Syntax

{
    'agentId': 'string',
    'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING'
}

Response Structure

  • (dict) --

    Delete Agent Response

    • agentId (string) --

      Identifier for a resource.

    • agentStatus (string) --

      Schema Type for Action APIs.

ListTagsForResource (new) Link ¶

List tags for a resource

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceArn='string'
)
type resourceArn

string

param resourceArn

[REQUIRED]

ARN of Taggable resources: [Agent, AgentAlias, Knowledge-Base]

rtype

dict

returns

Response Syntax

{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • tags (dict) --

      A map of tag keys and values

      • (string) --

        Key of a tag

        • (string) --

          Value of a tag

GetAgentActionGroup (new) Link ¶

Gets an Action Group for existing Amazon Bedrock Agent Version

See also: AWS API Documentation

Request Syntax

client.get_agent_action_group(
    agentId='string',
    agentVersion='string',
    actionGroupId='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentVersion

string

param agentVersion

[REQUIRED]

Version number generated when a version is created

type actionGroupId

string

param actionGroupId

[REQUIRED]

Id generated at the server side when an Agent Action Group is created

rtype

dict

returns

Response Syntax

{
    'agentActionGroup': {
        'agentId': 'string',
        'agentVersion': 'string',
        'actionGroupId': 'string',
        'actionGroupName': 'string',
        'clientToken': 'string',
        'description': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'parentActionSignature': 'AMAZON.UserInput',
        'actionGroupExecutor': {
            'lambda': 'string'
        },
        'apiSchema': {
            's3': {
                's3BucketName': 'string',
                's3ObjectKey': 'string'
            },
            'payload': 'string'
        },
        'actionGroupState': 'ENABLED'|'DISABLED'
    }
}

Response Structure

  • (dict) --

    Get Action Group Response

    • agentActionGroup (dict) --

      Contains the information of an Agent Action Group

      • agentId (string) --

        Identifier for a resource.

      • agentVersion (string) --

        Agent Version.

      • actionGroupId (string) --

        Identifier for a resource.

      • actionGroupName (string) --

        Name for a resource.

      • clientToken (string) --

        Client specified token used for idempotency checks

      • description (string) --

        Description of the Resource.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • parentActionSignature (string) --

        Action Group Signature for a BuiltIn Action

      • actionGroupExecutor (dict) --

        Type of Executors for an Action Group

        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) --

          ARN of a Lambda.

      • apiSchema (dict) --

        Contains information about the API Schema for the Action Group

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: s3, payload. 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) --

          The identifier for the S3 resource.

          • s3BucketName (string) --

            A bucket in S3.

          • s3ObjectKey (string) --

            A object key in S3.

        • payload (string) --

          String OpenAPI Payload

      • actionGroupState (string) --

        State of the action group

UntagResource (new) Link ¶

Untag a resource

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
type resourceArn

string

param resourceArn

[REQUIRED]

ARN of Taggable resources: [Agent, AgentAlias, Knowledge-Base]

type tagKeys

list

param tagKeys

[REQUIRED]

List of Tag Keys

  • (string) --

    Key of a tag

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateAgentAlias (new) Link ¶

Updates an existing Alias for an Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.update_agent_alias(
    agentId='string',
    agentAliasId='string',
    agentAliasName='string',
    description='string',
    routingConfiguration=[
        {
            'agentVersion': 'string'
        },
    ]
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentAliasId

string

param agentAliasId

[REQUIRED]

Id generated at the server side when an Agent Alias is created

type agentAliasName

string

param agentAliasName

[REQUIRED]

Name for a resource.

type description

string

param description

Description of the Resource.

type routingConfiguration

list

param routingConfiguration

Routing configuration for an Agent alias.

  • (dict) --

    Details about the routing configuration for an Agent alias.

    • agentVersion (string) -- [REQUIRED]

      Agent Version.

rtype

dict

returns

Response Syntax

{
    'agentAlias': {
        'agentId': 'string',
        'agentAliasId': 'string',
        'agentAliasName': 'string',
        'agentAliasArn': 'string',
        'clientToken': 'string',
        'description': 'string',
        'routingConfiguration': [
            {
                'agentVersion': 'string'
            },
        ],
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'agentAliasHistoryEvents': [
            {
                'routingConfiguration': [
                    {
                        'agentVersion': 'string'
                    },
                ],
                'endDate': datetime(2015, 1, 1),
                'startDate': datetime(2015, 1, 1)
            },
        ],
        'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING'
    }
}

Response Structure

  • (dict) --

    Update Agent Alias Response

    • agentAlias (dict) --

      Contains the information of an agent alias

      • agentId (string) --

        Identifier for a resource.

      • agentAliasId (string) --

        Id for an Agent Alias generated at the server side.

      • agentAliasName (string) --

        Name for a resource.

      • agentAliasArn (string) --

        Arn representation of the Agent Alias.

      • clientToken (string) --

        Client specified token used for idempotency checks

      • description (string) --

        Description of the Resource.

      • routingConfiguration (list) --

        Routing configuration for an Agent alias.

        • (dict) --

          Details about the routing configuration for an Agent alias.

          • agentVersion (string) --

            Agent Version.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • agentAliasHistoryEvents (list) --

        The list of history events for an alias for an Agent.

        • (dict) --

          History event for an alias for an Agent.

          • routingConfiguration (list) --

            Routing configuration for an Agent alias.

            • (dict) --

              Details about the routing configuration for an Agent alias.

              • agentVersion (string) --

                Agent Version.

          • endDate (datetime) --

            Time Stamp.

          • startDate (datetime) --

            Time Stamp.

      • agentAliasStatus (string) --

        The statuses an Agent Alias can be in.

GetAgentVersion (new) Link ¶

Gets an Agent version for existing Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.get_agent_version(
    agentId='string',
    agentVersion='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentVersion

string

param agentVersion

[REQUIRED]

Numerical Agent Version.

rtype

dict

returns

Response Syntax

{
    'agentVersion': {
        'agentId': 'string',
        'agentName': 'string',
        'agentArn': 'string',
        'version': 'string',
        'instruction': 'string',
        'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING',
        'foundationModel': 'string',
        'description': 'string',
        'idleSessionTTLInSeconds': 123,
        'agentResourceRoleArn': 'string',
        'customerEncryptionKeyArn': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'failureReasons': [
            'string',
        ],
        'recommendedActions': [
            'string',
        ],
        'promptOverrideConfiguration': {
            'promptConfigurations': [
                {
                    'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION',
                    'promptCreationMode': 'DEFAULT'|'OVERRIDDEN',
                    'promptState': 'ENABLED'|'DISABLED',
                    'basePromptTemplate': 'string',
                    'inferenceConfiguration': {
                        'temperature': ...,
                        'topP': ...,
                        'topK': 123,
                        'maximumLength': 123,
                        'stopSequences': [
                            'string',
                        ]
                    },
                    'parserMode': 'DEFAULT'|'OVERRIDDEN'
                },
            ],
            'overrideLambda': 'string'
        }
    }
}

Response Structure

  • (dict) --

    Get Agent Version Response

    • agentVersion (dict) --

      Contains the information of an agent version.

      • agentId (string) --

        Identifier for a resource.

      • agentName (string) --

        Name for a resource.

      • agentArn (string) --

        Arn representation of the Agent.

      • version (string) --

        Numerical Agent Version.

      • instruction (string) --

        Instruction for the agent.

      • agentStatus (string) --

        Schema Type for Action APIs.

      • foundationModel (string) --

        ARN or name of a Bedrock model.

      • description (string) --

        Description of the Resource.

      • idleSessionTTLInSeconds (integer) --

        Max Session Time.

      • agentResourceRoleArn (string) --

        ARN of a IAM role.

      • customerEncryptionKeyArn (string) --

        A KMS key ARN

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • failureReasons (list) --

        Failure Reasons for Error.

        • (string) --

          Failure Reason for Error.

      • recommendedActions (list) --

        The recommended actions users can take to resolve an error in failureReasons.

        • (string) --

          The recommended action users can take to resolve an error in failureReasons.

      • promptOverrideConfiguration (dict) --

        Configuration for prompt override.

        • promptConfigurations (list) --

          List of BasePromptConfiguration

          • (dict) --

            BasePromptConfiguration per Prompt Type.

            • promptType (string) --

              Prompt Type.

            • promptCreationMode (string) --

              Creation Mode for Prompt Configuration.

            • promptState (string) --

              Prompt State.

            • basePromptTemplate (string) --

              Base Prompt Template.

            • inferenceConfiguration (dict) --

              Configuration for inference in prompt configuration

              • temperature (float) --

                Controls randomness, higher values increase diversity

              • topP (float) --

                Cumulative probability cutoff for token selection

              • topK (integer) --

                Sample from the k most likely next tokens

              • maximumLength (integer) --

                Maximum length of output

              • stopSequences (list) --

                List of stop sequences

                • (string) --

            • parserMode (string) --

              Creation Mode for Prompt Configuration.

        • overrideLambda (string) --

          ARN of a Lambda.

UpdateDataSource (new) Link ¶

Update an existing data source

See also: AWS API Documentation

Request Syntax

client.update_data_source(
    knowledgeBaseId='string',
    dataSourceId='string',
    name='string',
    description='string',
    dataSourceConfiguration={
        'type': 'S3',
        's3Configuration': {
            'bucketArn': 'string',
            'inclusionPrefixes': [
                'string',
            ]
        }
    },
    serverSideEncryptionConfiguration={
        'kmsKeyArn': 'string'
    },
    vectorIngestionConfiguration={
        'chunkingConfiguration': {
            'chunkingStrategy': 'FIXED_SIZE'|'NONE',
            'fixedSizeChunkingConfiguration': {
                'maxTokens': 123,
                'overlapPercentage': 123
            }
        }
    }
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

type dataSourceId

string

param dataSourceId

[REQUIRED]

Identifier for a resource.

type name

string

param name

[REQUIRED]

Name for a resource.

type description

string

param description

Description of the Resource.

type dataSourceConfiguration

dict

param dataSourceConfiguration

[REQUIRED]

Specifies a raw data source location to ingest.

  • type (string) -- [REQUIRED]

    The type of the data source location.

  • s3Configuration (dict) --

    Configures an S3 data source location.

    • bucketArn (string) -- [REQUIRED]

      A S3 bucket ARN

    • inclusionPrefixes (list) --

      A list of S3 prefixes.

      • (string) --

        Prefix for s3 object.

type serverSideEncryptionConfiguration

dict

param serverSideEncryptionConfiguration

Server-side encryption configuration.

  • kmsKeyArn (string) --

    A KMS key ARN

type vectorIngestionConfiguration

dict

param vectorIngestionConfiguration

Configures ingestion for a vector knowledge base

  • chunkingConfiguration (dict) --

    Configures chunking strategy

    • chunkingStrategy (string) -- [REQUIRED]

      The type of chunking strategy

    • fixedSizeChunkingConfiguration (dict) --

      Configures fixed size chunking strategy

      • maxTokens (integer) -- [REQUIRED]

        The maximum number of tokens per chunk.

      • overlapPercentage (integer) -- [REQUIRED]

        The overlap percentage between adjacent chunks.

rtype

dict

returns

Response Syntax

{
    'dataSource': {
        'knowledgeBaseId': 'string',
        'dataSourceId': 'string',
        'name': 'string',
        'status': 'AVAILABLE'|'DELETING',
        'description': 'string',
        'dataSourceConfiguration': {
            'type': 'S3',
            's3Configuration': {
                'bucketArn': 'string',
                'inclusionPrefixes': [
                    'string',
                ]
            }
        },
        'serverSideEncryptionConfiguration': {
            'kmsKeyArn': 'string'
        },
        'vectorIngestionConfiguration': {
            'chunkingConfiguration': {
                'chunkingStrategy': 'FIXED_SIZE'|'NONE',
                'fixedSizeChunkingConfiguration': {
                    'maxTokens': 123,
                    'overlapPercentage': 123
                }
            }
        },
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • dataSource (dict) --

      Contains the information of a data source.

      • knowledgeBaseId (string) --

        Identifier for a resource.

      • dataSourceId (string) --

        Identifier for a resource.

      • name (string) --

        Name for a resource.

      • status (string) --

        The status of a data source.

      • description (string) --

        Description of the Resource.

      • dataSourceConfiguration (dict) --

        Specifies a raw data source location to ingest.

        • type (string) --

          The type of the data source location.

        • s3Configuration (dict) --

          Configures an S3 data source location.

          • bucketArn (string) --

            A S3 bucket ARN

          • inclusionPrefixes (list) --

            A list of S3 prefixes.

            • (string) --

              Prefix for s3 object.

      • serverSideEncryptionConfiguration (dict) --

        Server-side encryption configuration.

        • kmsKeyArn (string) --

          A KMS key ARN

      • vectorIngestionConfiguration (dict) --

        Configures ingestion for a vector knowledge base

        • chunkingConfiguration (dict) --

          Configures chunking strategy

          • chunkingStrategy (string) --

            The type of chunking strategy

          • fixedSizeChunkingConfiguration (dict) --

            Configures fixed size chunking strategy

            • maxTokens (integer) --

              The maximum number of tokens per chunk.

            • overlapPercentage (integer) --

              The overlap percentage between adjacent chunks.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

ListAgentKnowledgeBases (new) Link ¶

List of Knowledge Bases associated to an existing Amazon Bedrock Agent Version

See also: AWS API Documentation

Request Syntax

client.list_agent_knowledge_bases(
    agentId='string',
    agentVersion='string',
    maxResults=123,
    nextToken='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentVersion

string

param agentVersion

[REQUIRED]

Version number generated when a version is created

type maxResults

integer

param maxResults

Max Results.

type nextToken

string

param nextToken

Opaque continuation token of previous paginated response.

rtype

dict

returns

Response Syntax

{
    'agentKnowledgeBaseSummaries': [
        {
            'knowledgeBaseId': 'string',
            'description': 'string',
            'knowledgeBaseState': 'ENABLED'|'DISABLED',
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    List Agent Knowledge Bases Response

    • agentKnowledgeBaseSummaries (list) --

      List of Agent Knowledge Base Summaries

      • (dict) --

        Agent Knowledge Base Summary

        • knowledgeBaseId (string) --

          Identifier for a resource.

        • description (string) --

          Description of the Resource.

        • knowledgeBaseState (string) --

          State of the knowledge base; whether it is enabled or disabled

        • updatedAt (datetime) --

          Time Stamp.

    • nextToken (string) --

      Opaque continuation token of previous paginated response.

ListAgents (new) Link ¶

Lists Agents

See also: AWS API Documentation

Request Syntax

client.list_agents(
    maxResults=123,
    nextToken='string'
)
type maxResults

integer

param maxResults

Max Results.

type nextToken

string

param nextToken

Opaque continuation token of previous paginated response.

rtype

dict

returns

Response Syntax

{
    'agentSummaries': [
        {
            'agentId': 'string',
            'agentName': 'string',
            'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING',
            'description': 'string',
            'updatedAt': datetime(2015, 1, 1),
            'latestAgentVersion': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    List Agent Response

    • agentSummaries (list) --

      List of AgentSummary.

      • (dict) --

        Summary of Agent.

        • agentId (string) --

          Identifier for a resource.

        • agentName (string) --

          Name for a resource.

        • agentStatus (string) --

          Schema Type for Action APIs.

        • description (string) --

          Description of the Resource.

        • updatedAt (datetime) --

          Time Stamp.

        • latestAgentVersion (string) --

          Agent Version.

    • nextToken (string) --

      Opaque continuation token of previous paginated response.

CreateDataSource (new) Link ¶

Create a new data source

See also: AWS API Documentation

Request Syntax

client.create_data_source(
    knowledgeBaseId='string',
    clientToken='string',
    name='string',
    description='string',
    dataSourceConfiguration={
        'type': 'S3',
        's3Configuration': {
            'bucketArn': 'string',
            'inclusionPrefixes': [
                'string',
            ]
        }
    },
    serverSideEncryptionConfiguration={
        'kmsKeyArn': 'string'
    },
    vectorIngestionConfiguration={
        'chunkingConfiguration': {
            'chunkingStrategy': 'FIXED_SIZE'|'NONE',
            'fixedSizeChunkingConfiguration': {
                'maxTokens': 123,
                'overlapPercentage': 123
            }
        }
    }
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

type clientToken

string

param clientToken

Client specified token used for idempotency checks

This field is autopopulated if not provided.

type name

string

param name

[REQUIRED]

Name for a resource.

type description

string

param description

Description of the Resource.

type dataSourceConfiguration

dict

param dataSourceConfiguration

[REQUIRED]

Specifies a raw data source location to ingest.

  • type (string) -- [REQUIRED]

    The type of the data source location.

  • s3Configuration (dict) --

    Configures an S3 data source location.

    • bucketArn (string) -- [REQUIRED]

      A S3 bucket ARN

    • inclusionPrefixes (list) --

      A list of S3 prefixes.

      • (string) --

        Prefix for s3 object.

type serverSideEncryptionConfiguration

dict

param serverSideEncryptionConfiguration

Server-side encryption configuration.

  • kmsKeyArn (string) --

    A KMS key ARN

type vectorIngestionConfiguration

dict

param vectorIngestionConfiguration

Configures ingestion for a vector knowledge base

  • chunkingConfiguration (dict) --

    Configures chunking strategy

    • chunkingStrategy (string) -- [REQUIRED]

      The type of chunking strategy

    • fixedSizeChunkingConfiguration (dict) --

      Configures fixed size chunking strategy

      • maxTokens (integer) -- [REQUIRED]

        The maximum number of tokens per chunk.

      • overlapPercentage (integer) -- [REQUIRED]

        The overlap percentage between adjacent chunks.

rtype

dict

returns

Response Syntax

{
    'dataSource': {
        'knowledgeBaseId': 'string',
        'dataSourceId': 'string',
        'name': 'string',
        'status': 'AVAILABLE'|'DELETING',
        'description': 'string',
        'dataSourceConfiguration': {
            'type': 'S3',
            's3Configuration': {
                'bucketArn': 'string',
                'inclusionPrefixes': [
                    'string',
                ]
            }
        },
        'serverSideEncryptionConfiguration': {
            'kmsKeyArn': 'string'
        },
        'vectorIngestionConfiguration': {
            'chunkingConfiguration': {
                'chunkingStrategy': 'FIXED_SIZE'|'NONE',
                'fixedSizeChunkingConfiguration': {
                    'maxTokens': 123,
                    'overlapPercentage': 123
                }
            }
        },
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • dataSource (dict) --

      Contains the information of a data source.

      • knowledgeBaseId (string) --

        Identifier for a resource.

      • dataSourceId (string) --

        Identifier for a resource.

      • name (string) --

        Name for a resource.

      • status (string) --

        The status of a data source.

      • description (string) --

        Description of the Resource.

      • dataSourceConfiguration (dict) --

        Specifies a raw data source location to ingest.

        • type (string) --

          The type of the data source location.

        • s3Configuration (dict) --

          Configures an S3 data source location.

          • bucketArn (string) --

            A S3 bucket ARN

          • inclusionPrefixes (list) --

            A list of S3 prefixes.

            • (string) --

              Prefix for s3 object.

      • serverSideEncryptionConfiguration (dict) --

        Server-side encryption configuration.

        • kmsKeyArn (string) --

          A KMS key ARN

      • vectorIngestionConfiguration (dict) --

        Configures ingestion for a vector knowledge base

        • chunkingConfiguration (dict) --

          Configures chunking strategy

          • chunkingStrategy (string) --

            The type of chunking strategy

          • fixedSizeChunkingConfiguration (dict) --

            Configures fixed size chunking strategy

            • maxTokens (integer) --

              The maximum number of tokens per chunk.

            • overlapPercentage (integer) --

              The overlap percentage between adjacent chunks.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

GetKnowledgeBase (new) Link ¶

Get an existing knowledge base

See also: AWS API Documentation

Request Syntax

client.get_knowledge_base(
    knowledgeBaseId='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

rtype

dict

returns

Response Syntax

{
    'knowledgeBase': {
        'knowledgeBaseId': 'string',
        'name': 'string',
        'knowledgeBaseArn': 'string',
        'description': 'string',
        'roleArn': 'string',
        'knowledgeBaseConfiguration': {
            'type': 'VECTOR',
            'vectorKnowledgeBaseConfiguration': {
                'embeddingModelArn': 'string'
            }
        },
        'storageConfiguration': {
            'type': 'OPENSEARCH_SERVERLESS'|'PINECONE'|'REDIS_ENTERPRISE_CLOUD',
            'opensearchServerlessConfiguration': {
                'collectionArn': 'string',
                'vectorIndexName': 'string',
                'fieldMapping': {
                    'vectorField': 'string',
                    'textField': 'string',
                    'metadataField': 'string'
                }
            },
            'pineconeConfiguration': {
                'connectionString': 'string',
                'credentialsSecretArn': 'string',
                'namespace': 'string',
                'fieldMapping': {
                    'textField': 'string',
                    'metadataField': 'string'
                }
            },
            'redisEnterpriseCloudConfiguration': {
                'endpoint': 'string',
                'vectorIndexName': 'string',
                'credentialsSecretArn': 'string',
                'fieldMapping': {
                    'vectorField': 'string',
                    'textField': 'string',
                    'metadataField': 'string'
                }
            }
        },
        'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'failureReasons': [
            'string',
        ]
    }
}

Response Structure

  • (dict) --

    • knowledgeBase (dict) --

      Contains the information of a knowledge base.

      • knowledgeBaseId (string) --

        Identifier for a resource.

      • name (string) --

        Name for a resource.

      • knowledgeBaseArn (string) --

        ARN of a KnowledgeBase

      • description (string) --

        Description of the Resource.

      • roleArn (string) --

        ARN of a IAM role.

      • knowledgeBaseConfiguration (dict) --

        Configures a bedrock knowledge base.

        • type (string) --

          The type of a knowledge base.

        • vectorKnowledgeBaseConfiguration (dict) --

          Configurations for a vector knowledge base.

          • embeddingModelArn (string) --

            Arn of a Bedrock model.

      • storageConfiguration (dict) --

        Configures the physical storage of ingested data in a knowledge base.

        • type (string) --

          The storage type of a knowledge base.

        • opensearchServerlessConfiguration (dict) --

          Contains the configurations to use OpenSearch Serverless to store knowledge base data.

          • collectionArn (string) --

            Arn of an OpenSearch Serverless collection.

          • vectorIndexName (string) --

            Arn of an OpenSearch Serverless index.

          • fieldMapping (dict) --

            A mapping of Bedrock Knowledge Base fields to OpenSearch Serverless field names

            • vectorField (string) --

              Name of the field

            • textField (string) --

              Name of the field

            • metadataField (string) --

              Name of the field

        • pineconeConfiguration (dict) --

          Contains the configurations to use Pinecone to store knowledge base data.

          • connectionString (string) --

            Pinecone connection string

          • credentialsSecretArn (string) --

            Arn of a SecretsManager Secret.

          • namespace (string) --

            Pinecone namespace

          • fieldMapping (dict) --

            A mapping of Bedrock Knowledge Base fields to Pinecone field names

            • textField (string) --

              Name of the field

            • metadataField (string) --

              Name of the field

        • redisEnterpriseCloudConfiguration (dict) --

          Contains the configurations to use Redis Enterprise Cloud to store knowledge base data.

          • endpoint (string) --

            Redis enterprise cloud endpoint

          • vectorIndexName (string) --

            Name of a redis enterprise cloud index

          • credentialsSecretArn (string) --

            Arn of a SecretsManager Secret.

          • fieldMapping (dict) --

            A mapping of Bedrock Knowledge Base fields to Redis Cloud field names

            • vectorField (string) --

              Name of the field

            • textField (string) --

              Name of the field

            • metadataField (string) --

              Name of the field

      • status (string) --

        The status of a knowledge base.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • failureReasons (list) --

        Failure Reasons for Error.

        • (string) --

          Failure Reason for Error.

DeleteAgentActionGroup (new) Link ¶

Deletes an Action Group for existing Amazon Bedrock Agent.

See also: AWS API Documentation

Request Syntax

client.delete_agent_action_group(
    agentId='string',
    agentVersion='string',
    actionGroupId='string',
    skipResourceInUseCheck=True|False
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentVersion

string

param agentVersion

[REQUIRED]

Draft Version of the Agent.

type actionGroupId

string

param actionGroupId

[REQUIRED]

Id generated at the server side when an Agent ActionGroup is created

type skipResourceInUseCheck

boolean

param skipResourceInUseCheck

Skips checking if resource is in use when set to true. Defaults to false

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    Delete Action Group Response

ListKnowledgeBases (new) Link ¶

List Knowledge Bases

See also: AWS API Documentation

Request Syntax

client.list_knowledge_bases(
    maxResults=123,
    nextToken='string'
)
type maxResults

integer

param maxResults

Max Results.

type nextToken

string

param nextToken

Opaque continuation token of previous paginated response.

rtype

dict

returns

Response Syntax

{
    'knowledgeBaseSummaries': [
        {
            'knowledgeBaseId': 'string',
            'name': 'string',
            'description': 'string',
            'status': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING'|'FAILED',
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • knowledgeBaseSummaries (list) --

      List of KnowledgeBaseSummaries

      • (dict) --

        Summary information of a knowledge base.

        • knowledgeBaseId (string) --

          Identifier for a resource.

        • name (string) --

          Name for a resource.

        • description (string) --

          Description of the Resource.

        • status (string) --

          The status of a knowledge base.

        • updatedAt (datetime) --

          Time Stamp.

    • nextToken (string) --

      Opaque continuation token of previous paginated response.

ListAgentVersions (new) Link ¶

Lists Agent Versions

See also: AWS API Documentation

Request Syntax

client.list_agent_versions(
    agentId='string',
    maxResults=123,
    nextToken='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type maxResults

integer

param maxResults

Max Results.

type nextToken

string

param nextToken

Opaque continuation token of previous paginated response.

rtype

dict

returns

Response Syntax

{
    'agentVersionSummaries': [
        {
            'agentName': 'string',
            'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING',
            'agentVersion': 'string',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'description': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    List Agent Versions Response

    • agentVersionSummaries (list) --

      List of AgentVersionSummary.

      • (dict) --

        Summary of agent version.

        • agentName (string) --

          Name for a resource.

        • agentStatus (string) --

          Schema Type for Action APIs.

        • agentVersion (string) --

          Agent Version.

        • createdAt (datetime) --

          Time Stamp.

        • updatedAt (datetime) --

          Time Stamp.

        • description (string) --

          Description of the Resource.

    • nextToken (string) --

      Opaque continuation token of previous paginated response.

CreateAgentAlias (new) Link ¶

Creates an Alias for an existing Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.create_agent_alias(
    agentId='string',
    agentAliasName='string',
    clientToken='string',
    description='string',
    routingConfiguration=[
        {
            'agentVersion': 'string'
        },
    ],
    tags={
        'string': 'string'
    }
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentAliasName

string

param agentAliasName

[REQUIRED]

Name for a resource.

type clientToken

string

param clientToken

Client specified token used for idempotency checks

This field is autopopulated if not provided.

type description

string

param description

Description of the Resource.

type routingConfiguration

list

param routingConfiguration

Routing configuration for an Agent alias.

  • (dict) --

    Details about the routing configuration for an Agent alias.

    • agentVersion (string) -- [REQUIRED]

      Agent Version.

type tags

dict

param tags

A map of tag keys and values

  • (string) --

    Key of a tag

    • (string) --

      Value of a tag

rtype

dict

returns

Response Syntax

{
    'agentAlias': {
        'agentId': 'string',
        'agentAliasId': 'string',
        'agentAliasName': 'string',
        'agentAliasArn': 'string',
        'clientToken': 'string',
        'description': 'string',
        'routingConfiguration': [
            {
                'agentVersion': 'string'
            },
        ],
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'agentAliasHistoryEvents': [
            {
                'routingConfiguration': [
                    {
                        'agentVersion': 'string'
                    },
                ],
                'endDate': datetime(2015, 1, 1),
                'startDate': datetime(2015, 1, 1)
            },
        ],
        'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING'
    }
}

Response Structure

  • (dict) --

    Create Agent Alias Response

    • agentAlias (dict) --

      Contains the information of an agent alias

      • agentId (string) --

        Identifier for a resource.

      • agentAliasId (string) --

        Id for an Agent Alias generated at the server side.

      • agentAliasName (string) --

        Name for a resource.

      • agentAliasArn (string) --

        Arn representation of the Agent Alias.

      • clientToken (string) --

        Client specified token used for idempotency checks

      • description (string) --

        Description of the Resource.

      • routingConfiguration (list) --

        Routing configuration for an Agent alias.

        • (dict) --

          Details about the routing configuration for an Agent alias.

          • agentVersion (string) --

            Agent Version.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • agentAliasHistoryEvents (list) --

        The list of history events for an alias for an Agent.

        • (dict) --

          History event for an alias for an Agent.

          • routingConfiguration (list) --

            Routing configuration for an Agent alias.

            • (dict) --

              Details about the routing configuration for an Agent alias.

              • agentVersion (string) --

                Agent Version.

          • endDate (datetime) --

            Time Stamp.

          • startDate (datetime) --

            Time Stamp.

      • agentAliasStatus (string) --

        The statuses an Agent Alias can be in.

ListAgentAliases (new) Link ¶

Lists all the Aliases for an Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.list_agent_aliases(
    agentId='string',
    maxResults=123,
    nextToken='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type maxResults

integer

param maxResults

Max Results.

type nextToken

string

param nextToken

Opaque continuation token of previous paginated response.

rtype

dict

returns

Response Syntax

{
    'agentAliasSummaries': [
        {
            'agentAliasId': 'string',
            'agentAliasName': 'string',
            'description': 'string',
            'routingConfiguration': [
                {
                    'agentVersion': 'string'
                },
            ],
            'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    List Agent Aliases Response

    • agentAliasSummaries (list) --

      The list of summaries of all the aliases for an Agent.

      • (dict) --

        Summary of an alias for an Agent.

        • agentAliasId (string) --

          Id for an Agent Alias generated at the server side.

        • agentAliasName (string) --

          Name for a resource.

        • description (string) --

          Description of the Resource.

        • routingConfiguration (list) --

          Routing configuration for an Agent alias.

          • (dict) --

            Details about the routing configuration for an Agent alias.

            • agentVersion (string) --

              Agent Version.

        • agentAliasStatus (string) --

          The statuses an Agent Alias can be in.

        • createdAt (datetime) --

          Time Stamp.

        • updatedAt (datetime) --

          Time Stamp.

    • nextToken (string) --

      Opaque continuation token of previous paginated response.

DeleteAgentVersion (new) Link ¶

Deletes an Agent version for existing Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.delete_agent_version(
    agentId='string',
    agentVersion='string',
    skipResourceInUseCheck=True|False
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentVersion

string

param agentVersion

[REQUIRED]

Numerical Agent Version.

type skipResourceInUseCheck

boolean

param skipResourceInUseCheck

Skips checking if resource is in use when set to true. Defaults to false

rtype

dict

returns

Response Syntax

{
    'agentId': 'string',
    'agentVersion': 'string',
    'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING'
}

Response Structure

  • (dict) --

    Delete Agent Version Response

    • agentId (string) --

      Identifier for a resource.

    • agentVersion (string) --

      Numerical Agent Version.

    • agentStatus (string) --

      Schema Type for Action APIs.

DeleteAgentAlias (new) Link ¶

Deletes an Alias for a Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.delete_agent_alias(
    agentId='string',
    agentAliasId='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentAliasId

string

param agentAliasId

[REQUIRED]

Id generated at the server side when an Agent Alias is created

rtype

dict

returns

Response Syntax

{
    'agentId': 'string',
    'agentAliasId': 'string',
    'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING'
}

Response Structure

  • (dict) --

    Delete Agent Alias Response

    • agentId (string) --

      Identifier for a resource.

    • agentAliasId (string) --

      Id for an Agent Alias generated at the server side.

    • agentAliasStatus (string) --

      The statuses an Agent Alias can be in.

DeleteDataSource (new) Link ¶

Delete an existing data source

See also: AWS API Documentation

Request Syntax

client.delete_data_source(
    knowledgeBaseId='string',
    dataSourceId='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

type dataSourceId

string

param dataSourceId

[REQUIRED]

Identifier for a resource.

rtype

dict

returns

Response Syntax

{
    'knowledgeBaseId': 'string',
    'dataSourceId': 'string',
    'status': 'AVAILABLE'|'DELETING'
}

Response Structure

  • (dict) --

    • knowledgeBaseId (string) --

      Identifier for a resource.

    • dataSourceId (string) --

      Identifier for a resource.

    • status (string) --

      The status of a data source.

GetAgentAlias (new) Link ¶

Describes an Alias for a Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.get_agent_alias(
    agentId='string',
    agentAliasId='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentAliasId

string

param agentAliasId

[REQUIRED]

Id generated at the server side when an Agent Alias is created

rtype

dict

returns

Response Syntax

{
    'agentAlias': {
        'agentId': 'string',
        'agentAliasId': 'string',
        'agentAliasName': 'string',
        'agentAliasArn': 'string',
        'clientToken': 'string',
        'description': 'string',
        'routingConfiguration': [
            {
                'agentVersion': 'string'
            },
        ],
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'agentAliasHistoryEvents': [
            {
                'routingConfiguration': [
                    {
                        'agentVersion': 'string'
                    },
                ],
                'endDate': datetime(2015, 1, 1),
                'startDate': datetime(2015, 1, 1)
            },
        ],
        'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING'
    }
}

Response Structure

  • (dict) --

    Get Agent Alias Response

    • agentAlias (dict) --

      Contains the information of an agent alias

      • agentId (string) --

        Identifier for a resource.

      • agentAliasId (string) --

        Id for an Agent Alias generated at the server side.

      • agentAliasName (string) --

        Name for a resource.

      • agentAliasArn (string) --

        Arn representation of the Agent Alias.

      • clientToken (string) --

        Client specified token used for idempotency checks

      • description (string) --

        Description of the Resource.

      • routingConfiguration (list) --

        Routing configuration for an Agent alias.

        • (dict) --

          Details about the routing configuration for an Agent alias.

          • agentVersion (string) --

            Agent Version.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • agentAliasHistoryEvents (list) --

        The list of history events for an alias for an Agent.

        • (dict) --

          History event for an alias for an Agent.

          • routingConfiguration (list) --

            Routing configuration for an Agent alias.

            • (dict) --

              Details about the routing configuration for an Agent alias.

              • agentVersion (string) --

                Agent Version.

          • endDate (datetime) --

            Time Stamp.

          • startDate (datetime) --

            Time Stamp.

      • agentAliasStatus (string) --

        The statuses an Agent Alias can be in.

ListAgentActionGroups (new) Link ¶

Lists an Action Group for existing Amazon Bedrock Agent Version

See also: AWS API Documentation

Request Syntax

client.list_agent_action_groups(
    agentId='string',
    agentVersion='string',
    maxResults=123,
    nextToken='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is Listed

type agentVersion

string

param agentVersion

[REQUIRED]

Id generated at the server side when an Agent is Listed

type maxResults

integer

param maxResults

Max Results.

type nextToken

string

param nextToken

Opaque continuation token of previous paginated response.

rtype

dict

returns

Response Syntax

{
    'actionGroupSummaries': [
        {
            'actionGroupId': 'string',
            'actionGroupName': 'string',
            'actionGroupState': 'ENABLED'|'DISABLED',
            'description': 'string',
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    List Action Groups Response

    • actionGroupSummaries (list) --

      List of ActionGroup Summaries

      • (dict) --

        ActionGroup Summary

        • actionGroupId (string) --

          Identifier for a resource.

        • actionGroupName (string) --

          Name for a resource.

        • actionGroupState (string) --

          State of the action group

        • description (string) --

          Description of the Resource.

        • updatedAt (datetime) --

          Time Stamp.

    • nextToken (string) --

      Opaque continuation token of previous paginated response.

CreateAgentActionGroup (new) Link ¶

Creates an Action Group for existing Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.create_agent_action_group(
    agentId='string',
    agentVersion='string',
    actionGroupName='string',
    clientToken='string',
    description='string',
    parentActionGroupSignature='AMAZON.UserInput',
    actionGroupExecutor={
        'lambda': 'string'
    },
    apiSchema={
        's3': {
            's3BucketName': 'string',
            's3ObjectKey': 'string'
        },
        'payload': 'string'
    },
    actionGroupState='ENABLED'|'DISABLED'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentVersion

string

param agentVersion

[REQUIRED]

Draft Version of the Agent.

type actionGroupName

string

param actionGroupName

[REQUIRED]

Name for a resource.

type clientToken

string

param clientToken

Client specified token used for idempotency checks

This field is autopopulated if not provided.

type description

string

param description

Description of the Resource.

type parentActionGroupSignature

string

param parentActionGroupSignature

Action Group Signature for a BuiltIn Action

type actionGroupExecutor

dict

param actionGroupExecutor

Type of Executors for an Action Group

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: lambda.

  • lambda (string) --

    ARN of a Lambda.

type apiSchema

dict

param apiSchema

Contains information about the API Schema for the Action Group

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: s3, payload.

  • s3 (dict) --

    The identifier for the S3 resource.

    • s3BucketName (string) --

      A bucket in S3.

    • s3ObjectKey (string) --

      A object key in S3.

  • payload (string) --

    String OpenAPI Payload

type actionGroupState

string

param actionGroupState

State of the action group

rtype

dict

returns

Response Syntax

{
    'agentActionGroup': {
        'agentId': 'string',
        'agentVersion': 'string',
        'actionGroupId': 'string',
        'actionGroupName': 'string',
        'clientToken': 'string',
        'description': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'parentActionSignature': 'AMAZON.UserInput',
        'actionGroupExecutor': {
            'lambda': 'string'
        },
        'apiSchema': {
            's3': {
                's3BucketName': 'string',
                's3ObjectKey': 'string'
            },
            'payload': 'string'
        },
        'actionGroupState': 'ENABLED'|'DISABLED'
    }
}

Response Structure

  • (dict) --

    Create Action Group Response

    • agentActionGroup (dict) --

      Contains the information of an Agent Action Group

      • agentId (string) --

        Identifier for a resource.

      • agentVersion (string) --

        Agent Version.

      • actionGroupId (string) --

        Identifier for a resource.

      • actionGroupName (string) --

        Name for a resource.

      • clientToken (string) --

        Client specified token used for idempotency checks

      • description (string) --

        Description of the Resource.

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • parentActionSignature (string) --

        Action Group Signature for a BuiltIn Action

      • actionGroupExecutor (dict) --

        Type of Executors for an Action Group

        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) --

          ARN of a Lambda.

      • apiSchema (dict) --

        Contains information about the API Schema for the Action Group

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: s3, payload. 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) --

          The identifier for the S3 resource.

          • s3BucketName (string) --

            A bucket in S3.

          • s3ObjectKey (string) --

            A object key in S3.

        • payload (string) --

          String OpenAPI Payload

      • actionGroupState (string) --

        State of the action group

CreateAgent (new) Link ¶

Creates an Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.create_agent(
    agentName='string',
    clientToken='string',
    instruction='string',
    foundationModel='string',
    description='string',
    idleSessionTTLInSeconds=123,
    agentResourceRoleArn='string',
    customerEncryptionKeyArn='string',
    tags={
        'string': 'string'
    },
    promptOverrideConfiguration={
        'promptConfigurations': [
            {
                'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION',
                'promptCreationMode': 'DEFAULT'|'OVERRIDDEN',
                'promptState': 'ENABLED'|'DISABLED',
                'basePromptTemplate': 'string',
                'inferenceConfiguration': {
                    'temperature': ...,
                    'topP': ...,
                    'topK': 123,
                    'maximumLength': 123,
                    'stopSequences': [
                        'string',
                    ]
                },
                'parserMode': 'DEFAULT'|'OVERRIDDEN'
            },
        ],
        'overrideLambda': 'string'
    }
)
type agentName

string

param agentName

[REQUIRED]

Name for a resource.

type clientToken

string

param clientToken

Client specified token used for idempotency checks

This field is autopopulated if not provided.

type instruction

string

param instruction

Instruction for the agent.

type foundationModel

string

param foundationModel

ARN or name of a Bedrock model.

type description

string

param description

Description of the Resource.

type idleSessionTTLInSeconds

integer

param idleSessionTTLInSeconds

Max Session Time.

type agentResourceRoleArn

string

param agentResourceRoleArn

[REQUIRED]

ARN of a IAM role.

type customerEncryptionKeyArn

string

param customerEncryptionKeyArn

A KMS key ARN

type tags

dict

param tags

A map of tag keys and values

  • (string) --

    Key of a tag

    • (string) --

      Value of a tag

type promptOverrideConfiguration

dict

param promptOverrideConfiguration

Configuration for prompt override.

  • promptConfigurations (list) -- [REQUIRED]

    List of BasePromptConfiguration

    • (dict) --

      BasePromptConfiguration per Prompt Type.

      • promptType (string) --

        Prompt Type.

      • promptCreationMode (string) --

        Creation Mode for Prompt Configuration.

      • promptState (string) --

        Prompt State.

      • basePromptTemplate (string) --

        Base Prompt Template.

      • inferenceConfiguration (dict) --

        Configuration for inference in prompt configuration

        • temperature (float) --

          Controls randomness, higher values increase diversity

        • topP (float) --

          Cumulative probability cutoff for token selection

        • topK (integer) --

          Sample from the k most likely next tokens

        • maximumLength (integer) --

          Maximum length of output

        • stopSequences (list) --

          List of stop sequences

          • (string) --

      • parserMode (string) --

        Creation Mode for Prompt Configuration.

  • overrideLambda (string) --

    ARN of a Lambda.

rtype

dict

returns

Response Syntax

{
    'agent': {
        'agentId': 'string',
        'agentName': 'string',
        'agentArn': 'string',
        'agentVersion': 'string',
        'clientToken': 'string',
        'instruction': 'string',
        'agentStatus': 'CREATING'|'PREPARING'|'PREPARED'|'NOT_PREPARED'|'DELETING'|'FAILED'|'VERSIONING'|'UPDATING',
        'foundationModel': 'string',
        'description': 'string',
        'idleSessionTTLInSeconds': 123,
        'agentResourceRoleArn': 'string',
        'customerEncryptionKeyArn': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'preparedAt': datetime(2015, 1, 1),
        'failureReasons': [
            'string',
        ],
        'recommendedActions': [
            'string',
        ],
        'promptOverrideConfiguration': {
            'promptConfigurations': [
                {
                    'promptType': 'PRE_PROCESSING'|'ORCHESTRATION'|'POST_PROCESSING'|'KNOWLEDGE_BASE_RESPONSE_GENERATION',
                    'promptCreationMode': 'DEFAULT'|'OVERRIDDEN',
                    'promptState': 'ENABLED'|'DISABLED',
                    'basePromptTemplate': 'string',
                    'inferenceConfiguration': {
                        'temperature': ...,
                        'topP': ...,
                        'topK': 123,
                        'maximumLength': 123,
                        'stopSequences': [
                            'string',
                        ]
                    },
                    'parserMode': 'DEFAULT'|'OVERRIDDEN'
                },
            ],
            'overrideLambda': 'string'
        }
    }
}

Response Structure

  • (dict) --

    Create Agent Response

    • agent (dict) --

      Contains the information of an agent

      • agentId (string) --

        Identifier for a resource.

      • agentName (string) --

        Name for a resource.

      • agentArn (string) --

        Arn representation of the Agent.

      • agentVersion (string) --

        Draft Agent Version.

      • clientToken (string) --

        Client specified token used for idempotency checks

      • instruction (string) --

        Instruction for the agent.

      • agentStatus (string) --

        Schema Type for Action APIs.

      • foundationModel (string) --

        ARN or name of a Bedrock model.

      • description (string) --

        Description of the Resource.

      • idleSessionTTLInSeconds (integer) --

        Max Session Time.

      • agentResourceRoleArn (string) --

        ARN of a IAM role.

      • customerEncryptionKeyArn (string) --

        A KMS key ARN

      • createdAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.

      • preparedAt (datetime) --

        Time Stamp.

      • failureReasons (list) --

        Failure Reasons for Error.

        • (string) --

          Failure Reason for Error.

      • recommendedActions (list) --

        The recommended actions users can take to resolve an error in failureReasons.

        • (string) --

          The recommended action users can take to resolve an error in failureReasons.

      • promptOverrideConfiguration (dict) --

        Configuration for prompt override.

        • promptConfigurations (list) --

          List of BasePromptConfiguration

          • (dict) --

            BasePromptConfiguration per Prompt Type.

            • promptType (string) --

              Prompt Type.

            • promptCreationMode (string) --

              Creation Mode for Prompt Configuration.

            • promptState (string) --

              Prompt State.

            • basePromptTemplate (string) --

              Base Prompt Template.

            • inferenceConfiguration (dict) --

              Configuration for inference in prompt configuration

              • temperature (float) --

                Controls randomness, higher values increase diversity

              • topP (float) --

                Cumulative probability cutoff for token selection

              • topK (integer) --

                Sample from the k most likely next tokens

              • maximumLength (integer) --

                Maximum length of output

              • stopSequences (list) --

                List of stop sequences

                • (string) --

            • parserMode (string) --

              Creation Mode for Prompt Configuration.

        • overrideLambda (string) --

          ARN of a Lambda.

DisassociateAgentKnowledgeBase (new) Link ¶

Disassociate an existing Knowledge Base from an Amazon Bedrock Agent

See also: AWS API Documentation

Request Syntax

client.disassociate_agent_knowledge_base(
    agentId='string',
    agentVersion='string',
    knowledgeBaseId='string'
)
type agentId

string

param agentId

[REQUIRED]

Id generated at the server side when an Agent is created

type agentVersion

string

param agentVersion

[REQUIRED]

Draft Version of the Agent.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Id generated at the server side when a Knowledge Base is associated to an Agent

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    Disassociate Agent Knowledge Base Response

StartIngestionJob (new) Link ¶

Start a new ingestion job

See also: AWS API Documentation

Request Syntax

client.start_ingestion_job(
    knowledgeBaseId='string',
    dataSourceId='string',
    clientToken='string',
    description='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

Identifier for a resource.

type dataSourceId

string

param dataSourceId

[REQUIRED]

Identifier for a resource.

type clientToken

string

param clientToken

Client specified token used for idempotency checks

This field is autopopulated if not provided.

type description

string

param description

Description of the Resource.

rtype

dict

returns

Response Syntax

{
    'ingestionJob': {
        'knowledgeBaseId': 'string',
        'dataSourceId': 'string',
        'ingestionJobId': 'string',
        'description': 'string',
        'status': 'STARTING'|'IN_PROGRESS'|'COMPLETE'|'FAILED',
        'statistics': {
            'numberOfDocumentsScanned': 123,
            'numberOfNewDocumentsIndexed': 123,
            'numberOfModifiedDocumentsIndexed': 123,
            'numberOfDocumentsDeleted': 123,
            'numberOfDocumentsFailed': 123
        },
        'failureReasons': [
            'string',
        ],
        'startedAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • ingestionJob (dict) --

      Contains the information of an ingestion job.

      • knowledgeBaseId (string) --

        Identifier for a resource.

      • dataSourceId (string) --

        Identifier for a resource.

      • ingestionJobId (string) --

        Identifier for a resource.

      • description (string) --

        Description of the Resource.

      • status (string) --

        The status of an ingestion job.

      • statistics (dict) --

        The document level statistics of an ingestion job

        • numberOfDocumentsScanned (integer) --

          Number of scanned documents

        • numberOfNewDocumentsIndexed (integer) --

          Number of indexed documents

        • numberOfModifiedDocumentsIndexed (integer) --

          Number of modified documents indexed

        • numberOfDocumentsDeleted (integer) --

          Number of deleted documents

        • numberOfDocumentsFailed (integer) --

          Number of failed documents

      • failureReasons (list) --

        Failure Reasons for Error.

        • (string) --

          Failure Reason for Error.

      • startedAt (datetime) --

        Time Stamp.

      • updatedAt (datetime) --

        Time Stamp.