createAppInstanceUser method

Future<CreateAppInstanceUserResponse> createAppInstanceUser({
  1. required String appInstanceArn,
  2. required String appInstanceUserId,
  3. required String name,
  4. String? clientRequestToken,
  5. ExpirationSettings? expirationSettings,
  6. String? metadata,
  7. List<Tag>? tags,
})

Creates a user under an Amazon Chime AppInstance. The request consists of a unique appInstanceUserId and Name for that user.

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

Parameter appInstanceArn : The ARN of the AppInstance request.

Parameter appInstanceUserId : The user ID of the AppInstance.

Parameter name : The user's name.

Parameter clientRequestToken : The unique ID of the request. Use different tokens to request additional AppInstances.

Parameter expirationSettings : Settings that control the interval after which the AppInstanceUser is automatically deleted.

Parameter metadata : The request's metadata. Limited to a 1KB string in UTF-8.

Parameter tags : Tags assigned to the AppInstanceUser.

Implementation

Future<CreateAppInstanceUserResponse> createAppInstanceUser({
  required String appInstanceArn,
  required String appInstanceUserId,
  required String name,
  String? clientRequestToken,
  ExpirationSettings? expirationSettings,
  String? metadata,
  List<Tag>? tags,
}) async {
  final $payload = <String, dynamic>{
    'AppInstanceArn': appInstanceArn,
    'AppInstanceUserId': appInstanceUserId,
    'Name': name,
    'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
    if (expirationSettings != null) 'ExpirationSettings': expirationSettings,
    if (metadata != null) 'Metadata': metadata,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/app-instance-users',
    exceptionFnMap: _exceptionFns,
  );
  return CreateAppInstanceUserResponse.fromJson(response);
}