az monitor log-analytics query-pack

Manage Azure log analytics query pack.

Commands

az monitor log-analytics query-pack create

Create a log analytics query pack.

az monitor log-analytics query-pack delete

Delete a log analytics query pack.

az monitor log-analytics query-pack list

List of all log analytics query packs.

az monitor log-analytics query-pack query

Manage the query of log analytics query pack.

az monitor log-analytics query-pack query create

Create a specific query within a log analytics query pack.

az monitor log-analytics query-pack query delete

Delete a specific query defined within a log analytics query pack.

az monitor log-analytics query-pack query list

List queries defined within a log analytics query pack.

az monitor log-analytics query-pack query search

Search a list of queries defined within a log analytics query pack according to given search properties.

az monitor log-analytics query-pack query show

Show a specific query defined within a log analytics query pack.

az monitor log-analytics query-pack query update

Update a specific query within a log analytics query pack.

az monitor log-analytics query-pack show

Show a log analytics query pack.

az monitor log-analytics query-pack update

Update a log analytics query pack.

az monitor log-analytics query-pack create

Create a log analytics query pack.

az monitor log-analytics query-pack create --name
                                           --resource-group
                                           [--location]
                                           [--tags]

Examples

Create a query pack

az monitor log-analytics query-pack create -g resourceGroup -n queryPackName --location eastus2

Required Parameters

--name --query-pack-name -n

The name of the log analytics query pack.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--location -l

Resource location.

--tags

Resource tags Support shorthand-syntax, json-file and yaml-file. Try ?? to show more.

az monitor log-analytics query-pack delete

Delete a log analytics query pack.

az monitor log-analytics query-pack delete [--ids]
                                           [--name]
                                           [--resource-group]
                                           [--subscription]
                                           [--yes]

Examples

Delete a query pack

az monitor log-analytics query-pack delete-g resourceGroup -n queryPackName

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --query-pack-name -n

The name of the log analytics query pack.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

default value: False

az monitor log-analytics query-pack list

List of all log analytics query packs.

az monitor log-analytics query-pack list [--resource-group]

Examples

List query packs in a specific subscription

az monitor log-analytics query-pack list

List query packs in a specific resource group

az monitor log-analytics query-pack list -g resourceGroup

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az monitor log-analytics query-pack show

Show a log analytics query pack.

az monitor log-analytics query-pack show [--ids]
                                         [--name]
                                         [--resource-group]
                                         [--subscription]

Examples

Show a query pack

az monitor log-analytics query-pack show -g resourceGroup -n queryPackName

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --query-pack-name -n

The name of the log analytics query pack.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az monitor log-analytics query-pack update

Update a log analytics query pack.

az monitor log-analytics query-pack update [--add]
                                           [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                           [--ids]
                                           [--name]
                                           [--remove]
                                           [--resource-group]
                                           [--set]
                                           [--subscription]
                                           [--tags]

Examples

Update a query pack

az monitor log-analytics query-pack update -g resourceGroupName -n queryPackName --tags label1=value1

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --query-pack-name -n

The name of the log analytics query pack.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Resource tags Support shorthand-syntax, json-file and yaml-file. Try ?? to show more.