This operation creates an event action.
Parameters:
-
action
(Action)
–
What occurs after a certain event.
-
event
(Event)
–
What occurs to start an action.
-
tags
(Optional[MapOf__string], default:
None
)
–
Key-value pairs that you can associate with the event action.
Raises:
Source code in docs_src/capo_dataexchange/_services/data_exchange.py
| def create_event_action(
self,
action: "capo_dataexchange.types.action.Action",
event: "capo_dataexchange.types.event.Event",
*,
config_overrides: Optional[DataExchangeClientConfig] = None,
tags: Optional["capo_dataexchange.types.map_of__string.MapOf__string"] = None,
) -> (
"capo_dataexchange.types.create_event_action_response.CreateEventActionResponse"
):
"""<p>This operation creates an event action.</p>
Args:
action: <p>What occurs after a certain event.</p>
event: <p>What occurs to start an action.</p>
tags: <p>Key-value pairs that you can associate with the event action.</p>
Raises:
capo_dataexchange.errors.access_denied_exception.AccessDeniedException: <p>Access to the resource is denied.</p>
capo_dataexchange.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
capo_dataexchange.errors.service_limit_exceeded_exception.ServiceLimitExceededException: <p>The request has exceeded the quotas imposed by the service.</p>
capo_dataexchange.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
capo_dataexchange.errors.validation_exception.ValidationException: <p>The request was invalid.</p>
capo_dataexchange.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_dataexchange.types.create_event_action_request.CreateEventActionRequest]",
) -> OperationResponse[
"capo_dataexchange.types.create_event_action_response.CreateEventActionResponse"
]:
import capo_dataexchange._operations.data_exchange.create_event_action
output, http_response = (
capo_dataexchange._operations.data_exchange.create_event_action.create_event_action(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateEventAction")
)
input_: capo_dataexchange.types.create_event_action_request.CreateEventActionRequest = {
"action": action,
"event": event,
}
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|