你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Set-AzAutomationWebhook

Modifies a webhook for an Automation runbook.

Syntax

Set-AzAutomationWebhook
   [-Name] <String>
   [-IsEnabled] <Boolean>
   [[-Parameters] <IDictionary>]
   [-RunOn <String>]
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Set-AzAutomationWebhook cmdlet modifies a webhook for an Azure Automation runbook.

Examples

Example 1: Disable a webhook

Set-AzAutomationWebhook -Name "Webhook01" -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -IsEnabled $False

This command disables a webhook named Webhook01 in the Automation account named AutomationAccount01.

Example 2

Set-AzAutomationWebhook -Name "Webhook01" -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -RunOn 'Windows'

This command sets the run on value for the webhook and forces the runbook to be run on a Hybrid Worker group called Windows.

Example 3

Set-AzAutomationWebhook -Name "Webhook01" -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -RunOn $null

This command updates the run on value for the webhook and forces the runbook to be run on an Azure runbook worker.

Parameters

-AutomationAccountName

Specifies the name of an Automation account in which this cmdlet modifies a webhook.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IsEnabled

Specifies whether the webhook is enabled.

Type:Nullable<T>[Boolean]
Position:3
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies a name of the webhook that this cmdlet modifies.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Parameters

Specifies a dictionary of key/value pairs. The keys are the runbook parameter names. The values are the runbook parameter values. When the runbook starts in response to a webhook, these parameters are passed to the runbook.

Type:IDictionary
Position:4
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

Specifies the name of the resource group for which this cmdlet modifies a webhook.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-RunOn

Optional name of the hybrid agent which should execute the runbook

Type:String
Aliases:HybridWorker
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Nullable<T>[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]

IDictionary

Outputs

Webhook