搭配使用 GetFunctionConcurrency 與 CLI - AWS SDK 程式碼範例

AWS文件開發套件範例 GitHub 儲存庫中有更多可用的 AWS SDK 範例。

搭配使用 GetFunctionConcurrency 與 CLI

下列程式碼範例示範如何使用 GetFunctionConcurrency

CLI
AWS CLI

若要檢視函數的預留並行設定

下列 get-function-concurrency 範例會擷取指定函數的預留並行設定。

aws lambda get-function-concurrency \ --function-name my-function

輸出:

{ "ReservedConcurrentExecutions": 250 }
PowerShell
Tools for PowerShell V4

範例 1:此範例會取得 Lambda 函數的預留並行

Get-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -Select *

輸出:

ReservedConcurrentExecutions ---------------------------- 100
  • 如需 API 詳細資訊,請參閱《AWS Tools for PowerShell Cmdlet 參考 (V4)》中的 GetFunctionConcurrency

Tools for PowerShell V5

範例 1:此範例會取得 Lambda 函數的預留並行

Get-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -Select *

輸出:

ReservedConcurrentExecutions ---------------------------- 100
  • 如需 API 詳細資訊,請參閱《AWS Tools for PowerShell Cmdlet 參考 (V5)》中的 GetFunctionConcurrency