Skip to content

update_room async

update_room(
    identifier: RoomIdentifier,
    *,
    config_overrides: Optional[AsyncivschatClientConfig] = None,
    name: Optional[RoomName] = None,
    maximum_message_rate_per_second: Optional[RoomMaxMessageRatePerSecond] = None,
    maximum_message_length: Optional[RoomMaxMessageLength] = None,
    message_review_handler: Optional[MessageReviewHandler] = None,
    logging_configuration_identifiers: Optional[
        LoggingConfigurationIdentifierList
    ] = None,
) -> UpdateRoomResponse

Updates a room’s configuration.

Parameters:

  • identifier (RoomIdentifier) –

    Identifier of the room to be updated. Currently this must be an ARN.

  • name (Optional[RoomName], default: None ) –

    Room name. The value does not need to be unique.

  • maximum_message_rate_per_second (Optional[RoomMaxMessageRatePerSecond], default: None ) –

    Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.

  • maximum_message_length (Optional[RoomMaxMessageLength], default: None ) –

    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.

  • message_review_handler (Optional[MessageReviewHandler], default: None ) –

    Configuration information for optional review of messages. Specify an empty uri string to disassociate a message review handler from the specified room.

  • logging_configuration_identifiers (Optional[LoggingConfigurationIdentifierList], default: None ) –

    Array of logging-configuration identifiers attached to the room.

Raises:

Source code in docs_src/capo_ivschat/_services/async_ivschat.py
async def update_room(
    self,
    identifier: "capo_ivschat.types.room_identifier.RoomIdentifier",
    *,
    config_overrides: Optional[AsyncivschatClientConfig] = None,
    name: Optional["capo_ivschat.types.room_name.RoomName"] = None,
    maximum_message_rate_per_second: Optional[
        "capo_ivschat.types.room_max_message_rate_per_second.RoomMaxMessageRatePerSecond"
    ] = None,
    maximum_message_length: Optional[
        "capo_ivschat.types.room_max_message_length.RoomMaxMessageLength"
    ] = None,
    message_review_handler: Optional[
        "capo_ivschat.types.message_review_handler.MessageReviewHandler"
    ] = None,
    logging_configuration_identifiers: Optional[
        "capo_ivschat.types.logging_configuration_identifier_list.LoggingConfigurationIdentifierList"
    ] = None,
) -> "capo_ivschat.types.update_room_response.UpdateRoomResponse":
    """<p>Updates a room’s configuration.</p>

    Args:
        identifier: <p>Identifier of the room to be updated. Currently this must be an ARN.</p>
        name: <p>Room name. The value does not need to be unique.</p>
        maximum_message_rate_per_second: <p>Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.</p>
        maximum_message_length: <p>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.</p>
        message_review_handler: <p>Configuration information for optional review of messages. Specify an empty <code>uri</code> string to disassociate a message review handler from the specified room.</p>
        logging_configuration_identifiers: <p>Array of logging-configuration identifiers attached to the room.</p>

    Raises:
        capo_ivschat.errors.access_denied_exception.AccessDeniedException: <p/>
        capo_ivschat.errors.pending_verification.PendingVerification: <p/>
        capo_ivschat.errors.resource_not_found_exception.ResourceNotFoundException: <p/>
        capo_ivschat.errors.validation_exception.ValidationException: <p/>
        capo_ivschat.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ivschat.types.update_room_request.UpdateRoomRequest]",
    ) -> AsyncOperationResponse[
        "capo_ivschat.types.update_room_response.UpdateRoomResponse"
    ]:
        import capo_ivschat._operations.amazon_interactive_video_service_chat.update_room

        (
            output,
            http_response,
        ) = await capo_ivschat._operations.amazon_interactive_video_service_chat.update_room.async_update_room(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRoom")
    )
    input_: capo_ivschat.types.update_room_request.UpdateRoomRequest = {
        "identifier": identifier
    }
    if name is not None:
        input_["name"] = name
    if maximum_message_rate_per_second is not None:
        input_["maximum_message_rate_per_second"] = maximum_message_rate_per_second
    if maximum_message_length is not None:
        input_["maximum_message_length"] = maximum_message_length
    if message_review_handler is not None:
        input_["message_review_handler"] = message_review_handler
    if logging_configuration_identifiers is not None:
        input_["logging_configuration_identifiers"] = (
            logging_configuration_identifiers
        )

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output