listProfileHistoryRecords method

Future<ListProfileHistoryRecordsResponse> listProfileHistoryRecords({
  1. required String domainName,
  2. required String profileId,
  3. ActionType? actionType,
  4. int? maxResults,
  5. String? nextToken,
  6. String? objectTypeName,
  7. String? performedBy,
})

Returns a list of history records for a specific profile, for a specific domain.

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

Parameter domainName : The unique name of the domain for which to return profile history records.

Parameter profileId : The identifier of the profile to be taken.

Parameter actionType : Applies a filter to include profile history records only with the specified ActionType value in the response.

Parameter maxResults : The maximum number of results to return per page.

Parameter nextToken : The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Parameter objectTypeName : Applies a filter to include profile history records only with the specified ObjectTypeName value in the response.

Parameter performedBy : Applies a filter to include profile history records only with the specified PerformedBy value in the response. The PerformedBy value can be the Amazon Resource Name (ARN) of the person or service principal who performed the action.

Implementation

Future<ListProfileHistoryRecordsResponse> listProfileHistoryRecords({
  required String domainName,
  required String profileId,
  ActionType? actionType,
  int? maxResults,
  String? nextToken,
  String? objectTypeName,
  String? performedBy,
}) 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>{
    'ProfileId': profileId,
    if (actionType != null) 'ActionType': actionType.value,
    if (objectTypeName != null) 'ObjectTypeName': objectTypeName,
    if (performedBy != null) 'PerformedBy': performedBy,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/domains/${Uri.encodeComponent(domainName)}/profiles/history-records',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListProfileHistoryRecordsResponse.fromJson(response);
}