alert_rule_resources
Creates, updates, deletes, gets or lists a alert_rule_resources
resource.
Overview
Name | alert_rule_resources |
Type | Resource |
Id | azure.db_watcher.alert_rule_resources |
Fields
- vw_alert_rule_resources
- alert_rule_resources
Name | Datatype | Description |
---|---|---|
alertRuleResourceName | text | field from the properties object |
alert_rule_resource_id | text | field from the properties object |
alert_rule_template_id | text | field from the properties object |
alert_rule_template_version | text | field from the properties object |
created_with_properties | text | field from the properties object |
creation_time | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
watcherName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The generic properties of the alert rule proxy resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | alertRuleResourceName, resourceGroupName, subscriptionId, watcherName | Get a AlertRuleResource |
list_by_parent | SELECT | resourceGroupName, subscriptionId, watcherName | List AlertRuleResource resources by Watcher |
create_or_update | INSERT | alertRuleResourceName, resourceGroupName, subscriptionId, watcherName | Create a AlertRuleResource |
delete | DELETE | alertRuleResourceName, resourceGroupName, subscriptionId, watcherName | Delete a AlertRuleResource |
SELECT
examples
List AlertRuleResource resources by Watcher
- vw_alert_rule_resources
- alert_rule_resources
SELECT
alertRuleResourceName,
alert_rule_resource_id,
alert_rule_template_id,
alert_rule_template_version,
created_with_properties,
creation_time,
provisioning_state,
resourceGroupName,
subscriptionId,
watcherName
FROM azure.db_watcher.vw_alert_rule_resources
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND watcherName = '{{ watcherName }}';
SELECT
properties
FROM azure.db_watcher.alert_rule_resources
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND watcherName = '{{ watcherName }}';
INSERT
example
Use the following StackQL query and manifest file to create a new alert_rule_resources
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.db_watcher.alert_rule_resources (
alertRuleResourceName,
resourceGroupName,
subscriptionId,
watcherName,
properties
)
SELECT
'{{ alertRuleResourceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ watcherName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: alertRuleResourceId
value: string
- name: createdWithProperties
value: []
- name: creationTime
value: string
- name: provisioningState
value: []
- name: alertRuleTemplateId
value: string
- name: alertRuleTemplateVersion
value: string
DELETE
example
Deletes the specified alert_rule_resources
resource.
/*+ delete */
DELETE FROM azure.db_watcher.alert_rule_resources
WHERE alertRuleResourceName = '{{ alertRuleResourceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND watcherName = '{{ watcherName }}';