listResiliencyPolicies method

Future<ListResiliencyPoliciesResponse> listResiliencyPolicies({
  1. int? maxResults,
  2. String? nextToken,
  3. String? policyName,
})

Lists the resiliency policies for the Resilience Hub applications.

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

Parameter maxResults : Maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

Parameter nextToken : Null, or the token from a previous call to get the next set of results.

Parameter policyName : Name of the resiliency policy.

Implementation

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