az acr config retention
This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage retention policy for Azure Container Registries.
Commands
Name | Description | Type | Status |
---|---|---|---|
az acr config retention show |
Show the configured retention policy for an Azure Container Registry. |
Core | Preview |
az acr config retention update |
Update retention policy for an Azure Container Registry. |
Core | Preview |
az acr config retention show
Command group 'acr config retention' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show the configured retention policy for an Azure Container Registry.
az acr config retention show --registry
[--resource-group]
Examples
Show the configured retention policy for an Azure Container Registry
az acr config retention show -r myregistry
Required Parameters
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az acr config retention update
Command group 'acr config retention' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update retention policy for an Azure Container Registry.
az acr config retention update --registry
--type {UntaggedManifests}
[--days]
[--resource-group]
[--status {disabled, enabled}]
Examples
Enable retention policy for an Azure Container Registry to delete an untagged manifest after 30 days.
az acr config retention update -r myregistry --status Enabled --days 30 --type UntaggedManifests
Enable retention policy for an Azure Container Registry to delete a manifest as soon as it gets untagged.
az acr config retention update -r myregistry --status Enabled --days 0 --type UntaggedManifests
Required Parameters
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>
.
The type of retention policy.
Property | Value |
---|---|
Accepted values: | UntaggedManifests |
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The number of days to retain an untagged manifest after which it gets purged (Range: 0 to 365). Value "0" will delete untagged manifests immediately.
Property | Value |
---|---|
Default value: | 7 |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Indicates whether retention policy is enabled.
Property | Value |
---|---|
Accepted values: | disabled, enabled |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |