az containerapp sessionpool
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 sessionpool 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 session pools.
Commands
Name | Description | Type | Status |
---|---|---|---|
az containerapp sessionpool create |
Create or update a Session pool. |
Extension | Preview |
az containerapp sessionpool delete |
Delete a session pool. |
Extension | Preview |
az containerapp sessionpool list |
List Session Pools by subscription or resource group. |
Extension | Preview |
az containerapp sessionpool show |
Show details of a Session Pool. |
Extension | Preview |
az containerapp sessionpool update |
Update a Session pool. |
Extension | Preview |
az containerapp sessionpool create
Command group 'containerapp sessionpool' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create or update a Session pool.
az containerapp sessionpool create --name
--resource-group
[--args]
[--command]
[--container-name]
[--container-type {CustomContainer, NodeLTS, PythonLTS}]
[--cooldown-period]
[--cpu]
[--env-vars]
[--environment]
[--image]
[--location]
[--max-sessions]
[--memory]
[--network-status {EgressDisabled, EgressEnabled}]
[--no-wait]
[--ready-sessions]
[--registry-password]
[--registry-server]
[--registry-username]
[--secrets]
[--target-port]
Examples
Create or update a Session Pool with container type PythonLTS default settings.
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \
--location eastasia
Create or update a Session Pool with container type PythonLTS, with max concurrent sessions is 30, ready session instances 20.
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \
--container-type PythonLTS --max-sessions 30 --ready-sessions 20 \
--location eastasia
Create or update a Session Pool with container type CustomContainer with default quickstart image.
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \
--container-type CustomContainer --environment MyEnvironment \
--cpu 0.5 --memory 1Gi --target-port 80 --location eastasia --image mcr.microsoft.com/k8se/quickstart:latest
Create or update a Session Pool with container type CustomContainer that has secrets and environment variables.
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \
--container-type CustomContainer --environment MyEnvironment \
--cpu 0.5 --memory 1Gi --target-port 80 --image MyImage \
--env-vars GREETING="Hello, world" SECRETENV=secretref:anothersecret \
--secrets mysecret=secretvalue1 anothersecret="secret value 2" --location eastasia
Create or update a Session Pool with container type CustomContainer that from private registry
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \
--container-type CustomContainer --environment MyEnvironment --image MyImage \
--cpu 0.5 --memory 1Gi --target-port 80 --registry-server myregistry.azurecr.io \
--registry-username myregistry --registry-password $REGISTRY_PASSWORD \
--location eastasia
Create or update a Session Pool with container type CustomContainer with cooldown period 360s
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \
--environment MyEnvironment --cpu 0.5 --memory 1Gi --target-port 80 --container-type CustomContainer \
--cooldown-period 360 --location eastasia
Required Parameters
The Session Pool name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
A list of container startup command argument(s). Space-separated values e.g. "-c" "mycommand". Empty string to clear existing values.
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.
Name of the container. On create if no container name is provided the container name will default to the name of the session pool coverted to lower case.
The pool type of the Session Pool, default='PythonLTS'.
Period (in seconds), after which the session will be deleted, default=300.
Required CPU in cores from 0.25 - 2.0, e.g. 0.5.
A list of environment variable(s) for the container. Space-separated values in 'key=value' format. Empty string to clear existing values. Prefix value with 'secretref:' to reference a secret.
Name or resource ID of the container app's environment.
Container image, e.g. publisher/image-name:tag.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Max count of sessions can be run at the same time.
Required memory from 0.5 - 4.0 ending with "Gi", e.g. 1.0Gi.
Egress is enabled for the Sessions or not.
Do not wait for the long-running operation to finish.
The number of sessions that will be ready in the session pool all the time.
The password to log in to container registry. If stored as a secret, value must start with 'secretref:' followed by the secret name.
The container registry server hostname, e.g. myregistry.azurecr.io.
The username to log in to container registry.
A list of secret(s) for the session pool. Space-separated values in 'key=value' format. Empty string to clear existing values.
The session port used for ingress traffic.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az containerapp sessionpool delete
Command group 'containerapp sessionpool' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete a session pool.
az containerapp sessionpool delete --resource-group
[--ids]
[--name]
[--no-wait]
[--subscription]
[--yes]
Examples
Delete a session pool.
az containerapp sessionpool delete -n mysessionpool -g MyResourceGroup
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
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.
The Session Pool name.
Do not wait for the long-running operation to finish.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az containerapp sessionpool list
Command group 'containerapp sessionpool' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List Session Pools by subscription or resource group.
az containerapp sessionpool list [--resource-group]
Examples
List Session Pools in the current subscription.
az containerapp sessionpool list
List Session Pools by resource group.
az containerapp sessionpool list -g MyResourceGroup
Optional Parameters
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.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az containerapp sessionpool show
Command group 'containerapp sessionpool' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show details of a Session Pool.
az containerapp sessionpool show --resource-group
[--ids]
[--name]
[--subscription]
Examples
Show the details of a Session Pool.
az containerapp sessionpool show -n mysessionpool -g MyResourceGroup
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
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.
The Session Pool name.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az containerapp sessionpool update
Command group 'containerapp sessionpool' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update a Session pool.
az containerapp sessionpool update --resource-group
[--args]
[--command]
[--container-name]
[--cooldown-period]
[--cpu]
[--env-vars]
[--ids]
[--image]
[--location]
[--max-sessions]
[--memory]
[--name]
[--network-status {EgressDisabled, EgressEnabled}]
[--no-wait]
[--ready-sessions]
[--registry-password]
[--registry-server]
[--registry-username]
[--secrets]
[--subscription]
[--target-port]
Examples
Update a session pool's max concurrent sessions configuration and image.
az containerapp sessionpool update -n mysessionpool -g MyResourceGroup --max-sessions 20 --image MyNewImage
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
A list of container startup command argument(s). Space-separated values e.g. "-c" "mycommand". Empty string to clear existing values.
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.
Name of the container. On create if no container name is provided the container name will default to the name of the session pool coverted to lower case.
Period (in seconds), after which the session will be deleted, default=300.
Required CPU in cores from 0.25 - 2.0, e.g. 0.5.
A list of environment variable(s) for the container. Space-separated values in 'key=value' format. Empty string to clear existing values. Prefix value with 'secretref:' to reference a secret.
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.
Container image, e.g. publisher/image-name:tag.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Max count of sessions can be run at the same time.
Required memory from 0.5 - 4.0 ending with "Gi", e.g. 1.0Gi.
The Session Pool name.
Egress is enabled for the Sessions or not.
Do not wait for the long-running operation to finish.
The number of sessions that will be ready in the session pool all the time.
The password to log in to container registry. If stored as a secret, value must start with 'secretref:' followed by the secret name.
The container registry server hostname, e.g. myregistry.azurecr.io.
The username to log in to container registry.
A list of secret(s) for the session pool. Space-separated values in 'key=value' format. Empty string to clear existing values.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
The session port used for ingress traffic.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
Azure CLI