Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh SDK AWS Doc
Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Gunakan RebootWorkspaces
dengan CLI
Contoh kode berikut menunjukkan cara menggunakanRebootWorkspaces
.
- CLI
-
- AWS CLI
-
Untuk me-reboot a WorkSpace
reboot-workspaces
Contoh berikut reboot yang ditentukan WorkSpace.aws workspaces reboot-workspaces \ --reboot-workspace-requests
ws-dk1xzr417
Output:
{ "FailedRequests": [] }
Untuk informasi selengkapnya, lihat Reboot a WorkSpace di Panduan WorkSpaces Administrasi Amazon.
-
Untuk detail API, lihat RebootWorkspaces
di Referensi AWS CLI Perintah.
-
- PowerShell
-
- Alat untuk PowerShell V4
-
Contoh 1: Reboot yang ditentukan WorkSpace.
Restart-WKSWorkspace -WorkspaceId "ws-1a2b3c4d"
Contoh 2: Reboot beberapa WorkSpaces.
Restart-WKSWorkspace -WorkspaceId "ws-1a2b3c4d","ws-5a6b7c8d"
Contoh 3: Mengambil koleksi semua Anda WorkSpaces dan pipa IDs ke - WorkSpaceId parameter Restart-WKSWorkspace, menyebabkan restart. WorkSpaces
Get-WKSWorkspaces | Restart-WKSWorkspace
-
Untuk detail API, lihat RebootWorkspacesdi Referensi Alat AWS untuk PowerShell Cmdlet (V4).
-
- Alat untuk PowerShell V5
-
Contoh 1: Reboot yang ditentukan WorkSpace.
Restart-WKSWorkspace -WorkspaceId "ws-1a2b3c4d"
Contoh 2: Reboot beberapa WorkSpaces.
Restart-WKSWorkspace -WorkspaceId "ws-1a2b3c4d","ws-5a6b7c8d"
Contoh 3: Mengambil koleksi semua Anda WorkSpaces dan pipa IDs ke - WorkSpaceId parameter Restart-WKSWorkspace, menyebabkan restart. WorkSpaces
Get-WKSWorkspaces | Restart-WKSWorkspace
-
Untuk detail API, lihat RebootWorkspacesdi Referensi Alat AWS untuk PowerShell Cmdlet (V5).
-