Update-AzActionGroup
update a new action group or update an existing one.
Syntax
UpdateExpanded (Default)
Update-AzActionGroup
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-ArmRoleReceiver <IArmRoleReceiver[]>]
[-AutomationRunbookReceiver <IAutomationRunbookReceiver[]>]
[-AzureAppPushReceiver <IAzureAppPushReceiver[]>]
[-AzureFunctionReceiver <IAzureFunctionReceiver[]>]
[-EmailReceiver <IEmailReceiver[]>]
[-Enabled]
[-EventHubReceiver <IEventHubReceiver[]>]
[-GroupShortName <String>]
[-ItsmReceiver <IItsmReceiver[]>]
[-LogicAppReceiver <ILogicAppReceiver[]>]
[-SmsReceiver <ISmsReceiver[]>]
[-Tag <Hashtable>]
[-VoiceReceiver <IVoiceReceiver[]>]
[-WebhookReceiver <IWebhookReceiver[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UpdateViaIdentityExpanded
Update-AzActionGroup
-InputObject <IActionGroupIdentity>
[-ArmRoleReceiver <IArmRoleReceiver[]>]
[-AutomationRunbookReceiver <IAutomationRunbookReceiver[]>]
[-AzureAppPushReceiver <IAzureAppPushReceiver[]>]
[-AzureFunctionReceiver <IAzureFunctionReceiver[]>]
[-EmailReceiver <IEmailReceiver[]>]
[-Enabled]
[-EventHubReceiver <IEventHubReceiver[]>]
[-GroupShortName <String>]
[-ItsmReceiver <IItsmReceiver[]>]
[-LogicAppReceiver <ILogicAppReceiver[]>]
[-SmsReceiver <ISmsReceiver[]>]
[-Tag <Hashtable>]
[-VoiceReceiver <IVoiceReceiver[]>]
[-WebhookReceiver <IWebhookReceiver[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
update a new action group or update an existing one.
Examples
Example 1: Add receiver to specified action group
$enventhub = New-AzActionGroupEventHubReceiverObject -EventHubName "testEventHub" -EventHubNameSpace "actiongrouptest" -Name "sample eventhub" -SubscriptionId '{subid}'
Update-AzActionGroup -Name actiongroup1 -ResourceGroupName monitor-action -EventHubReceiver $enventhub
ArmRoleReceiver : {}
AutomationRunbookReceiver : {}
AzureAppPushReceiver : {}
AzureFunctionReceiver : {}
EmailReceiver : {{
"name": "user1",
"emailAddress": "{user}@microsoft.com",
"useCommonAlertSchema": false,
"status": "Enabled"
}}
Enabled : False
EventHubReceiver : {{
"name": "sample eventhub",
"eventHubNameSpace": "actiongrouptest",
"eventHubName": "testEventHub",
"useCommonAlertSchema": false,
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"subscriptionId": "{subid}"
}}
GroupShortName : ag1
Id : /subscriptions/{subid}/resourceGroups/monitor-action/providers/microsoft.insights/actionGroups/actiongroup1
ItsmReceiver : {}
Location : southcentralus
LogicAppReceiver : {}
Name : actiongroup1
ResourceGroupName : monitor-action
SmsReceiver : {{
"name": "user2",
"countryCode": "{code}",
"phoneNumber": "{phonenumber}",
"status": "Enabled"
}}
Tag : {
}
Type : Microsoft.Insights/ActionGroups
VoiceReceiver : {}
WebhookReceiver : {}
This command updates specified action group with name and group.
Example 2: Delete receiver to specified action group
$ag = Get-AzActionGroup -Name actiongroup1 -ResourceGroupName monitor-action
Update-AzActionGroup -InputObject $ag -EventHubReceiver $null
ArmRoleReceiver : {}
AutomationRunbookReceiver : {}
AzureAppPushReceiver : {}
AzureFunctionReceiver : {}
EmailReceiver : {{
"name": "user1",
"emailAddress": "{user}@microsoft.com",
"useCommonAlertSchema": false,
"status": "Enabled"
}}
Enabled : False
EventHubReceiver : {}
GroupShortName : ag1
Id : /subscriptions/{subid}/resourceGroups/Monitor-Action/providers/microsoft.insights/actionGroups/actiongroup1
ItsmReceiver : {}
Location : southcentralus
LogicAppReceiver : {}
Name : actiongroup1
ResourceGroupName : Monitor-Action
SmsReceiver : {{
"name": "user2",
"countryCode": "{code}",
"phoneNumber": "{phonenumber}",
"status": "Enabled"
}}
Tag : {
}
Type : Microsoft.Insights/ActionGroups
VoiceReceiver : {}
WebhookReceiver : {}
The first command get specified action group.
The final command updates specified action group with action group object.
Parameters
-ArmRoleReceiver
The list of ARM role receivers that are part of this action group.
Roles are Azure RBAC roles and only built-in roles are supported.
Parameter properties
Type: IArmRoleReceiver [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AutomationRunbookReceiver
The list of AutomationRunbook receivers that are part of this action group.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AzureAppPushReceiver
The list of AzureAppPush receivers that are part of this action group.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AzureFunctionReceiver
The list of azure function receivers that are part of this action group.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EmailReceiver
The list of email receivers that are part of this action group.
Parameter properties
Type: IEmailReceiver [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Enabled
Indicates whether this action group is enabled.
If an action group is not enabled, then none of its receivers will receive communications.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EventHubReceiver
The list of event hub receivers that are part of this action group.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-GroupShortName
The short name of the action group.
This will be used in SMS messages.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ShortName
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
UpdateViaIdentityExpanded
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ItsmReceiver
The list of ITSM receivers that are part of this action group.
Parameter properties
Type: IItsmReceiver [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-LogicAppReceiver
The list of logic app receivers that are part of this action group.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the action group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ActionGroupName
Parameter sets
UpdateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SmsReceiver
The list of SMS receivers that are part of this action group.
Parameter properties
Type: ISmsReceiver [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The ID of the target subscription.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
Resource tags
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VoiceReceiver
The list of voice receivers that are part of this action group.
Parameter properties
Type: IVoiceReceiver [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WebhookReceiver
The list of webhook receivers that are part of this action group.
Parameter properties
Type: IWebhookReceiver [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs