licenses
Creates, updates, deletes, gets or lists a licenses resource.
Overview
| Name | licenses |
| Type | Resource |
| Id | azure.hybrid_compute.licenses |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
licenseDetails | object | Describes the properties of a License. |
licenseType | string | The type of the license resource. "ESU" (ESU) |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | The 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) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
tenantId | string | Describes the tenant id. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
licenseDetails | object | Describes the properties of a License. |
licenseType | string | The type of the license resource. "ESU" (ESU) |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | The 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) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
tenantId | string | Describes the tenant id. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
licenseDetails | object | Describes the properties of a License. |
licenseType | string | The type of the license resource. "ESU" (ESU) |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | The 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) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
tenantId | string | Describes the tenant id. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, license_name, subscription_id | Retrieves information about the view of a license. | |
list_by_resource_group | select | resource_group_name, subscription_id | The operation to get all licenses of a non-Azure machine. | |
list_by_subscription | select | subscription_id | The operation to get all licenses of a non-Azure machine. | |
create_or_update | insert | resource_group_name, license_name, subscription_id, location | The operation to create or update a license. | |
update | update | resource_group_name, license_name, subscription_id | The operation to update a license. | |
create_or_update | replace | resource_group_name, license_name, subscription_id, location | The operation to create or update a license. | |
delete | delete | resource_group_name, license_name, subscription_id | The operation to delete a license. | |
validate_license | exec | subscription_id, location | The 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.
| Name | Datatype | Description |
|---|---|---|
license_name | string | The name of the license. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_resource_group
- list_by_subscription
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
;
The operation to get all licenses of a non-Azure machine.
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 subscription_id = '{{ subscription_id }}' -- required
;
The operation to get all licenses of a non-Azure machine.
SELECT
id,
name,
licenseDetails,
licenseType,
location,
provisioningState,
systemData,
tags,
tenantId,
type
FROM azure.hybrid_compute.licenses
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: licenses
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the licenses resource.
- name: license_name
value: "{{ license_name }}"
description: Required parameter for the licenses resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the licenses resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
Hybrid Compute License properties.
value:
provisioningState: "{{ provisioningState }}"
tenantId: "{{ tenantId }}"
licenseType: "{{ licenseType }}"
licenseDetails:
state: "{{ state }}"
target: "{{ target }}"
edition: "{{ edition }}"
type: "{{ type }}"
processors: {{ processors }}
assignedLicenses: {{ assignedLicenses }}
immutableId: "{{ immutableId }}"
volumeLicenseDetails:
- programYear: "{{ programYear }}"
invoiceId: "{{ invoiceId }}"
UPDATE examples
- update
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
- create_or_update
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
- delete
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
- validate_license
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 }}"
}'
;