クラスタの Bastion API¶
クラスタの Bastion API 解説書
クラスタ¶
-
GET
/bastion/clusters
¶ クラスタのリストを取得する
応答 JSON オブジェクト: - [] (object) –
- [].id (string) – クラスタ ID。
- [].instanceID (string) – terraform インスタンス ID。
- [].source (string) – terraform ソースロケーション。
- [].static.isStatic (boolean) – クラスタが静的かどうか
- [].static.output[key] (undefined) –
- [].category (string) – クラスタカテゴリ。
応答例 :
[ { "id": "myCluster", "instanceID": "myCluster", "category": "cluster", "static": { "isStatic": true, "output": { "server_public_ips": { "type": "list", "value": [ "127.0.0.1" ] } } } } ]
-
GET
/bastion/cluster/{clusterID}
¶ クラスタを取得する
パラメータ: - clusterID – クラスタ ID
応答 JSON オブジェクト: - id (string) – クラスタ ID。
- instanceID (string) – terraform インスタンス ID。
- source (string) – terraform ソースロケーション。
- static.isStatic (boolean) – クラスタが静的かどうか
- static.output[key] (undefined) –
- category (string) – クラスタカテゴリ。
応答例 :
{ "id": "myCluster", "instanceID": "myCluster", "category": "cluster", "static": { "isStatic": true, "output": { "server_public_ips": { "type": "list", "value": [ "127.0.0.1" ] } } } }
-
POST
/bastion/cluster/{clusterID}
¶ クラスタを作成します。この操作により、terraform インスタンスが作成されます。
パラメータ: - clusterID – クラスタ ID
クエリパラメータ: - fromCluster – この新しいクラスタのクローン元のクラスタ ID。
リクエスト JSON オブジェクト: - id (string) – バックエンド ID
- variables[key] (string) –
- category (string) – クラスタカテゴリ。
- static.isStatic (boolean) – クラスタが静的かどうか
- static.output[key] (undefined) –
クエリ例 :
{ "id": "", "variables": {}, "category": "", "static": { "isStatic": true, "output": { "server_public_ips": { "type": "list", "value": [ "127.0.0.1" ] } } } }
-
DELETE
/bastion/cluster/{clusterID}
¶ クラスタを削除します。terraform インスタンスが破棄されていない場合、この操作は拒否されます。
パラメータ: - clusterID – クラスタ ID
クエリパラメータ: - force – 削除の操作を強制的に行う
画像¶
-
GET
/bastion/cluster/{clusterID}/images
¶ 画像を取得する
パラメータ: - clusterID – クラスタ ID
応答 JSON オブジェクト: - [key].id (string) –
- [key].tag (string) –
- [key].archfmt (string) –
- [key].url (string) –
- [key].dirty (boolean) –
応答例 :
{ "itemA": { "id": "", "tag": "", "archfmt": "", "url": "", "dirty": false } }
-
POST
/bastion/cluster/{clusterID}/images
¶ 画像を設定する
パラメータ: - clusterID – クラスタ ID
リクエスト JSON オブジェクト: - [key].id (string) –
- [key].tag (string) –
- [key].archfmt (string) –
- [key].url (string) –
- [key].dirty (boolean) –
クエリ例 :
{ "itemA": { "id": "", "tag": "", "archfmt": "", "url": "", "dirty": false } }
-
DELETE
/bastion/cluster/{clusterID}/images
¶ すべての画像を削除する
パラメータ: - clusterID – クラスタ ID
-
DELETE
/bastion/cluster/{clusterID}/image/{imageID}
¶ 画像を削除する
パラメータ: - clusterID – クラスタ ID
- imageID – 画像 ID
セットアップジョブ¶
POST /bastion/cluster/{clusterID}/setup を実行する際に、クラスタでセットアップジョブが開始されます。これは、Hashi-UI ジョブの場合です。
-
GET
/bastion/cluster/{clusterID}/setup_jobs
¶ セットアップジョブを取得する。
パラメータ: - clusterID – クラスタ ID
応答 JSON オブジェクト: - [key].id (string) – セットアップジョブの一意の ID。
- [key].template (string) – ジョブを作成するテンプレート。
応答例 :
{ "itemA": { "id": "", "template": "" } }
-
POST
/bastion/cluster/{clusterID}/setup_jobs
¶ セットアップジョブを設定する
パラメータ: - clusterID – クラスタ ID
リクエスト JSON オブジェクト: - [key].id (string) – セットアップジョブの一意の ID。
- [key].template (string) – ジョブを作成するテンプレート。
クエリ例 :
{ "itemA": { "id": "", "template": "" } }
-
DELETE
/bastion/cluster/{clusterID}/setup_jobs
¶ すべてのセットアップジョブを削除する
パラメータ: - clusterID – クラスタ ID