alerts
Creates, updates, deletes, gets or lists an alerts resource.
Overview
| Name | alerts |
| Type | Resource |
| Id | azure.authorization.alerts |
Fields
The following fields are returned by SELECT queries:
- get
- list_for_scope
OK - Returns information about the alert.
| Name | Datatype | Description |
|---|---|---|
id | string | The alert ID. |
name | string | The alert name. |
properties | object | Alert properties. |
type | string | The alert type. |
OK - Returns an array of alerts.
| Name | Datatype | Description |
|---|---|---|
id | string | The alert ID. |
name | string | The alert name. |
properties | object | Alert properties. |
type | string | The alert type. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | scope, alertId | Get the specified alert. | |
list_for_scope | select | scope | Gets alerts for a resource scope. | |
update | update | scope, alertId | Update an alert. | |
refresh | exec | scope, alertId | Refresh an alert. | |
refresh_all | exec | scope | Refresh all alerts for a resource scope. |
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 |
|---|---|---|
alertId | string | The name of the alert to refresh. |
scope | string | The scope of the alert. |
SELECT examples
- get
- list_for_scope
Get the specified alert.
SELECT
id,
name,
properties,
type
FROM azure.authorization.alerts
WHERE scope = '{{ scope }}' -- required
AND alertId = '{{ alertId }}' -- required
;
Gets alerts for a resource scope.
SELECT
id,
name,
properties,
type
FROM azure.authorization.alerts
WHERE scope = '{{ scope }}' -- required
;
UPDATE examples
- update
Update an alert.
UPDATE azure.authorization.alerts
SET
data__properties = '{{ properties }}'
WHERE
scope = '{{ scope }}' --required
AND alertId = '{{ alertId }}' --required;
Lifecycle Methods
- refresh
- refresh_all
Refresh an alert.
EXEC azure.authorization.alerts.refresh
@scope='{{ scope }}' --required,
@alertId='{{ alertId }}' --required
;
Refresh all alerts for a resource scope.
EXEC azure.authorization.alerts.refresh_all
@scope='{{ scope }}' --required
;