ChimeSDKMessaging / Client / delete_channel_message

delete_channel_message#

ChimeSDKMessaging.Client.delete_channel_message(**kwargs)#

Deletes a channel message. Only admins can perform this action. Deletion makes messages inaccessible immediately. A background process deletes any revisions created by UpdateChannelMessage.

Note

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.delete_channel_message(
    ChannelArn='string',
    MessageId='string',
    ChimeBearer='string',
    SubChannelId='string'
)
Parameters:
  • ChannelArn (string) –

    [REQUIRED]

    The ARN of the channel.

  • MessageId (string) –

    [REQUIRED]

    The ID of the message being deleted.

  • ChimeBearer (string) –

    [REQUIRED]

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • SubChannelId (string) –

    The ID of the SubChannel in the request.

    Note

    Only required when deleting messages in a SubChannel that the user belongs to.

Returns:

None

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException

  • ChimeSDKMessaging.Client.exceptions.ForbiddenException

  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException

  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException

  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException

  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException