Skip to main content

queries

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

Overview

Namequeries
TypeResource
Idazure.log_analytics.queries

Fields

NameDatatypeDescription
idtextAzure resource Id
nametextAzure resource name
descriptiontextfield from the properties object
authortextfield from the properties object
bodytextfield from the properties object
display_nametextfield from the properties object
propertiestextProperties that define an Log Analytics QueryPack-Query resource.
queryPackNametextfield from the properties object
relatedtextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextfield from the properties object
time_createdtextfield from the properties object
time_modifiedtextfield from the properties object
typetextAzure resource type

Methods

NameAccessible byRequired ParamsDescription
getSELECTid, queryPackName, resourceGroupName, subscriptionIdGets a specific Log Analytics Query defined within a Log Analytics QueryPack.
listSELECTqueryPackName, resourceGroupName, subscriptionIdGets a list of Queries defined within a Log Analytics QueryPack.
deleteDELETEid, queryPackName, resourceGroupName, subscriptionIdDeletes a specific Query defined within an Log Analytics QueryPack.
updateUPDATEid, queryPackName, resourceGroupName, subscriptionIdAdds or Updates a specific Query within a Log Analytics QueryPack.
putREPLACEid, queryPackName, resourceGroupName, subscriptionIdAdds or Updates a specific Query within a Log Analytics QueryPack.
searchEXECqueryPackName, resourceGroupName, subscriptionIdSearch a list of Queries defined within a Log Analytics QueryPack according to given search properties.

SELECT examples

Gets a list of Queries defined within a Log Analytics QueryPack.

SELECT
id,
name,
description,
author,
body,
display_name,
properties,
queryPackName,
related,
resourceGroupName,
subscriptionId,
system_data,
tags,
time_created,
time_modified,
type
FROM azure.log_analytics.vw_queries
WHERE queryPackName = '{{ queryPackName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

UPDATE example

Updates a queries resource.

/*+ update */
UPDATE azure.log_analytics.queries
SET
properties = '{{ properties }}'
WHERE
id = '{{ id }}'
AND queryPackName = '{{ queryPackName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

REPLACE example

Replaces all fields in the specified queries resource.

/*+ update */
REPLACE azure.log_analytics.queries
SET
properties = '{{ properties }}'
WHERE
id = '{{ id }}'
AND queryPackName = '{{ queryPackName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified queries resource.

/*+ delete */
DELETE FROM azure.log_analytics.queries
WHERE id = '{{ id }}'
AND queryPackName = '{{ queryPackName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';