Rediger

Del via


New-AzAlertRuleWebhook

Creates an alert rule webhook.

Syntax

Default (Default)

New-AzAlertRuleWebhook
    [-ServiceUri] <String>
    [[-Property] <Hashtable>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The New-AzAlertRuleWebhook cmdlet creates an alert rule webhook.

Examples

Example 1: Create an alert rule webhook

New-AzAlertRuleWebhook -ServiceUri "http://contoso.com"

This command creates an alert rule webhook by specifying only the service URI.

Example 2: Create a webhook with one property

$Actual = New-AzAlertRuleWebhook -ServiceUri "http://contoso.com" -Property @{prop1 = 'value1'}

This command creates an alert rule webhook for Contoso.com that has one property, and then stores it in the $Actual variable.

Parameters

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, 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

-Property

Specifies the list of properties in the format @(property1 = 'value1',....).

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ServiceUri

Specifies the service URI.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
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.

Inputs

String

Hashtable

Outputs

RuleWebhookAction