AWS Device Farm 的操作、资源和条件键 - 服务授权参考

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

AWS Device Farm 的操作、资源和条件键

AWS Device Farm(服务前缀:devicefarm)提供以下特定于服务的资源、操作和条件上下文密钥,供在 IAM 权限策略中使用。

参考:

AWS Device Farm 定义的操作

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

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

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

注意

资源条件键在资源类型表中列出。您可以在操作表的资源类型(* 为必需)列中找到应用于某项操作的资源类型的链接。资源类型表中的资源类型包括条件密钥列,这是应用于操作表中操作的资源条件键。

有关下表中各列的详细信息,请参阅操作表

操作 描述 访问级别 资源类型(* 为必需) 条件键 相关操作
CreateDevicePool 授予权限以在项目中创建设备池 Write

project*

CreateInstanceProfile 授予权限以创建设备实例配置文件 Write
CreateNetworkProfile 授予权限以在项目中创建网络配置文件 Write

project*

CreateProject 授予权限以创建项目以进行移动测试 写入

ec2:CreateNetworkInterface

ec2:DescribeSecurityGroups

ec2:DescribeSubnets

ec2:DescribeVpcs

iam:CreateServiceLinkedRole

CreateRemoteAccessSession 授予权限以启动到设备实例的远程访问会话 Write

device*

project*

deviceinstance

upload

CreateTestGridProject 授予创建项目以进行桌面测试的权限 Write

ec2:CreateNetworkInterface

ec2:DescribeSecurityGroups

ec2:DescribeSubnets

ec2:DescribeVpcs

iam:CreateServiceLinkedRole

CreateTestGridUrl 授予生成新的预签名 URL(用于访问我们的测试网格服务)的权限 Write

testgrid-project*

CreateUpload 授予权限以在项目中上传新的文件或应用程序 Write

project*

CreateVPCEConfiguration 授予权限以创建 Amazon Virtual Private Cloud (VPC) 终端节点配置 Write
DeleteDevicePool 授予权限以删除用户生成的设备池 Write

devicepool*

DeleteInstanceProfile 授予权限以删除用户生成的实例配置文件 Write

instanceprofile*

DeleteNetworkProfile 授予权限以删除用户生成的网络配置文件 Write

networkprofile*

DeleteProject 授予删除移动测试项目的权限 Write

project*

DeleteRemoteAccessSession 授予权限以删除完成的远程访问会话及其结果 Write

session*

DeleteRun 授予权限以删除运行 Write

run*

DeleteTestGridProject 授予删除桌面测试项目的权限 Write

testgrid-project*

DeleteUpload 授予权限以删除用户上传的文件 Write

upload*

DeleteVPCEConfiguration 授予权限以删除 Amazon Virtual Private Cloud (VPC) 终端节点配置 Write

vpceconfiguration*

GetAccountSettings 授予权限以检索账户购买的非计量 iOS 和/或非计量 Android 设备数 Read
GetDevice 授予权限以检索唯一设备类型信息 Read

device*

GetDeviceInstance 授予权限以检索设备实例信息 Read

deviceinstance*

GetDevicePool 授予权限以检索设备池信息 Read

devicepool*

GetDevicePoolCompatibility 授予权限以检索有关测试和/或应用程序与设备池的兼容性的信息 Read

devicepool*

upload

GetInstanceProfile 授予权限以检索实例配置文件信息 Read

instanceprofile*

GetJob 授予权限以检索作业信息 Read

job*

GetNetworkProfile 授予权限以检索网络配置文件信息 读取

networkprofile*

GetOfferingStatus 授予权限以检索某人购买的所有产品的当前状态和未来状态 AWS 账户 读取
GetProject 授予检索有关移动测试项目的信息的权限 Read

project*

GetRemoteAccessSession 授予权限以检索指向当前运行的远程访问会话的链接 Read

session*

GetRun 授予权限以检索运行信息 Read

run*

GetSuite 授予权限以检索测试套件信息 Read

suite*

GetTest 授予权限以检索测试用例信息 Read

test*

GetTestGridProject 授予检索有关桌面测试项目的信息的权限 Read

testgrid-project*

GetTestGridSession 授予检索测试网格会话的信息的权限 Read

testgrid-project

testgrid-session

GetUpload 授予权限以检索上传的文件信息 Read

upload*

GetVPCEConfiguration 授予权限以检索 Amazon Virtual Private Cloud (VPC) 终端节点配置信息 Read

vpceconfiguration*

InstallToRemoteAccessSession 授予权限以在远程访问会话中将应用程序安装到设备上 Write

session*

upload*

ListArtifacts 授予权限以列出项目中的构件 List

job

run

suite

test

ListDeviceInstances 授予权限以列出设备实例信息 List
ListDevicePools 授予权限以列出设备池信息 List

project*

ListDevices 授予权限以列出唯一设备类型信息 List
ListInstanceProfiles 授予权限以列出设备实例配置文件信息 List
ListJobs 授予权限以列出运行中的作业信息 List

run*

ListNetworkProfiles 授予权限以列出项目中的网络配置文件信息 List

project*

ListOfferingPromotions 授予权限以列出产品促销活动 列出
ListOfferingTransactions 授予列出所有历史购买、续订和系统续订交易的权限 AWS 账户 列出
ListOfferings 授予权限以列出用户可通过 API 管理的产品 列出
ListProjects 授予列出移动测试项目信息的权限 AWS 账户 列出
ListRemoteAccessSessions 授予权限以列出当前运行的远程访问会话信息 List

project*

ListRuns 授予权限以列出项目中的运行信息 List

project*

ListSamples 授予权限以列出项目中的样本信息 List

job*

ListSuites 授予权限以列出作业中的测试套件信息 List

job*

ListTagsForResource 授予权限以列出资源的标签 列出

device

deviceinstance

devicepool

instanceprofile

networkprofile

project

run

session

testgrid-project

testgrid-session

vpceconfiguration

ListTestGridProjects 授予列出桌面测试项目信息的权限 AWS 账户 列出
ListTestGridSessionActions 授予列出在测试网格会话期间执行的会话操作的权限 List

testgrid-session*

ListTestGridSessionArtifacts 授予列出由测试网格会话生成的构件的权限 List

testgrid-session*

ListTestGridSessions 授予列出测试网格项目中会话的权限 List

testgrid-project*

ListTests 授予权限以列出测试套件中的测试信息 List

suite*

ListUniqueProblems 授予权限以列出运行中的唯一问题信息 List

run*

ListUploads 授予权限以列出项目中的上传信息 List

project*

ListVPCEConfigurations 授予权限以列出 Amazon Virtual Private Cloud (VPC) 终端节点配置信息 列出
PurchaseOffering 授予为某人购买产品的权限 AWS 账户 写入
RenewOffering 授予权限以设置要为产品续订的设备数 Write
ScheduleRun 授予权限以计划运行 Write

project*

devicepool

upload

方案:Device Pool as filter

devicepool*

project*

upload

方案:Device Selection Configuration as filter

project*

upload

StopJob 授予权限以终止运行的作业 Write

job*

StopRemoteAccessSession 授予权限以终止运行的远程访问会话 Write

session*

StopRun 授予权限以终止运行的测试运行 Write

run*

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

device

deviceinstance

devicepool

instanceprofile

networkprofile

project

run

session

testgrid-project

testgrid-session

vpceconfiguration

aws:RequestTag/${TagKey}

aws:TagKeys

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

device

deviceinstance

devicepool

instanceprofile

networkprofile

project

run

session

testgrid-project

testgrid-session

vpceconfiguration

aws:TagKeys

UpdateDeviceInstance 授予权限以修改现有的设备实例 Write

deviceinstance*

instanceprofile

UpdateDevicePool 授予权限以修改现有的设备池 Write

devicepool*

UpdateInstanceProfile 授予权限以修改现有的实例配置文件 Write

instanceprofile*

UpdateNetworkProfile 授予权限以修改现有的网络配置文件 Write

networkprofile*

UpdateProject 授予修改现有移动测试项目的权限 Write

project*

ec2:CreateNetworkInterface

ec2:DescribeSecurityGroups

ec2:DescribeSubnets

ec2:DescribeVpcs

iam:CreateServiceLinkedRole

UpdateTestGridProject 授予修改现有桌面测试项目的权限 Write

testgrid-project*

ec2:CreateNetworkInterface

ec2:DescribeSecurityGroups

ec2:DescribeSubnets

ec2:DescribeVpcs

iam:CreateServiceLinkedRole

UpdateUpload 授予权限以修改现有的上传 Write

upload*

UpdateVPCEConfiguration 授予权限以修改现有的 Amazon Virtual Private Cloud (VPC) 终端节点配置 Write

vpceconfiguration*

AWS Device Farm 定义的资源类型

以下资源类型是由该服务定义的,可以在 IAM 权限策略语句的 Resource 元素中使用这些资源类型。操作表中的每个操作指定了可以使用该操作指定的资源类型。您也可以在策略中包含条件键,从而定义资源类型。这些键显示在资源类型表的最后一列。有关下表中各列的详细信息,请参阅资源类型表

资源类型 ARN 条件键
project arn:${Partition}:devicefarm:${Region}:${Account}:project:${ResourceId}

aws:ResourceTag/${TagKey}

run arn:${Partition}:devicefarm:${Region}:${Account}:run:${ResourceId}

aws:ResourceTag/${TagKey}

job arn:${Partition}:devicefarm:${Region}:${Account}:job:${ResourceId}
suite arn:${Partition}:devicefarm:${Region}:${Account}:suite:${ResourceId}
test arn:${Partition}:devicefarm:${Region}:${Account}:test:${ResourceId}
upload arn:${Partition}:devicefarm:${Region}:${Account}:upload:${ResourceId}
artifact arn:${Partition}:devicefarm:${Region}:${Account}:artifact:${ResourceId}
sample arn:${Partition}:devicefarm:${Region}:${Account}:sample:${ResourceId}
networkprofile arn:${Partition}:devicefarm:${Region}:${Account}:networkprofile:${ResourceId}

aws:ResourceTag/${TagKey}

deviceinstance arn:${Partition}:devicefarm:${Region}::deviceinstance:${ResourceId}

aws:ResourceTag/${TagKey}

session arn:${Partition}:devicefarm:${Region}:${Account}:session:${ResourceId}

aws:ResourceTag/${TagKey}

devicepool arn:${Partition}:devicefarm:${Region}:${Account}:devicepool:${ResourceId}

aws:ResourceTag/${TagKey}

device arn:${Partition}:devicefarm:${Region}::device:${ResourceId}

aws:ResourceTag/${TagKey}

instanceprofile arn:${Partition}:devicefarm:${Region}:${Account}:instanceprofile:${ResourceId}

aws:ResourceTag/${TagKey}

vpceconfiguration arn:${Partition}:devicefarm:${Region}:${Account}:vpceconfiguration:${ResourceId}

aws:ResourceTag/${TagKey}

testgrid-project arn:${Partition}:devicefarm:${Region}:${Account}:testgrid-project:${ResourceId}

aws:ResourceTag/${TagKey}

testgrid-session arn:${Partition}:devicefarm:${Region}:${Account}:testgrid-session:${ResourceId}

aws:ResourceTag/${TagKey}

AWS Device Farm 的条件键

AWS Device Farm 定义了以下条件键,这些条件键可用于 IAM 策略的Condition元素。您可以使用这些键进一步细化应用策略语句的条件。有关下表中各列的详细信息,请参阅条件键表

要查看适用于所有服务的全局条件键,请参阅可用的全局条件键

条件键 描述 类型
aws:RequestTag/${TagKey} 根据每个标签的允许值集筛选操作 字符串
aws:ResourceTag/${TagKey} 根据与资源关联的标签值筛选操作 字符串
aws:TagKeys 根据在请求中是否具有必需标签以筛选操作 ArrayOfString