Skip to content

Type definitions#

Index > PersonalizeEvents > Type definitions

Auto-generated documentation for PersonalizeEvents type annotations stubs module mypy-boto3-personalize-events.

TimestampTypeDef#

# TimestampTypeDef definition

TimestampTypeDef = Union[
    datetime,
    str,
]

ActionTypeDef#

# ActionTypeDef definition

class ActionTypeDef(TypedDict):
    actionId: str,
    properties: NotRequired[str],

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

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

MetricAttributionTypeDef#

# MetricAttributionTypeDef definition

class MetricAttributionTypeDef(TypedDict):
    eventAttributionSource: str,

ItemTypeDef#

# ItemTypeDef definition

class ItemTypeDef(TypedDict):
    itemId: str,
    properties: NotRequired[str],

UserTypeDef#

# UserTypeDef definition

class UserTypeDef(TypedDict):
    userId: str,
    properties: NotRequired[str],

ActionInteractionTypeDef#

# ActionInteractionTypeDef definition

class ActionInteractionTypeDef(TypedDict):
    actionId: str,
    sessionId: str,
    timestamp: Union[datetime, str],
    eventType: str,
    userId: NotRequired[str],
    eventId: NotRequired[str],
    recommendationId: NotRequired[str],
    impression: NotRequired[Sequence[str]],
    properties: NotRequired[str],

PutActionsRequestRequestTypeDef#

# PutActionsRequestRequestTypeDef definition

class PutActionsRequestRequestTypeDef(TypedDict):
    datasetArn: str,
    actions: Sequence[ActionTypeDef],  # (1)
  1. See ActionTypeDef

EmptyResponseMetadataTypeDef#

# EmptyResponseMetadataTypeDef definition

class EmptyResponseMetadataTypeDef(TypedDict):
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

EventTypeDef#

# EventTypeDef definition

class EventTypeDef(TypedDict):
    eventType: str,
    sentAt: Union[datetime, str],
    eventId: NotRequired[str],
    eventValue: NotRequired[float],
    itemId: NotRequired[str],
    properties: NotRequired[str],
    recommendationId: NotRequired[str],
    impression: NotRequired[Sequence[str]],
    metricAttribution: NotRequired[MetricAttributionTypeDef],  # (1)
  1. See MetricAttributionTypeDef

PutItemsRequestRequestTypeDef#

# PutItemsRequestRequestTypeDef definition

class PutItemsRequestRequestTypeDef(TypedDict):
    datasetArn: str,
    items: Sequence[ItemTypeDef],  # (1)
  1. See ItemTypeDef

PutUsersRequestRequestTypeDef#

# PutUsersRequestRequestTypeDef definition

class PutUsersRequestRequestTypeDef(TypedDict):
    datasetArn: str,
    users: Sequence[UserTypeDef],  # (1)
  1. See UserTypeDef

PutActionInteractionsRequestRequestTypeDef#

# PutActionInteractionsRequestRequestTypeDef definition

class PutActionInteractionsRequestRequestTypeDef(TypedDict):
    trackingId: str,
    actionInteractions: Sequence[ActionInteractionTypeDef],  # (1)
  1. See ActionInteractionTypeDef

PutEventsRequestRequestTypeDef#

# PutEventsRequestRequestTypeDef definition

class PutEventsRequestRequestTypeDef(TypedDict):
    trackingId: str,
    sessionId: str,
    eventList: Sequence[EventTypeDef],  # (1)
    userId: NotRequired[str],
  1. See EventTypeDef