Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Get-AlertRule

Get-AlertRule

microsoft.azure.commands.insights.dll

Synopsis

Gets alert rules

Syntax

Get-AlertRule [-ResourceGroup] [-Name] [-DetailedOutput] [-Profile] [<CommonParameters>]

Get-AlertRule [-ResourceGroup] [-TargetResourceId] [-DetailedOutput] [-Profile] [<CommonParameters>]

Get-AlertRule [-ResourceGroup] [-DetailedOutput] [-Profile] [<CommonParameters>]

Detailed Description

Gets alert rules either from a ResourceGroup or a particular alert rule if its name or Uri is known.

Parameters

-ResourceGroup <String>

The name of the resource group.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Name <String>

The name of the alert rule

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-DetailedOutput <SwitchParameter>

If present, it enables the display of full details in the output.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Profile <AzureProfile>

In-memory profile (AzureProfile).

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-TargetResourceId <String>

The Id of the target resource

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- Example 1: get alertrules for a ResourceGroup, no details --------------------------

Gets all the alert rules for a ResourceGroup. The output does not contain details about the rules.

get-alertrule -res Default-Web-CentralUS

-------------------------- Example 2: get a single alert rule identified by name, no details --------------------------

Gets a single alert rule identified by name and resource group name. The output contains only basic information about the alert rule.

get-alertrule -res Default-Web-CentralUS -n myalert-7da64548-214d-42ca-b12b-b245bb8f0ac8

-------------------------- Example 3: Gets a particular rule identified by name and provides details about it --------------------------

Gets a particular rule identified by name and resource group name. The output provides details about the rule.

get-alertrule -res Default-Web-CentralUS -n myalert-7da64548-214d-42ca-b12b-b245bb8f0ac8 -det

Add-AlertRule
Get-AlertHistory
Remove-AlertRule
Online Version