

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

# sam remote execution history
<a name="sam-cli-command-reference-sam-remote-execution-history"></a>

从 AWS Lambda 检索特定持久函数执行的执行历史记录。

执行 ARN 应采用执行日志返回 StartDurableExecution 或在执行日志中找到的格式。

**注意**  
此命令需要访问 AWS 凭证。

## 用法
<a name="ref-sam-cli-remote-execution-history-usage"></a>

```
$ sam remote execution history DURABLE_EXECUTION_ARN [OPTIONS]
```

## 必需的参数
<a name="ref-sam-cli-remote-execution-history-arguments"></a>

`DURABLE_EXECUTION_ARN`  
要检索历史记录的持久函数执行的 Amazon 资源名称 (ARN)。

## 选项
<a name="ref-sam-cli-remote-execution-history-options"></a>

`--format [table|json]`  
输出格式。默认值：`table`

`--region TEXT`  
设置服务的 AWS 区域（例如，`us-east-1`）。

`--profile TEXT`  
从您的凭证文件中选择一个特定的个人资料以获取 AWS 凭证。

`--config-env TEXT`  
在配置文件中指定默认参数值的环境名称。默认值：`default`

`--config-file TEXT`  
包含默认参数值的配置文件。默认值：`samconfig.toml`

`--save-params`  
将通过命令行提供的参数保存到配置文件中。

`--beta-features / --no-beta-features`  
启用/禁用测试版功能。

`--debug`  
打开调试日志以打印 AWS SAM CLI 生成的调试消息并显示时间戳。

`-h, --help`  
显示此消息并退出。

## 示例
<a name="ref-sam-cli-remote-execution-history-examples"></a>

使用默认表格格式获取执行历史记录：

```
$ sam remote execution history arn:aws:lambda:us-east-1:123456789012:function:MyFunction:$LATEST/durable-execution/my-execution-name/my-execution-id
```

获取 JSON 格式的执行历史记录：

```
$ sam remote execution history arn:aws:lambda:us-east-1:123456789012:function:MyFunction:$LATEST/durable-execution/my-execution-name/my-execution-id --format json
```