

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

# 查看回滚状态详细信息
<a name="stage-rollback-view-details"></a>

您可以查看回滚执行的状态和目标执行 ID。

## 在详细信息页面上查看回滚状态（控制台）
<a name="stage-rollback-view-details-console"></a>

您可以使用控制台查看回滚执行的状态和目标管道执行 ID。

![\[显示中目标管道执行 ID 字段的状态页面示例 CodePipeline。\]](http://docs.aws.amazon.com/zh_cn/codepipeline/latest/userguide/images/rollback-view-status-console.png)


## 使用 `get-pipeline-execution`（CLI）查看回滚详细信息
<a name="stage-rollback-view-details-cli"></a>

已回滚的管道执行将显示在获取管道执行的输出中。
+ 要查看管道的详细信息，请运行 **[get-pipeline-execution](https://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-execution.html)** 命令，指定管道的唯一名称。例如，要查看名为 *MyFirstPipeline* 的管道的详细信息，请输入以下内容：

  ```
  aws codepipeline get-pipeline-execution --pipeline-name MyFirstPipeline --pipeline-execution-id 3f658bd1-69e6-4448-ba3e-79007EXAMPLE
  ```

  该命令会返回管道结构。

  以下示例显示了管道中名为的部分返回的数据*MyFirstPipeline*，其中显示了回滚执行 ID 和元数据。

  ```
  {
      "pipelineExecution": {
          "pipelineName": "MyFirstPipeline",
          "pipelineVersion": 6,
          "pipelineExecutionId": "2004a94e-8b46-4c34-a695-c8d20EXAMPLE",
          "status": "Succeeded",
          "artifactRevisions": [
              {
                  "name": "SourceArtifact",
                  "revisionId": "<ID>",
                  "revisionSummary": "Added README.txt",
                  "revisionUrl": "<console_URL>"
              }
          ],
          "trigger": {
              "triggerType": "ManualRollback",
              "triggerDetail": "arn:aws:sts::<account_ID>:assumed-role/<role>"
          },
          "executionMode": "SUPERSEDED",
          "executionType": "ROLLBACK",
          "rollbackMetadata": {
              "rollbackTargetPipelineExecutionId": "4f47bed9-6998-476c-a49d-e60beEXAMPLE"
          }
      }
  }
  ```

## 使用 `get-pipeline-state`（CLI）查看回滚状态
<a name="w2aac34c10c17b9"></a>

已回滚的管道执行将显示在获取管道状态的输出中。
+ 要查看管道的详细信息，请运行 **get-pipeline-state** 命令，指定管道的唯一名称。例如，要查看名为的管道的状态详细信息*MyFirstPipeline*，请输入以下内容：

  ```
  aws codepipeline get-pipeline-state --name MyFirstPipeline
  ```

  下面的示例显示了含有回滚执行类型的返回数据。

  ```
  {
      "pipelineName": "MyFirstPipeline",
      "pipelineVersion": 7,
      "stageStates": [
          {
              "stageName": "Source",
              "inboundExecutions": [],
              "inboundTransitionState": {
                  "enabled": true
              },
              "actionStates": [
                  {
                      "actionName": "Source",
                      "currentRevision": {
                          "revisionId": "<Revision_ID>"
                      },
                      "latestExecution": {
                          "actionExecutionId": "13bbd05d-b439-4e35-9c7e-887cb789b126",
                          "status": "Succeeded",
                          "summary": "update",
                          "lastStatusChange": "2024-04-24T20:13:45.799000+00:00",
                          "externalExecutionId": "10cbEXAMPLEID"
                      },
                      "entityUrl": "console-url",
                      "revisionUrl": "console-url"
                  }
              ],
              "latestExecution": {
                  "pipelineExecutionId": "cf95a8ca-0819-4279-ae31-03978EXAMPLE",
                  "status": "Succeeded"
              }
          },
          {
              "stageName": "deploys3",
              "inboundExecutions": [],
              "inboundTransitionState": {
                  "enabled": true
              },
              "actionStates": [
                  {
                      "actionName": "s3deploy",
                      "latestExecution": {
                          "actionExecutionId": "3bc4e3eb-75eb-45b9-8574-8599aEXAMPLE",
                          "status": "Succeeded",
                          "summary": "Deployment Succeeded",
                          "lastStatusChange": "2024-04-24T20:14:07.577000+00:00",
                          "externalExecutionId": "mybucket/SampleApp.zip"
                      },
                      "entityUrl": "console-URL"
                  }
              ],
              "latestExecution": {
                  "pipelineExecutionId": "fdf6b2ae-1472-4b00-9a83-1624eEXAMPLE",
                  "status": "Succeeded",
                  "type": "ROLLBACK"
              }
          }
      ],
      "created": "2024-04-15T21:29:01.635000+00:00",
      "updated": "2024-04-24T20:12:24.480000+00:00"
  }
  ```