regions
Creates, updates, deletes, gets or lists a regions resource.
Overview​
| Name | regions |
| Type | Resource |
| Id | ovh.cloud.regions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Region name |
availability_zones | array | Availability zones of the region (wire: availabilityZones) |
continent_code | string | Region continent code (AF, ASIA, EU, NA, SA, US) (wire: continentCode) |
country_code | string | Region 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_location | string | Location of the datacenter where the region is (wire: datacenterLocation) |
ip_countries | array | Allowed countries for failover ip (wire: ipCountries) |
services | array | Details about components status |
status | string | Openstack region status (DOWN, MAINTENANCE, UP) |
type | string | Region type (localzone, region, region-3-az) |
Details about your region
| Name | Datatype | Description |
|---|---|---|
name | string | Region name |
availability_zones | array | Availability zones of the region (wire: availabilityZones) |
continent_code | string | Region continent code (AF, ASIA, EU, NA, SA, US) (wire: continentCode) |
country_code | string | Region 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_location | string | Location of the datacenter where the region is (wire: datacenterLocation) |
ip_countries | array | Allowed countries for failover ip (wire: ipCountries) |
services | array | Details about components status |
status | string | Openstack region status (DOWN, MAINTENANCE, UP) |
type | string | Region type (localzone, region, region-3-az) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | region_name, service_name | Get information about your region | |
list | select | service_name | x_pagination_mode | List your regions |
create | insert | service_name, region | Request access to a region | |
log_url | exec | regionName, service_name, kind | Generates 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.
| 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"}}) |
regionName | string | Region name |
region_name | string | Region name (wire: regionName) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
List your regions
SELECT
name,
availability_zones,
continent_code,
country_code,
datacenter_location,
ip_countries,
services,
status,
type
FROM ovh.cloud.regions
WHERE service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: regions
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the regions resource.
- name: region
value: "{{ region }}"
description: |
Region to add on your project
Lifecycle Methods​
EXEC variables use wire (API) names.
- log_url
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 }}"
}'
;