Set-AzActionGroup

Creates a new or updates an existing action group.

Syntax

Set-AzActionGroup
   -ResourceGroupName <String>
   -Name <String>
   -ShortName <String>
   -Receiver <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Insights.OutputClasses.PSActionGroupReceiverBase]>
   [-DisableGroup]
   [-Tag <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzActionGroup
   -ShortName <String>
   -Receiver <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Insights.OutputClasses.PSActionGroupReceiverBase]>
   [-DisableGroup]
   [-Tag <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
   -ResourceId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzActionGroup
   [-ShortName <String>]
   [-DisableGroup]
   [-Tag <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
   -InputObject <PSActionGroupResource>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzActionGroup cmdlet creates a new or updates an existing action group

Examples

Example 1: Create an Action Group

PS C:\>$email1 = New-AzActionGroupReceiver -Name 'user1' -EmailReceiver -EmailAddress 'user1@example.com'
PS C:\>$sms1 = New-AzActionGroupReceiver -Name 'user2' -SmsReceiver -CountryCode '1' -PhoneNumber '5555555555'
PS C:\>Set-AzActionGroup -Name $actionGroupName -ResourceGroup $resourceGroupName -ShortName $shortName -Receiver $email1,$sms1

The first two commands create two receivers. The final command creates an Action Group including the two receivers.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableGroup

Disables the action group.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-InputObject

The action group resource

Type:PSActionGroupResource
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Name

The name of the action group.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Receiver

The list of receivers of the action group.

Type:List<T>[PSActionGroupReceiverBase]
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ResourceGroupName

The resource group nam

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ResourceId

The resource i

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ShortName

The short name of the action group.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Tag

The tags of the action group resource

Type:IDictionary<TKey,TValue>[System.String,System.String]
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

List<T>[[Microsoft.Azure.Commands.Insights.OutputClasses.PSActionGroupReceiverBase, Microsoft.Azure.PowerShell.Cmdlets.Monitor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

SwitchParameter

IDictionary<TKey,TValue>[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]

PSActionGroupResource

Outputs

PSActionGroupResource