Skip to main content

alert_rule_resources

Creates, updates, deletes, gets or lists an alert_rule_resources resource.

Overview

Namealert_rule_resources
TypeResource
Idazure.db_watcher.alert_rule_resources

Fields

The following fields are returned by SELECT queries:

Azure operation completed successfully.

NameDatatypeDescription
propertiesobjectThe resource-specific properties for this resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, watcherName, alertRuleResourceNameGet a AlertRuleResource
list_by_parentselectsubscriptionId, resourceGroupName, watcherNameList AlertRuleResource resources by Watcher
create_or_updateinsertsubscriptionId, resourceGroupName, watcherName, alertRuleResourceNameCreate a AlertRuleResource
deletedeletesubscriptionId, resourceGroupName, watcherName, alertRuleResourceNameDelete a AlertRuleResource

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.

NameDatatypeDescription
alertRuleResourceNamestringThe alert rule proxy resource name.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
watcherNamestringThe database watcher name.

SELECT examples

Get a AlertRuleResource

SELECT
properties
FROM azure.db_watcher.alert_rule_resources
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND watcherName = '{{ watcherName }}' -- required
AND alertRuleResourceName = '{{ alertRuleResourceName }}' -- required
;

INSERT examples

Create a AlertRuleResource

INSERT INTO azure.db_watcher.alert_rule_resources (
data__properties,
subscriptionId,
resourceGroupName,
watcherName,
alertRuleResourceName
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ watcherName }}',
'{{ alertRuleResourceName }}'
RETURNING
properties
;

DELETE examples

Delete a AlertRuleResource

DELETE FROM azure.db_watcher.alert_rule_resources
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND watcherName = '{{ watcherName }}' --required
AND alertRuleResourceName = '{{ alertRuleResourceName }}' --required
;