Skip to main content

billing_groups

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

Overview​

Namebilling_groups
TypeResource
Idovh.me.billing_groups

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringBilling group unique name
contact_idintegerContact ID from /me/contact (wire: contactId)
group_idintegerBilling group ID (wire: groupId)
payment_method_idintegerPayment method ID associated to the billing group (wire: paymentMethodId)
creation_datestring (date-time)Creation date (wire: creationDate)
last_updatestring (date-time)Last update date (wire: lastUpdate)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectgroup_idRetrieve information about a billing group (Beta version)
listselectname, service_id, x_pagination_modeRetrieve all billing groups (Beta version)
createinsertCreate a new billing group (Beta version)
updateupdategroup_idEdit billing group (Beta version)
deletedeletegroup_idDelete 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.

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"}})
group_idintegerGroup ID (wire: groupId)
namestringFilter by name
service_idintegerFilter by Service ID (wire: serviceId)
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​

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
;

INSERT examples​

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
;

UPDATE examples​

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 a billing group (Beta version)

DELETE FROM ovh.me.billing_groups
WHERE group_id = '{{ group_id }}' --required
;