DeleteMessage
Sends an event to a specific room which directs clients to delete a specific message;
that is, unrender it from view and delete it from the client’s chat history. This event’s
EventName
is aws:DELETE_MESSAGE
. This replicates the
DeleteMessage WebSocket operation in the Amazon IVS Chat Messaging API.
Request Syntax
POST /DeleteMessage HTTP/1.1
Content-type: application/json
{
"id": "string
",
"reason": "string
",
"roomIdentifier": "string
"
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- id
-
ID of the message to be deleted. This is the
Id
field in the received message (see Message (Subscribe) in the Chat Messaging API).Type: String
Length Constraints: Fixed length of 12.
Pattern:
[a-zA-Z0-9]+
Required: Yes
- reason
-
Reason for deleting the message.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Required: No
- roomIdentifier
-
Identifier of the room where the message should be deleted. Currently this must be an ARN.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
arn:aws:ivschat:[a-z0-9-]+:[0-9]+:room/[a-zA-Z0-9-]+
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"id": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- id
-
Operation identifier, generated by Amazon IVS Chat.
Type: String
Length Constraints: Fixed length of 12.
Pattern:
[a-zA-Z0-9]+
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
HTTP Status Code: 403
- PendingVerification
-
HTTP Status Code: 403
- ResourceNotFoundException
-
HTTP Status Code: 404
- ThrottlingException
-
HTTP Status Code: 429
- ValidationException
-
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: