Skip to main content

locations

Creates, updates, deletes, gets or lists a locations resource.

Overview​

Namelocations
TypeResource
Idovh.location.locations

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringName of the region
city_namestringFull name of the city (wire: cityName)
country_namestringFull name of the country (wire: countryName)
geography_namestringName of the geographical area (wire: geographyName)
availability_zone_datacentersobjectList of datacenters by availability zone (wire: availabilityZoneDatacenters)
availability_zonesarrayList of availability zones for the region (wire: availabilityZones)
cardinal_pointstringLocalized cardinal direction where the region is located. The value depends on the language query parameter. (wire: cardinalPoint)
city_codestringISO code of the city (wire: cityCode)
city_latitudenumberGeographical latitude of the city (wire: cityLatitude)
city_longitudenumberGeographical longitude of the city (wire: cityLongitude)
codestringRegion's short code
country_codestringISO code of the country (wire: countryCode)
geography_codestringShort code representing the geographical area (wire: geographyCode)
locationstringLocation of the region
opening_yearintegerYear the region was opened (wire: openingYear)
servicesarrayList of services available in the region
specific_typestringSpecific typology of the region (BACKUP, LZ, SNC, STANDARD) (wire: specificType)
statusstringOperational status of the region (NON_OPERATIONAL, OPERATIONAL)
typestringGeneral typology of the region (LOCAL-ZONE, REGION-1-AZ, REGION-3-AZ)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectnameGet available region and its availability zones
listselectx_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_operationalList 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.

NameDatatypeDescription
api_hoststringThe 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"}})
namestringName
availability_zonestringFilter by availability zone. Returns locations having this availability zone. (wire: availabilityZone)
city_codestringFilter by city ISO code (wire: cityCode)
city_namestringFilter by city name (wire: cityName)
codestringFilter by region code
country_codestringFilter by country ISO code (wire: countryCode)
country_namestringFilter by country name (wire: countryName)
datacenterstringFilter by datacenter
geography_codestringFilter by geography code (wire: geographyCode)
geography_namestringFilter by geography name (wire: geographyName)
idsarrayFilter by region IDs
languagestringLocale name for translation
locationstringFilter by region location
namestringFilter by region name
servicesstringFilter by services. Returns locations having at least one of the services in the list.
specific_typestringFilter by specific region type (wire: specificType)
statusstringFilter by status
typestringFilter by general region type
with_non_operationalbooleanalso return NON_OPERATIONAL regions that are planned (wire: withNonOperational)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

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
;