scheduled_query_rules
Creates, updates, deletes, gets or lists a scheduled_query_rules
resource.
Overview
Name | scheduled_query_rules |
Type | Resource |
Id | azure.monitor.scheduled_query_rules |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list_by_subscription
Successful request to get a scheduled query rule
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
etag | string | The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
identity | object | Identity for the resource. |
kind | string | Indicates the type of scheduled query rule. The default is LogAlert. |
location | string | The geo-location where the resource lives |
properties | object | The rule properties of the resource. |
systemData | object | SystemData of ScheduledQueryRule. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Successful request for a list of scheduled query rules
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
etag | string | The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
identity | object | Identity for the resource. |
kind | string | Indicates the type of scheduled query rule. The default is LogAlert. |
location | string | The geo-location where the resource lives |
properties | object | The rule properties of the resource. |
systemData | object | SystemData of ScheduledQueryRule. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Successful request for a list of scheduled query rules
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
etag | string | The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. |
identity | object | Identity for the resource. |
kind | string | Indicates the type of scheduled query rule. The default is LogAlert. |
location | string | The geo-location where the resource lives |
properties | object | The rule properties of the resource. |
systemData | object | SystemData of ScheduledQueryRule. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , ruleName | Retrieve an scheduled query rule definition. | |
list_by_resource_group | select | subscriptionId , resourceGroupName | Retrieve scheduled query rule definitions in a resource group. | |
list_by_subscription | select | subscriptionId | Retrieve a scheduled query rule definitions in a subscription. | |
create_or_update | insert | subscriptionId , resourceGroupName , ruleName , data__properties , data__location | Creates or updates a scheduled query rule. | |
update | update | subscriptionId , resourceGroupName , ruleName | Update a scheduled query rule. | |
delete | delete | subscriptionId , resourceGroupName , ruleName | Deletes a scheduled query rule. | |
reconcile_nsp | exec | subscriptionId , resourceGroupName , ruleName , networkSecurityPerimeterConfigurationName | Reconcile network security perimeter configuration for ScheduledQueryRule resource. |
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 |
---|---|---|
networkSecurityPerimeterConfigurationName | string | The name for a network security perimeter configuration |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
ruleName | string | The name of the rule. |
subscriptionId | string | The ID of the target subscription. |
SELECT
examples
- get
- list_by_resource_group
- list_by_subscription
Retrieve an scheduled query rule definition.
SELECT
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type
FROM azure.monitor.scheduled_query_rules
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND ruleName = '{{ ruleName }}' -- required
;
Retrieve scheduled query rule definitions in a resource group.
SELECT
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type
FROM azure.monitor.scheduled_query_rules
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
;
Retrieve a scheduled query rule definitions in a subscription.
SELECT
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type
FROM azure.monitor.scheduled_query_rules
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Creates or updates a scheduled query rule.
INSERT INTO azure.monitor.scheduled_query_rules (
data__identity,
data__tags,
data__location,
data__kind,
data__properties,
subscriptionId,
resourceGroupName,
ruleName
)
SELECT
'{{ identity }}',
'{{ tags }}',
'{{ location }}' /* required */,
'{{ kind }}',
'{{ properties }}' /* required */,
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ ruleName }}'
RETURNING
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: scheduled_query_rules
props:
- name: subscriptionId
value: string
description: Required parameter for the scheduled_query_rules resource.
- name: resourceGroupName
value: string
description: Required parameter for the scheduled_query_rules resource.
- name: ruleName
value: string
description: Required parameter for the scheduled_query_rules resource.
- name: identity
value: object
description: |
Identity for the resource.
- name: tags
value: object
description: |
Resource tags.
- name: location
value: string
description: |
The geo-location where the resource lives
- name: kind
value: string
description: |
Indicates the type of scheduled query rule. The default is LogAlert.
valid_values: ['LogAlert', 'LogToMetric']
- name: properties
value: object
description: |
The rule properties of the resource.
UPDATE
examples
- update
Update a scheduled query rule.
UPDATE azure.monitor.scheduled_query_rules
SET
data__identity = '{{ identity }}',
data__tags = '{{ tags }}',
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND ruleName = '{{ ruleName }}' --required
RETURNING
id,
name,
etag,
identity,
kind,
location,
properties,
systemData,
tags,
type;
DELETE
examples
- delete
Deletes a scheduled query rule.
DELETE FROM azure.monitor.scheduled_query_rules
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND ruleName = '{{ ruleName }}' --required
;
Lifecycle Methods
- reconcile_nsp
Reconcile network security perimeter configuration for ScheduledQueryRule resource.
EXEC azure.monitor.scheduled_query_rules.reconcile_nsp
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@ruleName='{{ ruleName }}' --required,
@networkSecurityPerimeterConfigurationName='{{ networkSecurityPerimeterConfigurationName }}' --required
;