listCidrBlocks method

Future<ListCidrBlocksResponse> listCidrBlocks({
  1. required String collectionId,
  2. String? locationName,
  3. int? maxResults,
  4. String? nextToken,
})

Returns a paginated list of location objects and their CIDR blocks.

May throw InvalidInput. May throw NoSuchCidrCollectionException. May throw NoSuchCidrLocationException.

Parameter collectionId : The UUID of the CIDR collection.

Parameter locationName : The name of the CIDR collection location.

Parameter maxResults : Maximum number of results you want returned.

Parameter nextToken : An opaque pagination token to indicate where the service is to begin enumerating results.

Implementation

Future<ListCidrBlocksResponse> listCidrBlocks({
  required String collectionId,
  String? locationName,
  int? maxResults,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    if (locationName != null) 'location': [locationName],
    if (maxResults != null) 'maxresults': [maxResults.toString()],
    if (nextToken != null) 'nexttoken': [nextToken],
  };
  final $result = await _protocol.send(
    method: 'GET',
    requestUri:
        '/2013-04-01/cidrcollection/${Uri.encodeComponent(collectionId)}/cidrblocks',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListCidrBlocksResponse.fromXml($result.body);
}