describeAddresses method

Future<DescribeAddressesResult> describeAddresses({
  1. int? maxResults,
  2. String? nextToken,
})

Returns a specified number of ADDRESS objects. Calling this API in one of the US regions will return addresses from the list of all addresses associated with this account in all US regions.

May throw InvalidResourceException. May throw InvalidNextTokenException.

Parameter maxResults : The number of ADDRESS objects to return.

Parameter nextToken : HTTP requests are stateless. To identify what object comes "next" in the list of ADDRESS objects, you have the option of specifying a value for NextToken as the starting point for your list of returned addresses.

Implementation

Future<DescribeAddressesResult> describeAddresses({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSIESnowballJobManagementService.DescribeAddresses'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return DescribeAddressesResult.fromJson(jsonResponse.body);
}