Skip to content

create_room

create_room(
    *,
    config_overrides: Optional[ivschatClientConfig] = 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,
    tags: Optional[Tags] = None,
    logging_configuration_identifiers: Optional[
        LoggingConfigurationIdentifierList
    ] = None,
) -> CreateRoomResponse

Creates a room that allows clients to connect and pass messages.

Parameters:

  • 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 ) –

    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.

  • tags (Optional[Tags], default: None ) –

    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.

  • 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/ivschat.py
def create_room(
    self,
    *,
    config_overrides: Optional[ivschatClientConfig] = 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,
    tags: Optional["capo_ivschat.types.tags.Tags"] = None,
    logging_configuration_identifiers: Optional[
        "capo_ivschat.types.logging_configuration_identifier_list.LoggingConfigurationIdentifierList"
    ] = None,
) -> "capo_ivschat.types.create_room_response.CreateRoomResponse":
    """<p>Creates a room that allows clients to connect and pass messages.</p>

    Args:
        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>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.</p>
        tags: <p>Tags to attach to the resource. Array of maps, each of the form <code>string:string (key:value)</code>. See <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html">Best practices and strategies</a> in <i>Tagging Amazon Web Services Resources and Tag Editor</i> 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.</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.conflict_exception.ConflictException: <p/>
        capo_ivschat.errors.pending_verification.PendingVerification: <p/>
        capo_ivschat.errors.resource_not_found_exception.ResourceNotFoundException: <p/>
        capo_ivschat.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p/>
        capo_ivschat.errors.validation_exception.ValidationException: <p/>
        capo_ivschat.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ivschat.types.create_room_request.CreateRoomRequest]",
    ) -> OperationResponse[
        "capo_ivschat.types.create_room_response.CreateRoomResponse"
    ]:
        import capo_ivschat._operations.amazon_interactive_video_service_chat.create_room

        output, http_response = (
            capo_ivschat._operations.amazon_interactive_video_service_chat.create_room.create_room(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateRoom")
    )
    input_: capo_ivschat.types.create_room_request.CreateRoomRequest = {}
    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 tags is not None:
        input_["tags"] = tags
    if logging_configuration_identifiers is not None:
        input_["logging_configuration_identifiers"] = (
            logging_configuration_identifiers
        )

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output