Copyright | (c) 2013-2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
To retrieve a single geo location, send a GET
request to the
'2013-04-01\/geolocation' resource with one of these options:
continentcode | countrycode | countrycode and subdivisioncode.
See: AWS API Reference for GetGeoLocation.
- getGeoLocation :: GetGeoLocation
- data GetGeoLocation
- gglSubdivisionCode :: Lens' GetGeoLocation (Maybe Text)
- gglCountryCode :: Lens' GetGeoLocation (Maybe Text)
- gglContinentCode :: Lens' GetGeoLocation (Maybe Text)
- getGeoLocationResponse :: Int -> GeoLocationDetails -> GetGeoLocationResponse
- data GetGeoLocationResponse
- gglrsStatus :: Lens' GetGeoLocationResponse Int
- gglrsGeoLocationDetails :: Lens' GetGeoLocationResponse GeoLocationDetails
Creating a Request
getGeoLocation :: GetGeoLocation Source
Creates a value of GetGeoLocation
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data GetGeoLocation Source
A complex type that contains information about the request to get a geo location.
See: getGeoLocation
smart constructor.
Request Lenses
gglSubdivisionCode :: Lens' GetGeoLocation (Maybe Text) Source
The code for a country's subdivision (e.g., a province of Canada). A subdivision code is only valid with the appropriate country code.
Constraint: Specifying SubdivisionCode
without CountryCode
returns
an InvalidInput error.
gglCountryCode :: Lens' GetGeoLocation (Maybe Text) Source
The code for a country geo location. The default location uses '*' for the country code and will match all locations that are not matched by a geo location.
The default geo location uses a *
for the country code. All other
country codes follow the ISO 3166 two-character code.
gglContinentCode :: Lens' GetGeoLocation (Maybe Text) Source
The code for a continent geo location. Note: only continent locations have a continent code.
Valid values: AF
| AN
| AS
| EU
| OC
| NA
| SA
Constraint: Specifying ContinentCode
with either CountryCode
or
SubdivisionCode
returns an InvalidInput error.
Destructuring the Response
Creates a value of GetGeoLocationResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data GetGeoLocationResponse Source
A complex type containing information about the specified geo location.
See: getGeoLocationResponse
smart constructor.
Response Lenses
gglrsStatus :: Lens' GetGeoLocationResponse Int Source
The response status code.
gglrsGeoLocationDetails :: Lens' GetGeoLocationResponse GeoLocationDetails Source
A complex type that contains the information about the specified geo location.