Skip to main content

licenses

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

Overview​

Namelicenses
TypeResource
Idovh.license_directadmin.licenses

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
client_idintegerThe client id on license provider side (wire: clientId)
license_idstringThe license id on license provider side (wire: licenseId)
creationstring (date-time)This license creation date
delete_at_expirationbooleanShall we delete this on expiration ? (wire: deleteAtExpiration)
domainstringThe internal name of your license
iamobjectIAM resource metadata
ipstring (ipv4)The ip on which this license is attached (example: 192.0.2.0)
osstringThis license operating system (CentOs_5.0_32, CentOs_5.0_64, CentOs_6_32, CentOs_6_64, CentOs_7_64, CentOs_8_64, Debian_10.0_64, Debian_11.0_64, Debian_5.0_32, Debian_5.0_64, Debian_6.0_32, Debian_6.0_64, Debian_7.0_64, Debian_8.0_64, Debian_9.0_64, FreeBSD_11.x_64, FreeBSD_12.x_64, FreeBSD_7.x_32, FreeBSD_7.x_64, FreeBSD_8.x_64, FreeBSD_9.x_64)
statusstringThis license state (ok, released, terminated, toDeliver)
versionstringThis license version (DIRECTADMIN_1, directadmin-license)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameGet this object properties
listselectiam_tags, x_pagination_modeList available services
updateupdateservice_nameAlter this object properties
change_ipexecserviceName, destinationIpMove this license to another Ip
change_osexecserviceName, osChange the Operating System for a license
confirm_terminationexecserviceName, tokenConfirm service termination. Terminates the service with the token sent by email to the admin contact. A reason, a future use and a comment can be given.
terminateexecserviceNameRequest service termination. Starts the termination of the service. The admin contact receives a token by email, to confirm with the confirmTermination call.

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"}})
serviceNamestringThe name of your DirectAdmin license
service_namestringThe name of your DirectAdmin license (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​

Get this object properties

SELECT
client_id,
license_id,
creation,
delete_at_expiration,
domain,
iam,
ip,
os,
status,
version
FROM ovh.license_directadmin.licenses
WHERE service_name = '{{ service_name }}' -- required
;

UPDATE examples​

Alter this object properties

UPDATE ovh.license_directadmin.licenses
SET
delete_at_expiration = {{ delete_at_expiration }},
os = '{{ os }}'
WHERE
service_name = '{{ service_name }}' --required;

Lifecycle Methods​

EXEC variables use wire (API) names.

Move this license to another Ip

EXEC ovh.license_directadmin.licenses.change_ip
@serviceName='{{ serviceName }}' --required
@@json=
'{
"destinationIp": "{{ destinationIp }}"
}'
;