Skip to main content

licenses

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

Overview

Namelicenses
TypeResource
Idazure.hybrid_compute.licenses

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
licenseDetailsobjectDescribes the properties of a License.
licenseTypestringThe type of the license resource. "ESU" (ESU)
locationstringThe geo-location where the resource lives. Required.
provisioningStatestringThe provisioning state, which only appears in the response. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Accepted", "Canceled", and "Deleted". (Creating, Updating, Deleting, Succeeded, Failed, Accepted, Canceled, Deleted)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
tenantIdstringDescribes the tenant id.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, license_name, subscription_idRetrieves information about the view of a license.
list_by_resource_groupselectresource_group_name, subscription_idThe operation to get all licenses of a non-Azure machine.
list_by_subscriptionselectsubscription_idThe operation to get all licenses of a non-Azure machine.
create_or_updateinsertresource_group_name, license_name, subscription_id, locationThe operation to create or update a license.
updateupdateresource_group_name, license_name, subscription_idThe operation to update a license.
create_or_updatereplaceresource_group_name, license_name, subscription_id, locationThe operation to create or update a license.
deletedeleteresource_group_name, license_name, subscription_idThe operation to delete a license.
validate_licenseexecsubscription_id, locationThe operation to validate a license.

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
license_namestringThe name of the license. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Retrieves information about the view of a license.

SELECT
id,
name,
licenseDetails,
licenseType,
location,
provisioningState,
systemData,
tags,
tenantId,
type
FROM azure.hybrid_compute.licenses
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND license_name = '{{ license_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

The operation to create or update a license.

INSERT INTO azure.hybrid_compute.licenses (
tags,
location,
properties,
resource_group_name,
license_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ license_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

The operation to update a license.

UPDATE azure.hybrid_compute.licenses
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND license_name = '{{ license_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

REPLACE examples

The operation to create or update a license.

REPLACE azure.hybrid_compute.licenses
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND license_name = '{{ license_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

The operation to delete a license.

DELETE FROM azure.hybrid_compute.licenses
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND license_name = '{{ license_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

The operation to validate a license.

EXEC azure.hybrid_compute.licenses.validate_license 
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"tags": "{{ tags }}",
"location": "{{ location }}",
"properties": "{{ properties }}"
}'
;