deleteChannelMembership method

Future<void> deleteChannelMembership({
  1. required String channelArn,
  2. required String memberArn,
})

Removes a member from a channel.

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

Parameter channelArn : The ARN of the channel from which you want to remove the user.

Parameter memberArn : The ARN of the member that you're removing from the channel.

Implementation

Future<void> deleteChannelMembership({
  required String channelArn,
  required String memberArn,
}) async {
  ArgumentError.checkNotNull(channelArn, 'channelArn');
  _s.validateStringLength(
    'channelArn',
    channelArn,
    5,
    1600,
    isRequired: true,
  );
  ArgumentError.checkNotNull(memberArn, 'memberArn');
  _s.validateStringLength(
    'memberArn',
    memberArn,
    5,
    1600,
    isRequired: true,
  );
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/channels/${Uri.encodeComponent(channelArn)}/memberships/${Uri.encodeComponent(memberArn)}',
    exceptionFnMap: _exceptionFns,
  );
}