createMeeting method

Future<CreateMeetingResponse> createMeeting({
  1. String? clientRequestToken,
  2. String? externalMeetingId,
  3. String? mediaRegion,
  4. String? meetingHostId,
  5. MeetingNotificationConfiguration? notificationsConfiguration,
  6. List<Tag>? tags,
})

Creates a new Amazon Chime SDK meeting in the specified media Region with no initial attendees. For more information about specifying media Regions, see Amazon Chime SDK Media Regions in the Amazon Chime Developer Guide. 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 ResourceLimitExceededException. May throw ThrottledClientException. May throw UnauthorizedClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.

Parameter clientRequestToken : The unique identifier for the client request. Use a different token for different meetings.

Parameter externalMeetingId : The external meeting ID.

Parameter mediaRegion : The Region in which to create the meeting. Default: us-east-1.

Available values: af-south-1, ap-northeast-1, ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2, ca-central-1, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, sa-east-1, us-east-1, us-east-2, us-west-1, us-west-2.

Parameter meetingHostId : Reserved.

Parameter notificationsConfiguration : The configuration for resource targets to receive notifications when meeting and attendee events occur.

Parameter tags : The tag key-value pairs.

Implementation

Future<CreateMeetingResponse> createMeeting({
  String? clientRequestToken,
  String? externalMeetingId,
  String? mediaRegion,
  String? meetingHostId,
  MeetingNotificationConfiguration? notificationsConfiguration,
  List<Tag>? tags,
}) async {
  _s.validateStringLength(
    'clientRequestToken',
    clientRequestToken,
    2,
    64,
  );
  _s.validateStringLength(
    'externalMeetingId',
    externalMeetingId,
    2,
    64,
  );
  _s.validateStringLength(
    'meetingHostId',
    meetingHostId,
    2,
    64,
  );
  final $payload = <String, dynamic>{
    'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
    if (externalMeetingId != null) 'ExternalMeetingId': externalMeetingId,
    if (mediaRegion != null) 'MediaRegion': mediaRegion,
    if (meetingHostId != null) 'MeetingHostId': meetingHostId,
    if (notificationsConfiguration != null)
      'NotificationsConfiguration': notificationsConfiguration,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/meetings',
    exceptionFnMap: _exceptionFns,
  );
  return CreateMeetingResponse.fromJson(response);
}