ChimeSdkMessaging class
The Amazon Chime SDK messaging APIs in this section allow software developers to send and receive messages in custom messaging applications. These APIs depend on the frameworks provided by the Amazon Chime SDK identity APIs. For more information about the messaging APIs, see Amazon Chime SDK messaging.
Constructors
- ChimeSdkMessaging({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
associateChannelFlow(
{required String channelArn, required String channelFlowArn, required String chimeBearer}) → Future< void> -
Associates a channel flow with a channel. Once associated, all messages to
that channel go through channel flow processors. To stop processing, use
the
DisassociateChannelFlowAPI. -
batchCreateChannelMembership(
{required String channelArn, required String chimeBearer, required List< String> memberArns, String? subChannelId, ChannelMembershipType? type}) → Future<BatchCreateChannelMembershipResponse> - Adds a specified number of users and bots to a channel.
-
channelFlowCallback(
{required String channelArn, required ChannelMessageCallback channelMessage, String? callbackId, bool? deleteResource}) → Future< ChannelFlowCallbackResponse> - Calls back Amazon Chime SDK messaging with a processing response message. This should be invoked from the processor Lambda. This is a developer API.
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
createChannel(
{required String appInstanceArn, required String chimeBearer, required String name, String? channelId, String? clientRequestToken, ElasticChannelConfiguration? elasticChannelConfiguration, ExpirationSettings? expirationSettings, List< String> ? memberArns, String? metadata, ChannelMode? mode, List<String> ? moderatorArns, ChannelPrivacy? privacy, List<Tag> ? tags}) → Future<CreateChannelResponse> - Creates a channel to which you can add users and send messages.
-
createChannelBan(
{required String channelArn, required String chimeBearer, required String memberArn}) → Future< CreateChannelBanResponse> -
Permanently bans a member from a channel. Moderators can't add banned
members to a channel. To undo a ban, you first have to
DeleteChannelBan, and thenCreateChannelMembership. Bans are cleaned up when you delete users or channels. -
createChannelFlow(
{required String appInstanceArn, required String name, required List< Processor> processors, String? clientRequestToken, List<Tag> ? tags}) → Future<CreateChannelFlowResponse> - Creates a channel flow, a container for processors. Processors are AWS Lambda functions that perform actions on chat messages, such as stripping out profanity. You can associate channel flows with channels, and the processors in the channel flow then take action on all messages sent to that channel. This is a developer API.
-
createChannelMembership(
{required String channelArn, required String chimeBearer, required String memberArn, required ChannelMembershipType type, String? subChannelId}) → Future< CreateChannelMembershipResponse> -
Adds a member to a channel. The
InvitedByfield inChannelMembershipis derived from the request header. A channel member can: -
createChannelModerator(
{required String channelArn, required String channelModeratorArn, required String chimeBearer}) → Future< CreateChannelModeratorResponse> -
Creates a new
ChannelModerator. A channel moderator can: -
deleteChannel(
{required String channelArn, required String chimeBearer}) → Future< void> - Immediately makes a channel and its memberships inaccessible and marks them for deletion. This is an irreversible process.
-
deleteChannelBan(
{required String channelArn, required String chimeBearer, required String memberArn}) → Future< void> - Removes a member from a channel's ban list.
-
deleteChannelFlow(
{required String channelFlowArn}) → Future< void> - Deletes a channel flow, an irreversible process. This is a developer API.
-
deleteChannelMembership(
{required String channelArn, required String chimeBearer, required String memberArn, String? subChannelId}) → Future< void> - Removes a member from a channel.
-
deleteChannelMessage(
{required String channelArn, required String chimeBearer, required String messageId, String? subChannelId}) → Future< void> -
Deletes a channel message. Only admins can perform this action. Deletion
makes messages inaccessible immediately. A background process deletes any
revisions created by
UpdateChannelMessage. -
deleteChannelModerator(
{required String channelArn, required String channelModeratorArn, required String chimeBearer}) → Future< void> - Deletes a channel moderator.
-
deleteMessagingStreamingConfigurations(
{required String appInstanceArn}) → Future< void> -
Deletes the streaming configurations for an
AppInstance. For more information, see Streaming messaging data in the Amazon Chime SDK Developer Guide. -
describeChannel(
{required String channelArn, required String chimeBearer}) → Future< DescribeChannelResponse> -
Returns the full details of a channel in an Amazon Chime
AppInstance. -
describeChannelBan(
{required String channelArn, required String chimeBearer, required String memberArn}) → Future< DescribeChannelBanResponse> - Returns the full details of a channel ban.
-
describeChannelFlow(
{required String channelFlowArn}) → Future< DescribeChannelFlowResponse> -
Returns the full details of a channel flow in an Amazon Chime
AppInstance. This is a developer API. -
describeChannelMembership(
{required String channelArn, required String chimeBearer, required String memberArn, String? subChannelId}) → Future< DescribeChannelMembershipResponse> - Returns the full details of a user's channel membership.
-
describeChannelMembershipForAppInstanceUser(
{required String appInstanceUserArn, required String channelArn, required String chimeBearer}) → Future< DescribeChannelMembershipForAppInstanceUserResponse> -
Returns the details of a channel based on the membership of the specified
AppInstanceUserorAppInstanceBot. -
describeChannelModeratedByAppInstanceUser(
{required String appInstanceUserArn, required String channelArn, required String chimeBearer}) → Future< DescribeChannelModeratedByAppInstanceUserResponse> -
Returns the full details of a channel moderated by the specified
AppInstanceUserorAppInstanceBot. -
describeChannelModerator(
{required String channelArn, required String channelModeratorArn, required String chimeBearer}) → Future< DescribeChannelModeratorResponse> - Returns the full details of a single ChannelModerator.
-
disassociateChannelFlow(
{required String channelArn, required String channelFlowArn, required String chimeBearer}) → Future< void> - Disassociates a channel flow from all its channels. Once disassociated, all messages to that channel stop going through the channel flow processor.
-
getChannelMembershipPreferences(
{required String channelArn, required String chimeBearer, required String memberArn}) → Future< GetChannelMembershipPreferencesResponse> -
Gets the membership preferences of an
AppInstanceUserorAppInstanceBotfor the specified channel. A user or a bot must be a member of the channel and own the membership in order to retrieve membership preferences. Users or bots in theAppInstanceAdminand channel moderator roles can't retrieve preferences for other users or bots. Banned users or bots can't retrieve membership preferences for the channel from which they are banned. -
getChannelMessage(
{required String channelArn, required String chimeBearer, required String messageId, String? subChannelId}) → Future< GetChannelMessageResponse> - Gets the full details of a channel message.
-
getChannelMessageStatus(
{required String channelArn, required String chimeBearer, required String messageId, String? subChannelId}) → Future< GetChannelMessageStatusResponse> -
Gets message status for a specified
messageId. Use this API to determine the intermediate status of messages going through channel flow processing. The API provides an alternative to retrieving message status if the event was not received because a client wasn't connected to a websocket. -
getMessagingSessionEndpoint(
{NetworkType? networkType}) → Future< GetMessagingSessionEndpointResponse> - The details of the endpoint for the messaging session.
-
getMessagingStreamingConfigurations(
{required String appInstanceArn}) → Future< GetMessagingStreamingConfigurationsResponse> -
Retrieves the data streaming configuration for an
AppInstance. For more information, see Streaming messaging data in the Amazon Chime SDK Developer Guide. -
listChannelBans(
{required String channelArn, required String chimeBearer, int? maxResults, String? nextToken}) → Future< ListChannelBansResponse> - Lists all the users and bots banned from a particular channel.
-
listChannelFlows(
{required String appInstanceArn, int? maxResults, String? nextToken}) → Future< ListChannelFlowsResponse> - Returns a paginated lists of all the channel flows created under a single Chime. This is a developer API.
-
listChannelMemberships(
{required String channelArn, required String chimeBearer, int? maxResults, String? nextToken, String? subChannelId, ChannelMembershipType? type}) → Future< ListChannelMembershipsResponse> - Lists all channel memberships in a channel. If you want to list the channels to which a specific app instance user belongs, see the ListChannelMembershipsForAppInstanceUser API.
-
listChannelMembershipsForAppInstanceUser(
{required String chimeBearer, String? appInstanceUserArn, int? maxResults, String? nextToken}) → Future< ListChannelMembershipsForAppInstanceUserResponse> -
Lists all channels that an
AppInstanceUserorAppInstanceBotis a part of. Only anAppInstanceAdmincan call the API with a user ARN that is not their own. -
listChannelMessages(
{required String channelArn, required String chimeBearer, int? maxResults, String? nextToken, DateTime? notAfter, DateTime? notBefore, SortOrder? sortOrder, String? subChannelId}) → Future< ListChannelMessagesResponse> -
List all the messages in a channel. Returns a paginated list of
ChannelMessages. By default, sorted by creation timestamp in descending order. -
listChannelModerators(
{required String channelArn, required String chimeBearer, int? maxResults, String? nextToken}) → Future< ListChannelModeratorsResponse> - Lists all the moderators for a channel.
-
listChannels(
{required String appInstanceArn, required String chimeBearer, int? maxResults, String? nextToken, ChannelPrivacy? privacy}) → Future< ListChannelsResponse> - Lists all Channels created under a single Chime App as a paginated list. You can specify filters to narrow results.
-
listChannelsAssociatedWithChannelFlow(
{required String channelFlowArn, int? maxResults, String? nextToken}) → Future< ListChannelsAssociatedWithChannelFlowResponse> - Lists all channels associated with a specified channel flow. You can associate a channel flow with multiple channels, but you can only associate a channel with one channel flow. This is a developer API.
-
listChannelsModeratedByAppInstanceUser(
{required String chimeBearer, String? appInstanceUserArn, int? maxResults, String? nextToken}) → Future< ListChannelsModeratedByAppInstanceUserResponse> -
A list of the channels moderated by an
AppInstanceUser. -
listSubChannels(
{required String channelArn, required String chimeBearer, int? maxResults, String? nextToken}) → Future< ListSubChannelsResponse> - Lists all the SubChannels in an elastic channel when given a channel ID. Available only to the app instance admins and channel moderators of elastic channels.
-
listTagsForResource(
{required String resourceARN}) → Future< ListTagsForResourceResponse> - Lists the tags applied to an Amazon Chime SDK messaging resource.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
putChannelExpirationSettings(
{required String channelArn, String? chimeBearer, ExpirationSettings? expirationSettings}) → Future< PutChannelExpirationSettingsResponse> - Sets the number of days before the channel is automatically deleted.
-
putChannelMembershipPreferences(
{required String channelArn, required String chimeBearer, required String memberArn, required ChannelMembershipPreferences preferences}) → Future< PutChannelMembershipPreferencesResponse> -
Sets the membership preferences of an
AppInstanceUserorAppInstanceBotfor the specified channel. The user or bot must be a member of the channel. Only the user or bot who owns the membership can set preferences. Users or bots in theAppInstanceAdminand channel moderator roles can't set preferences for other users. Banned users or bots can't set membership preferences for the channel from which they are banned. -
putMessagingStreamingConfigurations(
{required String appInstanceArn, required List< StreamingConfiguration> streamingConfigurations}) → Future<PutMessagingStreamingConfigurationsResponse> -
Sets the data streaming configuration for an
AppInstance. For more information, see Streaming messaging data in the Amazon Chime SDK Developer Guide. -
redactChannelMessage(
{required String channelArn, required String chimeBearer, required String messageId, String? subChannelId}) → Future< RedactChannelMessageResponse> - Redacts message content and metadata. The message exists in the back end, but the action returns null content, and the state shows as redacted.
-
searchChannels(
{required List< SearchField> fields, String? chimeBearer, int? maxResults, String? nextToken}) → Future<SearchChannelsResponse> -
Allows the
ChimeBearerto search channels by channel members. Users or bots can search across the channels that they belong to. Users in theAppInstanceAdminrole can search across all channels. -
sendChannelMessage(
{required String channelArn, required String chimeBearer, required String content, required ChannelMessagePersistenceType persistence, required ChannelMessageType type, String? clientRequestToken, String? contentType, Map< String, MessageAttributeValue> ? messageAttributes, String? metadata, PushNotificationConfiguration? pushNotification, String? subChannelId, List<Target> ? target}) → Future<SendChannelMessageResponse> - Sends a message to a particular channel that the member is a part of.
-
tagResource(
{required String resourceARN, required List< Tag> tags}) → Future<void> - Applies the specified tags to the specified Amazon Chime SDK messaging resource.
-
toString(
) → String -
A string representation of this object.
inherited
-
untagResource(
{required String resourceARN, required List< String> tagKeys}) → Future<void> - Removes the specified tags from the specified Amazon Chime SDK messaging resource.
-
updateChannel(
{required String channelArn, required String chimeBearer, String? metadata, ChannelMode? mode, String? name}) → Future< UpdateChannelResponse> - Update a channel's attributes.
-
updateChannelFlow(
{required String channelFlowArn, required String name, required List< Processor> processors}) → Future<UpdateChannelFlowResponse> - Updates channel flow attributes. This is a developer API.
-
updateChannelMessage(
{required String channelArn, required String chimeBearer, required String content, required String messageId, String? contentType, String? metadata, String? subChannelId}) → Future< UpdateChannelMessageResponse> - Updates the content of a message.
-
updateChannelReadMarker(
{required String channelArn, required String chimeBearer}) → Future< UpdateChannelReadMarkerResponse> - The details of the time when a user last read messages in a channel.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited