< Back

New-AzureRmContainerRegistryWebhook

Tue Jan 29, 2019 9:40 pm

NAME New-AzureRmContainerRegistryWebhook



SYNOPSIS

Creates a container registry webhook.





SYNTAX

New-AzureRmContainerRegistryWebhook [-Name] <String> [-Uri] <Uri> [-Action] {delete | push} [-Confirm] [-DefaultProfile <IAzureContextContainer>]

[-Header <Hashtable>] [-Location <String>] -Registry <PSContainerRegistry> [-Scope <String>] [-Status {enabled | disabled}] [-Tag <Hashtable>]

[-WhatIf] [<CommonParameters>]



New-AzureRmContainerRegistryWebhook [-Name] <String> [-ResourceGroupName] <String> [-RegistryName] <String> [-Uri] <Uri> [-Action] {delete | push}

[-Confirm] [-DefaultProfile <IAzureContextContainer>] [-Header <Hashtable>] [-Location <String>] [-Scope <String>] [-Status {enabled | disabled}]

[-Tag <Hashtable>] [-WhatIf] [<CommonParameters>]



New-AzureRmContainerRegistryWebhook [-Name] <String> [-Uri] <Uri> [-Action] {delete | push} [-Confirm] [-DefaultProfile <IAzureContextContainer>]

[-Header <Hashtable>] [-Location <String>] -ResourceId <String> [-Scope <String>] [-Status {enabled | disabled}] [-Tag <Hashtable>] [-WhatIf]

[<CommonParameters>]





DESCRIPTION

The New-AzureRmContainerRegistryWebhook cmdlet creates a container registry webhook.





PARAMETERS

-Action <String[]>

Space separated list of actions that trigger the webhook to post notifications.



Required? true

Position? 4

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



-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



-Header <Hashtable>

Custom headers that will be added to the webhook notifications.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Location <String>

Webhook Location. Default to the location of the registry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Webhook Name.



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Registry <PSContainerRegistry>

Container Registry Object.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RegistryName <String>

Container Registry Name.



Required? true

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

Resource Group Name.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceId <String>

The container registry resource id



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Scope <String>

Webhook scope.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Status <String>

Webhook status, default value is enabled



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Tag <Hashtable>

Webhook tags.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Uri <Uri>

The service URI for the webhook to post notifications.



Required? true

Position? 3

Default value None

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

System.String







OUTPUTS

Microsoft.Azure.Commands.ContainerRegistry.PSContainerRegistryWebhook







NOTES









Example 1: Create a container registry webhook.



PS C:\\> New-AzureRmContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryName "MyRegistry" -Name "webhook001" -Uri

http://www.bing.com -Action Delete,Push -Header @{SpecialHeader='headerVal'} -Tag @{Key="val"} -Location "east us" -Status Enabled -Scope "foo:*"



Name Location Status Scope Actions Provisioni ServiceUri

ngState

---- -------- ------ ----- ------- ---------- ----------

webhook001 westus enabled foo:* {push, delete} Succeeded



Create a container registry webhook.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... erregistry

Get-AzureRmContainerRegistryWebhook

Update-AzureRmContainerRegistryWebhook

Remove-AzureRmContainerRegistryWebhook

Test-AzureRmContainerRegistryWebhook