将 GetFunctionConcurrency 与 CLI 配合使用 - AWS SDK 代码示例

AWS 文档 SDK 示例 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 Reference (V4)》中的 GetFunctionConcurrency

Tools for PowerShell V5

示例 1:本示例获取了 Lambda 函数的预留并发

Get-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -Select *

输出

ReservedConcurrentExecutions ---------------------------- 100
  • 有关 API 详细信息,请参阅《AWS Tools for PowerShell Cmdlet Reference (V5)》中的 GetFunctionConcurrency