Skip to main content

action_groups

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

Overview

Nameaction_groups
TypeResource
Idazure.monitor.action_groups

Fields

The following fields are returned by SELECT queries:

The request succeeded.

NameDatatypeDescription
idstringAzure resource Id
namestringAzure resource name
locationstringResource location
propertiesobjectThe action groups properties of the resource.
tagsobjectResource tags
typestringAzure resource type

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, actionGroupName, subscriptionIdGet an action group.
list_by_resource_groupselectresourceGroupName, subscriptionIdGet a list of all action groups in a resource group.
list_by_subscription_idselectsubscriptionIdGet a list of all action groups in a subscription.
create_or_updateinsertresourceGroupName, actionGroupName, subscriptionIdCreate a new action group or update an existing one.
updateupdatesubscriptionId, resourceGroupName, actionGroupNameUpdates an existing action group's tags. To update other fields use the CreateOrUpdate method.
deletedeleteresourceGroupName, actionGroupName, subscriptionIdDelete an action group.
enable_receiverexecresourceGroupName, actionGroupName, subscriptionId, receiverNameEnable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers.
reconcile_nspexecsubscriptionId, resourceGroupName, actionGroupName, networkSecurityPerimeterConfigurationNameReconciles a specified NSP configuration for specified action group.

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
actionGroupNamestringThe name of the action group.
networkSecurityPerimeterConfigurationNamestringThe name for a network security perimeter configuration
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.

SELECT examples

Get an action group.

SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.monitor.action_groups
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND actionGroupName = '{{ actionGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Create a new action group or update an existing one.

INSERT INTO azure.monitor.action_groups (
data__location,
data__tags,
data__properties,
resourceGroupName,
actionGroupName,
subscriptionId
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ actionGroupName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
location,
properties,
tags,
type
;

UPDATE examples

Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.

UPDATE azure.monitor.action_groups
SET
data__tags = '{{ tags }}',
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND actionGroupName = '{{ actionGroupName }}' --required
RETURNING
id,
name,
location,
properties,
tags,
type;

DELETE examples

Delete an action group.

DELETE FROM azure.monitor.action_groups
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND actionGroupName = '{{ actionGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers.

EXEC azure.monitor.action_groups.enable_receiver 
@resourceGroupName='{{ resourceGroupName }}' --required,
@actionGroupName='{{ actionGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"receiverName": "{{ receiverName }}"
}'
;