describeChannelMembershipForAppInstanceUser method

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

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

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

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

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

Implementation

Future<DescribeChannelMembershipForAppInstanceUserResponse>
    describeChannelMembershipForAppInstanceUser({
  required String appInstanceUserArn,
  required String channelArn,
}) async {
  ArgumentError.checkNotNull(appInstanceUserArn, 'appInstanceUserArn');
  _s.validateStringLength(
    'appInstanceUserArn',
    appInstanceUserArn,
    5,
    1600,
    isRequired: true,
  );
  ArgumentError.checkNotNull(channelArn, 'channelArn');
  _s.validateStringLength(
    'channelArn',
    channelArn,
    5,
    1600,
    isRequired: true,
  );
  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,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeChannelMembershipForAppInstanceUserResponse.fromJson(
      response);
}