שתף באמצעות


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

Preview

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

--name -n

The Session Pool name.

--resource-group -g

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

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. On create if no container name is provided the container name will default to the name of the session pool coverted to lower case.

--container-type

The pool type of the Session Pool, default='PythonLTS'.

Accepted values: CustomContainer, NodeLTS, PythonLTS
--cooldown-period

Period (in seconds), after which the session will be deleted, default=300.

--cpu

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

--env-vars

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.

--environment

Name or resource ID of the container app's environment.

--image -i

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

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--max-sessions

Max count of sessions can be run at the same time.

--memory

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

--network-status

Egress is enabled for the Sessions or not.

Accepted values: EgressDisabled, EgressEnabled
--no-wait

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

Default value: False
--ready-sessions

The number of sessions that will be ready in the session pool all the time.

--registry-password

The password to log in to container registry. If stored as a secret, value must start with 'secretref:' followed by the secret name.

--registry-server

The container registry server hostname, e.g. myregistry.azurecr.io.

--registry-username

The username to log in to container registry.

--secrets -s

A list of secret(s) for the session pool. Space-separated values in 'key=value' format. Empty string to clear existing values.

--target-port

The session port used for ingress traffic.

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

Preview

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

--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 Session Pool name.

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

Preview

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

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

Preview

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

--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 Session Pool 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 sessionpool update

Preview

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

--resource-group -g

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

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. On create if no container name is provided the container name will default to the name of the session pool coverted to lower case.

--cooldown-period

Period (in seconds), after which the session will be deleted, default=300.

--cpu

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

--env-vars

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.

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

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--max-sessions

Max count of sessions can be run at the same time.

--memory

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

--name -n

The Session Pool name.

--network-status

Egress is enabled for the Sessions or not.

Accepted values: EgressDisabled, EgressEnabled
--no-wait

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

Default value: False
--ready-sessions

The number of sessions that will be ready in the session pool all the time.

--registry-password

The password to log in to container registry. If stored as a secret, value must start with 'secretref:' followed by the secret name.

--registry-server

The container registry server hostname, e.g. myregistry.azurecr.io.

--registry-username

The username to log in to container registry.

--secrets -s

A list of secret(s) for the session pool. Space-separated values in 'key=value' format. Empty string to clear existing values.

--subscription

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

--target-port

The session port used for ingress traffic.

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.