az monitor activity-log alert scope

Manage scopes for activity log alerts.

Commands

az monitor activity-log alert scope add

Add scopes to this activity log alert.

az monitor activity-log alert scope remove

Removes scopes from this activity log alert.

az monitor activity-log alert scope add

Add scopes to this activity log alert.

az monitor activity-log alert scope add --scope
                                        [--ids]
                                        [--name]
                                        [--reset]
                                        [--resource-group]
                                        [--subscription]

Examples

Add scopes to this activity log alert. (autogenerated)

az monitor activity-log alert scope add --name MyActivityLogAlerts --resource-group MyResourceGroup --scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG  /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/Microsoft.KeyVault/vaults/mykey

Required Parameters

--scope -s

List of scopes to add. Each scope could be a resource ID, a resource group ID or a subscription ID.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the activity log alerts.

--reset

Remove all the existing scopes before add new scopes.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az monitor activity-log alert scope remove

Removes scopes from this activity log alert.

az monitor activity-log alert scope remove --scope
                                           [--ids]
                                           [--name]
                                           [--resource-group]
                                           [--subscription]

Required Parameters

--scope -s

The scopes to remove.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the activity log alerts.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.