Skip to main content

datacenter_vm_licenseds

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

Overview​

Namedatacenter_vm_licenseds
TypeResource
Idovh.dedicated_cloud.datacenter_vm_licenseds

Fields​

The following fields are returned by SELECT queries:

A structure describing the licensing of a virtual machine

NameDatatypeDescription
namestringVirtual machine name
vm_idintegerVirtual machine identifier (wire: vmId)
guest_os_familystringGuest Operating System reported by VMware tools (wire: guestOsFamily)
licensestringAttached SPLA licensing (OVHcloud managed, unknown or unsupported license, unlicensed windows guestos, windows 2008 R2 Datacenter, windows 2008 R2 Enterprise, windows 2008 R2 Standard, windows 2008 R2 Web, windows 2012 Datacenter, windows 2012 R2 Datacenter, windows 2012 R2 Standard, windows 2012 R2 Standard SQL2016 Standard, windows 2012 R2 Standard SQL2016 Web, windows 2012 Standard, windows 2016 Datacenter, windows 2016 Standard, windows 2016 Standard SQL2016 Standard, windows 2016 Standard SQL2016 Web, windows 2019 Datacenter, windows 2019 Datacenter Core, windows 2019 Standard, windows 2019 Standard Core, windows 2019 Standard SQL2019 Standard, windows 2019 Standard SQL2019 Web, windows 2019 Standard SQL2022 Standard, windows 2019 Standard SQL2022 Web, windows 2022 Datacenter, windows 2022 Datacenter Core, windows 2022 Datacenter SQL2019 Standard, windows 2022 Datacenter SQL2019 Web, windows 2022 Datacenter SQL2022 Standard, windows 2022 Datacenter SQL2022 Web, windows 2022 Standard, windows 2022 Standard Core, windows 2022 Standard SQL2019 Standard, windows 2022 Standard SQL2019 Web, windows 2022 Standard SQL2022 Standard, windows 2022 Standard SQL2022 Web, windows 2025 Datacenter, windows 2025 Datacenter Core, windows 2025 Datacenter SQL2022 Enterprise, windows 2025 Datacenter SQL2022 Standard, windows 2025 Datacenter SQL2022 Web, windows 2025 Standard, windows 2025 Standard Core, windows 2025 Standard SQL2022 Standard, windows 2025 Standard SQL2022 Web)
mo_refstringVMware Managed object Reference identifier (wire: moRef)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectdatacenter_id, service_namekms_licenseList licensed VMs. Returns the virtual machines with a managed license, with their guest OS and license. Filter by license with kmsLicense.

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"}})
datacenter_idintegerId of the Datacenter (wire: datacenterId)
service_namestringDomain of the service (wire: serviceName)
kms_licensestringOnly display virtual machines with this license (wire: kmsLicense)

SELECT examples​

List licensed VMs. Returns the virtual machines with a managed license, with their guest OS and license. Filter by license with kmsLicense.

SELECT
name,
vm_id,
guest_os_family,
license,
mo_ref
FROM ovh.dedicated_cloud.datacenter_vm_licenseds
WHERE datacenter_id = '{{ datacenter_id }}' -- required
AND service_name = '{{ service_name }}' -- required
AND kms_license = '{{ kms_license }}'
;