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

# KendraRankingClient 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.

# Exceptions.exceptions usage example

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

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    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_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

# can_paginate 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

# close 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

# create_rescore_execution_plan 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
# 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 boto3.client("kendra-ranking").delete_rescore_execution_plan method. boto3 documentation

# delete_rescore_execution_plan method definition

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

# describe_rescore_execution_plan method definition

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

# generate_presigned_url 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

# list_rescore_execution_plans method definition

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

# list_tags_for_resource method definition

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

# rescore method definition

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

# tag_resource method definition

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

# untag_resource method definition

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

# update_rescore_execution_plan 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
# update_rescore_execution_plan method usage example with argument unpacking

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

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