Records action interaction event data. An action interaction event is an interaction between a user and an action. For example, a user taking an action, such a enrolling in a membership program or downloading your app.
For more information about recording action interactions, see Recording action interaction events. For more information about actions in an Actions dataset, see Actions dataset.
Parameters:
-
tracking_id
(StringType)
–
The ID of your action interaction event tracker. When you create an Action interactions dataset, Amazon Personalize creates an action interaction event tracker for you. For more information, see Action interaction event tracker ID.
-
action_interactions
(ActionInteractionsList)
–
A list of action interaction events from the session.
Raises:
Source code in docs_src/capo_personalize_events/_services/async_personalize_events.py
| async def put_action_interactions(
self,
tracking_id: "capo_personalize_events.types.string_type.StringType",
action_interactions: "capo_personalize_events.types.action_interactions_list.ActionInteractionsList",
*,
config_overrides: Optional[AsyncPersonalizeEventsClientConfig] = None,
) -> None:
"""<p>Records action interaction event data. An <i>action interaction</i> event is an interaction between a user and an <i>action</i>. For example, a user taking an action, such a enrolling in a membership program or downloading your app.</p> <p> For more information about recording action interactions, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/recording-action-interaction-events.html">Recording action interaction events</a>. For more information about actions in an Actions dataset, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/actions-datasets.html">Actions dataset</a>.</p>
Args:
tracking_id: <p>The ID of your action interaction event tracker. When you create an Action interactions dataset, Amazon Personalize creates an action interaction event tracker for you. For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/action-interaction-tracker-id.html">Action interaction event tracker ID</a>.</p>
action_interactions: <p>A list of action interaction events from the session.</p>
Raises:
capo_personalize_events.errors.invalid_input_exception.InvalidInputException: <p>Provide a valid value for the field or parameter.</p>
capo_personalize_events.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource is in use.</p>
capo_personalize_events.errors.resource_not_found_exception.ResourceNotFoundException: <p>Could not find the specified resource.</p>
capo_personalize_events.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_personalize_events.types.put_action_interactions_request.PutActionInteractionsRequest]",
) -> AsyncOperationResponse[None]:
import capo_personalize_events._operations.amazon_personalize_events.put_action_interactions
(
output,
http_response,
) = await capo_personalize_events._operations.amazon_personalize_events.put_action_interactions.async_put_action_interactions(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_personalize_events.types.put_action_interactions_request.PutActionInteractionsRequest",
) -> dict[str, Any]:
import capo_personalize_events.types.put_action_interactions_request
return capo_personalize_events.types.put_action_interactions_request.redact_sensitive(
input_
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("PutActionInteractions", redact_input=_redact_input),
)
input_: capo_personalize_events.types.put_action_interactions_request.PutActionInteractionsRequest = {
"tracking_id": tracking_id,
"action_interactions": action_interactions,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|