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
maxitemsgeolocations remain to be listed, then the value of theIsTruncatedelement 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
IsTruncatedis true, and ifNextContinentCodefrom the previous response has a value, enter that value instartcontinentcodeto return the next page of results.Include
startcontinentcodeonly if you want to list continents. Don't includestartcontinentcodewhen 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
IsTruncatedistrue, and ifNextCountryCodefrom the previous response has a value, enter that value instartcountrycodeto 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
IsTruncatedistrue, and ifNextSubdivisionCodefrom the previous response has a value, enter that value instartsubdivisioncodeto return the next page of results.To list subdivisions (U.S. states), you must include both
startcountrycodeandstartsubdivisioncode.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
GeoLocationDetailselement 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
IsTruncatedistrue. To get more values, submit another request and include the values ofNextContinentCode,NextCountryCode, andNextSubdivisionCodein thestartcontinentcode,startcountrycode, andstartsubdivisioncode, as applicable.Type: Boolean
- MaxItems
-
The value that you specified for
MaxItemsin the request.Type: String
- NextContinentCode
-
If
IsTruncatedistrue, you can make a follow-up request to display more locations. Enter the value ofNextContinentCodein thestartcontinentcodeparameter in anotherListGeoLocationsrequest.Type: String
Length Constraints: Fixed length of 2.
- NextCountryCode
-
If
IsTruncatedistrue, you can make a follow-up request to display more locations. Enter the value ofNextCountryCodein thestartcountrycodeparameter in anotherListGeoLocationsrequest.Type: String
Length Constraints: Minimum length of 1. Maximum length of 2.
- NextSubdivisionCode
-
If
IsTruncatedistrue, you can make a follow-up request to display more locations. Enter the value ofNextSubdivisionCodein thestartsubdivisioncodeparameter in anotherListGeoLocationsrequest.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.
- message
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: