alerts
Creates, updates, deletes, gets or lists an alerts
resource.
Overview
Name | alerts |
Type | Resource |
Id | azure.cost_management.alerts |
Fields
The following fields are returned by SELECT
queries:
- get
- list
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
eTag | string | eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. |
properties | object | Alert properties. (title: Alert properties) |
type | string | Resource type. |
OK. The request has succeeded.
Name | Datatype | Description |
---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
eTag | string | eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. |
properties | object | Alert properties. (title: Alert properties) |
type | string | Resource type. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | scope , alertId | Gets the alert for the scope by alert ID. | |
list | select | scope | Lists the alerts for scope defined. | |
dismiss | exec | scope , alertId | Dismisses the specified 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.
Name | Datatype | Description |
---|---|---|
alertId | string | Alert ID |
scope | string | The scope associated with alerts operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. |
SELECT
examples
- get
- list
Gets the alert for the scope by alert ID.
SELECT
id,
name,
eTag,
properties,
type
FROM azure.cost_management.alerts
WHERE scope = '{{ scope }}' -- required
AND alertId = '{{ alertId }}' -- required
;
Lists the alerts for scope defined.
SELECT
id,
name,
eTag,
properties,
type
FROM azure.cost_management.alerts
WHERE scope = '{{ scope }}' -- required
;
Lifecycle Methods
- dismiss
Dismisses the specified alert
EXEC azure.cost_management.alerts.dismiss
@scope='{{ scope }}' --required,
@alertId='{{ alertId }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;