

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# 実行履歴でステージ条件のルール結果を表示する
<a name="w2aac19c19c21"></a>

実行のルール結果により、ステージ条件がルールを実行してステージの結果 (ロールバックや失敗など) を適用したことを確認できます。

条件とルールの有効なステータス値は次のとおりです: `InProgress | Failed | Errored | Succeeded | Cancelled | Abandoned | Overridden`

## 実行履歴でステージ条件のルール結果を表示する (コンソール）
<a name="w2aac19c19c21b7"></a>

コンソールを使用して実行のルール結果を表示し、ステージ条件がルールを実行してステージの結果を適用したことを確認できます。

**ステージ条件のルール結果を表示する (コンソール）**

1. にサインイン AWS マネジメントコンソール し、[http://console.aws.amazon.com/codesuite/codepipeline/home](https://console.aws.amazon.com/codesuite/codepipeline/home) で CodePipeline コンソールを開きます。

    AWS アカウント に関連付けられているすべてのパイプラインの名前とステータスが表示されます。

1. **[名前]** で、表示するパイプラインの名前を選択します。

1. **[履歴]** を選択し、実行を選択します。[履歴] ページで、**[タイムライン]** タブを選択します。**[ルール]** で、実行のルール結果を表示します。

![前回の実行でモニタリングルールが成功したことを示す [タイムライン] タブの例。](http://docs.aws.amazon.com/ja_jp/codepipeline/latest/userguide/images/stage-condition-timeline-tab.png)


## ステージ条件のルール結果を `list-rule-executions` で表示する (CLI)
<a name="w2aac19c19c21b9"></a>

CLI を使用して実行のルール結果を表示し、ステージ条件がルールを実行してステージの結果を適用したことを確認できます。
+ ターミナル (Linux、macOS、Unix) またはコマンドプロンプト (Windows) を開きます。次に AWS CLI を使用し、{{MyPipeline}} という名前のパイプラインに対して **list-rule-executions** コマンドを実行します。

  ```
  aws codepipeline list-rule-executions --pipeline-name MyFirstPipeline 
  ```

  このコマンドは、パイプラインに関連するすべての完了済みルール実行のリストを返します。

  次の例は、ステージ条件で {{MyMonitorRule}} という名前のルールを使用して返されたパイプラインに関するデータを示しています。

  ```
  {
      "ruleExecutionDetails": [
          {
              "pipelineExecutionId": "e1a7e739-f211-420e-aef9-fa7837666968",
              "ruleExecutionId": "3aafc0c7-0e1c-44f1-b357-d1b16a28e483",
              "pipelineVersion": 9,
              "stageName": "Deploy",
              "ruleName": "MyMonitorRule",
              "startTime": "2024-07-29T15:55:01.271000+00:00",
              "lastUpdateTime": "2024-07-29T15:56:08.682000+00:00",
              "status": "Succeeded",
              "input": {
                  "ruleTypeId": {
                      "category": "Rule",
                      "owner": "AWS",
                      "provider": "CloudWatchAlarm",
                      "version": "1"
                  },
                  "configuration": {
                      "AlarmName": "CWAlarm",
                      "WaitTime": "1"
                  },
                  "resolvedConfiguration": {
                      "AlarmName": "CWAlarm",
                      "WaitTime": "1"
                  },
                  "region": "us-east-1",
                  "inputArtifacts": []
              },
              "output": {
                  "executionResult": {
                      "externalExecutionSummary": "Succeeded with alarm 'CWAlarm' being i
  n an 'OK' state."
                  }
              }
          }
  ```