az graph shared-query

Manage shared query of Azure resource graph.

Commands

az graph shared-query create

Create a shared query.

az graph shared-query delete

Delete a shared query.

az graph shared-query list

List all shared query in a resource group.

az graph shared-query show

Show the properties of a shared query.

az graph shared-query create

Create a shared query.

az graph shared-query create --description
                             --graph-query
                             --name
                             --resource-group
                             [--tags]

Examples

Create a shared query requesting a subset of resource fields.

az graph shared-query create -g MyResourceGroup -n MySharedQuery -q "project id, name, type, location, tags" -d "requesting a subset of resource fields." --tags key=value

Required Parameters

--description -d

Description of the graph shared query.

--graph-query --q -q

Resource Graph query to execute.

--name -n

Name of the graph shared query.

--resource-group -g

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

Optional Parameters

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

az graph shared-query delete

Delete a shared query.

az graph shared-query delete --name
                             --resource-group

Required Parameters

--name -n

Name of the graph shared query.

--resource-group -g

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

az graph shared-query list

List all shared query in a resource group.

az graph shared-query list --resource-group

Examples

List all shared query in a resource group.

az graph shared-query list -g MyResourceGroup

Required Parameters

--resource-group -g

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

az graph shared-query show

Show the properties of a shared query.

az graph shared-query show --name
                           --resource-group

Required Parameters

--name -n

Name of the graph shared query.

--resource-group -g

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