isMemberInGroups method

Future<IsMemberInGroupsResponse> isMemberInGroups({
  1. required List<String> groupIds,
  2. required String identityStoreId,
  3. required MemberId memberId,
})

Checks the user's membership in all requested groups and returns if the member exists in all queried groups.

May throw ResourceNotFoundException. May throw ValidationException.

Parameter groupIds : A list of identifiers for groups in the identity store.

Parameter identityStoreId : The globally unique identifier for the identity store.

Parameter memberId : An object containing the identifier of a group member.

Implementation

Future<IsMemberInGroupsResponse> isMemberInGroups({
  required List<String> groupIds,
  required String identityStoreId,
  required MemberId memberId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSIdentityStore.IsMemberInGroups'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'GroupIds': groupIds,
      'IdentityStoreId': identityStoreId,
      'MemberId': memberId,
    },
  );

  return IsMemberInGroupsResponse.fromJson(jsonResponse.body);
}