listPolicyGenerations method
Lists all of the policy generations requested in the last seven days.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of results to return in the response.
Parameter nextToken :
A token used for pagination of results returned.
Parameter principalArn :
The ARN of the IAM entity (user or role) for which you are generating a
policy. Use this with ListGeneratedPolicies to filter the
results to only include results for a specific principal.
Implementation
Future<ListPolicyGenerationsResponse> listPolicyGenerations({
int? maxResults,
String? nextToken,
String? principalArn,
}) async {
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (principalArn != null) 'principalArn': [principalArn],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/policy/generation',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListPolicyGenerationsResponse.fromJson(response);
}