createAppInstanceAdmin method
Promotes an AppInstanceUser or AppInstanceBot to
an AppInstanceAdmin. The promoted entity can perform the
following actions.
-
ChannelModeratoractions across all channels in theAppInstance. -
DeleteChannelMessageactions.
AppInstanceUser and AppInstanceBot can
be promoted to an AppInstanceAdmin role.
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 appInstanceAdminArn :
The ARN of the administrator of the current AppInstance.
Parameter appInstanceArn :
The ARN of the AppInstance.
Implementation
Future<CreateAppInstanceAdminResponse> createAppInstanceAdmin({
required String appInstanceAdminArn,
required String appInstanceArn,
}) async {
final $payload = <String, dynamic>{
'AppInstanceAdminArn': appInstanceAdminArn,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/app-instances/${Uri.encodeComponent(appInstanceArn)}/admins',
exceptionFnMap: _exceptionFns,
);
return CreateAppInstanceAdminResponse.fromJson(response);
}