listGeoLocations method
Retrieves a list of supported geographic locations.
Countries are listed first, and continents are listed last. If Amazon Route 53 supports subdivisions for a country (for example, states or provinces), the subdivisions for that country are listed in alphabetical order immediately after the corresponding country.
For a list of supported geolocation codes, see the GeoLocation data type.
May throw InvalidInput.
Parameter maxItems
:
(Optional) The maximum number of geolocations to be included in the
response body for this request. If more than maxitems
geolocations remain to be listed, then the value of the
IsTruncated
element in the response is true
.
Parameter startContinentCode
:
The code for the continent with which you want to start listing locations
that Amazon Route 53 supports for geolocation. If Route 53 has already
returned a page or more of results, if IsTruncated
is true,
and if NextContinentCode
from the previous response has a
value, enter that value in startcontinentcode
to return the
next page of results.
Include startcontinentcode
only if you want to list
continents. Don't include startcontinentcode
when you're
listing countries or countries with their subdivisions.
Parameter startCountryCode
:
The code for the country with which you want to start listing locations
that Amazon Route 53 supports for geolocation. If Route 53 has already
returned a page or more of results, if IsTruncated
is
true
, and if NextCountryCode
from the previous
response has a value, enter that value in startcountrycode
to
return the next page of results.
Parameter startSubdivisionCode
:
The code for the state of the United States with which you want to start
listing locations that Amazon Route 53 supports for geolocation. If Route
53 has already returned a page or more of results, if
IsTruncated
is true
, and if
NextSubdivisionCode
from the previous response has a value,
enter that value in startsubdivisioncode
to return the next
page of results.
To list subdivisions (U.S. states), you must include both
startcountrycode
and startsubdivisioncode
.
Implementation
Future<ListGeoLocationsResponse> listGeoLocations({
String? maxItems,
String? startContinentCode,
String? startCountryCode,
String? startSubdivisionCode,
}) async {
_s.validateStringLength(
'startContinentCode',
startContinentCode,
2,
2,
);
_s.validateStringLength(
'startCountryCode',
startCountryCode,
1,
2,
);
_s.validateStringLength(
'startSubdivisionCode',
startSubdivisionCode,
1,
3,
);
final $query = <String, List<String>>{
if (maxItems != null) 'maxitems': [maxItems],
if (startContinentCode != null)
'startcontinentcode': [startContinentCode],
if (startCountryCode != null) 'startcountrycode': [startCountryCode],
if (startSubdivisionCode != null)
'startsubdivisioncode': [startSubdivisionCode],
};
final $result = await _protocol.send(
method: 'GET',
requestUri: '/2013-04-01/geolocations',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListGeoLocationsResponse.fromXml($result.body);
}