

文档 AWS SDK 示例 GitHub 存储库中还有更多 [S AWS DK 示例](https://github.com/awsdocs/aws-doc-sdk-examples)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 将 `GetFunctionConcurrency` 与 CLI 配合使用
<a name="lambda_example_lambda_GetFunctionConcurrency_section"></a>

以下代码示例演示如何使用 `GetFunctionConcurrency`。

------
#### [ CLI ]

**AWS CLI**  
**查看函数的预留并发设置**  
以下 `get-function-concurrency` 示例检索了指定函数的预留并发设置。  

```
aws lambda get-function-concurrency \
    --function-name my-function
```
输出：  

```
{
    "ReservedConcurrentExecutions": 250
}
```
+  有关 API 的详细信息，请参阅*AWS CLI 命令参考[GetFunctionConcurrency](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/get-function-concurrency.html)*中的。

------
#### [ PowerShell ]

**适用于 PowerShell V4 的工具**  
**示例 1：本示例获取了 Lambda 函数的预留并发**  

```
Get-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -Select *
```
**输出**：  

```
ReservedConcurrentExecutions
----------------------------
100
```
+  有关 API 的详细信息，请参阅 *AWS Tools for PowerShell Cmdlet 参考 (V* 4) [GetFunctionConcurrency](https://docs.aws.amazon.com/powershell/v4/reference)中的。

**适用于 PowerShell V5 的工具**  
**示例 1：本示例获取了 Lambda 函数的预留并发**  

```
Get-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -Select *
```
**输出**：  

```
ReservedConcurrentExecutions
----------------------------
100
```
+  有关 API 的详细信息，请参阅 *AWS Tools for PowerShell Cmdlet 参考 (V* 5) [GetFunctionConcurrency](https://docs.aws.amazon.com/powershell/v5/reference)中的。

------