query_packs
Creates, updates, deletes, gets or lists a query_packs
resource.
Overview
Name | query_packs |
Type | Resource |
Id | azure.log_analytics.query_packs |
Fields
- vw_query_packs
- query_packs
Name | Datatype | Description |
---|---|---|
id | text | Azure resource Id |
name | text | Azure resource name |
location | text | Resource location |
provisioning_state | text | field from the properties object |
queryPackName | text | field from the properties object |
query_pack_id | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags |
time_created | text | field from the properties object |
time_modified | text | field from the properties object |
type | text | Azure resource type |
Name | Datatype | Description |
---|---|---|
id | string | Azure resource Id |
name | string | Azure resource name |
location | string | Resource location |
properties | object | Properties that define a Log Analytics QueryPack resource. |
tags | object | Resource tags |
type | string | Azure resource type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | queryPackName, resourceGroupName, subscriptionId | Returns a Log Analytics QueryPack. |
list | SELECT | subscriptionId | Gets a list of all Log Analytics QueryPacks within a subscription. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Gets a list of Log Analytics QueryPacks within a resource group. |
create_or_update | INSERT | queryPackName, resourceGroupName, subscriptionId, data__properties | Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. |
delete | DELETE | queryPackName, resourceGroupName, subscriptionId | Deletes a Log Analytics QueryPack. |
update_tags | EXEC | queryPackName, resourceGroupName, subscriptionId | Updates 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.
- vw_query_packs
- query_packs
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 }}';
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.log_analytics.query_packs
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new query_packs
resource.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: queryPackId
value: string
- name: timeCreated
value: string
- name: timeModified
value: string
- name: provisioningState
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
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 }}';