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
- vw_graph_queries
- graph_queries
Name | Datatype | Description |
---|---|---|
id | text | Azure resource Id |
name | text | Azure resource name. This is GUID value. The display name should be assigned within properties field. |
description | text | field from the properties object |
etag | text | This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. |
location | text | The location of the resource |
query | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resourceName | text | field from the properties object |
result_kind | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags |
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. 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 | Properties that contain a graph query. |
tags | object | Resource tags |
type | string | Azure resource type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, resourceName, subscriptionId | Get a single graph query by its resourceName. |
list | SELECT | resourceGroupName, subscriptionId | 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 | resourceGroupName, resourceName, subscriptionId | Create a new graph query. |
delete | DELETE | resourceGroupName, resourceName, subscriptionId | Delete a graph query. |
update | UPDATE | resourceGroupName, resourceName, subscriptionId | Updates a graph query that has already been added. |
SELECT
examples
Get all graph queries defined within a specified subscription.
- vw_graph_queries
- graph_queries
SELECT
id,
name,
description,
etag,
location,
query,
resourceGroupName,
resourceName,
result_kind,
subscriptionId,
tags,
time_modified,
type
FROM azure.resource_graph.vw_graph_queries
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
etag,
location,
properties,
tags,
type
FROM azure.resource_graph.graph_queries
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new graph_queries
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.resource_graph.graph_queries (
resourceGroupName,
resourceName,
subscriptionId,
location,
etag,
tags,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ subscriptionId }}',
'{{ location }}',
'{{ etag }}',
'{{ tags }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: location
value: string
- name: type
value: string
- name: etag
value: string
- name: tags
value: object
- name: properties
value:
- name: timeModified
value: string
- name: description
value: string
- name: query
value: string
- name: resultKind
value: string
UPDATE
example
Updates a graph_queries
resource.
/*+ update */
UPDATE azure.resource_graph.graph_queries
SET
tags = '{{ tags }}',
etag = '{{ etag }}',
properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified graph_queries
resource.
/*+ delete */
DELETE FROM azure.resource_graph.graph_queries
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';