PersonalizeRuntimeClient#
Index > PersonalizeRuntime > PersonalizeRuntimeClient
Auto-generated documentation for PersonalizeRuntime type annotations stubs module types-aiobotocore-personalize-runtime.
PersonalizeRuntimeClient#
Type annotations and code completion for session.create_client("personalize-runtime")
boto3 documentation
PersonalizeRuntimeClient usage example
from aiobotocore.session import get_session
from types_aiobotocore_personalize_runtime.client import PersonalizeRuntimeClient
session = get_session()
async with session.create_client("personalize-runtime") as client:
client: PersonalizeRuntimeClient
Exceptions#
aiobotocore
client exceptions are generated in runtime.
This class provides code completion for session.create_client("personalize-runtime").exceptions
structure.
PersonalizeRuntimeClient.exceptions usage example
async with session.create_client("personalize-runtime") as client:
try:
do_something(client)
except (
client.ClientError,
client.InvalidInputException,
client.ResourceNotFoundException,
) as e:
print(e)
PersonalizeRuntimeClient usage type checking example
from types_aiobotocore_personalize_runtime.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for session.create_client("personalize-runtime").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("personalize-runtime").close
method.
boto3 documentation
# close method definition
await def close(
self,
) -> None:
...
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for session.create_client("personalize-runtime").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:
...
get_personalized_ranking#
Re-ranks a list of recommended items for the given user.
Type annotations and code completion for session.create_client("personalize-runtime").get_personalized_ranking
method.
boto3 documentation
# get_personalized_ranking method definition
await def get_personalized_ranking(
self,
*,
campaignArn: str,
inputList: Sequence[str],
userId: str,
context: Mapping[str, str] = ...,
filterArn: str = ...,
filterValues: Mapping[str, str] = ...,
) -> GetPersonalizedRankingResponseTypeDef: # (1)
...
# get_personalized_ranking method usage example with argument unpacking
kwargs: GetPersonalizedRankingRequestRequestTypeDef = { # (1)
"campaignArn": ...,
"inputList": ...,
"userId": ...,
}
parent.get_personalized_ranking(**kwargs)
get_recommendations#
Returns a list of recommended items.
Type annotations and code completion for session.create_client("personalize-runtime").get_recommendations
method.
boto3 documentation
# get_recommendations method definition
await def get_recommendations(
self,
*,
campaignArn: str = ...,
itemId: str = ...,
userId: str = ...,
numResults: int = ...,
context: Mapping[str, str] = ...,
filterArn: str = ...,
filterValues: Mapping[str, str] = ...,
recommenderArn: str = ...,
promotions: Sequence[PromotionTypeDef] = ..., # (1)
) -> GetRecommendationsResponseTypeDef: # (2)
...
# get_recommendations method usage example with argument unpacking
kwargs: GetRecommendationsRequestRequestTypeDef = { # (1)
"campaignArn": ...,
}
parent.get_recommendations(**kwargs)
__aenter__#
Type annotations and code completion for session.create_client("personalize-runtime").__aenter__
method.
boto3 documentation
# __aenter__ method definition
await def __aenter__(
self,
) -> PersonalizeRuntimeClient:
...
__aexit__#
Type annotations and code completion for session.create_client("personalize-runtime").__aexit__
method.
boto3 documentation
# __aexit__ method definition
await def __aexit__(
self,
exc_type: Any,
exc_val: Any,
exc_tb: Any,
) -> Any:
...