Skip to main content

sub_accounts

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

Overview​

Namesub_accounts
TypeResource
Idovh.me.sub_accounts

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerThis sub-account id
creation_datestring (date-time)Creation date (wire: creationDate)
descriptionstringThis sub-account description

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectidGet this object properties
listselectx_pagination_modeList of sub-accounts
createinsertCreate a new sub-account
updateupdateidAlter this object properties
create_consumer_keyexecidCreate a consumer key for the current application

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"}})
idintegerId of the object
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
id,
creation_date,
description
FROM ovh.me.sub_accounts
WHERE id = '{{ id }}' -- required
;

INSERT examples​

Create a new sub-account

INSERT INTO ovh.me.sub_accounts (
description
)
SELECT
'{{ description }}'
;

UPDATE examples​

Alter this object properties

UPDATE ovh.me.sub_accounts
SET
description = '{{ description }}'
WHERE
id = '{{ id }}' --required;

Lifecycle Methods​

EXEC variables use wire (API) names.

Create a consumer key for the current application

EXEC ovh.me.sub_accounts.create_consumer_key
@id='{{ id }}' --required
;