

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

# 暫停管道動作 – 承載
<a name="cli-schedule-fields-for-pause"></a>

如需下列 JSON 中欄位意義和值的資訊，請參閱 [暫停的欄位](schedule-fields-for-pause.md)。

```
{
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "PauseStateSettings": {
     "Pipelines": [
      {
       "PipelineId": "enum"
      }
     ]
    }
   }
  }
 ]
}
```

## 範例：暫停一個管道
<a name="json-pause-example"></a>

此請求範例會在 UTC 的 20：42：19 暫停管道 0。MediaLive 一律會將命令讀取為：*設定指定的管道以暫停，並將所有其他管道設定為未暫停。*

```
{
  "ChannelId": "999999",
  "Creates": {
    "ScheduleActions": [
      {
        "ScheduleActionStartSettings": {
          "FixedModeScheduleActionStartSettings": {
            "Time": "2018-05-21T20:42:19Z"
          }
        },
        "ActionName": "pause-pipeline-0-now",
        "ScheduleActionSettings": {
          "PauseStateSettings": {
            "Pipelines": [
              {
                "PipelineId": "PIPELINE_0"
              }
            ]
          }
        }
      }
    ]
  }
}
```

## 範例：取消暫停兩個管道
<a name="json-unpause-example"></a>

此請求範例會取消暫停目前暫停的所有管道。

**注意**  
MediaLive 一律會將命令讀取為：*設定指定的管道以暫停，並將所有其他管道設定為未暫停。*在此範例中，`Pipelines`陣列是空的。MediaLive 將此空陣列解譯為：*將所有管道設定為未暫停*。

```
{
 "ChannelId": "999999",
 "Creates": {
     "ScheduleActions": [
      {
       "ScheduleActionStartSettings": {
         "ImmediateModeScheduleActionStartSettings": {}
      },
     "ActionName": "unpause-pipeline-0",
     "ScheduleActionSettings": {
       "PauseStateSettings": {
         "Pipelines": [
       {}
      ]
     }
    }
   }
  ]
 }
}
```