IAM 权限和策略 - Amazon Managed Service for Prometheus

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

IAM 权限和策略

访问 Amazon Managed Service for Prometheus 操作和数据需要凭证。这些凭证必须有权执行操作和访问 AWS 资源,例如检索关于您的云资源的 Amazon Managed Service for Prometheus 数据。以下部分提供详细信息来说明如何使用 AWS Identity and Access Management(IAM)和 Amazon Managed Service for Prometheus 控制谁能访问您的资源,从而对这些资源进行保护。有关更多信息,请参阅 IAM 中的策略和权限

Amazon Managed Service for Prometheus 权限

下表显示了可能的 Amazon Managed Service for Prometheus 操作及其所需的权限。这些操作可能还需要其它服务的权限,此处未详细介绍。

操作 所需的权限

创建警报。

aps:CreateAlertManagerAlerts

在工作区创建警报管理器定义。有关更多信息,请参阅警报管理器

aps:CreateAlertManagerDefinition

在工作区创建规则组命名空间。有关更多信息,请参阅记录规则和警报规则

aps:CreateRuleGroupsNamespace

创建 Amazon Managed Service for Prometheus 工作区。工作区是专用于存储和查询 Prometheus 指标的逻辑空间。

aps:CreateWorkspace

从工作区删除警报管理器定义。

aps:DeleteAlertManagerDefinition

删除警报静默。

aps:DeleteAlertManagerSilence

删除 Amazon Managed Service for Prometheus 工作区。

aps:DeleteWorkspace

检索有关警报管理器定义的详细信息。

aps:DescribeAlertManagerDefinition

检索有关规则组命名空间的详细信息。

aps:DescribeRuleGroupsNamespace

检索有关 Amazon Managed Service for Prometheus 工作区的详细信息。

aps:DescribeWorkspace

检索有关警报静默的详细信息。

aps:GetAlertManagerSilence

检索工作区中警报管理器的状态。

aps:GetAlertManagerStatus

检索标签。

aps:GetLabels

检索 Amazon Managed Service for Prometheus 指标的元数据。

aps:GetMetricMetadata

检索时间序列数据。

aps:GetSeries

检索警报管理器定义中定义的警报组列表。

aps:ListAlertManagerAlertGroups

检索警报管理器中定义的警报列表。

aps:ListAlertManagerAlerts

检索警报管理器定义中定义的接收方列表。

aps:ListAlertManagerReceivers

检索已定义的警报静默列表。

aps:ListAlertManagerSilences

检索活动警报列表。

aps:ListAlerts

检索工作区中规则组命名空间中的规则列表。

aps:ListRules

检索工作区中规则组命名空间的列表。

aps:ListRuleGroupsNamespaces

检索与 Amazon Managed Service for Prometheus 资源关联的标签。

aps:ListTagsForResource

检索您账户中存在的 Amazon Managed Service for Prometheus 工作区的列表。

aps:ListWorkspaces

更新工作区中现有的警报管理器定义。

aps:PutAlertManagerDefinition

创建警报静默。

aps:PutAlertManagerSilences

更新现有规则组命名空间。

aps:PutRuleGroupsNamespace

对 Amazon Managed Service for Prometheus 指标运行查询。

aps:QueryMetrics

执行远程写入操作以启动将指标从 Prometheus 服务器流式传输到 Amazon Managed Service for Prometheus。

aps:RemoteWrite

为 Amazon Managed Service for Prometheus 资源分配标签。

aps:TagResource

删除 Amazon Managed Service for Prometheus 资源中的标签。

aps:UntagResource

修改现有工作区的别名。

aps:UpdateWorkspaceAlias

创建日志记录配置。

aps:CreateLoggingConfiguration

删除日志记录配置

aps:DeleteLoggingConfiguration

描述工作区日志记录配置。

aps:DescribeLoggingConfiguration

更新日志记录配置。

aps:UpdateLoggingConfiguration

示例 IAM 策略

本部分提供了您可以创建的其它自行管理策略的示例。

以下 IAM 策略授予对 Amazon Managed Service for Prometheus 的完全访问权限,还支持用户发现 Amazon EKS 集群并查看有关集群的详细信息。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "aps:*", "eks:DescribeCluster", "eks:ListClusters" ], "Resource": "*" } ] }