Skip to content

KendraRankingClient#

Index > KendraRanking > KendraRankingClient

Auto-generated documentation for KendraRanking type annotations stubs module types-aiobotocore-kendra-ranking.

KendraRankingClient#

Type annotations and code completion for session.create_client("kendra-ranking") boto3 documentation

KendraRankingClient usage example

from aiobotocore.session import get_session
from types_aiobotocore_kendra_ranking.client import KendraRankingClient

session = get_session()
async with session.create_client("kendra-ranking") as client:
    client: KendraRankingClient

Exceptions#

aiobotocore client exceptions are generated in runtime. This class provides code completion for session.create_client("kendra-ranking").exceptions structure.

KendraRankingClient.exceptions usage example

async with session.create_client("kendra-ranking") as client:
    try:
        do_something(client)
    except (
            client.AccessDeniedException,
        client.ClientError,
        client.ConflictException,
        client.InternalServerException,
        client.ResourceNotFoundException,
        client.ResourceUnavailableException,
        client.ServiceQuotaExceededException,
        client.ThrottlingException,
        client.ValidationException,
    ) as e:
        print(e)
KendraRankingClient usage type checking example

from types_aiobotocore_kendra_ranking.client import Exceptions

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

Methods#

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for session.create_client("kendra-ranking").can_paginate method. boto3 documentation

# can_paginate method definition

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

close#

Closes underlying endpoint connections.

Type annotations and code completion for session.create_client("kendra-ranking").close method. boto3 documentation

# close method definition

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

create_rescore_execution_plan#

Creates a rescore execution plan.

Type annotations and code completion for session.create_client("kendra-ranking").create_rescore_execution_plan method. boto3 documentation

# create_rescore_execution_plan method definition

await def create_rescore_execution_plan(
    self,
    *,
    Name: str,
    Description: str = ...,
    CapacityUnits: CapacityUnitsConfigurationTypeDef = ...,  # (1)
    Tags: Sequence[TagTypeDef] = ...,  # (2)
    ClientToken: str = ...,
) -> CreateRescoreExecutionPlanResponseTypeDef:  # (3)
    ...
  1. See CapacityUnitsConfigurationTypeDef
  2. See TagTypeDef
  3. See CreateRescoreExecutionPlanResponseTypeDef
# create_rescore_execution_plan method usage example with argument unpacking

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

parent.create_rescore_execution_plan(**kwargs)
  1. See CreateRescoreExecutionPlanRequestRequestTypeDef

delete_rescore_execution_plan#

Deletes a rescore execution plan.

Type annotations and code completion for session.create_client("kendra-ranking").delete_rescore_execution_plan method. boto3 documentation

# delete_rescore_execution_plan method definition

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

kwargs: DeleteRescoreExecutionPlanRequestRequestTypeDef = {  # (1)
    "Id": ...,
}

parent.delete_rescore_execution_plan(**kwargs)
  1. See DeleteRescoreExecutionPlanRequestRequestTypeDef

describe_rescore_execution_plan#

Gets information about a rescore execution plan.

Type annotations and code completion for session.create_client("kendra-ranking").describe_rescore_execution_plan method. boto3 documentation

# describe_rescore_execution_plan method definition

await def describe_rescore_execution_plan(
    self,
    *,
    Id: str,
) -> DescribeRescoreExecutionPlanResponseTypeDef:  # (1)
    ...
  1. See DescribeRescoreExecutionPlanResponseTypeDef
# describe_rescore_execution_plan method usage example with argument unpacking

kwargs: DescribeRescoreExecutionPlanRequestRequestTypeDef = {  # (1)
    "Id": ...,
}

parent.describe_rescore_execution_plan(**kwargs)
  1. See DescribeRescoreExecutionPlanRequestRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.create_client("kendra-ranking").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

list_rescore_execution_plans#

Lists your rescore execution plans.

Type annotations and code completion for session.create_client("kendra-ranking").list_rescore_execution_plans method. boto3 documentation

# list_rescore_execution_plans method definition

await def list_rescore_execution_plans(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListRescoreExecutionPlansResponseTypeDef:  # (1)
    ...
  1. See ListRescoreExecutionPlansResponseTypeDef
# list_rescore_execution_plans method usage example with argument unpacking

kwargs: ListRescoreExecutionPlansRequestRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_rescore_execution_plans(**kwargs)
  1. See ListRescoreExecutionPlansRequestRequestTypeDef

list_tags_for_resource#

Gets a list of tags associated with a specified resource.

Type annotations and code completion for session.create_client("kendra-ranking").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

await def list_tags_for_resource(
    self,
    *,
    ResourceARN: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "ResourceARN": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

rescore#

Rescores or re-ranks search results from a search service such as OpenSearch (self managed).

Type annotations and code completion for session.create_client("kendra-ranking").rescore method. boto3 documentation

# rescore method definition

await def rescore(
    self,
    *,
    RescoreExecutionPlanId: str,
    SearchQuery: str,
    Documents: Sequence[DocumentTypeDef],  # (1)
) -> RescoreResultTypeDef:  # (2)
    ...
  1. See DocumentTypeDef
  2. See RescoreResultTypeDef
# rescore method usage example with argument unpacking

kwargs: RescoreRequestRequestTypeDef = {  # (1)
    "RescoreExecutionPlanId": ...,
    "SearchQuery": ...,
    "Documents": ...,
}

parent.rescore(**kwargs)
  1. See RescoreRequestRequestTypeDef

tag_resource#

Adds a specified tag to a specified rescore execution plan.

Type annotations and code completion for session.create_client("kendra-ranking").tag_resource method. boto3 documentation

# tag_resource method definition

await def tag_resource(
    self,
    *,
    ResourceARN: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "ResourceARN": ...,
    "Tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Removes a tag from a rescore execution plan.

Type annotations and code completion for session.create_client("kendra-ranking").untag_resource method. boto3 documentation

# untag_resource method definition

await def untag_resource(
    self,
    *,
    ResourceARN: str,
    TagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "ResourceARN": ...,
    "TagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_rescore_execution_plan#

Updates a rescore execution plan.

Type annotations and code completion for session.create_client("kendra-ranking").update_rescore_execution_plan method. boto3 documentation

# update_rescore_execution_plan method definition

await def update_rescore_execution_plan(
    self,
    *,
    Id: str,
    Name: str = ...,
    Description: str = ...,
    CapacityUnits: CapacityUnitsConfigurationTypeDef = ...,  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See CapacityUnitsConfigurationTypeDef
  2. See EmptyResponseMetadataTypeDef
# update_rescore_execution_plan method usage example with argument unpacking

kwargs: UpdateRescoreExecutionPlanRequestRequestTypeDef = {  # (1)
    "Id": ...,
}

parent.update_rescore_execution_plan(**kwargs)
  1. See UpdateRescoreExecutionPlanRequestRequestTypeDef

__aenter__#

Type annotations and code completion for session.create_client("kendra-ranking").__aenter__ method. boto3 documentation

# __aenter__ method definition

await def __aenter__(
    self,
) -> KendraRankingClient:
    ...

__aexit__#

Type annotations and code completion for session.create_client("kendra-ranking").__aexit__ method. boto3 documentation

# __aexit__ method definition

await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...