LoginSignup
1
0

More than 1 year has passed since last update.

Cloudflare のゾーン削除・プラン変更

Last updated at Posted at 2021-10-08

ゾーン削除

Free / Pro / Business Plan

GUI

あり

image-20211007170253015
image-20211007170323827

API

あり

export EMAIL='YOUR_EMAIL'
export APIKEY='YOUR_APIKEY'
export ZONE_ID='YOUR_ZONE_ID'

% curl -s -X DELETE "https://api.cloudflare.com/client/v4/zones/$ZONE_ID" \
     -H "X-Auth-Email: $EMAIL" \
     -H "X-Auth-Key: $APIKEY" \
     -H "Content-Type: application/json" | jq
{
  "result": {
    "id": "xxxxxx"
  },
  "success": true,
  "errors": [],
  "messages": []
}

image-20211008020556025

Enterprise Plan

GUI

なし

image-20211007170544041
image-20211007170559233

API

なし(Enterprise Plan の一部の利用者で有効化される機能ということのようです)

export EMAIL='YOUR_EMAIL'
export APIKEY='YOUR_APIKEY'
export ZONE_ID='YOUR_ZONE_ID'

% curl -X DELETE "https://api.cloudflare.com/client/v4/zones/$ZONE_ID" \
     -H "X-Auth-Email: $EMAIL" \
     -H "X-Auth-Key: $APIKEY" \
     -H "Content-Type: application/json"
{"success":false,"errors":[{"code":1314,"message":"Please contact Cloudflare support to perform this action"}],"messages":[],"result":null}

プラン変更

Free / Pro / Business Plan

GUI

あり

image-20211007170253015
image-20211008020316352

API

あり

image-20211008020828929

Enterprise Plan

GUI

なし あり(2022年11月1日更新、ダッシュボードからもダウングレードできるようになりました。)

image.png
image.png

API

あり

Downgrading from Enterprise Website Plan to Free Website Plan - General - Cloudflare Community

export EMAIL='YOUR_EMAIL'
export APIKEY='YOUR_APIKEY'
export ZONE_ID='YOUR_ZONE_ID'

# プランIDのリスト
% curl -s -X GET "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/available_plans" \
     -H "X-Auth-Email: $EMAIL" \
     -H "X-Auth-Key: $APIKEY" \
     -H "Content-Type: application/json" | jq -r '.result[] | [.name,.id] |join(",")'
Free Plan,0feeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Business Plan,1ac039f6c29b691475c3d74fe588d1ae
Professional Plan,a577b510288e82b26486fd1df47000ec
Enterprise,94f3b7b768b0458b56d2cac4fe5ec0f9

# プランの事前確認
% curl -s -X GET "https://api.cloudflare.com/client/v4/zones/$ZONE_ID" \
     -H "X-Auth-Email: $EMAIL" \
     -H "X-Auth-Key: $APIKEY" \
     -H "Content-Type: application/json" | jq -r '.result.plan | [.name,.id] |join(",")'
Enterprise Website,94f3b7b768b0458b56d2cac4fe5ec0f9

# フリープランへ変更
% curl -X PATCH "https://api.cloudflare.com/client/v4/zones/$ZONE_ID" \
     -H "X-Auth-Email: $EMAIL" \
     -H "X-Auth-Key: $APIKEY" \
     -H "Content-Type: application/json" \
     --data '{"plan":{"id":"0feeeeeeeeeeeeeeeeeeeeeeeeeeeeee"}}' | jq

# プランの事後確認
% curl -s -X GET "https://api.cloudflare.com/client/v4/zones/$ZONE_ID" \
     -H "X-Auth-Email: $EMAIL" \
     -H "X-Auth-Key: $APIKEY" \
     -H "Content-Type: application/json" | jq -r '.result.plan | [.name,.id] |join(",")'
Free Website,0feeeeeeeeeeeeeeeeeeeeeeeeeeeeee

Enterprise Plan ゾーンを削除するには

Free Plan にダウングレード後に GUI もしくは API から削除できます。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0