listPolicies method

Future<ListPoliciesResponse> listPolicies({
  1. bool? ascendingOrder,
  2. String? marker,
  3. int? pageSize,
})

Lists your policies.

May throw InvalidRequestException. May throw ThrottlingException. May throw UnauthorizedException. May throw ServiceUnavailableException. May throw InternalFailureException.

Parameter ascendingOrder : Specifies the order for results. If true, the results are returned in ascending creation order.

Parameter marker : The marker for the next set of results.

Parameter pageSize : The result page size.

Implementation

Future<ListPoliciesResponse> listPolicies({
  bool? ascendingOrder,
  String? marker,
  int? pageSize,
}) async {
  _s.validateStringLength(
    'marker',
    marker,
    0,
    1024,
  );
  _s.validateNumRange(
    'pageSize',
    pageSize,
    1,
    250,
  );
  final $query = <String, List<String>>{
    if (ascendingOrder != null)
      'isAscendingOrder': [ascendingOrder.toString()],
    if (marker != null) 'marker': [marker],
    if (pageSize != null) 'pageSize': [pageSize.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/policies',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListPoliciesResponse.fromJson(response);
}