< Back
New-AzureRmAutomationWebhook
Post
NAME New-AzureRmAutomationWebhook
SYNOPSIS
Creates a webhook for an Automation runbook.
SYNTAX
New-AzureRmAutomationWebhook [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-Name] <String> [-RunbookName] <String> [-IsEnabled]
<Boolean> [-ExpiryTime] <DateTimeOffset> [-DefaultProfile <IAzureContextContainer>] [-Force] [-Parameters <IDictionary>] [-RunOn <String>]
[-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmAutomationWebhook cmdlet creates a webhook for an Azure Automation runbook.
Be sure to save the webhook URL that this cmdlet returns, because it cannot be retrieved again.
PARAMETERS
-AutomationAccountName <String>
Specifies the name of an Automation account in which this cmdlet creates a webhook.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ExpiryTime <DateTimeOffset>
Specifies the expiry time for the webhook as a DateTimeOffset object. You can specify a string or a DateTime that can be converted to a valid
DateTimeOffset .
Required? true
Position? 5
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
ps_force
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-IsEnabled <Boolean>
Specifies whether the webhook is enabled.
Required? true
Position? 4
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies a name for the webhook.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Parameters <IDictionary>
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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group for which this cmdlet creates a webhook.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RunbookName <String>
Specifies the name of the runbook to associate to the webhook.
Required? true
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RunOn <String>
Optional name of the hybrid worker group which should execute the runbook
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Automation.Model.Webhook
NOTES
Example 1: Create a webhook
PS C:\\>$Webhook = New-AzureRmAutomationWebhook -Name "Webhook06" -IsEnabled $True -ExpiryTime "10/2/2016" -RunbookName "ContosoRunbook"
-ResourceGroup "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -Force
This command creates a webhook named Webhook06 for the runbook named ContosoRunbook in the Automation account named AutomationAccount01. The
command stores the webhook in the $Webhook variable. The webhook is enabled. The webhook expires at the specified time. This command does not
provide any values for webhook parameters. This command specifies the Force parameter. Therefore, it does not prompt you for confirmation.
Example 2: Create a webhook with parameters
PS C:\\>$Params = @{"StringParam"="Hello World";"IntegerParam"=32}
PS C:\\> $Webhook = New-AzureRmAutomationWebhook -Name "Webhook11" -Parameters $Params -IsEnabled $True -ExpiryTime "10/2/2016" -RunbookName
"ContosoRunbook" -ResourceGroup "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -Force
The first command creates a dictionary of parameters, and stores them in the $Params variable.
The second command creates a webhook named Webhook11 for the runbook named ContosoRunbook in the Automation account named AutomationAccount01. The
command assigns the parameters in $Params to the webhook.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ionwebhook
Get-AzureRmAutomationWebhook
Remove-AzureRmAutomationWebhook
Set-AzureRmAutomationWebhook
SYNOPSIS
Creates a webhook for an Automation runbook.
SYNTAX
New-AzureRmAutomationWebhook [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-Name] <String> [-RunbookName] <String> [-IsEnabled]
<Boolean> [-ExpiryTime] <DateTimeOffset> [-DefaultProfile <IAzureContextContainer>] [-Force] [-Parameters <IDictionary>] [-RunOn <String>]
[-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmAutomationWebhook cmdlet creates a webhook for an Azure Automation runbook.
Be sure to save the webhook URL that this cmdlet returns, because it cannot be retrieved again.
PARAMETERS
-AutomationAccountName <String>
Specifies the name of an Automation account in which this cmdlet creates a webhook.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ExpiryTime <DateTimeOffset>
Specifies the expiry time for the webhook as a DateTimeOffset object. You can specify a string or a DateTime that can be converted to a valid
DateTimeOffset .
Required? true
Position? 5
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
ps_force
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-IsEnabled <Boolean>
Specifies whether the webhook is enabled.
Required? true
Position? 4
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies a name for the webhook.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Parameters <IDictionary>
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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group for which this cmdlet creates a webhook.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RunbookName <String>
Specifies the name of the runbook to associate to the webhook.
Required? true
Position? 3
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RunOn <String>
Optional name of the hybrid worker group which should execute the runbook
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Automation.Model.Webhook
NOTES
Example 1: Create a webhook
PS C:\\>$Webhook = New-AzureRmAutomationWebhook -Name "Webhook06" -IsEnabled $True -ExpiryTime "10/2/2016" -RunbookName "ContosoRunbook"
-ResourceGroup "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -Force
This command creates a webhook named Webhook06 for the runbook named ContosoRunbook in the Automation account named AutomationAccount01. The
command stores the webhook in the $Webhook variable. The webhook is enabled. The webhook expires at the specified time. This command does not
provide any values for webhook parameters. This command specifies the Force parameter. Therefore, it does not prompt you for confirmation.
Example 2: Create a webhook with parameters
PS C:\\>$Params = @{"StringParam"="Hello World";"IntegerParam"=32}
PS C:\\> $Webhook = New-AzureRmAutomationWebhook -Name "Webhook11" -Parameters $Params -IsEnabled $True -ExpiryTime "10/2/2016" -RunbookName
"ContosoRunbook" -ResourceGroup "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -Force
The first command creates a dictionary of parameters, and stores them in the $Params variable.
The second command creates a webhook named Webhook11 for the runbook named ContosoRunbook in the Automation account named AutomationAccount01. The
command assigns the parameters in $Params to the webhook.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ionwebhook
Get-AzureRmAutomationWebhook
Remove-AzureRmAutomationWebhook
Set-AzureRmAutomationWebhook