ivschat ******* Client ====== class ivschat.Client A low-level client representing Amazon Interactive Video Service Chat (ivschat) **Introduction** The Amazon IVS Chat control-plane API enables you to create and manage Amazon IVS Chat resources. You also need to integrate with the Amazon IVS Chat Messaging API, to enable users to interact with chat rooms in real time. The API is an AWS regional service. For a list of supported regions and Amazon IVS Chat HTTPS service endpoints, see the Amazon IVS Chat information on the Amazon IVS page in the *AWS General Reference*. This document describes HTTP operations. There is a separate *messaging* API for managing Chat resources; see the Amazon IVS Chat Messaging API Reference. **Notes on terminology:** * You create service applications using the Amazon IVS Chat API. We refer to these as *applications*. * You create front-end client applications (browser and Android/iOS apps) using the Amazon IVS Chat Messaging API. We refer to these as *clients*. **Resources** The following resources are part of Amazon IVS Chat: * **LoggingConfiguration** — A configuration that allows customers to store and record sent messages in a chat room. See the Logging Configuration endpoints for more information. * **Room** — The central Amazon IVS Chat resource through which clients connect to and exchange chat messages. See the Room endpoints for more information. **Tagging** A *tag* is a metadata label that you assign to an AWS resource. A tag comprises a *key* and a *value*, both set by you. For example, you might set a tag as "topic:nature" to label a particular video category. See Best practices and strategies in *Tagging Amazon Web Services Resources and Tag Editor* for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no service-specific constraints beyond what is documented there. Tags can help you identify and organize your AWS resources. For example, you can use the same tag for different resources to indicate that they are related. You can also use tags to manage access (see Access Tags). The Amazon IVS Chat API has these tag-related operations: TagResource, UntagResource, and ListTagsForResource. The following resource supports tagging: Room. At most 50 tags can be applied to a resource. **API Access Security** Your Amazon IVS Chat applications (service applications and clients) must be authenticated and authorized to access Amazon IVS Chat resources. Note the differences between these concepts: * *Authentication* is about verifying identity. Requests to the Amazon IVS Chat API must be signed to verify your identity. * *Authorization* is about granting permissions. Your IAM roles need to have permissions for Amazon IVS Chat API requests. Users (viewers) connect to a room using secure access tokens that you create using the CreateChatToken operation through the AWS SDK. You call CreateChatToken for every user’s chat session, passing identity and authorization information about the user. **Signing API Requests** HTTP API requests must be signed with an AWS SigV4 signature using your AWS security credentials. The AWS Command Line Interface (CLI) and the AWS SDKs take care of signing the underlying API calls for you. However, if your application calls the Amazon IVS Chat HTTP API directly, it’s your responsibility to sign the requests. You generate a signature using valid AWS credentials for an IAM role that has permission to perform the requested action. For example, DeleteMessage requests must be made using an IAM role that has the "ivschat:DeleteMessage" permission. For more information: * Authentication and generating signatures — See Authenticating Requests (Amazon Web Services Signature Version 4) in the *Amazon Web Services General Reference*. * Managing Amazon IVS permissions — See Identity and Access Management on the Security page of the *Amazon IVS User Guide*. **Amazon Resource Names (ARNs)** ARNs uniquely identify AWS resources. An ARN is required when you need to specify a resource unambiguously across all of AWS, such as in IAM policies and API calls. For more information, see Amazon Resource Names in the *AWS General Reference*. import boto3 client = boto3.client('ivschat') These are the available methods: * can_paginate * close * create_chat_token * create_logging_configuration * create_room * delete_logging_configuration * delete_message * delete_room * disconnect_user * get_logging_configuration * get_paginator * get_room * get_waiter * list_logging_configurations * list_rooms * list_tags_for_resource * send_event * tag_resource * untag_resource * update_logging_configuration * update_room ivschat / Client / update_room update_room *********** ivschat.Client.update_room(**kwargs) Updates a room’s configuration. See also: AWS API Documentation **Request Syntax** response = client.update_room( identifier='string', name='string', maximumMessageRatePerSecond=123, maximumMessageLength=123, messageReviewHandler={ 'uri': 'string', 'fallbackResult': 'ALLOW'|'DENY' }, loggingConfigurationIdentifiers=[ 'string', ] ) Parameters: * **identifier** (*string*) -- **[REQUIRED]** Identifier of the room to be updated. Currently this must be an ARN. * **name** (*string*) -- Room name. The value does not need to be unique. * **maximumMessageRatePerSecond** (*integer*) -- Maximum number of messages per second that can be sent to the room (by all clients). Default: 10. * **maximumMessageLength** (*integer*) -- 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. * **messageReviewHandler** (*dict*) -- Configuration information for optional review of messages. Specify an empty "uri" string to disassociate a message review handler from the specified room. * **uri** *(string) --* Identifier of the message review handler. Currently this must be an ARN of a lambda function. * **fallbackResult** *(string) --* Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: "ALLOW". * **loggingConfigurationIdentifiers** (*list*) -- Array of logging-configuration identifiers attached to the room. * *(string) --* Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'id': 'string', 'name': 'string', 'createTime': datetime(2015, 1, 1), 'updateTime': datetime(2015, 1, 1), 'maximumMessageRatePerSecond': 123, 'maximumMessageLength': 123, 'messageReviewHandler': { 'uri': 'string', 'fallbackResult': 'ALLOW'|'DENY' }, 'tags': { 'string': 'string' }, 'loggingConfigurationIdentifiers': [ 'string', ] } **Response Structure** * *(dict) --* * **arn** *(string) --* Room ARN, from the request (if "identifier" was an ARN). * **id** *(string) --* Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room. * **name** *(string) --* Room name, from the request (if specified). * **createTime** *(datetime) --* Time when the room was created. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **updateTime** *(datetime) --* Time of the room’s last update. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **maximumMessageRatePerSecond** *(integer) --* Maximum number of messages per second that can be sent to the room (by all clients), from the request (if specified). * **maximumMessageLength** *(integer) --* Maximum number of characters in a single message, from the request (if specified). * **messageReviewHandler** *(dict) --* Configuration information for optional review of messages. * **uri** *(string) --* Identifier of the message review handler. Currently this must be an ARN of a lambda function. * **fallbackResult** *(string) --* Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: "ALLOW". * **tags** *(dict) --* Tags attached to the resource. Array of maps, each of the form "string:string (key:value)". * *(string) --* * *(string) --* * **loggingConfigurationIdentifiers** *(list) --* Array of logging configurations attached to the room, from the request (if specified). * *(string) --* **Exceptions** * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.PendingVerification" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / get_paginator get_paginator ************* ivschat.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. ivschat / Client / list_rooms list_rooms ********** ivschat.Client.list_rooms(**kwargs) 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". See also: AWS API Documentation **Request Syntax** response = client.list_rooms( name='string', nextToken='string', maxResults=123, messageReviewHandlerUri='string', loggingConfigurationIdentifier='string' ) Parameters: * **name** (*string*) -- Filters the list to match the specified room name. * **nextToken** (*string*) -- The first room to retrieve. This is used for pagination; see the "nextToken" response field. * **maxResults** (*integer*) -- Maximum number of rooms to return. Default: 50. * **messageReviewHandlerUri** (*string*) -- Filters the list to match the specified message review handler URI. * **loggingConfigurationIdentifier** (*string*) -- Logging- configuration identifier. Return type: dict Returns: **Response Syntax** { 'rooms': [ { 'arn': 'string', 'id': 'string', 'name': 'string', 'messageReviewHandler': { 'uri': 'string', 'fallbackResult': 'ALLOW'|'DENY' }, 'createTime': datetime(2015, 1, 1), 'updateTime': datetime(2015, 1, 1), 'tags': { 'string': 'string' }, 'loggingConfigurationIdentifiers': [ 'string', ] }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **rooms** *(list) --* List of the matching rooms (summary information only). * *(dict) --* Summary information about a room. * **arn** *(string) --* Room ARN. * **id** *(string) --* Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room. * **name** *(string) --* Room name. The value does not need to be unique. * **messageReviewHandler** *(dict) --* Configuration information for optional review of messages. * **uri** *(string) --* Identifier of the message review handler. Currently this must be an ARN of a lambda function. * **fallbackResult** *(string) --* Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: "ALLOW". * **createTime** *(datetime) --* Time when the room was created. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **updateTime** *(datetime) --* Time of the room’s last update. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **tags** *(dict) --* Tags attached to the resource. Array of maps, each of the form "string:string (key:value)". See Best practices and strategies in *Tagging Amazon Web Services Resources and Tag Editor* 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. * *(string) --* * *(string) --* * **loggingConfigurationIdentifiers** *(list) --* List of logging-configuration identifiers attached to the room. * *(string) --* * **nextToken** *(string) --* If there are more rooms than "maxResults", use "nextToken" in the request to get the next set. **Exceptions** * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / can_paginate can_paginate ************ ivschat.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. ivschat / Client / get_room get_room ******** ivschat.Client.get_room(**kwargs) Gets the specified room. See also: AWS API Documentation **Request Syntax** response = client.get_room( identifier='string' ) Parameters: **identifier** (*string*) -- **[REQUIRED]** Identifier of the room for which the configuration is to be retrieved. Currently this must be an ARN. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'id': 'string', 'name': 'string', 'createTime': datetime(2015, 1, 1), 'updateTime': datetime(2015, 1, 1), 'maximumMessageRatePerSecond': 123, 'maximumMessageLength': 123, 'messageReviewHandler': { 'uri': 'string', 'fallbackResult': 'ALLOW'|'DENY' }, 'tags': { 'string': 'string' }, 'loggingConfigurationIdentifiers': [ 'string', ] } **Response Structure** * *(dict) --* * **arn** *(string) --* Room ARN, from the request (if "identifier" was an ARN). * **id** *(string) --* Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room. * **name** *(string) --* Room name. The value does not need to be unique. * **createTime** *(datetime) --* Time when the room was created. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **updateTime** *(datetime) --* Time of the room’s last update. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **maximumMessageRatePerSecond** *(integer) --* Maximum number of messages per second that can be sent to the room (by all clients). Default: 10. * **maximumMessageLength** *(integer) --* 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. * **messageReviewHandler** *(dict) --* Configuration information for optional review of messages. * **uri** *(string) --* Identifier of the message review handler. Currently this must be an ARN of a lambda function. * **fallbackResult** *(string) --* Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: "ALLOW". * **tags** *(dict) --* Tags attached to the resource. Array of maps, each of the form "string:string (key:value)". * *(string) --* * *(string) --* * **loggingConfigurationIdentifiers** *(list) --* Array of logging configurations attached to the room. * *(string) --* **Exceptions** * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / create_chat_token create_chat_token ***************** ivschat.Client.create_chat_token(**kwargs) Creates an encrypted token that is used by a chat participant to establish an individual WebSocket chat connection to a room. When the token is used to connect to chat, the connection is valid for the session duration specified in the request. The token becomes invalid at the token-expiration timestamp included in the response. Use the "capabilities" field to permit an end user to send messages or moderate a room. The "attributes" field securely attaches structured data to the chat session; the data is included within each message sent by the end user and received by other participants in the room. Common use cases for attributes include passing end-user profile data like an icon, display name, colors, badges, and other display features. Encryption keys are owned by Amazon IVS Chat and never used directly by your application. See also: AWS API Documentation **Request Syntax** response = client.create_chat_token( roomIdentifier='string', userId='string', capabilities=[ 'SEND_MESSAGE'|'DISCONNECT_USER'|'DELETE_MESSAGE', ], sessionDurationInMinutes=123, attributes={ 'string': 'string' } ) Parameters: * **roomIdentifier** (*string*) -- **[REQUIRED]** Identifier of the room that the client is trying to access. Currently this must be an ARN. * **userId** (*string*) -- **[REQUIRED]** Application-provided ID that uniquely identifies the user associated with this token. This can be any UTF-8 encoded text. * **capabilities** (*list*) -- 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). * *(string) --* * **sessionDurationInMinutes** (*integer*) -- Session duration (in minutes), after which the session expires. Default: 60 (1 hour). * **attributes** (*dict*) -- 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. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'token': 'string', 'tokenExpirationTime': datetime(2015, 1, 1), 'sessionExpirationTime': datetime(2015, 1, 1) } **Response Structure** * *(dict) --* * **token** *(string) --* The issued client token, encrypted. * **tokenExpirationTime** *(datetime) --* Time after which the token is no longer valid and cannot be used to connect to a room. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **sessionExpirationTime** *(datetime) --* Time after which an end user's session is no longer valid. This is an ISO 8601 timestamp; *note that this is returned as a string*. **Exceptions** * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.PendingVerification" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / delete_room delete_room *********** ivschat.Client.delete_room(**kwargs) Deletes the specified room. See also: AWS API Documentation **Request Syntax** response = client.delete_room( identifier='string' ) Parameters: **identifier** (*string*) -- **[REQUIRED]** Identifier of the room to be deleted. Currently this must be an ARN. Returns: None **Exceptions** * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.PendingVerification" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / get_logging_configuration get_logging_configuration ************************* ivschat.Client.get_logging_configuration(**kwargs) Gets the specified logging configuration. See also: AWS API Documentation **Request Syntax** response = client.get_logging_configuration( identifier='string' ) Parameters: **identifier** (*string*) -- **[REQUIRED]** Identifier of the logging configuration to be retrieved. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'id': 'string', 'createTime': datetime(2015, 1, 1), 'updateTime': datetime(2015, 1, 1), 'name': 'string', 'destinationConfiguration': { 's3': { 'bucketName': 'string' }, 'cloudWatchLogs': { 'logGroupName': 'string' }, 'firehose': { 'deliveryStreamName': 'string' } }, 'state': 'CREATING'|'CREATE_FAILED'|'DELETING'|'DELETE_FAILED'|'UPDATING'|'UPDATE_FAILED'|'ACTIVE', 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **arn** *(string) --* Logging-configuration ARN, from the request (if "identifier" was an ARN). * **id** *(string) --* Logging-configuration ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the logging configuration. * **createTime** *(datetime) --* Time when the logging configuration was created. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **updateTime** *(datetime) --* Time of the logging configuration’s last update. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **name** *(string) --* Logging-configuration name. This value does not need to be unique. * **destinationConfiguration** *(dict) --* A complex type that contains a destination configuration for where chat content will be logged. There is only one type of destination ( "cloudWatchLogs", "firehose", or "s3") in a "destinationConfiguration". Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3", "cloudWatchLogs", "firehose". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3** *(dict) --* An Amazon S3 destination configuration where chat activity will be logged. * **bucketName** *(string) --* Name of the Amazon S3 bucket where chat activity will be logged. * **cloudWatchLogs** *(dict) --* An Amazon CloudWatch Logs destination configuration where chat activity will be logged. * **logGroupName** *(string) --* Name of the Amazon Cloudwatch Logs destination where chat activity will be logged. * **firehose** *(dict) --* An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged. * **deliveryStreamName** *(string) --* Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged. * **state** *(string) --* The state of the logging configuration. When the state is "ACTIVE", the configuration is ready to log chat content. * **tags** *(dict) --* Tags attached to the resource. Array of maps, each of the form "string:string (key:value)". * *(string) --* * *(string) --* **Exceptions** * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / list_tags_for_resource list_tags_for_resource ********************** ivschat.Client.list_tags_for_resource(**kwargs) Gets information about AWS tags for the specified ARN. See also: AWS API Documentation **Request Syntax** response = client.list_tags_for_resource( resourceArn='string' ) Parameters: **resourceArn** (*string*) -- **[REQUIRED]** The ARN of the resource to be retrieved. The ARN must be URL- encoded. Return type: dict Returns: **Response Syntax** { 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **tags** *(dict) --* Tags attached to the resource. Array of maps, each of the form "string:string (key:value)". * *(string) --* * *(string) --* **Exceptions** * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.InternalServerException" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / untag_resource untag_resource ************** ivschat.Client.untag_resource(**kwargs) Removes tags from the resource with the specified ARN. See also: AWS API Documentation **Request Syntax** response = client.untag_resource( resourceArn='string', tagKeys=[ 'string', ] ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The ARN of the resource to be untagged. The ARN must be URL- encoded. * **tagKeys** (*list*) -- **[REQUIRED]** Array of tags to be removed. Array of maps, each of the form "string:string (key:value)". See Best practices and strategies in *Tagging Amazon Web Services Resources and Tag Editor* 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. * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.InternalServerException" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / get_waiter get_waiter ********** ivschat.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" ivschat / Client / create_room create_room *********** ivschat.Client.create_room(**kwargs) Creates a room that allows clients to connect and pass messages. See also: AWS API Documentation **Request Syntax** response = client.create_room( name='string', maximumMessageRatePerSecond=123, maximumMessageLength=123, messageReviewHandler={ 'uri': 'string', 'fallbackResult': 'ALLOW'|'DENY' }, tags={ 'string': 'string' }, loggingConfigurationIdentifiers=[ 'string', ] ) Parameters: * **name** (*string*) -- Room name. The value does not need to be unique. * **maximumMessageRatePerSecond** (*integer*) -- Maximum number of messages per second that can be sent to the room (by all clients). Default: 10. * **maximumMessageLength** (*integer*) -- 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. * **messageReviewHandler** (*dict*) -- Configuration information for optional review of messages. * **uri** *(string) --* Identifier of the message review handler. Currently this must be an ARN of a lambda function. * **fallbackResult** *(string) --* Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: "ALLOW". * **tags** (*dict*) -- Tags to attach to the resource. Array of maps, each of the form "string:string (key:value)". See Best practices and strategies in *Tagging Amazon Web Services Resources and Tag Editor* 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. * *(string) --* * *(string) --* * **loggingConfigurationIdentifiers** (*list*) -- Array of logging-configuration identifiers attached to the room. * *(string) --* Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'id': 'string', 'name': 'string', 'createTime': datetime(2015, 1, 1), 'updateTime': datetime(2015, 1, 1), 'maximumMessageRatePerSecond': 123, 'maximumMessageLength': 123, 'messageReviewHandler': { 'uri': 'string', 'fallbackResult': 'ALLOW'|'DENY' }, 'tags': { 'string': 'string' }, 'loggingConfigurationIdentifiers': [ 'string', ] } **Response Structure** * *(dict) --* * **arn** *(string) --* Room ARN, assigned by the system. * **id** *(string) --* Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room. * **name** *(string) --* Room name, from the request (if specified). * **createTime** *(datetime) --* Time when the room was created. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **updateTime** *(datetime) --* Time of the room’s last update. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **maximumMessageRatePerSecond** *(integer) --* Maximum number of messages per second that can be sent to the room (by all clients), from the request (if specified). * **maximumMessageLength** *(integer) --* Maximum number of characters in a single message, from the request (if specified). * **messageReviewHandler** *(dict) --* Configuration information for optional review of messages. * **uri** *(string) --* Identifier of the message review handler. Currently this must be an ARN of a lambda function. * **fallbackResult** *(string) --* Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: "ALLOW". * **tags** *(dict) --* Tags attached to the resource, from the request (if specified). * *(string) --* * *(string) --* * **loggingConfigurationIdentifiers** *(list) --* Array of logging configurations attached to the room, from the request (if specified). * *(string) --* **Exceptions** * "ivschat.Client.exceptions.ConflictException" * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.ServiceQuotaExceededException" * "ivschat.Client.exceptions.PendingVerification" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / create_logging_configuration create_logging_configuration **************************** ivschat.Client.create_logging_configuration(**kwargs) Creates a logging configuration that allows clients to store and record sent messages. See also: AWS API Documentation **Request Syntax** response = client.create_logging_configuration( name='string', destinationConfiguration={ 's3': { 'bucketName': 'string' }, 'cloudWatchLogs': { 'logGroupName': 'string' }, 'firehose': { 'deliveryStreamName': 'string' } }, tags={ 'string': 'string' } ) Parameters: * **name** (*string*) -- Logging-configuration name. The value does not need to be unique. * **destinationConfiguration** (*dict*) -- **[REQUIRED]** A complex type that contains a destination configuration for where chat content will be logged. There can be only one type of destination ( "cloudWatchLogs", "firehose", or "s3") in a "destinationConfiguration". Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "s3", "cloudWatchLogs", "firehose". * **s3** *(dict) --* An Amazon S3 destination configuration where chat activity will be logged. * **bucketName** *(string) --* **[REQUIRED]** Name of the Amazon S3 bucket where chat activity will be logged. * **cloudWatchLogs** *(dict) --* An Amazon CloudWatch Logs destination configuration where chat activity will be logged. * **logGroupName** *(string) --* **[REQUIRED]** Name of the Amazon Cloudwatch Logs destination where chat activity will be logged. * **firehose** *(dict) --* An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged. * **deliveryStreamName** *(string) --* **[REQUIRED]** Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged. * **tags** (*dict*) -- Tags to attach to the resource. Array of maps, each of the form "string:string (key:value)". See Best practices and strategies in *Tagging Amazon Web Services Resources and Tag Editor* for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints on tags beyond what is documented there. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'id': 'string', 'createTime': datetime(2015, 1, 1), 'updateTime': datetime(2015, 1, 1), 'name': 'string', 'destinationConfiguration': { 's3': { 'bucketName': 'string' }, 'cloudWatchLogs': { 'logGroupName': 'string' }, 'firehose': { 'deliveryStreamName': 'string' } }, 'state': 'ACTIVE', 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **arn** *(string) --* Logging-configuration ARN, assigned by the system. * **id** *(string) --* Logging-configuration ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the logging configuration. * **createTime** *(datetime) --* Time when the logging configuration was created. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **updateTime** *(datetime) --* Time of the logging configuration’s last update. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **name** *(string) --* Logging-configuration name, from the request (if specified). * **destinationConfiguration** *(dict) --* A complex type that contains a destination configuration for where chat content will be logged, from the request. There is only one type of destination ( "cloudWatchLogs", "firehose", or "s3") in a "destinationConfiguration". Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3", "cloudWatchLogs", "firehose". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3** *(dict) --* An Amazon S3 destination configuration where chat activity will be logged. * **bucketName** *(string) --* Name of the Amazon S3 bucket where chat activity will be logged. * **cloudWatchLogs** *(dict) --* An Amazon CloudWatch Logs destination configuration where chat activity will be logged. * **logGroupName** *(string) --* Name of the Amazon Cloudwatch Logs destination where chat activity will be logged. * **firehose** *(dict) --* An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged. * **deliveryStreamName** *(string) --* Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged. * **state** *(string) --* The state of the logging configuration. When the state is "ACTIVE", the configuration is ready to log chat content. * **tags** *(dict) --* Tags attached to the resource, from the request (if specified). Array of maps, each of the form "string:string (key:value)". * *(string) --* * *(string) --* **Exceptions** * "ivschat.Client.exceptions.ConflictException" * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.ServiceQuotaExceededException" * "ivschat.Client.exceptions.PendingVerification" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / close close ***** ivschat.Client.close() Closes underlying endpoint connections. ivschat / Client / list_logging_configurations list_logging_configurations *************************** ivschat.Client.list_logging_configurations(**kwargs) Gets summary information about all your logging configurations in the AWS region where the API request is processed. See also: AWS API Documentation **Request Syntax** response = client.list_logging_configurations( nextToken='string', maxResults=123 ) Parameters: * **nextToken** (*string*) -- The first logging configurations to retrieve. This is used for pagination; see the "nextToken" response field. * **maxResults** (*integer*) -- Maximum number of logging configurations to return. Default: 50. Return type: dict Returns: **Response Syntax** { 'loggingConfigurations': [ { 'arn': 'string', 'id': 'string', 'createTime': datetime(2015, 1, 1), 'updateTime': datetime(2015, 1, 1), 'name': 'string', 'destinationConfiguration': { 's3': { 'bucketName': 'string' }, 'cloudWatchLogs': { 'logGroupName': 'string' }, 'firehose': { 'deliveryStreamName': 'string' } }, 'state': 'CREATING'|'CREATE_FAILED'|'DELETING'|'DELETE_FAILED'|'UPDATING'|'UPDATE_FAILED'|'ACTIVE', 'tags': { 'string': 'string' } }, ], 'nextToken': 'string' } **Response Structure** * *(dict) --* * **loggingConfigurations** *(list) --* List of the matching logging configurations (summary information only). There is only one type of destination ( "cloudWatchLogs", "firehose", or "s3") in a "destinationConfiguration". * *(dict) --* Summary information about a logging configuration. * **arn** *(string) --* Logging-configuration ARN. * **id** *(string) --* Logging-configuration ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room. * **createTime** *(datetime) --* Time when the logging configuration was created. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **updateTime** *(datetime) --* Time of the logging configuration’s last update. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **name** *(string) --* Logging-configuration name. The value does not need to be unique. * **destinationConfiguration** *(dict) --* A complex type that contains a destination configuration for where chat content will be logged. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3", "cloudWatchLogs", "firehose". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3** *(dict) --* An Amazon S3 destination configuration where chat activity will be logged. * **bucketName** *(string) --* Name of the Amazon S3 bucket where chat activity will be logged. * **cloudWatchLogs** *(dict) --* An Amazon CloudWatch Logs destination configuration where chat activity will be logged. * **logGroupName** *(string) --* Name of the Amazon Cloudwatch Logs destination where chat activity will be logged. * **firehose** *(dict) --* An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged. * **deliveryStreamName** *(string) --* Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged. * **state** *(string) --* The state of the logging configuration. When this is "ACTIVE", the configuration is ready for logging chat content. * **tags** *(dict) --* Tags to attach to the resource. Array of maps, each of the form "string:string (key:value)". See Best practices and strategies in *Tagging Amazon Web Services Resources and Tag Editor* for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints on tags beyond what is documented there. * *(string) --* * *(string) --* * **nextToken** *(string) --* If there are more logging configurations than "maxResults", use "nextToken" in the request to get the next set. **Exceptions** * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / disconnect_user disconnect_user *************** ivschat.Client.disconnect_user(**kwargs) Disconnects all connections using a specified user ID from a room. This replicates the DisconnectUser WebSocket operation in the Amazon IVS Chat Messaging API. See also: AWS API Documentation **Request Syntax** response = client.disconnect_user( roomIdentifier='string', userId='string', reason='string' ) Parameters: * **roomIdentifier** (*string*) -- **[REQUIRED]** Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN. * **userId** (*string*) -- **[REQUIRED]** ID of the user (connection) to disconnect from the room. * **reason** (*string*) -- Reason for disconnecting the user. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ivschat.Client.exceptions.ThrottlingException" * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.PendingVerification" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / update_logging_configuration update_logging_configuration **************************** ivschat.Client.update_logging_configuration(**kwargs) Updates a specified logging configuration. See also: AWS API Documentation **Request Syntax** response = client.update_logging_configuration( identifier='string', name='string', destinationConfiguration={ 's3': { 'bucketName': 'string' }, 'cloudWatchLogs': { 'logGroupName': 'string' }, 'firehose': { 'deliveryStreamName': 'string' } } ) Parameters: * **identifier** (*string*) -- **[REQUIRED]** Identifier of the logging configuration to be updated. * **name** (*string*) -- Logging-configuration name. The value does not need to be unique. * **destinationConfiguration** (*dict*) -- A complex type that contains a destination configuration for where chat content will be logged. There can be only one type of destination ( "cloudWatchLogs", "firehose", or "s3") in a "destinationConfiguration". Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "s3", "cloudWatchLogs", "firehose". * **s3** *(dict) --* An Amazon S3 destination configuration where chat activity will be logged. * **bucketName** *(string) --* **[REQUIRED]** Name of the Amazon S3 bucket where chat activity will be logged. * **cloudWatchLogs** *(dict) --* An Amazon CloudWatch Logs destination configuration where chat activity will be logged. * **logGroupName** *(string) --* **[REQUIRED]** Name of the Amazon Cloudwatch Logs destination where chat activity will be logged. * **firehose** *(dict) --* An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged. * **deliveryStreamName** *(string) --* **[REQUIRED]** Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'id': 'string', 'createTime': datetime(2015, 1, 1), 'updateTime': datetime(2015, 1, 1), 'name': 'string', 'destinationConfiguration': { 's3': { 'bucketName': 'string' }, 'cloudWatchLogs': { 'logGroupName': 'string' }, 'firehose': { 'deliveryStreamName': 'string' } }, 'state': 'ACTIVE', 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **arn** *(string) --* Logging-configuration ARN, from the request (if "identifier" was an ARN). * **id** *(string) --* Logging-configuration ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room. * **createTime** *(datetime) --* Time when the logging configuration was created. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **updateTime** *(datetime) --* Time of the logging configuration’s last update. This is an ISO 8601 timestamp; *note that this is returned as a string*. * **name** *(string) --* Logging-configuration name, from the request (if specified). * **destinationConfiguration** *(dict) --* A complex type that contains a destination configuration for where chat content will be logged, from the request. There is only one type of destination ( "cloudWatchLogs", "firehose", or "s3") in a "destinationConfiguration". Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "s3", "cloudWatchLogs", "firehose". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **s3** *(dict) --* An Amazon S3 destination configuration where chat activity will be logged. * **bucketName** *(string) --* Name of the Amazon S3 bucket where chat activity will be logged. * **cloudWatchLogs** *(dict) --* An Amazon CloudWatch Logs destination configuration where chat activity will be logged. * **logGroupName** *(string) --* Name of the Amazon Cloudwatch Logs destination where chat activity will be logged. * **firehose** *(dict) --* An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged. * **deliveryStreamName** *(string) --* Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged. * **state** *(string) --* The state of the logging configuration. When the state is "ACTIVE", the configuration is ready to log chat content. * **tags** *(dict) --* Tags attached to the resource. Array of maps, each of the form "string:string (key:value)". * *(string) --* * *(string) --* **Exceptions** * "ivschat.Client.exceptions.ConflictException" * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.PendingVerification" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / send_event send_event ********** ivschat.Client.send_event(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.send_event( roomIdentifier='string', eventName='string', attributes={ 'string': 'string' } ) Parameters: * **roomIdentifier** (*string*) -- **[REQUIRED]** Identifier of the room to which the event will be sent. Currently this must be an ARN. * **eventName** (*string*) -- **[REQUIRED]** Application-defined name of the event to send to clients. * **attributes** (*dict*) -- Application-defined metadata to attach to the event sent to clients. The maximum length of the metadata is 1 KB total. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'id': 'string' } **Response Structure** * *(dict) --* * **id** *(string) --* An identifier generated by Amazon IVS Chat. This identifier must be used in subsequent operations for this message, such as DeleteMessage. **Exceptions** * "ivschat.Client.exceptions.ThrottlingException" * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.PendingVerification" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / tag_resource tag_resource ************ ivschat.Client.tag_resource(**kwargs) Adds or updates tags for the AWS resource with the specified ARN. See also: AWS API Documentation **Request Syntax** response = client.tag_resource( resourceArn='string', tags={ 'string': 'string' } ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The ARN of the resource to be tagged. The ARN must be URL- encoded. * **tags** (*dict*) -- **[REQUIRED]** Array of tags to be added or updated. Array of maps, each of the form "string:string (key:value)". See Best practices and strategies in *Tagging Amazon Web Services Resources and Tag Editor* 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. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.InternalServerException" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / delete_message delete_message ************** ivschat.Client.delete_message(**kwargs) 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. See also: AWS API Documentation **Request Syntax** response = client.delete_message( roomIdentifier='string', id='string', reason='string' ) Parameters: * **roomIdentifier** (*string*) -- **[REQUIRED]** Identifier of the room where the message should be deleted. Currently this must be an ARN. * **id** (*string*) -- **[REQUIRED]** ID of the message to be deleted. This is the "Id" field in the received message (see Message (Subscribe) in the Chat Messaging API). * **reason** (*string*) -- Reason for deleting the message. Return type: dict Returns: **Response Syntax** { 'id': 'string' } **Response Structure** * *(dict) --* * **id** *(string) --* Operation identifier, generated by Amazon IVS Chat. **Exceptions** * "ivschat.Client.exceptions.ThrottlingException" * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.PendingVerification" * "ivschat.Client.exceptions.ValidationException" ivschat / Client / delete_logging_configuration delete_logging_configuration **************************** ivschat.Client.delete_logging_configuration(**kwargs) Deletes the specified logging configuration. See also: AWS API Documentation **Request Syntax** response = client.delete_logging_configuration( identifier='string' ) Parameters: **identifier** (*string*) -- **[REQUIRED]** Identifier of the logging configuration to be deleted. Returns: None **Exceptions** * "ivschat.Client.exceptions.ConflictException" * "ivschat.Client.exceptions.AccessDeniedException" * "ivschat.Client.exceptions.ResourceNotFoundException" * "ivschat.Client.exceptions.PendingVerification" * "ivschat.Client.exceptions.ValidationException"