

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

# AWS Infrastructure Composer 搭配 使用 Amazon Q Developer
<a name="using-composer-ide-cw"></a>

 AWS Infrastructure Composer 的 AWS Toolkit for Visual Studio Code 提供與 的整合Amazon Q。您可以在設計應用程式時，在 Infrastructure Composer Amazon Q中使用 來產生 AWS 資源的基礎設施程式碼。

Amazon Q 是一般用途、採用機器學習技術的程式碼產生器。若要進一步了解，請參閱*Amazon Q Developer《 使用者指南*》中的[什麼是 Amazon Q？](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/what-is.html)。

對於**標準資源**和**標準元件**卡，您可以使用 Amazon Q為您的資源產生基礎設施程式碼建議。

![\[Amazon Q 在 Infrastructure Composer 中產生程式碼建議\]](http://docs.aws.amazon.com/zh_tw/infrastructure-composer/latest/dg/images/aac_use_ide_cw_01.gif)


**標準資源**和**標準元件**卡可以代表 CloudFormation 資源或 CloudFormation 資源集合。如需詳細資訊，請參閱 [在 Infrastructure Composer 中設定和修改卡片](using-composer-cards.md)。

## 設定
<a name="using-composer-ide-cw-setup"></a>

若要Amazon Q在 Infrastructure Composer 中使用 ，您必須在 Toolkit Amazon Q中使用 進行身分驗證。如需說明，請參閱*Amazon Q Developer《 使用者指南*[Amazon Q》中的 VS Code 和 JetBrains 中的 入門](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/q-in-IDE.html)。

## 在 Infrastructure Composer Amazon Q Developer中使用
<a name="using-composer-ide-cw-use"></a>

您可以從任何**標準資源**或**標準元件**卡Amazon Q Developer**的資源屬性**面板使用 。

**在 Infrastructure Composer Amazon Q中使用**

1. 從**標準資源**或**標準元件**卡中，開啟**資源屬性**面板。

1. 找到**資源組態**欄位。此欄位包含卡片的基礎設施代碼。

1. 選取**產生建議**按鈕。 Amazon Q會產生建議。
**注意**  
在此階段產生的程式碼不會覆寫範本中現有的基礎設施程式碼。

1. 若要產生更多建議，請選取**重新產生**。您可以切換範例來比較結果。

1. 若要選取選項，請選擇**選取**。您可以在將程式碼儲存至應用程式之前，先修改此處的程式碼。若要退出而不儲存，請選取**退出圖示 (X)**。

1. 若要將程式碼儲存到您的應用程式範本，請從**資源屬性**面板中選取**儲存**。

## 進一步了解
<a name="using-composer-ide-cw-learn"></a>

若要進一步了解 Amazon Q，請參閱*Amazon Q Developer《 使用者指南*》中的[什麼是 Amazon Q？](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/what-is.html)。