getSegmentMembership method

Future<GetSegmentMembershipResponse> getSegmentMembership({
  1. required String domainName,
  2. required List<String> profileIds,
  3. required String segmentDefinitionName,
})

Determines if the given profiles are within a segment.

May throw AccessDeniedException. May throw BadRequestException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter domainName : The unique name of the domain.

Parameter profileIds : The list of profile IDs to query for.

Parameter segmentDefinitionName : The Id of the wanted segment. Needs to be a valid, and existing segment Id.

Implementation

Future<GetSegmentMembershipResponse> getSegmentMembership({
  required String domainName,
  required List<String> profileIds,
  required String segmentDefinitionName,
}) async {
  final $payload = <String, dynamic>{
    'ProfileIds': profileIds,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/domains/${Uri.encodeComponent(domainName)}/segments/${Uri.encodeComponent(segmentDefinitionName)}/membership',
    exceptionFnMap: _exceptionFns,
  );
  return GetSegmentMembershipResponse.fromJson(response);
}