

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

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

获取持久函数执行的执行历史。

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

```
$ sam local execution history EXECUTION_ID [OPTIONS]
```

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

`EXECUTION_ID`  
要检索历史记录的持久函数执行的唯一标识符。

## 选项
<a name="ref-sam-cli-local-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-local-execution-history-examples"></a>

以表格格式获取执行历史记录：

```
$ sam local execution history my-execution-id
```

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

```
$ sam local execution history my-execution-id --format json
```