Skip to content

Latest commit

 

History

History
119 lines (83 loc) · 3.1 KB

New-AzAlertRuleEmail.md

File metadata and controls

119 lines (83 loc) · 3.1 KB
external help file Module Name ms.assetid online version schema
Microsoft.Azure.PowerShell.Cmdlets.Monitor.dll-Help.xml
Az.Monitor
B1000C10-265E-4465-B167-F1251470BE3E
2.0.0

New-AzAlertRuleEmail

SYNOPSIS

Creates an email action for an alert rule.

SYNTAX

New-AzAlertRuleEmail [[-CustomEmail] <String[]>] [-SendToServiceOwner]
 [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

DESCRIPTION

The New-AzAlertRuleEmail cmdlet creates an e-mail action for an alert rule.

EXAMPLES

Example 1: Create an alert rule email action for service owners

PS C:\>New-AzAlertRuleEmail -SendToServiceOwners

This command creates an alert rule email action to send for its service owners when an alert rule is fired.

Example 2: Create an alert rule email action for non-service owners

PS C:\>New-AzAlertRuleEmail -CustomEmail pattif@contoso.com,davidchew@contoso.net

This command creates an alert rule email action for the specified email addresses, but not for the service owners.

Example 3: Create an alert rule email action for service owners and non-service owners

PS C:\>New-AzAlertRuleEmail -CustomEmail pattif@contoso.net -SendToServiceOwners

This command creates an alert rule email action for the specified address and for its service owners.

PARAMETERS

-CustomEmail

Specifies a list of comma-separated e-mail addresses.

Type: System.String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
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
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SendToServiceOwner

Indicates that this operation sends an e-mail to the service owners when the rule fires.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String[]

System.Management.Automation.SwitchParameter

OUTPUTS

Microsoft.Azure.Management.Monitor.Management.Models.RuleEmailAction

NOTES

RELATED LINKS

Add-AzLogAlertRule

Add-AzMetricAlertRule

Add-AzWebtestAlertRule

New-AzAlertRuleWebhook