View a markdown version of this page

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

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

的操作、资源和条件键 Amazon 步进函数

Amazon 步骤函数(服务前缀: states) 提供以下特定服务的操作、资源、操作和条件密钥,用于 IAM 权限策略。

参考:

API 操作定义为 Amazon 步进函数

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

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

CreateActivity

states:CreateActivity

写入

states:TagResource

标记、写入

CreateStateMachine

states:CreateStateMachine

写入

states:PublishStateMachineVersion

写入

states:TagResource

标记、写入

iam:PassRole

iam:PassedToService

states.amazonaws.com

写入

CreateStateMachineAlias

states:CreateStateMachineAlias

写入

DeleteActivity

states:DeleteActivity

写入

DeleteStateMachine

states:DeleteStateMachine

写入

DeleteStateMachineAlias

states:DeleteStateMachineAlias

写入

DeleteStateMachineVersion

states:DeleteStateMachineVersion

写入

DescribeActivity

states:DescribeActivity

读取

DescribeExecution

states:DescribeExecution

读取

DescribeMapRun

states:DescribeMapRun

读取

DescribeStateMachine

states:DescribeStateMachine

读取

DescribeStateMachineAlias

states:DescribeStateMachineAlias

读取

DescribeStateMachineForExecution

states:DescribeStateMachineForExecution

读取

GetActivityTask

states:GetActivityTask

写入

GetExecutionHistory

states:GetExecutionHistory

读取

ListActivities

states:ListActivities

列表

ListExecutions

states:ListExecutions

列表

ListMapRuns

states:ListMapRuns

列表

ListStateMachineAliases

states:ListStateMachineAliases

列表

ListStateMachineVersions

states:ListStateMachineVersions

列表

ListStateMachines

states:ListStateMachines

列表

ListTagsForResource

states:ListTagsForResource

列表

PublishStateMachineVersion

states:PublishStateMachineVersion

写入

RedriveExecution

states:RedriveExecution

写入

SendTaskFailure

states:SendTaskFailure

写入

SendTaskHeartbeat

states:SendTaskHeartbeat

写入

SendTaskSuccess

states:SendTaskSuccess

写入

StartExecution

states:DescribeExecution

读取

states:StartExecution

写入

StartSyncExecution

states:StartSyncExecution

写入

StopExecution

states:StopExecution

写入

TagResource

states:TagResource

标记、写入

TestState

states:RevealSecrets

读取

states:TestState

写入

iam:PassRole

iam:PassedToService

states.amazonaws.com

写入

UntagResource

states:UntagResource

标记、写入

UpdateMapRun

states:UpdateMapRun

写入

UpdateStateMachine

states:PublishStateMachineVersion

写入

states:UpdateStateMachine

写入

iam:PassRole

iam:PassedToService

states.amazonaws.com

写入

UpdateStateMachineAlias

states:UpdateStateMachineAlias

写入

ValidateStateMachineDefinition

states:ValidateStateMachineDefinition

读取

动作定义为 Amazon 步进函数

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

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

CreateActivity

授予创建活动的权限

activity*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

Write

CreateStateMachine

授予创建状态机的权限

statemachine*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

写入

CreateStateMachineAlias

授予创建状态机别名的权限

statemachine*

aws:ResourceTag/${TagKey}

states:StateMachineQualifier

写入

DeleteActivity

授予删除活动的权限

activity*

aws:ResourceTag/${TagKey}

Write

DeleteStateMachine

授予删除状态机的权限

statemachine*

aws:ResourceTag/${TagKey}

写入

DeleteStateMachineAlias

授予删除状态机别名的权限

statemachine*

aws:ResourceTag/${TagKey}

states:StateMachineQualifier

写入

DeleteStateMachineVersion

授予删除状态机版本的权限

statemachine*

aws:ResourceTag/${TagKey}

states:StateMachineQualifier

写入

DescribeActivity

授予描述活动的权限

activity*

aws:ResourceTag/${TagKey}

Read

DescribeExecution

授予描述执行的权限

execution*

aws:ResourceTag/${TagKey}

读取

express*

DescribeMapRun

授予权限以描述映射运行

maprun*

读取

DescribeStateMachine

授予描述状态机的权限

statemachine*

aws:ResourceTag/${TagKey}

states:StateMachineQualifier

读取

DescribeStateMachineAlias

授予描述状态机别名的权限

statemachine*

aws:ResourceTag/${TagKey}

states:StateMachineQualifier

读取

DescribeStateMachineForExecution

授予描述执行状态机的权限

execution*

aws:ResourceTag/${TagKey}

Read

GetActivityTask

授予工作线程用于检索正在运行的状态机安排执行的任务(通过指定活动 ARN)的权限

activity*

aws:ResourceTag/${TagKey}

Write

GetExecutionHistory

授予将指定执行历史记录作为事件列表返回的权限

execution*

aws:ResourceTag/${TagKey}

Read

ListActivities

授予列出现有活动的权限

List

ListExecutions

授予列出状态机执行的权限

maprun*

states:StateMachineQualifier

列表

statemachine*

aws:ResourceTag/${TagKey}

states:StateMachineQualifier

ListMapRuns

授予权限以列出执行的映射运行

execution*

aws:ResourceTag/${TagKey}

列表

ListStateMachineAliases

授予列出状态机别名的权限

statemachine*

aws:ResourceTag/${TagKey}

states:StateMachineQualifier

列表

ListStateMachineVersions

授予列出状态机版本的权限

statemachine*

aws:ResourceTag/${TagKey}

列表

ListStateMachines

授予列出现有状态机的权限

列表

ListTagsForResource

授予列出标签的权限 Amazon 步骤函数资源

activity

aws:ResourceTag/${TagKey}

列表

statemachine

aws:ResourceTag/${TagKey}

PublishStateMachineVersion

授予发布状态机版本的权限

statemachine*

aws:ResourceTag/${TagKey}

写入

RedriveExecution

授予重新驱动执行的权限

execution*

aws:ResourceTag/${TagKey}

写入

SendTaskFailure

授予工作线程用于报告由 taskToken 标识的任务已失败的权限

Write

SendTaskHeartbeat

授予工作线程用于向服务报告,由指定的 taskToken 表示的任务仍在进行中的权限

Write

SendTaskSuccess

授予工作线程用于报告由 taskToken 标识的任务已成功完成的权限

Write

StartExecution

授予启动状态机执行的权限

statemachine*

aws:ResourceTag/${TagKey}

states:StateMachineQualifier

Write

StartSyncExecution

授予启动 Synchronous Express 状态机执行的权限

statemachine*

aws:ResourceTag/${TagKey}

states:StateMachineQualifier

Write

StopExecution

授予停止执行的权限

execution*

aws:ResourceTag/${TagKey}

写入

TagResource

授予标记的权限 Amazon 步骤函数资源

activity

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

标记、写入

statemachine

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

TestState

授予测试状态机定义的权限

写入

UntagResource

授予从中移除标签的权限 Amazon 步骤函数资源

activity

aws:ResourceTag/${TagKey}

aws:TagKeys

标记、写入

statemachine

aws:ResourceTag/${TagKey}

aws:TagKeys

UpdateMapRun

授予权限以更新映射运行

maprun*

写入

UpdateStateMachine

授予更新状态机的权限

statemachine*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

写入

UpdateStateMachineAlias

授予更新状态机别名的权限

statemachine*

aws:ResourceTag/${TagKey}

states:StateMachineQualifier

写入

ValidateStateMachineDefinition

授予权限以测试状态机定义

读取

Permission-only 的操作 Amazon 步进函数

以下操作定义为 Amazon 步进函数,但不能通过任何 API 操作直接调用。它们只能在 IAM 政策声明中用于授予或拒绝权限。

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

InvokeHTTPEndpoint

授予调用 HTTP Task 状态的权限

写入

RevealSecrets

授予检索执行中的敏感数据的权限

读取

资源类型定义为 Amazon 步进函数

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

资源类型 ARN 条件键

activity

arn:${Partition}:states:${Region}:${Account}:activity:${ActivityName}

aws:ResourceTag/${TagKey}

execution

arn:${Partition}:states:${Region}:${Account}:execution:${StateMachineName}:${ExecutionId}

aws:ResourceTag/${TagKey}

express

arn:${Partition}:states:${Region}:${Account}:express:${StateMachineName}:${ExecutionId}:${ExpressId}

labelled execution

arn:${Partition}:states:${Region}:${Account}:execution:${StateMachineName}/${MapRunLabel}:${ExecutionId}

labelled express

arn:${Partition}:states:${Region}:${Account}:express:${StateMachineName}/${MapRunLabel}:${ExecutionId}:${ExpressId}

maprun

arn:${Partition}:states:${Region}:${Account}:mapRun:${StateMachineName}/${MapRunLabel}:${MapRunId}

statemachine

arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}

aws:ResourceTag/${TagKey}

statemachinealias

arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}:${StateMachineAliasName}

aws:ResourceTag/${TagKey}

statemachineversion

arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}:${StateMachineVersionId}

aws:ResourceTag/${TagKey}

的条件键 Amazon 步进函数

Amazon Step Functions 定义了以下条件键,这些条件键可用于 Condition IAM 政策的元素。

条件键 描述 类型

aws:RequestTag/${TagKey}

按请求中允许的标签键值对筛选访问

String

aws:ResourceTag/${TagKey}

按某个资源的标签键值对筛选访问

String

aws:TagKeys

按请求中允许的标签键列表筛选访问

ArrayOfString

states:HTTPEndpoint

按请求中的 HTTP Task 状态允许的端点筛选访问权限

String

states:HTTPMethod

按请求中的 HTTP Task 状态允许的方法筛选访问权限

String

states:StateMachineQualifier

按状态机 ARN 的限定符筛选访问权限

ArrayOfString