Share via


az containerapp session code-interpreter

Note

This reference is part of the containerapp extension for the Azure CLI (version 2.53.0 or higher). The extension will automatically install the first time you run an az containerapp session code-interpreter 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 interact with and manage code interpreter sessions.

Commands

Name Description Type Status
az containerapp session code-interpreter delete-file

Delete a file uploaded to a code interpreter session.

Extension Preview
az containerapp session code-interpreter execute

Execute code in a code interpreter session.

Extension Preview
az containerapp session code-interpreter list-files

List files uploaded to a code interpreter session.

Extension Preview
az containerapp session code-interpreter show-file-content

Show the content a file uploaded to a code interpreter session.

Extension Preview
az containerapp session code-interpreter show-file-metadata

Shows the meta-data content a file uploaded to a code interpreter session.

Extension Preview
az containerapp session code-interpreter upload-file

Upload a file to a code interpreter session .

Extension Preview

az containerapp session code-interpreter delete-file

Preview

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

Delete a file uploaded to a code interpreter session.

az containerapp session code-interpreter delete-file --filename
                                                     --identifier
                                                     --resource-group
                                                     [--ids]
                                                     [--name]
                                                     [--no-wait]
                                                     [--session-pool-location]
                                                     [--subscription]
                                                     [--yes]

Examples

Delete a file .

az containerapp session code-interpreter delete-file -n MySessionPool -g MyResourceGroup --identifier MySession \ --filename example.txt

Required Parameters

--filename

The file to delete or show from the session.

--identifier -i

The Session Identifier.

--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
--session-pool-location

The location of the session pool.

--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 session code-interpreter execute

Preview

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

Execute code in a code interpreter session.

az containerapp session code-interpreter execute --code
                                                 --identifier
                                                 --resource-group
                                                 [--ids]
                                                 [--name]
                                                 [--no-wait]
                                                 [--session-pool-location]
                                                 [--subscription]
                                                 [--timeout-in-seconds]

Examples

Execute a simple hello world.

az containerapp session code-interpreter execute -n MySessionPool -g MyResourceGroup --identifier MySession \
    --code 'print("'"Hello world"'")' --timeout-in-seconds 30 --session-pool-location eastasia

Required Parameters

--code

The code to execute in the code interpreter session.

--identifier -i

The Session Identifier.

--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
--session-pool-location

The location of the session pool.

--subscription

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

--timeout-in-seconds

Duration in seconds code in session can run prior to timing out 0 - 60 secs, e.g. 30.

Default value: 60
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 session code-interpreter list-files

Preview

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

List files uploaded to a code interpreter session.

az containerapp session code-interpreter list-files --identifier
                                                    --resource-group
                                                    [--ids]
                                                    [--name]
                                                    [--path]
                                                    [--session-pool-location]
                                                    [--subscription]

Examples

List files uploaded in a code-interpreter session.

az containerapp session code-interpreter list-files -n MySessionPool -g MyResourceGroup --identifier MySession

Required Parameters

--identifier -i

The Session Identifier.

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

--path

The path to list files from the session.

--session-pool-location

The location of the session pool.

--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 session code-interpreter show-file-content

Preview

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

Show the content a file uploaded to a code interpreter session.

az containerapp session code-interpreter show-file-content --filename
                                                           --identifier
                                                           --resource-group
                                                           [--ids]
                                                           [--name]
                                                           [--session-pool-location]
                                                           [--subscription]

Examples

Show content of file.

az containerapp session code-interpreter show-file-content -n MySessionPool -g MyResourceGroup --identifier MySession \ --filename example.txt

Required Parameters

--filename

The file to delete or show from the session.

--identifier -i

The Session Identifier.

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

--session-pool-location

The location of the session pool.

--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 session code-interpreter show-file-metadata

Preview

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

Shows the meta-data content a file uploaded to a code interpreter session.

az containerapp session code-interpreter show-file-metadata --filename
                                                            --identifier
                                                            --resource-group
                                                            [--ids]
                                                            [--name]
                                                            [--session-pool-location]
                                                            [--subscription]

Examples

Show the meta-data details of a file uploaded to a session.

az containerapp session code-interpreter show-file-metadata -n MySessionPool -g MyResourceGroup --identifier MySession \ --filename example.txt

Required Parameters

--filename

The file to delete or show from the session.

--identifier -i

The Session Identifier.

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

--session-pool-location

The location of the session pool.

--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 session code-interpreter upload-file

Preview

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

Upload a file to a code interpreter session .

az containerapp session code-interpreter upload-file --filepath
                                                     --identifier
                                                     --resource-group
                                                     [--ids]
                                                     [--name]
                                                     [--no-wait]
                                                     [--session-pool-location]
                                                     [--subscription]

Examples

Upload a file to a session.

az containerapp session code-interpreter upload-file -n MySessionPool -g MyResourceGroup --identifier MySession \
    --filepath example.txt

Required Parameters

--filepath

The local path to the file to upload to the session.

--identifier -i

The Session Identifier.

--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
--session-pool-location

The location of the session pool.

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