Skip to main content

alerts

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

Overview

Namealerts
TypeResource
Idazure_stack.infrastructure_insights_admin.alerts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
locationstringThe Azure Region where the resource lives
propertiesobjectContains information related to alerts.
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, location, alertNameReturns the requested an alert.
listselectsubscriptionId, resourceGroupName, location$filterReturns the list of all alerts in a given region.
closeexecsubscriptionId, resourceGroupName, location, alertName, userCloses the given alert.
repairexecsubscriptionId, resourceGroupName, location, alertNameRepairs an alert.

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
alertNamestringName of the alert.
locationstringName of the region
resourceGroupNamestringThe name of the resource group.
subscriptionIdstringSubscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
userstringThe username used to perform the operation.
$filterstringOData filter parameter.

SELECT examples

Returns the requested an alert.

SELECT
location,
properties,
tags
FROM azure_stack.infrastructure_insights_admin.alerts
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND location = '{{ location }}' -- required
AND alertName = '{{ alertName }}' -- required
;

Lifecycle Methods

Closes the given alert.

EXEC azure_stack.infrastructure_insights_admin.alerts.close 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@location='{{ location }}' --required,
@alertName='{{ alertName }}' --required,
@user='{{ user }}' --required
@@json=
'{
"properties": "{{ properties }}",
"tags": "{{ tags }}",
"location": "{{ location }}"
}'
;