sub_accounts
Creates, updates, deletes, gets or lists a sub_accounts resource.
Overview​
| Name | sub_accounts |
| Type | Resource |
| Id | ovh.me.sub_accounts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | This sub-account id |
creation_date | string (date-time) | Creation date (wire: creationDate) |
description | string | This sub-account description |
Sub Account
| Name | Datatype | Description |
|---|---|---|
id | integer | This sub-account id |
creation_date | string (date-time) | Creation date (wire: creationDate) |
description | string | This sub-account description |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id | Get this object properties | |
list | select | x_pagination_mode | List of sub-accounts | |
create | insert | Create a new sub-account | ||
update | update | id | Alter this object properties | |
create_consumer_key | exec | id | Create 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.
| 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"}}) |
id | integer | Id of the object |
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
Get this object properties
SELECT
id,
creation_date,
description
FROM ovh.me.sub_accounts
WHERE id = '{{ id }}' -- required
;
List of sub-accounts
SELECT
id,
creation_date,
description
FROM ovh.me.sub_accounts
WHERE x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a new sub-account
INSERT INTO ovh.me.sub_accounts (
description
)
SELECT
'{{ description }}'
;
# Description fields are for documentation purposes
- name: sub_accounts
props:
- name: description
value: "{{ description }}"
description: |
Description of the new sub-account
UPDATE examples​
- update
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_consumer_key
Create a consumer key for the current application
EXEC ovh.me.sub_accounts.create_consumer_key
@id='{{ id }}' --required
;