Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

az acr webhook

Manage webhooks for Azure Container Registries.

Commands

Name Description Type Status
az acr webhook create

Create a webhook for an Azure Container Registry.

Core GA
az acr webhook delete

Delete a webhook from an Azure Container Registry.

Core GA
az acr webhook get-config

Get the service URI and custom headers for the webhook.

Core GA
az acr webhook list

List all of the webhooks for an Azure Container Registry.

Core GA
az acr webhook list-events

List recent events for a webhook.

Core GA
az acr webhook ping

Trigger a ping event for a webhook.

Core GA
az acr webhook show

Get the details of a webhook.

Core GA
az acr webhook update

Update a webhook.

Core GA

az acr webhook create

Create a webhook for an Azure Container Registry.

az acr webhook create --actions {chart_delete, chart_push, delete, push, quarantine}
 --name
 --registry
 --uri
 [--acquire-policy-token]
 [--change-reference]
 [--headers]
 [--location]
 [--resource-group]
 [--scope]
 [--status {disabled, enabled}]
 [--tags]

Examples

Create a webhook for an Azure Container Registry that will deliver docker push and delete events to a service URI.

az acr webhook create -n mywebhook -r myregistry --uri http://myservice.com --actions push delete

Create a webhook for an Azure Container Registry that will deliver docker push events to a service URI with a basic authentication header.

az acr webhook create -n mywebhook -r myregistry --uri http://myservice.com --actions push --headers "Authorization=Basic 000000"

Create a webhook for an Azure Container Registry that will deliver helm chart push and delete events to a service URI.

az acr webhook create -n mywebhook -r myregistry --uri http://myservice.com --actions chart_push chart_delete

Required Parameters

--actions

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

Property Value
Accepted values: chart_delete, chart_push, delete, push, quarantine
--name -n

The name of the webhook.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

--uri

The service URI for the webhook to post notifications.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--headers

Space-separated custom headers in 'key[=value]' format that will be added to the webhook notifications. Use "" to clear existing headers.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--scope

The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means events for all repositories.

--status

Indicates whether the webhook is enabled.

Property Value
Default value: enabled
Accepted values: disabled, enabled
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

az acr webhook delete

Delete a webhook from an Azure Container Registry.

az acr webhook delete --name
 --registry
 [--acquire-policy-token]
 [--change-reference]
 [--resource-group]

Examples

Delete a webhook from an Azure Container Registry.

az acr webhook delete -n mywebhook -r myregistry

Required Parameters

--name -n

The name of the webhook.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az acr webhook get-config

Get the service URI and custom headers for the webhook.

az acr webhook get-config --name
 --registry
 [--acquire-policy-token]
 [--change-reference]
 [--resource-group]

Examples

Get the configuration information for a webhook.

az acr webhook get-config -n mywebhook -r myregistry

Required Parameters

--name -n

The name of the webhook.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az acr webhook list

List all of the webhooks for an Azure Container Registry.

az acr webhook list --registry
 [--resource-group]

Examples

List webhooks and show the results in a table.

az acr webhook list -r myregistry -o table

Required Parameters

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az acr webhook list-events

List recent events for a webhook.

az acr webhook list-events --name
 --registry
 [--acquire-policy-token]
 [--change-reference]
 [--resource-group]

Examples

List recent events for a webhook.

az acr webhook list-events -n mywebhook -r myregistry

Required Parameters

--name -n

The name of the webhook.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az acr webhook ping

Trigger a ping event for a webhook.

az acr webhook ping --name
 --registry
 [--acquire-policy-token]
 [--change-reference]
 [--resource-group]

Examples

Trigger a ping event for a webhook.

az acr webhook ping -n mywebhook -r myregistry

Required Parameters

--name -n

The name of the webhook.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az acr webhook show

Get the details of a webhook.

az acr webhook show --name
 --registry
 [--resource-group]

Examples

Get the details of a webhook.

az acr webhook show -n mywebhook -r myregistry

Required Parameters

--name -n

The name of the webhook.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az acr webhook update

Update a webhook.

az acr webhook update --name
 --registry
 [--acquire-policy-token]
 [--actions {chart_delete, chart_push, delete, push, quarantine}]
 [--add]
 [--change-reference]
 [--force-string]
 [--headers]
 [--remove]
 [--resource-group]
 [--scope]
 [--set]
 [--status {disabled, enabled}]
 [--tags]
 [--uri]

Examples

Update headers for a webhook.

az acr webhook update -n mywebhook -r myregistry --headers "Authorization=Basic 000000"

Update the service URI and actions for a webhook.

az acr webhook update -n mywebhook -r myregistry --uri http://myservice.com --actions push delete

Disable a webhook.

az acr webhook update -n mywebhook -r myregistry --status disabled

Required Parameters

--name -n

The name of the webhook.

--registry -r

The name of the container registry. It should be specified in lower case. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--actions

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

Property Value
Accepted values: chart_delete, chart_push, delete, push, quarantine
--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Default value: False
--headers

Space-separated custom headers in 'key[=value]' format that will be added to the webhook notifications. Use "" to clear existing headers.

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--scope

The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means events for all repositories.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--status

Indicates whether the webhook is enabled.

Property Value
Accepted values: disabled, enabled
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--uri

The service URI for the webhook to post notifications.


Feedback

Was this page helpful?