Skip to content

Type definitions#

Index > PersonalizeRuntime > Type definitions

Auto-generated documentation for PersonalizeRuntime type annotations stubs module mypy-boto3-personalize-runtime.

GetActionRecommendationsRequestRequestTypeDef#

# GetActionRecommendationsRequestRequestTypeDef definition

class GetActionRecommendationsRequestRequestTypeDef(TypedDict):
    campaignArn: NotRequired[str],
    userId: NotRequired[str],
    numResults: NotRequired[int],
    filterArn: NotRequired[str],
    filterValues: NotRequired[Mapping[str, str]],

PredictedActionTypeDef#

# PredictedActionTypeDef definition

class PredictedActionTypeDef(TypedDict):
    actionId: NotRequired[str],
    score: NotRequired[float],

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HTTPStatusCode: int,
    HTTPHeaders: Dict[str, str],
    RetryAttempts: int,
    HostId: NotRequired[str],

GetPersonalizedRankingRequestRequestTypeDef#

# GetPersonalizedRankingRequestRequestTypeDef definition

class GetPersonalizedRankingRequestRequestTypeDef(TypedDict):
    campaignArn: str,
    inputList: Sequence[str],
    userId: str,
    context: NotRequired[Mapping[str, str]],
    filterArn: NotRequired[str],
    filterValues: NotRequired[Mapping[str, str]],
    metadataColumns: NotRequired[Mapping[str, Sequence[str]]],

PredictedItemTypeDef#

# PredictedItemTypeDef definition

class PredictedItemTypeDef(TypedDict):
    itemId: NotRequired[str],
    score: NotRequired[float],
    promotionName: NotRequired[str],
    metadata: NotRequired[Dict[str, str]],

PromotionTypeDef#

# PromotionTypeDef definition

class PromotionTypeDef(TypedDict):
    name: NotRequired[str],
    percentPromotedItems: NotRequired[int],
    filterArn: NotRequired[str],
    filterValues: NotRequired[Mapping[str, str]],

GetActionRecommendationsResponseTypeDef#

# GetActionRecommendationsResponseTypeDef definition

class GetActionRecommendationsResponseTypeDef(TypedDict):
    actionList: List[PredictedActionTypeDef],  # (1)
    recommendationId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See PredictedActionTypeDef
  2. See ResponseMetadataTypeDef

GetPersonalizedRankingResponseTypeDef#

# GetPersonalizedRankingResponseTypeDef definition

class GetPersonalizedRankingResponseTypeDef(TypedDict):
    personalizedRanking: List[PredictedItemTypeDef],  # (1)
    recommendationId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See PredictedItemTypeDef
  2. See ResponseMetadataTypeDef

GetRecommendationsResponseTypeDef#

# GetRecommendationsResponseTypeDef definition

class GetRecommendationsResponseTypeDef(TypedDict):
    itemList: List[PredictedItemTypeDef],  # (1)
    recommendationId: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See PredictedItemTypeDef
  2. See ResponseMetadataTypeDef

GetRecommendationsRequestRequestTypeDef#

# GetRecommendationsRequestRequestTypeDef definition

class GetRecommendationsRequestRequestTypeDef(TypedDict):
    campaignArn: NotRequired[str],
    itemId: NotRequired[str],
    userId: NotRequired[str],
    numResults: NotRequired[int],
    context: NotRequired[Mapping[str, str]],
    filterArn: NotRequired[str],
    filterValues: NotRequired[Mapping[str, str]],
    recommenderArn: NotRequired[str],
    promotions: NotRequired[Sequence[PromotionTypeDef]],  # (1)
    metadataColumns: NotRequired[Mapping[str, Sequence[str]]],
  1. See PromotionTypeDef