Skip to content

create_attendee

create_attendee(
    meeting_id: GuidString,
    external_user_id: ExternalUserId,
    *,
    config_overrides: Optional[ChimeSDKMeetingsClientConfig] = None,
    capabilities: Optional[AttendeeCapabilities] = None,
) -> CreateAttendeeResponse

Creates a new attendee for an active Amazon Chime SDK meeting. For more information about the Amazon Chime SDK, see Using the Amazon Chime SDK in the Amazon Chime Developer Guide.

Parameters:

  • meeting_id (GuidString) –

    The unique ID of the meeting.

  • external_user_id (ExternalUserId) –

    The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.

    Pattern: [-_&@+=,(){}\[\]\/«».:|'"#a-zA-Z0-9À-ÿ\s]*

    Values that begin with aws: are reserved. You can't configure a value that uses this prefix.

  • capabilities (Optional[AttendeeCapabilities], default: None ) –

    The capabilities (audio, video, or content) that you want to grant an attendee. If you don't specify capabilities, all users have send and receive capabilities on all media channels by default.

    You use the capabilities with a set of values that control what the capabilities can do, such as SendReceive data. For more information about those values, see .

    When using capabilities, be aware of these corner cases:

    • If you specify MeetingFeatures:Video:MaxResolution:None when you create a meeting, all API requests that include SendReceive, Send, or Receive for AttendeeCapabilities:Video will be rejected with ValidationError 400.

    • If you specify MeetingFeatures:Content:MaxResolution:None when you create a meeting, all API requests that include SendReceive, Send, or Receive for AttendeeCapabilities:Content will be rejected with ValidationError 400.

    • You can't set content capabilities to SendReceive or Receive unless you also set video capabilities to SendReceive or Receive. If you don't set the video capability to receive, the response will contain an HTTP 400 Bad Request status code. However, you can set your video capability to receive and you set your content capability to not receive.

    • If meeting features is defined as Video:MaxResolution:None but Content:MaxResolution is defined as something other than None and attendee capabilities are not defined in the API request, then the default attendee video capability is set to Receive and attendee content capability is set to SendReceive. This is because content SendReceive requires video to be at least Receive.

    • When you change an audio capability from None or Receive to Send or SendReceive , and if the attendee left their microphone unmuted, audio will flow from the attendee to the other meeting participants.

    • When you change a video or content capability from None or Receive to Send or SendReceive , and if the attendee turned on their video or content streams, remote attendees can receive those streams, but only after media renegotiation between the client and the Amazon Chime back-end server.

Raises:

Source code in docs_src/capo_chime_sdk_meetings/_services/chime_sdk_meetings.py
def create_attendee(
    self,
    meeting_id: "capo_chime_sdk_meetings.types.guid_string.GuidString",
    external_user_id: "capo_chime_sdk_meetings.types.external_user_id.ExternalUserId",
    *,
    config_overrides: Optional[ChimeSDKMeetingsClientConfig] = None,
    capabilities: Optional[
        "capo_chime_sdk_meetings.types.attendee_capabilities.AttendeeCapabilities"
    ] = None,
) -> (
    "capo_chime_sdk_meetings.types.create_attendee_response.CreateAttendeeResponse"
):
    r"""<p> Creates a new attendee for an active Amazon Chime SDK meeting. For more information about the Amazon Chime SDK, see <a href="https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html">Using the Amazon Chime SDK</a> in the <i>Amazon Chime Developer Guide</i>. </p>

    Args:
        meeting_id: <p>The unique ID of the meeting.</p>
        external_user_id: <p>The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.</p> <p>Pattern: <code>[-_&@+=,(){}\[\]\/«».:|'"#a-zA-Z0-9À-ÿ\s]*</code> </p> <p>Values that begin with <code>aws:</code> are reserved. You can't configure a value that uses this prefix.</p>
        capabilities: <p>The capabilities (<code>audio</code>, <code>video</code>, or <code>content</code>) that you want to grant an attendee. If you don't specify capabilities, all users have send and receive capabilities on all media channels by default.</p> <note> <p>You use the capabilities with a set of values that control what the capabilities can do, such as <code>SendReceive</code> data. For more information about those values, see .</p> </note> <p>When using capabilities, be aware of these corner cases:</p> <ul> <li> <p>If you specify <code>MeetingFeatures:Video:MaxResolution:None</code> when you create a meeting, all API requests that include <code>SendReceive</code>, <code>Send</code>, or <code>Receive</code> for <code>AttendeeCapabilities:Video</code> will be rejected with <code>ValidationError 400</code>.</p> </li> <li> <p>If you specify <code>MeetingFeatures:Content:MaxResolution:None</code> when you create a meeting, all API requests that include <code>SendReceive</code>, <code>Send</code>, or <code>Receive</code> for <code>AttendeeCapabilities:Content</code> will be rejected with <code>ValidationError 400</code>.</p> </li> <li> <p>You can't set <code>content</code> capabilities to <code>SendReceive</code> or <code>Receive</code> unless you also set <code>video</code> capabilities to <code>SendReceive</code> or <code>Receive</code>. If you don't set the <code>video</code> capability to receive, the response will contain an HTTP 400 Bad Request status code. However, you can set your <code>video</code> capability to receive and you set your <code>content</code> capability to not receive.</p> </li> <li> <p>If meeting features is defined as <code>Video:MaxResolution:None</code> but <code>Content:MaxResolution</code> is defined as something other than <code>None</code> and attendee capabilities are not defined in the API request, then the default attendee video capability is set to <code>Receive</code> and attendee content capability is set to <code>SendReceive</code>. This is because content <code>SendReceive</code> requires video to be at least <code>Receive</code>.</p> </li> <li> <p>When you change an <code>audio</code> capability from <code>None</code> or <code>Receive</code> to <code>Send</code> or <code>SendReceive</code> , and if the attendee left their microphone unmuted, audio will flow from the attendee to the other meeting participants.</p> </li> <li> <p>When you change a <code>video</code> or <code>content</code> capability from <code>None</code> or <code>Receive</code> to <code>Send</code> or <code>SendReceive</code> , and if the attendee turned on their video or content streams, remote attendees can receive those streams, but only after media renegotiation between the client and the Amazon Chime back-end server.</p> </li> </ul>

    Raises:
        capo_chime_sdk_meetings.errors.bad_request_exception.BadRequestException: <p>The input parameters don't match the service's restrictions.</p>
        capo_chime_sdk_meetings.errors.forbidden_exception.ForbiddenException: <p>The client is permanently forbidden from making the request.</p>
        capo_chime_sdk_meetings.errors.limit_exceeded_exception.LimitExceededException: <p>The request exceeds the resource limit.</p>
        capo_chime_sdk_meetings.errors.not_found_exception.NotFoundException: <p>One or more of the resources in the request does not exist in the system.</p>
        capo_chime_sdk_meetings.errors.service_failure_exception.ServiceFailureException: <p>The service encountered an unexpected error.</p>
        capo_chime_sdk_meetings.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable.</p>
        capo_chime_sdk_meetings.errors.throttling_exception.ThrottlingException: <p>The number of customer requests exceeds the request rate limit.</p>
        capo_chime_sdk_meetings.errors.unauthorized_exception.UnauthorizedException: <p>The user isn't authorized to request a resource.</p>
        capo_chime_sdk_meetings.errors.unprocessable_entity_exception.UnprocessableEntityException: <p>The request was well-formed but was unable to be followed due to semantic errors.</p>
        capo_chime_sdk_meetings.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_chime_sdk_meetings.types.create_attendee_request.CreateAttendeeRequest]",
    ) -> OperationResponse[
        "capo_chime_sdk_meetings.types.create_attendee_response.CreateAttendeeResponse"
    ]:
        import capo_chime_sdk_meetings._operations.chime_meetings_sdk_service.create_attendee

        output, http_response = (
            capo_chime_sdk_meetings._operations.chime_meetings_sdk_service.create_attendee.create_attendee(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_chime_sdk_meetings.types.create_attendee_request.CreateAttendeeRequest",
    ) -> dict[str, Any]:
        import capo_chime_sdk_meetings.types.create_attendee_request

        return (
            capo_chime_sdk_meetings.types.create_attendee_request.redact_sensitive(
                input_
            )
        )

    def _redact_output(
        output: "capo_chime_sdk_meetings.types.create_attendee_response.CreateAttendeeResponse",
    ) -> dict[str, Any]:
        import capo_chime_sdk_meetings.types.create_attendee_response

        return (
            capo_chime_sdk_meetings.types.create_attendee_response.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateAttendee",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_chime_sdk_meetings.types.create_attendee_request.CreateAttendeeRequest = {
        "meeting_id": meeting_id,
        "external_user_id": external_user_id,
    }
    if capabilities is not None:
        input_["capabilities"] = capabilities

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