putMessageFeedback method
Future<PutMessageFeedbackResult>
putMessageFeedback({
- required MessageFeedbackStatus messageFeedbackStatus,
- required String messageId,
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.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter messageFeedbackStatus :
Set the message feedback to be either RECEIVED or
FAILED.
Parameter messageId :
The unique identifier for the message.
Implementation
Future<PutMessageFeedbackResult> putMessageFeedback({
required MessageFeedbackStatus messageFeedbackStatus,
required String messageId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'PinpointSMSVoiceV2.PutMessageFeedback'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MessageFeedbackStatus': messageFeedbackStatus.value,
'MessageId': messageId,
},
);
return PutMessageFeedbackResult.fromJson(jsonResponse.body);
}