graph_queries
Creates, updates, deletes, gets or lists a graph_queries
resource.
Overview
Name | graph_queries |
Type | Resource |
Id | azure.resource_graph.graph_queries |
Fields
The following fields are returned by SELECT
queries:
- get
- list
- list_by_subscription
A graph query definition.
Name | Datatype | Description |
---|---|---|
id | string | Azure resource Id |
name | string | Azure resource name. This is GUID value. The display name should be assigned within properties field. |
etag | string | This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. |
location | string | The location of the resource |
properties | object | Metadata describing a graph query for an Azure resource. |
tags | object | Resource tags |
type | string | Azure resource type |
A list containing 0 or more graph queries.
Name | Datatype | Description |
---|---|---|
id | string | Azure resource Id |
name | string | Azure resource name. This is GUID value. The display name should be assigned within properties field. |
etag | string | This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. |
location | string | The location of the resource |
properties | object | Metadata describing a graph query for an Azure resource. |
tags | object | Resource tags |
type | string | Azure resource type |
A list containing 0 or more graph queries.
Name | Datatype | Description |
---|---|---|
id | string | Azure resource Id |
name | string | Azure resource name. This is GUID value. The display name should be assigned within properties field. |
etag | string | This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. |
location | string | The location of the resource |
properties | object | Metadata describing a graph query for an Azure resource. |
tags | object | Resource tags |
type | string | Azure resource type |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , resourceName | Get a single graph query by its resourceName. | |
list | select | subscriptionId , resourceGroupName | Get all graph queries defined within a specified subscription and resource group. | |
list_by_subscription | select | subscriptionId | Get all graph queries defined within a specified subscription. | |
create_or_update | insert | subscriptionId , resourceGroupName , resourceName | Create a new graph query. | |
update | update | subscriptionId , resourceGroupName , resourceName | Updates a graph query that has already been added. | |
delete | delete | subscriptionId , resourceGroupName , resourceName | Delete a graph query. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
resourceGroupName | string | The name of the resource group. |
resourceName | string | The name of the Graph Query resource. |
subscriptionId | string | The Azure subscription Id. |
SELECT
examples
- get
- list
- list_by_subscription
Get a single graph query by its resourceName.
SELECT
id,
name,
etag,
location,
properties,
tags,
type
FROM azure.resource_graph.graph_queries
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND resourceName = '{{ resourceName }}' -- required
;
Get all graph queries defined within a specified subscription and resource group.
SELECT
id,
name,
etag,
location,
properties,
tags,
type
FROM azure.resource_graph.graph_queries
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
;
Get all graph queries defined within a specified subscription.
SELECT
id,
name,
etag,
location,
properties,
tags,
type
FROM azure.resource_graph.graph_queries
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Create a new graph query.
INSERT INTO azure.resource_graph.graph_queries (
data__location,
data__etag,
data__tags,
data__properties,
subscriptionId,
resourceGroupName,
resourceName
)
SELECT
'{{ location }}',
'{{ etag }}',
'{{ tags }}',
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ resourceName }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;
# Description fields are for documentation purposes
- name: graph_queries
props:
- name: subscriptionId
value: string
description: Required parameter for the graph_queries resource.
- name: resourceGroupName
value: string
description: Required parameter for the graph_queries resource.
- name: resourceName
value: string
description: Required parameter for the graph_queries resource.
- name: location
value: string
description: |
The location of the resource
- name: etag
value: string
description: |
This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict.
- name: tags
value: object
description: |
Resource tags
- name: properties
value: object
description: |
Metadata describing a graph query for an Azure resource.
UPDATE
examples
- update
Updates a graph query that has already been added.
UPDATE azure.resource_graph.graph_queries
SET
data__tags = '{{ tags }}',
data__etag = '{{ etag }}',
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND resourceName = '{{ resourceName }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;
DELETE
examples
- delete
Delete a graph query.
DELETE FROM azure.resource_graph.graph_queries
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND resourceName = '{{ resourceName }}' --required
;