

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

# 建立動作的 JSON 承載
<a name="schedule-create-json"></a>

下列各節顯示承載的結構，以及 MediaLive 排程每種類型建立動作的承載範例。

**Topics**
+ [輸入切換動作 – 承載](cli-schedule-fields-for-input-switch.md)
+ [輸入準備動作 – 承載](cli-schedule-fields-for-input-prep.md)
+ [啟用全域映像動作 – 承載](cli-schedule-fields-for-activate-image.md)
+ [停用全域浮水印動作 – 承載](cli-schedule-fields-for-deactivate-image.md)
+ [啟用每個輸出映像動作 – 承載](cli-schedule-fields-for-activate-image-per-output.md)
+ [停用每個輸出浮水印動作 – 承載](cli-schedule-fields-for-deactivate-image-per-output.md)
+ [啟用動態圖形浮水印 – 承載](cli-schedule-fields-activate-mgi.md)
+ [停用動作圖形浮水印 – 承載](cli-schedule-fields-deactivate-mgi.md)
+ [Splice\$1insert 訊息 – 承載](cli-schedule-fields-for-splice-insert.md)
+ [Time\$1signal 訊息 – 承載](cli-schedule-fields-for-time-signal.md)
+ [Return-to-network訊息 – 承載](cli-schedule-fields-for-return-network.md)
+ [ID3 中繼資料項目 – 承載](cli-schedule-fields-for-id3.md)
+ [ID3 區段標籤項目 – 承載](cli-schedule-fields-id3-segment-tag.md)
+ [暫停管道動作 – 承載](cli-schedule-fields-for-pause.md)
+ [建立動作的組合](cli-example-multiple-creates.md)

# 輸入切換動作 – 承載
<a name="cli-schedule-fields-for-input-switch"></a>

下列各節顯示輸入切換動作的承載。

在此承載中，`ScheduleActionStartSettings` 僅包含 `FixedModeScheduleActionStartSettings`、`ImmediateModeScheduleActionStartSettings` 或 `FollowModeScheduleActionStartSettings` 其中之一。

請參閱以下範例，以取得每個標籤的範例。

如需下列 JSON 中欄位的意義和值的相關資訊，請參閱 [輸入切換的欄位](schedule-fields-for-ips.md)。

```
{
"ChannelId": "string",
"Creates": {
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "FollowModeScheduleActionStartSettings": {
     "FollowPoint": "enum",
     "ReferenceActionName": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "InputSwitchSettings": {
     "InputAttachmentNameReference": "string",
     "InputClippingSettings": {
      "InputTimecodeSource": "enum",
      "StartTimecode": {
       "Timecode": "string"
      },
      "StopTimecode": {
       "LastFrameClippingBehavior": "enum",
       "Timecode": "string"
      }
     },
     "UrlPath": ["string", ...]
    }
   }
  ]
 }
}
```

## 切換到具有固定開始時間之即時輸入的範例
<a name="json-switch-example-1"></a>

此請求範例是在固定開始時間切換到即時輸入。切換動作稱為 `studio-feed`，會切換到連接稱為 `live-studio-feed` 之輸入附件的輸入。它會在指定的 UTC 時間切換到此輸入。

```
{
  "ChannelId": "999999",
  "Creates": {
    "ScheduleActions": [
      {
       "ScheduleActionStartSettings": {
          "FixedModeScheduleActionStartSettings": {
            "Time": "2018-05-21T20:42:19.000Z"
           }
          },
      "ActionName": "studio-feed",
      "ScheduleActionSettings": {
        "InputSwitchSettings": {
          "InputAttachmentNameReference": "live-studio-feed" 
     }
    }
   }
  ]
 }
}
```

## 靜態檔案切換的範例如下
<a name="json-switch-example"></a>

此請求的範例是切換到靜態檔案輸入，以跟隨前一個輸入的結尾。切換動作稱為 `action-ad-003`，會切換到連接稱為 `zel-cafe` 之輸入附件的輸入。呼叫的動作 `action-ad-002` 結束時，它會切換到此輸入。此動作的檔案會遭到裁切，使其在 30 秒和 11 個影格後結束：

```
{
  "ChannelId": "999999",
  "Creates": {
      "ScheduleActions": [
          {
            "ScheduleActionStartSettings": {
              "FollowModeScheduleActionStartSettings": {
                "FollowPoint": "END",
                "ReferenceActionName": "action-ad-002"
              }
            },
            "ActionName": "action-ad-003",
              "ScheduleActionSettings": {
                 "InputSwitchSettings": {
                    "InputAttachmentNameReference": "zel-cafe",
                      "InputClippingSettings": {
                          "InputTimecodeSource": "ZEROBASED",
               "StopTimecode":{
                 "Timecode": "00:00:30:11",
                 "LastFrameClippingBehavior": "INCLUDE_LAST_FRAME"
       }
      }
     }
    }
   }
  ]
 }
}
```

## 切換到具有立即開始時間的動態輸入的範例
<a name="json-switch-example2"></a>

此請求的範例是立即切換到動態檔案輸入。切換動作稱為 `action-unscheduled-standby`，會切換到連接稱為 `dynamic-unscheduled-standby` 之輸入附件的輸入。對於動態輸入的這種用法，要使用的檔案為 `oceanwaves.mp4`。

```
{
  "ChannelId": "999999",
  "Creates": {
    "ScheduleActions": [
      {
        "ScheduleActionStartSettings": 
          {
          "ImmediateModeScheduleActionStartSettings": {
          }
         },
       "ActionName": "action-unscheduled-slate",
        "ScheduleActionSettings": {
          "InputSwitchSettings": {
            "InputAttachmentNameReference": "slate",
            "UrlPath":[
              "main/oceanwaves.mp4",
              "redundant/oceanwaves.mp4"]
     }
    }
   }
  ]
 }
}
```

# 輸入準備動作 – 承載
<a name="cli-schedule-fields-for-input-prep"></a>

下列各節顯示輸入切換動作的承載。

在此承載中，`ScheduleActionStartSettings` 僅包含 `FixedModeScheduleActionStartSettings`、`ImmediateModeScheduleActionStartSettings` 或 `FollowModeScheduleActionStartSettings` 其中之一。

請參閱以下範例，以取得每個標籤的範例。

如需下列 JSON 中欄位的意義和值的相關資訊，請參閱 [輸入切換的欄位](schedule-fields-for-ips.md)。

```
{
"ChannelId": "string",
"Creates": {
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "FollowModeScheduleActionStartSettings": {
     "FollowPoint": "enum",
     "ReferenceActionName": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "InputPrepareSettings": {
     "InputAttachmentNameReference": "string",
     "InputClippingSettings": {
      "InputTimecodeSource": "enum",
      "StartTimecode": {
       "Timecode": "string"
      },
      "StopTimecode": {
       "LastFrameClippingBehavior": "enum",
       "Timecode": "string"
      }
     },
     "UrlPath": ["string", ...]
     }
    }
   }
  ]
 }
}
```

## 具有固定開始時間的輸入準備範例
<a name="json-prep-example-1"></a>

此請求範例是在固定開始時間切換到即時輸入。切換動作稱為 `studio-feed`，會切換到連接稱為 `live-studio-feed` 之輸入附件的輸入。它會在指定的 UTC 時間切換到此輸入。

```
{
  "ChannelId": "999999",
  "Creates": {
    "ScheduleActions": [
      {
       "ScheduleActionStartSettings": {
          "FixedModeScheduleActionStartSettings": {
            "Time": "2018-05-21T20:42:19.000Z"
           }
          },
      "ActionName": "studio-feed",
      "ScheduleActionSettings": {
        "InputSwitchSettings": {
          "InputAttachmentNameReference": "live-studio-feed"
     }
    }
   }
  ]
 }
}
```

## 輸入準備的範例如下
<a name="json-prep-example-2"></a>

此請求的範例是切換到靜態檔案輸入，以跟隨前一個輸入的結尾。切換動作稱為 `action-ad-003`，會切換到連接稱為 `zel-cafe` 之輸入附件的輸入。呼叫的動作 `action-ad-002` 結束時，它會切換到此輸入。此動作的檔案會遭到裁切，使其在 30 秒和 11 個影格後結束：

```
{
  "ChannelId": "999999",
  "Creates": {
      "ScheduleActions": [
          {
            "ScheduleActionStartSettings": {
              "FollowModeScheduleActionStartSettings": {
                "FollowPoint": "END",
                "ReferenceActionName": "action-ad-002"
              }
            },
            "ActionName": "action-ad-003",
              "ScheduleActionSettings": {
                 "InputSwitchSettings": {
                    "InputAttachmentNameReference": "zel-cafe",
                      "InputClippingSettings": {
                          "InputTimecodeSource": "ZEROBASED",
               "StopTimecode":{
                 "Timecode": "00:00:30:11",
                 "LastFrameClippingBehavior": "INCLUDE_LAST_FRAME"
              }
            }
          }
        }
      }
    ]
  }
}
```

# 啟用全域映像動作 – 承載
<a name="cli-schedule-fields-for-activate-image"></a>

如需下列 JSON 中欄位意義和值的資訊，請參閱 [啟用全域映像浮水印的欄位](schedule-fields-for-activate-image.md)。

```
{
"ChannelId": "string",
"Creates": {
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "StaticImageActivateSettings": {
     "Duration": integer,
     "FadeIn": integer,
     "FadeOut": integer,
     "Height": integer,
     "Image": {
      "PasswordParam": "string",
      "Uri": "string",
      "Username": "string"
     },
     "ImageX": integer,
     "ImageY": integer,
     "Layer": integer,
     "Opacity": integer,
     "Width": integer
     }
    }
   }
  ]
 }
}
```

## 範例
<a name="json-activate-image-example"></a>

此請求範例會建立映像浮水印，以插入頻道中每個輸出群組中的每個視訊輸出。浮水印使用存放在 Amazon S3 儲存貯體中的檔案。請求不包含持續時間，因此不包含淡出。反之，其意圖是在適當時間傳送獨立的停用請求。所有時間單位均為毫秒，所有定位值單位均為像素：

```
{
  "ChannelId": "999999",
  "Creates": {
  "ScheduleActions": [
    {
      "ScheduleActionStartSettings": {
        "FixedModeScheduleActionStartSettings": {
          "Time": "2018-05-21T20:42:19.000Z"
        }
      },
      "ActionName": "corporate-logo-030",
      "ScheduleActionSettings": {
        "StaticImageActivateSettings": {
          "Image": {
          "PasswordParam": "corplogo!2312",
          "Uri": "s3ssl://amzn-s3-demo-bucket/logos/corporate/high-res.bmp",
          "Username": "medialiveoperator"
          },
          "Layer": 1,
          "FadeIn": 1500,
          "Height": 900
          "Width": 800,
          "ImageX": 200,
          "ImageY": 300,
          "Opacity": 60,
          }
        }
      }
    ]
  }
}
```

# 停用全域浮水印動作 – 承載
<a name="cli-schedule-fields-for-deactivate-image"></a>

如需下列 JSON 中欄位意義和值的資訊，請參閱 [停用全域映像浮水印的欄位](schedule-fields-for-deactivate-image.md)。

```
{
 "ChannelId": "string",
 "Creates": {
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "StaticImageDeactivateSettings": {
     "FadeOut": integer,
     "Layer": integer
    }
   }
  }
 ]
}
```

## 範例
<a name="json-deactivate-image-example"></a>

此請求範例會建立 動作，以移除 20：42：04.000 (UTC) 的影像浮水印，並將 500 毫秒淡出新增至結束時間，這表示浮水印會在 20：42：04.500 隱藏。

動作會移除全域 layer 4 中的映像浮水印。這表示*只有在使用全域動作 (StaticImageActivateSettings) 插入映像時*，才會移除映像。 StaticImageActivateSettings 它不會從每個輸出第 4 層移除浮水印。

```
{
  "ChannelId": "999999",
  "Creates": {
  "ScheduleActions": [
    {
      "ScheduleActionStartSettings": {
        "FixedModeScheduleActionStartSettings": {
          "Time": "2018-05-21T20:42:04.000Z"
        }
      },
      "ActionName": "stop-overlay-029",
      "ScheduleActionSettings": {
        "StaticImageDeactivateSettings": {
          "FadeOut": 500,
          "Layer": 4
          }
        }
      }
    ]
  }
}
```

# 啟用每個輸出映像動作 – 承載
<a name="cli-schedule-fields-for-activate-image-per-output"></a>

如需下列 JSON 中欄位意義和值的資訊，請參閱 [用於啟用每個輸出影像浮水印的欄位](schedule-fields-activate-image-per-output.md)。

```
{
"ChannelId": "string",
"Creates": {
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "StaticImageOutputActivateSettings": {
     "Duration": integer,
     "FadeIn": integer,
     "FadeOut": integer,
     "Height": integer,
     "Image": {
      "PasswordParam": "string",
      "Uri": "string",
      "Username": "string"
     },
     "ImageX": integer,
     "ImageY": integer,
     "Layer": integer,
     "Opacity": integer,
     "OutputNames": [
       {}
      ],
     "Width": integer
     }
    }
   }
  ]
 }
}
```

## 範例
<a name="json-deactivate-image-per-output-example"></a>

此請求範例會建立影像浮水印，以插入頻道中的特定輸出。浮水印使用存放在 Amazon S3 儲存貯體中的檔案。請求會將映像插入輸出 `hls-high-res`和 `mss-high-res`。影像的大小適合這些輸出中的影片解析度。

請求旨在始終存在。因此，它會設定為立即啟動 （頻道啟動時立即啟動）。所有時間單位均為毫秒，所有定位值單位均為像素：

```
{
  "ChannelId": "999999",
  "Creates": {
  "ScheduleActions": [
    {
        "ScheduleActionStartSettings": 
          {
          "ImmediateModeScheduleActionStartSettings": {
          }
         },
      },
      "ActionName": "logo-1280",
      "ScheduleActionSettings": {
        "StaticImageOutputActivateSettings": {
          "Image": {
          "PasswordParam": "corplogo!2312",
          "Uri": "s3ssl://amzn-s3-demo-bucket/logos/corporate/10percent-1280.bmp",
          "Username": "medialiveoperator"
          },
          "Layer": 0,
          "outputNames": [
            hls-high-res,mss-high-res
           ],
          "ImageX": 200,
          "ImageY": 300,
          "FadeIn": 1500,
          "Opacity": 60
          }
        }
      }
    ]
  }
}
```

# 停用每個輸出浮水印動作 – 承載
<a name="cli-schedule-fields-for-deactivate-image-per-output"></a>

如需下列 JSON 中欄位意義和值的資訊，請參閱 [停用每個輸出影像浮水印的欄位](schedule-fields-deactivate-image-per-output.md)。

```
{
 "ChannelId": "string",
 "Creates": {
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "StaticImageOutputDeactivateSettings": {
     "FadeOut": integer,
     "Layer": integer,
     "OutputNames"
    }
   }
  }
 ]
}
```

## 範例
<a name="cli-schedule-fields-for-deactivate-image-per-output-example"></a>

停用動作會在指定的輸出或輸出中停用指定每個輸出層中的映像。

在此範例的後續啟用範例中， 動作會移除輸出 hls-high-res 中每個輸出層 4 中的所有影像浮水印。

```
{
  "ChannelId": "999999",
  "Creates": {
  "ScheduleActions": [
    {
      "ScheduleActionStartSettings": {
        "FixedModeScheduleActionStartSettings": {
          "Time": "2018-05-21T20:42:04.000Z"
        }
      },
      "ActionName": "stop-layer4-all-outputs",
      "ScheduleActionSettings": {
        "StaticImageOutputDeactivateSettings": {
          "outputNames": [
            hls-high-res
           ],
          "FadeOut": 500,
          "Layer": 4
          }
        }
      }
    ]
  }
}
```

# 啟用動態圖形浮水印 – 承載
<a name="cli-schedule-fields-activate-mgi"></a>

如需下列 JSON 中欄位意義和值的資訊，請參閱 [用於啟用動態圖形浮水印的欄位](schedule-fields-for-mg.md)。

```
{
 "ChannelId": "string",
 "Creates": {
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "MotionGraphicsImageActivateSettings": {
     "Duration": integer
     "Url": "string"
     "Username": "string",
     "PasswordParam": "string"
    }
   }
  ]
 }
}
```

## 範例
<a name="json-activate-mgi-example"></a>

此請求範例會建立名為 mg\$1ticker\$1tape 的動作圖形浮水印動作。動態圖形資產存放在 https：//http://example.com/ticker\$1tape.html。此伺服器需要使用者登入資料。請求不包含持續時間。反之，其意圖是在適當時間傳送獨立的停用請求。

```
{
"ChannelId": "999999",
"Creates": {
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "2018-05-21T20:42:04.000Z"
    }
   },
   "ActionName": "mg_ticker_tape",
   "ScheduleActionSettings": {
    "MotionGraphicsImageActivateSettings": {
     "Url": "https://example.com/ticker_tape.html"
     "Username": "medialiveoperator",
     "PasswordParam": "/medialive/12345"
    }
   }
  ]
 }
}
```

# 停用動作圖形浮水印 – 承載
<a name="cli-schedule-fields-deactivate-mgi"></a>

如需下列 JSON 中欄位意義和值的資訊，請參閱 [停用動態圖形浮水印的欄位](schedule-fields-for-mg-deactivate.md)。

```
{
"ChannelId": "string",
"Creates": {
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "MotionGraphicsImageDeactivateSettings": {
     }
    }
   }
  ]
 }
}
```

## 範例
<a name="json-deactivate-mgi-example"></a>

此請求範例會建立動作，以在 23：59：00.000 (UTC) 結束動態圖形浮水印。：

```
{
"ChannelId": "999999",
"Creates": {
 "ScheduleActions": [
  {
  "ScheduleActionStartSettings": {
   "FixedModeScheduleActionStartSettings": {
   "Time": "2018-05-21T23:59:00.000Z"
   },
   "ActionName": "deactivate-ticker-tape",
   "ScheduleActionSettings": {
    "MotionGraphicsImageDeactivateSettings": {
     }
    }
   }
  ]
 }
}
```

# Splice\$1insert 訊息 – 承載
<a name="cli-schedule-fields-for-splice-insert"></a>

如需下列 JSON 中欄位的意義和值的相關資訊，請參閱 [splice\$1insert 訊息的欄位](schedule-fields-for-splice_insert.md)。

```
{
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "FollowModeScheduleActionStartSettings": {
     "FollowPoint": "enum",
     "ReferenceActionName": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "Scte35SpliceInsertSettings": {
     "Duration": integer,
     "SpliceEventId": integer
    }
   }
  }
 ]
}
```

## 具有固定開始時間的接合插入範例
<a name="json-splice-insert-example"></a>

此請求範例會建立 splice\$1insert 的動作，UTC 開始時間為 20:42:04.000。其也可能有參考您資料庫中廣告時段的 `ActionName`，一個接合事件 ID 的獨特整數，以及 1,350,000 kHz 刻度 (15 秒) 的長度。

```
{
  "ChannelId": "999999",
  "Creates": {
    "ScheduleActions": [
      {
        "ScheduleActionStartSettings": {
          "FixedModeScheduleActionStartSettings": {
            "Time": "2018-05-21T20:42:04.000Z"
          }
        },
      "ActionName": "adavail-3708",
      "ScheduleActionSettings": {
        "Scte35SpliceInsertSettings": {
          "SpliceEventId": 3708,
          "Duration": 1350000
          }
        }
      }
    ]
  }
}
```

## 如下所示的接合插入範例
<a name="json-splice-insert-example2"></a>

此請求範例會建立動作，以便在名為 nature-doco-003 的輸入切換結束後插入 splice\$1insert。此動作可能有參考您資料庫中廣告時段的 `ActionName`，一個接合事件 ID 的獨特整數，以及 1,350,000 kHz 刻度 (15 秒) 的長度。

當您希望在輸入完成時立即出現廣告時段，但您不知道何時會發生這種情況，則遵循 SCTE 35 訊息的模式很有用。

```
{
  "ChannelId": "999999",
  "Creates": {
    "ScheduleActions": [
      {
        "ScheduleActionStartSettings": {
         "FollowModeScheduleActionStartSettings": {
                "FollowPoint": "END",
                "ReferenceActionName": "nature-doco-003"
        }
      },
      "ActionName": "adavail-3708",
      "ScheduleActionSettings": {
        "Scte35SpliceInsertSettings": {
          "SpliceEventId": 3708,
          "Duration": 1350000
          }
        }
      }
    ]
  }
}
```

# Time\$1signal 訊息 – 承載
<a name="cli-schedule-fields-for-time-signal"></a>

如需下列 JSON 中欄位意義和值的資訊，請參閱 [time\$1signal 訊息的欄位](schedule-fields-for-time-signal.md)。

```
{
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "FollowModeScheduleActionStartSettings": {
     "FollowPoint": "enum",
     "ReferenceActionName": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "Scte35TimeSignalSettings": {
     "Scte35Descriptors": [
      {
       "Scte35DescriptorSettings": {
        "SegmentationDescriptorScte35DescriptorSettings": {
         "DeliveryRestrictions": {
          "ArchiveAllowedFlag": "enum",
          "DeviceRestrictions": "enum",
          "NoRegionalBlackoutFlag": "enum",
          "WebDeliveryAllowedFlag": "enum"
         },
         "SegmentNum": integer,
         "SegmentationCancelIndicator": "enum",
         "SegmentationDuration": integer,
         "SegmentationEventId": integer,
         "SegmentationTypeId": integer,
         "SegmentationUpid": "string",
         "SegmentationUpidType": integer,
         "SegmentsExpected": integer,
         "SubSegmentNum": integer,
         "SubSegmentsExpected": integer
        }
       }
      }
     ]
    }
   }
  }
 ]
}
```

## 範例
<a name="json-time-signal-example"></a>

此請求範例建立了 time\$1signal 的動作，其 UTC 開始時間為 20:42:04.000，而 `SegmentationEventId` 為唯一的整數。針對限制欄位，`NoRegionalBlackoutFlag` 有一個限制集 (區域中斷已就位)。

```
{
  "ChannelId": "999999",
  "Creates": {
  "ScheduleActions": [
    {
      "ScheduleActionStartSettings": {
        "FixedModeScheduleActionStartSettings": {
          "Time": "2018-05-21T20:42:04.000Z"
        }
      },
      "ActionName": "adavail-3708",
      "ScheduleActionSettings": {
        "Scte35TimeSignalSettings": {
          "Scte35Descriptors": [
          {
            "Scte35DescriptorSettings": {
              "SegmentationDescriptorScte35DescriptorSettings": {
                "SubSegmentsExpected": 0,
                "SegmentationEventId": 7054,
                "SegmentationDuration": 1350000,
                "SegmentationCancelIndicator": 0,
                "SubSegmentNum": 0,
                "SegmentationUpidType": 12,
                "SegmentNum": 0,
                "SegmentationCancelIndicator": "SEGMENTATION_EVENT_NOT_CANCELED",
                "DeliveryRestrictions": {
                  "DeviceRestrictions": "NONE",
                  "WebDeliveryAllowedFlag": "WEB_DELIVERY_ALLOWED",
                  "NoRegionalBlackoutFlag": "REGIONAL_BLACKOUT",
                  "ArchiveAllowedFlag": "ARCHIVE_ALLOWED"
                },
                "SegmentationUpid": "4a414e3136494e4155303031",
                "SegmentationTypeId": 52,
                "SegmentsExpected": 0
                  }
                }
              }
            ]
          }
        }
      }
    ]
  }
}
```

# Return-to-network訊息 – 承載
<a name="cli-schedule-fields-for-return-network"></a>

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

```
{
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "FollowModeScheduleActionStartSettings": {
     "FollowPoint": "enum",
     "ReferenceActionName": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
    "Scte35ReturnToNetworkSettings": {
     "SpliceEventId": integer                
    }
   }
  }
 ]
}
```

## 範例
<a name="json-return-network-example"></a>

此請求範例會建立 UTC 啟動時間為 20:42:19 的 return-to-network。

```
{
  "ChannelId": "999999",
  "Creates": {
    "ScheduleActions": [
      {
        "ScheduleActionStartSettings": {
          "FixedModeScheduleActionStartSettings": {
            "Time": "2018-05-21T20:42:19.000Z"
          }
      },
      "ActionName": "end-adavail-3708",
      "ScheduleActionSettings": {
        "Scte35ReturnToNetworkSettings": {
          }
        }
      }
    ]
  }
}
```

# ID3 中繼資料項目 – 承載
<a name="cli-schedule-fields-for-id3"></a>

如需下列 JSON 中欄位意義和值的資訊，請參閱 [ID3 中繼資料的欄位](schedule-fields-for-id3-userdata.md)。

**HlsTimedMetadataSettings 動作的承載**

```
{
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
     "HlsTimedMetadataSettings": {
     "Id3": "string"
    }
   }
  }
 ]
}
```

**TimedMetadataSettings 動作的承載**

```
{
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
     "TimedMetadataSettings": {
     "Id3": "string"
    }
   }
  }
 ]
}
```

## 範例
<a name="json-id3-example"></a>

此請求範例使用 `HlsTimedMetadataSettings`動作。它會建立 ID3 中繼資料，以在 UTC 13：35：59 插入適當的輸出群組。

```
{
  "ChannelId": "999999",
  "Creates": {
  "ScheduleActions": [
    {
      "ScheduleActionStartSettings": {
        "FixedModeScheduleActionStartSettings": {
          "Time": "2019-01-02T13:35:59Z"
        }
      },
      "ActionName": "id3-metadata.2019-01-02T13:35:59Z",
      "ScheduleActionSettings": {
        "HlsTimedMetadataSettings": {
          "Id3": "SUQzBAAAAAAAF1RJVDIAAAANAAADSGVsbG8gV29ybGQA"
          }
        }
      }
    ]
  }
}
```

# ID3 區段標籤項目 – 承載
<a name="cli-schedule-fields-id3-segment-tag"></a>

如需下列 JSON 中欄位意義和值的資訊，請參閱 [ID3 區段標籤的欄位](schedule-fields-for-id3-segment-tags.md)。

**HlsId3SegmentTaggingSettings 動作的承載**

```
{
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
	"HlsId3SegmentTaggingSettings": {
         "Tag": "string"
         "Id3": "string"
    }
   }
  }
 ]
}
```

**Id3SegmentTaggingSettings 動作的承載**

```
{
 "ScheduleActions": [
  {
   "ScheduleActionStartSettings": {
    "FixedModeScheduleActionStartSettings": {
     "Time": "string"
    },
    "ImmediateModeScheduleActionStartSettings": {
    }
   },
   "ActionName": "string",
   "ScheduleActionSettings": {
	"Id3SegmentTaggingSettings": {
         "Tag": "string"
         "Id3": "string"
    }
   }
  }
 ]
}
```

## 使用標籤屬性的範例
<a name="json-id3-segment-example"></a>

此請求範例使用 `HlsId3SegmentTaggingSettings`動作。它會建立從 UTC 13：35：59 開始插入的 ID3 區段標籤。此範例使用 `Tag` 屬性 ，這表示您只`value`為 `TXXX` 欄位指定 的內容。在此範例中，內容是區段的日期、時間和數量。

```
{
  "ChannelId": "999999",
  "Creates": {
  "ScheduleActions": [
    {
      "ScheduleActionStartSettings": {
        "FixedModeScheduleActionStartSettings": {
          "Time": "2020-01-02T13:35:59Z"
        }
      },
      "ActionName": "id3-datetime-and-segment",
      "ScheduleActionSettings": {
        "HlsId3SegmentTaggingSettings": {
          "Tag": "$dt$-$sn$"
          }
        }
      }
    ]
  }
}
```

## 使用 Id3 屬性的範例
<a name="json-ide-segment-id3-example"></a>

此請求範例會建立要立即插入的 ID3 區段標籤。此範例使用 `Id3` 屬性，這表示內容編碼為 base64。

```
{
  "ChannelId": "999999",
  "Creates": {
  "ScheduleActions": [
    {
      "ScheduleActionStartSettings": {
        ImmediateModeScheduleActionStartSettings
       }
      },
      "ActionName": "id3-song309",
      "ScheduleActionSettings": {
        "HlsId3SegmentTaggingSettings": {
          "Id3": "SUQzBAAAAAAAF1RJVDIAAAANAAADSGVsbG8gV29ybGQA"
          }
        }
      }
    ]
  }
}
```

# 暫停管道動作 – 承載
<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": [
       {}
      ]
     }
    }
   }
  ]
 }
}
```

# 建立動作的組合
<a name="cli-example-multiple-creates"></a>

以下是要傳入 `batch-update-schedule` AWS CLI 命令`--creates`參數的 JSON 內文範例。它包含兩個要建立的動作。在此範例中，這兩個動作都是 splice\$1inserts，但其實您可以結合任意數量和任意類型的建立動作。

```
{
    "ScheduleActions": [
      {
        "ScheduleActionSettings": {
          "Scte35SpliceInsertSettings": {
            "Duration": 1350000,
            "SpliceEventId": 3
          }
        },
        "ActionName": "SpliceInsert-01",
        "ScheduleActionStartSettings": {
          "FixedModeScheduleActionStartSettings": {
            "Time": "2018-11-05T16:10:30.000Z"
          }
        }
      },
      {
        "ScheduleActionSettings": {
          "Scte35SpliceInsertSettings": {
            "Duration": 2700000,
            "SpliceEventId": 3
          }
        },
        "ActionName": "SpliceInsert-02",
        "ScheduleActionStartSettings": {
          "FixedModeScheduleActionStartSettings": {
            "Time": "2018-11-05T16:30:45.000Z"
          }
        }
      }
    ]
  }
```