本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
搭配使用 GetFunctionConcurrency
與 CLI
下列程式碼範例示範如何使用 GetFunctionConcurrency
。
- CLI
-
- AWS CLI
-
若要檢視函數的預留並行設定
下列
get-function-concurrency
範例會擷取指定函數的預留並行設定。aws lambda get-function-concurrency \ --function-name
my-function
輸出:
{ "ReservedConcurrentExecutions": 250 }
-
如需 API 詳細資訊,請參閱《AWS CLI 命令參考》中的 GetFunctionConcurrency
。
-
- PowerShell
-
- PowerShell V4 的工具
-
範例 1:此範例會取得 Lambda 函數的預留並行
Get-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -Select *
輸出:
ReservedConcurrentExecutions ---------------------------- 100
-
如需 API 詳細資訊,請參閱AWS Tools for PowerShell 《 Cmdlet Reference (V4)》中的 GetFunctionConcurrency。
-
- PowerShell V5 的工具
-
範例 1:此範例會取得 Lambda 函數的預留並行
Get-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -Select *
輸出:
ReservedConcurrentExecutions ---------------------------- 100
-
如需 API 詳細資訊,請參閱AWS Tools for PowerShell 《 Cmdlet Reference (V5)》中的 GetFunctionConcurrency。
-
如需 AWS SDK 開發人員指南和程式碼範例的完整清單,請參閱 搭配 AWS SDK 使用 Lambda。此主題也包含有關入門的資訊和舊版 SDK 的詳細資訊。
GetFunction
GetFunctionConfiguration