listAutomatedReasoningPolicies method

Future<ListAutomatedReasoningPoliciesResponse> listAutomatedReasoningPolicies({
  1. int? maxResults,
  2. String? nextToken,
  3. String? policyArn,
})

Lists all Automated Reasoning policies in your account, with optional filtering by policy ARN. This helps you manage and discover existing policies.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter maxResults : The maximum number of policies to return in a single call.

Parameter nextToken : The pagination token from a previous request to retrieve the next page of results.

Parameter policyArn : Optional filter to list only the policy versions with the specified Amazon Resource Name (ARN). If not provided, the DRAFT versions for all policies are listed.

Implementation

Future<ListAutomatedReasoningPoliciesResponse>
    listAutomatedReasoningPolicies({
  int? maxResults,
  String? nextToken,
  String? policyArn,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (policyArn != null) 'policyArn': [policyArn],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/automated-reasoning-policies',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListAutomatedReasoningPoliciesResponse.fromJson(response);
}