

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 檢視轉返狀態詳細資訊
<a name="stage-rollback-view-details"></a>

您可以檢視復原執行的狀態和目標執行 ID。

## 在詳細資訊頁面上檢視轉返狀態 （主控台）
<a name="stage-rollback-view-details-console"></a>

您可以使用 主控台來檢視復原執行的狀態和目標管道執行 ID。

![\[顯示 CodePipeline 中目標管道執行 ID 欄位的範例狀態頁面。\]](http://docs.aws.amazon.com/zh_tw/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"
  }
  ```