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:

NameDatatypeDescription
actionDetailsarrayThe list of action detail.
completedTimestringThe completed time.
contextobjectThe context info.
createdTimestringThe created time.
statestringThe overall state. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_test_notifications_at_action_group_resource_levelselectresource_group_name, action_group_name, notification_id, subscription_idGet the test notifications by the notification id.
get_nspselectresource_group_name, action_group_name, network_security_perimeter_configuration_name, subscription_idGets a specified NSP configuration for specified action group.
getselectresource_group_name, action_group_name, subscription_idGet an action group.
list_by_resource_groupselectresource_group_name, subscription_idGet a list of all action groups in a resource group.
list_by_subscription_idselectsubscription_idGet a list of all action groups in a subscription.
create_or_updateinsertresource_group_name, action_group_name, subscription_id, locationCreate a new action group or update an existing one.
updateupdateresource_group_name, action_group_name, subscription_idUpdates an existing action group's tags. To update other fields use the CreateOrUpdate method.
create_or_updatereplaceresource_group_name, action_group_name, subscription_id, locationCreate a new action group or update an existing one.
deletedeleteresource_group_name, action_group_name, subscription_idDelete an action group.
list_nspexecresource_group_name, action_group_name, subscription_idGets a list of NSP configurations for specified action group.
create_notifications_at_action_group_resource_levelexecresource_group_name, action_group_name, subscription_id, alertTypeSend test notifications to a set of provided receivers.
enable_receiverexecresource_group_name, action_group_name, subscription_id, 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_nspexecresource_group_name, action_group_name, network_security_perimeter_configuration_name, subscription_idReconciles 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
action_group_namestringThe name of the action group. Required.
network_security_perimeter_configuration_namestringThe name for a network security perimeter configuration. Required.
notification_idstringThe notification id. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Get the test notifications by the notification id.

SELECT
actionDetails,
completedTime,
context,
createdTime,
state
FROM azure.monitor.action_groups
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND action_group_name = '{{ action_group_name }}' -- required
AND notification_id = '{{ notification_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a new action group or update an existing one.

INSERT INTO azure.monitor.action_groups (
tags,
location,
properties,
identity,
resource_group_name,
action_group_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ action_group_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
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
tags = '{{ tags }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND action_group_name = '{{ action_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create a new action group or update an existing one.

REPLACE azure.monitor.action_groups
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND action_group_name = '{{ action_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete an action group.

DELETE FROM azure.monitor.action_groups
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND action_group_name = '{{ action_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Gets a list of NSP configurations for specified action group.

EXEC azure.monitor.action_groups.list_nsp 
@resource_group_name='{{ resource_group_name }}' --required,
@action_group_name='{{ action_group_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;