

終止支援通知： 將於 2026 AWS 年 5 月 20 日結束對 的支援 AWS SimSpace Weaver。2026 年 5 月 20 日之後，您將無法再存取 SimSpace Weaver 主控台或 SimSpace Weaver 資源。如需詳細資訊，請參閱[AWS SimSpace Weaver 終止支援](https://docs.aws.amazon.com/simspaceweaver/latest/userguide/simspaceweaver-end-of-support.html)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 AWS CLI 處理快照
<a name="working-with_snapshots_cli"></a>

您可以使用 AWS CLI 從命令提示字元呼叫 SimSpace Weaver APIs。您必須正確 AWS CLI 安裝和設定 。如需詳細資訊，請參閱《 第 [AWS 2 版使用者指南》中的安裝或更新最新版本的 CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)。 *AWS Command Line Interface *

**Topics**
+ [建立快照](#working-with_snapshots_cli_create)
+ [從快照啟動模擬](#working-with_snapshots_cli_start)

## 使用 AWS CLI 建立快照
<a name="working-with_snapshots_cli_create"></a>

**建立快照**
+ 在**命令提示**字元中，呼叫 `CreateSnapshot` API。

  ```
  aws simspaceweaver create-snapshot --simulation {{simulation-name}} —destination {{s3-destination}}
  ```

  **參數**  
模擬  
已啟動模擬的名稱。您可以使用 `aws simspaceweaver list-simulations` 查看模擬的名稱和狀態。  
目的地  
指定快照檔案目的地 Amazon S3 儲存貯體和選用物件金鑰字首的字串。您的物件金鑰字首通常是儲存貯體中的資料夾。 會在此目的地的`snapshot`資料夾內 SimSpace Weaver 建立快照。  
Amazon S3 儲存貯體必須與 AWS 區域 模擬位於相同的 中。

  **範例**

  ```
  aws simspaceweaver create-snapshot —simulation MyProjectSimulation_23-04-29_12_00_00 —destination BucketName=weaver-myproject-111122223333-artifacts-us-west-2,ObjectKeyPrefix=myFolder
  ```

如需 `CreateSnapshot` API 的詳細資訊，請參閱 *AWS SimSpace Weaver API 參考*中的 [CreateSnapshot](https://docs.aws.amazon.com/simspaceweaver/latest/APIReference/API_CreateSnapshot.html)。

## 使用 從快照 AWS CLI 啟動模擬
<a name="working-with_snapshots_cli_start"></a>

**從快照啟動模擬**
+ 在**命令提示**字元中，呼叫 `StartSimulation` API。

  ```
  aws simspaceweaver start-simulation --name {{simulation-name}} --role-arn {{role-arn}} --snapshot-s3-location {{s3-location}}
  ```

  **參數**  
name  
新模擬的名稱。模擬名稱在您的 中必須是唯一的 AWS 帳戶。您可以使用 `aws simspaceweaver list-simulations` 查看現有模擬的名稱。  
role-arn  
模擬將使用的應用程式角色的 Amazon Resource Name (ARN)。  
snapshot-s3-location  
指定快照檔案之 Amazon S3 儲存貯體和物件金鑰的字串。  
Amazon S3 儲存貯體必須與 AWS 區域 模擬位於相同的 中。

  **範例**

  ```
  aws simspaceweaver start-simulation —name MySimulation —role-arn arn:aws:iam::111122223333:role/weaver-MyProject-app-role —snapshot-s3-location BucketName=weaver-myproject-111122223333-artifacts-us-west-2,ObjectKey=myFolder/snapshot/MyProjectSimulation_23-04-29_12_00_00-230429-1530-27.zip
  ```

如需 `StartSimulation` API 的詳細資訊，請參閱*AWS SimSpace Weaver 《 API 參考*》中的 [StartSimulation](https://docs.aws.amazon.com/simspaceweaver/latest/APIReference/API_StartSimulation.html)。