Skip to main content

alert_rule_resources

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

Overview

Namealert_rule_resources
TypeResource
Idazure.database_watcher.alert_rule_resources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
namestringThe name of the resource.
alertRuleResourceIdstringThe resource ID of the alert rule resource. Required.
alertRuleTemplateIdstringThe template ID associated with alert rule resource. Required.
alertRuleTemplateVersionstringThe alert rule template version. Required.
createdWithPropertiesstringThe properties with which the alert rule resource was created. Required. Known values are: "CreatedWithActionGroup" and "None". (CreatedWithActionGroup, None)
creationTimestring (date-time)The creation time of the alert rule resource. Required.
provisioningStatestringThe provisioning state of the alert rule resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, watcher_name, alert_rule_resource_name, subscription_idGet a AlertRuleResource.
list_by_parentselectresource_group_name, watcher_name, subscription_idList AlertRuleResource resources by Watcher.
create_or_updateinsertresource_group_name, watcher_name, alert_rule_resource_name, subscription_idCreate a AlertRuleResource.
create_or_updatereplaceresource_group_name, watcher_name, alert_rule_resource_name, subscription_idCreate a AlertRuleResource.
deletedeleteresource_group_name, watcher_name, alert_rule_resource_name, subscription_idDelete 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
alert_rule_resource_namestringThe alert rule proxy resource name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
watcher_namestringThe database watcher name. Required.

SELECT examples

Get a AlertRuleResource.

SELECT
id,
name,
alertRuleResourceId,
alertRuleTemplateId,
alertRuleTemplateVersion,
createdWithProperties,
creationTime,
provisioningState,
systemData,
type
FROM azure.database_watcher.alert_rule_resources
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND watcher_name = '{{ watcher_name }}' -- required
AND alert_rule_resource_name = '{{ alert_rule_resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a AlertRuleResource.

INSERT INTO azure.database_watcher.alert_rule_resources (
properties,
resource_group_name,
watcher_name,
alert_rule_resource_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ watcher_name }}',
'{{ alert_rule_resource_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Create a AlertRuleResource.

REPLACE azure.database_watcher.alert_rule_resources
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND watcher_name = '{{ watcher_name }}' --required
AND alert_rule_resource_name = '{{ alert_rule_resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Delete a AlertRuleResource.

DELETE FROM azure.database_watcher.alert_rule_resources
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND watcher_name = '{{ watcher_name }}' --required
AND alert_rule_resource_name = '{{ alert_rule_resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;