Share via


az acr config soft-delete

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage soft-delete policy for Azure Container Registries.

Commands

Name Description Type Status
az acr config soft-delete show

Show the configured soft-delete policy for an Azure Container Registry.

Core Preview
az acr config soft-delete update

Update soft-delete policy for an Azure Container Registry.

Core Preview

az acr config soft-delete show

Preview

Command group 'acr config soft-delete' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show the configured soft-delete policy for an Azure Container Registry.

az acr config soft-delete show --registry

Examples

Show the configured soft-delete policy for an Azure Container Registry

az acr config soft-delete show -r myregistry

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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az acr config soft-delete update

Preview

Command group 'acr config soft-delete' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update soft-delete policy for an Azure Container Registry.

az acr config soft-delete update --registry
                                 [--days]
                                 [--status {disabled, enabled}]
                                 [--yes]

Examples

Enable soft-delete policy for an Azure Container Registry to purge a soft-deleted manifest after 30 days.

az acr config soft-delete update -r myregistry --status Enabled --days 30

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

--days

The number of days to retain a soft-deleted manifest or tag after which it gets purged (Range: 1 to 90). Default is 7.

--status

Indicates whether soft-delete policy is enabled.

Accepted values: disabled, enabled
--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.