deleteMember method

Future<void> deleteMember({
  1. required String memberId,
  2. required String networkId,
})

Deletes a member. Deleting a member removes the member and all associated resources from the network. DeleteMember can only be called for a specified MemberId if the principal performing the action is associated with the AWS account that owns the member. In all other cases, the DeleteMember action is carried out as the result of an approved proposal to remove a member. If MemberId is the last member in a network specified by the last AWS account, the network is deleted also.

Applies only to Hyperledger Fabric.

May throw InvalidRequestException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ResourceNotReadyException. May throw ThrottlingException. May throw InternalServiceErrorException.

Parameter memberId : The unique identifier of the member to remove.

Parameter networkId : The unique identifier of the network from which the member is removed.

Implementation

Future<void> deleteMember({
  required String memberId,
  required String networkId,
}) async {
  ArgumentError.checkNotNull(memberId, 'memberId');
  _s.validateStringLength(
    'memberId',
    memberId,
    1,
    32,
    isRequired: true,
  );
  ArgumentError.checkNotNull(networkId, 'networkId');
  _s.validateStringLength(
    'networkId',
    networkId,
    1,
    32,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/networks/${Uri.encodeComponent(networkId)}/members/${Uri.encodeComponent(memberId)}',
    exceptionFnMap: _exceptionFns,
  );
}