describeChannelMembershipForAppInstanceUser method

Future<DescribeChannelMembershipForAppInstanceUserResponse> describeChannelMembershipForAppInstanceUser({
  1. required String appInstanceUserArn,
  2. required String channelArn,
  3. required String chimeBearer,
})

Returns the details of a channel based on the membership of the specified AppInstanceUser or AppInstanceBot.

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

Parameter appInstanceUserArn : The ARN of the user or bot in a channel.

Parameter channelArn : The ARN of the channel to which the user belongs.

Parameter chimeBearer : The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Implementation

Future<DescribeChannelMembershipForAppInstanceUserResponse>
    describeChannelMembershipForAppInstanceUser({
  required String appInstanceUserArn,
  required String channelArn,
  required String chimeBearer,
}) async {
  final headers = <String, String>{
    'x-amz-chime-bearer': chimeBearer.toString(),
  };
  final $query = <String, List<String>>{
    'app-instance-user-arn': [appInstanceUserArn],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/channels/${Uri.encodeComponent(channelArn)}?scope=app-instance-user-membership',
    queryParams: $query,
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeChannelMembershipForAppInstanceUserResponse.fromJson(
      response);
}