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.