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.
Commands to manage session pools.
Commands
Name | Description | Type | Status |
---|---|---|---|
az containerapp sessionpool create |
Create or update a Session pool. |
Extension | GA |
az containerapp sessionpool delete |
Delete a session pool. |
Extension | GA |
az containerapp sessionpool list |
List Session Pools by subscription or resource group. |
Extension | GA |
az containerapp sessionpool show |
Show details of a Session Pool. |
Extension | GA |
az containerapp sessionpool update |
Update a Session pool. |
Extension | GA |
az containerapp sessionpool create
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]
[--mi-system-assigned]
[--mi-user-assigned]
[--network-status {EgressDisabled, EgressEnabled}]
[--no-wait]
[--ready-sessions]
[--registry-identity]
[--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 and Managed Identity to authenticate Azure container 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-identity MyUserIdentityResourceId \
--location eastasia
Create or update a Session Pool with container type CustomContainer with system assigned and user assigned identity.
az containerapp sessionpool create -n mysessionpool -g MyResourceGroup \
--container-type CustomContainer --environment MyEnvironment --image MyImage \
--cpu 0.5 --memory 1Gi --target-port 80 \
--mi-system-assigned --mi-user-assigned MyUserIdentityResourceId \
--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
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. On create if no container name is provided the container name will default to the name of the session pool coverted to lower case.
Property | Value |
---|---|
Parameter group: | Container Arguments |
The pool type of the Session Pool, default='PythonLTS'.
Property | Value |
---|---|
Parameter group: | Configuration Arguments |
Accepted values: | CustomContainer, NodeLTS, PythonLTS |
Period (in seconds), after which the session will be deleted, default=300.
Property | Value |
---|---|
Parameter group: | Configuration Arguments |
Required CPU in cores from 0.25 - 2.0, e.g. 0.5.
Property | Value |
---|---|
Parameter group: | Container Arguments |
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.
Property | Value |
---|---|
Parameter group: | Container Arguments |
Name or resource ID of the container app's environment.
Property | Value |
---|---|
Parameter group: | Container Arguments |
Container image, e.g. publisher/image-name:tag.
Property | Value |
---|---|
Parameter group: | Container Arguments |
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.
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 |
Boolean indicating whether to assign system-assigned identity.
Property | Value |
---|---|
Default value: | False |
Space-separated user identities to be assigned.
Egress is enabled for the Sessions or not.
Property | Value |
---|---|
Parameter group: | Configuration Arguments |
Accepted values: | EgressDisabled, EgressEnabled |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
The number of sessions that will be ready in the session pool all the time.
Property | Value |
---|---|
Parameter group: | Scale Arguments |
The managed identity with which to authenticate to the Azure Container Registry (instead of username/password). Use 'system' for a system-assigned identity, use a resource ID for a user-assigned identity. The managed identity should have been assigned acrpull permissions on the ACR before deployment (use 'az role assignment create --role acrpull ...').
Property | Value |
---|---|
Parameter group: | Registry Arguments |
The password to log in to container registry. If stored as a secret, value must start with 'secretref:' followed by the secret name.
Property | Value |
---|---|
Parameter group: | Registry Arguments |
The container registry server hostname, e.g. myregistry.azurecr.io.
Property | Value |
---|---|
Parameter group: | Registry Arguments |
The username to log in to container registry.
Property | Value |
---|---|
Parameter group: | Registry Arguments |
A list of secret(s) for the session pool. Space-separated values in 'key=value' format. Empty string to clear existing values.
Property | Value |
---|---|
Parameter group: | Configuration Arguments |
The session port used for ingress traffic.
Property | Value |
---|---|
Parameter group: | Container 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.
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 sessionpool delete
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
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 Session Pool name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
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 |
Do not prompt for confirmation.
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.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az containerapp sessionpool list
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
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 containerapp sessionpool show
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
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 Session Pool 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 sessionpool update
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]
[--mi-system-assigned]
[--mi-user-assigned]
[--name]
[--network-status {EgressDisabled, EgressEnabled}]
[--no-wait]
[--ready-sessions]
[--registry-identity]
[--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
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. On create if no container name is provided the container name will default to the name of the session pool coverted to lower case.
Property | Value |
---|---|
Parameter group: | Container Arguments |
Period (in seconds), after which the session will be deleted, default=300.
Property | Value |
---|---|
Parameter group: | Configuration Arguments |
Required CPU in cores from 0.25 - 2.0, e.g. 0.5.
Property | Value |
---|---|
Parameter group: | Container Arguments |
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.
Property | Value |
---|---|
Parameter group: | Container Arguments |
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.
Property | Value |
---|---|
Parameter group: | Container Arguments |
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.
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 |
Boolean indicating whether to assign system-assigned identity.
Property | Value |
---|---|
Default value: | False |
Space-separated user identities to be assigned.
The Session Pool name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Egress is enabled for the Sessions or not.
Property | Value |
---|---|
Parameter group: | Configuration Arguments |
Accepted values: | EgressDisabled, EgressEnabled |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
The number of sessions that will be ready in the session pool all the time.
Property | Value |
---|---|
Parameter group: | Scale Arguments |
The managed identity with which to authenticate to the Azure Container Registry (instead of username/password). Use 'system' for a system-assigned identity, use a resource ID for a user-assigned identity. The managed identity should have been assigned acrpull permissions on the ACR before deployment (use 'az role assignment create --role acrpull ...').
Property | Value |
---|---|
Parameter group: | Registry Arguments |
The password to log in to container registry. If stored as a secret, value must start with 'secretref:' followed by the secret name.
Property | Value |
---|---|
Parameter group: | Registry Arguments |
The container registry server hostname, e.g. myregistry.azurecr.io.
Property | Value |
---|---|
Parameter group: | Registry Arguments |
The username to log in to container registry.
Property | Value |
---|---|
Parameter group: | Registry Arguments |
A list of secret(s) for the session pool. Space-separated values in 'key=value' format. Empty string to clear existing values.
Property | Value |
---|---|
Parameter group: | Configuration 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 session port used for ingress traffic.
Property | Value |
---|---|
Parameter group: | Container 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 |