New-AzContainerRegistryWebhook
Creates a container registry webhook.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzContainerRegistryWebhook
[-Name] <String>
[-ResourceGroupName] <String>
[-RegistryName] <String>
[-Uri] <Uri>
[-Action] <String[]>
[-Header <Hashtable>]
[-Tag <Hashtable>]
[-Status <String>]
[-Scope <String>]
[-Location <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzContainerRegistryWebhook
[-Name] <String>
[-Uri] <Uri>
[-Action] <String[]>
-Registry <PSContainerRegistry>
[-Header <Hashtable>]
[-Tag <Hashtable>]
[-Status <String>]
[-Scope <String>]
[-Location <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzContainerRegistryWebhook
[-Name] <String>
[-Uri] <Uri>
[-Action] <String[]>
[-Header <Hashtable>]
[-Tag <Hashtable>]
[-Status <String>]
[-Scope <String>]
[-Location <String>]
-ResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzContainerRegistryWebhook cmdlet creates a container registry webhook.
Examples
Example 1: Create a container registry webhook.
New-AzContainerRegistryWebhook -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.
Parameters
Space separated list of actions that trigger the webhook to post notifications.
| Type: | String[] |
| Aliases: | WebhookActions |
| Accepted values: | delete, push |
| Position: | 4 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Custom headers that will be added to the webhook notifications.
| Type: | Hashtable |
| Aliases: | WebhookHeaders |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Webhook Location. Default to the location of the registry.
| Type: | String |
| Aliases: | WebhookLocation |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Webhook Name.
| Type: | String |
| Aliases: | WebhookName, ResourceName |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Container Registry Object.
| Type: | PSContainerRegistry |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Container Registry Name.
| Type: | String |
| Aliases: | ContainerRegistryName |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Resource Group Name.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The container registry resource id
| Type: | String |
| Aliases: | Id |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Webhook scope.
| Type: | String |
| Aliases: | WebhookScope |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Webhook status, default value is enabled
| Type: | String |
| Aliases: | WebhookStatus |
| Accepted values: | enabled, disabled |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Webhook tags.
| Type: | Hashtable |
| Aliases: | Tags |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The service URI for the webhook to post notifications.
| Type: | Uri |
| Aliases: | WebhookUri |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |