Access to this page requires authorization. You can try
signing in
or
changing directories
.
Access to this page requires authorization. You can try
changing directories
.
[--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
--name -n
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 ...').
Examples
Delete a session pool.
az containerapp sessionpool delete -n mysessionpool -g MyResourceGroup
Required Parameters
--resource-group -g
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
--resource-group -g
Examples
Show the details of a Session Pool.
az containerapp sessionpool show -n mysessionpool -g MyResourceGroup
Required Parameters
--resource-group -g
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
--resource-group -g