Skip to main content

query_packs

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

Overview

Namequery_packs
TypeResource
Idazure.log_analytics.query_packs

Fields

NameDatatypeDescription
idtextAzure resource Id
nametextAzure resource name
locationtextResource location
provisioning_statetextfield from the properties object
queryPackNametextfield from the properties object
query_pack_idtextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags
time_createdtextfield from the properties object
time_modifiedtextfield from the properties object
typetextAzure resource type

Methods

NameAccessible byRequired ParamsDescription
getSELECTqueryPackName, resourceGroupName, subscriptionIdReturns a Log Analytics QueryPack.
listSELECTsubscriptionIdGets a list of all Log Analytics QueryPacks within a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGets a list of Log Analytics QueryPacks within a resource group.
create_or_updateINSERTqueryPackName, resourceGroupName, subscriptionId, data__propertiesCreates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation.
deleteDELETEqueryPackName, resourceGroupName, subscriptionIdDeletes a Log Analytics QueryPack.
update_tagsEXECqueryPackName, resourceGroupName, subscriptionIdUpdates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method.

SELECT examples

Gets a list of all Log Analytics QueryPacks within a subscription.

SELECT
id,
name,
location,
provisioning_state,
queryPackName,
query_pack_id,
resourceGroupName,
subscriptionId,
tags,
time_created,
time_modified,
type
FROM azure.log_analytics.vw_query_packs
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new query_packs resource.

/*+ create */
INSERT INTO azure.log_analytics.query_packs (
queryPackName,
resourceGroupName,
subscriptionId,
data__properties,
properties,
location,
tags
)
SELECT
'{{ queryPackName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}'
;

DELETE example

Deletes the specified query_packs resource.

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