Menu
Amazon Route 53
API Reference

ListGeoLocations

Retrieves a list of supported geo 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.

Request Syntax

Copy
GET /2013-04-01/geolocations?maxitems=MaxItems&startcontinentcode=StartContinentCode&startcountrycode=StartCountryCode&startsubdivisioncode=StartSubdivisionCode HTTP/1.1

URI Request Parameters

The request requires 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 the IsTruncated element in the response is true.

startcontinentcode

The code for the continent with which you want to start listing locations that Amazon Route 53 supports for geolocation. If Amazon 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.

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 Amazon 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.

Amazon Route 53 uses the two-letter country codes that are specified in ISO standard 3166-1 alpha-2.

Length Constraints: Minimum length of 1. Maximum length of 2.

startsubdivisioncode

The code for the subdivision (for example, state or province) with which you want to start listing locations that Amazon Route 53 supports for geolocation. If Amazon 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 of a country, you must include both StartCountryCode and StartSubdivisionCode.

Length Constraints: Minimum length of 1. Maximum length of 3.

Request Body

The request does not have a request body.

Response Syntax

Copy
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 is true. To get more values, submit another request and include the values of NextContinentCode, NextCountryCode, and NextSubdivisionCode in the StartContinentCode, StartCountryCode, and StartSubdivisionCode, as applicable.

Type: Boolean

MaxItems

The value that you specified for MaxItems in the request.

Type: String

NextContinentCode

If IsTruncated is true, you can make a follow-up request to display more locations. Enter the value of NextContinentCode in the StartContinentCode parameter in another ListGeoLocations request.

Type: String

Length Constraints: Fixed length of 2.

NextCountryCode

If IsTruncated is true, you can make a follow-up request to display more locations. Enter the value of NextCountryCode in the StartCountryCode parameter in another ListGeoLocations request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2.

NextSubdivisionCode

If IsTruncated is true, you can make a follow-up request to display more locations. Enter the value of NextSubdivisionCode in the StartSubdivisionCode parameter in another ListGeoLocations 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.

Copy
GET /2013-04-01/geolocations?StartCountryCode=US&StartSubdivisionCode=OR&MaxItems=2

Example Response

Copy
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.

Copy
GET /2013-04-01/geolocations?StartCountryCode=US&StartSubdivisionCode=RI&MaxItems=2

Example Follow-up Response

Copy
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: