

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

# Amazon Inspector 的操作、资源和条件键
<a name="list_amazoninspector"></a>

Amazon Inspector（服务前缀：`inspector`）提供以下服务特定的资源、操作和条件上下文键以在 IAM 权限策略中使用。

参考：
+ 了解如何[配置该服务](https://docs.aws.amazon.com/inspector/latest/userguide/)。
+ 查看[适用于该服务的 API 操作列表](https://docs.aws.amazon.com/inspector/latest/APIReference/)。
+ 了解如何[使用 IAM](https://docs.aws.amazon.com/inspector/latest/userguide/access_permissions.html) 权限策略保护该服务及其资源。

**Topics**
+ [Amazon Inspector 定义的操作](#amazoninspector-actions-as-permissions)
+ [Amazon Inspector 定义的资源类型](#amazoninspector-resources-for-iam-policies)
+ [Amazon Inspector 的条件键](#amazoninspector-policy-keys)

## Amazon Inspector 定义的操作
<a name="amazoninspector-actions-as-permissions"></a>

您可以在 IAM 策略语句的 `Action` 元素中指定以下操作。可以使用策略授予在 AWS中执行操作的权限。您在策略中使用一项操作时，通常使用相同的名称允许或拒绝对 API 操作或 CLI 命令的访问。但在某些情况下，单一动作可控制对多项操作的访问。还有某些操作需要多种不同的动作。

操作表的**访问级别**列描述如何对操作进行分类（列出、读取、权限管理或标记）。此分类可以帮助您了解当您在策略中使用操作时，相应操作授予的访问级别。有关访问级别的更多信息，请参阅[策略摘要中的访问级别](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_understand-policy-summary-access-level-summaries.html)。

操作表的**资源类型**列指示每项操作是否支持资源级权限。如果该列没有任何值，您必须在策略语句的 `Resource` 元素中指定策略应用的所有资源（“\*”）。通过在 IAM policy 中使用条件来筛选访问权限，以控制是否可以在资源或请求中使用特定标签键。如果操作具有一个或多个必需资源，则调用方必须具有使用这些资源来使用该操作的权限。必需资源在表中以星号 (\*) 表示。如果您在 IAM policy 中使用 `Resource` 元素限制资源访问权限，则必须为每种必需的资源类型添加 ARN 或模式。某些操作支持多种资源类型。如果资源类型是可选的（未指示为必需），则可以选择使用一种可选资源类型。

操作表的**条件键**列包括可以在策略语句的 `Condition` 元素中指定的键。有关与服务资源关联的条件键的更多信息，请参阅资源类型表的**条件键**列。

操作表的**依赖操作**列显示成功调用操作可能需要的其他权限。除了操作本身的权限以外，可能还需要这些权限。若某个操作指定依赖操作，则这些依赖关系可能适用于为该操作定义的其他资源，而不仅仅是表中列出的第一个资源。

**注意**  
资源条件键在[资源类型](#amazoninspector-resources-for-iam-policies)表中列出。您可以在操作表的**资源类型（\* 为必需）**列中找到应用于某项操作的资源类型的链接。资源类型表中的资源类型包括**条件密钥**列，这是应用于操作表中操作的资源条件键。

有关下表中各列的详细信息，请参阅[操作表](reference_policies_actions-resources-contextkeys.html#actions_table)。


****  

| 操作 | 描述 | 访问级别 | 资源类型（\* 为必需） | 条件键 | 相关操作 | 
| --- | --- | --- | --- | --- | --- | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_AddAttributesToFindings.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_AddAttributesToFindings.html)  | 授予权限以将属性（键和键值对）分配给结果的 ARN 所指定的结果 | 写入 |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_CreateAssessmentTarget.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_CreateAssessmentTarget.html)  | 授予使用由生成的资源组的 ARN 创建新评估目标的权限 CreateResourceGroup | 写入 |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_CreateAssessmentTemplate.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_CreateAssessmentTemplate.html)  | 授予权限以为评估目标的 ARN 所指定的评估目标创建评估模板 | Write |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_CreateExclusionsPreview.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_CreateExclusionsPreview.html)  | 授予权限以开始为指定的评估模板生成排除项预览 | Write |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_CreateResourceGroup.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_CreateResourceGroup.html)  | 授予权限以使用用于选择要包含在 Amazon Inspector 评估目标中的 EC2 实例的一组指定标签（键和键值对）创建资源组 | Write |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_DeleteAssessmentRun.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_DeleteAssessmentRun.html)  | 授予权限以删除评估运行的 ARN 所指定的评估运行 | Write |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_DeleteAssessmentTarget.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_DeleteAssessmentTarget.html)  | 授予权限以删评估目标的 ARN 所指定的评估目标 | Write |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_DeleteAssessmentTemplate.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_DeleteAssessmentTemplate.html)  | 授予权限以删除评估模板的 ARN 所指定的评估模板 | Write |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeAssessmentRuns.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeAssessmentRuns.html)  | 授予权限以描述评估运行的 ARN 所指定的评估运行 | Read |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeAssessmentTargets.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeAssessmentTargets.html)  | 授予权限以描述评估目标的 ARN 所指定的评估目标 | Read |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeAssessmentTemplates.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeAssessmentTemplates.html)  | 授予权限以描述评估模板的 ARN 所指定的评估模板 | 读取 |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeCrossAccountAccessRole.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeCrossAccountAccessRole.html)  | 授予描述允许 Amazon Inspector 访问您的 IAM 角色的权限 AWS 账户 | 读取 |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeExclusions.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeExclusions.html)  | 授予权限以描述排除项 ARN 所指定的排除项 | Read |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeFindings.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeFindings.html)  | 授予权限以描述结果的 ARN 所指定的结果 | Read |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeResourceGroups.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeResourceGroups.html)  | 授予权限以描述资源组的 ARN 所指定的资源组 | Read |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeRulesPackages.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_DescribeRulesPackages.html)  | 授予权限以描述规则包的 ARN 所指定的规则包 | Read |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_GetAssessmentReport.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_GetAssessmentReport.html)  | 授予权限以生成报告，其中包含指定评估运行的全面而详细的结果 | 读取 |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_GetExclusionsPreview.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_GetExclusionsPreview.html)  | 授予检索由预览令牌指定的排除项预览（ ExclusionPreview 对象列表）的权限 | 读取 |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_GetTelemetryMetadata.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_GetTelemetryMetadata.html)  | 授予权限以获取有关指定的评估运行所收集的数据的信息 | Read |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListAssessmentRunAgents.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListAssessmentRunAgents.html)  | 授予权限以列出评估运行的 ARN 所指定的评估运行的代理 | List |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListAssessmentRuns.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListAssessmentRuns.html)  | 授予权限以列出对应于评估模板的 ARN 所指定的评估模板的评估运行 | 列表 |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListAssessmentTargets.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListAssessmentTargets.html)  | 授予在此列出评估目标的 ARN 的权限 AWS 账户 | 列表 |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListAssessmentTemplates.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListAssessmentTemplates.html)  | 授予权限以列出对应于评估目标的 ARN 所指定的评估目标的评估模板 | List |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListEventSubscriptions.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListEventSubscriptions.html)  | 授予权限以列出评估模板的 ARN 所指定的评估模板的所有事件订阅 | List |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListExclusions.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListExclusions.html)  | 授予权限以列出评估运行所生成的排除项 | List |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListFindings.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListFindings.html)  | 授予权限以列出评估运行的 ARN 所指定的评估运行生成的结果 | List |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListRulesPackages.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListRulesPackages.html)  | 授予权限以列出所有可用的 Amazon Inspector 规则包 | List |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListTagsForResource.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_ListTagsForResource.html)  | 授予权限以列出与评估模板关联的所有标签 | Read |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_PreviewAgents.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_PreviewAgents.html)  | 授予权限以预览安装在属于指定评估目标一部分的 EC2 实例上的代理 | 读取 |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_RegisterCrossAccountAccessRole.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_RegisterCrossAccountAccessRole.html)  | 授予注册 IAM 角色的权限，Amazon Inspector 使用该角色在评估运行开始时或您调用 PreviewAgents 操作时列出您的 EC2 实例 | 写入 |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_RemoveAttributesFromFindings.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_RemoveAttributesFromFindings.html)  | 授予权限以从结果的 ARN 所指定的结果中删除具有指定键的全部属性（键和键值对） | Write |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_SetTagsForResource.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_SetTagsForResource.html)  | 授予权限以将标签（键和键值对）设置为评估模板的 ARN 所指定的评估模板 | Tagging |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_StartAssessmentRun.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_StartAssessmentRun.html)  | 授予权限以启动评估模板的 ARN 所指定的评估运行 | Write |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_StopAssessmentRun.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_StopAssessmentRun.html)  | 授予权限以停止评估运行的 ARN 所指定的评估运行 | Write |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_SubscribeToEvent.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_SubscribeToEvent.html)  | 授予权限以启用将有关指定事件的 Amazon Simple Notification Service (SNS) 通知发送到指定 SNS 主题的过程 | Write |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_UnsubscribeFromEvent.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_UnsubscribeFromEvent.html)  | 授予权限以禁用将有关指定事件的 Amazon Simple Notification Service (SNS) 通知发送到指定 SNS 主题的过程 | Write |  |  |  | 
|   [https://docs.aws.amazon.com/inspector/latest/APIReference/API_UpdateAssessmentTarget.html](https://docs.aws.amazon.com/inspector/latest/APIReference/API_UpdateAssessmentTarget.html)  | 授予权限以更新评估目标的 ARN 所指定的评估目标 | Write |  |  |  | 

## Amazon Inspector 定义的资源类型
<a name="amazoninspector-resources-for-iam-policies"></a>

Amazon Inspector 不支持在 IAM policy 语句的 `Resource` 元素中指定资源 ARN。要允许对 Amazon Inspector 的访问权限，请在策略中指定 `"Resource": "*"`。

## Amazon Inspector 的条件键
<a name="amazoninspector-policy-keys"></a>

Inspector 没有可以在策略语句的 `Condition` 元素中使用的服务特定上下文键。有关适用于所有服务的全局上下文键列表，请参阅 [AWS 全局条件上下文键](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html)。