View a markdown version of this page

的操作、资源和条件键 Amazon 物联网绿草 V2 - 服务授权参考
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)。

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

的操作、资源和条件键 Amazon 物联网绿草 V2

Amazon IoT Greengrass V2(服务前缀: greengrass) 提供以下特定服务的操作、资源、操作和条件密钥,用于 IAM 权限策略。

参考:

API 操作定义为 Amazon 物联网绿草 V2

下表将 API 操作映射到它们授权的 IAM 操作。仅列出具有给定 API 和操作静态值的条件密钥;有关每个操作支持的全套条件密钥,请参阅 操作表。

操作 IAM 操作 条件键 可能的值 访问级别

AssociateServiceRoleToAccount

greengrass:AssociateServiceRoleToAccount

权限管理,写入

iam:PassRole

iam:PassedToService

greengrass.amazonaws.com

写入

BatchAssociateClientDeviceWithCoreDevice

greengrass:BatchAssociateClientDeviceWithCoreDevice

写入

BatchDisassociateClientDeviceFromCoreDevice

greengrass:BatchDisassociateClientDeviceFromCoreDevice

写入

CancelDeployment

greengrass:CancelDeployment

写入

CreateComponentVersion

greengrass:CreateComponentVersion

写入

greengrass:TagResource

标记、写入

CreateDeployment

greengrass:CreateDeployment

写入

greengrass:TagResource

标记、写入

DeleteComponent

greengrass:DeleteComponent

写入

DeleteCoreDevice

greengrass:DeleteCoreDevice

写入

DeleteDeployment

greengrass:DeleteDeployment

写入

DescribeComponent

greengrass:DescribeComponent

读取

DisassociateServiceRoleFromAccount

greengrass:DisassociateServiceRoleFromAccount

写入

GetComponent

greengrass:GetComponent

读取

GetComponentVersionArtifact

greengrass:GetComponentVersionArtifact

读取

GetConnectivityInfo

greengrass:GetConnectivityInfo

读取

GetCoreDevice

greengrass:GetCoreDevice

读取

GetDeployment

greengrass:GetDeployment

读取

GetServiceRoleForAccount

greengrass:GetServiceRoleForAccount

读取

ListClientDevicesAssociatedWithCoreDevice

greengrass:ListClientDevicesAssociatedWithCoreDevice

列表

ListComponentVersions

greengrass:ListComponentVersions

列表

ListComponents

greengrass:ListComponents

列表

ListCoreDevices

greengrass:ListCoreDevices

列表

ListDeployments

greengrass:ListDeployments

列表

ListEffectiveDeployments

greengrass:ListEffectiveDeployments

列表

ListInstalledComponents

greengrass:ListInstalledComponents

列表

ListTagsForResource

greengrass:ListTagsForResource

读取

TagResource

greengrass:TagResource

标记、写入

UntagResource

greengrass:UntagResource

标记、写入

UpdateConnectivityInfo

greengrass:UpdateConnectivityInfo

写入

动作定义为 Amazon 物联网绿草 V2

您可以在 IAM 策略语句的 Action 元素中指定以下操作。对于每个操作,该表列出了该操作支持的资源类型和条件键。可以使用策略授予在 Amazon中执行操作的权限。您在策略中使用一项操作时,通常使用相同的名称允许或拒绝对 API 操作或 CLI 命令的访问。但在某些情况下,单一动作可控制对多项操作的访问。还有某些操作需要多种不同的动作。

操作 说明 资源类型(* 为必需) 条件键 访问级别

AssociateServiceRoleToAccount

授予将角色与您的账户关联的权限。 Amazon IoT Greengrass 使用此角色访问您的 Lambda 函数和 Amazon 物联网资源

权限管理,写入

BatchAssociateClientDeviceWithCoreDevice

授予权限以将客户端设备列表与核心设备关联

coreDevice*

aws:ResourceTag/${TagKey}

写入

BatchDisassociateClientDeviceFromCoreDevice

授予权限以取消客户端设备列表与核心设备的关联

coreDevice*

aws:ResourceTag/${TagKey}

写入

CancelDeployment

授予取消部署的权限

deployment*

aws:ResourceTag/${TagKey}

Write

CreateComponentVersion

授予创建组件的权限

component*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

Write

CreateDeployment

授予创建部署的权限

aws:RequestTag/${TagKey}

aws:TagKeys

Write

DeleteComponent

授予删除组件的权限

componentVersion*

aws:ResourceTag/${TagKey}

写入

DeleteCoreDevice

授予删除权限 Amazon 物联网 Greengrass 核心设备,它是 Amazon 物联网的东西。此操作将从核心设备列表中删除该核心设备。此操作不会删除 Amazon 物联网的东西

coreDevice*

aws:ResourceTag/${TagKey}

写入

DeleteDeployment

授予权限以删除部署。要删除活动部署,需要先将其取消

deployment*

aws:ResourceTag/${TagKey}

写入

DescribeComponent

授予检索组件版本元数据的权限

componentVersion*

aws:ResourceTag/${TagKey}

读取

DisassociateServiceRoleFromAccount

授予权限以将服务角色与账户取消关联。如果没有服务角色,部署将不起作用

写入

GetComponent

授予获取组件版本配方的权限

componentVersion*

aws:ResourceTag/${TagKey}

Read

GetComponentVersionArtifact

授予获取预签名 URL 以下载公有组件的权限

componentVersion*

aws:ResourceTag/${TagKey}

读取

GetConnectivityInfo

授予权限以检索 Greengrass 核心设备的连接信息

connectivityInfo*

读取

GetCoreDevice

授予检索元数据的权限 Amazon 物联网格林格拉斯核心设备

coreDevice*

aws:ResourceTag/${TagKey}

读取

GetDeployment

授予获取部署的权限

deployment*

aws:ResourceTag/${TagKey}

读取

GetServiceRoleForAccount

授予权限以检索附加到账户的服务角色

读取

ListClientDevicesAssociatedWithCoreDevice

授予检索与关联的客户端设备的分页列表的权限 Amazon 物联网格林格拉斯核心设备

coreDevice*

aws:ResourceTag/${TagKey}

列表

ListComponentVersions

授予检索组件所有版本的分页列表的权限

component*

aws:ResourceTag/${TagKey}

List

ListComponents

授予检索组件摘要的分页列表的权限

列表

ListCoreDevices

授予检索分页列表的权限 Amazon 物联网格林格拉斯核心设备

列表

ListDeployments

授予检索部署分页列表的权限

列表

ListEffectiveDeployments

授予检索分页部署任务列表的权限 Amazon 物联网格林格拉斯发送至 Amazon 物联网格林格拉斯核心设备

coreDevice*

aws:ResourceTag/${TagKey}

列表

ListInstalledComponents

授予检索组件分页列表的权限 Amazon 物联网 Greengrass 核心设备运行

coreDevice*

aws:ResourceTag/${TagKey}

列表

ListTagsForResource

授予列出资源标签的权限

component

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

读取

componentVersion

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

coreDevice

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

deployment

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

ResolveComponentCandidates

授予列出符合部署组件、版本和平台要求的组件的权限

componentVersion*

aws:ResourceTag/${TagKey}

List

TagResource

授予权限以将标签添加到资源中

component

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

标记、写入

componentVersion

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

coreDevice

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

deployment

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

UntagResource

授予权限以从资源中删除标签

component

aws:ResourceTag/${TagKey}

aws:TagKeys

标记、写入

componentVersion

aws:ResourceTag/${TagKey}

aws:TagKeys

coreDevice

aws:ResourceTag/${TagKey}

aws:TagKeys

deployment

aws:ResourceTag/${TagKey}

aws:TagKeys

UpdateConnectivityInfo

授予权限以更新 Greengrass 核心的连接信息。属于具有该核心的组的任何设备都会收到该信息,以便查找该核心的位置并连接到该核心

connectivityInfo*

写入

资源类型定义为 Amazon 物联网绿草 V2

以下资源类型是由该服务定义的,可以在 IAM 权限策略语句的 Resource 元素中使用这些资源类型。

资源类型 ARN 条件键

component

arn:${Partition}:greengrass:${Region}:${Account}:components:${ComponentName}

aws:ResourceTag/${TagKey}

componentVersion

arn:${Partition}:greengrass:${Region}:${Account}:components:${ComponentName}:versions:${ComponentVersion}

aws:ResourceTag/${TagKey}

connectivityInfo

arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/things/${ThingName}/connectivityInfo

coreDevice

arn:${Partition}:greengrass:${Region}:${Account}:coreDevices:${CoreDeviceThingName}

aws:ResourceTag/${TagKey}

deployment

arn:${Partition}:greengrass:${Region}:${Account}:/greengrass/groups/${GroupId}/deployments/${DeploymentId}, arn:${Partition}:greengrass:${Region}:${Account}:deployments:${DeploymentId}

aws:ResourceTag/${TagKey}

的条件键 Amazon 物联网绿草 V2

Amazon IoT Greengrass V2 定义了以下条件密钥,这些密钥可用于 Condition IAM 政策的元素。

条件键 描述 类型

aws:RequestTag/${TagKey}

通过检查标签筛选访问权限 key/value 请求中包含的配对

String

aws:ResourceTag/${TagKey}

通过检查标签筛选访问权限 key/value 与特定资源关联的配对

String

aws:TagKeys

通过检查请求中传递的标签键筛选访问权限

ArrayOfString