コンテンツにスキップ

有効化

By default, Version Management is not enabled on a zone.

To enable Version Management:

  1. Log in to the Cloudflare dashboard.
  2. Select your account and zone.
  3. Go to Version Management.
  4. Select Enable versioning.

Once you enable Version Management, Cloudflare will automatically create:

  • Version Zero, think about this as the configuration of your current zone. Once default environments are created, Version Zero is automatically deployed to them, guaranteeing no disruption in your live traffic. This Version is also permanently editable. In case you decide to disable Zone Versioning, Version Zero will become your zone again.
  • Global Configuration, you can find all the configurations here that are not supported by Version Management.

On the Environments page, you can create default environments for Production, Staging, and Development.

バージョン管理の無効化

ゾーンバージョン管理を無効にするには:

  1. バージョンゼロがあなたのゾーンに対して正しい設定を持っていることを確認します:

    1. 比較機能を使用して、現在のプロダクションバージョンとバージョンゼロの違いを確認します。

    2. 違いがある場合は、バージョンゼロを変更して現在のプロダクションバージョンに一致させます。

    3. 昇格してバージョンゼロプロダクション環境に昇格させます。

    4. 新しいプロダクション環境が期待通りに機能することを確認します。

  2. /zones/{zone_id}/environmentsエンドポイントにGETリクエストを送信します。

    Terminal window
    curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/environments" \
    --header "X-Auth-Email: <EMAIL>" \
    --header "X-Auth-Key: <API_KEY>"

    レスポンスで、次の値を保存します:

    • 各ルールの環境ref
  3. それらの環境のrefを使用して、各環境の/zones/{zone_id}/environments/{ref}エンドポイントにDELETEリクエストを送信します。

    Terminal window
    curl --request DELETE \
    "https://api.cloudflare.com/client/v4/zones/{zone_id}/environments/{ref}" \
    --header "X-Auth-Email: <EMAIL>" \
    --header "X-Auth-Key: <API_KEY>"
  4. 次に、すべてのHTTPアプリケーション(またはゾーンのバージョン)を見つけるためにGETリクエストを送信します。

    Terminal window
    curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/http_applications" \
    --header "X-Auth-Email: <EMAIL>" \
    --header "X-Auth-Key: <API_KEY>"

    各HTTPアプリケーションのidを保存します。

  5. それらのHTTPアプリケーションのidを使用して、各アプリケーションに対してDELETEリクエストを送信します。

    Terminal window
    curl --request DELETE \
    "https://api.cloudflare.com/client/v4/zones/{zone_id}/http_applications/{http_application_id}" \
    --header "X-Auth-Email: <EMAIL>" \
    --header "X-Auth-Key: <API_KEY>"

これらのすべてのステップが完了すると、ゾーンバージョン管理は元のランディングページに戻ります。