Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Sends a message to a particular channel that the member is a part of.
The x-amz-chime-bearer
request header is mandatory. Use the
AppInstanceUserArn
of the user that makes the API call as the value in
the header.
Also, STANDARD
messages can contain 4KB of data and the 1KB of
metadata. CONTROL
messages can contain 30 bytes of data and no
metadata.
Synopsis
- data SendChannelMessage = SendChannelMessage' {
- messageAttributes :: Maybe (HashMap Text MessageAttributeValue)
- metadata :: Maybe (Sensitive Text)
- pushNotification :: Maybe PushNotificationConfiguration
- subChannelId :: Maybe Text
- channelArn :: Text
- content :: Sensitive Text
- type' :: ChannelMessageType
- persistence :: ChannelMessagePersistenceType
- clientRequestToken :: Sensitive Text
- chimeBearer :: Text
- newSendChannelMessage :: Text -> Text -> ChannelMessageType -> ChannelMessagePersistenceType -> Text -> Text -> SendChannelMessage
- sendChannelMessage_messageAttributes :: Lens' SendChannelMessage (Maybe (HashMap Text MessageAttributeValue))
- sendChannelMessage_metadata :: Lens' SendChannelMessage (Maybe Text)
- sendChannelMessage_pushNotification :: Lens' SendChannelMessage (Maybe PushNotificationConfiguration)
- sendChannelMessage_subChannelId :: Lens' SendChannelMessage (Maybe Text)
- sendChannelMessage_channelArn :: Lens' SendChannelMessage Text
- sendChannelMessage_content :: Lens' SendChannelMessage Text
- sendChannelMessage_type :: Lens' SendChannelMessage ChannelMessageType
- sendChannelMessage_persistence :: Lens' SendChannelMessage ChannelMessagePersistenceType
- sendChannelMessage_clientRequestToken :: Lens' SendChannelMessage Text
- sendChannelMessage_chimeBearer :: Lens' SendChannelMessage Text
- data SendChannelMessageResponse = SendChannelMessageResponse' {}
- newSendChannelMessageResponse :: Int -> SendChannelMessageResponse
- sendChannelMessageResponse_channelArn :: Lens' SendChannelMessageResponse (Maybe Text)
- sendChannelMessageResponse_messageId :: Lens' SendChannelMessageResponse (Maybe Text)
- sendChannelMessageResponse_status :: Lens' SendChannelMessageResponse (Maybe ChannelMessageStatusStructure)
- sendChannelMessageResponse_subChannelId :: Lens' SendChannelMessageResponse (Maybe Text)
- sendChannelMessageResponse_httpStatus :: Lens' SendChannelMessageResponse Int
Creating a Request
data SendChannelMessage Source #
See: newSendChannelMessage
smart constructor.
SendChannelMessage' | |
|
Instances
newSendChannelMessage Source #
:: Text | |
-> Text | |
-> ChannelMessageType | |
-> ChannelMessagePersistenceType | |
-> Text | |
-> Text | |
-> SendChannelMessage |
Create a value of SendChannelMessage
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
SendChannelMessage
, sendChannelMessage_messageAttributes
- The attributes for the message, used for message filtering along with a
FilterRule
defined in the PushNotificationPreferences
.
SendChannelMessage
, sendChannelMessage_metadata
- The optional metadata for each message.
SendChannelMessage
, sendChannelMessage_pushNotification
- The push notification configuration of the message.
SendChannelMessage
, sendChannelMessage_subChannelId
- The ID of the SubChannel in the request.
SendChannelMessage
, sendChannelMessage_channelArn
- The ARN of the channel.
SendChannelMessage
, sendChannelMessage_content
- The content of the message.
SendChannelMessage
, sendChannelMessage_type
- The type of message, STANDARD
or CONTROL
.
SendChannelMessage
, sendChannelMessage_persistence
- Boolean that controls whether the message is persisted on the back end.
Required.
$sel:clientRequestToken:SendChannelMessage'
, sendChannelMessage_clientRequestToken
- The Idempotency
token for each client request.
$sel:chimeBearer:SendChannelMessage'
, sendChannelMessage_chimeBearer
- The AppInstanceUserArn
of the user that makes the API call.
Request Lenses
sendChannelMessage_messageAttributes :: Lens' SendChannelMessage (Maybe (HashMap Text MessageAttributeValue)) Source #
The attributes for the message, used for message filtering along with a
FilterRule
defined in the PushNotificationPreferences
.
sendChannelMessage_metadata :: Lens' SendChannelMessage (Maybe Text) Source #
The optional metadata for each message.
sendChannelMessage_pushNotification :: Lens' SendChannelMessage (Maybe PushNotificationConfiguration) Source #
The push notification configuration of the message.
sendChannelMessage_subChannelId :: Lens' SendChannelMessage (Maybe Text) Source #
The ID of the SubChannel in the request.
sendChannelMessage_channelArn :: Lens' SendChannelMessage Text Source #
The ARN of the channel.
sendChannelMessage_content :: Lens' SendChannelMessage Text Source #
The content of the message.
sendChannelMessage_type :: Lens' SendChannelMessage ChannelMessageType Source #
The type of message, STANDARD
or CONTROL
.
sendChannelMessage_persistence :: Lens' SendChannelMessage ChannelMessagePersistenceType Source #
Boolean that controls whether the message is persisted on the back end. Required.
sendChannelMessage_clientRequestToken :: Lens' SendChannelMessage Text Source #
The Idempotency
token for each client request.
sendChannelMessage_chimeBearer :: Lens' SendChannelMessage Text Source #
The AppInstanceUserArn
of the user that makes the API call.
Destructuring the Response
data SendChannelMessageResponse Source #
See: newSendChannelMessageResponse
smart constructor.
SendChannelMessageResponse' | |
|
Instances
newSendChannelMessageResponse Source #
Create a value of SendChannelMessageResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
SendChannelMessage
, sendChannelMessageResponse_channelArn
- The ARN of the channel.
SendChannelMessageResponse
, sendChannelMessageResponse_messageId
- The ID string assigned to each message.
SendChannelMessageResponse
, sendChannelMessageResponse_status
- The status of the channel message.
SendChannelMessage
, sendChannelMessageResponse_subChannelId
- The ID of the SubChannel in the response.
$sel:httpStatus:SendChannelMessageResponse'
, sendChannelMessageResponse_httpStatus
- The response's http status code.
Response Lenses
sendChannelMessageResponse_channelArn :: Lens' SendChannelMessageResponse (Maybe Text) Source #
The ARN of the channel.
sendChannelMessageResponse_messageId :: Lens' SendChannelMessageResponse (Maybe Text) Source #
The ID string assigned to each message.
sendChannelMessageResponse_status :: Lens' SendChannelMessageResponse (Maybe ChannelMessageStatusStructure) Source #
The status of the channel message.
sendChannelMessageResponse_subChannelId :: Lens' SendChannelMessageResponse (Maybe Text) Source #
The ID of the SubChannel in the response.
sendChannelMessageResponse_httpStatus :: Lens' SendChannelMessageResponse Int Source #
The response's http status code.