选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

ListGeoLocations - Amazon Route 53
此页面尚未翻译为您的语言。 请求翻译

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

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

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

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:

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。