createAttendee method

Future<CreateAttendeeResponse> createAttendee({
  1. required String externalUserId,
  2. required String meetingId,
  3. List<Tag>? tags,
})

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.

May throw BadRequestException. May throw ForbiddenException. May throw NotFoundException. May throw ResourceLimitExceededException. May throw ThrottledClientException. May throw UnauthorizedClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.

Parameter externalUserId : The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application. If you create an attendee with the same external user id, the service returns the existing record.

Parameter meetingId : The Amazon Chime SDK meeting ID.

Parameter tags : The tag key-value pairs.

Implementation

Future<CreateAttendeeResponse> createAttendee({
  required String externalUserId,
  required String meetingId,
  List<Tag>? tags,
}) async {
  ArgumentError.checkNotNull(externalUserId, 'externalUserId');
  _s.validateStringLength(
    'externalUserId',
    externalUserId,
    2,
    64,
    isRequired: true,
  );
  ArgumentError.checkNotNull(meetingId, 'meetingId');
  final $payload = <String, dynamic>{
    'ExternalUserId': externalUserId,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/meetings/${Uri.encodeComponent(meetingId)}/attendees',
    exceptionFnMap: _exceptionFns,
  );
  return CreateAttendeeResponse.fromJson(response);
}