

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

# Amazon CloudWatch 許可參考
<a name="permissions-reference-cw"></a>

下表列出每個 CloudWatch API 操作和您可以授予執行動作許可的對應動作。您在政策的 `Action` 欄位中指定動作，然後在政策的 `Resource` 欄位將萬用字元 (\*) 指定為資源值。

您可以在 CloudWatch 政策中使用 AWS全局條件金鑰來表達條件。如需 AWS全系列金鑰的完整清單，請參閱《[AWS IAM 使用者指南》中的全域和 IAM 條件內容金鑰](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html)。 **

**注意**  
若要指定動作，請使用 `cloudwatch:` 前綴，後面接著 API 操作名稱。例如：`cloudwatch:GetMetricData`、`cloudwatch:ListMetrics` 或 `cloudwatch:*` (意指所有 CloudWatch 動作)。

**Topics**
+ [CloudWatch API 操作及動作所需的許可](#cw-permissions-table)
+ [CloudWatch Application Signals API 操作以及動作所需的許可](#cw-application-signals-permissions-table)
+ [CloudWatch Contributor Insights API 操作及動作所需的許可](#cw-contributor-insights-permissions-table)
+ [CloudWatch Events API 操作及動作所需的許可](#cwe-permissions-table)
+ [CloudWatch Logs API 操作及動作所需的許可](#cwl-permissions-table)
+ [Amazon EC2 API 操作與動作所需的許可](#cw-ec2-permissions-table)
+ [Amazon EC2 Auto Scaling API 操作與動作所需的許可](#cw-as-permissions-table)

## CloudWatch API 操作及動作所需的許可
<a name="cw-permissions-table"></a>


| CloudWatch API 操作 | 所需許可 (API 動作) | 
| --- | --- | 
| [DeleteAlarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DeleteAlarms.html) | `cloudwatch:DeleteAlarms`<br />需要刪除警示。 | 
| [DeleteDashboards](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DeleteDashboards.html) | `cloudwatch:DeleteDashboards`<br />需要刪除儀表板。 | 
| [DeleteMetricStream](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DeleteMetricStream.html) | `cloudwatch:DeleteMetricStream`<br />需要刪除指標串流。 | 
| [DescribeAlarmHistory](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarmHistory.html) | `cloudwatch:DescribeAlarmHistory`<br />需要查看警示歷史記錄。若要擷取複合警示的相關資訊，您的 `cloudwatch:DescribeAlarmHistory` 許可必須具有 `*` 範圍。您無法傳回複合警示的相關資訊，如果您的 `cloudwatch:DescribeAlarmHistory` 許可的範圍較窄。 | 
| [DescribeAlarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html) | `cloudwatch:DescribeAlarms`<br />需要擷取警示相關資訊。<br />若要擷取複合警示的相關資訊，您的 `cloudwatch:DescribeAlarms` 許可必須具有 `*` 範圍。您無法傳回複合警示的相關資訊，如果您的 `cloudwatch:DescribeAlarms` 許可的範圍較窄。 | 
| [DescribeAlarmsForMetric](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarmsForMetric.html) | `cloudwatch:DescribeAlarmsForMetric`<br />需要查看指標的警示。 | 
| [DisableAlarmActions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DisableAlarmActions.html) | `cloudwatch:DisableAlarmActions`<br />需要停用警示動作。 | 
| [EnableAlarmActions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_EnableAlarmActions.html) | `cloudwatch:EnableAlarmActions`<br />需要啟用警示動作。 | 
| [GetDashboard ](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetDashboard.html) | `cloudwatch:GetDashboard`<br />需要顯示現有儀表板的相關資料。 | 
| [GetMetricData](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html) | `cloudwatch:GetMetricData`<br />需要在 CloudWatch 主控台中製作指標資料的圖表，以擷取大批次的指標資料並對該資料執行指標數學運算。 | 
| [GetMetricStatistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html) | `cloudwatch:GetMetricStatistics`<br />需要檢視 CloudWatch 主控台和儀表板小工具其他部分中的圖形。 | 
| [GetMetricStream](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStream.html) | `cloudwatch:GetMetricStream`<br />需要檢視指標串流相關資訊。 | 
| [GetMetricWidgetImage](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricWidgetImage.html) | `cloudwatch:GetMetricWidgetImage`<br />需要擷取一或多個 CloudWatch 指標的快照圖形作為點陣圖圖像。 | 
| [GetOTelEnrichment](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetOTelEnrichment.html) | `cloudwatch:GetOTelEnrichment`<br />擷取已佈建指標的 OpenTelemetry 擴充狀態時需要。 | 
| [ListDashboards](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListDashboards.html) | `cloudwatch:ListDashboards`<br />需要檢視您帳戶中的 CloudWatch 儀表板清單。 | 
| ListEntitiesForMetric<br />(僅限 CloudWatch 主控台的許可) | `cloudwatch:ListEntitiesForMetric`<br />尋找與指標關聯的實體時需要。在 CloudWatch 主控台中偵測相關遙測時需要。 | 
| [ListMetrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) | `cloudwatch:ListMetrics`<br />需要檢視或搜尋 CloudWatch 主控台內和 CLI 中的指標名稱。需要在儀表板 widget 上選取指標。 | 
| [ListMetricStreams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetricStreams.html) | `cloudwatch:ListMetricStreams`<br />需要檢視或搜尋帳戶中的指標串流清單。 | 
| [ListTagsForResource](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListTagsForResource.html) | `cloudwatch:ListTagsForResource`<br />列出與 CloudWatch 資源相關聯的標籤時需要。 | 
| [PutCompositeAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutCompositeAlarm.html) | `cloudwatch:PutCompositeAlarm`<br />需要建立複合警示。<br />若要建立複合警示，您的 `cloudwatch:PutCompositeAlarm` 許可必須具有 `*` 範圍。您無法傳回複合警示的相關資訊，如果您的 `cloudwatch:PutCompositeAlarm` 許可的範圍較窄。 | 
| [PutDashboard](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutDashboard.html) | `cloudwatch:PutDashboard`<br />需要建立儀表板或更新現有的儀表板。 | 
| [PutMetricAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) | `cloudwatch:PutMetricAlarm`<br />需要建立或更新警示。 | 
| [PutMetricData](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricData.html) | `cloudwatch:PutMetricData`<br />需要建立指標。 | 
| [PutMetricStream](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricStream.html) | `cloudwatch:PutMetricStream`<br />需要建立指標串流。 | 
| [SetAlarmState](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_SetAlarmState.html) | `cloudwatch:SetAlarmState`<br />需要手動設定警示的狀態。 | 
| [StartMetricStreams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_StartMetricStreams.html) | `cloudwatch:StartMetricStreams`<br />需要在指標串流中開始指標流程。 | 
| [StartOTelEnrichment](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_StartOTelEnrichment.html) | `cloudwatch:StartOTelEnrichment`<br />啟用已佈建指標的 OpenTelemetry 擴充功能，使其可透過 PromQL 進行查詢時需要。 | 
| [StopMetricStreams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_StartMetricStreams.html) | `cloudwatch:StopMetricStreams`<br />需要在指標串流中暫時停止指標流程。 | 
| [StopOTelEnrichment](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_StopOTelEnrichment.html) | `cloudwatch:StopOTelEnrichment`<br />停用已佈建指標的 OpenTelemetry 擴充時需要。 | 
| [TagResource](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html) | `cloudwatch:TagResource`<br />需要新增或更新 CloudWatch 資源 (例如警示和 Contributor Insights 規則) 的標籤。 | 
| [UntagResource](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_UntagResource.html) | `cloudwatch:UntagResource`<br />需要從 CloudWatch 資源移除標籤。 | 

## CloudWatch Application Signals API 操作以及動作所需的許可
<a name="cw-application-signals-permissions-table"></a>


| CloudWatch Application Signals API 操作 | 所需許可 (API 動作) | 
| --- | --- | 
| [ BatchGetServiceLevelObjectiveBudgetReport](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_BatchGetServiceLevelObjectiveBudgetReport.html) | `application-signals:BatchGetServiceLevelObjectiveBudgetReport`<br />擷取服務水準目標預算報告時需要。 | 
| [ CreateServiceLevelObjective](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_CreateServiceLevelObjective.html) | `application-signals:CreateServiceLevelObjective`<br />建立服務水準目標 (SLO) 時需要。 | 
| [ DeleteServiceLevelObjective](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_DeleteServiceLevelObjective.html) | `application-signals:DeleteServiceLevelObjective`<br />刪除服務水準目標 (SLO) 時需要。 | 
| [ GetService](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_GetService.html) | `application-signals:GetService`<br />擷取有關 Application Signals 發現之服務的資訊時需要。 | 
| [ GetServiceLevelObjective](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_GetServiceLevelObjective.html) | `application-signals:GetServiceLevelObjective`<br />擷取服務水準目標 (SLO) 相關資訊時需要。 | 
| ListObservedEntities | `application-signals:ListObservedEntities`<br />授與列示與其他實體關聯之實體的許可。 | 
| [ ListServiceDependencies](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListServiceDependencies.html) | `application-signals:ListServiceDependencies`<br />擷取指定之服務的服務相依項清單時需要。Application Signals 發現了此服務和相依項。 | 
| [ ListServiceDependents](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListServiceDependents.html) | `application-signals:ListServiceDependents`<br />擷取調用指定服務之相依項清單時需要。Application Signals 發現了此服務和相依項。 | 
| [ ListServiceLevelObjectives](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListServiceLevelObjectives.html) | `application-signals:ListServiceLevelObjectives`<br />擷取帳戶中的服務水準目標 (SLO) 清單時需要。 | 
| [ ListServiceOperations](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListServiceOperations.html) | `application-signals:ListServiceOperations`<br />擷取指定之服務的服務操作清單時需要。Application Signals 發現了此服務和相依項。 | 
| [ ListServices](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListServices.html) | `application-signals:ListServices`<br />擷取 Application Signals 發現的服務清單時需要。 | 
| [ ListTagsForResource](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListTagsForResource.html) | `application-signals:ListTagsForResource`<br />擷取與資源關聯之標籤清單時需要。 | 
| [ StartDiscovery](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_StartDiscovery.html) | `application-signals:StartDiscovery`<br />必須提供才能在帳戶中啟用 Application Signals，並建立所需的服務連結角色。 | 
| [ TagResource](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_TagResource.html) | `application-signals:TagResource`<br />必須提供才能將標籤新增至資源。 | 
| [ UntagResource](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_UntagResource.html) | `application-signals:UntagResource`<br />必須提供才能從資源中移除標籤。 | 
| [ UpdateServiceLevelObjective](https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_UpdateServiceLevelObjective.html) | `application-signals:UpdateServiceLevelObjective`<br />更新現有服務水準目標時需要 | 

## CloudWatch Contributor Insights API 操作及動作所需的許可
<a name="cw-contributor-insights-permissions-table"></a>

**重要**  
當您將 `cloudwatch:PutInsightRule` 許可授予使用者時，依預設，該使用者可以建立規則來評估 CloudWatch Logs 中的任何日誌群組。您可以新增 IAM 政策條件，以限制這些許可，進而讓使用者包含和排除特定日誌群組。如需詳細資訊，請參閱[使用條件索引鍵限制 Contributor Insights 使用者存取日誌群組](iam-cw-condition-keys-contributor.md)。


| CloudWatch Contributor Insights API 操作 | 所需許可 (API 動作) | 
| --- | --- | 
| [DeleteInsightRules](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DeleteInsightRules.html) | `cloudwatch:DeleteInsightRules`<br />需要刪除 Contributor Insights 規則。 | 
| [DescribeInsightRules](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html) | `cloudwatch:DescribeInsightRules`<br />需要檢視您帳戶中的 Contributor Insights 規則。 | 
| [EnableInsightRules](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_EnableInsightRules.html) | `cloudwatch:EnableInsightRules`<br />需要啟用 Contributor Insights 規則。 | 
| [GetInsightRuleReport](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetInsightRuleReport.html) | `cloudwatch:GetInsightRuleReport`<br />需要擷取由 Contributor Insights 規則收集的時間序列資料和其他統計資料。 | 
| [PutInsightRule](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutInsightRule.html) | `cloudwatch:PutInsightRule`<br />需要建立 Contributor Insights 規則。請參閱此表格開頭部分的 **Important** (重要) 注意事項。 | 

## CloudWatch Events API 操作及動作所需的許可
<a name="cwe-permissions-table"></a>


| CloudWatch Events API 操作 | 所需許可 (API 動作) | 
| --- | --- | 
| [DeleteRule](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_DeleteRule.html) | `events:DeleteRule`<br />刪除規則時需要。 | 
| [DescribeRule](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_DescribeRule.html) | `events:DescribeRule`<br />列出規則的詳細資訊時需要。 | 
| [DisableRule](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_DisableRule.html) | `events:DisableRule`<br />停用規則時需要。 | 
| [EnableRule](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_EnableRule.html) | `events:EnableRule`<br />啟用規則時需要。 | 
| [ListRuleNamesByTarget](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_ListRuleNamesByTarget.html) | `events:ListRuleNamesByTarget`<br />列出與規則相關聯的目標時需要。 | 
| [ListRules](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_ListRules.html) | `events:ListRules`<br />列出您帳戶中的所有規則時需要。 | 
| [ListTargetsByRule](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_ListTargetsByRule.html) | `events:ListTargetsByRule`<br />列出與規則相關聯的所有目標時需要。 | 
| [PutEvents](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_PutEvents.html) | `events:PutEvents`<br />新增可符合規則的自訂事件時需要。 | 
| [PutRule](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_PutRule.html) | `events:PutRule`<br />建立或更新規則時需要。 | 
| [PutTargets](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_PutTargets.html) | `events:PutTargets`<br />將目標新增至規則時需要。 | 
| [RemoveTargets](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_RemoveTargets.html) | `events:RemoveTargets`<br />從規則中移除目標時需要。 | 
| [TestEventPattern](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_TestEventPattern.html) | `events:TestEventPattern`<br />針對特定事件測試事件模式時需要。 | 

## CloudWatch Logs API 操作及動作所需的許可
<a name="cwl-permissions-table"></a>

**注意**  
可以在《[CloudWatch Logs 使用者指南](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/permissions-reference-cwl.html)》中找到 CloudWatch Logs 許可。

## Amazon EC2 API 操作與動作所需的許可
<a name="cw-ec2-permissions-table"></a>


| Amazon EC2 API 操作 | 所需許可 (API 動作) | 
| --- | --- | 
| [DescribeInstanceStatus](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceStatus.html) | `ec2:DescribeInstanceStatus`<br />需要檢視 EC2 執行個體狀態的詳細資訊。 | 
| [DescribeInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html) | `ec2:DescribeInstances`<br />需要檢視 EC2 執行個體的詳細資訊。 | 
| [RebootInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RebootInstances.html) | `ec2:RebootInstances`<br />需要重新啟動 EC2 執行個體。 | 
| [StopInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_StopInstances.html) | `ec2:StopInstances`<br />需要停止 EC2 執行個體。 | 
| [TerminateInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TerminateInstances.html) | `ec2:TerminateInstances`<br />需要終止 EC2 執行個體。 | 

## Amazon EC2 Auto Scaling API 操作與動作所需的許可
<a name="cw-as-permissions-table"></a>


| Amazon EC2 Auto Scaling API 操作 | 所需許可 (API 動作) | 
| --- | --- | 
| 擴展 | `autoscaling:Scaling`<br />需要擴展 Auto Scaling 群組。 | 
| 觸發條件 | `autoscaling:Trigger`<br />需要觸發 Auto Scaling 動作。 | 