Skip to main content

licenses

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

Overview​

Namelicenses
TypeResource
Idovh.license_office.licenses

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
display_namestringTenant's display name (wire: displayName)
first_namestringContact's first name (wire: firstName)
last_namestringContact's last name (wire: lastName)
service_namestringInternal service name (wire: serviceName)
addressstringContact's address line
citystringContact's city
creation_datestring (date-time)Creation date (wire: creationDate)
iamobjectIAM resource metadata
mca_agreedbooleanMCA acceptance status (wire: mcaAgreed)
phonestring (phone-number)Primary phone number
service_typestringTenant's service type (payAsYouGo, prepaid) (wire: serviceType)
statusstringTenant's status (creating, inMaintenance, ok, reopening, suspended, suspending)
zip_codestringContact's zip code (wire: zipCode)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameReturns the display name, contact details, service type, status and creation date of the tenant, and whether the Microsoft Customer Agreement (MCA) is accepted. (Alpha version)
listselectiam_tags, x_pagination_modeReturns the service names of the tenants. (Alpha version)
updateupdateservice_nameUpdates the display name and the contact details of the tenant: first name, last name, address, zip code, city and phone number. (Alpha 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"}})
service_namestringService name (wire: serviceName)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
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​

Returns the display name, contact details, service type, status and creation date of the tenant, and whether the Microsoft Customer Agreement (MCA) is accepted. (Alpha version)

SELECT
display_name,
first_name,
last_name,
service_name,
address,
city,
creation_date,
iam,
mca_agreed,
phone,
service_type,
status,
zip_code
FROM ovh.license_office.licenses
WHERE service_name = '{{ service_name }}' -- required
;

UPDATE examples​

Updates the display name and the contact details of the tenant: first name, last name, address, zip code, city and phone number. (Alpha version)

UPDATE ovh.license_office.licenses
SET
address = '{{ address }}',
city = '{{ city }}',
display_name = '{{ display_name }}',
first_name = '{{ first_name }}',
last_name = '{{ last_name }}',
mca_agreed = {{ mca_agreed }},
phone = '{{ phone }}',
zip_code = '{{ zip_code }}'
WHERE
service_name = '{{ service_name }}' --required;