spares
Creates, updates, deletes, gets or lists a spares resource.
Overview​
| Name | spares |
| Type | Resource |
| Id | ovh.xdsl.spares |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
brand | string | Modem brand model |
iam | object | IAM resource metadata |
mac_address | string | Mac address (wire: macAddress) |
Spare properties
| Name | Datatype | Description |
|---|---|---|
brand | string | Modem brand model |
iam | object | IAM resource metadata |
mac_address | string | Mac address (wire: macAddress) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | spare | Returns the brand and MAC address of a spare modem. | |
list | select | iam_tags, x_pagination_mode | Returns the names of the spare modems of the account. | |
delete | delete | spare | Removes the spare modem from the account, as if it no longer belonged to OVHcloud. | |
replace | exec | spare, domain | Replaces the modem of an access with the spare modem. | |
return_merchandise | exec | spare | Returns 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.
| 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"}}) |
spare | string | Spare |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
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
Returns the brand and MAC address of a spare modem.
SELECT
brand,
iam,
mac_address
FROM ovh.xdsl.spares
WHERE spare = '{{ spare }}' -- required
;
Returns the names of the spare modems of the account.
SELECT
brand,
iam,
mac_address
FROM ovh.xdsl.spares
WHERE iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
DELETE examples​
- delete
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.
- replace
- return_merchandise
Replaces the modem of an access with the spare modem.
EXEC ovh.xdsl.spares.replace
@spare='{{ spare }}' --required
@@json=
'{
"domain": "{{ domain }}"
}'
;
Returns the broken spare modem with an instant refund.
EXEC ovh.xdsl.spares.return_merchandise
@spare='{{ spare }}' --required
;