activity_log_alerts
Creates, updates, deletes, gets or lists a activity_log_alerts
resource.
Overview
Name | activity_log_alerts |
Type | Resource |
Id | azure.monitor.activity_log_alerts |
Fields
- vw_activity_log_alerts
- activity_log_alerts
Name | Datatype | Description |
---|---|---|
id | text | The resource Id. |
name | text | The name of the resource. |
description | text | field from the properties object |
actions | text | field from the properties object |
activityLogAlertName | text | field from the properties object |
condition | text | field from the properties object |
enabled | text | field from the properties object |
location | text | The location of the resource. Azure Activity Log Alert rules are supported on Global, West Europe and North Europe regions. |
resourceGroupName | text | field from the properties object |
scopes | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | The tags of the resource. |
type | text | The type of the resource. |
Name | Datatype | Description |
---|---|---|
id | string | The resource Id. |
name | string | The name of the resource. |
location | string | The location of the resource. Azure Activity Log Alert rules are supported on Global, West Europe and North Europe regions. |
properties | object | An Azure Activity Log Alert rule. |
tags | object | The tags of the resource. |
type | string | The type of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | activityLogAlertName, resourceGroupName, subscriptionId | Get an Activity Log Alert rule. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Get a list of all Activity Log Alert rules in a resource group. |
list_by_subscription_id | SELECT | subscriptionId | Get a list of all Activity Log Alert rules in a subscription. |
create_or_update | INSERT | activityLogAlertName, resourceGroupName, subscriptionId | Create a new Activity Log Alert rule or update an existing one. |
delete | DELETE | activityLogAlertName, resourceGroupName, subscriptionId | Delete an Activity Log Alert rule. |
update | UPDATE | activityLogAlertName, resourceGroupName, subscriptionId | Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation. |
SELECT
examples
Get a list of all Activity Log Alert rules in a subscription.
- vw_activity_log_alerts
- activity_log_alerts
SELECT
id,
name,
description,
actions,
activityLogAlertName,
condition,
enabled,
location,
resourceGroupName,
scopes,
subscriptionId,
tags,
type
FROM azure.monitor.vw_activity_log_alerts
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.monitor.activity_log_alerts
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new activity_log_alerts
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.monitor.activity_log_alerts (
activityLogAlertName,
resourceGroupName,
subscriptionId,
location,
tags,
properties
)
SELECT
'{{ activityLogAlertName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: properties
value:
- name: scopes
value:
- string
- name: condition
value:
- name: allOf
value:
- - name: field
value: string
- name: equals
value: string
- name: containsAny
value:
- string
- name: anyOf
value:
- - name: field
value: string
- name: equals
value: string
- name: containsAny
value:
- string
- name: actions
value:
- name: actionGroups
value:
- - name: actionGroupId
value: string
- name: webhookProperties
value: string
- name: enabled
value: boolean
- name: description
value: string
UPDATE
example
Updates a activity_log_alerts
resource.
/*+ update */
UPDATE azure.monitor.activity_log_alerts
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
activityLogAlertName = '{{ activityLogAlertName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified activity_log_alerts
resource.
/*+ delete */
DELETE FROM azure.monitor.activity_log_alerts
WHERE activityLogAlertName = '{{ activityLogAlertName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';