Share via


az containerapp session code-interpreter

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 session code-interpreter command. Learn more about extensions.

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

Execute code in a code interpreter session.

Extension GA
az containerapp session code-interpreter list-files

List files uploaded to a code interpreter session.

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

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

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

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

Extension GA
az containerapp session code-interpreter upload-file

Upload a file to a code interpreter session .

Extension GA

az containerapp session code-interpreter delete-file

Delete a file uploaded to a code interpreter session.

az containerapp session code-interpreter delete-file --filename
                                                     --identifier
                                                     --resource-group
                                                     [--ids]
                                                     [--name]
                                                     [--no-wait]
                                                     [--path]
                                                     [--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 --path /

Required Parameters

--filename

The file to delete or show from the session.

Property Value
Parameter group: file Arguments
--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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Parameter group: Resource Id Arguments
--name -n

The Session Pool name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
Default value: False
--path

The path of files in the session.

Property Value
Parameter group: file Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az containerapp session code-interpreter execute

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.

Property Value
Parameter group: execute Arguments
--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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Parameter group: Resource Id Arguments
--name -n

The Session Pool name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

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

Property Value
Parameter group: Resource Id Arguments
--timeout-in-seconds

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

Property Value
Parameter group: execute Arguments
Default value: 60
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az containerapp session code-interpreter list-files

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 --path /

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Parameter group: Resource Id Arguments
--name -n

The Session Pool name.

Property Value
Parameter group: Resource Id Arguments
--path

The path of files in the session.

Property Value
Parameter group: file Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az containerapp session code-interpreter show-file-content

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]
                                                           [--path]
                                                           [--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 --path /

Required Parameters

--filename

The file to delete or show from the session.

Property Value
Parameter group: file Arguments
--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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Parameter group: Resource Id Arguments
--name -n

The Session Pool name.

Property Value
Parameter group: Resource Id Arguments
--path

The path of files in the session.

Property Value
Parameter group: file Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az containerapp session code-interpreter show-file-metadata

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]
                                                            [--path]
                                                            [--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 --path /

Required Parameters

--filename

The file to delete or show from the session.

Property Value
Parameter group: file Arguments
--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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Parameter group: Resource Id Arguments
--name -n

The Session Pool name.

Property Value
Parameter group: Resource Id Arguments
--path

The path of files in the session.

Property Value
Parameter group: file Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az containerapp session code-interpreter upload-file

Upload a file to a code interpreter session .

az containerapp session code-interpreter upload-file --filepath
                                                     --identifier
                                                     --resource-group
                                                     [--ids]
                                                     [--name]
                                                     [--no-wait]
                                                     [--path]
                                                     [--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 --path /

Required Parameters

--filepath

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

Property Value
Parameter group: file Arguments
--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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Parameter group: Resource Id Arguments
--name -n

The Session Pool name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
Default value: False
--path

The path of files in the session.

Property Value
Parameter group: file Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False