Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

アプライアンスの操作

最終更新 Markdown で表示Agent セットアップ

Cloudflare One Appliance(旧称 Magic WAN Connector)は、ダッシュボードまたは API から再起動、リブート、シャットダウンできます。操作は非同期です。アプライアンスは、次回チェックインしたときに実行します。

操作 効果
Restart 管理対象サービスを再起動します。一時状態と、(任意で)永続状態を消去します。
Reboot アプライアンスの電源を入れ直します。任意で永続状態を消去します。設定を最初から適用し直します。
Shutdown アプライアンスの電源を切ります。任意で永続状態を消去します。手動で電源を入れるまで、機器はオフラインのままです。
  1. Connectors ページを開きます。
Connectors を開く ↗
  1. Appliances タブ > Appliances を開きます。
  2. 管理する Cloudflare One Appliance を探し、Edit を選択します。
  3. Operations セクションまでスクロールします。
  4. RestartReboot、または Shutdown を選択します。
  5. 確認ダイアログで、次を行います。
    • I understand this operation may disrupt service にチェックを入れます(必須)。
    • 任意で、Purge persistent state にチェックを入れると、一時状態に加えて永続データも消去します。
  6. Confirm を選択します。

操作は送信され、アプライアンスが次回チェックインしたときに実行されます。アプライアンスが実行するまで、バナーに保留中の操作ステータスが表示されます。

interrupts エンドポイントへ、次のいずれかのアクションを含む POST リクエストを送信します。

管理対象サービスを再起動する:

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/connectors/{connector_id}/interrupts" \
--header "Authorization: Bearer <API_TOKEN>" \
--header "Content-Type: application/json" \
--data '{"restart": {"purge": false}}'

リブート(電源サイクル):

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/connectors/{connector_id}/interrupts" \
--header "Authorization: Bearer <API_TOKEN>" \
--header "Content-Type: application/json" \
--data '{"reboot": {"purge": false}}'

シャットダウン:

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/connectors/{connector_id}/interrupts" \
--header "Authorization: Bearer <API_TOKEN>" \
--header "Content-Type: application/json" \
--data '{"shutdown": {"purge": false}}'

永続状態も消去するには、"purge": true を設定します。

応答には submitted_at タイムスタンプが含まれます。アプライアンスが操作を実行したかどうかは、list エンドポイントをポーリングして確認します。

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/magic/connectors/{connector_id}/interrupts" \
--header "Authorization: Bearer <API_TOKEN>"

応答の triggered_at に値が入っていれば、アプライアンスは操作を実行済みです。

役に立ちましたか?