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
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.
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)
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
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("kendra-ranking").close
method.
boto3 documentation
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
def create_rescore_execution_plan(
self,
*,
Name: str,
Description: str = ...,
CapacityUnits: CapacityUnitsConfigurationTypeDef = ..., # (1)
Tags: Sequence[TagTypeDef] = ..., # (2)
ClientToken: str = ...,
) -> CreateRescoreExecutionPlanResponseTypeDef: # (3)
...
kwargs: CreateRescoreExecutionPlanRequestRequestTypeDef = { # (1)
"Name": ...,
}
parent.create_rescore_execution_plan(**kwargs)
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
def delete_rescore_execution_plan(
self,
*,
Id: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteRescoreExecutionPlanRequestRequestTypeDef = { # (1)
"Id": ...,
}
parent.delete_rescore_execution_plan(**kwargs)
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
def describe_rescore_execution_plan(
self,
*,
Id: str,
) -> DescribeRescoreExecutionPlanResponseTypeDef: # (1)
...
kwargs: DescribeRescoreExecutionPlanRequestRequestTypeDef = { # (1)
"Id": ...,
}
parent.describe_rescore_execution_plan(**kwargs)
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
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
def list_rescore_execution_plans(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListRescoreExecutionPlansResponseTypeDef: # (1)
...
kwargs: ListRescoreExecutionPlansRequestRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_rescore_execution_plans(**kwargs)
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
def list_tags_for_resource(
self,
*,
ResourceARN: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
kwargs: ListTagsForResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
}
parent.list_tags_for_resource(**kwargs)
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
def rescore(
self,
*,
RescoreExecutionPlanId: str,
SearchQuery: str,
Documents: Sequence[DocumentTypeDef], # (1)
) -> RescoreResultTypeDef: # (2)
...
- See DocumentTypeDef
- See RescoreResultTypeDef
kwargs: RescoreRequestRequestTypeDef = { # (1)
"RescoreExecutionPlanId": ...,
"SearchQuery": ...,
"Documents": ...,
}
parent.rescore(**kwargs)
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
def tag_resource(
self,
*,
ResourceARN: str,
Tags: Sequence[TagTypeDef], # (1)
) -> Dict[str, Any]:
...
- See TagTypeDef
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
"Tags": ...,
}
parent.tag_resource(**kwargs)
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
def untag_resource(
self,
*,
ResourceARN: str,
TagKeys: Sequence[str],
) -> Dict[str, Any]:
...
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"ResourceARN": ...,
"TagKeys": ...,
}
parent.untag_resource(**kwargs)
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
def update_rescore_execution_plan(
self,
*,
Id: str,
Name: str = ...,
Description: str = ...,
CapacityUnits: CapacityUnitsConfigurationTypeDef = ..., # (1)
) -> EmptyResponseMetadataTypeDef: # (2)
...