Share via


az containerapp resiliency

Note

This reference is part of the containerapp extension for the Azure CLI (version 2.62.0 or higher). The extension will automatically install the first time you run an az containerapp resiliency command. Learn more about extensions.

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

Commands to manage resiliency policies for a container app.

Commands

Name Description Type Status
az containerapp resiliency create

Create resiliency policies for a container app.

Extension Preview
az containerapp resiliency delete

Delete resiliency policies for a container app.

Extension Preview
az containerapp resiliency list

List resiliency policies for a container app.

Extension Preview
az containerapp resiliency show

Show resiliency policies for a container app.

Extension Preview
az containerapp resiliency update

Update resiliency policies for a container app.

Extension Preview

az containerapp resiliency create

Preview

Command group 'containerapp resiliency' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create resiliency policies for a container app.

az containerapp resiliency create --container-app-name
                                  --name
                                  --resource-group
                                  [--cb-interval]
                                  [--cb-max-ejection]
                                  [--cb-sequential-errors]
                                  [--http-codes]
                                  [--http-delay]
                                  [--http-errors]
                                  [--http-interval]
                                  [--http-retries]
                                  [--http1-pending]
                                  [--http2-parallel]
                                  [--no-wait]
                                  [--recommended]
                                  [--tcp-connections]
                                  [--tcp-retries]
                                  [--timeout]
                                  [--timeout-connect]
                                  [--yaml]

Examples

Create recommended resiliency policies.

az containerapp resiliency create -g MyResourceGroup \
  -n MyResiliencyName --container-app-name my-containerapp --recommended

Create the timeout resiliency policy.

az containerapp resiliency create -g MyResourceGroup \
  -n MyResiliencyName --container-app-name my-containerapp \
  --timeout 15 --timeout-connect 5

Create resiliency policies using a yaml configuration.

az containerapp resiliency create -g MyResourceGroup \
  -n MyResiliencyName --container-app-name my-containerapp \
  --yaml "path/to/yaml/file.yml"

Required Parameters

--container-app-name

The name of the existing Container App.

--name -n

The name of the Container App Resiliency Policy. 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 30 characters.

--resource-group -g

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

Optional Parameters

--cb-interval

The time interval in seconds between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service. Default: 10.

--cb-max-ejection

The maximum % of container app replicas that can be ejected. It will eject at least one host regardless of the value. Default: 100.

--cb-sequential-errors

The number of consecutive server-side error responses (for HTTP traffic, 5xx responses; for TCP traffic, failure to respond PONG; etc.) before a consecutive 5xx ejection occurs. Default: 5.

--http-codes

A retry will be attempted if the response status code matches any status code in this list.

--http-delay

Specify the base interval in milliseconds between retries. Default: 1000.

--http-errors

A retry will be attempted if the response error message matches any error in this list. Default: 5xx.

--http-interval

Specify the maximum interval in milliseconds between retries. Default: 10000.

--http-retries

Specify the max number of retries. Default: 3.

--http1-pending

The maximum number of pending requests that will be allowed to the container app. Default: 1024.

--http2-parallel

The maximum number of parallel requests that will be made to the container app. Default: 1024.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--recommended

Set recommended values of resiliency policies for a container app.

Default value: False
--tcp-connections

The maximum number of connections that will be made to the container app.

--tcp-retries

The maximum number of unsuccessful connection attempts that will be made before giving up.

--timeout

Specify the timeout in seconds. This spans between the point at which the entire request has been processed and when the response has been completely processed. This timeout includes all retries. Default: 60.

--timeout-connect

The timeout in seconds for new network connections to the container app. Default: 5.

--yaml

Path to a .yaml file with the configuration of a container app resiliency policy. All other parameters will be ignored.

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

Preview

Command group 'containerapp resiliency' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete resiliency policies for a container app.

az containerapp resiliency delete --container-app-name
                                  --resource-group
                                  [--ids]
                                  [--name]
                                  [--no-wait]
                                  [--subscription]
                                  [--yes]

Examples

Delete resiliency policies for a container app.

az containerapp resiliency delete -g MyResourceGroup \
  -n MyResiliencyName --container-app-name MyContainerApp

Required Parameters

--container-app-name

The name of the existing Container App.

--resource-group -g

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

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 Container App Resiliency Policy. 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 30 characters.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--subscription

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

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

az containerapp resiliency list

Preview

Command group 'containerapp resiliency' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List resiliency policies for a container app.

az containerapp resiliency list --container-app-name
                                --resource-group

Examples

List resiliency policies for a container app.

az containerapp resiliency list -g MyResourceGroup \
  --container-app-name MyContainerApp

Required Parameters

--container-app-name

The name of the existing Container App.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<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 containerapp resiliency show

Preview

Command group 'containerapp resiliency' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show resiliency policies for a container app.

az containerapp resiliency show --container-app-name
                                --resource-group
                                [--ids]
                                [--name]
                                [--subscription]

Examples

Show resiliency policies for a container app.

az containerapp resiliency show -g MyResourceGroup \
  -n MyResiliencyName --container-app-name MyContainerApp

Required Parameters

--container-app-name

The name of the existing Container App.

--resource-group -g

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

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 Container App Resiliency Policy. 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 30 characters.

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

Preview

Command group 'containerapp resiliency' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update resiliency policies for a container app.

az containerapp resiliency update --container-app-name
                                  --resource-group
                                  [--cb-interval]
                                  [--cb-max-ejection]
                                  [--cb-sequential-errors]
                                  [--http-codes]
                                  [--http-delay]
                                  [--http-errors]
                                  [--http-interval]
                                  [--http-retries]
                                  [--http1-pending]
                                  [--http2-parallel]
                                  [--ids]
                                  [--name]
                                  [--no-wait]
                                  [--subscription]
                                  [--tcp-connections]
                                  [--tcp-retries]
                                  [--timeout]
                                  [--timeout-connect]
                                  [--yaml]

Examples

Update the TCP Connection Pool resiliency policy.

az containerapp resiliency update -g MyResourceGroup \
  -n MyResiliencyName --container-app-name my-containerapp \
  --tcp-connections 1024

Update resiliency policies using a yaml configuration.

az containerapp resiliency update -g MyResourceGroup \
  -n MyResiliencyName --container-app-name my-containerapp \
  --yaml "path/to/yaml/file.yml"

Required Parameters

--container-app-name

The name of the existing Container App.

--resource-group -g

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

Optional Parameters

--cb-interval

The time interval in seconds between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service. Default: 10.

--cb-max-ejection

The maximum % of container app replicas that can be ejected. It will eject at least one host regardless of the value. Default: 100.

--cb-sequential-errors

The number of consecutive server-side error responses (for HTTP traffic, 5xx responses; for TCP traffic, failure to respond PONG; etc.) before a consecutive 5xx ejection occurs. Default: 5.

--http-codes

A retry will be attempted if the response status code matches any status code in this list.

--http-delay

Specify the base interval in milliseconds between retries. Default: 1000.

--http-errors

A retry will be attempted if the response error message matches any error in this list. Default: 5xx.

--http-interval

Specify the maximum interval in milliseconds between retries. Default: 10000.

--http-retries

Specify the max number of retries. Default: 3.

--http1-pending

The maximum number of pending requests that will be allowed to the container app. Default: 1024.

--http2-parallel

The maximum number of parallel requests that will be made to the container app. Default: 1024.

--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 Container App Resiliency Policy. 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 30 characters.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--subscription

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

--tcp-connections

The maximum number of connections that will be made to the container app.

--tcp-retries

The maximum number of unsuccessful connection attempts that will be made before giving up.

--timeout

Specify the timeout in seconds. This spans between the point at which the entire request has been processed and when the response has been completely processed. This timeout includes all retries. Default: 60.

--timeout-connect

The timeout in seconds for new network connections to the container app. Default: 5.

--yaml

Path to a .yaml file with the configuration of a container app resiliency policy. All other parameters will be ignored.

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.