

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

# API 摘要
<a name="swf-dev-iam.api"></a>

本部分简要介绍了如何使用 IAM 策略来控制操作者如何使用每个 API 和伪 API 访问 Amazon SWF 资源。
+ 对于除 `RegisterDomain` 和 `ListDomains` 之外的所有操作，您可以通过授予域资源权限的方式允许或拒绝对任何或所有账户域的访问。
+ 您可以允许或拒绝任何常规 API 成员的权限，如果您授权调用 `[RespondDecisionTaskCompleted](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RespondDecisionTaskCompleted.html)`，还可以允许或拒绝任何伪 API 成员的权限。
+ 您可以使用 Condition 限制某些参数的可允许值。

以下章节列出了可针对每个常规和伪 API 成员限制的参数，并提供了相关密钥，指出您可以根据其控制域访问的任何限制条件。

## 常规 API
<a name="swf-dev-iam.api.regular"></a>

本章节列出了常规 API 成员，并简要描述了可进行限制的参数和相关密钥。它还指出了您可以根据其控制域访问的任何限制条件。

`[CountClosedWorkflowExecutions](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_CountClosedWorkflowExecutions.html)`
+ `tagFilter.tag` – 字符串约束。密钥是 `swf:tagFilter.tag`
+ `typeFilter.name` – 字符串约束。键是 `swf:typeFilter.name`。
+ `typeFilter.version` – 字符串约束。键是 `swf:typeFilter.version`。

**注意**  
`CountClosedWorkflowExecutions` 要求 `typeFilter` 和 `tagFilter` 相互排斥。

`[CountOpenWorkflowExecutions](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_CountOpenWorkflowExecutions.html)`
+ `tagFilter.tag` – 字符串约束。密钥是 `swf:tagFilter.tag`
+ `typeFilter.name` – 字符串约束。键是 `swf:typeFilter.name`。
+ `typeFilter.version` – 字符串约束。键是 `swf:typeFilter.version`。

**注意**  
`CountOpenWorkflowExecutions` 要求 `typeFilter` 和 `tagFilter` 相互排斥。

`[CountPendingActivityTasks](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_CountPendingActivityTasks.html)`
+ `taskList.name` – 字符串约束。键是 `swf:taskList.name`。

`[CountPendingDecisionTasks](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_CountPendingDecisionTasks.html)`
+ `taskList.name` – 字符串约束。键是 `swf:taskList.name`。

`[DeleteActivityType](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_DeleteActivityType.html)`
+ `activityType.name` – 字符串约束。键是 `swf:activityType.name`。
+ `activityType.version` – 字符串约束。键是 `swf:activityType.version`。

`[DeprecateActivityType](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_DeprecateActivityType.html)`
+ `activityType.name` – 字符串约束。键是 `swf:activityType.name`。
+ `activityType.version` – 字符串约束。键是 `swf:activityType.version`。

`[DeprecateDomain](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_DeprecateDomain.html)`
+ 您不能限制此操作的参数。

`[DeleteWorkflowType](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_DeleteWorkflowType.html)`
+ `workflowType.name` – 字符串约束。键是 `swf:workflowType.name`。
+ `workflowType.version` – 字符串约束。键是 `swf:workflowType.version`。

`[DeprecateWorkflowType](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_DeprecateWorkflowType.html)`
+ `workflowType.name` – 字符串约束。键是 `swf:workflowType.name`。
+ `workflowType.version` – 字符串约束。键是 `swf:workflowType.version`。

`[DescribeActivityType](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_DescribeActivityType.html)`
+ `activityType.name` – 字符串约束。键是 `swf:activityType.name`。
+ `activityType.version` – 字符串约束。键是 `swf:activityType.version`。

`[DescribeDomain](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_DescribeDomain.html)`
+ 您不能限制此操作的参数。

`[DescribeWorkflowExecution](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_DescribeWorkflowExecution.html)`
+ 您不能限制此操作的参数。

`[DescribeWorkflowType](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_DescribeWorkflowType.html)`
+ `workflowType.name` – 字符串约束。键是 `swf:workflowType.name`。
+ `workflowType.version` – 字符串约束。键是 `swf:workflowType.version`。

`[GetWorkflowExecutionHistory](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_GetWorkflowExecutionHistory.html)`
+ 您不能限制此操作的参数。

`[ListActivityTypes](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_ListActivityTypes.html)`
+ 您不能限制此操作的参数。

`[ListClosedWorkflowExecutions](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_ListClosedWorkflowExecutions.html)`
+ `tagFilter.tag` – 字符串约束。密钥是 `swf:tagFilter.tag`
+ `typeFilter.name` – 字符串约束。键是 `swf:typeFilter.name`。
+ `typeFilter.version` – 字符串约束。键是 `swf:typeFilter.version`。

**注意**  
`ListClosedWorkflowExecutions` 要求 `typeFilter` 和 `tagFilter` 相互排斥。

`[ListDomains](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_ListDomains.html)`
+ 您不能限制此操作的参数。

`[ListOpenWorkflowExecutions](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_ListOpenWorkflowExecutions.html)`
+ `tagFilter.tag` – 字符串约束。密钥是 `swf:tagFilter.tag`
+ `typeFilter.name` – 字符串约束。键是 `swf:typeFilter.name`。
+ `typeFilter.version` – 字符串约束。键是 `swf:typeFilter.version`。

**注意**  
`ListOpenWorkflowExecutions` 要求 `typeFilter` 和 `tagFilter` 相互排斥。

`[ListWorkflowTypes](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_ListWorkflowTypes.html)`
+ 您不能限制此操作的参数。

`[PollForActivityTask](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_PollForActivityTask.html)`
+ `taskList.name` – 字符串约束。键是 `swf:taskList.name`。

`[PollForDecisionTask](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_PollForDecisionTask.html)`
+ `taskList.name` – 字符串约束。键是 `swf:taskList.name`。

`[RecordActivityTaskHeartbeat](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RecordActivityTaskHeartbeat.html)`
+ 您不能限制此操作的参数。

`[RegisterActivityType](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RegisterActivityType.html)`
+ `defaultTaskList.name` – 字符串约束。键是 `swf:defaultTaskList.name`。
+ `name` – 字符串约束。键是 `swf:name`。
+ `version` – 字符串约束。键是 `swf:version`。

`[RegisterDomain](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RegisterDomain.html)`
+ `name` – 注册的域名可作为此操作的资源。

`[RegisterWorkflowType](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RegisterWorkflowType.html)`
+ `defaultTaskList.name` – 字符串约束。键是 `swf:defaultTaskList.name`。
+ `name` – 字符串约束。键是 `swf:name`。
+ `version` – 字符串约束。键是 `swf:version`。

`[RequestCancelWorkflowExecution](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RequestCancelWorkflowExecution.html)`
+ 您不能限制此操作的参数。

`[RespondActivityTaskCanceled](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RespondActivityTaskCanceled.html)`
+ 您不能限制此操作的参数。

`[RespondActivityTaskCompleted](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RespondActivityTaskCompleted.html)`
+ 您不能限制此操作的参数。

`[RespondActivityTaskFailed](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RespondActivityTaskFailed.html)`
+ 您不能限制此操作的参数。

`[RespondDecisionTaskCompleted](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RespondDecisionTaskCompleted.html)`
+ `decisions.member.N` – 通过伪 API 权限间接限制。有关更多信息，请参阅 [伪 API](#swf-dev-iam.api.pseudo)。

`[SignalWorkflowExecution](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_SignalWorkflowExecution.html)`
+ 您不能限制此操作的参数。

`[StartWorkflowExecution](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_StartWorkflowExecution.html)`
+ `tagList.member.0` – 字符串约束。密钥是 `swf:tagList.member.0`
+ `tagList.member.1` – 字符串约束。密钥是 `swf:tagList.member.1`
+ `tagList.member.2` – 字符串约束。密钥是 `swf:tagList.member.2`
+ `tagList.member.3` – 字符串约束。密钥是 `swf:tagList.member.3`
+ `tagList.member.4` – 字符串约束。密钥是 `swf:tagList.member.4`
+ `taskList.name` – 字符串约束。键是 `swf:taskList.name`。
+ `workflowType.name` – 字符串约束。键是 `swf:workflowType.name`。
+ `workflowType.version` – 字符串约束。键是 `swf:workflowType.version`。

**注意**  
限制的标签不能超过五个。

`[TerminateWorkflowExecution](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_TerminateWorkflowExecution.html)`
+ 您不能限制此操作的参数。

## 伪 API
<a name="swf-dev-iam.api.pseudo"></a>

本章节列出了表示 `[RespondDecisionTaskCompleted](https://docs.aws.amazon.com/amazonswf/latest/apireference/API_RespondDecisionTaskCompleted.html)` 中所包含决策的伪 API 成员。如果您已授权使用 `RespondDecisionTaskCompleted`，您的策略会用与常规 API 相同的方法来授予此 API 成员权限。您可以通过设置一个或多个参数的条件来限制伪 API 的某些成员。本章节列出了伪 API 成员，并简要描述了可进行限制的参数与相关密钥。

**注意**  
`aws:SourceIP`、`aws:UserAgent` 和 `aws:SecureTransport` 密钥不可用于伪 API。如果您的预期安全策略需要这些密钥对伪 API 进行访问控制，您可以将其用于 `RespondDecisionTaskCompleted` 操作。

`CancelTimer`
+ 您不能限制此操作的参数。

`CancelWorkflowExecution`
+ 您不能限制此操作的参数。

`CompleteWorkflowExecution`
+ 您不能限制此操作的参数。

`ContinueAsNewWorkflowExecution`
+ `tagList.member.0` – 字符串约束。密钥是 `swf:tagList.member.0`
+ `tagList.member.1` – 字符串约束。密钥是 `swf:tagList.member.1`
+ `tagList.member.2` – 字符串约束。密钥是 `swf:tagList.member.2`
+ `tagList.member.3` – 字符串约束。密钥是 `swf:tagList.member.3`
+ `tagList.member.4` – 字符串约束。密钥是 `swf:tagList.member.4`
+ `taskList.name` – 字符串约束。键是 `swf:taskList.name`。
+ `workflowTypeVersion` – 字符串约束。键是 `swf:workflowTypeVersion`。

**注意**  
限制的标签不能超过五个。

`FailWorkflowExecution`
+ 您不能限制此操作的参数。

`RecordMarker`
+ 您不能限制此操作的参数。

`RequestCancelActivityTask`
+ 您不能限制此操作的参数。

`RequestCancelExternalWorkflowExecution`
+ 您不能限制此操作的参数。

`ScheduleActivityTask`
+ `activityType.name` – 字符串约束。键是 `swf:activityType.name`。
+ `activityType.version` – 字符串约束。键是 `swf:activityType.version`。
+ `taskList.name` – 字符串约束。键是 `swf:taskList.name`。

`SignalExternalWorkflowExecution`
+ 您不能限制此操作的参数。

`StartChildWorkflowExecution`
+ `tagList.member.0` – 字符串约束。密钥是 `swf:tagList.member.0`
+ `tagList.member.1` – 字符串约束。密钥是 `swf:tagList.member.1`
+ `tagList.member.2` – 字符串约束。密钥是 `swf:tagList.member.2`
+ `tagList.member.3` – 字符串约束。密钥是 `swf:tagList.member.3`
+ `tagList.member.4` – 字符串约束。密钥是 `swf:tagList.member.4`
+ `taskList.name` – 字符串约束。键是 `swf:taskList.name`。
+ `workflowType.name` – 字符串约束。键是 `swf:workflowType.name`。
+ `workflowType.version` – 字符串约束。键是 `swf:workflowType.version`。

**注意**  
限制的标签不能超过五个。

`StartTimer`
+ 您不能限制此操作的参数。