licenses
Creates, updates, deletes, gets or lists a licenses resource.
Overview​
| Name | licenses |
| Type | Resource |
| Id | ovh.license_office.licenses |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
display_name | string | Tenant's display name (wire: displayName) |
first_name | string | Contact's first name (wire: firstName) |
last_name | string | Contact's last name (wire: lastName) |
service_name | string | Internal service name (wire: serviceName) |
address | string | Contact's address line |
city | string | Contact's city |
creation_date | string (date-time) | Creation date (wire: creationDate) |
iam | object | IAM resource metadata |
mca_agreed | boolean | MCA acceptance status (wire: mcaAgreed) |
phone | string (phone-number) | Primary phone number |
service_type | string | Tenant's service type (payAsYouGo, prepaid) (wire: serviceType) |
status | string | Tenant's status (creating, inMaintenance, ok, reopening, suspended, suspending) |
zip_code | string | Contact's zip code (wire: zipCode) |
Office tenant
| Name | Datatype | Description |
|---|---|---|
display_name | string | Tenant's display name (wire: displayName) |
first_name | string | Contact's first name (wire: firstName) |
last_name | string | Contact's last name (wire: lastName) |
service_name | string | Internal service name (wire: serviceName) |
address | string | Contact's address line |
city | string | Contact's city |
creation_date | string (date-time) | Creation date (wire: creationDate) |
iam | object | IAM resource metadata |
mca_agreed | boolean | MCA acceptance status (wire: mcaAgreed) |
phone | string (phone-number) | Primary phone number |
service_type | string | Tenant's service type (payAsYouGo, prepaid) (wire: serviceType) |
status | string | Tenant's status (creating, inMaintenance, ok, reopening, suspended, suspending) |
zip_code | string | Contact's zip code (wire: zipCode) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name | 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) | |
list | select | iam_tags, x_pagination_mode | Returns the service names of the tenants. (Alpha version) | |
update | update | service_name | Updates 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.
| 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"}}) |
service_name | string | Service name (wire: serviceName) |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
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
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
;
Returns the service names of the tenants. (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 iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
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;