geolocation
Creates, updates, deletes, gets or lists a geolocation resource.
Overview
| Name | geolocation |
| Type | Resource |
| Id | azure.maps_geolocation.geolocation |
Fields
The following fields are returned by SELECT queries:
- get_location
| Name | Datatype | Description |
|---|---|---|
countryRegion | object | The object containing the country/region information. |
ipAddress | string | The IP Address of the request. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_location | select | format, ip, endpoint | x-ms-client-id | Applies to: see pricing tiers _. This service will return the ISO country code for the provided IP address. Developers can use this information to block or alter certain content based on geographical locations where the application is being viewed from. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme). (default: ) |
format | string | Desired format of the response. Only json format is supported. "json" Default value is "json". |
ip | string | The IP address. Both IPv4 and IPv6 are allowed. Required. |
x-ms-client-id | string |
SELECT examples
- get_location
Applies to: see pricing tiers _. This service will return the ISO country code for the provided IP address. Developers can use this information to block or alter certain content based on geographical locations where the application is being viewed from.
SELECT
countryRegion,
ipAddress
FROM azure.maps_geolocation.geolocation
WHERE format = '{{ format }}' -- required
AND ip = '{{ ip }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND x-ms-client-id = '{{ x-ms-client-id }}'
;