Skip to content

kendraClient#

Index > kendra > kendraClient

Auto-generated documentation for kendra type annotations stubs module mypy-boto3-kendra.

kendraClient#

Type annotations and code completion for boto3.client("kendra"). boto3 documentation

# kendraClient usage example

from boto3.session import Session
from mypy_boto3_kendra.client import kendraClient

def get_kendra_client() -> kendraClient:
    return Session().client("kendra")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("kendra")

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

from mypy_boto3_kendra.client import Exceptions

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

Methods#

associate_entities_to_experience#

Grants users or groups in your IAM Identity Center identity source access to your Amazon Kendra experience.

Type annotations and code completion for boto3.client("kendra").associate_entities_to_experience method. boto3 documentation

# associate_entities_to_experience method definition

def associate_entities_to_experience(
    self,
    *,
    Id: str,
    IndexId: str,
    EntityList: Sequence[EntityConfigurationTypeDef],  # (1)
) -> AssociateEntitiesToExperienceResponseTypeDef:  # (2)
    ...
  1. See EntityConfigurationTypeDef
  2. See AssociateEntitiesToExperienceResponseTypeDef
# associate_entities_to_experience method usage example with argument unpacking

kwargs: AssociateEntitiesToExperienceRequestRequestTypeDef = {  # (1)
    "Id": ...,
    "IndexId": ...,
    "EntityList": ...,
}

parent.associate_entities_to_experience(**kwargs)
  1. See AssociateEntitiesToExperienceRequestRequestTypeDef

associate_personas_to_entities#

Defines the specific permissions of users or groups in your IAM Identity Center identity source with access to your Amazon Kendra experience.

Type annotations and code completion for boto3.client("kendra").associate_personas_to_entities method. boto3 documentation

# associate_personas_to_entities method definition

def associate_personas_to_entities(
    self,
    *,
    Id: str,
    IndexId: str,
    Personas: Sequence[EntityPersonaConfigurationTypeDef],  # (1)
) -> AssociatePersonasToEntitiesResponseTypeDef:  # (2)
    ...
  1. See EntityPersonaConfigurationTypeDef
  2. See AssociatePersonasToEntitiesResponseTypeDef
# associate_personas_to_entities method usage example with argument unpacking

kwargs: AssociatePersonasToEntitiesRequestRequestTypeDef = {  # (1)
    "Id": ...,
    "IndexId": ...,
    "Personas": ...,
}

parent.associate_personas_to_entities(**kwargs)
  1. See AssociatePersonasToEntitiesRequestRequestTypeDef

batch_delete_document#

Removes one or more documents from an index.

Type annotations and code completion for boto3.client("kendra").batch_delete_document method. boto3 documentation

# batch_delete_document method definition

def batch_delete_document(
    self,
    *,
    IndexId: str,
    DocumentIdList: Sequence[str],
    DataSourceSyncJobMetricTarget: DataSourceSyncJobMetricTargetTypeDef = ...,  # (1)
) -> BatchDeleteDocumentResponseTypeDef:  # (2)
    ...
  1. See DataSourceSyncJobMetricTargetTypeDef
  2. See BatchDeleteDocumentResponseTypeDef
# batch_delete_document method usage example with argument unpacking

kwargs: BatchDeleteDocumentRequestRequestTypeDef = {  # (1)
    "IndexId": ...,
    "DocumentIdList": ...,
}

parent.batch_delete_document(**kwargs)
  1. See BatchDeleteDocumentRequestRequestTypeDef

Removes one or more sets of featured results.

Type annotations and code completion for boto3.client("kendra").batch_delete_featured_results_set method. boto3 documentation

# batch_delete_featured_results_set method definition

def batch_delete_featured_results_set(
    self,
    *,
    IndexId: str,
    FeaturedResultsSetIds: Sequence[str],
) -> BatchDeleteFeaturedResultsSetResponseTypeDef:  # (1)
    ...
  1. See BatchDeleteFeaturedResultsSetResponseTypeDef
# batch_delete_featured_results_set method usage example with argument unpacking

kwargs: BatchDeleteFeaturedResultsSetRequestRequestTypeDef = {  # (1)
    "IndexId": ...,
    "FeaturedResultsSetIds": ...,
}

parent.batch_delete_featured_results_set(**kwargs)
  1. See BatchDeleteFeaturedResultsSetRequestRequestTypeDef

batch_get_document_status#

Returns the indexing status for one or more documents submitted with the BatchPutDocument API.

Type annotations and code completion for boto3.client("kendra").batch_get_document_status method. boto3 documentation

# batch_get_document_status method definition

def batch_get_document_status(
    self,
    *,
    IndexId: str,
    DocumentInfoList: Sequence[DocumentInfoTypeDef],  # (1)
) -> BatchGetDocumentStatusResponseTypeDef:  # (2)
    ...
  1. See DocumentInfoTypeDef
  2. See BatchGetDocumentStatusResponseTypeDef
# batch_get_document_status method usage example with argument unpacking

kwargs: BatchGetDocumentStatusRequestRequestTypeDef = {  # (1)
    "IndexId": ...,
    "DocumentInfoList": ...,
}

parent.batch_get_document_status(**kwargs)
  1. See BatchGetDocumentStatusRequestRequestTypeDef

batch_put_document#

Adds one or more documents to an index.

Type annotations and code completion for boto3.client("kendra").batch_put_document method. boto3 documentation

# batch_put_document method definition

def batch_put_document(
    self,
    *,
    IndexId: str,
    Documents: Sequence[DocumentTypeDef],  # (1)
    RoleArn: str = ...,
    CustomDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfigurationTypeDef = ...,  # (2)
) -> BatchPutDocumentResponseTypeDef:  # (3)
    ...
  1. See DocumentTypeDef
  2. See CustomDocumentEnrichmentConfigurationTypeDef
  3. See BatchPutDocumentResponseTypeDef
# batch_put_document method usage example with argument unpacking

kwargs: BatchPutDocumentRequestRequestTypeDef = {  # (1)
    "IndexId": ...,
    "Documents": ...,
}

parent.batch_put_document(**kwargs)
  1. See BatchPutDocumentRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("kendra").can_paginate method. boto3 documentation

# can_paginate method definition

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

clear_query_suggestions#

Clears existing query suggestions from an index.

Type annotations and code completion for boto3.client("kendra").clear_query_suggestions method. boto3 documentation

# clear_query_suggestions method definition

def clear_query_suggestions(
    self,
    *,
    IndexId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# clear_query_suggestions method usage example with argument unpacking

kwargs: ClearQuerySuggestionsRequestRequestTypeDef = {  # (1)
    "IndexId": ...,
}

parent.clear_query_suggestions(**kwargs)
  1. See ClearQuerySuggestionsRequestRequestTypeDef

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("kendra").close method. boto3 documentation

# close method definition

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

create_access_control_configuration#

Creates an access configuration for your documents.

Type annotations and code completion for boto3.client("kendra").create_access_control_configuration method. boto3 documentation

# create_access_control_configuration method definition

def create_access_control_configuration(
    self,
    *,
    IndexId: str,
    Name: str,
    Description: str = ...,
    AccessControlList: Sequence[PrincipalTypeDef] = ...,  # (1)
    HierarchicalAccessControlList: Sequence[HierarchicalPrincipalTypeDef] = ...,  # (2)
    ClientToken: str = ...,
) -> CreateAccessControlConfigurationResponseTypeDef:  # (3)
    ...
  1. See PrincipalTypeDef
  2. See HierarchicalPrincipalTypeDef
  3. See CreateAccessControlConfigurationResponseTypeDef
# create_access_control_configuration method usage example with argument unpacking

kwargs: CreateAccessControlConfigurationRequestRequestTypeDef = {  # (1)
    "IndexId": ...,
    "Name": ...,
}

parent.create_access_control_configuration(**kwargs)
  1. See CreateAccessControlConfigurationRequestRequestTypeDef

create_data_source#

Creates a data source connector that you want to use with an Amazon Kendra index.

Type annotations and code completion for boto3.client("kendra").create_data_source method. boto3 documentation

# create_data_source method definition

def create_data_source(
    self,
    *,
    Name: str,
    IndexId: str,
    Type: DataSourceTypeType,  # (1)
    Configuration: DataSourceConfigurationTypeDef = ...,  # (2)
    VpcConfiguration: DataSourceVpcConfigurationTypeDef = ...,  # (3)
    Description: str = ...,
    Schedule: str = ...,
    RoleArn: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (4)
    ClientToken: str = ...,
    LanguageCode: str = ...,
    CustomDocumentEnrichmentConfiguration: CustomDocumentEnrichmentConfigurationTypeDef = ...,  # (5)
) -> CreateDataSourceResponseTypeDef:  # (6)
    ...
  1. See DataSourceTypeType
  2. See DataSourceConfigurationTypeDef
  3. See DataSourceVpcConfigurationTypeDef
  4. See TagTypeDef
  5. See CustomDocumentEnrichmentConfigurationTypeDef
  6. See CreateDataSourceResponseTypeDef
# create_data_source method usage example with argument unpacking

kwargs: CreateDataSourceRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "IndexId": ...,
    "Type": ...,
}

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

create_experience#

Creates an Amazon Kendra experience such as a search application.

Type annotations and code completion for boto3.client("kendra").create_experience method. boto3 documentation

# create_experience method definition

def create_experience(
    self,
    *,
    Name: str,
    IndexId: str,
    RoleArn: str = ...,
    Configuration: ExperienceConfigurationTypeDef = ...,  # (1)
    Description: str = ...,
    ClientToken: str = ...,
) -> CreateExperienceResponseTypeDef:  # (2)
    ...
  1. See ExperienceConfigurationTypeDef
  2. See CreateExperienceResponseTypeDef
# create_experience method usage example with argument unpacking

kwargs: CreateExperienceRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "IndexId": ...,
}

parent.create_experience(**kwargs)
  1. See CreateExperienceRequestRequestTypeDef

create_faq#

Creates a set of frequently ask questions (FAQs) using a specified FAQ file stored in an Amazon S3 bucket.

Type annotations and code completion for boto3.client("kendra").create_faq method.