New-AzureRmActionGroupReceiver
Creates an new action group receiver.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
New-AzureRmActionGroupReceiver
-Name <String>
[-EmailReceiver]
-EmailAddress <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
New-AzureRmActionGroupReceiver
-Name <String>
[-SmsReceiver]
[-CountryCode <String>]
-PhoneNumber <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
New-AzureRmActionGroupReceiver
-Name <String>
[-WebhookReceiver]
-ServiceUri <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzureRmActionGroupReceiver cmdlet creates new action group receiver in memory.
Examples
Example 1: Create a new Email receiver in memory.
PS C:\>$emailReceiver = New-AzureRmActionGroupReceiver -Name 'emailReceiver1' -EmailReceiver -EmailAddress 'user1@example.com'
This command creates a new Email receiver in memory.
Example 2: Create a new SMS receiver in memory.
PS C:\>$smsReceiver = New-AzureRmActionGroupReceiver -Name 'smsReceiver1' -SmsReceiver -CountryCode '1' -PhoneNumber '5555555555'
This command creates a new SMS receiver in memory.
Example 3: Create a new webhook receiver in memory.
PS C:\>$webhookReceiver = New-AzureRmActionGroupReceiver -Name 'webhookReceiver1' -SMSReceiver -ServiceUri 'http://test.com'
This command creates a new webhook receiver in memory.
Parameters
-CountryCode
Specifies the country code for the SMS receiver.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EmailAddress
Specifies the address for the Email receiver.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EmailReceiver
Specifies to create an Email receiver
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name for the receiver.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PhoneNumber
Specifies the phone number for the SMS receiver.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServiceUri
Specifies the URI for the webhook receiver.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SmsReceiver
Specifies to create a SMS receiver
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WebhookReceiver
Specifies to create a webhook receiver
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |