locations
Creates, updates, deletes, gets or lists a locations resource.
Overview​
| Name | locations |
| Type | Resource |
| Id | ovh.location.locations |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Name of the region |
city_name | string | Full name of the city (wire: cityName) |
country_name | string | Full name of the country (wire: countryName) |
geography_name | string | Name of the geographical area (wire: geographyName) |
availability_zone_datacenters | object | List of datacenters by availability zone (wire: availabilityZoneDatacenters) |
availability_zones | array | List of availability zones for the region (wire: availabilityZones) |
cardinal_point | string | Localized cardinal direction where the region is located. The value depends on the language query parameter. (wire: cardinalPoint) |
city_code | string | ISO code of the city (wire: cityCode) |
city_latitude | number | Geographical latitude of the city (wire: cityLatitude) |
city_longitude | number | Geographical longitude of the city (wire: cityLongitude) |
code | string | Region's short code |
country_code | string | ISO code of the country (wire: countryCode) |
geography_code | string | Short code representing the geographical area (wire: geographyCode) |
location | string | Location of the region |
opening_year | integer | Year the region was opened (wire: openingYear) |
services | array | List of services available in the region |
specific_type | string | Specific typology of the region (BACKUP, LZ, SNC, STANDARD) (wire: specificType) |
status | string | Operational status of the region (NON_OPERATIONAL, OPERATIONAL) |
type | string | General typology of the region (LOCAL-ZONE, REGION-1-AZ, REGION-3-AZ) |
Region and its availability zones
| Name | Datatype | Description |
|---|---|---|
name | string | Name of the region |
city_name | string | Full name of the city (wire: cityName) |
country_name | string | Full name of the country (wire: countryName) |
geography_name | string | Name of the geographical area (wire: geographyName) |
availability_zone_datacenters | object | List of datacenters by availability zone (wire: availabilityZoneDatacenters) |
availability_zones | array | List of availability zones for the region (wire: availabilityZones) |
cardinal_point | string | Localized cardinal direction where the region is located. The value depends on the language query parameter. (wire: cardinalPoint) |
city_code | string | ISO code of the city (wire: cityCode) |
city_latitude | number | Geographical latitude of the city (wire: cityLatitude) |
city_longitude | number | Geographical longitude of the city (wire: cityLongitude) |
code | string | Region's short code |
country_code | string | ISO code of the country (wire: countryCode) |
geography_code | string | Short code representing the geographical area (wire: geographyCode) |
location | string | Location of the region |
opening_year | integer | Year the region was opened (wire: openingYear) |
services | array | List of services available in the region |
specific_type | string | Specific typology of the region (BACKUP, LZ, SNC, STANDARD) (wire: specificType) |
status | string | Operational status of the region (NON_OPERATIONAL, OPERATIONAL) |
type | string | General typology of the region (LOCAL-ZONE, REGION-1-AZ, REGION-3-AZ) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | name | Get available region and its availability zones | |
list | select | x_pagination_cursor, x_pagination_size, availability_zone, city_code, city_name, code, country_code, country_name, datacenter, geography_code, geography_name, ids, language, location, name, services, specific_type, status, type, with_non_operational | List available regions and their availability zones |
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 |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
name | string | Name |
availability_zone | string | Filter by availability zone. Returns locations having this availability zone. (wire: availabilityZone) |
city_code | string | Filter by city ISO code (wire: cityCode) |
city_name | string | Filter by city name (wire: cityName) |
code | string | Filter by region code |
country_code | string | Filter by country ISO code (wire: countryCode) |
country_name | string | Filter by country name (wire: countryName) |
datacenter | string | Filter by datacenter |
geography_code | string | Filter by geography code (wire: geographyCode) |
geography_name | string | Filter by geography name (wire: geographyName) |
ids | array | Filter by region IDs |
language | string | Locale name for translation |
location | string | Filter by region location |
name | string | Filter by region name |
services | string | Filter by services. Returns locations having at least one of the services in the list. |
specific_type | string | Filter by specific region type (wire: specificType) |
status | string | Filter by status |
type | string | Filter by general region type |
with_non_operational | boolean | also return NON_OPERATIONAL regions that are planned (wire: withNonOperational) |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
Get available region and its availability zones
SELECT
name,
city_name,
country_name,
geography_name,
availability_zone_datacenters,
availability_zones,
cardinal_point,
city_code,
city_latitude,
city_longitude,
code,
country_code,
geography_code,
location,
opening_year,
services,
specific_type,
status,
type
FROM ovh.location.locations
WHERE name = '{{ name }}' -- required
;
List available regions and their availability zones
SELECT
name,
city_name,
country_name,
geography_name,
availability_zone_datacenters,
availability_zones,
cardinal_point,
city_code,
city_latitude,
city_longitude,
code,
country_code,
geography_code,
location,
opening_year,
services,
specific_type,
status,
type
FROM ovh.location.locations
WHERE x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND availability_zone = '{{ availability_zone }}'
AND city_code = '{{ city_code }}'
AND city_name = '{{ city_name }}'
AND code = '{{ code }}'
AND country_code = '{{ country_code }}'
AND country_name = '{{ country_name }}'
AND datacenter = '{{ datacenter }}'
AND geography_code = '{{ geography_code }}'
AND geography_name = '{{ geography_name }}'
AND ids = '{{ ids }}'
AND language = '{{ language }}'
AND location = '{{ location }}'
AND name = '{{ name }}'
AND services = '{{ services }}'
AND specific_type = '{{ specific_type }}'
AND status = '{{ status }}'
AND type = '{{ type }}'
AND with_non_operational = '{{ with_non_operational }}'
;