az containerapp session code-interpreter

注意

此參考是 Azure CLI 容器應用程式延伸模組的一部分(2.62.0 版或更高版本)。 擴充功能會在您第一次執行 az containerapp session code-解釋器 命令時自動安裝。 深入了解擴充功能。

此命令群組處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

與程式代碼解釋器會話互動和管理的命令。

命令

名稱 Description 類型 狀態
az containerapp session code-interpreter delete-file

刪除上傳至程式代碼解釋器會話的檔案。

副檔名 預覽​​
az containerapp session code-interpreter execute

在程式代碼解釋器會話中執行程序代碼。

副檔名 預覽​​
az containerapp session code-interpreter list-files

列出上傳至程式代碼解釋器會話的檔案。

副檔名 預覽​​
az containerapp session code-interpreter show-file-content

顯示上傳至程式代碼解釋器會話的檔案內容。

副檔名 預覽​​
az containerapp session code-interpreter show-file-metadata

顯示上傳至程式代碼解釋器會話之檔案的元數據內容。

副檔名 預覽​​
az containerapp session code-interpreter upload-file

將檔案上傳至程式代碼解釋器工作階段 。

副檔名 預覽​​

az containerapp session code-interpreter delete-file

預覽

命令群組 『containerapp 工作階段程式代碼解釋器』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

刪除上傳至程式代碼解釋器會話的檔案。

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

範例

刪除檔案。

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

必要參數

--filename

要從工作階段中刪除或顯示的檔案。

--identifier -i

會話標識碼。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

工作階段集區名稱。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--session-pool-location

工作階段集區的位置。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

--yes -y

不提示確認。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az containerapp session code-interpreter execute

預覽

命令群組 『containerapp 工作階段程式代碼解釋器』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

在程式代碼解釋器會話中執行程序代碼。

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

範例

執行簡單的你好世界。

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

必要參數

--code

在程式代碼解釋器會話中執行的程序代碼。

--identifier -i

會話標識碼。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

工作階段集區名稱。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--session-pool-location

工作階段集區的位置。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

--timeout-in-seconds

會話中程式代碼的持續時間可以在逾時 0 - 60 秒之前執行,例如 30 秒。

預設值: 60
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az containerapp session code-interpreter list-files

預覽

命令群組 『containerapp 工作階段程式代碼解釋器』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出上傳至程式代碼解釋器會話的檔案。

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

範例

列出在程式代碼解釋器會話中上傳的檔案。

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

必要參數

--identifier -i

會話標識碼。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

工作階段集區名稱。

--path

從工作階段列出檔案的路徑。

--session-pool-location

工作階段集區的位置。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az containerapp session code-interpreter show-file-content

預覽

命令群組 『containerapp 工作階段程式代碼解釋器』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

顯示上傳至程式代碼解釋器會話的檔案內容。

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

範例

顯示檔案的內容。

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

必要參數

--filename

要從工作階段中刪除或顯示的檔案。

--identifier -i

會話標識碼。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

工作階段集區名稱。

--session-pool-location

工作階段集區的位置。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az containerapp session code-interpreter show-file-metadata

預覽

命令群組 『containerapp 工作階段程式代碼解釋器』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

顯示上傳至程式代碼解釋器會話之檔案的元數據內容。

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

範例

顯示上傳至會話之檔案的元數據詳細數據。

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

必要參數

--filename

要從工作階段中刪除或顯示的檔案。

--identifier -i

會話標識碼。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

工作階段集區名稱。

--session-pool-location

工作階段集區的位置。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az containerapp session code-interpreter upload-file

預覽

命令群組 『containerapp 工作階段程式代碼解釋器』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

將檔案上傳至程式代碼解釋器工作階段 。

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

範例

將檔案上傳至工作階段。

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

必要參數

--filepath

要上傳至會話之檔案的本機路徑。

--identifier -i

會話標識碼。

--resource-group -g

資源群組的名稱。 您可以使用 az configure --defaults group=<name> 來設定預設群組。

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是完整資源識別碼,其中包含「資源標識碼」引數的所有資訊。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

工作階段集區名稱。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--session-pool-location

工作階段集區的位置。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 az account set -s NAME_OR_ID 設定預設訂用帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。