listProfileObjects method
Returns a list of objects associated with a profile of a given ProfileObjectType.
May throw AccessDeniedException.
May throw BadRequestException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter domainName :
The unique name of the domain.
Parameter objectTypeName :
The name of the profile object type.
Parameter profileId :
The unique identifier of a customer profile.
Parameter maxResults :
The maximum number of objects returned per page.
Parameter nextToken :
The pagination token from the previous call to ListProfileObjects.
Parameter objectFilter :
Applies a filter to the response to include profile objects with the
specified index values.
Implementation
Future<ListProfileObjectsResponse> listProfileObjects({
required String domainName,
required String objectTypeName,
required String profileId,
int? maxResults,
String? nextToken,
ObjectFilter? objectFilter,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'max-results': [maxResults.toString()],
if (nextToken != null) 'next-token': [nextToken],
};
final $payload = <String, dynamic>{
'ObjectTypeName': objectTypeName,
'ProfileId': profileId,
if (objectFilter != null) 'ObjectFilter': objectFilter,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/domains/${Uri.encodeComponent(domainName)}/profiles/objects',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListProfileObjectsResponse.fromJson(response);
}