Ivschat
This page documents function available when using the Ivschat
module, created with @service Ivschat
.
Index
Main.Ivschat.create_chat_token
Main.Ivschat.create_room
Main.Ivschat.delete_message
Main.Ivschat.delete_room
Main.Ivschat.disconnect_user
Main.Ivschat.get_room
Main.Ivschat.list_rooms
Main.Ivschat.list_tags_for_resource
Main.Ivschat.send_event
Main.Ivschat.tag_resource
Main.Ivschat.untag_resource
Main.Ivschat.update_room
Documentation
Main.Ivschat.create_chat_token
— Methodcreate_chat_token(room_identifier, user_id)
create_chat_token(room_identifier, user_id, params::Dict{String,<:Any})
Creates an encrypted token that is used to establish an individual WebSocket connection to a room. The token is valid for one minute, and a connection (session) established with the token is valid for the specified duration. Encryption keys are owned by Amazon IVS Chat and never used directly by your application.
Arguments
room_identifier
: Identifier of the room that the client is trying to access. Currently this must be an ARN.user_id
: Application-provided ID that uniquely identifies the user associated with this token. This can be any UTF-8 encoded text.
Optional Parameters
Optional parameters can be passed as a params::Dict{String,<:Any}
. Valid keys are:
"attributes"
: Application-provided attributes to encode into the token and attach to a chat session. Map keys and values can contain UTF-8 encoded text. The maximum length of this field is 1 KB total."capabilities"
: Set of capabilities that the user is allowed to perform in the room. Default: None (the capability to view messages is implicitly included in all requests)."sessionDurationInMinutes"
: Session duration (in minutes), after which the session expires. Default: 60 (1 hour).
Main.Ivschat.create_room
— Methodcreate_room()
create_room(params::Dict{String,<:Any})
Creates a room that allows clients to connect and pass messages.
Optional Parameters
Optional parameters can be passed as a params::Dict{String,<:Any}
. Valid keys are:
"maximumMessageLength"
: Maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500."maximumMessageRatePerSecond"
: Maximum number of messages per second that can be sent to the room (by all clients). Default: 10."messageReviewHandler"
: Configuration information for optional review of messages."name"
: Room name. The value does not need to be unique."tags"
: Tags to attach to the resource. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints beyond what is documented there.
Main.Ivschat.delete_message
— Methoddelete_message(id, room_identifier)
delete_message(id, room_identifier, params::Dict{String,<:Any})
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.
Arguments
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).room_identifier
: Identifier of the room where the message should be deleted. Currently this must be an ARN.
Optional Parameters
Optional parameters can be passed as a params::Dict{String,<:Any}
. Valid keys are:
"reason"
: Reason for deleting the message.
Main.Ivschat.delete_room
— Methoddelete_room(identifier)
delete_room(identifier, params::Dict{String,<:Any})
Deletes the specified room.
Arguments
identifier
: Identifier of the room to be deleted. Currently this must be an ARN.
Main.Ivschat.disconnect_user
— Methoddisconnect_user(room_identifier, user_id)
disconnect_user(room_identifier, user_id, params::Dict{String,<:Any})
Disconnects all connections using a specified user ID from a room. This replicates the DisconnectUser WebSocket operation in the Amazon IVS Chat Messaging API.
Arguments
room_identifier
: Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN.user_id
: ID of the user (connection) to disconnect from the room.
Optional Parameters
Optional parameters can be passed as a params::Dict{String,<:Any}
. Valid keys are:
"reason"
: Reason for disconnecting the user.
Main.Ivschat.get_room
— Methodget_room(identifier)
get_room(identifier, params::Dict{String,<:Any})
Gets the specified room.
Arguments
identifier
: Identifier of the room for which the configuration is to be retrieved. Currently this must be an ARN.
Main.Ivschat.list_rooms
— Methodlist_rooms()
list_rooms(params::Dict{String,<:Any})
Gets summary information about all your rooms in the AWS region where the API request is processed. Results are sorted in descending order of updateTime.
Optional Parameters
Optional parameters can be passed as a params::Dict{String,<:Any}
. Valid keys are:
"maxResults"
: Maximum number of rooms to return. Default: 50."messageReviewHandlerUri"
: Filters the list to match the specified message review handler URI."name"
: Filters the list to match the specified room name."nextToken"
: The first room to retrieve. This is used for pagination; see the nextToken response field.
Main.Ivschat.list_tags_for_resource
— Methodlist_tags_for_resource(resource_arn)
list_tags_for_resource(resource_arn, params::Dict{String,<:Any})
Gets information about AWS tags for the specified ARN.
Arguments
resource_arn
: The ARN of the resource to be retrieved. The ARN must be URL-encoded.
Main.Ivschat.send_event
— Methodsend_event(event_name, room_identifier)
send_event(event_name, room_identifier, params::Dict{String,<:Any})
Sends an event to a room. Use this within your application’s business logic to send events to clients of a room; e.g., to notify clients to change the way the chat UI is rendered.
Arguments
event_name
: Application-defined name of the event to send to clients.room_identifier
: Identifier of the room to which the event will be sent. Currently this must be an ARN.
Optional Parameters
Optional parameters can be passed as a params::Dict{String,<:Any}
. Valid keys are:
"attributes"
: Application-defined metadata to attach to the event sent to clients. The maximum length of the metadata is 1 KB total.
Main.Ivschat.tag_resource
— Methodtag_resource(resource_arn, tags)
tag_resource(resource_arn, tags, params::Dict{String,<:Any})
Adds or updates tags for the AWS resource with the specified ARN.
Arguments
resource_arn
: The ARN of the resource to be tagged. The ARN must be URL-encoded.tags
: Array of tags to be added or updated. See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints beyond what is documented there.
Main.Ivschat.untag_resource
— Methoduntag_resource(resource_arn, tag_keys)
untag_resource(resource_arn, tag_keys, params::Dict{String,<:Any})
Removes tags from the resource with the specified ARN.
Arguments
resource_arn
: The ARN of the resource to be untagged. The ARN must be URL-encoded.tag_keys
: Array of tags to be removed. See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints beyond what is documented there.
Main.Ivschat.update_room
— Methodupdate_room(identifier)
update_room(identifier, params::Dict{String,<:Any})
Updates a room’s configuration.
Arguments
identifier
: Identifier of the room to be updated. Currently this must be an ARN.
Optional Parameters
Optional parameters can be passed as a params::Dict{String,<:Any}
. Valid keys are:
"maximumMessageLength"
: The maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500."maximumMessageRatePerSecond"
: Maximum number of messages per second that can be sent to the room (by all clients). Default: 10."messageReviewHandler"
: Configuration information for optional review of messages. Specify an empty uri string to disassociate a message review handler from the specified room."name"
: Room name. The value does not need to be unique.