Skip to main content

ips

Creates, updates, deletes, gets or lists an ips resource.

Overview​

Nameips
TypeResource
Idovh.ip.ips

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
organisation_idstringIP block organisation Id (wire: organisationId)
bring_your_own_ipbooleanIs this IP part of the Bring your own IP program (alpha) (wire: bringYourOwnIp)
campusstringWhere is the IP used/usable (alpha)
can_be_terminatedbooleanIs this IP can be terminated (wire: canBeTerminated)
countrystringIP country (ac, ad, ae, af, ag, ai, al, am, an, 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, cs, cu, cv, cw, cx, cy, cz, de, dj, dk, dm, do, dz, ec, ee, eg, eh, er, es, et, fc, fd, fi, fj, fk, fm, fo, fr, fx, 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, qc, 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, tp, tr, tt, tv, tw, tz, ua, ug, uk, um, us, uy, uz, va, vc, ve, vg, vi, vn, vu, we, wf, ws, ye, yt, yu, za, zm, zw)
descriptionstringCustom description on your ip
iamobjectIAM resource metadata
ipstring (ip-block)IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) (example: 192.0.2.0/24)
is_additional_ipbooleanIs this IP an Additional IP (alpha) (wire: isAdditionalIp)
regionsarrayWhere is the IP used/usable, in the form of region codenames (alpha)
rirstringRegional Internet Registry of the IP (alpha)
routed_toobjectRoutage information (wire: routedTo)
typestringPossible values for ip type (cdn, cloud, dedicated, failover, hosted_ssl, housing, loadBalancing, mail, overthebox, pcc, pci, private, vpn, vps, vrack, xdsl)
versionintegerVersion of the IP (alpha) (4, 6)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectipGet an IP. Returns the block's type, routed service, regions, RIR, organization, and BYOIP / Additional IP flags.
listselectcampus, description, iam_tags, ip, is_additional_ip, routed_to.service_name, type, version, x_pagination_modeList IPs. Returns your IP blocks, filterable by routed service, type, version, campus, Additional IP or IAM tags.
updateupdateipUpdate the IP description. Changes the block's free-text description, its only editable field. List IPs can filter on this description.
change_orgexecip, organisationChange the organization. Sets the RIR organization (from /me/ipOrganisation) on the block's registry record (async task).
parkexecipPark an IP. Detaches the IP from its service and keeps it on your account, unrouted. Returns the task that applies the change.

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"}})
ipstring (ip-block)
campusstringFilter the value of campus property (ilike) (alpha)
descriptionstringFilter the value of description property (like)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
ipstring (ip-block)Filter the value of ip property (contains or equals)
is_additional_ipbooleanFilter the value of isAdditionalIp property (=) (alpha) (wire: isAdditionalIp)
routed_to.service_namestringFilter the value of routedTo.serviceName property (like) (wire: routedTo.serviceName)
typestringFilter the value of type property (=)
versionintegerFilter the value of version property (=) (alpha)
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 an IP. Returns the block's type, routed service, regions, RIR, organization, and BYOIP / Additional IP flags.

SELECT
organisation_id,
bring_your_own_ip,
campus,
can_be_terminated,
country,
description,
iam,
ip,
is_additional_ip,
regions,
rir,
routed_to,
type,
version
FROM ovh.ip.ips
WHERE ip = '{{ ip }}' -- required
;

UPDATE examples​

Update the IP description. Changes the block's free-text description, its only editable field. List IPs can filter on this description.

UPDATE ovh.ip.ips
SET
description = '{{ description }}'
WHERE
ip = '{{ ip }}' --required;

Lifecycle Methods​

EXEC variables use wire (API) names.

Change the organization. Sets the RIR organization (from /me/ipOrganisation) on the block's registry record (async task).

EXEC ovh.ip.ips.change_org
@ip='{{ ip }}' --required
@@json=
'{
"organisation": "{{ organisation }}"
}'
;