az containerapp revision
Note
This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.
Commands to manage revisions.
Commands
Name | Description | Type | Status |
---|---|---|---|
az containerapp revision activate |
Activate a revision. |
Core | GA |
az containerapp revision copy |
Create a revision based on a previous revision. |
Core | GA |
az containerapp revision deactivate |
Deactivate a revision. |
Core | GA |
az containerapp revision label |
Manage revision labels assigned to traffic weights. |
Core and Extension | GA |
az containerapp revision label add |
Set a revision label to a revision with an associated traffic weight. |
Core | GA |
az containerapp revision label add (containerapp extension) |
Set a revision label to a revision with an associated traffic weight. |
Extension | GA |
az containerapp revision label remove |
Remove a revision label from a revision with an associated traffic weight. |
Core | GA |
az containerapp revision label remove (containerapp extension) |
Remove a revision label from a revision with an associated traffic weight. |
Extension | GA |
az containerapp revision label swap |
Swap a revision label between two revisions with associated traffic weights. |
Core | GA |
az containerapp revision list |
List a container app's revisions. |
Core | GA |
az containerapp revision restart |
Restart a revision. |
Core | GA |
az containerapp revision set-mode |
Set the revision mode of a container app. |
Core | GA |
az containerapp revision set-mode (containerapp extension) |
Set the revision mode of a container app. |
Extension | GA |
az containerapp revision show |
Show details of a revision. |
Core | GA |
az containerapp revision activate
Activate a revision.
az containerapp revision activate --revision
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Activate a revision.
az containerapp revision activate -g MyResourceGroup --revision MyContainerappRevision
Required Parameters
Name of the revision.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az containerapp revision copy
Create a revision based on a previous revision.
az containerapp revision copy [--args]
[--command]
[--container-name]
[--cpu]
[--from-revision]
[--ids]
[--image]
[--max-replicas]
[--memory]
[--min-replicas]
[--name]
[--remove-all-env-vars]
[--remove-env-vars]
[--replace-env-vars]
[--resource-group]
[--revision-suffix]
[--scale-rule-auth --sra]
[--scale-rule-http-concurrency --scale-rule-tcp-concurrency --srhc --srtc]
[--scale-rule-metadata --srm]
[--scale-rule-name --srn]
[--scale-rule-type --srt]
[--set-env-vars]
[--subscription]
[--tags]
[--workload-profile-name]
[--yaml]
Examples
Create a revision based on a previous revision.
az containerapp revision copy -n my-containerapp -g MyResourceGroup --cpu 0.75 --memory 1.5Gi
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
A list of container startup command argument(s). Space-separated values e.g. "-c" "mycommand". Empty string to clear existing values.
Property | Value |
---|---|
Parameter group: | Container Arguments |
A list of supported commands on the container that will executed during startup. Space-separated values e.g. "/bin/queue" "mycommand". Empty string to clear existing values.
Property | Value |
---|---|
Parameter group: | Container Arguments |
Name of the container.
Property | Value |
---|---|
Parameter group: | Container Arguments |
Required CPU in cores from 0.25 - 2.0, e.g. 0.5.
Property | Value |
---|---|
Parameter group: | Container Arguments |
Revision to copy from. Default: latest revision.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Container image, e.g. publisher/image-name:tag.
The maximum number of replicas.
Property | Value |
---|---|
Parameter group: | Scale Arguments |
Required memory from 0.5 - 4.0 ending with "Gi", e.g. 1.0Gi.
Property | Value |
---|---|
Parameter group: | Container Arguments |
The minimum number of replicas.
Property | Value |
---|---|
Parameter group: | Scale Arguments |
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Remove all environment variable(s) from container..
Property | Value |
---|---|
Parameter group: | Environment variables Arguments |
Default value: | False |
Remove environment variable(s) from container. Space-separated environment variable names.
Property | Value |
---|---|
Parameter group: | Environment variables Arguments |
Replace environment variable(s) in container. Other existing environment variables are removed. Space-separated values in 'key=value' format. If stored as a secret, value must start with 'secretref:' followed by the secret name.
Property | Value |
---|---|
Parameter group: | Environment variables Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
User friendly suffix that is appended to the revision name.
Property | Value |
---|---|
Parameter group: | Container Arguments |
Scale rule auth parameters. Auth parameters must be in format "{triggerParameter}={secretRef} {triggerParameter}={secretRef} ...".
Property | Value |
---|---|
Parameter group: | Scale Arguments |
The maximum number of concurrent requests before scale out. Only supported for http and tcp scale rules.
Property | Value |
---|---|
Parameter group: | Scale Arguments |
Scale rule metadata. Metadata must be in format "{key}={value} {key}={value} ...".
Property | Value |
---|---|
Parameter group: | Scale Arguments |
The name of the scale rule.
Property | Value |
---|---|
Parameter group: | Scale Arguments |
The type of the scale rule. Default: http. For more information please visit https://learn.microsoft.com/azure/container-apps/scale-app#scale-triggers.
Property | Value |
---|---|
Parameter group: | Scale Arguments |
Add or update environment variable(s) in container. Existing environment variables are not modified. Space-separated values in 'key=value' format. If stored as a secret, value must start with 'secretref:' followed by the secret name.
Property | Value |
---|---|
Parameter group: | Environment variables Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
The friendly name for the workload profile.
Path to a .yaml file with the configuration of a container app. All other parameters will be ignored. For an example, see https://learn.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples.
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.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az containerapp revision deactivate
Deactivate a revision.
az containerapp revision deactivate --revision
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Deactivate a revision.
az containerapp revision deactivate -g MyResourceGroup --revision MyContainerappRevision
Required Parameters
Name of the revision.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az containerapp revision list
List a container app's revisions.
az containerapp revision list --name
--resource-group
[--all]
Examples
List a container app's revisions.
az containerapp revision list -n my-containerapp -g MyResourceGroup
Required Parameters
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<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.
Show inactive revisions.
Property | Value |
---|---|
Default value: | False |
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 containerapp revision restart
Restart a revision.
az containerapp revision restart --revision
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Restart a revision.
az containerapp revision restart -n my-containerapp -g MyResourceGroup --revision MyContainerappRevision
Required Parameters
Name of the revision.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az containerapp revision set-mode
Set the revision mode of a container app.
az containerapp revision set-mode --mode {multiple, single}
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Set a container app to single revision mode.
az containerapp revision set-mode -n my-containerapp -g MyResourceGroup --mode Single
Required Parameters
The active revisions mode for the container app.
Property | Value |
---|---|
Accepted values: | multiple, single |
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az containerapp revision set-mode (containerapp extension)
Set the revision mode of a container app.
az containerapp revision set-mode --mode {labels, multiple, single}
[--ids]
[--name]
[--resource-group]
[--subscription]
[--target-label]
Examples
Set a container app to single revision mode.
az containerapp revision set-mode -n my-containerapp -g MyResourceGroup --mode Single
Required Parameters
The active revisions mode for the container app.
Property | Value |
---|---|
Accepted values: | labels, multiple, single |
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The label to apply to new revisions. Required for revision mode 'labels'.
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.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az containerapp revision show
Show details of a revision.
az containerapp revision show --revision
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Show details of a revision.
az containerapp revision show -n my-containerapp -g MyResourceGroup \
--revision MyContainerappRevision
Required Parameters
Name of the revision.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |