Skip to main content

regions

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

Overview​

Nameregions
TypeResource
Idovh.cloud.regions

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringRegion name
availability_zonesarrayAvailability zones of the region (wire: availabilityZones)
continent_codestringRegion continent code (AF, ASIA, EU, NA, SA, US) (wire: continentCode)
country_codestringRegion country code (ad, ae, af, ag, ai, al, am, ao, aq, ar, as, at, au, aw, ax, az, ba, bb, bd, be, bf, bg, bh, bi, bj, bl, bm, bn, bo, bq, br, bs, bt, bv, bw, by, bz, ca, cc, cd, cf, cg, ch, ci, ck, cl, cm, cn, co, cr, cu, cv, cw, cx, cy, cz, de, dj, dk, dm, do, dz, ec, ee, eg, eh, er, es, et, fi, fj, fk, fm, fo, fr, ga, gb, gd, ge, gf, gg, gh, gi, gl, gm, gn, gp, gq, gr, gs, gt, gu, gw, gy, hk, hm, hn, hr, ht, hu, id, ie, il, im, in, io, iq, ir, is, it, je, jm, jo, jp, ke, kg, kh, ki, km, kn, kp, kr, kw, ky, kz, la, lb, lc, li, lk, lr, ls, lt, lu, lv, ly, ma, mc, md, me, mf, mg, mh, mk, ml, mm, mn, mo, mp, mq, mr, ms, mt, mu, mv, mw, mx, my, mz, na, nc, ne, nf, ng, ni, nl, no, np, nr, nu, nz, om, pa, pe, pf, pg, ph, pk, pl, pm, pn, pr, ps, pt, pw, py, qa, re, ro, rs, ru, rw, sa, sb, sc, sd, se, sg, sh, si, sj, sk, sl, sm, sn, so, sr, ss, st, sv, sx, sy, sz, tc, td, tf, tg, th, tj, tk, tl, tm, tn, to, tr, tt, tv, tw, tz, ua, ug, uk, um, us, uy, uz, va, vc, ve, vg, vi, vn, vu, wf, ws, ye, yt, za, zm, zw) (wire: countryCode)
datacenter_locationstringLocation of the datacenter where the region is (wire: datacenterLocation)
ip_countriesarrayAllowed countries for failover ip (wire: ipCountries)
servicesarrayDetails about components status
statusstringOpenstack region status (DOWN, MAINTENANCE, UP)
typestringRegion type (localzone, region, region-3-az)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregion_name, service_nameGet information about your region
listselectservice_namex_pagination_modeList your regions
createinsertservice_name, regionRequest access to a region
log_urlexecregionName, service_name, kindGenerates a temporary URL to read the logs of one kind. The URL expires.

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"}})
regionNamestringRegion name
region_namestringRegion name (wire: regionName)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get information about your region

SELECT
name,
availability_zones,
continent_code,
country_code,
datacenter_location,
ip_countries,
services,
status,
type
FROM ovh.cloud.regions
WHERE region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Request access to a region

INSERT INTO ovh.cloud.regions (
region,
service_name
)
SELECT
'{{ region }}' /* required */,
'{{ service_name }}'
RETURNING
name,
availability_zones,
continent_code,
country_code,
datacenter_location,
ip_countries,
services,
status,
type
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Generates a temporary URL to read the logs of one kind. The URL expires.

EXEC ovh.cloud.regions.log_url
@regionName='{{ regionName }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"kind": "{{ kind }}"
}'
;