Skip to main content

ovh_accounts

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

Overview​

Nameovh_accounts
TypeResource
Idovh.me.ovh_accounts

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
ovh_account_idstring (wire: ovhAccountId)
alert_thresholdinteger (wire: alertThreshold)
available_after_creditobjectPrice with its currency and textual representation (wire: availableAfterCredit)
balanceobjectPrice with its currency and textual representation
can_be_creditedboolean (wire: canBeCredited)
is_activeboolean (wire: isActive)
last_updatestring (date-time) (wire: lastUpdate)
open_datestring (date-time) (wire: openDate)
retrievable_amountobjectPrice with its currency and textual representation (wire: retrievableAmount)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectovh_account_idGet this object properties
listselectx_pagination_modeList of OVH accounts the logged account has
updateupdateovh_account_idAlter this object properties
credit_orderexecovhAccountId, amountGenerate an order that can be paid in order to credit the OVH account
retrieve_moneyexecovhAccountId, amount, bankAccountIdTransfer money from ovhAccount to your bank account

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"}})
ovhAccountIdstring
ovh_account_idstring (wire: ovhAccountId)
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 this object properties

SELECT
ovh_account_id,
alert_threshold,
available_after_credit,
balance,
can_be_credited,
is_active,
last_update,
open_date,
retrievable_amount
FROM ovh.me.ovh_accounts
WHERE ovh_account_id = '{{ ovh_account_id }}' -- required
;

UPDATE examples​

Alter this object properties

UPDATE ovh.me.ovh_accounts
SET
alert_threshold = {{ alert_threshold }}
WHERE
ovh_account_id = '{{ ovh_account_id }}' --required;

Lifecycle Methods​

EXEC variables use wire (API) names.

Generate an order that can be paid in order to credit the OVH account

EXEC ovh.me.ovh_accounts.credit_order
@ovhAccountId='{{ ovhAccountId }}' --required
@@json=
'{
"amount": {{ amount }}
}'
;