

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.

# Gunakan `ModifyWorkspaceCreationProperties` dengan CLI
<a name="workspaces_example_workspaces_ModifyWorkspaceCreationProperties_section"></a>

Contoh kode berikut menunjukkan cara menggunakan`ModifyWorkspaceCreationProperties`.

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

**AWS CLI**  
**Untuk memodifikasi properti WorkSpace penciptaan direktori**  
`modify-workspace-creation-properties`Contoh berikut memungkinkan `EnableInternetAccess` properti untuk direktori tertentu. Ini memungkinkan penetapan otomatis alamat IP publik untuk yang WorkSpaces dibuat untuk direktori.  

```
aws workspaces modify-workspace-creation-properties \
    --resource-id d-926722edaf \
    --workspace-creation-properties EnableInternetAccess=true
```
Perintah ini tidak menghasilkan output.  
Untuk informasi selengkapnya, lihat [Perbarui detail direktori untuk Anda WorkSpaces](https://docs.aws.amazon.com/workspaces/latest/adminguide/update-directory-details.html) di *Panduan WorkSpaces Administrasi Amazon*.  
+  Untuk detail API, lihat [ModifyWorkspaceCreationProperties](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/workspaces/modify-workspace-creation-properties.html)di *Referensi AWS CLI Perintah*. 

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

**Alat untuk PowerShell V4**  
**Contoh 1: Contoh ini memungkinkan Akses Internet dan Mode Pemeliharaan menjadi true sebagai nilai default saat membuat Workspace**  

```
Edit-WKSWorkspaceCreationProperty -Region us-west-2 -ResourceId d-123454a369 -WorkspaceCreationProperties_EnableInternetAccess $true -WorkspaceCreationProperties_EnableMaintenanceMode $true
```
+  Untuk detail API, lihat [ModifyWorkspaceCreationProperties](https://docs.aws.amazon.com/powershell/v4/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V4)*. 

**Alat untuk PowerShell V5**  
**Contoh 1: Contoh ini memungkinkan Akses Internet dan Mode Pemeliharaan menjadi true sebagai nilai default saat membuat Workspace**  

```
Edit-WKSWorkspaceCreationProperty -Region us-west-2 -ResourceId d-123454a369 -WorkspaceCreationProperties_EnableInternetAccess $true -WorkspaceCreationProperties_EnableMaintenanceMode $true
```
+  Untuk detail API, lihat [ModifyWorkspaceCreationProperties](https://docs.aws.amazon.com/powershell/v5/reference)di *Referensi Alat AWS untuk PowerShell Cmdlet (V5)*. 

------