

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

# Amazon Q Developer 許可參考
<a name="security_iam_permissions"></a>

Amazon Q Developer 使用兩種類型的 API 來提供服務：
+ 使用者和管理員許可，可在政策中用來控制 Amazon Q 的使用
+ 用於提供服務的其他 API，無法在政策中用來控制 Amazon Q 的使用

本節提供有關 Amazon Q Developer 所使用 API 及其功能的資訊。

**Topics**
+ [Amazon Q Developer 許可](#qdev-permissions)
+ [Amazon Q 使用者訂閱許可](#subscriptions-permissions)
+ [其他 Amazon Q Developer API](#other-permissions)

## Amazon Q Developer 許可
<a name="qdev-permissions"></a>

當您設定[使用 Amazon Q 中的身分進行驗證](security-iam.md#security-iam-authentication)並編寫可附加到 IAM 身分 (身分型政策) 的許可政策時，可以使用下列許可作為參考。

下表說明您可以在政策中允許或拒絕存取的 Amazon Q Developer 許可。

**重要**  
若要與 Amazon Q 聊天，IAM 身分需要下列動作的許可：  
`StartConversation`
`SendMessage`
`GetConversation` (僅限主控台)
`ListConversations` (僅限主控台)
如果附加政策未明確允許其中一個動作，則當您嘗試與 Amazon Q 聊天時會傳回 IAM 許可錯誤。

**注意**  
`codewhisperer` 字首是與 Amazon Q Developer 合併之服務的舊名稱。如需詳細資訊，請參閱[Amazon Q Developer 重新命名 - 變更摘要](service-rename.md)。


**Amazon Q Developer 許可**  

| 名稱 | 所授予之許可的描述 | 與 Amazon Q 聊天時需要？ | 
| --- |--- |--- |
| 使用者許可 | 
| --- |
| q:DeleteConversation |  刪除與 Amazon Q 的對話  |  是  | 
| qdeveloper:ExportArtifact |  從 Amazon Q 匯出成品  |  否  | 
| codewhisperer:GenerateRecommendations |  在 Amazon Q AWS 中取得編碼環境的程式碼建議  |  否  | 
| q:GenerateCodeFromCommands |  在 Amazon Q 中從 CLI 命令產生程式碼  |  否  | 
| q:GetConversation |  取得與 Amazon Q 的特定對話關聯的個別訊息  |  是 (僅限主控台)  | 
| q:GetIdentityMetaData |  允許 Amazon Q 提取應用程式身分相關中繼資料  |  否  | 
| q:GetTroubleshootingResults |  取得 Amazon Q 的疑難排解結果   |  否  | 
| qdeveloper:ImportArtifact |  將成品匯入 Amazon Q  | No | 
| q:ListConversations |  列出與特定 Amazon Q 使用者相關聯的個別對話  | Yes (in console only) | 
| q:PassRequest |  允許 Amazon Q 執行 IAM 身分有權執行的動作  | No | 
| q:SendMessage |  將訊息傳送至 Amazon Q  |  是  | 
| qdeveloper:StartAgentSession |  使用 Amazon Q 啟動代理程式工作階段  |  否  | 
| q:StartConversation |  與 Amazon Q 展開對話  |  是  | 
| q:StartTroubleshootingAnalysis |  啟動 Amazon Q 進行疑難排解分析  |  否  | 
| q:StartTroubleshootingResolutionExplanation |  啟動 Amazon Q 進行疑難排解解決方案說明  |  否  | 
| qdeveloper:TransformCode |  使用 Amazon Q 轉換程式碼  |  否  | 
| q:UsePlugin |  從 Amazon Q 聊天存取外掛程式  |  否  | 
| q:UpdateConversation |  更新與 Amazon Q 的對話  |  是  | 
| q:UpdateTroubleshootingCommandResult |  允許 Amazon Q 分析資源以對主控台錯誤進行故障診斷  |  否  | 
| 管理員許可 | 
| --- |
| codewhisperer:CreateCustomization |  從資料來源建立 Amazon Q 自訂  |  否  | 
| codewhisperer:DeleteCustomization |  刪除 Amazon Q 自訂  |  否  | 
| codewhisperer:GetCustomization |  取得有關 Amazon Q 自訂的詳細資訊  |  否  | 
| codewhisperer:ListCustomizations |  根據狀態列出 Amazon Q 自訂  |  否  | 
| codewhisperer:ListProfiles |  列出 Amazon Q 設定檔  |  否  | 
| codewhisperer:ListTagsForResource |  在主控台中列出與 Amazon Q 資源相關聯的所有標籤  |  否  | 
| codewhisperer:TagResource |  新增或建立 Amazon Q 資源的標籤  |  否  | 
| codewhisperer:UnTagResource |  從 Amazon Q 資源移除標籤  |  否  | 
| codewhisperer:UpdateCustomization |  啟用或停用 Amazon Q 自訂  |  否  | 
| codewhisperer:ListCustomizationVersions |  列出 Amazon Q 自訂的版本  |  否  | 
| codewhisperer:UpdateProfile |  更新 Amazon Q 設定檔  |  否  | 
| q:CreateAssignment |  為 Amazon Q Developer 設定檔建立使用者或群組指派  |  否  | 
| q:CreateAuthGrant |  在 Amazon Q 註冊第三方應用程式使用者  |  否  | 
| q:CreateOAuthAppConnection |  在 Amazon Q 註冊第三方 OAuth 應用程式  |  否  | 
| q:CreatePlugin |  在 Amazon Q 中建立和設定第三方外掛程式  |  否  | 
| q:DeleteAssignment |  刪除 Amazon Q Developer 設定檔的使用者或群組指派  |  否  | 
| q:DeletePlugin |  刪除 Amazon Q 中已設定的外掛程式  |  否  | 
| q:GetPlugin |  檢視特定 Amazon Q 外掛程式的相關資訊  |  否  | 
| q:ListPlugins |  檢視 Amazon Q 中已設定的外掛程式  |  否  | 
| q:ListPluginProviders |  檢視 Amazon Q 中可用的外掛程式  |  否  | 
| q:ListTagsForResource |  在主控台中列出與 Amazon Q 資源相關聯的所有標籤  |  否  | 
| q:TagResource |  新增或建立 Amazon Q 資源的標籤  |  否  | 
| q:SentEvent |  從第三方應用程式將事件傳送到 Amazon Q 進行處理  |  否  | 
| q:UntagResource |  從 Amazon Q 資源移除標籤  |  否  | 
| q:UpdateAuthGrant |  使用 Amazon Q 更新第三方應用程式使用者  |  否  | 
| q:UpdateOAuthAppConnection |  使用 Amazon Q 更新第三方 OAuth 應用程式  |  否  | 
| q:UpdatePlugin |  更新第三方整合外掛程式的功能啟用控制  |  否  | 

### 使用 q:PassRequest
<a name="passrequest"></a>

`q:PassRequest` 是一種 Amazon Q 許可，可讓 Amazon Q 代表您呼叫 AWS APIs。當您將 `q:PassRequest` 許可新增至 IAM 身分時，Amazon Q 就會取得許可，能夠呼叫 IAM 身分具有呼叫許可的任何 API。例如，如果 IAM 角色具有 `s3:ListAllMyBuckets` 許可和 `q:PassRequest` 許可，那麼擔任該 IAM 角色的使用者要求 Amazon Q 列出其 Amazon S3 儲存貯體時，Amazon Q 就能呼叫 `ListAllMyBuckets` API。

您可以建立 IAM 政策來限制 `q:PassRequest` 許可的範圍。例如，您可以阻止 Amazon Q 執行特定動作，或僅允許 Amazon Q 針對服務執行動作的子集。您也可以指定 Amazon Q 代表您執行動作時，可以呼叫哪些區域。

如需控制使用 `q:PassRequest` 的 IAM 政策範例，請參閱下列身分型政策範例：
+ [允許 Amazon Q 在聊天中代表您執行動作](id-based-policy-examples-users.md#id-based-policy-examples-allow-actions)
+ [拒絕 Amazon Q 代表您執行特定動作的許可](id-based-policy-examples-users.md#id-based-policy-examples-deny-some-actions)
+ [允許 Amazon Q 代表您執行特定動作的許可](id-based-policy-examples-users.md#id-based-policy-examples-allow-some-actions)
+ [允許 Amazon Q 許可在特定區域中代表您執行動作](id-based-policy-examples-users.md#id-based-policy-examples-allow-actions-some-regions)
+ [拒絕 Amazon Q 許可代表您執行動作](id-based-policy-examples-users.md#id-based-policy-examples-deny-actions)

## Amazon Q 使用者訂閱許可
<a name="subscriptions-permissions"></a>

Amazon Q Developer 管理員必須具有下列許可，才能為其組織中的使用者和群組建立和管理訂閱。

下列術語有助於了解訂閱許可的功能：

**使用者**  
 AWS IAM Identity Center 以唯一使用者 ID 表示的個別使用者。

**Group (分組)**  
 AWS IAM Identity Center 由唯一群組 ID 表示的使用者集合。

**訂閱**  
訂閱會與單一 Identity Center 使用者綁定，使其有權使用 Amazon Q 功能。訂閱不會授權使用者使用 Amazon Q 功能。例如，如果 Adam 已訂閱 Amazon Q Developer 專業方案，他就有權使用 Amazon Q Developer 功能，但是在管理員授與所需的許可之前，他無法存取這些功能。


**Amazon Q 使用者訂閱許可**  

| 名稱 | 動作說明 | 
| --- | --- | 
| user-subscriptions:CreateClaim | 建立使用者訂閱 | 
| user-subscriptions:DeleteClaim | 刪除使用者訂閱 | 
| user-subscriptions:ListApplicationClaims | 列出特定應用程式的所有使用者訂閱 | 
| user-subscriptions:ListClaims | 列出所有使用者訂閱 | 
| user-subscriptions:ListUserSubscriptions | 列出特定使用者的所有使用者訂閱 | 
| user-subscriptions:UpdateClaim | 更新使用者訂閱 | 

## 其他 Amazon Q Developer API
<a name="other-permissions"></a>

下表顯示 IDE 中 Amazon Q 的功能所使用的 API。這些 APIs不會用於控制對 Amazon Q 功能的存取，但當使用者存取相關聯的功能時，它們會出現在管理帳戶中的 AWS CloudTrail 日誌中。

**注意**  
`codewhisperer` 字首是與 Amazon Q Developer 合併之服務的舊名稱。如需詳細資訊，請參閱[Amazon Q Developer 重新命名 - 變更摘要](service-rename.md)。


**提供服務的 Amazon Q Developer API**  

| 名稱 | 動作說明 | 
| --- | --- | 
| codewhisperer:AllowVendedLogDeliveryForResource | 讓 Amazon Q Developer 以非同步方式將日誌發佈至 Amazon CloudWatch | 
| codewhisperer:CreateTaskAssistConversation | 與 Amazon Q Developer Agent for software development 展開對話 | 
| codewhisperer:CreateUploadUrl | 建立 URL，以上傳在 IDE 中使用 Amazon Q 進行開發時要使用的程式碼檔案 | 
| codewhisperer:DeleteTaskAssistConversation | 刪除與 Amazon Q Developer Agent for software development 的對話 | 
| codewhisperer:ExportResultArchive | 匯出 Amazon Q Developer 輸出的封存以供下載 | 
| codewhisperer:GenerateAssistantResponse | 傳回在 IDE 中 Amazon Q 於聊天中的回應 | 
| codewhisperer:GenerateCompletions | 取得內嵌程式碼建議 | 
| codewhisperer:GenerateTaskAssistPlan | 從 Amazon Q Developer Agent for software development 產生實作計畫 | 
| codewhisperer:GetCodeAnalysis | 取得進行中安全掃描的狀態 | 
| codewhisperer:GetTaskAssistCodeGeneration | 取得 Amazon Q Developer Agent for software development 產生的程式碼 | 
| codewhisperer:GetTransformation | 從 Amazon Q Developer Agent for code transformation 傳回程式碼轉換 | 
| codewhisperer:GetTransformationPlan | 從 Amazon Q Developer Agent for software development 傳回轉換計畫 | 
| codewhisperer:ListAvailableCustomizations | 傳回已建立且可供使用的自訂清單 | 
| codewhisperer:ListCodeAnalysisFindings | 傳回已掃描的檔案中所有安全問題的清單 | 
| codewhisperer:ListFeatureEvaluations | 列出 Amazon Q Developer 用戶端功能的相關組態 | 
| codewhisperer:SendTelemetryEvent | 將遙測資訊傳送至 IDE 中 AWS Amazon Q 的使用情況 | 
| codewhisperer:StartTaskAssistCodeGeneration | 使用 Amazon Q Developer Agent for software development 開始產生程式碼 | 
| codewhisperer:StartCodeAnalysis | 啟動安全掃描 | 
| codewhisperer:StartTransformation | 使用 Amazon Q Developer Agent for code transformation 啟動轉換 | 
| codewhisperer:StopTransformation | 使用 Amazon Q Developer Agent for code transformation 停止轉換 | 