ListGeoLocations
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.
Route 53 does not perform authorization for this API because it retrieves information that is already available to the public.
For a list of supported geolocation codes, see the GeoLocation data type.
Request Syntax
GET /2013-04-01/geolocations?maxitems=MaxItems
&startcontinentcode=StartContinentCode
&startcountrycode=StartCountryCode
&startsubdivisioncode=StartSubdivisionCode
HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
- 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 theIsTruncated
element in the response istrue
. - 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 ifNextContinentCode
from the previous response has a value, enter that value instartcontinentcode
to return the next page of results.Include
startcontinentcode
only if you want to list continents. Don't includestartcontinentcode
when you're listing countries or countries with their subdivisions.Length Constraints: Fixed length of 2.
- 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
istrue
, and ifNextCountryCode
from the previous response has a value, enter that value instartcountrycode
to return the next page of results.Length Constraints: Minimum length of 1. Maximum length of 2.
- 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
istrue
, and ifNextSubdivisionCode
from the previous response has a value, enter that value instartsubdivisioncode
to return the next page of results.To list subdivisions (U.S. states), you must include both
startcountrycode
andstartsubdivisioncode
.Length Constraints: Minimum length of 1. Maximum length of 3.
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<ListGeoLocationsResponse>
<GeoLocationDetailsList>
<GeoLocationDetails>
<ContinentCode>string</ContinentCode>
<ContinentName>string</ContinentName>
<CountryCode>string</CountryCode>
<CountryName>string</CountryName>
<SubdivisionCode>string</SubdivisionCode>
<SubdivisionName>string</SubdivisionName>
</GeoLocationDetails>
</GeoLocationDetailsList>
<IsTruncated>boolean</IsTruncated>
<MaxItems>string</MaxItems>
<NextContinentCode>string</NextContinentCode>
<NextCountryCode>string</NextCountryCode>
<NextSubdivisionCode>string</NextSubdivisionCode>
</ListGeoLocationsResponse>
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in XML format by the service.
- ListGeoLocationsResponse
-
Root level tag for the ListGeoLocationsResponse parameters.
Required: Yes
- GeoLocationDetailsList
-
A complex type that contains one
GeoLocationDetails
element for each location that Amazon Route 53 supports for geolocation.Type: Array of GeoLocationDetails objects
- IsTruncated
-
A value that indicates whether more locations remain to be listed after the last location in this response. If so, the value of
IsTruncated
istrue
. To get more values, submit another request and include the values ofNextContinentCode
,NextCountryCode
, andNextSubdivisionCode
in thestartcontinentcode
,startcountrycode
, andstartsubdivisioncode
, as applicable.Type: Boolean
- MaxItems
-
The value that you specified for
MaxItems
in the request.Type: String
- NextContinentCode
-
If
IsTruncated
istrue
, you can make a follow-up request to display more locations. Enter the value ofNextContinentCode
in thestartcontinentcode
parameter in anotherListGeoLocations
request.Type: String
Length Constraints: Fixed length of 2.
- NextCountryCode
-
If
IsTruncated
istrue
, you can make a follow-up request to display more locations. Enter the value ofNextCountryCode
in thestartcountrycode
parameter in anotherListGeoLocations
request.Type: String
Length Constraints: Minimum length of 1. Maximum length of 2.
- NextSubdivisionCode
-
If
IsTruncated
istrue
, you can make a follow-up request to display more locations. Enter the value ofNextSubdivisionCode
in thestartsubdivisioncode
parameter in anotherListGeoLocations
request.Type: String
Length Constraints: Minimum length of 1. Maximum length of 3.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InvalidInput
-
The input is not valid.
HTTP Status Code: 400
Examples
Example Request
The following request lists locations beginning with the United States state of Oregon.
GET /2013-04-01/geolocations?startcountrycode=US&startsubdivisioncode=OR&maxitems=2
Example Response
This example illustrates one usage of ListGeoLocations.
HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <ListGeoLocationsResponse xmlns="https://route53.amazonaws.com/doc/2013-04-01/"> <GeoLocationDetailsList> <GeoLocationDetails> <CountryCode>US</CountryCode> <CountryName>USA</CountryName> <SubdivisionCode>OR</SubdivisionCode> <SubdivisionName>Oregon</SubdivisionName> </GeoLocationDetails> <GeoLocationDetails> <CountryCode>US</CountryCode> <CountryName>USA</CountryName> <SubdivisionCode>PA</SubdivisionCode> <SubdivisionName>Pennsylvania</SubdivisionName> </GeoLocationDetails> </GeoLocationDetailsList> <IsTruncated>true</IsTruncated> <NextCountryCode>US</NextCountryCode> <NextSubdivisionCode>RI</NextSubdivisionCode> <MaxItems>2</MaxItems> </ListGeoLocationsResponse>
Example Follow-up Request
This example shows the follow-up request to the previous request. In this
request, the value of NextCountryCode
from the previous response is
specified as the value for startcountrycode
, and
NextSubdivisionCode
is specified as the value for
startsubdivisioncode
.
GET /2013-04-01/geolocations?startcountrycode=US&startsubdivisioncode=RI&maxitems=2
Example Follow-up Response
This example illustrates one usage of ListGeoLocations.
HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <ListGeoLocationsResponse xmlns="https://route53.amazonaws.com/doc/2013-04-01/"> <GeoLocationDetailsList> <GeoLocationDetails> <CountryCode>US</CountryCode> <CountryName>USA</CountryName> <SubdivisionCode>RI</SubdivisionCode> <SubdivisionName>Rhode Island</SubdivisionName> </GeoLocationDetails> <GeoLocationDetails> <CountryCode>US</CountryCode> <CountryName>USA</CountryName> <SubdivisionCode>SC</SubdivisionCode> <SubdivisionName>South Carolina</SubdivisionName> </GeoLocationDetails> </GeoLocationDetailsList> <IsTruncated>true</IsTruncated> <NextCountryCode>US</NextCountryCode> <NextSubdivisionCode>SD</NextSubdivisionCode> <MaxItems>2</MaxItems> </ListGeoLocationsResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: