

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

# 在 Infrastructure Composer 中建立外部檔案參考
<a name="using-composer-external-files-new"></a>

您可以從支援**資源的資源屬性**面板建立外部檔案參考。

**建立外部檔案參考**

1. 從 **API Gateway** 或 **Step Functions** 增強型元件卡中，選取**詳細資訊**以顯示**資源屬性**面板。

1. 尋找並選取**使用外部檔案**選項。

1. 指定外部檔案的相對路徑。這是從 `template.yaml` 檔案到外部 檔案的路徑。

   例如，若要參考來自下列專案結構的`api-spec.yaml`外部檔案，請指定 `./api-spec.yaml`做為您的相對路徑。

   ```
   demo
   ├── api-spec.yaml
   ├── src
   │ └── Function
   │ ├── index.js
   │ └── package.json
   └── template.yaml
   ```
**注意**  
如果外部檔案及其指定的路徑不存在，則 Infrastructure Composer 會建立它。

1. **儲存**您的變更。