billing_groups
Creates, updates, deletes, gets or lists a billing_groups resource.
Overview​
| Name | billing_groups |
| Type | Resource |
| Id | ovh.me.billing_groups |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Billing group unique name |
contact_id | integer | Contact ID from /me/contact (wire: contactId) |
group_id | integer | Billing group ID (wire: groupId) |
payment_method_id | integer | Payment method ID associated to the billing group (wire: paymentMethodId) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
last_update | string (date-time) | Last update date (wire: lastUpdate) |
Missing description
| Name | Datatype | Description |
|---|---|---|
name | string | Billing group unique name |
contact_id | integer | Contact ID from /me/contact (wire: contactId) |
group_id | integer | Billing group ID (wire: groupId) |
payment_method_id | integer | Payment method ID associated to the billing group (wire: paymentMethodId) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
last_update | string (date-time) | Last update date (wire: lastUpdate) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | group_id | Retrieve information about a billing group (Beta version) | |
list | select | name, service_id, x_pagination_mode | Retrieve all billing groups (Beta version) | |
create | insert | Create a new billing group (Beta version) | ||
update | update | group_id | Edit billing group (Beta version) | |
delete | delete | group_id | Delete a billing group (Beta version) |
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"}}) |
group_id | integer | Group ID (wire: groupId) |
name | string | Filter by name |
service_id | integer | Filter by Service ID (wire: serviceId) |
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
Retrieve information about a billing group (Beta version)
SELECT
name,
contact_id,
group_id,
payment_method_id,
creation_date,
last_update
FROM ovh.me.billing_groups
WHERE group_id = '{{ group_id }}' -- required
;
Retrieve all billing groups (Beta version)
SELECT
name,
contact_id,
group_id,
payment_method_id,
creation_date,
last_update
FROM ovh.me.billing_groups
WHERE name = '{{ name }}'
AND service_id = '{{ service_id }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a new billing group (Beta version)
INSERT INTO ovh.me.billing_groups (
contact_id,
name,
payment_method_id
)
SELECT
{{ contact_id }},
'{{ name }}',
{{ payment_method_id }}
RETURNING
name,
contact_id,
group_id,
payment_method_id,
creation_date,
last_update
;
# Description fields are for documentation purposes
- name: billing_groups
props:
- name: contact_id
value: {{ contact_id }}
description: |
Contact ID from /me/contact
- name: name
value: "{{ name }}"
description: |
Billing group unique name
- name: payment_method_id
value: {{ payment_method_id }}
description: |
Payment method ID associated to the billing group
UPDATE examples​
- update
Edit billing group (Beta version)
UPDATE ovh.me.billing_groups
SET
contact_id = {{ contact_id }},
name = '{{ name }}',
payment_method_id = {{ payment_method_id }}
WHERE
group_id = '{{ group_id }}' --required;
DELETE examples​
- delete
Delete a billing group (Beta version)
DELETE FROM ovh.me.billing_groups
WHERE group_id = '{{ group_id }}' --required
;