

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

# 建立績效詳情的自訂 IAM 政策


對於沒有 `AmazonRDSPerformanceInsightsReadOnly` 或 `AmazonRDSPerformanceInsightsFullAccess` 政策提供的使用者，您可以建立或修改由使用者管理的 IAM 政策來授予 Performance Insights 的存取權。在將該政策連接至許可集或角色時，收件人可以使用績效詳情。

**建立自訂政策**

1. 前往 [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/) 開啟 IAM 主控台。

1. 在導覽窗格中，選擇**政策**。

1. 選擇 **Create policy** (建立政策)。

1. 在**建立政策**頁面上，選擇 **JSON** 選項。

1. 針對 [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonRDSPerformanceInsightsReadOnly.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonRDSPerformanceInsightsReadOnly.html) 或 [https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonRDSPerformanceInsightsFullAccess.html](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonRDSPerformanceInsightsFullAccess.html) 政策，複製並貼上在《AWS 受管政策參考指南》** 中的 *JSON 政策文件*區段中提供的文字。

1. 選擇 **Review policy** (檢閱政策)。

1. 為政策提供名稱並選擇性輸入描述，然後選擇 **Create policy (建立政策)**。

現在您可以將政策連接到許可集或角色。以下程序假設您已有基於此用途使用的使用者。

**將政策連接至使用者**

1. 在以下網址開啟 IAM 主控台：[https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/)。

1. 在導覽窗格中，選擇 **Users** (使用者)。

1. 從清單中選擇現有的使用者。
**重要**  
若要使用績效詳情，除了自訂政策以外，請務必確認您還擁有存取 Amazon RDS 的權限。例如，`AmazonRDSPerformanceInsightsReadOnly` 預先定義政策提供對 Amazon RDS 的唯讀存取。如需更多詳細資訊，請參閱 [使用政策管理存取權](UsingWithRDS.IAM.md#security_iam_access-manage)。

1. 在 **Summary** (摘要) 頁面上，選擇 **Add permissions** (新增許可)。

1. 選擇 **Attach existing policies directly** (直接連接現有政策)。對於**搜尋**，請輸入政策名稱的前幾個字母，如下圖所示。  
![\[選擇一個政策\]](http://docs.aws.amazon.com/zh_tw/AmazonRDS/latest/AuroraUserGuide/images/perf_insights_attach_iam_policy.png)

1. 選擇您的政策，然後選擇 **Next: Review (下一步：檢閱)**。

1. 選擇 **Add permissions** (新增許可)。