

# CLI で `PutFunctionConcurrency` を使用する
<a name="example_lambda_PutFunctionConcurrency_section"></a>

次のサンプルコードは、`PutFunctionConcurrency` を使用する方法を説明しています。

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

**AWS CLI**  
**関数に予約済み同時実行制限を設定する方法**  
次の `put-function-concurrency` の例では、`my-function` 関数に 100 個の予約済み同時実行数を設定します。  

```
aws lambda put-function-concurrency \
    --function-name  my-function  \
    --reserved-concurrent-executions 100
```
出力:  

```
{
    "ReservedConcurrentExecutions": 100
}
```
詳細については、「*AWS Lambda デベロッパーガイド*」の「[Lambda 関数の同時実行の予約](https://docs.aws.amazon.com/lambda/latest/dg/per-function-concurrency.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[PutFunctionConcurrency](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/put-function-concurrency.html)」を参照してください。

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

**Tools for PowerShell V4**  
**例 1: この例では、関数全体の同時実行設定を適用します。**  

```
Write-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -ReservedConcurrentExecution 100
```
+  API の詳細については、「*AWS Tools for PowerShell コマンドレットリファレンス (V4)*」の「[PutFunctionConcurrency](https://docs.aws.amazon.com/powershell/v4/reference)」を参照してください。

**Tools for PowerShell V5**  
**例 1: この例では、関数全体の同時実行設定を適用します。**  

```
Write-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -ReservedConcurrentExecution 100
```
+  API の詳細については、「*AWS Tools for PowerShell コマンドレットリファレンス (V5)*」の「[PutFunctionConcurrency](https://docs.aws.amazon.com/powershell/v5/reference)」を参照してください。

------

AWS SDK デベロッパーガイドとコード例の詳細なリストについては、[AWS SDK での Lambda を使用する](sdk-general-information-section.md) を参照してください。このトピックには、使用開始方法に関する情報と、以前の SDK バージョンの詳細も含まれています。