Skip to main content

spares

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

Overview​

Namespares
TypeResource
Idovh.xdsl.spares

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
brandstringModem brand model
iamobjectIAM resource metadata
mac_addressstringMac address (wire: macAddress)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectspareReturns the brand and MAC address of a spare modem.
listselectiam_tags, x_pagination_modeReturns the names of the spare modems of the account.
deletedeletespareRemoves the spare modem from the account, as if it no longer belonged to OVHcloud.
replaceexecspare, domainReplaces the modem of an access with the spare modem.
return_merchandiseexecspareReturns the broken spare modem with an instant refund.

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"}})
sparestringSpare
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
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​

Returns the brand and MAC address of a spare modem.

SELECT
brand,
iam,
mac_address
FROM ovh.xdsl.spares
WHERE spare = '{{ spare }}' -- required
;

DELETE examples​

Removes the spare modem from the account, as if it no longer belonged to OVHcloud.

DELETE FROM ovh.xdsl.spares
WHERE spare = '{{ spare }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Replaces the modem of an access with the spare modem.

EXEC ovh.xdsl.spares.replace
@spare='{{ spare }}' --required
@@json=
'{
"domain": "{{ domain }}"
}'
;