Skip to content

KendraRankingClient

Index > KendraRanking > KendraRankingClient

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

KendraRankingClient

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

Usage example
from boto3.session import Session
from mypy_boto3_kendra_ranking.client import KendraRankingClient

def get_kendra-ranking_client() -> KendraRankingClient:
    return Session().client("kendra-ranking")

Exceptions

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

Usage example
client = boto3.client("kendra-ranking")

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)
Type checking example
from mypy_boto3_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 boto3.client("kendra-ranking").can_paginate method. boto3 documentation

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

close

Closes underlying endpoint connections.

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

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

create_rescore_execution_plan

Creates a rescore execution plan.

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

Method definition
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
Usage example with kwargs
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 boto3.client("kendra-ranking").delete_rescore_execution_plan method. boto3 documentation

Method definition
def delete_rescore_execution_plan(
    self,
    *,
    Id: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
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 boto3.client("kendra-ranking").describe_rescore_execution_plan method. boto3 documentation

Method definition
def describe_rescore_execution_plan(
    self,
    *,
    Id: str,
) -> DescribeRescoreExecutionPlanResponseTypeDef:  # (1)
    ...
  1. See DescribeRescoreExecutionPlanResponseTypeDef
Usage example with kwargs
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 boto3.client("kendra-ranking").generate_presigned_url method. boto3 documentation

Method definition
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 boto3.client("kendra-ranking").list_rescore_execution_plans method. boto3 documentation

Method definition
def list_rescore_execution_plans(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListRescoreExecutionPlansResponseTypeDef:  # (1)
    ...
  1. See ListRescoreExecutionPlansResponseTypeDef
Usage example with kwargs
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 boto3.client("kendra-ranking").list_tags_for_resource method. boto3 documentation

Method definition
def list_tags_for_resource(
    self,
    *,
    ResourceARN: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
Usage example with kwargs
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 boto3.client("kendra-ranking").rescore method. boto3 documentation

Method definition
def rescore(
    self,
    *,
    RescoreExecutionPlanId: str,
    SearchQuery: str,
    Documents: Sequence[DocumentTypeDef],  # (1)
) -> RescoreResultTypeDef:  # (2)
    ...
  1. See DocumentTypeDef
  2. See RescoreResultTypeDef
Usage example with kwargs
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 boto3.client("kendra-ranking").tag_resource method. boto3 documentation

Method definition
def tag_resource(
    self,
    *,
    ResourceARN: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
Usage example with kwargs
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 boto3.client("kendra-ranking").untag_resource method. boto3 documentation

Method definition
def untag_resource(
    self,
    *,
    ResourceARN: str,
    TagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
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 boto3.client("kendra-ranking").update_rescore_execution_plan method. boto3 documentation

Method definition
def update_rescore_execution_plan(
    self,
    *,
    Id: str,
    Name: str = ...,
    Description: str = ...,
    CapacityUnits: CapacityUnitsConfigurationTypeDef = ...,  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See CapacityUnitsConfigurationTypeDef
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: UpdateRescoreExecutionPlanRequestRequestTypeDef = {  # (1)
    "Id": ...,
}

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