שתף באמצעות


az containerapp revision

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 GA
az containerapp revision label add

Set a revision label to a revision with an associated traffic weight.

Core GA
az containerapp revision label remove

Remove a revision label from a revision with an associated traffic weight.

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

--revision

Name of the revision.

Optional Parameters

--ids

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.

--name -n

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.

--resource-group -g

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

--subscription

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

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 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]
                              [--scale-rule-http-concurrency]
                              [--scale-rule-metadata]
                              [--scale-rule-name]
                              [--scale-rule-type]
                              [--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

--args

A list of container startup command argument(s). Space-separated values e.g. "-c" "mycommand". Empty string to clear existing values.

--command

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.

--container-name

Name of the container.

--cpu

Required CPU in cores from 0.25 - 2.0, e.g. 0.5.

--from-revision

Revision to copy from. Default: latest revision.

--ids

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.

--image -i

Container image, e.g. publisher/image-name:tag.

--max-replicas

The maximum number of replicas.

--memory

Required memory from 0.5 - 4.0 ending with "Gi", e.g. 1.0Gi.

--min-replicas

The minimum number of replicas.

--name -n

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.

--remove-all-env-vars

Remove all environment variable(s) from container..

Default value: False
--remove-env-vars

Remove environment variable(s) from container. Space-separated environment variable names.

--replace-env-vars

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.

--resource-group -g

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

--revision-suffix

User friendly suffix that is appended to the revision name.

--scale-rule-auth --sra

Scale rule auth parameters. Auth parameters must be in format "= = ...".

--scale-rule-http-concurrency --scale-rule-tcp-concurrency --srhc --srtc

The maximum number of concurrent requests before scale out. Only supported for http and tcp scale rules.

--scale-rule-metadata --srm

Scale rule metadata. Metadata must be in format "= = ...".

--scale-rule-name --srn

The name of the scale rule.

--scale-rule-type --srt

The type of the scale rule. Default: http. For more information please visit https://learn.microsoft.com/azure/container-apps/scale-app#scale-triggers.

--set-env-vars

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.

--subscription

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

--tags

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

--workload-profile-name -w

The friendly name for the workload profile.

--yaml

Path to a .yaml file with the configuration of a container app. All other parameters will be ignored. For an example, see https://docs.microsoft.com/azure/container-apps/azure-resource-manager-api-spec#examples.

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

--revision

Name of the revision.

Optional Parameters

--ids

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.

--name -n

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.

--resource-group -g

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

--subscription

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

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

--name -n

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.

--resource-group -g

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

Optional Parameters

--all

Show inactive revisions.

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.

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

--revision

Name of the revision.

Optional Parameters

--ids

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.

--name -n

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.

--resource-group -g

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

--subscription

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

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

--mode

The active revisions mode for the container app.

Accepted values: multiple, single

Optional Parameters

--ids

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.

--name -n

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.

--resource-group -g

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

--subscription

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

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

--revision

Name of the revision.

Optional Parameters

--ids

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.

--name -n

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.

--resource-group -g

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

--subscription

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

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.