Set the MessageFeedbackStatus as RECEIVED or FAILED for the passed in MessageId.
If you use message feedback then you must update message feedback record. When you receive a signal that a user has received the message you must use PutMessageFeedback to set the message feedback record as RECEIVED; Otherwise, an hour after the message feedback record is set to FAILED.
Parameters:
-
message_id
(MessageId)
–
The unique identifier for the message.
-
message_feedback_status
(MessageFeedbackStatus)
–
Set the message feedback to be either RECEIVED or FAILED.
Raises:
Source code in docs_src/capo_pinpoint_sms_voice_v2/_services/async_pinpoint_sms_voice_v2.py
| async def put_message_feedback(
self,
message_id: "capo_pinpoint_sms_voice_v2.types.message_id.MessageId",
message_feedback_status: "capo_pinpoint_sms_voice_v2.types.message_feedback_status.MessageFeedbackStatus",
*,
config_overrides: Optional[AsyncPinpointSMSVoiceV2ClientConfig] = None,
) -> "capo_pinpoint_sms_voice_v2.types.put_message_feedback_result.PutMessageFeedbackResult":
"""<p>Set the MessageFeedbackStatus as <code>RECEIVED</code> or <code>FAILED</code> for the passed in MessageId. </p> <p>If you use message feedback then you must update message feedback record. When you receive a signal that a user has received the message you must use <code>PutMessageFeedback</code> to set the message feedback record as <code>RECEIVED</code>; Otherwise, an hour after the message feedback record is set to <code>FAILED</code>.</p>
Args:
message_id: <p>The unique identifier for the message.</p>
message_feedback_status: <p>Set the message feedback to be either <code>RECEIVED</code> or <code>FAILED</code>.</p>
Raises:
capo_pinpoint_sms_voice_v2.errors.access_denied_exception.AccessDeniedException: <p>The request was denied because you don't have sufficient permissions to access the resource.</p>
capo_pinpoint_sms_voice_v2.errors.internal_server_exception.InternalServerException: <p>The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.</p>
capo_pinpoint_sms_voice_v2.errors.resource_not_found_exception.ResourceNotFoundException: <p>A requested resource couldn't be found.</p>
capo_pinpoint_sms_voice_v2.errors.throttling_exception.ThrottlingException: <p>An error that occurred because too many requests were sent during a certain amount of time.</p>
capo_pinpoint_sms_voice_v2.errors.validation_exception.ValidationException: <p>A validation exception for a field.</p>
capo_pinpoint_sms_voice_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_pinpoint_sms_voice_v2.types.put_message_feedback_request.PutMessageFeedbackRequest]",
) -> AsyncOperationResponse[
"capo_pinpoint_sms_voice_v2.types.put_message_feedback_result.PutMessageFeedbackResult"
]:
import capo_pinpoint_sms_voice_v2._operations.pinpoint_sms_voice_v2.put_message_feedback
(
output,
http_response,
) = await capo_pinpoint_sms_voice_v2._operations.pinpoint_sms_voice_v2.put_message_feedback.async_put_message_feedback(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutMessageFeedback")
)
input_: capo_pinpoint_sms_voice_v2.types.put_message_feedback_request.PutMessageFeedbackRequest = {
"message_id": message_id,
"message_feedback_status": message_feedback_status,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|