

Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh [SDK AWS Doc](https://github.com/awsdocs/aws-doc-sdk-examples). GitHub 

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Contoh Lambda menggunakan Alat untuk V4 PowerShell
<a name="powershell_4_lambda_code_examples"></a>

Contoh kode berikut menunjukkan cara melakukan tindakan dan mengimplementasikan skenario umum dengan menggunakan Alat AWS untuk PowerShell V4 dengan Lambda.

*Tindakan* merupakan kutipan kode dari program yang lebih besar dan harus dijalankan dalam konteks. Sementara tindakan menunjukkan cara memanggil fungsi layanan individual, Anda dapat melihat tindakan dalam konteks dalam skenario terkait.

Setiap contoh menyertakan tautan ke kode sumber lengkap, di mana Anda dapat menemukan instruksi tentang cara mengatur dan menjalankan kode dalam konteks.

**Topics**
+ [Tindakan](#actions)

## Tindakan
<a name="actions"></a>

### `Add-LMResourceTag`
<a name="lambda_TagResource_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Add-LMResourceTag`.

**Alat untuk PowerShell V4**  
**Contoh 1: Menambahkan tiga tag (Washington, Oregon dan California) dan nilai terkaitnya ke fungsi tertentu yang diidentifikasi oleh ARN-nya.**  

```
Add-LMResourceTag -Resource "arn:aws:lambda:us-west-2:123456789012:function:MyFunction" -Tag @{ "Washington" = "Olympia"; "Oregon" = "Salem"; "California" = "Sacramento" }
```
+  Untuk detail API, lihat [TagResource](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Get-LMAccountSetting`
<a name="lambda_GetAccountSettings_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Get-LMAccountSetting`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini ditampilkan untuk membandingkan Batas Akun dan Penggunaan Akun**  

```
Get-LMAccountSetting | Select-Object @{Name="TotalCodeSizeLimit";Expression={$_.AccountLimit.TotalCodeSize}}, @{Name="TotalCodeSizeUsed";Expression={$_.AccountUsage.TotalCodeSize}}
```
**Output:**  

```
TotalCodeSizeLimit TotalCodeSizeUsed
------------------ -----------------
       80530636800          15078795
```
+  Untuk detail API, lihat [GetAccountSettings](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Get-LMAlias`
<a name="lambda_GetAlias_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Get-LMAlias`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini mengambil bobot Routing Config untuk Alias Fungsi Lambda tertentu.**  

```
Get-LMAlias -FunctionName "MylambdaFunction123" -Name "newlabel1" -Select RoutingConfig
```
**Output:**  

```
AdditionalVersionWeights
------------------------
{[1, 0.6]}
```
+  Untuk detail API, lihat [GetAlias](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Get-LMFunctionConcurrency`
<a name="lambda_GetFunctionConcurrency_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Get-LMFunctionConcurrency`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini mendapatkan konkurensi Cadangan untuk Fungsi Lambda**  

```
Get-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -Select *
```
**Output:**  

```
ReservedConcurrentExecutions
----------------------------
100
```
+  Untuk detail API, lihat [GetFunctionConcurrency](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Get-LMFunctionConfiguration`
<a name="lambda_GetFunctionConfiguration_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Get-LMFunctionConfiguration`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini mengembalikan konfigurasi spesifik versi dari Fungsi Lambda.**  

```
Get-LMFunctionConfiguration -FunctionName "MylambdaFunction123" -Qualifier "PowershellAlias"
```
**Output:**  

```
CodeSha256                 : uWOW0R7z+f0VyLuUg7+/D08hkMFsq0SF4seuyUZJ/R8=
CodeSize                   : 1426
DeadLetterConfig           : Amazon.Lambda.Model.DeadLetterConfig
Description                : Verson 3 to test Aliases
Environment                : Amazon.Lambda.Model.EnvironmentResponse
FunctionArn                : arn:aws:lambda:us-east-1:123456789012:function:MylambdaFunction123
                             :PowershellAlias
FunctionName               : MylambdaFunction123
Handler                    : lambda_function.launch_instance
KMSKeyArn                  : 
LastModified               : 2019-12-25T09:52:59.872+0000
LastUpdateStatus           : Successful
LastUpdateStatusReason     : 
LastUpdateStatusReasonCode : 
Layers                     : {}
MasterArn                  : 
MemorySize                 : 128
RevisionId                 : 5d7de38b-87f2-4260-8f8a-e87280e10c33
Role                       : arn:aws:iam::123456789012:role/service-role/lambda
Runtime                    : python3.8
State                      : Active
StateReason                : 
StateReasonCode            : 
Timeout                    : 600
TracingConfig              : Amazon.Lambda.Model.TracingConfigResponse
Version                    : 4
VpcConfig                  : Amazon.Lambda.Model.VpcConfigDetail
```
+  Untuk detail API, lihat [GetFunctionConfiguration](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Get-LMFunctionList`
<a name="lambda_ListFunctions_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Get-LMFunctionList`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini menampilkan semua fungsi Lambda dengan ukuran kode yang diurutkan**  

```
Get-LMFunctionList | Sort-Object -Property CodeSize | Select-Object FunctionName, RunTime, Timeout, CodeSize
```
**Output:**  

```
FunctionName                                                 Runtime   Timeout CodeSize
------------                                                 -------   ------- --------
test                                                         python2.7       3      243
MylambdaFunction123                                          python3.8     600      659
myfuncpython1                                                python3.8     303      675
```
+  Untuk detail API, lihat [ListFunctions](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Get-LMPolicy`
<a name="lambda_GetPolicy_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Get-LMPolicy`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini menampilkan kebijakan Fungsi dari fungsi Lambda**  

```
Get-LMPolicy -FunctionName test -Select Policy
```
**Output:**  

```
{"Version":"2012-10-17",		 	 	 "Id":"default","Statement":[{"Sid":"xxxx","Effect":"Allow","Principal":{"Service":"sns.amazonaws.com"},"Action":"lambda:InvokeFunction","Resource":"arn:aws:lambda:us-east-1:123456789102:function:test"}]}
```
+  Untuk detail API, lihat [GetPolicy](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Get-LMProvisionedConcurrencyConfig`
<a name="lambda_GetProvisionedConcurrencyConfig_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Get-LMProvisionedConcurrencyConfig`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini mendapatkan Konfigurasi Konkurensi yang disediakan untuk Alias yang ditentukan dari Fungsi Lambda.**  

```
C:\>Get-LMProvisionedConcurrencyConfig -FunctionName "MylambdaFunction123" -Qualifier "NewAlias1"
```
**Output:**  

```
AllocatedProvisionedConcurrentExecutions : 0
AvailableProvisionedConcurrentExecutions : 0
LastModified                             : 2020-01-15T03:21:26+0000
RequestedProvisionedConcurrentExecutions : 70
Status                                   : IN_PROGRESS
StatusReason                             :
```
+  Untuk detail API, lihat [GetProvisionedConcurrencyConfig](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Get-LMProvisionedConcurrencyConfigList`
<a name="lambda_ListProvisionedConcurrencyConfigs_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Get-LMProvisionedConcurrencyConfigList`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini mengambil daftar konfigurasi konkurensi yang disediakan untuk fungsi Lambda.**  

```
Get-LMProvisionedConcurrencyConfigList -FunctionName "MylambdaFunction123"
```
+  Untuk detail API, lihat [ListProvisionedConcurrencyConfigs](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Get-LMResourceTag`
<a name="lambda_ListTags_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Get-LMResourceTag`.

**Alat untuk PowerShell V4**  
**Contoh 1: Mengambil tag dan nilainya saat ini ditetapkan pada fungsi yang ditentukan.**  

```
Get-LMResourceTag -Resource "arn:aws:lambda:us-west-2:123456789012:function:MyFunction"
```
**Output:**  

```
Key        Value
---        -----
California Sacramento
Oregon     Salem
Washington Olympia
```
+  Untuk detail API, lihat [ListTags](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Get-LMVersionsByFunction`
<a name="lambda_ListVersionsByFunction_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Get-LMVersionsByFunction`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini mengembalikan daftar konfigurasi spesifik versi untuk setiap versi Fungsi Lambda.**  

```
Get-LMVersionsByFunction -FunctionName "MylambdaFunction123"
```
**Output:**  

```
FunctionName        Runtime   MemorySize Timeout CodeSize LastModified                 RoleName
------------        -------   ---------- ------- -------- ------------                 --------
MylambdaFunction123 python3.8        128     600      659 2020-01-10T03:20:56.390+0000 lambda
MylambdaFunction123 python3.8        128       5     1426 2019-12-25T09:19:02.238+0000 lambda
MylambdaFunction123 python3.8        128       5     1426 2019-12-25T09:39:36.779+0000 lambda
MylambdaFunction123 python3.8        128     600     1426 2019-12-25T09:52:59.872+0000 lambda
```
+  Untuk detail API, lihat [ListVersionsByFunction](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `New-LMAlias`
<a name="lambda_CreateAlias_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`New-LMAlias`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini membuat Alias Lambda Baru untuk versi tertentu dan konfigurasi perutean untuk menentukan persentase permintaan pemanggilan yang diterimanya.**  

```
New-LMAlias -FunctionName "MylambdaFunction123" -RoutingConfig_AdditionalVersionWeight @{Name="1";Value="0.6} -Description "Alias for version 4" -FunctionVersion 4 -Name "PowershellAlias"
```
+  Untuk detail API, lihat [CreateAlias](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Publish-LMFunction`
<a name="lambda_CreateFunction_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Publish-LMFunction`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini membuat fungsi C\$1 (dotnetcore1.0 runtime) baru bernama MyFunction AWS Lambda, menyediakan binari yang dikompilasi untuk fungsi dari file zip pada sistem file lokal (jalur relatif atau absolut dapat digunakan). Fungsi C\$1 Lambda menentukan handler untuk fungsi menggunakan penunjukan: :Namespace. AssemblyName ClassName::MethodName. Anda harus mengganti nama assembly (tanpa akhiran .dll), namespace, nama kelas dan bagian nama metode dari spesifikasi handler dengan tepat. Fungsi baru akan memiliki variabel lingkungan 'envvar1' dan 'envvar2' yang diatur dari nilai yang disediakan.**  

```
Publish-LMFunction -Description "My C# Lambda Function" `
        -FunctionName MyFunction `
        -ZipFilename .\MyFunctionBinaries.zip `
        -Handler "AssemblyName::Namespace.ClassName::MethodName" `
        -Role "arn:aws:iam::123456789012:role/LambdaFullExecRole" `
        -Runtime dotnetcore1.0 `
        -Environment_Variable @{ "envvar1"="value";"envvar2"="value" }
```
**Output:**  

```
CodeSha256       : /NgBMd...gq71I=
CodeSize         : 214784
DeadLetterConfig :
Description      : My C# Lambda Function
Environment      : Amazon.Lambda.Model.EnvironmentResponse
FunctionArn      : arn:aws:lambda:us-west-2:123456789012:function:ToUpper
FunctionName     : MyFunction
Handler          : AssemblyName::Namespace.ClassName::MethodName
KMSKeyArn        :
LastModified     : 2016-12-29T23:50:14.207+0000
MemorySize       : 128
Role             : arn:aws:iam::123456789012:role/LambdaFullExecRole
Runtime          : dotnetcore1.0
Timeout          : 3
Version          : $LATEST
VpcConfig        :
```
**Contoh 2: Contoh ini mirip dengan yang sebelumnya kecuali binari fungsi pertama kali diunggah ke bucket Amazon S3 (yang harus berada di wilayah yang sama dengan fungsi Lambda yang dimaksud) dan objek S3 yang dihasilkan kemudian direferensikan saat membuat fungsi.**  

```
Write-S3Object -BucketName amzn-s3-demo-bucket -Key MyFunctionBinaries.zip -File .\MyFunctionBinaries.zip    
Publish-LMFunction -Description "My C# Lambda Function" `
        -FunctionName MyFunction `
        -BucketName amzn-s3-demo-bucket `
        -Key MyFunctionBinaries.zip `
        -Handler "AssemblyName::Namespace.ClassName::MethodName" `
        -Role "arn:aws:iam::123456789012:role/LambdaFullExecRole" `
        -Runtime dotnetcore1.0 `
        -Environment_Variable @{ "envvar1"="value";"envvar2"="value" }
```
+  Untuk detail API, lihat [CreateFunction](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Publish-LMVersion`
<a name="lambda_PublishVersion_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Publish-LMVersion`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini membuat versi untuk snapshot Kode Fungsi Lambda yang ada**  

```
Publish-LMVersion -FunctionName "MylambdaFunction123" -Description "Publishing Existing Snapshot of function code as a  new version through Powershell"
```
+  Untuk detail API, lihat [PublishVersion](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Remove-LMAlias`
<a name="lambda_DeleteAlias_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Remove-LMAlias`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini menghapus fungsi Lambda Alias yang disebutkan dalam perintah.**  

```
Remove-LMAlias -FunctionName "MylambdaFunction123" -Name "NewAlias"
```
+  Untuk detail API, lihat [DeleteAlias](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Remove-LMFunction`
<a name="lambda_DeleteFunction_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Remove-LMFunction`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini menghapus versi tertentu dari fungsi Lambda**  

```
Remove-LMFunction -FunctionName "MylambdaFunction123" -Qualifier '3'
```
+  Untuk detail API, lihat [DeleteFunction](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Remove-LMFunctionConcurrency`
<a name="lambda_DeleteFunctionConcurrency_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Remove-LMFunctionConcurrency`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini menghapus Function Concurrency dari Fungsi Lambda.**  

```
Remove-LMFunctionConcurrency -FunctionName "MylambdaFunction123"
```
+  Untuk detail API, lihat [DeleteFunctionConcurrency](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Remove-LMPermission`
<a name="lambda_RemovePermission_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Remove-LMPermission`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini menghapus kebijakan fungsi untuk yang ditentukan StatementId dari Fungsi Lambda.**  

```
$policy =  Get-LMPolicy -FunctionName "MylambdaFunction123" -Select Policy | ConvertFrom-Json| Select-Object -ExpandProperty Statement
Remove-LMPermission -FunctionName "MylambdaFunction123" -StatementId $policy[0].Sid
```
+  Untuk detail API, lihat [RemovePermission](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Remove-LMProvisionedConcurrencyConfig`
<a name="lambda_DeleteProvisionedConcurrencyConfig_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Remove-LMProvisionedConcurrencyConfig`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini menghapus Konfigurasi Konkurensi yang Disediakan untuk Alias tertentu.**  

```
Remove-LMProvisionedConcurrencyConfig -FunctionName "MylambdaFunction123" -Qualifier "NewAlias1"
```
+  Untuk detail API, lihat [DeleteProvisionedConcurrencyConfig](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Remove-LMResourceTag`
<a name="lambda_UntagResource_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Remove-LMResourceTag`.

**Alat untuk PowerShell V4**  
**Contoh 1: Menghapus tag yang disediakan dari fungsi. Cmdlet akan meminta konfirmasi sebelum melanjutkan kecuali sakelar -Force ditentukan. Satu panggilan dilakukan ke layanan untuk menghapus tag.**  

```
Remove-LMResourceTag -Resource "arn:aws:lambda:us-west-2:123456789012:function:MyFunction" -TagKey "Washington","Oregon","California"
```
**Contoh 2: Menghapus tag yang disediakan dari fungsi. Cmdlet akan meminta konfirmasi sebelum melanjutkan kecuali sakelar -Force ditentukan. Setelah panggilan ke layanan dilakukan per tag yang disediakan.**  

```
"Washington","Oregon","California" | Remove-LMResourceTag -Resource "arn:aws:lambda:us-west-2:123456789012:function:MyFunction"
```
+  Untuk detail API, lihat [UntagResource](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Update-LMAlias`
<a name="lambda_UpdateAlias_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Update-LMAlias`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini memperbarui Konfigurasi Alias fungsi Lambda yang ada. Ini memperbarui RoutingConfiguration nilai untuk menggeser 60% (0,6) lalu lintas ke versi 1**  

```
Update-LMAlias -FunctionName "MylambdaFunction123" -Description " Alias for version 2" -FunctionVersion 2 -Name "newlabel1" -RoutingConfig_AdditionalVersionWeight @{Name="1";Value="0.6}
```
+  Untuk detail API, lihat [UpdateAlias](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Update-LMFunctionCode`
<a name="lambda_UpdateFunctionCode_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Update-LMFunctionCode`.

**Alat untuk PowerShell V4**  
**Contoh 1: Memperbarui fungsi bernama 'MyFunction' dengan konten baru yang terkandung dalam file zip yang ditentukan. Untuk fungsi C\$1 .NET Core Lambda, file zip harus berisi rakitan yang dikompilasi.**  

```
Update-LMFunctionCode -FunctionName MyFunction -ZipFilename .\UpdatedCode.zip
```
**Contoh 2: Contoh ini mirip dengan yang sebelumnya tetapi menggunakan objek Amazon S3 yang berisi kode yang diperbarui untuk memperbarui fungsi.**  

```
Update-LMFunctionCode -FunctionName MyFunction -BucketName amzn-s3-demo-bucket -Key UpdatedCode.zip
```
+  Untuk detail API, lihat [UpdateFunctionCode](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Update-LMFunctionConfiguration`
<a name="lambda_UpdateFunctionConfiguration_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Update-LMFunctionConfiguration`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini memperbarui Konfigurasi Fungsi Lambda yang ada**  

```
Update-LMFunctionConfiguration -FunctionName "MylambdaFunction123" -Handler "lambda_function.launch_instance" -Timeout 600 -Environment_Variable @{ "envvar1"="value";"envvar2"="value" } -Role arn:aws:iam::123456789101:role/service-role/lambda -DeadLetterConfig_TargetArn arn:aws:sns:us-east-1: 123456789101:MyfirstTopic
```
+  Untuk detail API, lihat [UpdateFunctionConfiguration](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Write-LMFunctionConcurrency`
<a name="lambda_PutFunctionConcurrency_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Write-LMFunctionConcurrency`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini menerapkan pengaturan konkurensi untuk Fungsi secara keseluruhan.**  

```
Write-LMFunctionConcurrency -FunctionName "MylambdaFunction123" -ReservedConcurrentExecution 100
```
+  Untuk detail API, lihat [PutFunctionConcurrency](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

### `Write-LMProvisionedConcurrencyConfig`
<a name="lambda_PutProvisionedConcurrencyConfig_powershell_4_topic"></a>

Contoh kode berikut menunjukkan cara menggunakan`Write-LMProvisionedConcurrencyConfig`.

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini menambahkan konfigurasi konkurensi yang disediakan ke Alias Fungsi**  

```
Write-LMProvisionedConcurrencyConfig -FunctionName "MylambdaFunction123" -ProvisionedConcurrentExecution 20 -Qualifier "NewAlias1"
```
+  Untuk detail API, lihat [PutProvisionedConcurrencyConfig](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 